title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
aligning div at center text-align not working | <p>I want the circle to be aligned in center in 768 grid </p>
<p><a href="http://jsfiddle.net/8dEN3/1/" rel="nofollow"><strong>Demo</strong></a></p>
<h2>HTML</h2>
<pre><code><div class="About_Container">
<div class="Icon_Wrapper">
<div class="Circle">
<div class="CircleWrapper"> &... | 3 | 1,238 |
Matplotlib hangs when plotting | <p>I am trying to plot some datetime objects in Python with Matplotlib, <a href="https://stackoverflow.com/questions/7684475/plotting-labeled-intervals-in-matplotlib-gnuplot">just as I have seen at this question</a>.</p>
<p>But when it gets to the savefig call, it gets stuck. This is my code:</p>
<pre><code>import ma... | 3 | 1,024 |
How to combine multiple object in Laravel | <p>I want to combine my ordered products and display the order list.</p>
<p>Controller :</p>
<pre><code>$orders = Order::where('customer_id', 1)->pluck('products');
print_r($orders);
</code></pre>
<p>This is what I receive:</p>
<pre><code>Array (
[0] =>
[
{"id":3,"product_id":3,&q... | 3 | 1,070 |
Why data is not being added to database? Entity Framework, Blazor wasm | <p>I have 3 tables in my database: <code>Ingredient</code>, <code>IngredientRecipe</code> and <code>Recipe</code>. Adding data to <code>Ingredient</code> works correctly. <code>IngredientRecipe</code> is for making relation between <code>Ingredient</code> and <code>Recipe</code>. When I want to add a <code>Recipe</code... | 3 | 3,099 |
AWS CloudFormation Create-Stack Service Resource Hanging at 'CREATE_IN_PROGRESS' | <p>I have the below cloudformation script that is running fine with my create-stack command other than the service resource hanging at 'CREATE_IN_PROGRESS.' Hoping you all can see some kind of glaring issue that I'm missing. </p>
<p>I'm not seeing any way to dig deeper into details on where it's at in the process othe... | 3 | 1,391 |
SQLite query failing but only when offline | <p>I have a simple SQLite method which returns a class given two parameters - the type T and the parameter value to be searched</p>
<pre><code>public T GetSingleObject<T>(string id) where T:IIdentity, new()
{
lock (dbLock)
{
using (var sqlCon = new SQLiteConnection(DBPath))
... | 3 | 1,781 |
$resource on DELETE does not serialize data in json | <p>When using $resource with POST method (the item i want to delete on the server is of type "Todo")
My java SpringREST back controller looks like :</p>
<pre><code>/**
* POST : delete an todo : /todos/DEL
*/
@RequestMapping(value = "/DEL", method = RequestMethod.POST)
public void deletePOST(@RequestBody Todo todo) {... | 3 | 1,167 |
Disabled button not being styled correctly | <p>I am trying to style a button that is disabled, but the styling doesn't take effect, and go back to the old styling. I have cleared my cache, to no avail. I have a button that gets disabled using JavaScript with <code>document.getElementById("updateAccountButton").disabled = true;</code>. This aforemention... | 3 | 1,279 |
How can a attempt a call to rename and return the results even if there is an error? | <p>I would like to iterate over a list of data frames a rename function. Sometimes the DFs will be NULL.</p>
<pre><code>lookup <- list(
'miles_per_gallon' = 'mpg',
'cylinder' = 'cyl'
)
df1 <- mtcars
df2 <- NULL
index_name <- function(df, lookup) {
i1 <- unlist(lookup) %in% names(df)
names_look... | 3 | 1,304 |
Resolving A Django Error on Form: Object has no attribute | <p>Hi I'm trying to create a form that will when used update one model (Command_Node), and at the same time create an instance of another model (EC_NODE) that has a many to one relationship with the Command_Nodes.</p>
<p>However when I go onto the update view and submit the form I'm getting the following error any idea... | 3 | 1,219 |
Keep scroll visible but disable when nav menu open | <p>I have a nav menu working but the page is still scrollable when that becomes visible over the top of the rest of the content. Because the button is positioned so it's in the same place the page would jump about too much if the scroll bar was hidden. I want to disable the scrollbar on the body when the active class i... | 3 | 1,716 |
Unable to use a `Symbol` for a `Group` with paper.js | <p>I want to do an animation of a reaction-diffusion system with <code>paper.js</code>. </p>
<p>Here is a code which generates just one image:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyp... | 3 | 6,864 |
Insert Month into data | <p>I have a large section of code that I declare an insert date of at the beginning:</p>
<pre><code>DECLARE @lcid INT
DECLARE @startdate DATETIME=@10
DECLARE @enddate DATETIME=@11
DECLARE @PitchJobTypeId INT
DECLARE @ClientInvestmentJobTypeId INT
DECLARE @AdministrationJobTypeId INT
IF OBJECT_ID('tempdb..#data') IS ... | 3 | 4,986 |
Create Query for getting value equals to Current User id | <p>I want to get all matching values with current user id from key "group_member". The key "group_member" consist of users id. Database screenshot:</p>
<p><a href="https://i.stack.imgur.com/pNqyx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pNqyx.png" alt="enter image description here"></a></p>
... | 3 | 1,337 |
Ajax And Spring MVC | <p>Hey Guys Am trying to update the jsp page by using ajax response here my issue is </p>
<p>i have one dropdown ,It contains some values ,each value is associated with the some certain data,if i select one value from dropdown then i'll get the corresponding data on the jsp page ,If i try to select Another value from ... | 3 | 1,611 |
ViewPager Issue while Scrolling | <p>When I am scrolling the viewpager from tab0 to tab1 then tab1 is shown correctly but it hitting the tab2 webservice. similiary when tab2 is shown then it's hitting tab3 webservice.</p>
<pre><code>public class OrderDetailsTab extends Fragment {
View view;
ViewPager viewPager;
TabLayout tabLayout;
pu... | 3 | 1,677 |
missing JSON array SWIFT | <p>There is a code generated by Insomnia and it works: </p>
<pre><code>import Foundation
let headers = [
"x-auth-header": "fb2f56fde81f21926fc0b5b74702f71da9f152efa7b5587a308984b71c9acac7fd44da05583ab06d57d29794f59fc475d9f2d132cbc6e29c421f11330a30a613",
"content-type": "application/x-www-form-urlencoded"
]
let p... | 3 | 1,851 |
using animation_enabled boolean to prevent multiple jquery animations at once will break after being spammed | <p>I have 4 links on my page which fade their respective divs in and out as well as adjusting the containing div's height where necessary. I only want one div on a page at a time and the onload visible div is labels_div.</p>
<p>When the user spams these links the divs get out of sync or overlap each other. I have rese... | 3 | 3,313 |
Kafka Connect in Docker container: Connector not added | <p>I'm trying to get a simple Kafka Connect container running. I did try the <a href="https://docs.confluent.io/5.0.0/installation/docker/docs/installation/connect-avro-jdbc.html" rel="nofollow noreferrer">Confluent Connect Tutorial</a>, but have a slightly different setup (no docker machine, no schema registry).</p>
... | 3 | 1,865 |
Nodemon crashes in the middle of the process without showing any error message, how do i resolve it? | <p>I am running a script that is getting the files from Google drive and putting it in the s3.
Now when i run the script, the process goes smoothly for sometime then app suddenly crashes without any error message, the script takes input also so couldn't find a way to use <code>nohup</code></p>
<p>The code is like this... | 3 | 3,856 |
Why html player doesnt play audio blob on IOS safari? | <p>So I have two buttons(start/stop), canvas with sound visualizer and html5 audio player.
Everything works cool, but not on IOS Safari (tested on 15.3).
On IOS it shows that recording was started, that everything is going ok, but when the recording has stopped and blob inserted into audio tag, it shows "error&quo... | 3 | 1,379 |
Liferay 7.1 custom portlet using CXF JAX-RS | <p>I'm getting the following error when my bundle is trying to start:</p>
<pre><code>The activate method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class javax.ws.rs.core.EntityTag
</code></pre>
<p>That happens when I tried to deploy an OSGi module.</p>
<p>I'm using:</p>
<ul>
<li>L... | 3 | 6,459 |
Unity game crash on some Android 6 (API 23) | <p>We have recently launched our android game ^_^ It it working fine for all users <strong>except for a few</strong>.</p>
<p>The has complained that it <strong>suddenly crashes in-game</strong>. We couldn't track or reproduce the issue but we know that they all have the same android version which is <strong>Android 6, ... | 3 | 1,666 |
Upload a photo to a DB using servlets | <p>I am trying to make a Servlet that upload and insert an image to the Data base .
this image is of blob type in the database .
The code gives me this error :
org.netbeans.modules.web.monitor.server.MonitorRequestWrapper cannot be cast to org.apache.tomcat.util.http.fileupload.RequestContext [Ljava.lang.StackTraceElem... | 3 | 3,151 |
How to save a nested many-to-many relationship in API-only Rails? | <p>In my Rails (api only) learning project, I have 2 models, Group and Artist, that have a many-to-many relationship with a joining model, Role, that has additional information about the relationship. I have been able to save m2m relationships before by saving the joining model by itself, but here I am trying to save t... | 3 | 1,161 |
How to create JS Canvas Top Down Rain Effect or Reverse Warp Speed | <p>I am trying to figure out how to create a canvas rain effect, but from the top down perspective. Basically it's like you are looking down at the ground and you are watching the rain fall around you and fall slightly to the center at an angle, but it falls a short distance before ending. I am not seeing anything in s... | 3 | 1,444 |
different way to write a method | <p>I have a class to define a right hand side terms of differential equation:
this class provide the method to compute the rhs function and its derivate
the function is store in a vector container in this way the class is suitable for the system of Differential Equation as well.</p>
<p>here the interface in which th... | 3 | 1,956 |
C# global clipboard contents | <p>I am not sure if I am going about this c# form the right way. I want to get the clipboard contents of any ctrl + C events that happen on any window. What is the right way to capture global clipboard information?</p>
<pre><code> namespace WindowsFormsApplication1
{
public class copydata
{
public i... | 3 | 1,223 |
How to judge bmp pictures from clipboard whether they are same using wxpython? | <p>Function that I want to realize:
when the bmp picture get from clipboard is changed, refresh window. If not, nothing will be done.</p>
<p>Question that I meet:
every time my program goes into function UpdateMsgShownArea(), self.oldBmp will be diff with self.bmp, but I have already let self.oldBmp = self.bmp if th... | 3 | 2,996 |
dynamic form funky behavior in vuejs | <p>I am using VueJS 2.6.11 and bootstrap 4 to create two dynamic sections(Category and Product) that contain divs and input fields. The product section is nested within the category section. When someone clicks the New Category button another category should get generated. The same behavior should also happen when some... | 3 | 2,087 |
React Native Component Renders under other components inside a modal | <p>I have a modal that contains various children components. One of them being a calendar component that is opened after pressing the text "Select Date"</p>
<p>Upon opening the Calendar component renders underneath the other components on the page.</p>
<p>I have tried using position: 'absolute' with a higher... | 3 | 1,360 |
OpenCV corrupting HQ Rapsicam data above 4000x3040 resoution? | <h1>The Problem</h1>
<p>When I take an image using OpenCV that is larger than 4000 pixels wide, using a high quality picam, the image data appears corrupted (it's offset).</p>
<h2>More Detail</h2>
<p>As stated, I cannot get a good image when using OpenCV at over 4000 pixels wide of resolution. I know that the hardware ... | 3 | 1,335 |
How do I use SELECT LAST_INSERT_ID() without closing the connection | <p>I have table whose only column is an auto-incrementing primary key. I want to insert a new row into this table, and then get the ID generated by this insert. </p>
<p>Reading through StackOverflow, LAST_INSERT_ID() appears to be the standard solution. The caveat given is that it will return the last generated ID ... | 3 | 1,317 |
ResourceNotFoundException ListViewAdapter | <p>I made a constructor <code>DataPembeli</code>for list view item then make the custom List View Adapter <code>DataPembeliListAdapter</code>
and used the constructor like this:</p>
<pre><code>txtid.setText(dataPembeliItems.get(position).getId()); // THIS IS THE ERROR LINE
txtket1.setText(dataPembeliItems.get(positi... | 3 | 1,219 |
Adding a Trailing Twelve Months array feature to VBA code | <p>I have an existing code which is a function that yields an array:
Example input: <code>=cellrange(B5,"ytd")</code> [where from <code>B5</code> and below (or above) there are dates]
Example output: <code>$B$129:$B$280</code> which is the full date range for this year in column <code>B</code></p>
<p>I am trying to ad... | 3 | 1,233 |
In CSS Grid how to remove column 1's matching height of column 2? | <p>Not familiar with CSS Grid I'm trying to create a two column layout. Per reading tutorials it was suggested to use <code>minmax()</code> but for some reason I cannot figure out how to break column 1's full height that matches column 2, example:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-consol... | 3 | 2,229 |
Fail to load ApplicationContext SpringBoot with SpringSecurity and JUnit Jupiter | <p>I'm working on a REST API using Spring Boot. Currently, the V1 of the API is complete. So, I'm implementing Spring Security to manage authentication and authorization.<br />
Since I've implemented Spring Security, my JUnit Jupiter tests does not work (no one works).</p>
<p>I searched a lot a solution on internet, bu... | 3 | 1,418 |
Add a second field category Prestashop 1.7 | <p>I am trying to add a editable field for Category in Prestashop 1.7</p>
<p>I'm already do this :</p>
<p>Insert text_SEO in Database</p>
<p><strong>override/classes/Category.php</strong></p>
<pre><code><?php
class Category extends CategoryCore
{
public $text_SEO; // My Custom field
public static $definition =... | 3 | 1,477 |
Stuck Scraping Multiple Domains sequentially - Python Scrapy | <p>I am fairly new to python as well as web scraping. My first project is web scraping random Craiglist cities (5 cities total) under the transportation sub-domain (i.e. <a href="https://dallas.craigslist.org" rel="nofollow noreferrer">https://dallas.craigslist.org</a>), though I am stuck on having to manually run the ... | 3 | 1,590 |
How to serialize json to sql? | <p>I have a list of words and I should send requests to an API and get the information about the words. I want to convert the API data which is in JSON format to SQL(my DB is PostgreSQL) format in Django. How can I do that? Do you know any good source to learn to serialize json to sql?
I have just started learning Djan... | 3 | 2,124 |
Espresso Test : app:compileDebugAndroidTestKotlin FAILED with Unresolved reference: PopupBackgroundView | <p>I recorded an EspressoTest in which I test values in spinner :</p>
<pre><code><LinearLayout
android:id="@+id/linearLayoutSeedlingsTypes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp">
<andr... | 3 | 1,029 |
Back/Up Arrow not working when using navigation drawer | <p>The back or up button is not working when using a navigation drawer. The icon changes from a hamburger (having set the top level destinations) but both open the navigation drawer. I want the back/up arrow to go back in the stack.</p>
<p>public class MainActivity extends AppCompatActivity implements NavigationView.On... | 3 | 1,364 |
Distribute values across subsequent rows in Postgresql | <p>I have two tables. One contains user state transitions.</p>
<pre><code>create table state (
id serial primary key,
ctime timestamp with time zone not null,
state text not null
);
insert into state (ctime, state) values
('2019-05-01 03:58:40+00', 'Busy')
, ('2019-05-01 03:58:42+00', 'Ready')
, ('2019-05-01 0... | 3 | 1,335 |
Android sprite animation with BitmapRegionDecoder | <p>I'd like to animate a sprite.
I select the current frame by BitmapRegionDecoder, but it causes native crash on some Anroid 6.0 devices (mainly on Samsung).
I get this stack trace: </p>
<blockquote>
<hr>
<p>Build fingerprint: 'samsung/zeroltexx/zerolte:6.0.1/MMB29K/G925FXXU4DPGW:user/release-keys'
Revision:... | 3 | 1,206 |
Python Tkinter: Create a variable for each string inside a listbox? | <p>I'm (almost) a poor programmer-virgin so please go easy on me.</p>
<p>This is my second attempt at making a program and this is turning out to be a bit more than I can navigate, I am afraid. I ask for your help after a long time of trying to solve this.</p>
<p>I am basically making a ToDo-list but wanted it to have ... | 3 | 1,674 |
WPF Custom DependencyProperty Binding - SetValue set correct value but binded property set receive null | <p>I have issue with custom DependencyProperty in my control. Let me explain:</p>
<p>I have control with list of the checkable items. I need property binding to the IEnumerable SelectedItems. The logic of SelectedItemsProperty filling is inside of control, so it is not just simple binding. Here is code behind of my co... | 3 | 2,624 |
CSS animation-delay timing | <p>I took this example code from JSFiddle and played with it, but there is code confusing me</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-css lang-css prettyprint-override"><code>.backgroundimg {
-webkit-bac... | 3 | 1,430 |
Dynamic dropdown list | <ol>
<li>subjects</li>
<li>course</li>
<li>chapters</li>
</ol>
<p>I want to add 2 dynamic dropdown lists, one is for subjects, and one is for course. When I select subject, courses which is added to that subject should be loaded in the course dropdown list, and then add chapters to that courses.</p>
<p>How do I do th... | 3 | 3,554 |
How to pass 'quotaUser' parameter for queries to MySQL server in GCP from cloud function? | <p>I'm working on a project right now that shows a list of items. To retrieve this data, the page calls a callable cloud function which queries the data from a MySQL server. This MySQL server, like our cloud functions, is part of our project on the Google Cloud Platform.</p>
<p>The page that shows the items is used qui... | 3 | 1,792 |
FCM messages is not always delivered | <p>I push Firebase messages from PHP and they usually get the target Android app.</p>
<p>Nonetheless, and occasionally, a push message is not correctly delivered if the target Android mobile was inactive for some period of time. Then, if I open the app, the message is delivered immediately.</p>
<p>I read about the Doze... | 3 | 1,292 |
Using CUDA atomicInc to get unique indices | <p>I have CUDA kernel where basically each thread holds a value, and it needs to add that value to one or more lists in shared memory. So for each of those lists, it needs to get an index value (unique for that list) to put the value.</p>
<p>The real code is different, but there are lists like:</p>
<pre><code>typedef s... | 3 | 4,205 |
Data Validation should be pulling based off of previous Options. Returning Undefined | <p>The Bid Sheet is ultimately supposed to enable the user to enter the various Options and it will give them a list if Items with those Options. I suspect my attempt to use the same scripting as the single validation Option is insufficient to handle the multiple Options, but I am too inexperienced to know a better pat... | 3 | 1,523 |
Reactivity not working inside the loop for unknown reason in vuejs | <p>I'm struggling to get working the reactivity in vue.js inside the loop. Loop is rendering without any issue, But, when trying to fire an event it updates the content but not visible or render data in the page.</p>
<p>I've used the latest version of vue.js with bootstrap and jquery. I've tried adding <code>key</code... | 3 | 1,727 |
Client server authentication with self signed certificate - Curl is working but Apache HttpClient throws exception | <p>I'm trying to implement client and server authentication with Apache HTTPClient,
and to test it with a self signed certificate.
I've tried to follow several tutorials and answers to similar questions here but
with no success. I've tried to detail as much as possible all the steps that I've
been doing, hopefully some... | 3 | 2,503 |
Different types JSON file using ObjectMapper | <p>I am using AlamofireObjectMapper to communicate with a backend server. The result of one of the requests is an array of items, which contain two values:</p>
<ul>
<li>A "typeIdentifier" indicating which type of data the second value ("arbitraryData") is of</li>
<li>A "arbitraryData":
<ul>
<li>If "typeIdentifier" C... | 3 | 1,058 |
PHP calculation result not showing correct currency format | <p>In the following code I am trying to get the results:</p>
<pre><code>$time_base_cost_day;
</code></pre>
<p>and</p>
<pre><code>$time_base_cost_month;
</code></pre>
<p>to show with correct currency comma separators like <code>$1,456.00</code> or <code>$100,456.00</code></p>
<p>I have tried a couple of examples bu... | 3 | 1,923 |
Emulator crashes after running code | <p>This is the XML file for the main fragment that i am currently dealing with. the problem i am having is that when i clean the project it does not give me any errors but when i run the program the emulator crashes.</p>
<pre><code> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
... | 3 | 2,570 |
Why does this boost::spirit::qi rule not match the input? | <p>I tried to continue to work on my previous example and expand the rules. My problem is, that rules that use ID_IDENTIFIER do not work - although I know that the lexer is working (using unit tests).</p>
<p>Here's the example:</p>
<pre><code>#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/incl... | 3 | 1,676 |
RuntimeError: Can't determine home directory | <p>I'm trying to run a PYthon Script on a server using xampp. When trying to import matplotlib I get the following error:</p>
<pre><code>[Fri Mar 13 10:46:36.219708 2020] [cgi:error] [pid 15320:tid 2012] [client ::1:54631] AH01215: File "C:/Users/gfranosc/Downloads/xampp-portable-win32-7.2.1-0-VC15/xampp/htdocs/Pyth... | 3 | 2,187 |
Papaparse local file not showing any data | <p>I'm trying to parse a local relative csv file using papaparse however it doesn't return any data at all. The two files are located in the same folder locally. Not sure what im doing wrong here.</p>
<p>Here is my code so far....</p>
<p><strong>index.html</strong></p>
<pre><code><!DOCTYPE html>
<html lang=&qu... | 3 | 1,904 |
How to run DatabaseUtil.precomputedKNNQuery method of LOF class on two different threads | <p>I want to reduce runtime of DatabaseUtil.precomputedKNNQuery method by running this method on two different threads and KNNQuery is an interface.</p>
<pre><code> KNNQuery<O> knnq = DatabaseUtil.precomputedKNNQuery(database, relation, getDistanceFunction(), k);
</code></pre>
<p>I divided this method of LOF... | 3 | 1,694 |
JPA Hibernate Configuration Errors | <p>I want to enable JPA for an EJB module, in an IntelliJ J2E project. I don't have an existing database schema to import; I want to generate the schema and tables from my EJB POJO class. I then want to generate ORM mappings.</p>
<p>I've enabled JavaEE Persistence framework support in IntelliJ, with Hibernate as the p... | 3 | 9,617 |
Text shows in header instead of new section BS4 | <p>I have a problem with my one-page website. My new text section shows in my header video. instead in my new section. I want it after video header. What am I doing wrong?</p>
<p>My HTML</p>
<pre><code><header>
<div class="container">
<div class="bg-wrap">
<video poster="poster.png" auto... | 3 | 1,461 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.