title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Spring @Autowired comes as null
<p>I have <code>@Component</code>, <code>A</code>, which AutoWires a class which contains simple configurations for class <code>A</code>. I've created a bin for configuration file. But for some reason it comes as null. Could you please help me to find out the problem?</p> <pre><code>@Component public class SearchEngi...
3
1,208
Create multiple unique aws_acm_certificate certificates with Terraform for_each
<p>I am trying to create multiple unique aws_acm_certificates using Terraform for_each,I created the acm certificates as modules for each of the unique certificate.</p> <p>I am having a challenge outputing the certificates created, not sure of how to output for each of the modules.</p> <p>This is my code. Would appreci...
3
1,055
Edge labels of networkx graph don't show in PyQt embedded matplotlib
<p>I have networkx directed graph that are displayed in a PyQt5 application which are working perfectly fine. I am now trying to add labels to the edge for some conveniency, but can't manage to make them appear.</p> <p>Below is a dummy application to replicate the issue:</p> <pre><code>import sys from PyQt5 import QtCo...
3
2,443
Why am I getting this error in Python ML model?
<p>I face no problems in importing the dataset. However, when I run SMOTE or RandomUnderSampler I get the error (however, only in this dataset I face this problem not with others). I cannot even make out which column/field the error is pointing at. Is there any change or tweaking I need to do in the parameters for SMOT...
3
1,162
Need help replacing withRouter and History in React for Social Media Project
<p>Need help replacing withRouter and History in React in my code below. This used to work for React v5 but I want to find a way to make this work in v6. I am not sure how to go about it so Please help! Here is my CreateProfile.js for my social media project:</p> <pre><code>import React, { Fragment, useState } from 're...
3
3,841
Flexbox - container width auto
<p>How to make width of the <code>ul</code> in <code>.menu-sub-col</code> to be equal to content width?</p> <p><a href="https://fiddle.jshell.net/j9ujfL2n/3/" rel="nofollow noreferrer">https://fiddle.jshell.net/j9ujfL2n/3/</a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-bab...
3
2,587
Error: SQLSTATE[HY093] sending data through HTML/PHP to MySQL
<p>I'm trying to send a lot of data from a form to a mysql database, and I'm getting the following error:</p> <blockquote> <p>Error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens</p> </blockquote> <p>I know the error is likely related to the amount of fields I'...
3
4,630
Getting a Google maps activity in Android Studio to show current location
<p>Hey so I've searched a ton on this site and the internet for an answer to getting android studio to show my current location for an app I'm trying to create. Each answer doesn't seem to help. Here is my code and I'm not sure what I need to change. </p> <pre><code>import android.Manifest; import android.content.Co...
3
1,607
How to call class instances stored in a list of lists?
<p>I'm using Python 2.7.6 in Kubuntu 14.04; trying (for my own edification) to implement Conway's Life using a single class instantiated for each cell to do the "cellular automaton" work. In the process, I'm storing an instance in each member of a list of lists. The problem is, when I try to call instance methods whi...
3
1,097
Issue with Hibernate Search and Spring Integration
<p>I have been trying to integrate Spring with Hibernate Search but getting different exceptions with different versions. In my pom.xml I have following dependencies</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.apache.struts&lt;/groupId&gt; &lt;artifactId&gt;struts2-core&lt;/artifactId&gt; &lt;vers...
3
2,372
How can I use MarkableIterator in Hadoop?
<p><strong>Background:</strong><br/> <code>MarkableIteratorInterface</code> is an interface for an iterator that supports mark-reset functionality. Basically, you can iterate over the Reducer's values multiple times my "marking" a position and "resetting" back to it. The data is temporarily cached to memory (and then t...
3
5,154
Split string in characters turns & into &amp;
<p>I am splitting a string by each character and wrapping them in a span. I'm using a modified version of the script from splt.js. When the string contains special characters such as '&amp;' it will return <code>&lt;span&gt;&amp;&lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;span&gt;m&lt;/span&gt;&lt;span&gt;p&lt;/span&gt;...
3
1,280
Certificate verify failed using requests python library
<p>I am trying to access the Thycotic Secret server API which uses oauth2. I am using a code snippet that their support page give as an example:</p> <pre><code>import http.client import urllib import json import requests site = 'https://servername/SecretServer' authApi = '/oauth2/token' api = site + '/api/v1' usernam...
3
1,645
Center certain elements vertically in a Row widget
<p>I have the following Widget tree of a ListView item:</p> <pre class="lang-dart prettyprint-override"><code>Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Align( child: Assets.images.select.image(height: 20, width: 20), ), ), Expanded( flex: 4...
3
1,077
I'm working with a class to change the pitch of a sound, but I can't get the sound to loop
<p>Good Morning. I'm working with a class made by a professional actionscript sound specialist (Andre Michelle). The class I have taken from this platform The class loads a sound, changes its pitch, and plays it. I want it to loop. I have added the (0, int.MAX_VALUE) in the play method but it only plays once.</p> <p>Th...
3
2,241
How to pass model attributes globally to avoid repeatable code in Spring controller?
<p>I would like to ask you for some best practice to reduce the amount of repeatable code in my controller's methods - one of them is presented below.</p> <p>I have quite a big and complex view with a lot of information and two forms. In every method of my controller (and there are quite a few) I have to pass the same ...
3
1,186
Elements not showing up on React Native
<p><strong>Current Output:</strong> <a href="https://i.stack.imgur.com/jrVRM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jrVRM.png" alt="enter image description here" /></a></p> <p><strong>Expected Output:</strong> <a href="https://i.stack.imgur.com/SmyMu.png" rel="nofollow noreferrer"><img src="...
3
1,872
RecyclerView Slide New Item In At Top
<p>I recently set up my RecyclerView and want to slide in all new items that are added. Specifically, I have a comment screen and every time a new comment is added, I want it to slide in from the left with an animation effect.</p> <p>Note that I add all new items to my <code>mCommentArrayList</code> at <code>index 0</...
3
2,146
How to insert data into Firebase using Polymerfire (mutiple nodes + multiple paths)
<p>My use case is that I have an <code>&lt;iron-form&gt;</code> with a single <code>&lt;paper-textarea&gt;</code> field that accepts a string list of email addresses which I parse into an array, then I want to:</p> <ol> <li>Store the individual email addresses in my Firebase (for indexing and lookup purposes),</li> <l...
3
1,271
Rails app - extra record displaying
<p>I have an app that allows users to add albums they like to a database. Anyone can then come along and write a review for that album. Pretty simple. </p> <p>I am running into a problem where an extra record appears to be created for the reviews on each album's show page. Every album, even if it has not ever been rev...
3
2,657
Grid column with width="*" does not use all available space as expected
<p>I have a problem with my first ListView usage. My custom item should have (currently) 2 rows with 3 columns each containing a label (1st column width=&quot;Auto&quot;), a textbox (fill-up 2nd column (tested with=&quot;<em>&quot; or width=&quot;100</em>&quot;) and a button in the 3rd column (width=&quot;Auto&quot;)<...
3
1,845
Python project basing on picture to guess the answer for the flag name , I think that the while loop is the problem
<p>My code snippet:</p> <pre class="lang-py prettyprint-override"><code>import tkinter from tkinter import Label, Canvas, PhotoImage, Frame, Entry, Button # Create the function instruction. def instruction(): tkinter.messagebox.showinfo('Welcome To the Flag Guessing Game', 'You have...
3
2,819
How do I train an LSTM in Pytorch?
<p>I am having a hard time understand the inner workings of LSTM in Pytorch.</p> <p>Let me show you a toy example. Maybe the architecture does not make much sense, but I am trying to understand how LSTM works in this context.</p> <p>The data can be obtained from <a href="https://drive.google.com/open?id=1VjuDcca_iYfO...
3
2,409
angularjs-highlight text into paragraph
<p>I am new to angular js. So, I want to highlight certain text from a HTML.</p> <p>HTML CODE:</p> <p></p> <pre><code> &lt;div class="form-label logs-wrap" ng-repeat="x in res track by $index" ng-click="getBookingLog(x.bookingDBID)" ng-class="{selected: x.bookingDBID === bookingDBID}"&gt; ...
3
1,145
Is a scollable TextSelectionMenu possible?
<p>It seems impossible to find any answer on my question/problem regarding af scollable TextSelectionMenu! I have searched the whole Stackoverflow and Google without any succes and I have tried various ideas out.</p> <p>I have 10 menu items in my custom TextSelectionMenu. Only 6 of them is visible, the rest is of cour...
3
1,413
Reset CSS animation when not hovering
<p>I would like to reset my animation when hover out from div. This code is from Codepen.io and edited for my purpose.I want border animation to reset when i hover out form div. now it stays fully animated. I'm beginner with coding i am learning by trial and error.</p> <p><div class="snippet" data-lang="js" data-hide="...
3
1,149
Casting consumer generic type to another type
<p>Please first look at my code. I get an error in the BolBFS constructor when I want to create an object:</p> <pre class="lang-none prettyprint-override"><code>Error: Required type is : Consumer&lt;Node&lt;String, ChildFlightConsignmentInfo&gt;&gt; Provided type is : Consumer&lt;BolNode&gt; </code></pre> <p>I know I c...
3
1,345
Intermittent: The Server is not operational
<p>The below error is shown when running TEST Connection in AD Production / AD Stage and AD Test.</p> <p>The user server for ou=someusers, ou=anOU,dc=more,dc=morestuff,dc=stuff: The server is not operational. . HRESULT:.(0x8007203AJ”, “Failed to connect to the server for ou=someusers,ou=anOUusers,dc=more,dc=more, dc=st...
3
4,850
AngularJS - using ng-model inside a directive with repeats and dynamic html controls
<p>I wrote a directive for a grid and I want to be able to pass in a column definition that may be an html control with a ng-model and ng-click directive. I keep getting "Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!" and the ng-model isn't binding. I put together a simple plunker here: <a hre...
3
1,911
XSLT 1.0 check if element exists and append new child
<p> I have the following source-xml-file and would like to transform it with xsl into another xml-file. How can i check if an Element exists and depending on this result create a new one or append a child to the existing element?</p> <pre><code>&lt;Vortriebsorte&gt; &lt;Vortriebsort&gt; &lt;Name&gt;Südröhr...
3
2,032
Select Query Joined on Two Fields?
<p>I've got a few tables in an access database:</p> <pre><code>ID | LocationName 1 | Location1 2 | Location2 ID | LocationID | Date | NumProductsDelivered 1 | 1 | 12/10 | 3 2 | 1 | 01/11 | 2 3 | 1 | 02/11 | 2 4 | 2 | 11/10 | 1 5 | 2 | 12/10 | ...
3
1,913
MySQL Chef: NoMethodError: undefined method `set' for #<Chef::Node::Attribute
<p>I am trying to use the MySQL cookbook from the supermarket but having some exceptions</p> <p>My config is very basic:</p> <p><strong>Recipe:</strong></p> <pre><code>mysql_service 'foo' do port '3306' version '5.5' initial_root_password 'changeme' action [:create, :start] end </code></pre> <p><strong>Metadata...
3
1,642
EJS syntax error while compiling ejs code in Create Form
<p>I have a syntax error when I try to render this part of my template with EJS (on a node server).::</p> <p><a href="https://i.stack.imgur.com/tVyxu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tVyxu.png" alt="enter image description here" /></a></p> <p>I'm trying to show a view of a create form,...
3
1,061
How to link to other HTML files within a template HTML file using html-webpack-plugin
<p>I have used the html-webpack-plugin to generate multiple HTML files within the dist folder. They rely on their own template files, and when I update the template files then the 'dynamic' webpack version is also updated, which shows that it is working. My issue is that I want to link to the other HTML files in a nav ...
3
1,036
Unable to plot scales and axes in scatter plot in google data studio
<p>Trying to build scatter plot custom visualization in google data studio. Stuck with creating scales and axes.Help me in creating the scales and axes to the plot.</p> <p>Please note:- have removed the d3.min.js, dscc.min.js library from the myViz.js file to make it readable</p> <p>I have created the below files in ...
3
3,672
How to sort json string by value in a loop?
<p>I have the following json string that I want to sort in the format A-Z. </p> <pre><code>{ "buses": [ { "name": "Shuttle 10: City 1 - City 5 (11 seats left)", "id": 12 }, { "name": "Shuttle 11: City 1 - City 5 (11 seats left...
3
2,076
Convert Spinner String values "20-34" as integer from 20 to 34 in android
<p>How can i convert a Spinner String values such as "20-34",35-44"etc into integer from 20 to 34, integer from 35 to 44 in android.Below is the code for taking integer values from spinner and assigning points in order to a mathematics calculations</p> <pre><code> public static int age_value(String gender, String ag) ...
3
1,568
Unable to retrieve XForms engine state
<p>I working with Orbeon XForms 4.7 on eXist-db 2.2. We've always had session problems where a session would expire in eXist-db after a given point in time, but where Orbeon retains a session token and 'thinks' it is still logged on. This may or may not be at the heart of what I see in the logging:</p> <pre><code>2016...
3
2,246
How to avoid ListView put rows with TextView transparent
<p>I'm developing a Chat App, so I create a list of friends. </p> <p>Take a look at my ListView declaration at layout.xml</p> <pre><code>&lt;ListView android:listSelector="@android:color/transparent" android:id="@+id/usersList" android:layout_width="match_parent" android:layout_height...
3
3,568
Keeping model while navigation using angularjs
<p>I just started to learn angularjs and I have a question:</p> <p>I am trying to create a view with a table of entities with an update button. When the Upadte button is pressed I want to navigate to another view to edit the entity.</p> <p>In my main page I used this to load my different view into:</p> <pre><code>&l...
3
1,160
A Bash script to set up Github projects
<p>I am using Nitrous.io for some basic dev, the code is managed with git. I would like to use a script to set up the git projects on my dev machines (several between Nitrous, work and home). [Edit: Git repo has two rails projects underneath, could have more]</p> <p>I have the following:</p> <pre><code>#!/bin/bash c...
3
2,323
algorithm to generate shapes
<p>I need to be able to generate shapes based on multiple circles. So for example: If I want to put 8 circles around a square, how to calculate the size of the square that is going to touch each surrounding circles. Same issue for a circle or ellipse.</p> <p>I try to add some image in ascii format, not sure it is clea...
3
3,029
Why is the recursive insertion method of the BST not working
<p>I wrote the following code to implement the recursive insert method for the BST. But when I print the tree in walk over order it prints the original tree before insertion. It seems as if the element was not inserted. Please help me out. Thanks in advance. Also please suggest the change in code. By the way, the intia...
3
1,531
Powershell - Add New Data to XML
<p>I have a part of the script that calls an API for the attributes of the host. If API fails, it checks if there is text file containing the attributes (from a previous run). If the file does not exist, I need to add UNKNOWN to the attributes node. See the expected out come in the XML below. The XML will start of with...
3
1,354
Why is the map not shown on pygame display?
<p>Why doesn't my map appear on my pygame display? I have used the number system for a map but still no result.</p> <h3 id="code-n9us">Code</h3> <p>Don't need to read the notes, they are for myself:</p> <pre class="lang-py prettyprint-override"><code>import sys import pygame from pygame.locals import * clock = pygame....
3
2,274
return multiple output from option 1 , how to store it at main function and use it for option 3
<p>How can I store the result of getYearOfBirth ,option 1 and 2 to main function and use it for option 3 where to print those result as receipt.</p> <p>What problem i have found is:</p> <p>1) if I put , for example : </p> <pre><code>int y; y=getYearOfBirth </code></pre> <p>when I run until the function where user c...
3
3,112
Creating list of Polygons from a text file in Haskell
<p>I have read a file of numbers and created a list of numbers from it, now I would like to create a list of Polygons based on the numbers in the list as they have a specific layout/pattern. </p> <pre><code>type Point = (Double, Double) data Polygon = Polygon { v :: Int , y :: Int ...
3
1,154
"Default" validation group not transformed into group sequence in embedded entity
<p>I have the following form type:</p> <pre><code>class ProjectStep1Type extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder-&gt;add('client', new ClientType(), [ 'label' =&gt; 'Client', ]); // More fields // S...
3
1,736
React Mobile navigation doesn't collapse after click
<p>I have a mobile navigation bar that appears at a certain breakpoint. If the button MENU is clicked, the menu appears and the button changes to CLOSE. Then clicking on CLOSE collapses the menu and the button is back to MENU. However when I click on the navigation routes the menu stays open. How do I add a conditional...
3
1,532
Completely remove empty array from multidimensional array
<p>Let's say I have the following array:</p> <pre><code>Array ( [Particulier] =&gt; Array ( [Weekend] =&gt; Array ( [2015] =&gt; Array ( [01] =&gt; Array ( ...
3
1,551
I want to edit the datagridview to Update Dataset directly to DB,but always failed
<p>My Problem as follows;</p> <p>Last row of <code>datagridview</code> is always Focused, so when I click the <code>btnSave</code> of <code>toolStripButton</code>, I can not save the last row data to the database. How should I solve this problem? I know if I use the Button Control, I can solve this problem. But I want...
3
1,221
Token errors using msgraph-sdk-javascript with office-js-helpers authenticator
<p>I have an Outlook add-ins using React + TypeScript, debugging locally with Node.js. I'm using the office-js-helpers library to authenticate and the msgraph-sdk-javascript Graph client library. As a POC I'm simply trying to verify that I can successfully call Graph, by retrieving details of the current email by its...
3
2,377
How can I use a Lambda/Action/Delegate in my code?
<p>I have to demonstrate a use of Lambdas/Actions/Delegates within my program for my A-Level to make it more complex. I know how to make them all and (kind of) what they do, but not when to use them.</p> <p>Can anybody let me know where in my code I can use one, two or all of these? I wasn't sure if this was the right...
3
3,389
undefined method `gmaps4rails' for... when using gmaps4rails gem Rails 3 postgres local
<p>I'm attempting to implement google mapping with the gmaps4rails gem. I've followed the tutorial on github here</p> <p><a href="https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/README.rdoc" rel="nofollow noreferrer">https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/README.rdoc</a></...
3
3,681
Cannot format data to make boxplot with ggplot2
<p>I am attempting to make a boxplot on RStudio with the variables 'Control' and 'Experimental', but each control needs to have 2 subsets of data ('Day' and 'Night'). So essentially I want 4 separate box-and-whisker plots on one plot (if that makes any sense at all?). </p> <p>I have two separate data frames with the h...
3
3,109
How to add a different icon in slidemenu listview
<p>I am using slidemenu example from github and it's showing slide menu only with text and header but I need to add different icon with it. I am trying to use a custom adapter but it's not working...</p> <p>slidemenu.java:</p> <pre><code>public class SlideMenu implements SlideMenuAnimationContainer.Listener { pu...
3
2,628
MySQL end SUBSTRING with sentence
<p>Here is my example. When I run this query:</p> <pre><code>SELECT SUBSTRING('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vitae odio tellus, sit amet facilisis neque. Cras sapien nulla, suscipit non imperdiet ac, aliquet vitae lectus. Nulla a varius dolor. Nunc convallis, augue et fermentum volutpa...
3
1,175
How to make the annoying 1px border that appears between the table border and table background and lets the page background show through disappear?
<p>A 1px "border" appears inside the border that is basically the page background showing even though there is a set background color for the table. It appears basically right next to the border.</p> <p>I have tried increasing the width of the border hoping it would cover it.</p> <p>Here is what it looks like on my e...
3
4,614
How to solve a runaway multi-line "" string error?
<p>So im trying to follow a Pentest partners post (<a href="https://www.pentestpartners.com/security-blog/git-extraction-abusing-version-control-systems/" rel="nofollow noreferrer">https://www.pentestpartners.com/security-blog/git-extraction-abusing-version-control-systems/</a>) in order extract metadata from a open gi...
3
2,163
TYPO3 9.5 URL Routes
<p>I have an old real_url.conf (from RealURL TYPO3 7.6). Now I have updated the system to TYPO3 9.5 and I need again the speaking URLs for my extension.</p> <p>Unfortunately, I don't have that yet, that's why I ask for advice here.</p> <pre><code>'postVarSets' =&gt; array( '_DEFAULT' =&gt; array ( ...
3
1,197
Trying to access listview item in another form
<p>This is my Form1. Here I have a listview collection called ListViewSelectedItems to access my listview1 items in another form.</p> <pre><code>using System; using System.Windows.Forms; using System.Data.SqlClient; using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace sundayschoolproject { ...
3
1,542
Character replacement encoding php
<p>I have a string that I want to replace all 'a' characters to the greek 'α' character. I don't want to convert the html elements inside the string ie <code>&lt;a href="http://a-url-with-a-characters"&gt;text&lt;/a&gt;</code>.</p> <p>The function:</p> <pre><code>function grstrletter($string){ $skip = false; ...
3
1,172
can't install gems with Bundler
<p>Im trying to install <a href="http://wpscan.org/" rel="nofollow">wpscan</a> I have macbook pro 10.9.2 Im running mavericks osx. </p> <p>I followed the instruction:</p> <pre><code>git clone https://github.com/wpscanteam/wpscan.git cd wpscan </code></pre> <p>and then I'm trying to </p> <pre><code>sudo gem install...
3
1,514
Having issues finding the bug with implementing Conway's Game of Life. Below is the source code
<p>The rules of Conway's Game of life is each cell on a grid has two states: living or dead. 1. If a living cell has fewer than 2 or more than 3 neighbors, the cell dies. 2.If a living cell has 2 or 3 neighbors, it lives on. 3.If a dead cell has exactly 3 neighbors, it is born in the next generation.</p> <p>I first cre...
3
1,425
Removing a specific element from array through user input
<p>I am a bit new to arrays and I'm wondering how I can ask a user to input which movie they want to remove from the list of available movies and then how to return a new list that bumps each other movie up one spot. I've watched a bunch of videos but I can't figure it out.. :( It will ask me to enter my username, then...
3
1,908
0xC0000005: Access violation reading location 0x0000000000000018 at cudaEventDestroy()
<p>When I am running a CUDA program, I met &quot;0xC0000005: Access violation reading location 0x0000000000000018.&quot; at cudaEventDestroy().</p> <p><strong>It is confusing because this exception sometimes appears and sometimes not</strong> (if not, the program runs normally without any error).</p> <p><code>start</co...
3
6,634
Webpack won't compile if i use the dynamic import function
<p>I have a function that looks like this:</p> <pre><code>async importer ( path ) { const maxAttempts = 4; let p = Promise.reject(); const rejectDelay = reason =&gt; { return new Promise((resolve, reject) =&gt; { setTimeout(reject.bind(null, reason), 1000); }); }; ...
3
2,175
DatabaseException on using getUid() function in Firebase Authentication
<p>I am trying to get the id of the logged in user and use it in two fragments. In the fragment I am using first, id gets retrieved and stored in my global variable properly but when I access the other fragment after that, my app crashes saying that getUid() is generating a null pointer exception in the other activity....
3
1,297
c++11 : generic type push via a std::function<T(const U&)>
<p>I am trying to build a generic push component.</p> <p>I have a class <code>store&lt;T&gt;</code> which </p> <ul> <li>has a T t; member</li> <li>has a <code>void push(const T &amp; t)</code> method called by data providers.</li> </ul> <p>When push is called by a provider, I want a value computed by a <code>std::fu...
3
1,464
Android Style Drag Resizable Menu
<p>Fiddle (Along with snippet at bottom of post): <a href="http://jsfiddle.net/6pp0Lg6v/8/" rel="nofollow noreferrer">http://jsfiddle.net/6pp0Lg6v/8/</a></p> <p>On iOS you can drag to reveal a menu from the top to view your notifications. You can do the same on Android as well. </p> <p>I'm working on a web designer w...
3
2,000
Home page does not display correctly in firefox 14.0.1
<p>For some reason my web page is not display correctly in Firefox version 14.0.1. It is displayed correctly in IE9, Safari, chrome. A friend of mine also said he experienced the same as me.</p> <p>In Firefox if I zoom out or in the layout changes. But then the YouTube video begins to smear and pixelate. I asked a fr...
3
1,038
How to get object value from another component in vue script?
<p>I have 2 vue component in my PHP file: application and vn component. I want to get {{obj.vacancies_left}} from vn component and call it in application component. How should I do it? I keep getting undefined variable. I tried getting it by getElementById but it shows me undefined variable.</p> <p>application vue comp...
3
1,108
Add static method to current custom class
<p>I have custom progress bar (is a progress bar with text)</p> <p>Custom progressbar code:</p> <pre><code>public enum ProgressBarDisplayText { Percentage, CustomText } public class CustomProgressBar : ProgressBar { [DllImportAttribute(&quot;uxtheme.dll&quot;)] private...
3
1,564
Using a icon aside a text
<p><img src="https://i.stack.imgur.com/Yc7yi.png" alt="enter image description here"></p> <p>I'm trying to put this icons aside the texts, but i dont know how.</p> <p>This is the HTML:</p> <pre><code> &lt;section class="info"&gt; &lt;div class="container"&gt; &lt;div class="row"&gt; ...
3
1,303
make errors occur while using MXE CMake for compiling an SDL program
<p>Calling <code>i686-w64-mingw32.static-cmake CMakeLists.txt</code> and then <code>make</code> works with programs that do not use any external libaries, however while trying to cross compile a SDL program for windows the following errors occur.</p> <p>CMake log.</p> <pre><code>== Using MXE wrapper: /home/tp/ext-git/m...
3
2,826
MPI C++ Runtime Error: signal 11 (Segmentation fault) with multi-dimensional array creation
<h1>Making Mandelbrot with MPI</h1> <p>So I've made a Mandelbrot generator and everything worked fine. Now I'm throwing in a speedup from MPI. Process 0 generates a file name <code>mbrot.ppm</code> and adds the appropriate metadata, then divides up the workload into chunks.</p> <p>Each process receives the chunk's star...
3
2,258
How to reset the getters and setters of a constructor
<p>in my recent uni work ive been given a task which i believe is to reassign values that have been set by getters and setters. The exact question is " Edit the product’s main information that shares among all class such as ID, Description, etc"</p> <p>My attempt at this question is as followed. </p> <pre><code> pu...
3
1,339
You may need an appropriate loader to handle this file type - React and Webpack
<p>Even though I have already added the babel loader no matter what It just doesnt read JSX syntax. Please any help will be much appreciated! I already id run npm install on both the present-env as well as preset-react.</p> <p>Webpack.config.js </p> <p>I have used the webpack config given by Spring documentation with...
3
1,455
Dynamic Pivot Table across multiple columns
<p>I'm a fairly new to SQL and could use some help. I have a table of time sheet data with a separate time sheet on each row. Each time sheet has a column with jobcode1 to jobcode16 that stores a string indicating a job code. Each of those has a corresponding TotalJob1 to TotalJob16.</p> <p>I've managed to create a pi...
3
1,263
Jumbled, but not random
<p>SOLVED <a href="https://stackoverflow.com/questions/45746928/backtracking-algorithm-to-create-a-jumbled-but-not-random-array">here</a></p> <p>UPDATE.</p> <p>I have made some progress with this - see code. My backtracking algorithm only works every time if the size of my shuffled input array is larger than my outpu...
3
2,165
SVG animation using javascript not working in firefox
<p>I'm struggling with something that should be easy, let me explain :</p> <ul> <li>I have a SVG using the animateTransform tag I use JavaScript to change the form attribut </li> <li>then I use the beginElement()</li> </ul> <p>The SVG</p> <pre><code>&lt;svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlin...
3
1,274
AVCodecContex returns zero for width and height in android
<p>Not sure what was my mistake in the below code. I m trying with ffmpeg 0.11 and SDL2.0 in android. </p> <p>QUESTION: <strong>Why Width and Height of the CodecContext gives me always zero ?..</strong> </p> <pre><code>int main(int argc, char *argv[]) { int flags; flags = SDL_INIT_VIDEO | SDL_INIT_TIMER; ...
3
1,098
hashing a streaming file before uploading to S3
<p>I am trying to stream a file to S3 without storing the file to disk/ssd. I would like to have part of the hash of the file as a part of the filename when uploading to S3.</p> <p>EDIT_v1:<br /> Been trying to follow this post using <code>busboy</code> as the parser: <a href="https://stackoverflow.com/questions/308408...
3
1,447
Age group categorization
<p>I have dataframe, in that I have age column.I want to apply user defined function, so it arrange age in bins. I have following function trying to apply over columns but i am getting error. Name of the column is 'age'</p> <pre><code>def ageGroup(x): if (data_drop_row['age'] &gt; 0) &amp; (data_drop_row['age'] &l...
3
1,293
how to update listview on backpressed in nested fragment?
<p>This is my Fragment where I have a list view and I am populating it with ChapterListAdapter.</p> <p><strong>Curriculum Fragment</strong></p> <pre><code> public class CurriculumFragment extends Fragment implements ResponseDelegate { Context contextd; ListView curriculumList; FragmentActi...
3
1,726
How to check if jQuery properties have been set in JavaScript and PHP?
<p>Before I being, let me clarify I am a newbie to jQuery and JavaScript. I'm sorry if the answer is obvious Okay, I am trying to create a page where the user can select dates and times, and want to use JavaScript and PHP to make sure the user is not returning a blank field (like no date or time set and clicks submit)...
3
1,819
android ClassNotFoundException: com.sun.msv.datatype.xsd.XSDatatype
<p>I have an app which use Apache POI. The Build is successfully but when I run the code there is an error (I use Android Studio 2.1) :</p> <pre><code>Execution failed for task ':app:transformClassesWithInstantRunForDebug'. java.lang.ClassNotFoundException: com.sun.msv.datatype.xsd.XSDatatype </code></pre> <p>Here i...
3
1,026
AngularJS Bootstrap UI datepicker issues
<p>My datepicker is not working properly.</p> <p>HTML</p> <pre><code>&lt;div datepicker-config class="datepicker input-group"&gt; {{ dateOffer }} &lt;input type="text" class="form-control" datepicker-popup="{{ format }}" name="dateOffer" ng-model="dateOffer" is-open="opened" min-date="minDate" datepicker-opti...
3
2,089
How to reuse the variable used for for loop first level inside for loop second level in nested for loop
<p>Someone can tell me how can I reuse rootOpt object inside of my forEach. Is there any way to reuse this variable? I have the following message "Can not resolve symbol rootOpt" when I write rootOpt.getChildOptions() inside my forEach. Please find below what I did: I have tried to rewrite the for loop below by using s...
3
1,604
scrollview covers up image view
<p>I am trying to make a layout in which there are two main layouts. One is an imageview and the second one is a scrollview. What I want is that the imageview is always kept on top of the scrollview. When I run the program the image goes back to the scrollview.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&...
3
10,788
Twisted SSL socket connection slowdown
<p>How do I scale my Twisted server to handle tens of thousands of concurrent SSL socket connections?</p> <p>The first few hundred clients are connected relatively quickly, but as the count approaches 3000, it begins to crawl at about 2 connections made per second.</p> <p>I am load testing using the loop below:</p> ...
3
1,481
Convert Image uri into Base64
<p>I use below code to upload a Image with camera &amp; gallery. I would like to encode it to Base64 to save offline.I can't see method, how to modify my code to convert Image uri in Base64.</p> <pre><code>import PhotoUpload from 'react-native-photo-upload' const [ image, setImage ] = useState( false ) //const [agree,...
3
1,196
Ballerina Oauth2 authenticated endpoint returning a 406
<p>I am trying to call a 3rd party service that uses Oauth2 Password Credentials to get an authentication token. Ballerina is returning the following messages. </p> <pre class="lang-sh prettyprint-override"><code>2020-04-23 15:07:35,414 ERROR [ballerina/oauth2] - Received an invalid response with status-code: 406; and...
3
1,698
How to determine if any element in a collection appears in a string with LINQ?
<p>I have <code>Dictionary&lt;string, List&lt;string&gt;&gt;</code> object. The <code>Key</code> represents the name of a file and the <code>Value</code> is a <code>List&lt;string&gt;</code> which represents the names of certain methods in the file.</p> <p>I loop over the dictionary and use the <code>Key</code> to rea...
3
1,218
Send daily emails with Springboot - JHipster
<p>I want to send daily emails to all the users of my database. I use Springboot and JHipster in the back-end.</p> <p>In the rest controller, I have a GET request (which was automatically created by JHipster) :</p> <pre><code>/** * GET /users : get all users. * * @param pageable the pagination information * @re...
3
1,869
Remove link in supersub category PHP Mysql
<p>I have a problem with active link that i've created. I want to make the Sub Category doesn't have any link, only the supersub have link for each supersub category. </p> <p>The example like: 1. painting (category), 1.1 HOBE (sub category), 1.1.1 Sealer, 1.1.2 Wall Paint (supersub category)</p> <p>The table contain:...
3
1,070
Fixing a mysql function
<p>I'm trying to make a mysql function .but it's not working and following is the error:</p> <blockquote> <p>Error code 1064, SQL state 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=(co,co1,co2,co3,co4,co5,co6,co7,...
3
1,646
Getting error in Nodemailer if recipient email is wrong
<p>I am sending an email With Nodemailer SMTP</p> <p>Its working fine if email account is valid / existing, But getting an 500 error when entering email address whic is not exist.</p> <p>I know it is not sending because email not exist but need to handle errors</p> <p>I have also tried <code>tls: {rejectUnauthorized...
3
2,227
Html ActionLink run time error: 'Value cannot be null or empty. but value is not null or empty
<p>I am trying to use an <code>@Html.ActionLink</code> for a clickable link in my view, however I get a run time exception:</p> <blockquote> <p>System.ArgumentException: 'Value cannot be null or empty. Parameter name: linkText</p> </blockquote> <p>The first param of <code>Html.ActionLink</code> is <code>linkText<...
3
2,276
Improper sizing using GridBagLayout
<p>I am trying to use a GridBagLayout to have a JFrame that contains a JPanel that has a grid layout and a JPanel with just a large button. I want the rows to all be the same size, and the JPanel with the JButton to be the same size as one row. However, the button panel, which is currently empty, is about 1/3 of the ...
3
1,333