title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Greater Than or Equal To Today Date validation annotation in MVC3
<p>Has anyone seen an MVC3 data annotation for Date validation that requires a single selected date to be equal to or greater than current date?</p> <p>If there's already a third party add on that's cool too. I'm already using the DataAnnotationsExtensions but it doesn't offer what I'm looking for. </p> <p>There does...
0
1,325
Unable to process parts as no multi-part configuration has been provided
<p>I wrote a simple controller for uploading files:</p> <pre><code>@RestEndpoint public class ImageController { @Autowired GridFsTemplate mTemplate; @RequestMapping(value = "images", method = RequestMethod.POST) public @ResponseBody String testPhoto(@RequestParam String name, @RequestParam String dire...
0
2,206
Does javascript force specific charset?
<p>I am trying to use javascript, without framework(prototype, jQuery,etc), to insert data passed from a html form to an mysql database. I have managed to get this working but, get a problem with some special characters commonly used in my language(æøå). utf-8 supports these characters, and everything works fine when I...
0
1,899
Uncaught TypeError: undefined is not a function for fancy box
<pre><code>$(".fancybox-effects-b").fancybox({ openEffect : 'none', closeEffect : 'none', closeClick : true, helpers : { title : { type : 'inside' } } }); </code></pre> <p>This is a code for fancy box i included the entire lib folder and source folder of fancy box but i still ...
0
1,147
Error with Google Play Service Client
<p>I've been working on trying to get this android project to work in android studio with gradle. I'm fairly new to it all so it may be a simple issue but I have spent quite a few days and cannot get past this error I receive when trying to run my project:</p> <pre><code>Error:(25, 62) error: package com.google.androi...
0
4,513
TypeError: path.join is not a function
<p>The code that I have posted is working if I take AWAY the below function that I have wrapped the code with:</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>watcher.on('add'...
0
1,028
How to use JSF's h:selectBooleanCheckbox with h:dataTable to get selected checkboxes without submitting the page content?
<p>In my application, I have a h:datatable which contains vehicles data and h:selectBooleanCheckBox in each of its row. I want know the selected checkbox in the datatable datatable's row in the backing bean without applying any submit button. The idea of doing this is; when any user clicks the check boxes in one applic...
0
1,155
Why are these permissions being refused?
<p>Just for the Heck of it, I requested all the permissions from my application (hello world), to see what are the types of permissions that are granted and what are those that are refused! To my amusement I found about 40 of the permissions not granted! Two were returned as unknown permissions.</p> <p>Here is the log...
0
2,348
Stopping processes in ThreadPool in Python
<p>I've been trying to write an interactive wrapper (for use in ipython) for a library that controls some hardware. Some calls are heavy on the IO so it makes sense to carry out the tasks in parallel. Using a ThreadPool (almost) works nicely:</p> <pre><code>from multiprocessing.pool import ThreadPool class hardware(...
0
1,742
EF - The context cannot be used while the model is being created exception during HTTP requests
<p>I am receiving "The context cannot be used while the model is being created." issue in my web application in one of my webpages. This particular webpage POSTs to the server every 2-3 seconds to refresh the screen. From my testing I found that If I have 2 or more browser instances open to this page, after several m...
0
1,500
How to implement expandable panels in Android?
<p>Is there an easy way to create expandable/collapsible blocks like seen in official market app?</p> <p>Screenshot of Market app, when you click on "More" button, the description section expands with animation:</p> <p><img src="https://i.stack.imgur.com/0hqno.jpg" alt="enter image description here"></p> <p>I know o...
0
2,517
AngularJS - How to query the DOM when directive rendering is complete
<p>I'm trying to implement a custom scroll pane component using an AngularJS directive. in the following <a href="http://jsfiddle.net/neuTA/134/" rel="nofollow noreferrer">jsfiddle example</a> I have an example of the basic prototype.</p> <p>here is a schema of my idea: <img src="https://i.stack.imgur.com/xlmku.jpg" a...
0
1,178
Ant: Class not found: javac1.8
<p>I am trying to build a project using Ant in eclipse. I right-clicked on build.xml > Run As > Ant Build. However, I am getting the following error:</p> <pre><code>BUILD FAILED C:\Users\David\eclipse\test-project\build.xml:26: Class not found: javac1.8 </code></pre> <p>and also a warning:</p> <pre><code>compile: [j...
0
1,294
Your requirements could not be resolved to an installable set of packages. - Symfony Project
<p>I try to install the dependencies from a project I have to maintain, but every time I try to do a composer install I get this error '<strong>Your requirements could not be resolved to an installable set of packages.</strong>' and it gives me this error:</p> <pre><code> Warning: The lock file is not up to date wi...
0
2,707
userManager.AddToRoleAsync() - Error: role does not exist
<p>I'm creating a user registration system using .NET Core, Identity Core, and MVC Core. I'm able to create users and create roles in the database.</p> <p>Here's the form on the view that lets me select a user and select a role to add:</p> <pre><code>@using (Html.BeginForm("AddRoleToUser", "Roles")) { @Html.AntiF...
0
1,535
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet (even i have spring-webmvc.jar)
<p>I'm trying to create scratch level project with spring mvc and hibernate. in that situation i downloaded all jar related to spring and hibernate. While running my project i'm getting below error. </p> <pre><code>java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet </code></pre> <p>...
0
7,424
Should Hibernate be able to handle overlapping foreign keys?
<p>I have a table that has two foreign keys to two different tables with both foreign keys <strong>sharing one column</strong>:</p> <pre><code>CREATE TABLE ZipAreas ( country_code CHAR(2) NOT NULL, zip_code VARCHAR(10) NOT NULL, state_code VARCHAR(5) NOT NULL, city_name VARCHAR(100) NOT NULL, PRIMARY KEY (co...
0
1,491
Build JSON with Delphi
<p>I'm trying to implement a function which returns a json object containing elements of class. Here is my function:</p> <pre><code>procedure ListToJson(AInputList: TList&lt;TRating&gt;; AResponse: TJSONObject); var i: Integer; jsonPair: TJSONPair; jsonObject: TJSONObject; jsonArray: TJSONArray; begin json...
0
1,353
Exception Error : Access violation reading location 0xDDDDDDDD
<p>I am trying to create a dynamic string array in c++. When trying to display the contents of my dynamic string array to the console I receive this error:</p> <pre><code>Exception thrown at 0x0FD670B6 (msvcp140d.dll) in Assignment4.exe: 0xC0000005: Access violation reading location 0xDDDDDDDD. </code></pre> <p>Here ...
0
1,620
How to get flexbox align-items flex-end to work in WebKit/Blink?
<p>I'm trying to nest a flexbox in another flexbox. The outer box is vertical:</p> <pre><code>+------+ | | +------+ | | | | | | +------+ </code></pre> <p>Where the top area fits the content <code>flex 0 1 auto</code> and the bottom half fills the remaining space <code>flex 1 1 auto</code>.</p> <p...
0
1,298
How to send an alert message to a special online user with firebase
<p>I'm trying to make a "FourConnect"-game with javascript. I want, that there is a list from all online users. This list I've made with the example on the firebase site. Now I want that I can choose one online user and send them a invitation to play with me. So I wrote a function, that all users expect of me have an ...
0
1,615
CocoaPods could not find compatible versions for pod "Firebase/Everything"
<p>I am getting this error when I am trying to run my React Native app in iOS:</p> <pre><code>[!] CocoaPods could not find compatible versions for pod &quot;Firebase/Auth&quot;: In Podfile: Firebase/Auth RNFBAuth (from `../node_modules/@react-native-firebase/auth`) was resolved to 10.5.1, which depends on ...
0
4,663
Pass by value vs pass by rvalue reference
<p>When should I declare my function as:</p> <p><code>void foo(Widget w);</code></p> <p>as opposed to</p> <p><code>void foo(Widget&amp;&amp; w);</code>?</p> <p>Assume this is the only overload (as in, I pick one or the other, not both, and no other overloads). No templates involved. Assume that the function <code>f...
0
1,067
Change the name of headers in CSV file using CSVHelper in C#
<p>I am using CSV Helper library to produce CSV files for the user to to populate and upload into the system. My issue is that the WriteHeader method just writes the attributes of a class with names like "PropertyValue", which is not user friendly. Is there a method I can use to make the text produced user friendly bu...
0
1,756
How to make a FullScreen Activity on Android
<p>Ok so I am trying to replicate the look and feel of the <a href="https://play.google.com/store/apps/details?id=net.nurik.roman.muzei&amp;hl=en" rel="noreferrer">Muzei Live Wallpaper</a> App by Roman Nurik which is open source. </p> <p>(Check out his GitHub repository here - <a href="https://github.com/romannurik/m...
0
1,709
Reset a CoreData persistent store
<p>Basically, what I'm trying to do is to wipe out all data in my CoreData persistent store, then import new data. How would you do this? It seems that the simplest solution is call <code>[NSPersistentStoreCoordinator removePersistentStore:error:]</code> and then remove the file. Is that the best practice available? Is...
0
1,101
HTTP Status 500 - Unable to compile class for JSP:
<p>Hello Java and JSP gurus please help me sort out this. I have been trying to solve the problem for 2 weeks but have totally failed and it has really stressed me alot. I created three jsp files plus a java bean but have been getting an error message. These are the bin and class path roots.</p> <p>CLASSPATH: <strong...
0
1,885
WARNING: An illegal reflective access operation has occurred (portable opencv in java)
<p>I want to make a portable <code>opencv</code> application which the dependency is added to maven file <code>pom.xml</code>. </p> <p>Simplified code is :</p> <pre><code>import org.opencv.core.Mat; public class Builder { public static void main(String[] args) { nu.pattern.OpenCV.loadShared(); ...
0
1,037
Could we get different solutions for eigenVectors from a matrix?
<p>My purpose is to find a eigenvectors of a matrix. In Matlab, there is a <code>[V,D] = eig(M)</code> to get the eigenvectors of matrix by using: <code>[V,D] = eig(M)</code>. Alternatively I used the website <strong>WolframAlpha</strong> to double check my results.</p> <p>We have a <code>10X10</code> matrix called ...
0
4,504
Display Text(HTML) Saved In Database using CkEditor
<p>I have used <strong>CKEDITOR</strong> for saving some text in <strong>mysql database</strong>, it is saved in format like I have shown below</p> <pre><code>&amp;amp;lt;p style=&amp;amp;quot;margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-...
0
1,519
SQL Server: Copy Database Wizard: Execute SQL Server Agent Job Failed
<p>I have a database called ADNAS_TASK_USER_TEST. I am trying to use the Copy wizard and make a duplicate database on this same SQL Server.</p> <p>I am following the Tasks > Copy database wizard.</p> <p>However, when it goes to copy, it always fails on the last step, Execute SQL Server Agent Job.</p> <p>I am running...
0
7,308
Testing React portals with enzyme
<p>So I'm having a hard time writing tests for a modal component using React fiber's portal. Because my modal mounts to a domNode on the root of the <code>&lt;body /&gt;</code> but because that domNode doesn't exist, the test fails.</p> <p>Some code to give, context: </p> <p><strong>index.html</strong></p> <pre><cod...
0
2,310
Spring Data Failed to create query for method
<p>Error:</p> <blockquote> <p>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'appController': Unsatisfied dependency expressed through field 'service'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ...
0
1,412
C Format '%d' expects argument of type 'int *' but argument 2 has type 'unsigned int' [-Wformat=]
<p>I have some problem about this code , I want to compile this but it's not compile because something wrong. I told about wrong code down there...</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt; #define MAX 1000 typedef struct{ int film...
0
1,543
making asynchronous calls from generic handler (.ashx)
<p>I have a form in my website which posts json to the async handler which validates the data and return back the resonse OK or error and i will make the redirect on the client based on the response give by my handler.</p> <p>But when the response is ok, i want to perform some tasks asynchronously. But the asynchronou...
0
3,494
Ionic 4: Cordova is not available. Make sure to include cordova.js or run in a device/simulator
<p>I am trying to use the cordova plugin in a new ionic 4 project but I always run into errors regarding cordova. The plugin is properly installed and shows up in the plugin folder.</p> <p><strong>Error</strong></p> <p>Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to include cordov...
0
1,131
Java HashMap associative multi dimensional array can not create or add elements
<p>Okay so I have spent several hours trying to wrap my head around this concept of a HashMap in Java but am just not able to figure it out. I have looked at many tutorials but none seem to address my exact requirement and I cannot get it to work.</p> <p>I am trying to create an associative multi dimensional array in ...
0
1,064
Python: limit the width of printed columns of pandas DataFrame
<p>I am trying to print a pandas DataFrame. One of the columns is too wide (it is a very long string). To print I am using <code>tabulate</code> library. But when it is printed it shows the whole content of all columns in one very long line. Here is what I see:</p> <pre><code>row name ...
0
4,811
How to Pass Parameters to screen in StackNavigator?
<p>My React Native code: </p> <pre><code>import React, { Component } from 'react'; import { AppRegistry, ActivityIndicator, StyleSheet, ListView, Text, Button, TouchableHighlight, View } from 'react-native'; import { StackNavigator } from 'react-navigation'; import DetailsPage from './src/screens/DetailsPage'; cl...
0
1,230
Unable to find the requested .Net Framework Data Provider. It may not be installed.
<p>I have searched for the answer but haven't been able to find anything that fits my situation.</p> <p>The site works completely fine when I run it locally, but when after I publish it to Azure if I try to use a page that accesses the Database it gives me the following error page:</p> <pre><code>Server Error in '/' ...
0
1,884
My owl Carousel is not working
<p>I tried this given below code but the images is shown in list view. Here i have tried changing everything like i added jquery code of loop and all but nothing worked.</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="OwlCarousel2-2.2.0/dist/assets/owl.carousel.min.c...
0
1,175
Android: How to make selected spinner item to TextView?
<p>I am trying to get the selected item from the spinner to be displayed DIRECTLY after it is selected. Imagine if this is like a quiz game. If you select one of the wrong ones, a TOAST will appear(which I cannot get working). If I select the right one, a different TOAST will appear and I will link it to a new activity...
0
2,089
SQL Network Interfaces error: 26, but not connection string, is it Entity Framework?
<p>I have an MVC3/EF4.1 app that I'm building which now works fine on my local machine, but has a specific issue only in the production environment (virtual hosting at WinHost.) The error that I'm seeing is the "SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified" which normally means a connec...
0
2,501
How to call an AJAX function on page load
<p>I need to call GetAllProperties() function during page loading instead of calling the GetAllProperties() function after page is fully loaded.</p> <p>I tried window.onload = GetAllProperties; but it didn't work</p> <p>My code looks like this:</p> <pre><code>&lt;script type="text/javascript"&gt; window.onload = G...
0
1,176
How to fix error Base table or view not found: 1146 Table laravel relationship table?
<p>I am a new of laravel I try to create relationship many to many between table,My problem when I am insert data in to database I got errors</p> <p>QueryException in Connection.php line 713: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'learn.category_posts' doesn't exist (SQL: insert into <code>category...
0
1,353
Struts 2 Drop Down Example Problem
<p>i am trying to work on a drop down list using struts2 tag. But till now i am unsuccessful: below is the .jsp page, the action class, the struts.xml file and all relevant codes. Any help will be greatly appreciated. Thank you.</p> <p><strong>Note: I am getting this error :-> tag 'select', field 'list': The requeste...
0
1,153
C++ while loop to read from input file
<p>I wrote a function that reads in transactions from an input file using a while loop. I can't for the life of me figure out why it is reading the last 2 lines twice though. When using </p> <pre><code> while(InFile){code} </code></pre> <p>from my understanding it will continue looping until the file as reached the E...
0
1,173
How do I correctly use EF Core with AutoMapper ProjectTo and Unions?
<h2>My Setup</h2> <ul> <li>ASP.NET Core 2.0</li> <li>EntityFrameworkCore 2.0.1</li> <li>AutoMapper 6.2.2</li> </ul> <hr> <h2>Problem</h2> <p>I have a project with a DTO called <code>PersonDetail</code> and an Entity called <code>Person</code>. When I call </p> <pre><code>db.People.Where(p =&gt; p.FirstName == "Jo...
0
1,149
Apache Camel - Split and aggregate - Old Exchange is always null
<p>I see that this question has been asked a number of times but none of post helped or had a conclusive solution. I am splitting a message and then aggregating it using Aggregator2. The code was throwing exception because oldExchange was always null. So to test I designed a small code. </p> <p>I read an orders,xml fi...
0
1,654
UIAlertView first deprecated IOS 9
<p>I have tried several ways to use UIAlertController,instead of UIAlertView. I tried several ways but I cannot make the alert action work. Here is my code that works fine in IOS 8 and IOS 9 but is showing up with deprecated flags. I tried the elegant suggestion below but I can't make it function in this context. I ...
0
1,767
Jersey Restful failed with error "java.lang.NoSuchMethodException: Could not find a suitable constructor"
<p>The simple restful code based on Jersey</p> <pre class="lang-java prettyprint-override"><code>import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; import com.yakima.core.webservice.resource.UserResource; import org.glassfish.jersey.jettison.JettisonFeature; import org.glassfish.jersey.server.Re...
0
6,602
Bind ObservableCollection using MVVM
<p>I'm trying to put together what should be a very basic MVVM sample, but I'm having trouble getting it to work. Basically, I want to bind an <code>ObservableCollection</code> to a <code>ListBox</code>, and have a search option for the user to search for other items. Upon searching, the <code>ListBox</code> should be ...
0
1,639
Subscribe to a BLE Gatt notification Android
<p>I´m developing an BLE app, based on the Gatt sample project provided by google: <a href="https://developer.android.com/samples/BluetoothLeGatt/index.html" rel="noreferrer">https://developer.android.com/samples/BluetoothLeGatt/index.html</a>. So, I can send data writing in a characteristic successfully. Now I need to...
0
12,238
how to refresh my datagridview after I add new data
<p>I'm having a lot of trouble finding ways to refresh my datagridview.. I've tried datagridview.refresh(), datagridview.Update()....but it doesn't work...</p> <p>here's my code</p> <pre><code>Imports System.Data Imports System.Data.OleDb Imports System.Data.Odbc Imports System.Data.DataTable Public Class Form1 Dim ...
0
1,188
CreationException: Unable to create injector error in Play 2.5.18 in replacement for GlobalSettings Java code using com.google.inject.AbstractModule
<p>I am upgrading my Play application from 2.5.12 to 2.5.18 and when I start up the application (using <code>sbt</code>), I am receiving this error:</p> <p>CreationException: Unable to create injector, see the following errors:</p> <pre><code>1) Error injecting constructor, java.lang.NullPointerException at modules...
0
1,786
Spring Boot / Spring Data import.sql doesn't run Spring-Boot-1.0.0.RC1
<p>I've been following the development of Spring Boot, and sometime between the initial version <code>0.0.5-BUILD-SNAPSHOT</code> and the current version I am using <code>1.0.0.RC1</code> I am no longer running my <code>import.sql</code> script.</p> <p>Here is my configuration for <code>LocalContainerEntityManager</co...
0
1,104
javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist
<p>Using JPA with Hibernate, I got an exception when running the following code. The first time I run it, everything goes fine and the data is inserted in the database. The second time, when the data should be updated, it fails:</p> <pre><code>@AdminTx public void processSite(Site site) { FluxBoutiqueMapping mappi...
0
4,503
cannot resolve column due to data type mismatch PySpark
<p>Error being faced in PySpark:</p> <pre><code>pyspark.sql.utils.AnalysisException: "cannot resolve '`result_set`.`dates`.`trackers`['token']' due to data type mismatch: argument 2 requires integral type, however, ''token'' is of string type.;;\n'Project [result_parameters#517, result_set#518, &lt;lambda&gt;(result_s...
0
2,089
Convert Array to JSON string php
<p>I have an array like this</p> <pre><code>$prebook=array( 'sourceCity'=&gt;$_POST['source'], 'destinationCity'=&gt;$_POST['dest'], 'doj'=&gt;$_POST['doj'], 'routeScheduleId'=&gt;$_POST['routeid'], 'boardingPoint'=&gt;array( 'id'=&gt;...
0
2,033
How to disable button after click in jQuery
<p>Sometimes I am able to trigger the submit button twice. and the ajax is triggered twice too.</p> <p>Here is my html code:</p> <pre><code>&lt;div class="buttons-area"&gt; &lt;input id="step-two" class="btn btn-primary" type="submit" value="Next step »"&gt; &lt;/div&gt; </code></pre> <p>And here is my ajax:</p>...
0
1,296
How to set timeout in Kong v1.1.2
<p><strong>Problem</strong></p> <p>I am getting an error message in my Kong error log reporting that the upstream server has timed out. But I know that the upstream process was just taking over a minute, and when it completes (after Kong has logged the error) it logs a java error "Broken Pipe", implying that Kong was ...
0
1,228
Angular unit testing form validation
<p>I'm learning angular 8 and I'm using Karma for unit testing. I have created a basic registration form which works correctly but I'm facing issues in testing.</p> <p>Upon testing I'm getting 2 failures </p> <blockquote> <p>RegisterComponent > form should be valid Error: Expected validator to return Promise ...
0
2,467
HTTP 400 Bad Request - Invalid Header with Retrofit on Android
<p>I'm migrating my Android project from <a href="http://hc.apache.org/httpcomponents-client-4.3.x/index.html" rel="nofollow">Apache HttpClient</a> to <a href="http://square.github.io/retrofit/" rel="nofollow">Retrofit</a> with <a href="http://square.github.io/okhttp/" rel="nofollow">OkHttp</a>. POST/PUT request return...
0
1,114
ASP.NET MVC - Can't bind array to view model
<p>I have a view model with a from that includes a set of checkboxes. I need the check boxes to map to an array when binding in the post back method of my controller.</p> <p>Here's the view model.</p> <pre><code>@model TMDM.Models.TestSeriesCreateViewModel @{ ViewBag.Title = "Create"; } &lt;h2&gt;Create a Test ...
0
1,123
FirebaseApp not initializing despite FirebaseApp.initializeApp() being called in Application class
<p>I am creating an Android application and I'm currently trying to implement user authentication using Firebase. As far as I can tell, my app is connected to my Firebase server.</p> <p>I encounter a runtime error when attempting to switch from the SignIn activity to the SignUp activity via a button press. The app cra...
0
2,604
PowerShell Installing NuGet, says unable to access internet, but I actually can
<p>I followed the steps mentioned in <a href="http://woshub.com/using-powershell-behind-a-proxy/" rel="noreferrer">Using PowerShell Behind a Proxy</a> to configure my proxy server.</p> <pre><code>netsh winhttp set proxy "[IP]:[Port]" $Wcl = New-Object System.Net.WebClient $Creds = Get-Credential $Wcl.Proxy.Credentials...
0
1,564
Common multithreading mistakes beginners make on iPhone
<p>I just introduced multithreading into my app JUST to get a silly UIActivityIndicatorView to work. Well, the activity indicator works, alright -- but now my app crashes sometimes, and sometimes it doesn't -- under otherwise controlled conditions... I need to figure this out but don't know where to start looking...</p...
0
3,783
Unable to create new remote session with chromedriver
<p>I was previously using selenium-server-standalone-2.53.1 and chromedriver 2.22 and my acceptance was running perfectly. When I ran it today using this same version it started to fail throwing an <code>Unable to create a new remote session</code> error. Now after upgrading to selenium-server-standalone-3.0.1 and chro...
0
1,896
need to align part of list item to right of li - using CSS3 Jquery column-layout
<p>Using this jquery script to acheive CSS3 3-columns, to display a list of members alphabetically.</p> <p>I need it to display this way, which is does:</p> <pre><code>A D B E C F </code></pre> <p>Here is what I am using <a href="http://www.csscripting.com/css-multi-column/example6.php" rel="nofollow noreferre...
0
2,273
Draw a line in a JPanel with button click in Java
<p>I want to draw a line in a JPanel. This is my GUI and I want a line in the JPanel in white.</p> <p><img src="https://i.stack.imgur.com/ufGCx.jpg" alt="enter image description here"></p> <p>I find many examples but the problem is the how to use it.</p> <p>In many exmples, always they draw in a JFrame that extends ...
0
1,150
Set Background of JComboBox in Swing
<p>I want a JComboBox without a arrow button (done), which has a green background, when enabled and a gray background when disabled (not done). I also use a custom renderer for the drop down list (done)</p> <p>I checked the source code of BasicComboBoxUI and tried to override some methods, but nothing happens. The dro...
0
2,164
Unable to import Tensorflow "No module named copyreg"
<p>El Capitan OS here. I've been trying to find a workaround with import Tensorflow into my ipython notebook, but so far no luck.</p> <p>Like many people in the forums, I've also had issues with install tensorflow because of the six package. I was able to install after some fidgeting with brew</p> <pre><code>brew lin...
0
1,071
Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
<p>I'm new to this and have the following error when trying to add a Navigation Drawer to an activity with Fragments:</p> <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{uk.co.XXXX.EditFactFind}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar....
0
8,404
Why do we need targetNamespace?
<p>I would like to understand the purpose of targetNamespace as used both in XML Schema and in WSDL. In fact, to keep things simple, let's limit this question to XML Schema.</p> <p>I feel like I fully understand the notion of (simple) XML namespaces. By convention we use URI/URLs, but we could use any string, which we...
0
1,349
CLion C++ can't read/open .txt file in project directory
<p>I have a .txt file in my project directory that I made and populated with data.</p> <p>directory structure looks like:</p> <pre><code>/Users/asd/ClionProjects/ProjectWithTemplates/ main.cpp cmake twoday.txt </code></pre> <p>here is my code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;array&gt; #include...
0
1,105
How to read error messages from javascript error object
<p>Could some one help me out on below question please :-)</p> <p>I'm making a post call through redux action, which is below.</p> <pre><code>export const addEmployee = ({ firstName, surname, contactNumber, email }) =&gt; async dispatch =&gt; { const payloadBody = JSON.stringify({ firstName, surname, contactNumber, ema...
0
1,642
Problem with hosting WCF service in a Windows Service
<p>I have a WCF service that is hosted inside a Windows Service. The Windows Service has a <code>OnStart</code> method like this:</p> <pre><code>protected override void OnStart(string[] args) { serviceHost = new ServiceHost(typeof (RouterService)); serviceHost.Open(); } </code></pre> <p>It's quite minimal now, si...
0
1,278
How do implement a breadth first traversal?
<p>This is what I have. I thought pre-order was the same and mixed it up with depth first!</p> <pre><code>import java.util.LinkedList; import java.util.Queue; public class Exercise25_1 { public static void main(String[] args) { BinaryTree tree = new BinaryTree(new Integer[] {10, 5, 15, 12, 4, 8 }); System...
0
1,674
Breaking words using CSS
<p><img src="https://i.stack.imgur.com/1eVh8.png" alt="screenshot"></p> <p>When the text in <code>&lt;p&gt;</code> tag is too long, it appears like this, how to prevent this with CSS? I've tried the CSS property <code>word-break: break-all;</code> but Firefox and Opera doesn't support this property, and besides that o...
0
1,233
How to stretch elements of a Bootstrap navigation bar to make use of the entire width?
<p>Consider the following Bootstrap navigation bar:</p> <p><img src="https://i.stack.imgur.com/MDOAe.png" alt="My custom Bootstrap navigation bar"></p> <p>Some facts about this navigation bar:</p> <ul> <li>The bar itself is exactly 620px broad (page's width)</li> <li>The bar is responsive (collapse breakpoint at 640...
0
1,658
Replace deprecated android.support.v4.app.ActionBarDrawerToggle with support.v7 version cause drawer not works on Jelly Bean
<p>Following the answer in <a href="https://stackoverflow.com/questions/26439619/how-to-replace-deprecated-android-support-v4-app-actionbardrawertoggle/26440823#26440823">this question</a> i have replaced <code>ActionBarDrawerToggle</code> of support v4 library that in latest update(rev 21) has been deprecated with th...
0
1,040
React Jest testing : TestingLibraryElementError: Unable to find an element
<p>i can't get the test id within my jest test. I am new to react testing. I want to test this component and get back for example the h3 text what was given before.</p> <p>Tells me:<br /> &quot;TestingLibraryElementError: Unable to find an element by: [data-testid=&quot;testH3&quot;]&quot;</p> <p>Can you help me?</p> <...
0
1,261
G++ updated on MingW gets massive error messages
<p>I'm on Windows 10 with MinGW, and recently updated my <code>g++</code>, using <code>mingw-get update</code> and <code>mingw-get upgrade</code>. This error occurred, even after total MinGW reinstall. No Google searches bring up anything remotely related.</p> <p>I tried compiling</p> <pre><code>#include &lt;iostream...
0
14,532
Connecting to MySQL from Flask Application using docker-compose
<p>I have an application using Flask and MySQL. The application does not connect to MySQL container from the Flask Application but it can be accessed using Sequel Pro with the same credentials.</p> <p><strong>Docker Compose File</strong></p> <pre><code>version: '2' services: web: build: flask-app ports: ...
0
1,049
phpMyAdmin Error 504 Gateway Timeout Reloaded
<p>I have an immensely annoying problem with my phpmyadmin. It appeared out of the blue. No changes that I am aware of have been been to my dedicated server.</p> <p>When i try to execute any query or show a view that takes more than 1 second to execute in my browser (firefox on windows 7, ie behaves the same), i get t...
0
2,160
Refused to load scripts because it violates the following Content Security Policy directive
<p>All of the scripts that come externally have this error:</p> <blockquote> <p>Refused to load the script 'https://code.jquery.com/jquery-3.4.1.slim.min.js' because it violates the following Content Security Policy directive: &quot;script-src 'self' <a href="https://xxxx.com" rel="nofollow noreferrer">https://xxxx.com...
0
1,417
How to re-render directive after a variable is changed?
<p>I am using a directive for star rating. But the template the is loaded before data is loaded from HTTP. So i want to reload directive template after HTTP request is successful.</p> <p>HTML</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js...
0
1,464
Issue sending mail message from ASP.NET MVC application hosted on GoDaddy
<p>I have a form on a MVC Web Application that is hosted over at GoDaddy that users can fill out and send to our office. I am currently testing it using both a Gmail account and a GoDaddy email account (linked to my hosting space). With the Gmail code in place, the email will send fine from my localhost, but when I pu...
0
1,224
Heroku cannot deploy Java 11 Spring Boot App
<p>I am trying to deploy a Spring Boot app on Heroku ,using Java version 11.0.1. The error:</p> <pre><code>Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project my-project: Fatal error compiling: invalid target release: 11 -&gt; [Help 1] </code></pre> <p>Aft...
0
3,581
Service located in another namespace
<p>I have been trying to find a way to define a service in one namespace that links to a Pod running in another namespace. I know that containers in a Pod running in <code>namespaceA</code> can access <code>serviceX</code> defined in <code>namespaceB</code> by referencing it in the cluster DNS as <code>serviceX.namesp...
0
1,504
HTML to PDF (by javascript) how can I add css or table?
<p>In a project I have convert html file into pdf,than it's working fine.But this output not showing css design.Now I need a suggestion how can I add css design with this pdf file?</p> <p>Here the js function code :</p> <pre><code> $(function(){ var doc = new jsPDF(); var specialElementHandlers = { ...
0
1,082
Touch feedback with RecyclerView and CardView
<p>I would love to enable touch feedback for my Open-Source library.</p> <p>I've created a <code>RecyclerView</code> and a <code>CardView</code>. The <code>CardView</code> contains different areas with different <code>onClick</code> actions. Now I would love to trigger the Ripple effect if a user clicks anywhere in th...
0
2,006
Finding frequency distribution of a list of numbers in python
<p>I have a Long list of numbers like the following. I would like to find frequency distribution of each number, but I could not use Counter function to get frequency of each item, as they are integers and I get the error that it is not iterable , and therefore I could not convert the list to strings. I checked the sim...
0
1,214
How to find by id in golang and mongodb
<p>I need get values using ObjectIdHex and do update and also view the result. I'm using mongodb and golang.But following code doesn't work as expected </p> <pre><code>package main import ( "fmt" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" ) type Person struct { Id bson.ObjectId `json:"id" bson:"_i...
0
1,039
Calculate the date of Easter Sunday
<p>Write a program to compute the date of Easter Sunday. Easter Sunday is the first Sunday after the first full moon of spring. Use the algorithm invented by the mathematician Carl Friedrich Gauss in 1800:</p> <ol> <li>Let <code>y</code> be the year (such as 1800 or 2001)</li> <li>Divide <code>y</code> by <code>19</co...
0
1,216
Spring Batch with two different datasource issue
<p>I have a simple Spring Batch application that's pulling records from a database and just printing the rows to the screen. Just a simple POC application.</p> <p>The application works just fine with Spring Boot 1.2.1.RELEASE but when I updated to 1.2.3.RELEASE I get an error message about "No qualifying bean of type...
0
5,131
Segmentation Fault 139 (core dumped) C++ after changing operating system
<p>I had a working program to analyse data in C++ that has produced something like 35 successful data files to date. I was working on Scientific Linux in Code:Blocks when it was working and barring some small errors involving very large grid sizes (1000x1000+) it worked perfectly and produced exactly what I was lookin...
0
3,407
How to upload file in Angular2
<p>I have to submit a form along with image. i have tried this code (with multiple ways) but did't work for me. is there anyone having working demo of file uploading using angular2 please help me out.</p> <p>component.html</p> <pre><code> &lt;form class="form-horizontal" role="form" &gt; &lt;div class="fo...
0
1,304
Uploading an image using C# and WebRequest?
<p>Here is the working code in Python (using cURL):</p> <pre><code>#!/usr/bin/python import pycurl c = pycurl.Curl() values = [ ("key", "YOUR_API_KEY"), ("image", (c.FORM_FILE, "file.png"))] # OR: ("image", "http://example.com/example.jpg"))] # OR: ("image", "BASE64_ENCODED_STRING"))] c....
0
1,407
Giving height to table and row in Bootstrap
<p>I am using Bootstrap 3 , i am trying to give height to <code>table</code> and <code>row</code>, but nothing is working for me .</p> <p>I tried setting <code>line-height</code> and other properties of table, how can I increase height?</p> <pre><code>&lt;style&gt; div#description { background-color: gray...
0
3,157