title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Game can't detect Winning | <p>I am trying to make a little game. I tried to make the diagonal winning line, but it did not work. If I tried the normal winning line, it worked, but, only in the first 3 fields. I made a check_winner() function, where I detect all winning fields. I do not know, why it is not detecting the winning fields.</p>
<p>Thi... | 3 | 1,078 |
need help taking my key press listeners out of main | <p>I have started to create a game where you can move freely. you move by using your keyboard I have it working but all I want to do is to take it out of main so I can call if multiply times from different classes. I have tried to put it in a <em>public static void</em> and call that method from main but it doesn't wor... | 3 | 1,287 |
How to identify approximately (threshold defined) continuous non null data using pandas? | <p>I would like to extract rainfall events from a rainfall time serie while allowing X dry hours (as a parameter) inside the same event. So, by rainfall event, I mean approximately continuous rainfall (RF > 0) with maximum X consecutive dry hours (RF = 0) inside.</p>
<p>I actually don't want to do it the hard way with... | 3 | 2,057 |
Ant/Subversion hook: How does ${user.dir} get set? | <p>My company is transitioning from Visual Source Safe to Subversion; our pipeline management tools rely on the existence of the 'shadow folder' that VSS provides in order to move code from version control out to the various test environments. Note: we use an interpreted language and translate our source code into obje... | 3 | 1,240 |
Error Code: 1822. Failed to add the foreign key constraint | <pre><code>CREATE TABLE `branch` (
`BranchID` INT NOT NULL,
`BranchSuburb` varchar(255) NOT NULL,
`BranchState` char(3) NOT NULL,
PRIMARY KEY (`BranchID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `member` (
`MemberID` INT NOT NULL,
`MemberStatus` char(9) DEFAULT 'REGULAR',
`MemberName` varc... | 3 | 1,355 |
How do i send data from an HTML form to a document? | <p>I have an HTML page which, after being filled up, needs to collect whatever data the user imputs and place it into a template document, which then needs to be converted into a pdf file and sent to the user to be printed. Does anyone have a tutorial for something similar to this? I have tried to find my way around wi... | 3 | 1,026 |
Indexing position in Javascript: continue after class | <p>I need to change the indexing of some elements, is there a way to continue with the indexing of <code>select-image</code> like the <code>class="column"</code> is not there? For clarity, I want something like that:</p>
<pre><code><div class="pagination-slider">
<div class="column&quo... | 3 | 3,345 |
Models in Tensorflow Federated get stucked at 0.1 accuracy | <p>I'm trying train a federated model for the mnist dataset. I am using the code avaible at <a href="https://www.tensorflow.org/federated/tutorials/simulations" rel="nofollow noreferrer">https://www.tensorflow.org/federated/tutorials/simulations</a> for the setup.
The dataset version being used is the the one from kera... | 3 | 2,824 |
PrimeFaces Paginator JumpToPageDropdown Bug | <p>I am migrating from PrimeFaces 6.2 to 8.0. In my project I am using multiple Primeface <a href="https://www.primefaces.org/showcase/ui/data/datatable/paginator.xhtml" rel="nofollow noreferrer">DataTables with a Paginator</a>.</p>
<p><strong>MCVE:</strong></p>
<p>Create a data list with more than 10 elements. Then ... | 3 | 1,376 |
How to instruct a magic mock on how it should treat its arguments | <p>I've run into the following (edge?) case that I don't know how to handle properly. The general problem is that</p>
<ul>
<li>I have a function that I want to test</li>
<li>in that function I call an external function with a generator comprehension as its argument</li>
<li>in my tests, I mock the external function aw... | 3 | 1,086 |
abn tree fail to show correctly when reach to level 9 | <p>I have to generate tree view, so I have created tree using abn-tree in my spring boot jhipster application.</p>
<p>As tree will be generated at runtime and level(depth) of tree is not fixed. I have tried depth 8 with abn-tree, but as it go to level 9, its view scattered. Node added after shifted towards right side ... | 3 | 1,567 |
Algorithm that fills entries diagonally | <p>Suppose i have a matrix <code>A</code> of <code>n*n</code> and want to fill entries diagonally.
First i want to fill main diagonal then the diagonal above the main diagonal and up to so on.
Then diagonal below the main diagonal</p>
<p><img src="https://latex.codecogs.com/gif.latex?%5Cbegin%7Bbmatrix%7D&space;%7B%5... | 3 | 2,343 |
Presenting UIViewController from SKScene? | <p>So at the beginning I was having trouble implementing social media sharing into my project using Swift/Sprite-Kit. I believe I have now accomplished that but I just cannot trigger the methods, or as it seems everybody's struggle, I cannot present the view controller from my SKScene. So what I first did, was to creat... | 3 | 1,317 |
Stretch my buttons in a TopAppBar | <p>I am developing a universal application in Visual Studio 2015 Community, but I have a problem in stretching my 3 buttons when I test my application on local PC or the Windows phone emulator, this is what I get with my code:</p>
<pre><code><CommandBar Height="51" >
<CommandBar.Content>
... | 3 | 1,052 |
how to get file content through c# in node js | <blockquote>
<p>I am getting blob of pdf file from other server which is on C# in node server when I am converting it to array buffer it's size is different from C# array buffer size and when I am opening it to browser it gives error "Failed to load PDF document."</p>
</blockquote>
<blockquote>
<p>This is my ... | 3 | 1,069 |
Firebase join without subscription | <p>I need to join two tables in Firebase Firestore DB. Do do so, I have to get a value from collection 'attendees' and then perform a <code>forEach</code> to recover the event data in collection 'event', pushing it into an array and then return the array in a promise.</p>
<p>I am using <code>.valueChanges().subscribe(... | 3 | 1,332 |
Ranking based on product holdings | <p>I have a table that has customer id and product id combination.
I want to identify product holding combinations that have the greatest yield.
i.e. what are the product combinations and product sub combinations or individual products that have the greatest yield.</p>
<p>For example, if I have have a combination of 3 ... | 3 | 1,399 |
If else statement not working in ajax template | <p>title_posts.html </p>
<pre><code>{% extends "main/base.html" %}
{% load static %}
{% load humanize %}
{% block styles %}
<link rel="stylesheet" type="text/css" href="{% static 'main/css/title_posts.css' %}">
{% endblock styles %}
{% block content %}
<style>
body {
backgrou... | 3 | 3,812 |
Display a nested form | <p>I would like to display my orders like the ingredients are displayed just above. And I don't understand why is not ?? </p>
<p>Post : Ingredients nested<br />
Onlines :Orders nested</p>
<p><strong>Views/posts/show:</strong> </p>
<pre><code><p>
<strong>Title:</strong>
<%= @post.title %>
... | 3 | 3,360 |
pip install with flag "--index-url" and "--extra-index-url" from GitLab results in "ERROR: HTTP error 404 while getting" | <p>We are using a private GitLab Enterprise installation for storing Python modules as described in the article <a href="https://docs.gitlab.com/ee/user/packages/pypi_repository/" rel="nofollow noreferrer">PyPI packages in the Package Registry</a> <br />
The following command was used inside containers to install the p... | 3 | 1,589 |
Vuejs Bugs view components | <p>I have this code for a component but it's not working. It's give me an empty page when I view it in the localhost and I tried it from both of the ports 3000 and 8000. It keeps giving me the same error, no data to show .</p>
<pre class="lang-html prettyprint-override"><code><template>
<form>
<a ... | 3 | 1,702 |
file input stream need to read from the Object | <p>I am trying to save data onDestroy method inside a bottomsheetDialogFragment. I am saving information on destroy method and getting saved info onCreate method.</p>
<p>but I am getting an error on this particular line</p>
<pre><code>listOfItem= new ArrayList<> (Arrays.asList ( split ) );
</code></pre>
<p>I am a... | 3 | 1,948 |
ajax delete mysql id dynamic calculateSum() not updating | <p>Hi I have a very large edit from that shows items coming from mysql database and the ability to add/delete new rows. I use jquery to calculate the prices, subtotal, tax and total. This all works as does the add new row and delete rows.
However, the items coming from the database that already exist I use ajax to del... | 3 | 7,029 |
Create multiple entries in model through nested form via simple_form | <p>When a user creates a vacancy I want them to be able to save either 1 range of dates or multiple separate dates.</p>
<p>So I have 2 models, <code>Vacancy</code> and <code>Vacancyschedule</code>.</p>
<p>Vacancyschedule includes <code>vacancy_id start_date end_date start_hour end_hour (to save a range)</code> and wh... | 3 | 1,059 |
segmentation fault in fork() | <p>I am running into some problems while I am trying to do a multi-process program in a Raspberry Pi.
There are only two processes: one to read data from an Analog to Digital converter and another process which receives this data via a pipe and sends it to a PC via a UDP protocol.
Both programs have been tested indiv... | 3 | 3,147 |
Android xml layout about CheckBox and RadioButton | <p>There have two RadioButton, Twelve Checkbox and one send button,each button has a custom selector.
RadioButton and Checkbox out of range, can not let all RadioButton and Checkbox in the android xml layout.
I used ScrollView, but it have some error about "Exception raised during rendering: ScrollView can host only on... | 3 | 3,004 |
Unable to identify solution to compiler error using Boost Units | <p><strong>Boost Units version</strong>: 1.45</p>
<p><strong>Compiler</strong>: Visual Studio 2008</p>
<p><strong>Platform</strong>: Windows 7</p>
<p><strong>Error</strong>: When compiling the following code I get an error C2440 "initializing' : cannot convert from 'boost::units::quantity' to 'boost::units::quantity... | 3 | 1,183 |
div above another div, but should scroll beneath the later one | <p>there is a <code>div</code> (namely <code>div_fixed</code>) which is fixed in position. Another <code>div</code> namely <code>other_content</code> is beneath the <code>div_fixed</code>. The <code>other_content</code> div has a <code>padding-top</code> property so that when the page is scrolled only the <code>other... | 0 | 1,062 |
Error 500.19 The configuration section 'oracle.manageddataaccess.client' cannot be read because it is missing a section declaration | <p>I'm new to IIS, I'm trying to mount a web application on the IIS of the server, but at the moment of running it shows me a message "The configuration section 'oracle.manageddataaccess.client' cannot be read because it is missing a section declaration", when I mount it on my computer if it works but when I ... | 0 | 5,382 |
Error installing pg gem on osx | <p>I am on osx 10.6.7 trying to run bundle install on a new rails 3.0.7 app and it keeps failing when trying to build the pg gem. It keeps telling me that I have need the developer tools. But as far as I can tell I have the developer tools installed.</p>
<p>Here is the output of xcodebuild -version</p>
<pre><code>Xco... | 0 | 2,386 |
iOS - How to create WKWebView Back Button programmatically? | <p>I am attempting to create a back button for my iOS WKWebView app so that way when the user clicks on the button it takes them to the previous WKWebView page. I have found numerous tutorials on how to do this with IB but not with straight code. This is what I have so far:</p>
<p>Original ViewController.swift:</p>
<... | 0 | 2,085 |
Why does installing Nokogiri on Mac OS fail with libiconv is missing? | <p>I've been trying to install Nokogiri on Mac OS 10.9.3 and whatever I try, the install fails in the end with the following error message:</p>
<pre><code>$ sudo gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-d... | 0 | 1,256 |
Allow only numbers and dot in script | <p>Am using this javascript for restrict users to type only numbers and only one dot as decimal separator.</p>
<pre><code><script type="text/javascript">
function fun_AllowOnlyAmountAndDot(txt)
{
if(event.keyCode > 47 && event.keyCode < 58 || event.keyCode == 46)
{
... | 0 | 1,547 |
Apache and logrotate configuration | <p>Last week I found a problem on my server, because the disk usage was 100%, and I found out apache had created a huge error.log file of 60GB. I changed then the LogLevel to emerg, but after one week, it is again 1.3GB which is definitely too much.</p>
<p>Moreover, I have an access.log of 6MB and an other_vhosts_acces... | 0 | 1,414 |
How to download and write a file from Github using Requests | <p>Lets say there's a file that lives at the github repo:</p>
<p><a href="https://github.com/someguy/brilliant/blob/master/somefile.txt" rel="noreferrer">https://github.com/someguy/brilliant/blob/master/somefile.txt</a></p>
<p>I'm trying to use requests to request this file, write the content of it to disk in the cur... | 0 | 1,108 |
How to run PowerShell scripts from C# | <p>I am trying to run a PowerShell script with C#, but I don't have any success. Here is my function:</p>
<pre><code>private void ExecutePowerShellCommand(string scriptfile)
{
RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create();
Runspace runspace = RunspaceFactory.CreateRunspace(runsp... | 0 | 1,086 |
Error Rendering Control - WebUserControl, An unhandled exception has occurred | <p>What can be wrong with my code? The visual studio doesn't get any warnings or error.</p>
<p>ASP.NET, Error Rendering Control - WebUserControl, An unhandled exception has occurred.</p>
<pre><code><%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" ... | 0 | 2,603 |
Yii2 cUrl Bad Request (#400) | <p>While trying to use cUrl with the Post method in Yii 2, I receive a 400 error code.</p>
<pre><code>Bad Request (#400)
Unable to verify your data submission.
The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.
</code></pre>
<p... | 0 | 2,089 |
Remove method binary search tree | <p>I am trying to implement a remove method for the BST structure that I have been working on. Here is the code with find, insert, and remove methods:</p>
<pre><code>public class BST {
BSTNode root = new BSTNode("root");
public void insert(BSTNode root, String title){
if(root.title!=null){
... | 0 | 2,189 |
Programmatically resize custom UIView from XIB | <p>I have following problem: I have created a custom <code>UIView</code> class and its layout in <code>XIB</code> file. Let's say that size of my custom view in XIB is 150 x 50. I have enabled <code>sizeClasses</code> (wAny hAny) and <code>AutoLayout</code>. In Simulated Metrics I have set <code>Size = Freeform</code>,... | 0 | 1,817 |
React Native: Transform with key of "rotate" must be a string: {"rotate":"0deg"} | <p>Seems like I did everything in the documentation and referenced other examples.</p>
<p>Trying to animate a text component rotation:</p>
<pre><code>this.state = {
rotateAnimation: new Animated.Value(0),
};
spin = () => {
this.state.rotateAnimation.setValue(0);
Animated.timing(this.state.rotateA... | 0 | 1,463 |
extjs using up and down methods | <p>I'm trying to use <code>up</code> and <code>down</code> to call rather than <code>Ext.getCmp</code> but I'm not quite understanding it. I have this code</p>
<pre><code>listeners: {
'change': function(field, selectedValue) {
// Ext.getCmp('wildAnimal').setValue(selectedValue);
this.up('form').dow... | 0 | 1,349 |
How to make modal close on click outside | <p>I have used this JavaScript below:</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-js lang-js prettyprint-override"><code>$('body').click(function() {
if (!$(this.target).is('#popUpForm')) {
$(".modalDialo... | 0 | 1,034 |
PHPExcel outputting zeros as blank cells | <p>I'm building a WordPress plugin using PHPExcel to export reports of student attendance. So far, I'm able to successfully take the array of student data (including attendance) and convert and download it as a spreadsheet. Unfortunately, there's an odd bug: when a student has attended zero events, that cell on the s... | 0 | 1,276 |
OidcClient.readSigninResponseState: No matching state found in storage - oidc-client-js (Angular) | <p>I am using <a href="https://www.npmjs.com/package/oidc-client" rel="noreferrer">oidc-client library</a> for integrating with Azure AD in my Angular(9) application. <code>signinRedirect()</code> & <code>signinSilent()</code> functions are working as expected. But for <code>signinPopup()</code>, <strong>it is gett... | 0 | 1,880 |
Retrofit-IllegalArgumentException: unexpected url | <p>I want to upload a video file (chosen from gallery) to a server using Retrofit. But it doesn't work and throws the exception "<strong>java.lang.IllegalArgumentException: unexpected url: 192.168.1.7</strong>". My code is presented below.<br/>
<strong><code>PostFile.java</code></strong>:</p>
<pre><code>public final c... | 0 | 1,362 |
"Unable to start service Intent" error when starting service from an Activity in Android | <p>I see the following error in DDMS when trying to use a CheckBox on my MyActivity" activity to start a service called "MyService":</p>
<pre><code>W/ActivityManager( 73): Unable to start service Intent { cmp=com.example.android.myprogram/.MyService }: not found
</code></pre>
<p>I used the tutorial <a href="http://... | 0 | 1,314 |
Point cloud registration using PCL Iterative closest point | <p>I try to perform ICP with PCL,</p>
<p>but <code>pcl::transformPointCloud</code> doesn't work. This my code:</p>
<pre><code>int
main ()
{
pcl::PointCloud<pcl::PointXYZI>::Ptr cloudIn (new pcl::PointCloud<pcl::PointXYZI>);
pcl::PointCloud<pcl::PointXYZI>::Ptr cloudOut (new pcl::PointCloud&... | 0 | 1,335 |
FOSRestBundle setup for return JSON but still asking for Twig template | <p>I have configured FOSRestBundle as following:</p>
<pre><code>#FOSRestBundle
fos_rest:
param_fetcher_listener: true
body_listener: true
format_listener:
rules:
- { path: ^/, priorities: [ json, html ], fallback_format: ~, prefer_extension: true }
media_type:
versio... | 0 | 2,523 |
mysql lock wait timeout exceeded, try restarting transaction | <p>I am getting following error while I am trying to execute a stored procedure which has one update statement. </p>
<p>Below is the INNODB STATUS OUTPUT after the error:</p>
<pre><code>=====================================
090828 12:54:36 INNODB MONITOR OUTPUT
=====================================
Per second average... | 0 | 3,031 |
ExtJs 5.1.0 - Unrecognized class name / alias: widget.cartesian | <p>I want to show a stacked area chart in a new window. The enviroment is the ExtJs Webdesktop.
When I create the window through:
Ext.create('Desktop.displayPresences.view.displayPresencesChart').show()</p>
<p>I always get these error messages: </p>
<pre><code>mypath/desktop/widget/cartesian.js?_dc=1423082524533 404 ... | 0 | 2,872 |
Python Pandas slice multiindex by second level index (or any other level) | <p>There are many postings on slicing the level[0] of a multiindex by a range of level<a href="http://pandas.pydata.org/pandas-docs/stable/advanced.html#using-slicers" rel="noreferrer">1</a>. However, I cannot find a solution for my problem; that is, I need a range of the level<a href="http://pandas.pydata.org/pandas-d... | 0 | 1,449 |
Python Quicksort Runtime Error: Maximum Recursion Depth Exceeded in cmp | <p>I'm writing a program that will read a text file containing 5,163 names. (text file can be seen <a href="http://pastebin.com/BAKTJKy6">here</a>)</p>
<p>Then I want to store the names into a list called 'names', afterwards, I sort the list based on how many letters the name contains, shorter names are at the start o... | 0 | 1,141 |
iOS9: "Unable to Download App" | <p>We are developing an internal iOS app for our company.
We create a local distribution link of the form</p>
<pre><code>itms-services://?action=download-manifest&url=https://INTERNAL-PATH/manifest.plist
</code></pre>
<p>It worked fine for a long time, including iOS8 and all betas of iOS9.</p>
<p>However now for... | 0 | 3,557 |
Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty | <p>Hie,</p>
<p>I wrote a java code which connects to <strong>Salesforce</strong> and updates a value in there, Its is working well and good when i run it from my local system as a <strong>standalone java application</strong> but my main goal is to take that as a <strong>java component in filenet BPM workflow</strong> ... | 0 | 1,757 |
JPA with HIBERNATE insert very slow | <p>I am trying to insert some data to SQL Server 2008 R2 by using JAP and HIBERNATE. Everything "works" except for that it's very slow. To insert 20000 rows, it takes about 45 seconds, while a C# script takes about less than 1 second.</p>
<p>Any veteran in this domain can offer some helps? I would appreciate it a lot.... | 0 | 1,921 |
How to resume activity instead of restart when going "up" from action bar | <p>I have <strong>two</strong> activities. Say <code>Activity A</code> and <code>Activity B</code>.
<br/>
From <code>Activity A</code> I click a button to launch <code>Activity B</code> This is the code I use for this:</p>
<pre><code>Intent intent = new Intent(this, ActivityB.class);
this.startActivity(intent);
</code... | 0 | 1,120 |
How do I build a WPF application where I can drag and drop a user control between windows? | <p>I'm building a simple Todo List application where I want to be able to have multiple lists floating around my desktop that I can label and manage tasks in.</p>
<p>The relevant UIElements in my app are:</p>
<p>Window1 (Window)
TodoList (User Control)
TodoStackCard (User Control)</p>
<p>Window1 looks like this:</p>
<p... | 0 | 1,556 |
Using Node.js modules in HTML | <p>I have the following Node.js project (which is a Minimal Working Example of my problem):</p>
<p><strong>module1.js</strong>:</p>
<pre><code>module.exports = function() {
return "this is module1!";
};
</code></pre>
<p><strong>module2.js</strong>:</p>
<pre><code>var module1 = require('./module1');
module.expor... | 0 | 1,027 |
How to know what is the reason for ClosedChannelExceptions with spark-shell in YARN client mode? | <p>I have been trying to run <code>spark-shell</code> in YARN <code>client</code> mode, but I am getting a lot of <code>ClosedChannelException</code> errors. I am using spark 2.0.0 build for Hadoop 2.6.</p>
<p>Here are the exceptions :</p>
<pre><code>$ spark-2.0.0-bin-hadoop2.6/bin/spark-shell --master yarn --deploy-... | 0 | 5,440 |
Thin web server: `start_tcp_server': no acceptor (RuntimeError) after git branch checkout | <p>A Rails 3.2.0 app, working fine with Thin web server, both locally and on Heroku cedar stack.</p>
<p>After:</p>
<pre><code>$ git branch work
$ git checkout work
$ rails server
</code></pre>
<p>I get:</p>
<pre><code>=> Booting Thin
=> Rails 3.2.0 application starting in development on http://0.0.0.0:3000
=&... | 0 | 1,457 |
No database provider has been configured for this DbContext .NET Core with SQL Server | <p>I have been banging my head against a wall with this one and have been googling to no avail.</p>
<p>I have just started a new ASP.NET Core MVC project, I have installed/updated my packages for these two to 2.2.0:</p>
<pre><code>Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools
</code></pr... | 0 | 1,232 |
Issues while integrating ADFS with Spring SAML Extension | <p>I am working on integrating Spring SAML Extension within our appliaction and for SSO with one of our client's ADFS2.0 as the IDP we have generated Service provider meta data from our appliaction and imported ADFS meta data into our appliaction.When i select the clients idp and click on start single sign and give the... | 0 | 1,212 |
how to save canvas as png image? | <p>I have a canvas element with a drawing in it, and I want to create a button that when clicked on, it will save the image as a png file. So it should open up the save, open, close dialog box...</p>
<p>I do it using this code</p>
<pre><code>var canvas = document.getElementById("myCanvas");
window.open(canvas... | 0 | 1,750 |
@viewChild not working - cannot read property nativeElement of undefined | <p>I'm trying to access a native element in order to focus on it when another element is clicked (much like the html attribute "for" - for cannot be used on elements of this type.</p>
<p>However I get the error: </p>
<blockquote>
<p>TypeError: Cannot read property 'nativeElement' of undefined</p>
</blockquote>
<p>... | 0 | 3,530 |
Node JS Express - Oracle Connection Pooling (ORA-24418: Cannot open further sessions) | <p>I'm having issues with a the Oracle DB module:
<a href="https://github.com/oracle/node-oracledb/blob/master/doc/api.md" rel="nofollow">https://github.com/oracle/node-oracledb/blob/master/doc/api.md</a></p>
<p>I have an application which has between 300 and 900 hits per hour (normally from around 100 users). The app... | 0 | 1,103 |
In WCF, for a webHttpBinding, how do I specify credentials in the client side web.config when the server is using basic authentication? | <p>I have two WCF RESTful services - the "general" service is public and has no security; the "admin" service I intend to use basic authentication over SSL. This is my server side web.config: </p>
<pre><code><system.serviceModel>
<bindings>
<webHttpBinding>
<binding name=... | 0 | 1,661 |
Joining on datetime64[ns, UTC] fails using pandas.join | <p>I'm trying to join two <code>pandas.DataFrames</code> on a <code>datetime64[ns, UTC]</code> field and it's failing with a <code>ValueError</code> (described below) that is not intuitive to me. Consider the example:</p>
<pre><code>>>> import pandas as pd
>>> import numpy as np
>>>
>>... | 0 | 1,203 |
Webpack error with react | <p>I am trying to configure webpack according to this <a href="https://robots.thoughtbot.com/setting-up-webpack-for-react-and-hot-module-replacement" rel="noreferrer">tutorial</a> and keep getting the same error. I am having trouble debugging these 2 messages:</p>
<pre><code>ERROR in ./app.js
Module parse failed: /pa... | 0 | 1,128 |
ASP.NET Core 3.1 Azure AD Authentication throws OptionsValidationException | <p>I'm trying to use Azure Active Directory to handle authentication on a web app. However, when I try to hit an action with the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authorization.authorizeattribute?view=aspnetcore-3.1" rel="noreferrer"><code>AuthorizeAttribute</code></a>, the app t... | 0 | 1,449 |
VHDL integer to string | <p>Imagine you wanted to convert integers to strings in VHDL to display on a VGA monitor. You can't use ieee 2008 standard though because you have to use xilinx ISE 14.7. I have the following code for converting an integer type to a string type but I get "Non-static loop limit exceeded" errors for the while loop and in... | 0 | 1,309 |
Hibernate HSQLDB - DuplicateMappingException | <p>I'm writing simple "todo" application in Spring Boot.
I'm using HSQLDB in my development environment. </p>
<p>I've got two tables "Project" and "Task".
Task table has one to many reference to project's table because I want to list all tasks in projects.</p>
<p>When I try to run my app I get an exception:</p>
<pr... | 0 | 3,480 |
Saving Fragment state in ViewPager | <p>I tried out <a href="https://android.googlesource.com/platform/development/+/master/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentPagerSupport.java" rel="noreferrer">the sample code from the API</a> and it didn't really work so I implemented my own:</p>
<p><strong>FragmentPagerSupport</strong>... | 0 | 1,537 |
Run-time error '13' VBA Macro Excel | <p>I created this macro and I get a Run-time error '13' at the line</p>
<pre><code>Set objDomAttribute = objDomElement3.Attributes.setNamedItem(objDomDoc.createAttribute("Name4"))
</code></pre>
<p>My Excel file has 2727 rows. I tested it for fewer rows and it works perfectly, but for 2727 it doesn't work. What should... | 0 | 1,334 |
Configuring WCF client gives the error "The message could not be processed. This is most likely because the action | <p>My web service returns a error message no matter what configurations I set. I get the following error message.</p>
<blockquote>
<p><em>The message could not be processed. This is most likely because the action 'http://tempuri.org/ITestingWebService/DoWork' is incorrect or
because the message contains an invalid... | 0 | 2,242 |
SELECT / GROUP BY - segments of time (10 seconds, 30 seconds, etc) | <p>I have a table (MySQL) that captures samples every n seconds. The table has many columns, but all that matters for this is two: a time stamp (of type TIMESTAMP) and a count (of type INT). </p>
<p>What I would like to do, is get sums and averages of the count column over a range of times. For instance, I have sam... | 0 | 1,543 |
load a local file to spark using sc.textFile() | <h1>Question</h1>
<p>How to load a file from the local file system to Spark using sc.textFile? Do I need to change any -env variables? Also when I tried the same on my windows where Hadoop is not installed I got the same error.</p>
<h1>Code</h1>
<pre><code>> val inputFile = sc.textFile("file///C:/Users/swaapnika... | 0 | 3,061 |
Illegal instruction(core dumped) error on Jetson Nano | <p>Sorry if my description is long and boring but I want to give you most important details to solve my problem.
Recently I bought a Jetson Nano Developer Kit with 4Gb of RAM, finally!, and in order to get, which I consider, the best configuration for object detection I am following this guide made by Adrian Rosebrock ... | 0 | 1,168 |
Jhipster - MySQL java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) | <p>I am trying to create a project via JHipster and deploy it to Openshif.
Everything seems normal, but when running mvn spring-boot:run or from the IDE, there is no connection to MySQL database. </p>
<p>The error is:</p>
<pre><code> Exception in thread "main" org.springframework.beans.factory.BeanCreationException:... | 0 | 7,919 |
passing parameters to jquery ui dialog | <p>I use <code>.data</code> like this to pass the id of the textbox that calls the dialog</p>
<pre><code>$("#<%=txtDirProprio.ClientID%>").focus(function()
{
$("#<%=dialog.ClientID%>").dialog( "open" ).data("id","#<%=txtDirProprio.ClientID%>");
return false;
});
</code></pre>
<p>h... | 0 | 1,264 |
Sharing via UIActivityViewController to Twitter/Facebook etc. causing crash | <p>On iOS8 I'm using a UIActivityViewController to share a UIImage to Facebook/Twitter etc. It seemed to be working fine, but today it suddenly started crashing when running the code on my iPad. However, it still works as expected in the simulator.</p>
<p>My code:</p>
<pre><code>UIActivityViewController *controller ... | 0 | 1,352 |
Getting specified Node values from XML document | <p>I have a problem going through an XML document (with C#) and get all the necessary values. I successfully go through all specified XmlNodeLists in the XML document, successfully get all XmlNode values inside, but I have to get some values outside of this XmlNodeList.</p>
<p>For example:</p>
<pre><code><?xml ver... | 0 | 1,049 |
Installation failed - invalid apk file - android_opencv_library | <p>I have got a project in eclipse (android_opencv_library) which has the flag "isLibrary". In another project "HelloDepp" I reference this project as a library. There are no errors. </p>
<ul>
<li>Running HelloDepp WITHOUT referencing this library works correctly.</li>
<li>Running HelloDepp WITH referencing this libra... | 0 | 2,351 |
Universal way to write to external SD card on Android | <p>In my application, I need to store lots of images in the device storage. Such files tend to fulfill the device storage, and I want to allow users to be able to choose external SD card as the destination folder. </p>
<p>I read everywhere that Android doesn't allow users to write to external SD card, by SD card I mea... | 0 | 1,449 |
jConfirm alert - jQuery plugin | <p>Am jConfirm for user confirmation.</p>
<p>My first jConfirm doesnt stop for user action and just passes to next.</p>
<p>My Code:</p>
<pre><code> $(function () {
$("#UpdateJobHandler").click(function () {
var JobHander = getJobHandler();
if (JobHander.MaxInstances == 0) {
j... | 0 | 1,733 |
Android:How to display images from the in a ListView? | <p>Android:How to display images from the web in a ListView?I have the following code to display image from a URL in an ImageView:</p>
<pre><code>import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import android.app.ListActivi... | 0 | 3,959 |
Convert List<Object> to ByteArray | <p>Currently, I'm sending my objects from server side to client side using JsonResults.</p>
<p>The current code is as follows:</p>
<pre><code>[HttpGet]
public JsonResult Get()
{
//Create a List object, categoryList which can store anonymous objects later.
List<object> categoryList = new Li... | 0 | 1,320 |
Ansible Error: "[Errno 2] No such file or directory" | <p>I'm not able to execute kubectl(v1.16.3) commands in the ansible command module.</p>
<p>For e.g. Creation of Namespace using ansible.</p>
<pre>
tasks:
- name: "Creating Directory"
file:
path: ~/ansible_ns/demo_namespaces
state: directory
- name: "Creating Namespace... | 0 | 1,412 |
jaxb2 goal is not invoked | <p>I am using maven-jaxb2-plugin to generate some classes from xsd.
It is defined in child pom as follows:</p>
<pre><code><pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
... | 0 | 1,975 |
Searching for a string in a large text file - profiling various methods in python | <p>This question has been asked many times. After spending some time reading the answers, I did some quick profiling to try out the various methods mentioned previously...</p>
<blockquote>
<ul>
<li>I have a <strong>600 MB</strong> file with <strong>6 million</strong> lines of strings (Category paths from DMOZ proj... | 0 | 1,145 |
libclntsh.so.12.1 : cannot open shared object file error when running sample of node-oracledb | <p>My goal is to connect to a oracle database on a VMWare guest machine (OpenSuse) from Ubuntu.</p>
<p>For now I have only installed the <a href="https://github.com/oracle/node-oracledb">oracledb</a> driver, and was trying to run the <a href="https://github.com/oracle/node-oracledb/blob/master/examples/connect.js">exa... | 0 | 1,157 |
100% width divs not spanning entire width of the browser in webkit | <p>I'm having a hard time with what I thought would be a dead simple issue. </p>
<p>I'm trying to create a div that spans 100% of the width of a browser window. The div is filled with several child divs that expand to fill that entire space with alternating colors like a football field. These divs would expand to fit ... | 0 | 1,491 |
Celery beat not picking up periodic tasks | <p>I am trying to get started with celery, but I can't get my task up and running. I have installed <code>django-celery-beat</code> and <code>celery4</code>.</p>
<p>My settings file.</p>
<p>Installed apps (with celery packages)</p>
<pre><code>...
'django_celery_beat',
'django_celery_results'
</code></pre>
<p>the c... | 0 | 2,580 |
ESLint error when trying to lint Angular templates | <p>I have an Angular 10 app set up with eslint and prettier, which worked fine so far for linting Typescript files. I'm now trying to lint my component template files as well <a href="https://github.com/angular-eslint/angular-eslint#linting-templates-with-angular-eslint" rel="noreferrer">following this doc</a>.</p>
<p>... | 0 | 2,382 |
The GridView 'PendingRecordsGridview' fired event RowDeleting which wasn't handled | <p>I've searched in google there's an easy way to delete a record with confirmation using this code:</p>
<pre><code><asp:templatefield HeaderText="Delete">
<ItemTemplate>
<asp:Button ID="deleteButton" runat="server" CommandName="Delete" Text="Delete" OnClientC... | 0 | 6,845 |
Slideout from left push menu navigation | <p>So, I want to use the menu with the button 'Show/Hide left push menu' which is working, but for some reason when I try and remove the other buttons, it stops working? </p>
<p>I haven't included CSS as I don't think that would be the issue but I can include a link to the CSS file if needed.</p>
<p><strong>HTML:</st... | 0 | 1,118 |
jQueryUI draggable + sortable bug (Cannot read property 'options' of undefined) | <p>My question seems to resemble this question:</p>
<p><a href="https://stackoverflow.com/questions/17928139/dragging-from-a-sortable-list-to-a-drag-and-drop-plugin">dragging from a sortable list to a drag and drop plugin</a></p>
<p>But since there is no answer given to that one i was wondering if anybody could / wou... | 0 | 1,393 |
How can I display ValidatorException and required="true" of same input field in different messages elements | <p>I took the following <a href="https://stackoverflow.com/a/7493527/617373">BalusC kickoff example</a> and modified it a bit by adding a submit button and additional h:messages and removing the <code>f:ajax</code> from the <code>h:inputSecret's</code> (removed the <code>f:ajax</code> cause for some reason when I leave... | 0 | 1,301 |
How to keep connection alive in java | <p>I am working on my first Java Project with MySQL. I have one function that gets called every time I get data back from my data source. This function should save a new line to my MySQL database. See the code here:</p>
<pre><code>import java.sql.*;
import java.util.Properties;
/**
*
* @author jeffery
*/
public... | 0 | 1,358 |
How to render blob image in vue.js stored in database | <p>I am using Vue.js in the front-end. I have Node.js, Express, PostgreSQL (with <a href="http://docs.sequelizejs.com/" rel="noreferrer">Sequelize</a> ) on the backend. </p>
<p>I am storing an item in the database that includes a thumbnail image. </p>
<p><strong>Database Model</strong></p>
<pre><code>const Item = s... | 0 | 1,598 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.