title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
remove/subset or select columns based on a part of the header name | <p>I have a dataframe of 15000 obs. of 45 variables, with a similar structure/mode/class as the example input dataframe given below.</p>
<p>What I would like to do is select the "Date" column + columns containing "_MIN" as part of the header and put them into a new df. & select the "Date" column + columns containi... | 2 | 1,082 |
Mysql encrypt sometimes returns null | <p>Why the first and last command line returns null??</p>
<pre><code>$ mysql -u root -ppass -Bse "SELECT ENCRYPT('p@ssW0rd', 'ñsñsñsñ');"
NULL
$ mysql -u root -ppass -Bse "SELECT ENCRYPT('p@ssW0rd', 'dafdadsfe');"
dac0rB9hTC86M
$ mysql -u root -ppass -Bse "SELECT ENCRYPT('p@ssW0rd', 'dafdadsfeñññ');"
dac0rB9hTC86M
$ m... | 2 | 1,033 |
Matplotlib Figuresize being ignored by rcParams | <p>I have previously used the following to ensure my figure-size in my plots is a consistent size:</p>
<pre><code>import matplotlib as mpl
rc_fonts = {'figure.figsize': (15, 9.3)}
mpl.rcParams.update(rc_fonts)
import matplotlib.pylab as plt
</code></pre>
<p>However, I am now finding that for my usual default values <... | 2 | 1,241 |
How do I print out just certain elements from a text file that has xml tags to a new text file? | <p>I need help with something that sounds easy but has given me some trouble.</p>
<p>I have a text file (record.txt) that has a root element 'PatientRecord' and sub tags in it ('first name', 'age', blood type, address etc...) that repeat over and over but with different values since it's a record for each person. I'm ... | 2 | 1,587 |
THEAD is overlapping with page contents on Print page headers | <p>I design a table and planning to use the thead as page headers if multiple pages there with table.
On top of the table there are some more DIV's with some additional info is also present and while printing on second page the table content is overlapped with the table header</p>
<p>My html is like below</p>
<pre><co... | 2 | 1,400 |
Manipulator Factory | <p><strong>EDIT4 Gave Truck a property to show the SetNrOfWheels method is tailored to a specific Truck</strong></p>
<p><strong>EDIT3 Made a connection between B - Vehicle and C1 - Truck</strong></p>
<p><strong>EDIT2 Removed interface on B</strong></p>
<p><strong>EDIT1 Changed Car into Vehicle</strong></p>
<p>I hav... | 2 | 1,306 |
Select top n percent by year | <p>I have a query that I built that brings back net sales YTD up to the most recently completed month. The query unions totals from invoices and credit memos. It works great. I use the query in another tool that sums by cardcode and allows me to do interesting pivots and so forth. Here is that query:</p>
<pre><code>se... | 2 | 3,499 |
Is it possible that packet captured by tcpdump, but lost in tcp kernel? | <pre><code> 1 10:59:11.303358 IP CCC > SSS: S 2325818282:2325818282(0) win 14600 <mss 1460,sackOK,timestamp 2358537033 0,nop,wscale 7>
2 10:59:11.304131 IP SSS > CCC: S 3397574260:3397574260(0) ack 2325818283 win 14440 <mss 1456,sackOK,timestamp 994572340 2358537033,nop,wscale 9>
3 10:59:11.30518... | 2 | 2,260 |
MonoTouch BackgroundWorker calling a textview not working | <p>This code its not working </p>
<pre><code>btnUpload.TouchDown += delegate
{
BackgroundWorker bw = new BackgroundWorker();
bw.DoWork += delegate(object sender, DoWorkEventArgs e) {
DoUpload();
};
bw.Run... | 2 | 2,094 |
Java Swing textfield issue | <p>I created a GUI using Netbeans which took asked the user to input the content in <code>textfields</code> and <code>textareas</code>. When I'm trying to use it in other classes, the text entered in the <code>textfield</code> does not appear when i use <code>getText</code> method on it. Rather in its place, the text w... | 2 | 4,651 |
Passenger error Could not find rake-11.3.0 in any of the sources (Bundler::GemNotFound) on Bluehost shared hosting | <p>I have to use bluehost shared hosting for some reason. I upgraded ruby to version 2.1.1 and Rails to version 4.2.2 (Following this article <a href="http://www.haydonryan.com/installing-ruby-2-1-1p76-and-rails-4-0-4-on-bluehost/" rel="nofollow noreferrer">http://www.haydonryan.com/installing-ruby-2-1-1p76-and-rails-4... | 2 | 1,681 |
Azure Terraform for private DNS and vnet links | <p>I am trying to create code to make creating azure private DNS zones and virtual network links. I am attempting to try to create a 2 variables, 1 with a list of private DNS zones and the other a list of our virtual network resource IDs. I can successfully run the code but my issue is that if I go to add any virtual n... | 2 | 1,542 |
Error when I try to map(persist) my database | <p>I'am trying to map my database(jira database) using JPA/Hibernate.
but an error occure when I do that!!(I have tried the same configuration on another database and it's worked)
My cofiguration files:</p>
<p><strong>persistence.xml:</strong></p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<persistenc... | 2 | 8,541 |
django add custom logger to celery logging | <p>I added a custom logging handler to my django app that writes log entries to a database. </p>
<pre><code>class DbLogHandler(logging.Handler): # Inherit from logging.Handler
def __init__(self):
# run the regular Handler __init__
logging.Handler.__init__(self)
self.entries = []
log... | 2 | 3,197 |
Kendo grid pagination into custom wrapper | <p>It is my kendo grid and i need to wrap pagination buttons into my custom wrapper, named </p>
<pre><code>var grid = $("#taskTableKendo").kendoGrid({
dataSource: tasksData,
sortable: true,
scrollable: false,
autoBind: false,
pageable: {
refresh: true,
... | 2 | 1,357 |
fullcalendar displaying event in the wrong day in month view of current month | <p><a href="https://i.stack.imgur.com/v8Faj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v8Faj.png" alt="enter image description here"></a></p>
<p>I'm having an issue with my fullcalendar plug-in. I'm currently trying to display events in the monthview of the calendar. When i'm in the current mon... | 2 | 2,165 |
Getting null value in property list from yaml in spring boot | <p>I'm working on a service and trying to read a property from a yaml file.
I'm Getting a null in some on thems even if the value is set.
This are the properties in yaml file:</p>
<pre><code>property-combos:
status:
- codigo: ATIVA
descricao: teste 1
- codigo: CONCLUIDA
descricao: teste 2
- co... | 2 | 1,040 |
How to encode specific metadata version in FFMPEG? | <p>I am batch converting lots of songs into shorter "Advert" songs for SHOUTcast and to be recognised as adverts by the server. The song must have <code>":Advert"</code> for both the title and the artist metadata tags. When I use the following command:</p>
<pre><code>ffmpeg -i "$i" -c copy -vn -map_metadata -1 -metada... | 2 | 1,228 |
Can't connect to MySQL database when running "python manage.py runserver" | <p>After entering the following: </p>
<p>(djangoEnv) manwe:djangofriends scott$ python manage.py runserver</p>
<p>I get the following traceback error:</p>
<p>Performing system checks...</p>
<pre><code>Unhandled exception in thread started by <function wrapper at 0x10ac12ed8>
Traceback (most recent call last):... | 2 | 2,493 |
injecting properties to different instances of same class (Spring Framework) | <p>"Do mark it duplicate if required but please leave a solution link in the comments."<br/>
I have a class "Assignment22.Player.java" of which I have to create 5 instances and inject properties to them. I can inject properties to the instances by hard coding them in the XML file itself. But I want to do that in such a... | 2 | 1,208 |
python- concatenate and append a pandas dataframe in a for loop | <p>I am sorry I didnt really know how to word the title of this question.
I do not work with Python too often and I am just starting to work with the pandas and numpy packages.</p>
<p><strong>I am getting unexpected results when trying to concatenate and append a pandas dataframe in a for loop.</strong> </p>
<p>I hav... | 2 | 1,768 |
didUpdateValueForCharacteristic do not call in BLE system, swift 3 | <p>I don´t understande why <code>didUpdateValueForCharacteristic</code> do not call when i write in BLE.</p>
<p>My class is</p>
<pre><code>class MachineShopping: UIViewController, BluetoothDelegate, CBCentralManagerDelegate {
fileprivate let bluetoothManager = BluetoothManager.getInstance()
fileprivate var s... | 2 | 1,351 |
Following Rails Tutorial and a syntax error is stopping a test passing | <p>Unfortunately I am receiving a syntax error that is hiding for me. Could anyone help? I understand it is relevant to the method 'assert_select' for the divs, but I am not sure why it is not passing.</p>
<p>My error: </p>
<pre><code>Error:
UsersSignupTest#test_invalid_signup_information:
Nokogiri::CSS::SyntaxError:... | 2 | 1,316 |
When testing a method, can you mock variables on singletons which that method refers to? | <p>I've got a method that I'd like to test with JUnit/Mockito.</p>
<p>The method takes in one Integer, <code>numberOfRowsThatTheUserWants</code>.</p>
<p>The method then compares that value, against another value <code>totalNumberOfRowsInDB</code> and will return the requested number of rows(randomly picked). If the u... | 2 | 1,026 |
How to get data with referenced object in Spring data mongo? | <p>This is <code>City</code> document class which i used.</p>
<pre><code>@Document("city")
public class City {
@Id
private String id;
@Indexed(unique = true)
private String name;
@DBRef(lazy = true)
private District district;
public City() {
}
public City(String id) {
this... | 2 | 1,432 |
How Read and write public file into Amazon S3? | <p>I'm trying to write and download the file to Amazon S3. The file is loaded but I can not get it back:</p>
<pre><code>public function putFile()
{
$url = 'https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/p720x720/12631558_953568381347717_3978737099026165391_n.jpg?oh=9e14f5ea6f8e3a3fc8ffa07095d4c76... | 2 | 1,466 |
Customize datepicker CSS to cross out disabled dates | <p>I have a <code>datepicker</code>, whose CSS I have customized according to my needs. I want to put a cross (X) over the disabled dates.</p>
<p><strong>HTML</strong></p>
<pre><code><input type="text" id="txtFromDate" />
</code></pre>
<p><strong>JS</strong></p>
<pre><code>$(document).ready(function(){
$("#... | 2 | 1,443 |
Formik component not being rendered with react-tabs | <p>I'm trying to use <a href="https://www.npmjs.com/package/react-tabs" rel="nofollow noreferrer">react-tabs</a> with <a href="https://www.npmjs.com/package/formik" rel="nofollow noreferrer">Formik</a> but everytime i put the <code><Formik></code> tag, nothing gets rendered. This is what i'm trying to do:</p>
<p... | 2 | 1,287 |
Unity3D Installation In Windows 7 Ultimate | <p>I've installed latest version of unity in my windows 7 Ultimate desktop.</p>
<p>But while I'm launching the application it shows a warning as below</p>
<p><img src="https://i.stack.imgur.com/fl73F.png" alt="enter image description here"></p>
<p>then shows an Error saying "<em>fatal error! failed to initialize uni... | 2 | 1,888 |
How to do strict LocalDate parsing in js-joda? | <p>I'm trying to parse a <a href="https://doc.esdoc.org/github.com/js-joda/js-joda/class/src/LocalDate.js~LocalDate.html" rel="nofollow"><code>LocalDate</code></a> from a <code>String</code> using strict resolution in <a href="http://js-joda.github.io/js-joda/" rel="nofollow"><code>js-joda</code></a> (version 1.1.1). I... | 2 | 1,412 |
How to check if an item already exists in a Room Database? | <p>I have this adapter with a button that dependent on if a object already exists in my Room Database or not will have a differente behavior when it´s clicked. Basically what I want to do is if the object exists I want to remove it. In case it doesn´t I want to add it to my database. I created this method in Dao and ... | 2 | 2,276 |
LINQ Performance: For vs. LINQ difference gone in C# 6? | <p><strong>Edit:</strong> Per DavidG's suggestion, I boosted the number of items by 100x. I reran the comparison in release mode and updated the results below. I've also updated the code in case anyone is just copying and pasting and running it locally.</p>
<hr>
<p>So I've seen a lot of posts on SO about LINQ vs. <... | 2 | 2,234 |
Add multiple upload files and clear the text in browse input | <p>I have customize the design upload file input so that it looks same in all browsers.
Now I want to add 10 more upload file inputs one by one by clicking on add another file link.
These 10 upload files should look same in design as the customized upload file input. </p>
<p>I also want to have a clear link so that if... | 2 | 1,909 |
PHP Session variable not saving (though some are) | <p>I have been unable to figure out this problem - it just doesn't make any sense.</p>
<p>The server is PHP 5.2.6 running on Windows NT PDP-IIS 5.2 build 3790.</p>
<p>First I have confirmed sessions ARE working via this test script:</p>
<pre><code><?php
session_start();
if (!isset($_SESSION['counter'])) $_SESSI... | 2 | 1,364 |
Failed login with authentification with Python's Requests, even within a session | <p>Following the very nice explanations on <a href="https://brennan.io/2016/03/02/logging-in-with-requests/" rel="nofollow noreferrer">this blog post about "Logging in With Requests"</a> and the code snippet from <a href="https://stackoverflow.com/a/17633072/111362">this answer to a question on SO about 'How to “log in... | 2 | 1,561 |
Php Code showing Following error in the webpage | <p>am using joomla .. ,
by runnig the joomla it showing the following error in the link part
and the main error is about the parameter is expecting to a reference.
if i change it , it will not show any links</p>
<blockquote>
<p>Warning: Parameter 2 to modChrome_artblock() expected to be a
reference, value given... | 2 | 2,366 |
Stackoverflow error in JSF 2 on WebLogic 12c | <p>I'm working on an application that is a mix of legacy JSP servlet code and newer JSF code. I am encountering a StackOverlow error that I can't solve. Has anyone seen or experienced anything similar and can help point me in the right direction on this type of hybrid JSP/JSF application?</p>
<p>I'm pretty sure that t... | 2 | 3,907 |
JQuery mobile select menu not working properly | <p>I'm working on a Ruby and Sinatra project, and for a particular page I'm using jQuery mobile to create a mobile version of the page. I'm using knockout.js in the project as well.</p>
<p>I have a select box which appears correctly but when I make a selection, its text doesn't change though the value changes.</p>
<p... | 2 | 1,063 |
Connecting to an Azure Redis Cluster using node.js ioredis not working | <p>I've been trying to connect to a Redis three node cluster in Azure using <a href="https://github.com/luin/ioredis" rel="nofollow noreferrer">ioredis</a>.</p>
<p>When I connect using the Redis.Cluster constructor:</p>
<pre><code>new Redis.Cluster(['host.redis.cache.windows.net', 6380], {
scaleReads: 'all',
... | 2 | 1,690 |
What is the best way to extract embedded flash file from a PDF using the PDFBox parser? | <p>I've been working around PDF parsing since late last week. Managed to find the Apache PDFBox library for Java and I already got to extract text separated by page, URLs, images and PDF Metadata that I needed for the project I'm developing. Now I'm missing a way to extract embedded flash videos from a PDF.</p>
<p>I'm... | 2 | 2,912 |
iOS 11 Core Bluetooth restoration not working | <p>I have an iOS app that uses Core Bluetooth to connect to a V.BTTN smart button. Everything worked perfectly fine in iOS 10, but since iOS 11 has come out the restoration process seems to break.</p>
<p>When I launch my app, with a previously paired button, the OS does in fact call the <code>centralManager:willRestor... | 2 | 4,374 |
android permission issue : apk not being accepted | <p>I am submitting a new version of my app. But the developer console doesn't allow me to do so. It says that my app is not compliant with the new policies for the permission (ask for permission at runtime). </p>
<p>But as I can see, I don't use any dangerous permission...</p>
<p>My app is using the following permiss... | 2 | 3,151 |
VBA get values from 2 workbooks where value matches? | <p><strong>Scenario</strong></p>
<p>I have three workbooks</p>
<pre><code>Master
Planner
Phonebook
</code></pre>
<p>In my master workbook, i have a value in cell I8 on sheet 1.</p>
<p>Master (Sheet 1)</p>
<pre><code>I8 = 2
</code></pre>
<p>On sheet 2 i have the following empty columns:</p>
<p>Master (Sheet 2)</p... | 2 | 3,344 |
Make bootstrap navbar become a dropdown on small screen | <p>I am using a bootstrap navbar and I would like it to become a navbar with navbar-brand on left and dropdown with list items on right when it is displayed on a small screen. Right now I have a pretty good working navbar, but when it is resized to a very small size there is no dropdown on right and list items just dis... | 2 | 1,720 |
How can I exclude empty folders with Asciidoctor maven plugin | <p>I use Asciidoctor Maven Plugin for generating HTML from adoc. Unfortunately it copies every source directory from the directory specified in <code>sourceDirectory</code>. How can I exclude these empty folders?</p>
<pre><code><plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asc... | 2 | 1,079 |
wrong number of arguments (given 2, expected 0..1) while importing in Rails | <p>I am facing this error while trying to import the file:</p>
<pre><code>ArgumentError - wrong number of arguments (given 2, expected 0..1):
bartt-ssl_requirement (1.4.2) lib/url_for.rb:9:in `url_for_with_secure_option'
actionpack (4.2.6) lib/action_dispatch/routing/url_for.rb:156:in `url_for'
actionview (4.2.6... | 2 | 6,038 |
PHP scripts execute stops after a while with no error report | <p>i have a crawler script that run 4 bots Simultaneously,
each bot is opened in a new tab and generally does that:</p>
<p>1/ connection to db + set vars that are needed for the scraping.<br />
2/ takes a URL target from db.<br />
3/ get the content using CURL OR file_get_content.<br />
4/ set the "$html" with simple_... | 2 | 4,353 |
Run Spark on Java 10 | <p><strong>my user case</strong>: We run Spark cluster on Mesos, since our Mesos cluster is also hosting other frameworks such as Storm, Cassandra, we had incidents where Spark job over-utilizes CPU which caused resource contention with other frameworks.</p>
<p><strong>objective</strong> : run un-modularized spark ap... | 2 | 1,959 |
C2236 : unexpected token 'struct', did you forget ';' ? C2332 : 'struct' missing a tag name | <p>Having checked posts with similar errors. None of the solutions proposed helped overcoming this issue.</p>
<p>I have checked all my classes for ';' at the end of the definition.....all of them are properly defined.</p>
<p>I have checked the include headers file for header guards. All of them have guards</p>
<p>This ... | 2 | 1,784 |
Django Admin Action using intermediate page | <p>I have a model with a lot of fields. I only have a few fields I that I want to be required. So instead of the change list super long, I want to have a short change list then have admin actions that can give predefined subsets of the fields.</p>
<p>The initial action takes me to the correct page but when I submit th... | 2 | 1,321 |
406 (NotAcceptable) response from PATCH request in EntitySetController. Web API 2.1. OData | <p>I am very much puzzled and hope somebody can shed any light. After upgrading to the latest version of Web API (from Microsoft.AspNet.WebApi.xxx 5.0.0. to Microsoft.AspNet.WebApi.xxx 5.1.2) OData's EntitySetController stopped processing PATCH verbs and returns 406 (Not Acceptable) code instead. </p>
<p>The implement... | 2 | 1,945 |
JPanel not updating when using invalidate, validate and repaint | <p>I have a problem that one of my <code>JPanels</code> doesn't update itself according to the window when its supposed too. I shall try and briefly explain whats happening. A list of characters is fed into an <code>arraylist</code> (named lookReply) from another class (this works as I've tested this) it then uses <cod... | 2 | 2,002 |
Total number of pages in itext footer not showing | <p>I am generating a PDF in my application using itext. In the footer part, a phrase containing page X of Y is there. The total number of pages is not showing after PDF creation. Please refer the below code:</p>
<p>in MainActivity:</p>
<pre><code> PdfPTable table = new PdfPTable(2);
table.setSpacingAft... | 2 | 1,389 |
Reading a text file into 2 separate arrays of characters (in C) | <p>For a class I have to write a program to read in a text file in the format of:</p>
<hr>
<p>T A E D Q Q<br>
Z H P N I U<br>
C K E W D I<br>
V U X O F C<br>
B P I R G K<br>
N R T B R B<br>
EXIT<br>
THE<br>
QUICK<br>
BROWN<br>
FOX</p>
<hr>
<p>I'm trying to get the characters into an array of chars, each l... | 2 | 1,138 |
Rails odd :delete behaviour with twitter-bootstrap-rails | <p>I'm having trouble with an odd :delete method behaviour for links. I configured a devise sign_out route, which is linked in a dropdown box. When clicking that link, it leads to a route error (No route matches [GET] "/users/sign_out"). </p>
<p>The strange thing is, that when I copy that link to another position in t... | 2 | 2,351 |
jquery removeClass only if all checkboxes of the same set (with same class?) are unchecked | <h2>The problem</h2>
<p>When a checkbox is unchecked, if other checkboxes of the same set (with same class?) are checked, the class shouldn't be removed.
Please notice there are several sets of checkboxes.</p>
<h2>(Partially) working fiddle</h2>
<p><a href="http://jsfiddle.net/mirluin/3MpYw/1/" rel="nofollow">http:/... | 2 | 1,918 |
How to Write a SQL Query to Display list of most used tags in the last 30 days in Wordpress website | <p>I am looking for a way to display the most used tags over the last 30 days on my Baseball blog, built on Wordpress. I am no coder, but I have come up with this mashup to display a list of the most used 28 tags (preference to fit my theme). I cannot, for the life of me, figure out how to limit the tags to the most us... | 2 | 1,355 |
Creating a sized image out of a string in Java | <p>I am making a 2d engine using Java based on entities. The physics and sprites are done, but I still need to be able to draw text with the <code>BaseText</code> class. For experimental purposes I am using the following code in the <code>Renderer</code> class (that handles drawing all the sprites and such):</p>
<pre>... | 2 | 1,101 |
Strange cast error in Pig/Hadoop | <p>Using Pig 0.10.1, I have the following script:</p>
<pre><code>br = LOAD 'cfs:///somefile';
SPLIT br INTO s0 IF (sp == 1), not_s0 OTHERWISE;
SPLIT not_s0 INTO s1 IF (adp >= 1.0), not_s1 OTHERWISE;
SPLIT not_s1 INTO s2 IF (p > 1L), not_s2 OTHERWISE;
SPLIT not_s2 INTO s3 IF (s > 0L), s4 OTHERWISE;
tmp0 = FO... | 2 | 2,585 |
Codeigniter View Undefined Variable Error | <p>I have a program that used to manage items in a store. Everything is working fine. Then I need to get a report referred to <code>update_stock_id</code> for issued items.</p>
<p>Tried the following code</p>
<h1>Controller</h1>
<pre><code>class Reports extends FZ_Controller
{
function __construct()
{
... | 2 | 1,402 |
Adding an event listener to a list element contained within a <ul> in a popup menu | <p>I am trying to create an extension where you are able to enter data into an input box the popup menu. This data should be saved and show up every time you launch the popup menu. You should be able to remove data from the list by clicking the element. I have been able to figure out how to store the data points but I ... | 2 | 1,274 |
javascript, about closure function call | <p>I am quite new to javascript and i have encounter problems about function call and the closure.</p>
<p>Below are the code that i tried in w3schools,</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-htm... | 2 | 1,153 |
Generating PDF from subreport | <p>I have one main report like this in jasper</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jaspe... | 2 | 5,665 |
WPF - change combobox style depending on itemtemplate | <p>I need to create a combo which will show a simple text(enum) value when its drop down is closed. but when user clicks drop down, it should show a complex data template with more information in combo box item.</p>
<p>I have created two data templates to show different information when drop down is closed or opened.<... | 2 | 2,426 |
release view controller and removing view | <p>Quick question:</p>
<p>If I use </p>
<pre><code>[someViewController.view addSubView:otherViewController.view];
</code></pre>
<p>to add a view. And then use</p>
<pre><code>[otherViewController.view removeFromSuperView]
</code></pre>
<p>to remove the view, my app will crash when I call <code>[otherViewController... | 2 | 1,972 |
Flutter pull down to refresh seems to work but it does not refresh | <p>I am a beginner in Flutter and I'm struggling with this problem for quite some time now.</p>
<p>I have made a Flutter app which fetches posts from a wordpress website. Everything works fine, except the pull to refresh. It seems to work (at least the indicator is working), but it doesn't update in the background and ... | 2 | 1,621 |
Get user groups in OpenLDAP with JAVA | <p>I don't know java that much but I need to change a code. The background here is we have the code working in LDAP which will give us the groups assigned to the user which has logged in. Now, we have to switch to OpenLDAP for some reason and here the problem arises. Here we are not able to get the groups assigned to t... | 2 | 1,056 |
Rails 6 Production Active Storage NoMethodError (undefined method `name' for nil:NilClass) | <p>I have issue when try to attach image using Active Storage
It passed on development mode, but fail in production mode.</p>
<p>Details as below:</p>
<p>Model:</p>
<pre><code>class Post < ApplicationRecord
extend FriendlyId
friendly_id :title, use: :slugged
validates :title, presence: true
... | 2 | 1,783 |
Getting an error consuming asmx web service as add service reference | <p>I have created sample web application which consumes old asmx web service(which is already hosted on network server) using add service reference. It has created endpoint, basicHttpBinding, etc. when I'm running this application in visual studio 2012 without an extra settings, its working. After I published it and ho... | 2 | 1,781 |
<p:growl/> wont show message when using PrimeFaces.MonitorDownload | <p>I am using PrimeFaces.Monitordownload function to monitor the progress of file download. First the file is created then downloaded. If anything goes wrong, a error file is created and downloaded with streamed content instead of real file. This is fine and works well. The problem occurs when I want to add a error mes... | 2 | 1,126 |
flutter_launcher_icons not working (app launcher icon broken/crashed) | <p>I'm struggling with changing App Launcher Icon using flutter_launcher_icons package, on my iPhone Simulator (iOS 14.4).</p>
<p>In my <code>pubspec.yaml</code>:</p>
<pre><code>dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.9.2
flutter_icons:
#image_path_android: "assets/icon.p... | 2 | 2,130 |
How to fix first two columns and Header of Bootstrap RWD Table | <p>I have a bootstrap table. I can freeze the second column while scroll horizontal.</p>
<p>My code:</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>.table>thead:first-c... | 2 | 4,443 |
java tcp server to many connections | <p>I wrote a simple TCP server to transfare some user Data to it and save it in an simple MySQL table. If i now run more than 2000 clients after each other it stops working. While running i get some <code>IO error java.io.EOFException</code> you may also see the misstake i made for that. But the most importand is that ... | 2 | 2,324 |
Python threading for wheel encoders on a Robot | <p>I'm writing the code for a robot which my college is entering into a competition. I'm currently trying to build some wheel encoders using reflectance sensors. I realised a while back that I would probably need to use threading to achieve this, seeing as the robot needs to monitor both the left and right encoders at ... | 2 | 1,194 |
cleaning/lemmatizing dutch dataset using spacy | <p>I am trying to lemmatize and remove stopwords from a dataset of Dutch tweets in order to perform text analysis.
The goal is to achieve the following structure:
[['this','is','a','tweet],['this','is','a','tweet],['this','is','a','tweet]]
Where then the stopwords are also removed.</p>
<p>The dataset is currently looki... | 2 | 1,395 |
iPhone animation problem SImulator vs Real Device | <p>This is my first question her so please be gentle:
I have followig animation code running smoothly on the simulator as well as on the real device (I am testng on iPhone 3GS 3.1.2).
Animation is a simple transition between the 2 views, something like book page flipping.</p>
<p>One diffrence betwen simulator an real ... | 2 | 1,138 |
Smoothing pixels on Unity's Images component using a customized Default UI shader | <p>I'm looking to create a fade in/fade out effect for UI images using a customized shader.</p>
<p>Right now I'm working with this code:</p>
<pre><code>// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT
license (see license.txt)
Shader "Custom/FadeShader"
{
Properties
{
[PerRend... | 2 | 2,635 |
Laravel sending email with shared hosting with cpanel - fails | <p>I need to send verification mail to any user who registers on my app. My Laravel version is 5.4.36. I am using shared hosting with cpanel.</p>
<p>So I made an email account through cpanel which should send emails. Here are cpanel's recommended settings:</p>
<p>Username: rutko@mladensblogger.rs
Password: Use th... | 2 | 1,873 |
How to change the position of Bootstrap Navigation Bar parent menu item icon at mobile view? | <p>I am looking for a way to change the position of the <em>bootstrap navigation menu bar parent menu icon,</em> when open in mobile view.</p>
<p>Currently the menu header contains right-arrow-down icon at the end of header name like below.</p>
<p><a href="https://i.stack.imgur.com/kv4T2.png" rel="nofollow noreferrer... | 2 | 2,007 |
Type error: Image data of dtype object cannot be converted to float | <p>Hello I have been trying to import an image from desktop to the jupyter notebook using opencv. I am getting the following error message at the end <strong>Image data of dtype object cannot be converted to float</strong> . My code is as follows:</p>
<pre><code>import cv2 as cv
import matplotlib.pyplot as plt
im = cv.... | 2 | 1,125 |
R error in '[<-.data.frame 'C' *temp*',… replacement has # items, need # | <p>I have a function that I've executed many times but is now throwing an error, which I do not understand. I'm trying to apply the function over a list.
I did not write the function and I have limited experience with functions. So, I'm not sure how to troubleshoot the code.</p>
<p><strong>function:</strong></p>
<pre... | 2 | 2,946 |
How to force div to spill outside of ul container on hover? | <p>How can I let an arbitrary <code>div</code> nested within a <code>ul</code> spill outside of the <code>ul</code>, which is set to <code>width: 160px;</code> and <code>overflow-y: hidden;</code>? I have set it to <code>overflow-y: hidden</code> because the list needs to be scrollable.</p>
<p>Here is my list:</p>
<p... | 2 | 1,039 |
Qt Camera on Raspberry Pi 2: Internal data flow error | <h2>QML Camera</h2>
<p>Trying to run Qt 5.5 <code>declarative-camera</code> example on the Raspberry Pi 2 with the 'Raspberry Pi Camera' and getting an error after some delay:</p>
<pre><code>CameraBin error: "Internal data flow error."
</code></pre>
<p>GUI runs but the viewfinder is black.</p>
<p>Video recording wo... | 2 | 1,585 |
Jackson JSON Serialization without field name | <p>I have a JAVA POJO which has many fields. One of the fields is <code>Map<String, Object></code> for which I am using the <code>Custom JsonSerializer</code> as it can have many type of <code>Objects</code>. All I want to know is how can I avoid the Serialization of the <code>fieldname</code> only for this <code... | 2 | 2,575 |
How can I access a local FastAPI service with deployed with Skaffold? | <p>Until now I developed Python applications locally using docker and docker-compose. Now I'd like to change my development workflow to use <code>skaffold</code> with <code>docker</code> as builder, with <code>kubectl</code> as deployer and with <code>minikube</code> for managing the local kubernetes cluster.</p>
<p>Le... | 2 | 2,434 |
Need help validating XML against XSD in C# | <p>I'm writing a WPF application that requires XML files to be validated. I have the following class to validate XML against one or more XSD files:</p>
<pre><code>public class XSDValidator
{
public List<XmlSchema> Schemas { get; set; }
public List<String> Errors { get; set; }
public List<Str... | 2 | 1,955 |
Laravel only one request can be used in controller | <p>I'm using Laravel's request class to validate my request. I've done that for my register post method like this.</p>
<pre><code>public function RegisterPost(\App\Http\Requests\RegisterRequest $request)
{
$request->persist();
return true;
}
</code></pre>
<p>Now I'm trying to do the same for my... | 2 | 3,277 |
Angular ngRepeat: dupes error (although there are no duplicate keys) | <p>I am learning MEAN, and have encountered an Angular error. I am trying to display form data in a table, however the data isn't going through and the error I receive is: </p>
<blockquote>
<p>angular.js:11500 Error: [ngRepeat:dupes]
<a href="http://errors.angularjs.org/1.3.5/ngRepeat/dupes?p0=topic%20in%20topics... | 2 | 1,152 |
How do I reference cells on a sheet without activating it? | <p>So I'm running an audit on a set of digital files but I think the way I wrote is pretty convoluted so maybe someone can help me...</p>
<p>What I can't figure out is why activesheet.cells is working fine, but when I try to reference the cells with Workbooks("Master List").worksheets("Master Shipped").cells it gives ... | 2 | 1,476 |
recyclerView won't scroll smoothly for first time | <p>I have a recyclerView inside a fragment, this fragment is located in a viewpager2.</p>
<p>I read data from server and convert them to my ModelClass, them create an ArrayList and pas this array list to recyclerView.
here is my recyclerView item layout:</p>
<pre><code><?xml version="1.0" encoding="ut... | 2 | 3,230 |
How to retain current URL parameters when submitting a form? | <p>I have a PHP-based sorting method with a drop-down menu to sort rows. It works. I have another sorting links to sort id and title. It also works. But together they do not work.</p>
<p>When I sort (say by title) using links, the result gets sorted by title, then if I sort rows using my drop-down menu, rows get sorte... | 2 | 1,047 |
How do I speed up this BIT_COUNT query for hamming distance? | <p>I have a php script that checks hamming distance between 2 still photos taken from a security camera. </p>
<p>The table is mySQL with 2.4M rows, and consists of a Key and 4 INT(10)s. The INT(10)s have been indexed individually, together, and together with the Key, but I don't have significant evidence that any comb... | 2 | 1,560 |
Parsing XML to js data, how to acces specific tag? | <h2>Situation</h2>
<p>For a database analysis tool I need to parse a bunch of generated XML files (hibernate reverse engineered XML files) to javascript for visualization purposes. As I am very new to javascript being a java developer, I am trying to take small steps at a time. Eventually I want to parse the xml files... | 2 | 1,653 |
Angular 4 Internationalization and Routing | <p>I'm working on a project for work that is using angular 4's native routing and i18n internationalization. The problem that I'm encountering is when the user switches languages while on a route that is not the primary route. This part of the application is accessed like <code>foo.com/admin/</code> and when we throw a... | 2 | 1,451 |
Problems with entrypoints (from other packages) when installing package through pip | <p>Trying to install a package, for example, <code>pytorch</code> </p>
<p><code>pip install torch</code> / <code>pip install -U torch</code></p>
<p>And I'm greeted with this</p>
<pre><code>Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
ERROR: Command errored out with exit status 1:
comman... | 2 | 5,501 |
Self-hosting ASP.NET Core Web API is causing an error - No connection could be made because the target machine actively refused it | <p>I am self-hosting an ASP.NET Core 3.1 Web API application using <code>https</code> options. </p>
<p>These are my hosted server details</p>
<ul>
<li>Computer Name: padevspal203</li>
<li>Domain Name: padev.local</li>
</ul>
<p>Now I created a self signed certificate using this PowerShell command,</p>
<pre><code>New... | 2 | 1,035 |
cvInitUndistortMap() crash | <p>I am doing example 11-1 of "Learning OpenCV" by Bradski. My implementation crashes when attempting to use cvInitUndistortMap().</p>
<p>A similar post (<a href="https://stackoverflow.com/questions/2333868/cvundistort2-and-cvremap-crash" title="here">here</a>) had issues regarding using color images for cvUndistort2(... | 2 | 4,235 |
AngularJS Directive for checking if email already used | <p>I follow a solution for checking if a username is already present in the DB: defined in this topic <a href="https://stackoverflow.com/questions/28717378/angularjs-custom-directive-to-check-if-a-username-exists">angularjs: custom directive to check if a username exists</a></p>
<p>I put that in practice for checking ... | 2 | 3,581 |
multi threading inside threads in c program | <p>I am debugging a c code which creates 3 threads.These 3 threads wait(using pthread_cond_wait) and when my program signals them(using pthread_cond_signal) they create 4 threads each. Now when these 4 threads starts running, a <strong>segmentation fault</strong> occurs.</p>
<p>my gdb output:</p>
<pre><code>[New Thre... | 2 | 1,721 |
Exception thrown: read access violation. _Scary was nullptr | <p>Trying to learn to code using Jim Horton's Beginning C++ Programming with Jim Horton. It's crashing with the following:</p>
<pre><code>ZombieArena.exe!std::_Tree<std::_Tmap_traits<std::string,sf::Texture,std::less<std::string>,std::allocator<std::pair<std::string const ,sf::Texture>>,0>&g... | 2 | 1,215 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.