title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
iCloud Error "The operation couldn't be completed. (LibrarianErrorDoman error 10 - Unable to configure the collection.)"
<p>i want to migrate my existing app to iCloud.</p> <p>in my attempt to learn what to do, i have tried a sample app that has worked as described in the demo (as seen in lecture 17 of the iTunes stanford university course).</p> <p>can someone who has had this problem help me diagnose what step i messed up to cause the...
1
1,897
Google Maps JavaScript API Display Two Routes with Different Polyline Styles on same Map
<p>I am using the Google Maps JavaScript API and would like to display two routes (each with different polyline styles) on the same map. </p> <p>The first route is by mode of driving and the start and finish locations are an address input by the user and a parking garage chosen by the user respectively. This route wi...
1
6,070
Android Studio - Webview - shouldOverrideUrlLoading - Do not open web browser
<p>I developed a Webview app with Android Studio but when the user clicks a link from a web page in the WebView, Android is opening the default web browser. I already checked on Android Developers API Guides how to do but it does not work ;( on my app ... Guides Link: <a href="http://developer.android.com/guide/webapps...
1
2,329
Ansible failed to complete because of deprecated Python even though Python 3 is installed
<p>I'm trying to run LaunchKit from google to get some app screenshots. I've gone through all of the steps on the GitHub page (<a href="https://github.com/LaunchKit/LaunchKit" rel="nofollow noreferrer">https://github.com/LaunchKit/LaunchKit</a>) for the open source code. After going through all the steps and running <c...
1
4,748
Installing scikit-learn on Windows 10
<p>I am trying to install scikit-learn on my Windows 10 machine under python 3.</p> <p>I have python 3 installed and working. In fact I installed a few other libraries without issue, e.g., pandas, matplotlib, beautifulsoup4.</p> <p>My first attempt was a simple <code>pip install scikit-learn</code>. I got an error su...
1
2,610
how to create hyperlink in xsl
<p>I am using following xml and want to display in HTML using xslt.</p> <pre><code> &lt;resultDetailsData&gt; &lt;itemProperties&gt; &lt;ID&gt;0&lt;/ID&gt; &lt;type&gt;RESULTSTATUS&lt;/type&gt; &lt;value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="status"&gt;NOSTATUS&lt;/...
1
1,564
Binding to dependency and regular properties in WPF
<p>I started learning WPF few days ago and have been creating some test projects to evaluate my understanding of the materials as I learn them. According to <a href="http://www.codeproject.com/Articles/18270/A-Guided-Tour-of-WPF-Part-3-Data-binding" rel="nofollow">this article</a>, "a property can only be bound if it i...
1
1,542
Upgrading Symfony project from 3.2 to 3.4
<p>I am trying to upgrade Symfony on Windows 10 machine. Current version is 3.2. I've updated the <code>composer.json</code> package to <code>"symfony/symfony": "3.4.*"</code>. Then I ran <code>composer update symfony/symfony</code> and got the following error message:</p> <pre><code>The requested package symfony/symf...
1
1,600
Couldn't find a `pages` directory. nextjs
<p>I do everything according to the instructions <a href="https://nextjs.org/learn/basics/getting-started/setup" rel="nofollow noreferrer">https://nextjs.org/learn/basics/getting-started/setup</a></p> <p>I run <code>npm run dev</code></p> <p>And displays an error</p> <pre><code>Div-Man@DivMan MINGW64 /f/nextjs/hello...
1
1,520
ActionLink is not passing parameter to the Controller -- asp.Net MVC 4
<p>Please i am having an issue with one of my controllers for hours now. I have succesfully use similar metothos through out the project. However, for some reason this controller's paramterer is always null. Below is my controller.</p> <pre><code>[Authorize(Roles = "Employer")] public class EmployerController : Contro...
1
1,240
Thrift TSimpleServer becomes unresponsive after several successful requests
<p>I have a Thrift API served from a Java application running on Linux. I'm using a .NET client to connect to the API and execute operations.</p> <p>The first few calls to the service work fine without errors, but then (seemingly at random) a call will "hang." If I force-quit my client and try to reconnect, the servic...
1
1,546
ZF2 Module (Application) could not be initialized
<p>I have application.config.php which is 100% right:</p> <pre><code>return array( 'modules' =&gt; array( 'Application', ), 'module_listener_options' =&gt; array( 'config_glob_paths' =&gt; array( 'config/autoload/{,*.}{local,global}.php', ), 'config_cache_enab...
1
1,182
Visual Studio bug with OpenCV?
<p>I have a project made with Visual Studio 2012 using OpenCV, it captures video from an webcam and check if there are faces in. I tested a few days and it was working but today i tested it again and is giving me this error and i dont know what to do! I havent changed anything with the code or the Paths of OpenCV.....<...
1
3,512
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
<p>I'm working on a project where I'm doing encryption, which picked up a key and cryptographer with AES and then step base64. problem happens at the time of decrypting back the base64 to AES and AES and return to String. Below the error and the code</p> <pre><code>import java.io.UnsupportedEncodingException; import j...
1
1,031
How to upload multiple files separately in Flask?
<p>Here is the problem I have. I need to create a web app capable of uploading two files of separate types (wav files and midi/MusicXML files respectively). Right now this does not work. Here is my code:</p> <p><code>app.py</code></p> <pre><code>flask import Flask UPLOAD_FOLDER = '/Users/CatLover/Documents/DataScien...
1
1,623
Spring Boot cannot connect to MySQLand exits in Docker/Docker compose
<p>Below is my <code>application.properties</code> file </p> <pre><code>spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/test?autoReconnect=true spring.datasource.username=root spring.datasource.password=root spring.jpa.database-platform=org.hibernate.di...
1
8,618
Accessing Microsoft Graph With PowerShell
<p>I've been having a hell of a time trying to access the Microsoft Graph using PowerShell. </p> <p>First I tried using the <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#request-an-authorization-code" rel="nofollow noreferrer">authorization flow</a> and ...
1
1,282
Mingw and SDL2 include (VS code)
<p>So, I try to use the <strong>SDL2 library</strong> in a C++ project (on <strong>Visual Studio Code</strong>). I use <strong>Mingw</strong> to compilate, but I keep having error :</p> <pre><code>D:\Path/View/View.cpp:20: undefined reference to `SDL_Init' D:\Path/View/View.cpp:21: undefined reference to `SDL_CreateWi...
1
1,194
How do I specify multiple variable constraints using Integer Programming in PuLP?
<p>I am trying to solve the Bin Packing Problem using the Integer Programming Formulation in Python PuLP. The model for the problem is as follows:</p> <p><a href="https://i.stack.imgur.com/XYa3Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XYa3Z.png" alt="enter image description here"></a></p> <...
1
1,332
sent a message to all clients with c programming
<p>İ am trying make a chat program.Server will get a msg and then sent all other clients.</p> <p>There are no problem to get message from client.But when it came <em>SendToAll</em> function doesnt work.</p> <p>thanks your help</p> <p><strong>SERVER</strong></p> <pre><code> #include &lt;stdio.h&gt; #include &...
1
2,873
java.io.FileNotFoundException: null\conf\wrapper.conf (The system cannot find the path specified)
<p>I've been using this tutorial <a href="http://mpjexpress.blogspot.co.nz/2010/05/executing-and-debugging-mpj-express.html" rel="nofollow noreferrer">http://mpjexpress.blogspot.co.nz/2010/05/executing-and-debugging-mpj-express.html</a>, <b>text: </b><i>steps 1,2,3</i> and <b>video:</b><i> steps between 0:00 to 3:29</i...
1
1,745
Nest.JS and Observables
<p>I am new to Nest.JS and apparently don't understand how to use observables so hopefully ya'll can help.</p> <p>Basically I have a method that needs to: first: login to hashicorp vault and return a client_token via an http call. second: if we got a token back from vault, we then check that the request contained a cer...
1
1,060
New entities added using Symfony2 many-to-one embedded forms not being saved
<p>This is related to my <a href="https://stackoverflow.com/questions/11015952/using-jquery-in-symfony2-php-template#comment14431438_11015952">earlier question about embedded forms</a>. As advised, I switched to a twig template and now everything is displaying as expected and the link to add a new empty form is workin...
1
3,524
How to Update the value of textbox in asp.net using c#?
<p>I have this program in asp.net using C# .aspx</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://...
1
1,321
Page_load fires twice for UpdatePanel refresh whilst having a jQuery bound change event on a drop down list
<p>I've tried to wrap up my problem with a complete example below - the original problem is part of a jQuery plug-in that I'm writing to extend the behaviour of an ASP.NET ajax application I already have.</p> <p>The aspx page below has one drop down list which is marked for auto post back. I've also bound a change eve...
1
1,749
Using JQuery UI Autocomplete in Cakephp 2.0
<p>I'm having trouble implementing JQuery UI Autocomplete in CakePHP 2.0. Want to display a list of Items on a Grocery list view to allow users to select an item already in the database instead of creating a new one.</p> <p><strong>Application Jquery</strong>:</p> <pre><code>////file:app/webroot/js/application.js $(d...
1
1,610
Aptana 3 becomes very sluggish with multiple (large) projects, how do I improve performance?
<p>Aptana 3 becomes very sluggish with multiple (large) projects, how do I improve performance? </p> <p>I have several projects that I checkout of subversion into a dev directory that I can access through Apache as well. Something like this</p> <p>So if I go to this URL <a href="http://local.dev" rel="noreferrer">htt...
1
1,025
How to fix "User validation failed: password: Path `password` is required., email: Path `email` is required., name: Path `name` is required."
<p>I'm a beginner who starts to learn node.js. In the middle of the way, I got a problem with a notification like this</p> <pre><code>{ &quot;errors&quot;: { &quot;password&quot;: { &quot;name&quot;: &quot;ValidatorError&quot;, &quot;message&quot;: &quot;Path `password` is required.&quot;, &...
1
1,791
Scala java.lang.String cannot be cast to java.lang.Double error when converting double type dataframe to LabeledPoint in Spark
<p>I have a dataset of 2002 variables. All variables are numeric. I first read in the dataset to Spark 1.5.0 and created a Double Type dataframe following the instruction <a href="http://spark.apache.org/docs/latest/sql-programming-guide.html#programmatically-specifying-the-schema" rel="nofollow noreferrer">here</a> . ...
1
1,637
ASP.NET MVC - How to display an "ActionResult" view that is returned to javascript?
<p>I'm using DotNetOpenAuth with a custom login provider to sign users into my site. I have most of the code working, but am having an issue returning the view and displaying it so users can log into the provider. Basically, the action is returning an actionresult which is the login page on the specific provider back...
1
1,681
Sending an xml message in parts through a TCP socket using Qt
<p>We are writing a project where there is a client who generates xml requests, sends them to a server, who parses the request and returns the requested information in an xml string.</p> <p>The application works fine when the xml replies are small, but when they exceed about 2500 characters they sometimes get cut off ...
1
1,694
setting up Postgresql 9.1 database in Django for ubuntu 11.10
<p><br> I am trying to configure Postgresql 9.1 in Django 1.3 . <br> Note: I am doing this in Ubuntu 11.10 (oneric). Also I have postgis 1.5 installed to work with Postgresql 9.1<br></p> <p>To my best knowledge, I have installed all the dependencies required.<br> I read the instructions from <a href="http://haineault....
1
1,931
How can I receive OutputDebugString from a service?
<p>I'm trying to catch all <a href="http://msdn.microsoft.com/en-us/library/aa363362%28v=vs.85%29.aspx" rel="nofollow noreferrer">OutputDebugString</a> messages (including those from services) using the following code. It worked fine until I migrated to Windows 7.</p> <p>The problem is that since Windows Vista service...
1
1,124
java.lang.NoClassDefFoundError in android.test.ServiceTestCase
<p>Every time I start my Android instrumentation test it fails with</p> <pre><code>android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests: Error in testSuiteConstructionFailed: java.lang.RuntimeException: Exception during suite construction at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests....
1
1,261
Connection Refused - Why does zookeeper tries to connect to localhost instead of a server ip
<p>My Reduce Tasks fail because all the namenode fails trying to connect to localhost instead of 10.10.187.170 ..</p> <p>My application even tries to connect manually in the code..</p> <pre><code>Configuration conf = HBaseConfiguration.create(); conf.set("hbase.zookeeper.quorum", "10.10.187.170"); conf.set("hbase.zoo...
1
1,323
Shopify Featured Product Slider
<p>So I have a featured section part of a Shopify website, I initially was going to set up an array of static data and have the featured product fade in/out every few seconds through that. However, my JS isn't working yet I am POSITIVE it's correct. Is this a problem with Shopify itself? If anyone could explain to me a...
1
1,167
Sending form data in Spring controller without using annotation
<p>I want to send form input data in controller without using annotation. </p> <p>In this code I'm trying to get the <code>employeeNo</code>, <code>empName</code>, <code>deptNo</code> form the jsp file in which I have used Spring <code>&lt;form:form&gt;</code>, <code>&lt;form:input&gt;</code> tags but as I try to get ...
1
3,821
GoogleMaps SVG marker fillColor
<p>I am currently trying to change the color of an existent marker.</p> <p>Here is my javascript code:</p> <pre><code>$(".etablissement").mouseenter(function() { var currentMarker = oMarkers[$(this).data("type")+"-"+$(this).data("id")]; var currentIcon = currentMarker.getIcon(); currentIcon = ...
1
2,704
Java 8 - Most effective way to merge List<byte[]> to byte[]
<p>I have a library that returns some binary data as list of binary arrays. Those byte[] need to be merged into an InputStream. </p> <p>This is my current implementation:</p> <pre><code>public static InputStream foo(List&lt;byte[]&gt; binary) { byte[] streamArray = null; binary.forEach(bin -&gt; { or...
1
2,176
MSBUILD : error MSB1009: Project file does not exist when building docker file for an ASP.NET Core API application
<p>I am trying to build a docker image for an ASP.NET Core 3.1 application and I fail to restore the packages. My solution has multiple projects and after copying all the project files, I am trying to create a layer which contains restored dependencies only.</p> <h3>The docker file</h3> <pre><code>FROM mcr.microsoft....
1
1,467
FilesAlreadyExistsException when using Files.copy() on File.createTempFile()
<p>I'm using JSF <code>&lt;h:inputFile&gt;</code> to upload images to the server. </p> <pre class="lang-html prettyprint-override"><code>&lt;h:form enctype="multipart/form-data"&gt; &lt;h:inputFile value="#{fileHandlerBean.file}"/&gt; &lt;h:commandButton action="#{fileHandlerBean.uploadImage()}"/&gt; &lt;/h:fo...
1
1,187
Failed to write statements
<p>i'm using spark with cassandra and i want to write data into my cassandra table: </p> <pre><code>CREATE TABLE IF NOT EXISTS MyTable( user TEXT, date TIMESTAMP, event TEXT, PRIMARY KEY((user ),date , event) ); </code></pre> <p>But i got this error : </p> <pre><code>java.io.IOException: Failed to write statemen...
1
2,875
Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister - BuldSession Error
<p>somebody know why this keeps happening? I'm using Hibernate, Mysql, Maven, Spring. I've looking in every post but i can't find the solution. Thank you :)</p> <pre><code>Class Libro package com.webservice.serviceDos; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; imp...
1
6,089
Failed prop type: Invalid prop `region.latitude` of type `string` supplied to `MapView`, expected `number`
<p>I'm using react-native 0.61 and I got two files. As you can see below I'm passing location from FethcLocation.js to app.js file and assign it as a location object. Then I pass down it to the userMaps.js file and assign it to longitude and latitude values. but I'm getting an error saying...</p> <hr> <blockquote> ...
1
1,328
Hadoop and hbase java client.. issues with HbaseRPC
<p>I am trying to insert the data into hbase.I am running java program from remote machine. I have mentioned the code below.</p> <pre><code>try { Configuration conf = HBaseConfiguration.create(); conf.clear(); conf.set("hbase.zookeeper.quorum", "&lt;HOST_IP&gt;:2181"); conf.set("hbase.zookeeper.propert...
1
1,556
Unity3d charactermotor falling through/sliding off moving platforms
<p>Currently implementing moving platforms within my game, I've managed to get the platforms using a switch &amp; cases however when it comes to keeping the player onto the platform either the platform slides under the player and the player falls off after platform has passed or in the case of the platform going up the...
1
1,622
Google Cloud Platform API -> "The OAuth client was deleted." Error
<p>I'm using the Google Cloud Platform API for Java (google-api-services-storage - v1beta2-rev39-1.17.0-rc).</p> <p>For a couple of month It was working fine, but now I got the following error when I execute an operation.</p> <p>I didn't found why the error appear. I checked if there is new version of the API but the...
1
1,779
how to random questions in android
<p>I'm developing a simple quiz in my android project, and I have created 15 sample questions. I want to randomise the questions, but I don't know how to write the code for that. This is what I have so far</p> <pre><code>package com.adm.kana; import android.app.Activity; import android.content.Intent; import android....
1
1,322
How to manage blocs thrown exceptions with StreamBuilder?
<p>I'm trying to return a snapshot error state to my StreamBuilder when my provider has problems during the <code>http.get()</code> call. In my case I throw an exception when the the <code>http.get()</code> return a state different from 200 (OK). I would like to be able to return a bad state to snapshot and execute the...
1
1,789
Django Rendering Radio Button Options with Extra Information from Model
<p>I have a Location model and an associated form that displays the "location" field as a bunch of radio buttons (using the form queryset to display the values). There are a small number of locations, but they need to be dynamic. I'd like to display the location description next to each radio box option so users have...
1
1,956
How to update select items based on the selection from the first select items using react
<p>I have an array of objects like this:</p> <pre><code> const items = [ { country:"USA", level:1}, { country:"Canada", level:2}, { country:"Bangladesh", level:3}, ] </code></pre> <p>And in my Form component( I am using React Formik library)I am rendering the items like this:</p> <pre><code> &lt;Field nam...
1
1,059
SFML TCP packet receive
<p>I send a packet as client to server and I want to the server sends that packet forward to all client, here is the code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;SFML/Network.hpp&gt; using namespace std; int main() { int fromID; // receive data from 'fromID' int Message; // fromID's message sf::SocketT...
1
1,401
Application crash due to dereference garbage pointer
<p>I am seeing few random crashes in my iPod application with following message common in all the crash reports (though they have different thread traces). The crash is not reproducible - it occurs pretty randomly.</p> <p><strong>Attempted to dereference garbage pointer</strong></p> <p>I am also attaching a sample cr...
1
5,076
adding or removing classes based on route changes in angular
<p><a href="https://i.stack.imgur.com/wGIl5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wGIl5.jpg" alt="enter image description here"></a>I have 3 routes containing 3 forms Im trying to set bootstrap active class on current tab based on the current route in angular.I used angular route module. H...
1
3,912
how to draw a straight line in javafx that updates itself when the user moves the mouse?
<p>So, I know how to do free hand lines but I want a straight line so when a user clicks a point to the point where the user releases the mouse and when the user drags the mouse the end point should move with the mouse i.e similar to drawing straight lines in the paint app.</p> <p>Presently working with this code:</p>...
1
1,168
How to force the update of an Access combobox?
<p>Is there a technique I'm overlooking when coding my form?</p> <p>I have a pair of cascading combos.</p> <ol> <li><p>ComboSource filters the options available for choice in ComboInformation</p></li> <li><p>ComboInformation sets the contents of a mandatory field in a table</p></li> </ol> <p>The rowsource for ComboS...
1
1,222
django: side menu template visible everywhere
<p>I need to create a side menu in my django admin that should appear in all pages. Ideally my template should be a generic navigation.html file containing this code and parsing app_list param (the same that is used into index.html template populating the dashboard):</p> <pre><code>{% block side_menu %} {% if app_list...
1
1,125
d3.js v4 wacky link transition in collapsible tree example
<p>If you play with the collapsible tree below you'll see that when you get to the end of the tree, and expand and collapse the nodes the lines are doing some wacky stuff and I am no entirely sure what drives the behavior or if my rewriting of <a href="https://bl.ocks.org/mbostock/4339083" rel="nofollow">enter link des...
1
3,463
Asynchronous calls to Oracle DB using ADO.NET
<p>I am trying to perform multiple database calls using async and await features available in .NET Framework 4.5. This is the first time I am implementing this feature. </p> <p>if each query is taking 7 seconds, it used to take 35 seconds(5 queries * 7 seconds). With below implementation, I was expecting it should fet...
1
1,449
Epoch 1/2 103/Unknown - 8s 80ms/step - loss: 0.0175 (model.fit() keeps running forever even after crossing the total number of training images)
<p>I am developing autoencoder on the dataset <a href="https://www.kaggle.com/jessicali9530/celeba-dataset" rel="noreferrer">https://www.kaggle.com/jessicali9530/celeba-dataset</a>.</p> <pre><code>import tensorflow tensorflow.__version__ </code></pre> <hr> <p>Output:</p> <pre><code>'2.2.0-rc3' </code></pre> <hr> ...
1
2,058
How to correct this PowerShell script that auto deletes Sharepoint backups
<p>I've <a href="http://imperfectit.blogspot.com/2010/03/automate-sharepoint-2010-farm-backups.html" rel="nofollow">been using this</a> (<a href="http://blog.wauwwie.nl/Lists/Posts/Post.aspx?ID=4" rel="nofollow">and this</a>) script to delete older sharepoint backups, but it deletes all backups rather than the 14+ day ...
1
1,506
Recursive tree view in ReactJS
<p>I'm trying to implement a tree view out of a JSON data with ReactJS, I have most of the work done but I have a problem with the expand and collapse buttons. As it is now when clicking one of the subtrees node successfully expands the whole tree, the problem is that according to the component's state (collapsed / exp...
1
2,199
Using a partial class property inside LINQ statement
<p>I am trying to figure out the best way to do what I thought would be easy. I have a database model called Line that represents a line in an invoice.</p> <p>It looks roughly like so:</p> <pre><code>public partial class Line { public Int32 Id { get; set; } public Invoice Invoice { get; set; } public Str...
1
3,290
Django Formsets: ManagementForm data is missing or has been tampered with
<p>I am using inline formsets. I have a main form <strong>application</strong>. Then 2 formsets <strong>employ</strong> and <strong>qual</strong>.</p> <p>When I run my view. I get an error saying <strong>ManagementForm data is missing or has been tampered with</strong></p> <p>Here is my view</p> <pre><code>@login_re...
1
2,074
MVVM with Unity and Unit Testing architectural design
<p>I'm building a Visual Studio-like application in WPF and I'm having some problems identifying the best architectural design organization of my components. I plan to use Unity as my dependency-injection container and Visual Studio Unit Testing framework and probably moq for mocking library.</p> <p>I'll first describ...
1
1,323
wxPython - Align buttons in an expanding sizer
<p>I'm trying to make a dialog that looks similar to the wx.MessageDialog. There's a section at the bottom that coloured different but in my code, the buttons will not cooperate.</p> <p>The buttons should be aligned right, and the bottom section should expand to colour it grey. There's probably a simple solution, anyo...
1
1,514
Trying to upload multiple images using XHR 2 and PHP
<p>I'm having problems trying to upload files using the latest XHR 2 along with PHP.</p> <p>My code is as follows:</p> <p>HTML...</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;XHR Multiple File Upload&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="uplo...
1
2,008
socket.gaierror: [Errno 11001] getaddrinfo failed in django
<p>I am trying to build an ecommerce store with python and django. I am currently building a <code>pay_on_delivery</code> option, and for that, I am sending an email to myself from the email of the user. Here is my <code>OrderForm</code>:</p> <pre><code>class OrderForm(forms.Form): name = forms.CharField(max_length...
1
1,691
How do I properly map attributes of relations in sequelize.js?
<p>I'm creating a recipe-database (commonly known as a cookbook) where I need to have a many-to-many relationship between ingredients and recipes and I'm using <a href="/questions/tagged/sequelize.js" class="post-tag" title="show questions tagged &#39;sequelize.js&#39;" rel="tag">sequelize.js</a> in combination with <a...
1
1,152
EF SaveChanges method throws: The relationship could not be changed because one or more of the foreign-key properties is non-nullable
<p>When i save an order from my winforms app it works ok. But when i try to add a second one the SaveChanges() method throws an exception:</p> <blockquote> <p>The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a rela...
1
1,642
Want custom keyboard to ONLY be used for MY APP and restore previous when app loses focus
<p>I made this "custom keyboard" by following the wonderful outline in <a href="http://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615" rel="nofollow noreferrer">this link</a> AND NOT USING ECLIPSE. I used Android Studio (<strong>AS</strong>) 1.1.0.</p> <p>Here's a screenshot from my device:...
1
2,444
Entity Framework 6 Unit Testing (NSubstitute) - How to test that an object with children does not return children when children are not requested
<p>I have a method to get an Employer using an Entity Framework context (Lazy Loading is disabled). Sometimes I want the Employees included, sometimes I don't so I have the following code in my data access class:</p> <pre><code>public Employer GetEmployer(int employerId, bool includeRelationships) { Employer emplo...
1
1,245
How do I correctly draw 3D axis in OpenGL?
<p>I am trying to draw the 3D axis. I have also a cone which is rotating around its vertex and I would want the axis starting from there.</p> <p>Here I have my function to draw the cone and I wrote the functions to draw the axis after <code>gluLookAt</code>:</p> <pre class="lang-cpp prettyprint-override"><code>GLfloat ...
1
1,305
Formvalidation.io - Cannot read property 'classList' of null
<p>I am always getting an error in my console when using formvalidation.io.</p> <p><a href="https://i.stack.imgur.com/EKM11.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EKM11.png" alt="enter image description here"></a></p> <p>I have no idea what the cause of this error is. I also still get spam...
1
3,854
NotFound cannot be converted to Throwable
<p>I want to achieve one objective. I am sharing my concept with demo code.</p> <pre><code>interface NotFound{ //define one marker interface which will mark not found } class ServiceException extends RuntimeException{ } class TeacherServiceException extends ServiceException{ } class TeacherNotFound...
1
1,238
A Desktop App in Java using Facebook API (java.net.UnknownHost Exception)
<p>I am trying to build a desktop app in java using facebook API provided by google. I have a number of questions :</p> <p><p>1) Do I have to make use of socket programming? (coz I am a newbie and I haven't :/ ) <p>2) And it is giving a java.net.UnknownHost Exception in facebook api when I try to create a auth_token.<...
1
1,325
PHPEXCEL- how to remove hidden line breaks from cells
<p>I'm trying to upload an excel sheet which contains financial data. It has account numbers on column A and when I upload the sheet COL A data comes with "<em>x000D</em>". When I google this it says something to do with hidden line breaks on cells. Does anybody know how to remove these line breaks from cells? Thanks<...
1
1,475
How do I debug or fix the endless loop and heap corruption issue involving boost::interprocess managed_shared_memory?
<p>I have the following "first-chance exception" message which is coming from a DLL I wrote which is running inside an executable that I did not write. That is, the DLL is a plugin. The first time this exception fires, an attempt to open a shared memory map file is failing. If I ignore first chance exceptions and just...
1
2,249
How to center a div with css-grids?
<p>You can see my project here: <a href="https://jsfiddle.net/alphatier/byfvpq8h/2/" rel="nofollow noreferrer">https://jsfiddle.net/alphatier/byfvpq8h/2/</a></p> <p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false"> <div class="snippet-code snippet-currently-hidden"> <pre clas...
1
12,615
Are server 500 errors a security issue?
<p>I've found that it's possible to cause 500 errors on a server using curl and a faked GWT-Permutation with a POST payload. The payload is generating a java.lang.Exception on an Apache server. </p> <p>Does this open up a security issue? Should I report it to Google's GWT support?</p> <p>To clarify the question: Woul...
1
1,094
Properly delegate button action from custom Cell to delete rows in UITableView
<p>Still very much a Swift noob, I have been looking around for a proper way/best practice to manage row deletions in my <code>UITableView</code> (which uses custom <code>UserCell</code>s) based on tapping a <code>UIButton</code> inside the <code>UserCell</code> using delegation which seems to be the cleanest way to do...
1
1,228
How to execute a MySQL command using shell script from PHP page?
<p>I want to execute a shell script from php page which will execute a MySQL command.</p> <p>To do this I followed the way shown here: <a href="https://stackoverflow.com/a/8055745/2117868">https://stackoverflow.com/a/8055745/2117868</a></p> <p>Here is my <code>sqlscript.sh</code></p> <pre><code>#!/bin/sh sudo wget -...
1
1,154
Elements not wrapping as expected in IE 8/ 9
<p>Yet another "IE is doing something different from other browsers" question but this is one is slightly unusual in that IE7 does the correct thing but IE 8 and 9 do not.</p> <p>Here is the situation, I have a simple 3 column layout. The first 2 columns are fixed width and the third I want to be variable width so th...
1
1,844
If has class then remove class and add class
<p>Having an issue here. This should be working... I have 4 elements in html that look like this</p> <pre><code> &lt;!-- Light Color Scheme - Header False and Show Faces True --&gt; &lt;div class="fb-like-box h-f_dsf-t visible" data-href="http://www.facebook.com/pages/Alpine-Adaptive-Scholarship-Program/344...
1
1,180
@babel/polyfill (Babel 7 beta) causes a SyntaxError
<p><strong>Please don't mark this as a duplicate of any Babel <em>6</em> questions, because this is specifically about Babel <em>7</em>!</strong></p> <p>I'm trying out the new Babel 7 beta (<code>@babel/polyfill@7.0.0-beta.32</code> etc.) and I'm having troubles using <code>@babel/polyfill</code>.</p> <h2>Summary</h2...
1
1,746
AssertionError: Importing test library 'Dialogs' failed: ImportError: No module named _tkinter
<p>I trying to debug a Robot Framework test on my Plone add-on package by using the following as I found in the <a href="http://docs.plone.org/external/plone.app.robotframework/docs/source/debugging.html" rel="nofollow">documentation</a>:</p> <pre class="lang-none prettyprint-override"><code>*** Settings *** Resource...
1
1,591
How to hide div in the view of MVC?
<p>I am developing MVC application and using razor syntax.</p> <p>In this application I am giving comment facility.</p> <p>I have added a partial view, which loads the comment/Records from DB.</p> <p>In below image, we can see the comment box which is called run-time for employee index view.</p> <p>Now I want to re...
1
1,519
Installing software has encountered a problem
<p>Using eclipse 2019 and try to install Spring from marketplace. I still new in develop microservices. Here is the error that i got :</p> <blockquote> <p>An error occurred while collecting items to be installed session context was:(profile=C__Users_samazlan eclipse_java-2019-09_eclipse, phase=org.eclipse.equin...
1
1,704
CLion Cannot run program "make" The system cannot find the file specified
<p>When opening a makefile project in CLion I get the error message:</p> <pre><code>Cannot run program &quot;make&quot; (in directory &quot;D:\Werkstudent\XWF\XT_Einzelauswertung&quot;): CreateProcess error=2, The system cannot find the file specified: CreateProcess error=2, The system cannot find the file specified Ma...
1
2,318
Visual Studio's IIS Express: Could not load file or assembly
<p>I got myself into some problems, when trying to load a solution (GMap.NET), which I had some problems to build. Not sure that matters now though.</p> <p>I am developing a small system in Visual Studio 2015, which also has a MVC project. When I launch the basic website - more or less just the initial MVC 5 template ...
1
3,075
eclipselink PersistenceUnitLoadingEception in executable JAR
<p>I am developing a stand-alone java application which uses eclipselink. It is all fine when I execute the app from eclipse IDE. But I've exported an executable JAR file, and since than I can not make eclipseLink work. I have found similar issue in the Eclipse community forum <a href="http://www.eclipse.org/forums/ind...
1
1,905
Python dividing time intervals into hourly buckets in
<p>I have a dataset as below where each ID can checkin and chekout at any given time and duration</p> <pre><code> ID checkin_datetime checkout_datetime 4 04-01-2019 13:07 04-01-2019 13:09 4 04-01-2019 13:09 04-01-2019 13:12 4 04-01-2019 14:06 04-01-2019...
1
1,550
Python - Sorting file highest to lowest and alphabetically
<p>I have created an arithmetic code, that asks the user 10 questions, and then stores their name and score in a database e.g. <code>C:\class1.txt</code> and I'm now at the stage, where I should be able to sort the file containing the name and the score of multiple pupils from each individual class, in both highest to ...
1
1,580
C# rectangle drawing and screenshot
<p>So, let me just start out by showing you the code I have now:</p> <pre><code> private void Form1_MouseDown(object sender, MouseEventArgs e) { currentPos = startPos = e.Location; drawing = true; } private void Form1_MouseMove(object sender, MouseEventArgs e) { currentP...
1
1,311
session destroying in codeigniter after redirecting
<p>In my login controller i have stored all user data in session. i have verified also by printing </p> <blockquote> <p>all_userdata();</p> </blockquote> <p>when redirected to another controller <strong>home</strong> the session was destroyed. please help me to solve this issue. The session data is as follows.</p>...
1
4,755
Vue 3 composition API: issue with computed to filter array
<p>I am learning the <strong>Vue 3 composition API</strong> and I did a simple post list (simply creating an array of post in the setup() with tags for each posts) as below first code section. Then I have a component PostList to display those posts and a TagCloud to show all the existing tags. I am trying to filter the...
1
1,627
Implementing Iterator on a Linked List
<p>I am creating a implementation of a LinkedList using just a few of the methods in the standard implementation. I have faced a problem when adding the Iterator functionality to my LinkedList. </p> <p>Right now I can add some elements, and then to something like this </p> <pre><code>class testList { public stati...
1
1,465
Unknown permission in package for android GCM register
<p>I am trying to get registration id for android device but I am getting following warnings:</p> <pre><code> 02-21 18:23:46.437: W/PackageManager(1495): Unknown permission in package 02-21 18:23:46.437: W/PackageManager(1495): Unknown permission in package 02-21 18:23:46.437: W/PackageManager(1495): Not granting...
1
2,857
Rabbit-Mq not routing to dead letter queue after being rejected
<p>I'm currently playing around with Rabbit-Mq, and am trying to implement a "dead-letter" queue, a queue for failed messages. I've been reading the rabbit documentation: <a href="https://www.rabbitmq.com/dlx.html" rel="noreferrer">https://www.rabbitmq.com/dlx.html</a>.</p> <p>and have come up with this example:</p> ...
1
1,543
How to make fonts available to the LaTeX interpreter in Matlab R2013a?
<p>It is possible to embed LaTeX-formatted text and equations into Matlab plots by setting the <code>text</code> property 'Interpreter' to the value 'latex', e.g.</p> <pre><code>text(0.1, 0.5, 'Einstein: $E = m c^2$', ... 'Interpreter', 'latex', 'FontSize', 32) </code></pre> <p>These equations appear on screen as...
1
1,240