title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Create a column based on different group conditions | <p>I have a dataset with different columns. Looks like that</p>
<pre><code>df <- data.frame(PatientID = c("0002" ,"0004", "0005", "0006" ,"0009" ,"0010" ,"0018", "0019" ,"0020" ,"0027", "0039" ,"0041&qu... | 3 | 1,327 |
Complex nested aggregations to get order totals | <p>I have a system to track orders and related expenditures. This is a Rails app running on PostgreSQL. 99% of my app gets by with plain old Rails Active Record call etc. This one is ugly.</p>
<p>The <code>expenditures</code> table look like this:</p>
<pre><code>+----+----------+-----------+-----------------------... | 3 | 2,122 |
cannot add space-between to arrows in a container | <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>/* GLOBAL */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap');
:root {
--nav... | 3 | 2,533 |
php: click the submit button but it dosen't work | <p>This website say I can't put too many code. So I put these pictures for intance.</p>
<p><a href="https://i.stack.imgur.com/BJZA5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BJZA5.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/Gwi2I.png" rel="nofollow noreferre... | 3 | 2,441 |
GCP GKE Ingress cannot reach backend services, though health check, firewall, service and deployment all look correct | <p>I am trying to deploy a node.js application (Dockerized in Artifact Registry) into a GCP Kubernetes cluster... and then also put the service/deployment behind an ingress, so that our static frontend can talk to this application via CORS.</p>
<p>I am able to get the service to work without using ingress (just a stand... | 3 | 5,594 |
How to activate an inactive tab woocommerce category products without click | <p>Currently, the store is made to display products in certain tabs. This is the code I have in loop-start.php</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><?php
/**
... | 3 | 9,157 |
JSON patch not working with abstract classes (inheritance) | <p>I am trying to use JSON patch in my .net core project to update data. I am using <strong>Table-per-type</strong> in my architecture for this particular feature.</p>
<p>So my models are like this.</p>
<p>I have a <strong>form</strong> model</p>
<pre><code>public class HrFormV1
{
public HrFormV1()
{
..... | 3 | 2,090 |
Python3 calling Python2 multiprocessing in Linux acts differently than in Windows | <p>I have a simple sample code running in <code>Python3.8</code>, that opens a <code>subprocess</code> that executes in <code>Python2.7</code> (utilizing multiprocessing).</p>
<p>In <code>Windows 10</code>, the behavior of my code is what my intention is. Where the Python2 pool runs and prints to <code>stdout</code> a... | 3 | 2,416 |
Scrapy Item Pipelines and file naming | <p>I am trying to name a pipeline output file with the spider name and a date.
I've written a small piece of code that gets called to date the file.
The issue is with the spider name.
Below are two methods. Both work, but I'd like to understand the nuances.
The first method generates a suggestion from PyCharm that I do... | 3 | 1,206 |
Cannot set correct edit permissions in Meteor.methods | <p>I'm trying to set permissions for add, edit and delete through my Meteor methods.
I'm working on a calendar that users can add events to and there events are visible to all, but an event can only be updated or removed by the event owner. </p>
<p>So far I have it to where only the logged in users can insert items an... | 3 | 1,486 |
CSS tabs width auto-resize | <p>I am creating a new layout to learn about flex, some kind of holy grail but in flex. The problem I am facing is with the tabs nav, because I want the layout to work fine in PC and mobile I need the tabs to autoresize.</p>
<p>No scripts no plugins no complications, clean and simple CSS only.</p>
<p>I want the layout ... | 3 | 1,767 |
Im using angular I want to include both drag drop and choosing files and display selected file in a grid | <p>I want to include both choosing file and drag drop of files.here’s the code of mine.
Here is my upload.html:</p>
<pre><code> ‹kendo-grid [data]="myFiles"
(remove )="removeHandler ($event)"
‹ng-template kendoGridToolbarTemplate position="bottom" )
‹input type=... | 3 | 1,700 |
Picker data not updating when sheet is dismissed | <p>I am using coredata to save information. This information populates a picker, but at the moment there is no information so the picker is empty. The array is set using FetchedRequest.</p>
<pre><code>@FetchRequest(sortDescriptors: [])
var sources: FetchedResults<Source>
@State private var selectedSource = 0
</co... | 3 | 1,120 |
Understanding cURL Requests (C#) | <p>I am looking at some documentation that only shows examples of how to send web requests in cURL, however I'm using .NET and am trying to understand how I would send the same requests but using c#</p>
<p>Some examples of the requests I'm trying to send:</p>
<pre><code>curl -X POST -H "Content-Type: application/json... | 3 | 2,728 |
PowerBi - how to authenticate to app.powerbi.com silently | <p>I have tried the method outlined in the Microsoft docs</p>
<p>which involves creating an app in Active Directory and then having code something very similar to:</p>
<pre><code>var authContextUrl = "https://login.windows.net/common/oauth2/authorize";
var authenticationContext = new AuthenticationContext(authContext... | 3 | 1,148 |
Woocommerce - Get the regular price before any calculation/update is made | <p>The code below is modified as per my needs from this 2 questions on stack overflow:</p>
<p>a) <a href="https://stackoverflow.com/questions/45806249/change-product-prices-via-a-hook-in-woocommerce-3">Change product prices via a hook in WooCommerce 3+</a>.</p>
<p>b) <a href="https://stackoverflow.com/questions/5271831... | 3 | 1,432 |
Timer HttpGet asyntask to localDatabase + display in ListView | <p>Hi i'm completely new to Android. Very used to .Net and SQL Server. Hence, having issue adopting to SQLite. I'm currently able to display the result in a <code>listView</code> from a URL via <code>HttpGet</code>. Kindly be gentle with me. Helps are greatly appreciated, as I'm stuck in SQLite for the past week. </p>
... | 3 | 5,046 |
Spark SQL execution fails with error: java.lang.NoClassDefFoundError: org.codehaus.janino.InternalCompilerException | <p>Running a Spark SQL program in Java immediately fails with the following exception, as soon as the first action is called on a dataset. Have tried all the suggestions in <a href="https://stackoverflow.com/questions/42352091/spark-sql-fails-with-java-lang-noclassdeffounderror-org-codehaus-commons-compil">Spark SQL fa... | 3 | 1,857 |
How to access and populate a referenced object schema in a larger document (MERN) | <p>Making an app with a variety of schemas, many having other objects (Schema.Types.ObjectIds) as their properties.</p>
<p>When doing this, I can access the sub-object's property, as long as that sub-object's property is a string. But I'm having issues with it if that sub-object's property is yet another object (and th... | 3 | 1,041 |
Multiple database populated dropdowns -- how to retrieve values via POST | <p>I am very close to finishing a project I've been working on, thanks to the good folks at Stack Overflow. Yay! I've already looked at similar questions but they don't address it in the context of multiple dropdowns: <strong>how do I submit a form with both selected values from a database in a dropdown as well as drop... | 3 | 1,465 |
UITableview Search Parse - No Results | <p>Im trying to use a <code>UISearch</code> bar to be able to find all the objects by a specific person. I have it set up so that each <code>PFUser</code> or user has a name object within the main object of <code>points</code>. When I attempt to find the user and there objects nothing appears, but in the NSLogs I get a... | 3 | 2,388 |
Joining process with broadcast variable ends up endless spilling | <p>I am joining two RDDs from text files in standalone mode. One has 400 million (9 GB) rows, and the other has 4 million (110 KB). </p>
<pre><code>3-grams doc1 3-grams doc2
ion - 100772C111 ion - 200772C222
on - 100772C111 gon - 200772C222
n - 100772C111 n - 2007... | 3 | 1,508 |
Count the number of intersections of line segments whose endpoints are located on a circle? | <hr>
<blockquote>
<p>The input is an array of 2n integers which defines line segments by saying how the points located on a circle are paired
and connected. (Each point has its own pair that's connected to it.)</p>
<p>Array <code>[2,3,0,1]</code> reads: </p>
<p>Point 0 is connected to point 2<br> Point 1... | 3 | 1,295 |
Spring Boot Client Not Able to Register | <p>I've been trying to setup Spring Boot Admin Server with a client using basic security configuration for a couple days now. Unfortunately I'm unable to get the client to authenticate with the server. I've tried a variety of examples and am at the point where I'm wondering if this is just a bug with the current rele... | 3 | 2,829 |
I'm trying to call a method through a for loop, and the first iteration will only read the first line of code in the method | <p>I'm trying to use an enhanced for loop to call a method many times in a row, but if I'm iterating more than once, the first iteration will only read the first line of code. Here are both of the methods I'm using:</p>
<pre><code>public Account() {
this.subDetails = new HashMap<Integer, String>();
... | 3 | 1,185 |
Wrong SELECT output with SQLite3 and Swift | <p>I have a task to make a mobile app in Swift to store data about students. When entering the app, the database should be created. There should be a text field, from which a user can insert his name into the database, and a button to reload the page and look at all the names in DB. Also, the date of creation should be... | 3 | 2,251 |
random color from an array for a different string | <p>I'd like to pick random number for a different string. The following example is similar to my scenario:</p>
<pre><code>+ (UIColor *)ivl_randomColorWithSeedString:(NSString *)seedString {
srand48(seedString ? seedString.hash : arc4random());
float red = 0.0;
while (red < 0.1 || red > 0.84) {
... | 3 | 1,042 |
Route within list-item | <p>I want to render a Route inside a list item. When I click on the Link the li shall open and reveal the child component. I have tried this simple solution:</p>
<pre><code>const Topics = ({ match }) => (
<div>
<h2>Topics</h2>
<ul>
{
topics.map(topic => (
... | 3 | 1,153 |
onCreateOptionsMenu on Samsung Galaxy Tablet 3 (GT-P5200) | <p>as this is my first question on stackoverflow I am a bit nervous and hope I did not do anything wrong (at least I used the search function).</p>
<p>I have a problem during development an android app with following code (simplified) :</p>
<pre><code>public class MainActivity extends ActionBarActivity {
@Override
p... | 3 | 1,294 |
jquery responsive menu not working properly | <p>I am trying to make a responsive navbar using jquery but it seems like the toggleClass is not being applied properly. Below is my js and html:</p>
<pre><code>$(document).ready(function () {
$(".burguer-nav").on("click", function() {
$("header nav ul").toggleClass("open");
});
});
... | 3 | 1,474 |
std::string assignment issue in VS2019, where it is working fine in VS2015 | <p>I am having an issue std::string assignment with the below code in VS2019, where it is working fine in VS2015.
I am using <em>Visual Studio 2019 (v142)</em> as Platform Toolset in VS2019 and <em>Visual Studio 2015 (v140)</em> as Platform Toolset in VS2015.</p>
<pre><code>class Test
{
public:
Test()
{
... | 3 | 1,435 |
WEBRTC: Local streams are visible on OPENVIDU WEB(other Participant) end But Remote Streams are coming NIL on my end locally swift iOS | <p>I am using OpenVidu for Video Chat, Using this Repo <a href="https://github.com/OpenVidu/openvidu-ios-app" rel="nofollow noreferrer">https://github.com/OpenVidu/openvidu-ios-app</a> I know this has bugs, but I have to use this as This is working fine at Android and WEB. I am able to make it working where my Local vi... | 3 | 9,641 |
Reading raw SSL/TLS Certificate from memory using OpenSSL | <p>I'm having trouble using OpenSSL to parse certificates from bytes acquired from a pcap file. The data is coming directly from <code>ssl.handshake.certificate</code> field in Wireshark (when observing the pcap).</p>
<p>The raw data is from a pcap file i found <a href="https://git.lekensteyn.nl/peter/wireshark-notes/... | 3 | 3,451 |
Using Google Cloud Speech API from javascript & Web Audio | <p>I am trying to send a LINEAR16 PCM encoded audio to Google cloud speech API(using REST API). I am getting audio from microphone using Web Audio API and sending base64 encoded data to the server. I am getting an empty {} every time.</p>
<p>First I stored audio buffers from stream to a array</p>
<pre><code>naviga... | 3 | 1,218 |
Access DB: TOP clause and nested queries + PHP Paging | <p>I'm developing a PHP interface to show some results from two different databases: a MySQL one (.sql) and an Access one (.mdb). When I query for the results I let the user choose how many of them he wants to list, so that I can limit and page them through some PHP fun.<br>
This is flawlessly working for the MySQL DB,... | 3 | 1,134 |
Windows 10 Still Being Reported as 8.1, Even with Manifest File? | <p>So I've done my due diligence first, and read as many SO issues as I found on this issue, and tried doing as they suggested; I still get 6.2 (Win 8.1) when calling these:</p>
<pre><code>Environment.OSVersion.Version.Major
Environment.OSVersion.Version.Minor
</code></pre>
<p><strong>I've added the manifest file</st... | 3 | 1,356 |
Scrolling blend effect - performance issues in all browsers except Chrome | <p>With the help received in a <a href="https://stackoverflow.com/questions/49763949/parallax-effect-force-text-block-to-behave-like-background-attachment-fixed">previous answer</a>, I'm utilizing a bit of JS along with CSS variables to achieve a "blend" effect when scrolling through a page as seen in <a href="https://... | 3 | 2,008 |
How could I solve a problem I have with my sidebar? | <p>I have a web system that only when it becomes mobile has the function of moving 2 buttons down, I did it with css putting a padding-top: 10% in my body; creating a space so that my buttons cannot cover the description of my first table, the problem I have is that this affects my siderbar leaving a space of 10%, how ... | 3 | 1,773 |
html space which belongs to no html tag | <p>I have this html code</p>
<pre><code><img src="/static/media/call-of-duty-mobile-promo-banner.c6a9b17af598e76351f1.jpg" id="banner" alt='' />
<div id="DIV_1">
<div id="DIV_2">
<div id="DIV_3">
login
</div>... | 3 | 1,787 |
Problem with displaying data with many to many relationship in Laravel | <p>I have many to many relationship between users and products table, and I set up pivot table product_user with product_id, user_id columns. When I try and upload some file it uploads successfully to the database and it shows data on page, but it doesn't show column 'owner of the product' which is column where is that... | 3 | 1,672 |
Xamarin data binding how to bind the value times two | <p>I'm learning Xamarin Data Binding and learning the below code:</p>
<pre><code><?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DataBinding"
... | 3 | 1,716 |
How can I make Strassen algorithm(matrix multifly) more efficiently? | <p>The result is Strassen() : 27 sec and muliply_mat() : 5 sec</p>
<p>how can I make more shorter than multiply_mat()??</p>
<p>I Guess the problem is new_mat function in strassen function.</p>
<p>what should i do to reduce the time using strassen function.</p>
<pre><code>def new_mat(a,b):
matrix = [[0 for row in r... | 3 | 2,316 |
How to properly store the necessary info to register the user and other participants in the congress? (scenario 1 works but scenario 2 and 3 dont) | <p>I have a registration form below for a user register in a congress. There are 4 different scenarios for the registration. So the registration form needs to handle this 4 different scenarios. But its not working, only the scenario 1 is working fine.</p>
<p>Do you know how to achieve this scenarios?</p>
<p><strong>S... | 3 | 5,309 |
javafx.fxml.LoadException when ran from a compiled jar | <p>When ran locally from within IntelliJ my JavaFX application starts fine, but when it is compiled into a jar and then made accessible to users in the client I receive the following exception. Any idea as to why this could be?</p>
<pre><code>(07:56:06) javafx.fxml.LoadException:
unknown path:10
(07:56:06) at ja... | 3 | 2,109 |
Predicting next word through Multi class classification neural network in R | <p>I am trying to predict a status with n.ahead=1. I have a list of 19 specific Status's. Using a dummy data of it, I have created train_x as training data which has beed converted from text to sequences, and train_y as labels which have been one hot encoded.</p>
<p>For eg,
I have a sequence: Sales, ILQA, Screen, Appro... | 3 | 2,189 |
How to break out of 2nd loop(nested) and continue looping | <p>please I need help with my Java program. I am a beginner so it's really confusing for me. I am trying to build a multiple Question Trivia program. Whereby a user is prompted with a question and they have to choose from the given answers. If they get it right or wrong they are told, and also shown the time they took ... | 3 | 3,106 |
why I am not able to makemigrations to postgres DB? | <p>My current Django project is bound to default SQLite DB. Now going forward I wanted to migrate to Postgres. I have followed this <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04" rel="nofollow noreferrer">link</a></p>
<p>There's nothing w... | 3 | 1,266 |
ASP.NET MVC - How to Treat Duplicate in Excel Upload | <p>I am uploading Excel file and save into my database using ASP.NET MVC. I succeeded in:</p>
<ol>
<li><p>Importing the Excel file</p></li>
<li><p>Save in to database</p></li>
</ol>
<p>See my Controller below</p>
<p><strong>Controller</strong></p>
<pre><code> public ActionResult ImportCountriesExcel(HttpPost... | 3 | 2,264 |
Getting Invariant Violation: Element type is invalid: expected a string, for Surface in react native but my import is correct | <p>I've been trying to get a very basic surface/react ART sample up and running. But every-time I try to use a <code><Surface></code> it gives me the Invariant Violation. I'm not using default exports anywhere. I've installed the art plugin and linked it via <code>react-native link</code> and restarted/rebuilt ev... | 3 | 1,180 |
java.lang.IllegalArgumentException with toplink and JPA | <p>I've a problem with JPA, whenever execute this query </p>
<pre><code>@NamedQuery(name = "Usuario.getUsuarioIntento", query = "SELECT u.intentos_id FROM Usuario u WHERE u.username = :username and u.borrado = 0")
</code></pre>
<p>i get this error:</p>
<pre><code>java.lang.IllegalArgumentException: NamedQuery of na... | 3 | 1,102 |
user editor, only edit the first record | <p>I am working in a user editor, I have a problem, just edit the first record.</p>
<p>when I want to edit another different user it sends me data only from the first one
i.imgur.com/nhP8iKz.png</p>
<pre><code> public function usuarios(Request $request){
$data = [
'category_name' => 'apps',
'pag... | 3 | 9,929 |
conditional sum in select statement | <p>I’m trying to do conditional sum in select statement a table but I can’t think of way to do so.</p>
<p>The sum should keep on going until it hits a reset flag in the table.</p>
<p>Increment values need to be set to 0 when reset flag is hit(1) and it should start summing again from next row.</p>
<p>Please have a l... | 3 | 1,116 |
How to create a label with drag and drop function and with the clicked signal function QT | <p>I'm developing a program that contains a MainWindow and a Widget called Diagrama from <code>QWidget</code>, which is the central widget of my mainwindow.</p>
<p>In this diagrama widget I have the ability to create a label in a the position that I clicked on the screen and the ability to drag an drop those same label... | 3 | 2,265 |
How to aggregate ilike found search on multiple row in PostgreSQL? | <p>Let say I have this table</p>
<pre><code>CREATE TEMP TABLE pizzas (
pizza_id INT,
name TEXT,
ingredients TEXT,
kingsize_ingredients TEXT
);
</code></pre>
<p>and some entries</p>
<pre><code>pizza_id | name | ingredients | kingsize_ingr... | 3 | 1,126 |
Gulp not generating inline sourcemaps | <p>I have the following <code>tsconfig.json</code> file in an ASP.NET Core:</p>
<pre><code>{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"inlineSourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": tru... | 3 | 1,188 |
Slow and lag javascript | <p>I have a simple javascript program.</p>
<p>You can move a square in it.</p>
<p>But after a while, it start slowing and lagging.</p>
<p>What's the problem? Why is it slow?</p>
<p>Is this too much use of ram?</p>
<p>I use Javascript canvas and setInterval.
Or is it really out of date?</p>
<p>aaaaaaaaaaaaaaaaaa</... | 3 | 1,133 |
UI Router: How should you prevent toState from showing while you're checking authorization? | <p>Edit: The proposed approach of using <code>resolve</code> isn't working for me. The <code>$stateChangeStart</code> event seems to be happening before the resolve stuff. <a href="http://plnkr.co/edit/WJaWJ8NSGDeg8Jfzi86R?p=preview" rel="nofollow">Plunker</a>.</p>
<p>I'm using <code>$on($stateChangeStart)</code> to d... | 3 | 1,595 |
PHP : Ganon dom parser filter the anchor tags | <p>I am working with PHP Dom Parser library and i have a complex HTML structure to parse : </p>
<pre><code><table width="640" style="color: #333333;">
<tbody><tr>
<td valign="top">
<font face="Arial,Helevetica,sans-serif">
<a href="http://forums.timezone.com/index.php?t=tree&amp;go... | 3 | 1,062 |
Java Swing BoxLayout: Adjusting space between panels in a multi-panel setup? | <p>I'm writing this swing application and I'm using multiple panels in a BoxLayout format, but it seems to be that the empty space between the panels is being divided up between them and it looks really ugly. How do you adjust and customize how much space is put between panels? Sorry if this is a repost; I was unable t... | 3 | 1,330 |
ImportError: No module named sparkdl.image.imageIO | <p>i'm doing image classification using spark.
i have already imported sparkdl jar(added path of jar in the conf/spark.default)</p>
<pre><code>ImportError: No module named sparkdl.image.imageIO
at org.apache.spark.api.python.PythonRunner$$anon$1.read(PythonRDD.scala:193)
at org.apache.spark.api.python.PythonRu... | 3 | 1,390 |
Boot, OAuth2, Zuul Proxy and Versions | <p>So, i've added in Zuul and to get the proxy working realised i needs to add in 'spring-cloud-security' which i did:</p>
<pre><code> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-security</artifactId>
<version>1.1.0.M... | 3 | 1,111 |
Why does AJAX validation result in showing up PHP error message? | <p>I am trying to create a contact form which 1) sends a formatted message to the recipient e-mail, and 2) shows a success/error pop up message on the same page after the user submits the form.</p>
<p>I've tried to use JQuery AJAX form validation, but that causes my website to behave awkwardly (it already runs on Boots... | 3 | 2,290 |
How to read JSON with multiple objects java | <p>I am trying to read this JSON and get the value for each key. The JSON looks like this in the url. </p>
<pre><code>{"gameList":[{"gameId":2889909885,"mapId":12,"gameMode":"ARAM","gameType":"MATCHED_GAME","gameQueueConfigId":450,"participants":[{"teamId":100,"spell1Id":4,"spell2Id":14,"championId":103,"profileIconId... | 3 | 2,975 |
Chilkat: Proxy-Authentication getting logged | <p>We are using Chilkat.Http for downloading files, when a failure is observed Http.LastErrorText is containing Proxy-Authentication which has username and password in BASE64 encoded format. Is there a way to disable or mask this detail? This is a security policy voilation.
Chilkat version -> 9.5.0.78
Please find th... | 3 | 1,114 |
how to display records from database to textfied in swing? | <p>Sir/Madam
<strong>Need your Help</strong></p>
<p><em>i want to disply records from database on textfield. I did not getting the result of it even code is debugging successfully</em></p>
<p><strong>I am new in programming language</strong></p>
<p>*<em>These is my code *</em></p>
<pre><code> import java.awt.Contai... | 3 | 1,774 |
How to determine the number of constrained CPUs within a Docker container? For use with make -j | <p>Docker supports a <code>--cpus</code> option which constrains a container to using a certain proportion of the host's computing resource. For example, <code>--cpus 2.5</code> will allocate computing resource equivalent to approximately two and a half of the host's CPU capability. This allocation seems to be somewhat... | 3 | 1,029 |
Validations errors are not raising in clean function, Why? | <p>Well I'm using the Userprofile form with the UpdateView and the errors are not raising even if my condition is true. What is the possibility of this unwanted behavior.</p>
<p>forms.py.</p>
<pre><code>class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
fields = ("avat... | 3 | 2,618 |
How can i delete a certain row from a table in VueJS | <p>I am trying to delete a certain element from an array, that I display in a HTML-Table.</p>
<p>Here's the frontend:</p>
<p><a href="https://i.stack.imgur.com/4cVd0.png" rel="nofollow noreferrer">HTML-table_frontend</a></p>
<p>I push the Data from the input into an array <code>userData</code>.
The HTML-Table is build ... | 3 | 1,337 |
sqldf in R returns NA for all rows in SQL CASE statement | <p>I have a dataframe in R called "<code>data</code>". The <code>EventDate</code> column is a <code>date format</code> and the rest are double or character fields. </p>
<p>I'm trying to pull most of the columns from "<code>data</code>", but <code>aggregate</code> the <code>EventDate</code> values into year-month desig... | 3 | 1,094 |
TypeError: Cannot read property '0' of undefined while accessing "photo_reference" property | <p>Below is the JSON i get from the google places API. Parsing the Json with JSON.parse(body). The "results" key is an array of Objects that i am looping through to access the property of photos. Hope the code is clearer now. I have pasted in the valid JSON that i am getting from the api call.</p>
<pre><code>{
"htm... | 3 | 1,778 |
Error: XHR error (404 Not Found) after installing typescript-collection with Angular 2 final | <p>From an Angular 2 quick-start project, I just installed typescript-collections that way:</p>
<pre><code>npm install typescript-collections --save
</code></pre>
<p>I do have the following error after launching my project.</p>
<pre><code>GET http://localhost:63342/IMA%20Sentinel/node_modules/typescript-collections ... | 3 | 1,496 |
How to keep sync validation with Redux-form v6 while implementing custom onBlur? | <p>I have a Field that needs some custom onBlur functionality, but when I implement my functionality, the normal sync validation stops working. I can still see the error getting updated within props.meta.error when I console log with componentDidUpdate, but it doesn't actually show the error.</p>
<p>I've tried tinkeri... | 3 | 1,074 |
Need help debugging Tomcat 7 application error | <p><strong>UPDATE</strong>: This appears to be caused by the order in which spring beans are discovered and initialized. It's still unknown why the servers are detecting the beans in different orders, but gives me path to fix this.</p>
<p>I've run into a puzzling problem trying to deploy a WAR to Tomcat 7 (AWS OpsWork... | 3 | 2,246 |
#WSO2 - DAS - storing event in SQL server 2008 | <p>In my project I need to collect data, process/Analyze data and published it.
I am using WSO2 DAS 3.0.0 for the same.</p>
<p>In order to achieve this I have followed below steps:-</p>
<ol>
<li>Created event stream(define attribute).</li>
<li>Created Event receiver. (HTTP,SOAP)</li>
<li>Created event publisher (stor... | 3 | 1,058 |
Strange SEGFAULT in C at end of function | <p>I have a problem, a strange problem, where I get a segfault, this is the output of GDB:</p>
<pre><code>Core was generated by `./vfirewall-monitor'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000402a5c in init () at kernel.c:57
57 }
(gdb) l
52 if (read_rules(conn) == NULL) {
53 ... | 3 | 1,218 |
Laravel - 403 redirect. Redirect is correct working for tags and category sections but not for users | <p>I'm trying to set the post admin section. The mission for that section is to show all articles that belong to logged user. The way I'm doing for tags and categories is working correct (tags and categories doesn't need to be filtered for any user). The post page works correctly show the owned post for logged user, bu... | 3 | 4,287 |
Remove bottom padding in table in cfdocument | <p>I use <code>cfdocument</code> and I need to remove <code>bottom-padding</code> from my table.</p>
<pre><code><cfdocument format="pdf">
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: colla... | 3 | 1,581 |
Flask without ORM - Best practices | <p>I am building a CRUD app using Flask and mySQL without ORM (mostly because I want to be better at SQL and SQLAlchemy is very high level). However, I am concerned about the design and separation of concerns.</p>
<p>This is the overall overview of my application, it's a multi-choice question bank for students (it's fa... | 3 | 2,643 |
Strange issue with Datagridview-Rows not displayed | <p>I have a Datagridview connected to a dataset.The problem is that occasionally,when the data is refreshed,it is not displayed in the DGV.The code is:</p>
<pre><code>Private Sub DisplayInDGV()
Dim SQLSet As String
Dim DASet As New OleDb.OleDbDataAdapter
Dim DSSet As New DataSet
SQLSet = "Select * From... | 3 | 3,643 |
Back press or finish() does not work in closing the activity | <p>I have an Android app that constantly receives data over Bluetooth and pushes data from <code>MainActivity</code> to <code>MainActivity2</code> through <code>Intent</code>. The <code>MainActivity</code> has an <code>ImageButton</code> that allows switching to the <code>MainActivity2</code>.</p>
<p>I am using a vari... | 3 | 1,468 |
SQL Server : running totals of two tables in CTE | <p>I'm having a bit of trouble creating a running total for two tables in a CTE. Due to the nature of the beast (two tables that I have to UNION ALL) I get double date rows.</p>
<p>What's the best way to add them together?</p>
<p>Here is a sample code. <code>Date</code> is <code>date</code>. <code>Cost</code> and <co... | 3 | 1,504 |
Fody plugin Validar fails. Could not load type 'Validar.ValidationTemplateAttribute' from assembly mscorlib | <p>I'm trying to use <a href="https://github.com/Fody/Validar" rel="nofollow">Validar</a> to inject validation in my classes. My solution consists of multiple (5 for now, can become more in the future) projects in which I want to inject the validation. So I defined my <code>ValidationTemplate</code> class in one of the... | 3 | 1,342 |
WinForms Setting A label Forecolour when the next TextBox Control is focused | <p>Ok,</p>
<p>It is common practice to have a Label followed by a TextBox. Imagine we have three Labels and three TextBoxes like this.</p>
<p>Label1.Text = "User Name" TextBox1.Name = "tbUserName"; <br />
Label2.Text = "Users Sex" TextBox2.Name = "tbUserSex"; <br />
Label3.Text = "User Age" TextBox3.Name = "tbUserAge... | 3 | 1,055 |
How to get an error message when data could not be written into the Firebase Database using Android | <p>I am using Android and I would like to store some data in the Firebase Realtime Database. Strangely, sometimes this works and sometimes it does not. I thought that this might have something to do with my WLAN connection which is not always good, but even if the WLAN connection is good sometimes data can be written i... | 3 | 2,950 |
FOREIGN KEY constraint failed in signals | <p>I tried to insert data into the table Account, but I keep getting this error message.
I delete all my migrations and make migrations again but I keep getting this error.</p>
<p>Here is my models.</p>
<pre><code>
class Student(models.Model):
user = models.OneToOneField(Account, on_delete=models.... | 3 | 2,837 |
Pine Script Multi Time Frame - My strategy is repainting and I can't figure out why | <p>I thought I understood how to avoid repainting, but I'm still seeing trades on my chart not lining up with alerts, or vice versa.</p>
<p>My script takes data from the 60m chart to trade on the 15m chart. I'm accessing historical data on the 60m (at least 4 bars back), and I'm only entering trades on the 15m if <code... | 3 | 1,688 |
Unable to create VNet using JSON | <p>I have the below script, whch is a section of a script I'm using to deploy a vnet. However it fails to create a the vnet, any idea where I might be going wrong? </p>
<pre><code>{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"paramet... | 3 | 8,517 |
Angular 2 quick start tutorial issues (nested components) | <p>Hey everyone i'm learning Angular 2 following the quick start tutorial but i'm using a template I downloaded from thenewboston, because its configured to convert typescript to java script, in short my issue is when I try to nest the herodetailcomponent it wont even show on click of the list, nor will it result in an... | 3 | 1,771 |
how to share the html content with css style | <p>This is on android, and in one adroid app to do sharing the html content via intent.</p>
<p>Having an email html content and would like to open the apps share chooser to share using other app.
function to do the sharing:</p>
<pre><code>Intent shareIntent = ShareCompat.IntentBuilder.from(activity)
... | 3 | 1,570 |
D3 Interactive Stream Graph: Data repeating past one month | <p>I am working with this stream graph example inspired by this <a href="http://bl.ocks.org/WillTurman/4631136" rel="nofollow">proof-of-concept</a>. My example can be found <a href="http://jsfiddle.net/cconcolato/6YENR/" rel="nofollow">here</a> on jsFiddle. I am at a loss as to why my data is repeating when i move from... | 3 | 1,043 |
how to download pdf file from server , store it in sdcard and view through intent in android? | <p>I have written a program to download my pdf file from server into my sdcard , which is getting downloaded properly but when i am viewing it through my pdfviewer it says unable to open this file.
Also the files size is 4.5mb , but the pdf which is getting downloaded into my sdcards pdf folder has size 0 .</p>
<pre><... | 3 | 1,618 |
gcc optimization gives infinite loop or segfault | <p>I just found a pretty fun code. GCC optimizations change its behavior weirdly.</p>
<ul>
<li>-O0 works</li>
<li>-O1 segfault</li>
<li>-O2 infinite loop (from 7 to 1996 inclusive)</li>
<li>-O3 works</li>
<li>-Og segfault</li>
<li>-Ofast works</li>
</ul>
<p>Here's the code :</p>
<pre><code>int main(int argc, char *a... | 3 | 1,032 |
In Youtube API, I get empty pages after the second page | <p>I try to get all the live videos of youtube api at a given time.</p>
<p>However, after the two firsts pages that contains 50 results each, all the others pages are empty.</p>
<pre><code>{"etag":"\"7991kDR-QPaa9r0pePmDjBEa2h8/7Mn5oZUWkgMIU4kfKx7cq0D0nDI\"","items":[{THIS ONE IS OK WITH 50 RESULTS}],"kind":"youtube#... | 3 | 2,473 |
HTTP 400 Bad Request using https://classroom.googleapis.com/v1/courses?pageToken=SomePageToken | <p>Here is a powershell code snippet I am using when I get the error:</p>
<p>Calling code:</p>
<pre><code>$global:NextPage = $null
GetCourses # Calls a function to get the first 500 rows
Do {
GetNextCourses $global:NextPage # Get next 500 rows using Page Token
} Until ($global:NextPage -eq $null)
The functio... | 3 | 1,433 |
Change loading icon size for different DPI deivces | <p>I am working on application which is implemented using Expo and react native. I have splash screen in my app.The icon in splash screen loading screen is coming correct in android devices but very small in IOS devices ( in different dpi).I want to make icon resize based on dpi which present under loading .Can anyone... | 3 | 1,620 |
spring xd losing messages when processing huge volume | <p>I am using spring xd My stream looks like below and running tests on 3 node container with 1 admin node with rabbit as transport</p>
<pre><code>aws-s3|processor1|http-client|processor2>queue:readyQueue
</code></pre>
<p>I have created below tap.</p>
<pre><code>tap1 aws-s3>s3Queue
tap2 processor1>proce... | 3 | 4,882 |
Android Fragment not replacing UI from Activity | <p>I am currently building an android application that uses a navigation drawer. When the user selects an item from the drawer, a fragment is created that corresponds to the item selected. For example, if the user selects the contacts item from the navigation drawer, the UI should change from the dashboard, to the cont... | 3 | 1,512 |
MvvmCross bind to InteractionRequest | <p>I am attempting to implement a modal confirmation popup using mvvmcross in iOS, following the Stuart's outline in <a href="https://stackoverflow.com/questions/18609018/mvvmcross-dialog/18624500#18624500">this question</a>. I get the following exception when attempting to bind the InteractionRequest to the Event han... | 3 | 1,955 |
PHP how to include a pie-chart | <p>I am working on a report and it is very static. I was asked to change some of the numbers into a pie-chart or cool graph. So been looking at canvasjs but cannot figure it out. </p>
<p>The code I work with simple </p>
<pre><code><tr><td><?php echo __( 'Average Pagespeed', 'mainwp-pro-reports-extensio... | 3 | 2,029 |
SpringBoot: Imp SpringSecurity : while login with user/pass getting Screen error msg "User is disabled" | <p>I just start implementing SpringSecurity but post login getting Error Message on Screen "User is disabled"</p>
<p>IT'S WORKING VERY WELL FOR DEFAULT .
WHILE HITTING WITH /user or /admin and trying to login it's showing <strong>"User is disable"</strong> </p>
<p>I am following below step:</p>
<ol>
<li><p>First c... | 3 | 2,282 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.