title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Django import error: No module named models | <p>I keep receiving the error <code>Could not import movies.views. Error was: No module named models</code></p>
<p>Here is my traceback:</p>
<pre><code> Environment:
Request Method: GET
Request URL: http://localhost:8000/movies/awesome-movie/
Django Version: 1.3.1
Python Version: 2.7.3
Insta... | 0 | 2,010 |
Cannot construct instance of `java.time.ZonedDateTime` (no Creators, like default construct, exist) | <p>I'm learning Jackson under JAX-RS 1.0. The server returns a HTTP response as follows:</p>
<pre><code>{
"url": "http://localhost:8080/api/123",
"created": "2018-05-26T09:21:26.301+02:00"
}
</code></pre>
<p>and I need to deserialize the JSON response into a Java object called <code>ProductCreated</code>:</p>
<p... | 0 | 3,057 |
webpack not generating bundle.js | <p>I am making a web app use react and php and i am using webpack for es6 to js so i generated files but i have a problem about webpack output bundle.js file.</p>
<blockquote>
<p>this is my webpack.config.js</p>
</blockquote>
<pre><code>const webpack = require('webpack');
module.exports = {
entry: [
'./src/i... | 0 | 1,066 |
Why my Flutter app don't run? BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60 | <p>I tried to figure it out, but I couldn't even find how. Please help me.</p>
<p>When I try to run my first flutter app this happen:</p>
<pre><code>FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\Angel\Downloads\Codigo\Flutter\first_a... | 0 | 4,048 |
Java GUI error - Type mismatch: cannot convert from String to double | <p>Line 100 <strong><em><code>cost = JOptionPane.showInputDialog("Cost");</code></em></strong> of the attached code is reporting the error "Type mismatch: cannot convert from String to double" - any suggestions what's causing this please?</p>
<p>Basically it's a class that accesses another class 'BookShelf' and this l... | 0 | 1,617 |
Django forms clean data | <p>I'm trying to clean data in using clean method in forms, but when I did it then I dont see validation errors in my form its only error page from django.</p>
<p>I have edit and create form and I would like to have this clean in one place but not copy to 2 views.</p>
<p>Can you give me some advice?
I read docs about... | 0 | 3,306 |
Subscribing and publishing geometry/Twist messages from Turtlesim | <p>I'm working on an exercise that uses the Turtlesim tool.</p>
<p>I have to create a node vel_filter that subscribes to messages published by the pubvel node (from the book A Gentle Introduction to Ros by O'Kane) and immediately republish only those messages who have positive angular velocity.</p>
<p>The pubvel code... | 0 | 1,839 |
remove decoration tags aem sightly | <p>How can I remove the decoration tags only in preview/publish mode in AEM sightly?</p>
<p>I have seen the question and answer: <a href="https://stackoverflow.com/questions/26102239/aem-cq-conditional-css-class-on-decoration-tag">AEM/CQ: Conditional CSS class on decoration tag</a></p>
<p>This removes the decoration ... | 0 | 1,645 |
Is it possible for Scrapy to get plain text from raw HTML data? | <p>For example:</p>
<pre><code>scrapy shell http://scrapy.org/
content = hxs.select('//*[@id="content"]').extract()[0]
print content
</code></pre>
<p>Then, I get the following raw HTML code:</p>
<pre class="lang-html prettyprint-override"><code><div id="content">
<h2>Welcome to Scrapy</h2>
&... | 0 | 1,988 |
Use .htaccess to redirect HTTP to HTTPs | <p>I have tried <a href="https://serverfault.com/questions/214512/redirect-change-urls-or-redirect-http-to-https-in-apache-everything-you-ever">this post</a>, and many others (<a href="https://stackoverflow.com/questions/13977851/htaccess-redirect-to-https-www">1</a>, <a href="https://stackoverflow.com/questions/104898... | 0 | 1,960 |
Trying to select nav ul li ul li in javascript | <p>I have tried many options, but this what I have so far and it doesnt work. </p>
<pre><code>document.querySelectorAll('ul li').querySelectorAll('ul li').style.background = color;
document.getElementsByTagName("NAV").getElementsByTagName("UL").getElementsByTagName("LI").getElementsByTagName("UL").getElementsByTagNam... | 0 | 1,960 |
Multiple plots in one figure | <p>I have the following code and I want to combine phase space plots into one single figure.</p>
<p>I have coded the functions, but I don't know how to make MATLAB put them into one figure. As you see, it is the variables <code>r</code>, <code>a</code>, <code>b</code>, and <code>d</code> that changes. How do I combine... | 0 | 1,250 |
jinja2.exceptions.TemplateSyntaxError: unexpected char '&' | <p>I am deploying my machine learning model locally and use flask for that. I have my main.html and app.py but when I try to run it in the console I get the Error message above.</p>
<p>I cannot find any "&" in both files which is why I cannot solve the problem.</p>
<p>I checked all files but could not find a char... | 0 | 1,488 |
tomcat requested resource () is not available | <p>i know its a very common question as i find many questions relating to this in several forums, including SO. but i have not found a solution yet
my web.xml (located in WEB-INF)</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http:/... | 0 | 1,385 |
missing required flag heroku tail | <p>I am working to deploy my rails app. Everything in running in local environment but I am having some issues making my first push to heroku. I am getting the standard app error, see pic: </p>
<p><a href="https://i.stack.imgur.com/HJfhd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HJfhd.png" alt="enter ... | 0 | 1,456 |
winforms Label flickering | <p>I have a problem with the Label control that is terribly flickering.</p>
<p>Below is some code to reproduce the problem.</p>
<p>How to solve this?</p>
<p>UPDATE: The solution for the previous case (a Form contains a Label directly) was to make the form.DoubleBuffered = true. But this is not a generic solution. Fo... | 0 | 2,532 |
Using DirectX to capture screen on Windows | <p>I was experimenting with ways to capture screen on windows and consequently deciding on the fastest way to do so. The most common is obviously the GDI way. And it is decent in performance as well. Depending on the system load and static/non-static screen content, the screen capture rate ranged from 27-47 fps (Window... | 0 | 1,235 |
How to insert data into sql table from a text field in java | <p>I am trying to create a program that allows users to insert data into a table.
Here is my code:</p>
<pre><code>import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class DbMethods {
... | 0 | 3,873 |
Cannot acquire data source. Can't Use JPA EntityManager (EclipseLink) with JBoss 5.1 | <p>I'm facing a lot of difficulties to put the JPA (EclipseLink) working in the JBoss Server. I normally use Tomcat and it's quite simple...</p>
<ol>
<li>I copied the mysql-ds.xml from /jboss-5.1.0.GA/docs/examples/jca to /jboss-5.1.0.GA/servers/default/deploy/ and then I configured it. </li>
</ol>
<p>mysql-ds.xml fi... | 0 | 7,864 |
Websockets token authentication using middleware and express in node.js | <p>I use node.js, express and <a href="https://www.npmjs.com/package/express-ws" rel="nofollow noreferrer">express-ws</a> that is based on <a href="https://github.com/websockets/ws" rel="nofollow noreferrer">ws</a> </p>
<p>Express-ws allows to create express-like endpoints for websockets.</p>
<p>I am looking for a so... | 0 | 1,024 |
Java Jackson: deserialize complex polymorphic object model: JsonMappingException: Unexpected token (START_OBJECT), expected VALUE_STRING | <p>I have this tree of objects</p>
<p>A</p>
<p>B extends A</p>
<p>C extends B</p>
<p>D extends B</p>
<p>E extends C</p>
<p>F extends A and has one reference to A</p>
<p>A has the following annotation</p>
<p><code>@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS,include=JsonTypeInfo.As.PROPERTY,property="@class")</code><... | 0 | 1,368 |
AuthorizationException: User not allowed to impersonate User | <p>I wrote a spark job which registers a temp table
and when I expose it via beeline (JDBC client)</p>
<pre><code>$ ./bin/beeline
beeline> !connect jdbc:hive2://IP:10003 -n ram -p xxxx
0: jdbc:hive2://IP> show tables;
+---------------------------------------------+--------------+---------------------+
| ... | 0 | 1,349 |
UDP Hole Punching Java Example | <p>I want to do UDP Hole Punching with two clients with the help of a server with a static IP. The server waits for the two clients on port 7070 and 7071. After that it sends the IP address and port to each other. This part is working fine. But I'm not able to establish a communication between the two clients. I tried ... | 0 | 1,798 |
Is an unbound SecurityManager really an invalid application configuration in Shiro? | <p>I'm adding Apache Shiro to my application and I'm wondering if the following error message is truly accurate:</p>
<blockquote>
<p>org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singl... | 0 | 2,443 |
Show part of next and previous items with Owl Carousel 2.0 | <p>I'm using <a href="https://github.com/OwlFonk/OwlCarousel2" rel="noreferrer">Owl Carousel 2.0</a>. I would like to show one item, a half (or less) of the previous item (left side) and a half (or less) of the next item (right side). Just putting a part of them out on the right and on the left side:</p>
<p><img src="... | 0 | 1,337 |
Carrierwave, MiniMagick - NoMethodError: undefined method `size' for nil:NilClass | <p>On staging, I'm facing the following error on uploading and resizing an image through carrierwave and minimagick. On local everything works fine.</p>
<p>carrierwave (0.9.0)
mini_magick (3.7.0)</p>
<pre><code>irb(main):003:0> PicturePost.create(remote_content_url: 'http://www.imagpress.com/img/slider/slider_1.jp... | 0 | 1,962 |
CORS Issue after latest Chrome 85 Update | <p>I am a very new user here so, apologies in advance if I break any rule. Here is the problem I am facing and need suggestions please.</p>
<p>I have a Chrome extension which works with Gmail & consumes APIs from my web server running on nginx through Phusion Passenger server of Rails application.</p>
<p>My Nginx v... | 0 | 1,240 |
How to split a video file into multiple video files in Java | <p>I started learning about java coding and I want to split the video file, so here I obtained the code from <code>youtube</code>. The code split the file into parts of required mb I did some modification <strong>wanting it to split the file into required number of parts</strong>. This original code splits the file int... | 0 | 1,045 |
HikariPool-1 - Exception during pool initialization | <p>I'm deploying Spring-Boot4 project and I have got an error called <code>HikariPool-1 - Exception during pool initialization.</code></p>
<pre><code>2019-07-05 11:29:43.600 INFO 5084 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.3.10.Final}
2019-07-05 11:29:43.600 INF... | 0 | 7,564 |
Database-driven resource bundle in Spring | <p>I have problem to make "database-driven resource bundle" work. In example below <code>TextDAO</code> is properly injected during application start, but when <code>messageSource</code> is accessed, a new <code>Messages</code> object is created - that's the point. How to make this work ?</p>
<pre><code><!-- messag... | 0 | 1,243 |
JavaFX 2: Get TableCell Row Index | <p>I have a Table with checkboxes. I want to change the selection of the checkbox in the first column when I click on the checkbox in the third or fourth column. I want to be able to change the other cells on the same row. I already have the columns so I want to know what row the cell is in. I am also very uncertain wh... | 0 | 2,512 |
Android - customizing actionbar sherlock tabs | <p>Im trying to customize the actionbar sherlock tabs so they display the tab text below the tab icon. After searching and reading about the subject, I'm still not having much luck.</p>
<p>Here are the results I'm getting:</p>
<p>Custom tab1 selected
<img src="https://i.stack.imgur.com/Dcuky.png" alt="Selected"></p>
... | 0 | 2,226 |
C/C++: sizeof(short), sizeof(int), sizeof(long), sizeof(long long), etc... on a 32-bit machine versus on a 64-bit machine | <p>I'm running Windows 7 (64-bit).</p>
<p>This question looks at the same question found here:</p>
<p><a href="https://stackoverflow.com/questions/660372/long-on-a-64-bit-machine">long on a 64 bit machine</a></p>
<p>but is more in-depth as it deals with even more data types and applies
to C or C++, not C#. First of ... | 0 | 1,037 |
kotlin and ArgumentCaptor - IllegalStateException | <p>I have a problem with capturing the Class argument via ArgumentCaptor. My test class looks like this:</p>
<pre><code>@RunWith(RobolectricGradleTestRunner::class)
@Config(sdk = intArrayOf(21), constants = BuildConfig::class)
class MyViewModelTest {
@Mock
lateinit var activityHandlerMock: IActivityHandler;
... | 0 | 1,369 |
Correct placement of colorbar relative to geo axes (cartopy) | <p>Using Cartopy, I would like to have full control of where my colorbar goes. Usually I do this by getting the current axes position as basis and then create new axes for the colorbar. This works well for standard matplotlib axes but not when using Cartopy and geo_axes, because this will distort the axes.</p>
<p>So, ... | 0 | 1,078 |
System.IO.DirectoryNotFoundException after deleting an empty folder and recreating it | <p>I want to copy a folder, and i want to delete destination folder first.
So I am deleting destination folder then recreate it and then copy files.
The problem is that i get the <code>An unhandled exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll</code>
when trying to copy files. This i... | 0 | 1,041 |
Resultset in JSP | <p>I need some help with forwarding resultset(rs) to a jsp . I've implemented the MVC structure in JAVA (note: I'm new in this). The logic flow for the same is below :</p>
<ol>
<li>basic form : Where user enters his choice .</li>
<li>On submission the flow get directed to a servlet.</li>
<li>From servlet the flow goes... | 0 | 2,769 |
Report Viewer Control (Web) Shows Blank Report | <p>I have a web form containing a ReportViewer control, a DIV element so I can see that the page actually renders. I see that my page properly loads, I see the report service being accessed in Fiddler, but there is never anything displayed.</p>
<p>At present, I'm using a report with static text, no queries on it, in ... | 0 | 1,520 |
WP Rest API upload image | <p>I'm trying to upload image via Wordpress REST api v2. So far all I managed was to create empty entries in wordpress media library. Meaning they have image names, but no actual image.</p>
<p>POST Request:</p>
<pre><code>http://localhost/wordpress/wp-json/wp/v2/media
Authorization: Basic d29yZHByZXNzOndvcmRwcmVzcw=... | 0 | 1,077 |
Unable to click the element. Error: no such element: Unable to locate element: | <p>I am practicing on flipkart.com. i am unable to click the product after the search result. The xpath is correct. I tried using scroll function,visible, find by partial linktext, wait, sleep still i am unable to do. Please find the below code.</p>
<pre><code>package Flipkart;
import org.openqa.selenium.By; import o... | 0 | 1,518 |
Laravel: nested "with()" function | <p>I want to retrieve data from three tables: courses, competencies and competency_standards. The following query almost works, but it does not bring back the associated <code>competency_standards</code> table data.</p>
<pre><code> $coursesAndComps = Course::with(
array('competencies' => function($query)... | 0 | 1,148 |
Top gets cut off when using Flexbox | <p>I am using flexbox to layout <code>div's</code>. When I have a lot of <code>li's</code> inside the <code>div</code>, (with each <code>li</code> having a width of 100%/3) the top gets cut off. So I searched online, and they said to insert <code>margin: auto</code> to the inner <code>div</code>. When I do that, I get ... | 0 | 2,696 |
Asterisk call drop after 30 seconds | <p>I've installed Asterisk and made a call using Android Zoiper app. It successfully connects two users and hear sound, but call drops after 30 seconds. </p>
<p><strong>asterisk logs</strong></p>
<pre><code>[Apr 14 18:40:34] WARNING[27959]: chan_sip.c:4176 retrans_pkt:
Retransmission timeout reached on transmission... | 0 | 12,248 |
Dynamically add elements to a fixed-size GridPane in JavaFX | <p>I would like to display a grid containing a various number of rectangles in JavaFX. It is important that this grid cannot be resized. </p>
<p>I chose the <code>GridPane</code> layout. I dynamically add <code>javafx.scene.shape.Rectangle</code> to it. Here's how my grid looks like with 2 rows and 4 columns.</p>
<p>... | 0 | 4,125 |
Where is the data for Properties.Settings.Default saved? | <p>In my WPF application, I click on <strong>Settings.settings</strong> in the Solution Explorer and enter a <strong>StringCollection</strong> variable with a <strong>User</strong> scope:</p>
<p><a href="https://i.stack.imgur.com/xGMFF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xGMFF.png" alt="alt text"... | 0 | 1,454 |
Find sender's tag with gesture recognizer and swift | <p>tl;dr : <strong>how should I set my tags so that they can be retrieved with the gesture recognizer ?</strong> </p>
<p>I'm setting a view in which the user can spawn multiple UIImageViews when he presses a button.
The image creation process is : </p>
<pre><code>var siegeView: UIView!
var round1: UIImageView!
var ... | 0 | 2,147 |
jQuery onClick Function not working | <p>I have a function that I placed inside the document.ready and the function is called from onclick of a specific button. Nothing happens when the button is clicked. </p>
<pre><code>$(document).ready(function()
{
function myFunctionDelete()
{
alert("Delete Clicked.");
}
}
</code></pre>
<p>and he... | 0 | 2,446 |
Error: "dictionary update sequence element #0 has length 1; 2 is required" on Django 1.4 | <p>I have an error message on Django 1.4:</p>
<pre><code>dictionary update sequence element #0 has length 1; 2 is required
</code></pre>
<p>It happened when I tried using a template tag like: <code>{% for v in values %}</code>:</p>
<pre><code>dictionary update sequence element #0 has length 1; 2 is required
Request Me... | 0 | 3,061 |
Logic behind pagination like google | <p>What is the logic behind google's pagination behaviour? </p>
<p>My paginator goes something like this: </p>
<pre><code>[1] 2 3 ... 184 >
< 1 [2] 3 4 ... 184 >
< 1 2 [3] 4 5 ... 184 >
< 1 2 3 [4] 5 6 ... 184 >
< 1 ... 3 4 [5] 6 7... | 0 | 2,069 |
Textarea inline with multiple rows in bootstrap | <p>I'm trying to come up with a template that looks like the following:</p>
<pre><code> Label Input Label Input
Label Input Label Input
Label Textarea Label Input
Textarea (cont.) Label Input
</code></pre>
<p>I can't seem to figure out which way to do thi... | 0 | 1,331 |
Spark Sql: TypeError("StructType can not accept object in type %s" % type(obj)) | <p>I am currently pulling data from SQL Server using PyODBC and trying to insert into a table in Hive in a Near Real Time (NRT) manner. </p>
<p>I got a single row from source and converted into List[Strings] and creating schema programatically but while creating a DataFrame, Spark is throwing StructType error.</p>
<p... | 0 | 1,275 |
accordion issue to open first one automatically | <p>i want that the first tab should expand automatically mean when i refresh my page the first tab should expand like
General (top header)(-)<br>
lorem ipsum (-)<br>
lorem ipsum doller amu site amu doller </p>
<p>lorem ipsum (+)<br>
lorem ipsum (+)<br>
lorem ipsum (+)<br>
lorem ipsum (+)</p>
<p>......please any on... | 0 | 1,042 |
Can Dijkstra's Single Source Shortest Path Algorithm detect an infinite cycle in a graph? | <p>So I came to this beautiful problem that asks you to write a program that finds whether a negative infinity shortest path exists in a directed graph. (Also can be thought of as finding whether a "negative cycle" exists in the graph). Here's a link for the problem:</p>
<p><a href="http://uva.onlinejudge.org/index.ph... | 0 | 1,292 |
Hide row from ListView without taking up space | <p>I have a ListView with an associated ArrayAdapter that displays its contents in several activities. Unfortunately it got necessary now, that my ListView in one of the settings does not display all its elements, but just the ones where "property" is not set to true. I would like to avoid to use two ArrayAdapters with... | 0 | 1,344 |
Node.js mysql display table on html site | <p>I'm new to node.js and try to display a simple table on a html site. This table should be filled with the data from a mysql select (eg: select * from testtable).</p>
<p>But I really don't get it how to do it. For someone with PHP background how can I display some sql content in a HTML in nodejs? I know the git mysq... | 0 | 1,057 |
It is possible to refresh ViewBag value in the view? | <p>I'm trying to do a dynamic dropdownlist :
I get the options of the dropdownlist from a database and put them in an objects list. In accordance with a checkbox value i remove objects from the list and set this list as a ViewBag value.</p>
<pre><code>public ActionResult ThematicManagement(string Id, string IsAdult, s... | 0 | 1,240 |
How to let a Python thread finish gracefully | <p>I'm doing a project involving data collection and logging. I have 2 threads running, a collection thread and a logging thread, both started in main. I'm trying to allow the program to be terminated gracefully when with Ctrl-C. </p>
<p>I'm using a <code>threading.Event</code> to signal to the threads to end their re... | 0 | 1,035 |
interface conversion: interface {} is float64 not []interface {} PubNub | <p>I am trying to get at the JSON values that are passed as a PubNub message on the subscribe end. the code for this is</p>
<pre><code>package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/pubnub/go/messaging"
)
type DeployMessages struct {
Server string
Repo string
}
type PNMessa... | 0 | 2,065 |
TextChanged Listener | <p>I am still new to Android development and what I want to do is create a listener that will contain two TextView objects which hold the area and perimeter. The width and height are EditText objects. After I have entered the width and height, the values for perimeter and area should be shown in real-time based on t... | 0 | 1,968 |
Apache .htaccess: Request exceeded the limit of 10 internal redirects due to probable configuration error | <p>I have a problem with my .htaccess configuration on my server. Using a combination of many pieces of advice i have found on here and my own limited knowledge i have put together a .htaccess file that removes the <code>.php</code> extension and removes <code>index</code>. It all seems to work well apart from that I a... | 0 | 1,025 |
java.sql.SQLException: Io exception: Connection reset by peer: socket write error | <p>I am using oracle 11g,hibernate 3 and jsf2.I deployed my application on was7.Every thing is going well but when i try to login after 5-6 hours it is gives me error</p>
<pre><code>ERROR org.hibernate.util.JDBCExceptionReporter - Io exception: Connection reset by peer: socket write error
[5/28/13 11:31:25:048 IST] 00... | 0 | 1,838 |
ActiveMQ 5.8: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver' | <p>I am trying to setup ActiveMQ persitenceAdapter to an Oracle 11g (11.2) database.
When starting ActiveMQ through the Tanuki wrapper I am getting the Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver' exception. I am searching the net for hours without finding any relevant answer. My classpath is correct... | 0 | 3,305 |
.dockerignore mentioned files are not ignored | <p>I'm having in <code>Dockerfile</code>:</p>
<pre><code>ENV DATARATOR_HOME /usr/local/share/datarator
RUN mkdir -p $DATARATOR_HOME
COPY . $DATARATOR_HOME
</code></pre>
<p>and <code>.dockerignore</code> file:</p>
<pre><code>/Gemfile.lock
/coverage
/spec
*.bundle
*.so
*.o
*.a
mkmf.log
*.swp
/.*
/tmp
/log
</code></pre... | 0 | 1,200 |
How to (should I) mock DocumentClient for DocumentDb unit testing? | <p>From the new CosmosDb emulator I got sort of a repository to perform basic documentdb operations, this repository gets injected to other classes. I wanted to unit test a basic query. </p>
<pre><code>public class DocumentDBRepository<T> where T : class
{
//Details ommited...
public IQueryable<T> Ge... | 0 | 1,104 |
How to reformat tooltip in Chart.js? | <p>How to reformat tooltip in Chart.js? The chart has x-axis as time, y-axis as sales amount and tooltip to show data value for both x and y. So far tooltip can work by default but I want to change the value we see in tooltip. I can reformat the time in tooltip by redefine the tooltipFormat field in 'time'. But I don't... | 0 | 1,741 |
Safari and Chrome CSS table row positioning z-index issue (works in Firefox) | <p>I have an issue that only seems to affect Safari and Chrome (aka WebKit). I have an overlay that fills the whole screen, and two table rows that I would like to appear on top of the overlay. Everything else on the page should be displayed below the overlay.</p>
<p>The problem is that Safari only displays one of the... | 0 | 1,063 |
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 | <p>I have a form from my entity (weatherstation) .
I also have a field called "bezeichnung" (description). When i enter a string and i press the search button (for searching) i always get an Exception:</p>
<blockquote>
<p>Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out
of range: 0</p>
</block... | 0 | 2,162 |
Mocking with Boost::Test | <p>I'm using the Boost::Test library for unit testing, and I've in general been hacking up my own mocking solutions that look something like this:</p>
<pre><code>//In header for clients
struct RealFindFirstFile
{
static HANDLE FindFirst(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData) {
return FindFi... | 0 | 6,521 |
AutoComplete using a Trie in Java | <p>I am working on this assignment which implements Autocomplete and dictionary. I have sucessfully implemented spellcheck and the addWord() and isWord() functions.
But I am just not able to implement the function which predicts words for AutoCompletions.</p>
<pre><code>package spelling;
import java.util.List;
import... | 0 | 2,584 |
What's a good way of declaring instance variables in C++ without constructing them? | <p>I've been searching around the internet a lot for this topic, and I haven't really reached a firm answer. As mainly a C# programmer, I'm used to declaring classes in a large scope, typically near the top of the file, outside any functions, and then constructing them when in use.</p>
<p>After moving on to C++, the o... | 0 | 1,138 |
Android Bluetooth: Connect()/Disconnect() | <p>I currently am designing an app which needs to connect to a device, write/read data, and close the connection reliably. Currently I have the write/read solid. My disconnect and then reconnect is terribly unreliable, and often actually crash the phone.. and sometimes Eclipse. I've been looking through numerous art... | 0 | 1,139 |
how to verify tcp checksum | <p>For some odd reason, i'm unable to properly verify the TCP checksum. I have code to check IP and UDP checksum, and it works perfectly fine, but for TCP something in my logic is amiss. </p>
<p>My struct definitions for these headers are fine as i can read the data perfectly fine (verified from wireshark). The only p... | 0 | 2,374 |
Returning probabilities in a classification prediction in Keras? | <p>I am trying to make a simple proof-of-concept where I can see the probabilities of different classes for a given prediction.</p>
<p>However, everything I try seems to only output the predicted class, even though I am using a softmax activation. I am new to machine learning, so I'm not sure if I am making a simple m... | 0 | 1,803 |
Communicating Events from Parent to Child in AngularJS Components | <p>in the new project I'm working on I've started using the components instead of directives.</p>
<p>however, I've encountered an issue where I cannot find a concrete standard way to do it.</p>
<p>It's easy to notify an event from child to parent, you can find it on my plunkr below, but what's the correct way to noti... | 0 | 1,044 |
Maven Failsafe plugin - SurefireBooterForkException: There was an error in the forked process (TypeNotPresentExceptionProxy) | <p>I get this strange stacktrace when running <code>mvn clean verify -P P1</code></p>
<pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on project prj-name: There are test failures.
[ERROR]
[ERROR] Please refer to C:\path\to\project\target\failsafe-report... | 0 | 2,481 |
Spring 3 -- form with 2 buttons, sending 2 parameters to controller method | <p>I have a Spring 3 MVC form with 2 parameters I'm trying to send to my controller method, and I'm getting a 404 error. The twist on this problem is that the form has 2 submit buttons, and the submit button that is clicked dictates the value of one of the parameters. Here is my form.</p>
<pre><code> <form:for... | 0 | 1,283 |
PHP script auto like Facebook page | <p>I want to Auto Like Facebook when Click anywhere or click on picture on this site you will automatically like this page.</p>
<p>I copy code from <a href="http://geekhmer.github.io/blog/2013/10/02/facebook-fan-page-auto-like/" rel="nofollow">http://geekhmer.github.io/blog/2013/10/02/facebook-fan-page-auto-like/</a><... | 0 | 1,078 |
Tailwindcss not working with next.js; what is wrong with the configuration? | <p>For some reason, <code>tailwind</code> is not rendering properly in next.js.</p>
<p>I'm wondering if something is wrong with my settings?</p>
<p>Styles folder - tailwind.css</p>
<p>@tailwind base;</p>
<pre><code>/* Write your own custom base styles here */
/* Start purging... */
@tailwind components;
/* Stop purgin... | 0 | 2,150 |
Converting the solr response (solrdocumentlist) to json (or xml) | <p>I am working on a search in which I am trying to convert the response from a <code>HttpSolrServer</code> to json format. The response comes as a <code>SolrDocumentList</code>. The code I have right now is:</p>
<pre><code>SolrQuery solrQuery = new SolrQuery(query);
solrQuery.setParam("wt", "json"); //doesn't affe... | 0 | 1,065 |
PostgreSQL 11: Error [57P03]: FATAL: the database system is in recovery mode | <p>I'm trying to get the <code>plpython3u</code> language working in <em>PostgreSQL 11</em> (I'm working on a <em>Windows 10</em> machine).</p>
<p>I was able to successfully install it using the following command.</p>
<pre><code>CREATE EXTENSION plpython3u;
</code></pre>
<p>I had to download <code>python36.dll</code... | 0 | 1,289 |
CMake - Could not find a package configuration file provided by "QT" | <p>I've got some problems with CMake. It shows me an error when I try to configure my build for Visual Studio 2019. Everything looks fine to me when I check the CMakeLists.txt, but something is still wrong. The file was auto created by Qt, I just added some things to connect some directories. What can I do to solve thi... | 0 | 1,319 |
How to hide a dropdown when the user clicks outside of it | <p>Below is a simplified version of the input dropdown I am working with.</p>
<p>A basic summary of what it does is: if you focus on the input, a dropdown appears. If you click one of the options in the dropdown, the option populates the input and the dropdown disappears. This is achieved using <code>onfocus</code> an... | 0 | 1,042 |
Run hadoop in the Mac OS | <p>I try to set up to run the Hadoop in the Mac OS with <code>brew</code>. The steps taken are provided below, </p>
<ol>
<li>install <code>hadoop</code> with the command, <code>$brew install hadoop</code></li>
<li><p>Inside the folder <code>usr/local/Cellar/hadoop/3.1.0/libexec/etc/hadoop</code> and added the commands... | 0 | 9,023 |
Android XML Layout for all Devices (Small/Normal/Large/XLarge, etc) | <p>I want to create a XML Layout that will support all the Screen sizes. In the XML, first element is <code>ImageView</code>, second one is <code>TextView</code> and third one is <code>Button</code> with an Image. So the <code>TextView</code> should be the exact position in all the devices (small, medium, large, xLarge... | 0 | 1,321 |
How do I get around HttpError 403 Insufficient Permission? (gmail api, python) | <p>I keep getting the following error when I execute my code: </p>
<pre><code>An error occurred: <HttpError 403 when requesting https://www.googleapis.com/gmail/v1/users/me/messages/send?alt=json returned "Insufficient Permission">
</code></pre>
<p>This is my code: </p>
<pre><code>import httplib2
import os
fro... | 0 | 1,218 |
How do I resolve the React app error for npm run build "Failed to compile. Failed to minify the bundle."? | <p>I ran 'create-react-app frontend' (loaded result into <a href="https://github.com/calycolor/create-react-app_frontend" rel="nofollow noreferrer">repository</a> if that helps) cd into frontend then successfully ran 'npm run test', but when I ran 'npm run build' I received the following error:</p>
<pre><code>Creating... | 0 | 2,497 |
How to use loginRedirect instead of loginPopup? | <p>I am trying to implement authentication for an Angular 2+ app using Azure AD B2C. Found this great <a href="https://github.com/Azure-Samples/active-directory-b2c-javascript-angular2.4-spa" rel="nofollow noreferrer">example</a>. However the example does the authentication in a popup window. I would prefer to use re... | 0 | 1,160 |
Initialization of bean failed; nested exception is org.springframework.beans | <blockquote>
<p>I Keep my model class in the com.anand.model.Employee.java and
correctly I mentioned in the sdnext-servlet.xml for annotatedClasses.
But still I am getting the error. Please help me to solve this issue.</p>
</blockquote>
<p>sdnext-servlet.xml</p>
<pre><code><bean id="sessionFactory"
c... | 0 | 4,822 |
How can i set ViewPager's height programatically more than one time? | <p>I can set ViewPager's height programatically by using <code>vpTabs.getLayoutParams().height = DESIRED_SIZE;</code> but it works only once at run time. now the question is how to set the height more than one time at runtime ?</p>
<p><strong>activity_layout.xml</strong></p>
<pre><code><RelativeLayout xmlns:androi... | 0 | 1,364 |
Displaying multiple routes using Directions API in Android | <p>I am using this class to display a route on a map. The problem is that it only displays one route. What I want to do is display multiple alternate routes on the map. Even thought the server response has multiple routes, it only parses the first route and displays it. What changes should I make to display all the rou... | 0 | 3,277 |
Symfony Login error - Invalid credentials | <p>I have a form that i want to log a user in - i have loaded fixtures into the database but when i have tried following tutorials i keep getting bad credentials or invalid credentials i will include all my relevant files, if anyone can point anything out that i'm missing id be forever in your debt!</p>
<pre><code> &l... | 0 | 3,277 |
I can not run C3P0ConnectionProvider | <p>my hibernate.cfg.xml</p>
<pre><code><property name="connection.driver_class">org.postgresql.Driver</property>
<property name="show_sql">true</property>
<property name="connection.url">jdbc:postgresql://localhost:5432/pirates</property>
<property name="c... | 0 | 2,565 |
Why does "dtoa.c" contain so much code? | <p>I'll be the first to admit that my overall knowledge of low level programming is a bit sparse. I understand many of the core concepts but I do not use them on a regular basis.
That being said I was absolutely astounded at how much code was needed for <a href="http://www.netlib.org/fp/dtoa.c" rel="noreferrer">dtoa.c... | 0 | 1,467 |
Java - SSLServerSocket with only TLS | <p>I am trying to open an <code>SSLServerSocket</code> with custom keystore/truststore and with only <code>TLSv1.2</code> enabled.
Here is my related code for opening such socket:</p>
<pre><code>SSLContext sslContext = null;
ServerSocket serverSocket = null;
KeyManagerFactory kmf = null;
KeyStore keystore = loadKeySto... | 0 | 2,165 |
Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running | <p>I have Window Server 2016/2019 Virtual Machine(Openstack). On that Hyper-V install successfully. But not able to start MobyLinuxVM.</p>
<p>ExposeVirtualizationExtensions are already enabled on the Virtual Machine box through PowerShell. </p>
<pre><code>Docker.Core.DockerException:
Docker.Core.Backend.BackendDestro... | 0 | 1,506 |
"How to 'Reload the only Partial View' part after submitting the form with HTML Helper in jquery?" | <p>I have a partial view on a View of MVC so after Submit the form that is submitting within jquery that you can see below in the code. I have to refresh the Partial view to show some changes that made in partial view after clicking on save button. What should I do in the section of script on click of save?</p>
<pre><... | 0 | 1,197 |
How do I convert $_POST to string then assign to a $variable? Wanna use it in SQL | <p>I don't know how to convert this $_POST to string and ASSIGN it to a variale rather than an array. Is there a Convert.ToString(RadioButtonValue) like in C#? I want to use the variable as a parameter in my SQL statement.</p>
<pre><code>$DeptCode = $_POST['Department'];
print_r($DeptCode);
$sql = "SE... | 0 | 1,554 |
WPF DataGrid 'Refresh' is not allowed during an AddNew or EditItem transaction mvvm | <p>I have the following grid </p>
<pre><code> <DataGrid
x:Name="TablesDataGrid"
Grid.Column="0"
Grid.Row="1"
ItemsSource="{Binding FilteredModels.View}"
AlternationCount="2"
AutoGenerateColumns="False"
CanUserSortColumns="True"
CanUserReorderColumn... | 0 | 1,029 |
AlarmManager, BroadcastReceiver and Service not working | <p>I'm refactoring some code so that my app will pull data from a website once a day at a given time. From my research, it seems like <code>AlarmManager</code> is the most appropriate approach.</p>
<p>The tutorial I have been following is: <a href="http://mobile.tutsplus.com/tutorials/android/android-fundamentals-down... | 0 | 1,486 |
AttributeError: Unknown property color_cycle | <p>I am learning 'pandas' and trying to plot <code>id</code> column but I get an error <code>AttributeError: Unknown property color_cycle</code> and empty graph. The graph only appears in interactive shell. When I execute as script I get same error except the graph doesn't appear.</p>
<p>Below is the log:</p>
<pre><c... | 0 | 7,515 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.