title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Override height of a single MenuItem in a NavigationView
<p>I'd like to increase the height of a <strong>single</strong> <code>MenuItem</code> inside a <code>NavigationView</code>. </p> <p>I am trying to put a Google <code>MapFragment</code> inside the item's <a href="https://developer.android.com/guide/topics/resources/menu-resource" rel="nofollow noreferrer"><code>actionL...
2
1,049
Non-English Language Synonym Filter Factory for SOLR
<p>I have been trying to use the synonym.txt file and the SynonymFilterFactory that ships out of the box with SOLR Lucene, with Indian Languages (Hindi for POC) but it doesn't seem to work as it works for English.<br/></p> <p>Found <a href="https://stackoverflow.com/questions/27128070/solr-russian-synonyms-are-not-wor...
2
1,470
New to Spark. - getting java.net.BindException: Cannot assign requested address
<p>I am new to Spark. Just installed version 1.6.0 in my laptop (Ubuntu) and proceeded with an example using the phyton's shell (pyspark). However, I cannot figure out what this error is telling me. Can you please help? any help is appreciated. </p> <pre><code>&gt;&gt;&gt; lines = sc.textFile("spark-1.6.0/README.m...
2
1,287
On running sonar analysis on react-native project getting error related to sonar.java.binaries property
<p>I have a react-native project written in JavaScript for which I'm trying to run the sonar-analysis.</p> <p>I have a sonar server set-up for this and system where I'm trying to run the analysis has Sonar-scanner, npm and all other project dependencies installed.</p> <p>However, When I run the sonar analysis on the ...
2
1,263
Connecting to Google Cloud SQL (PostgreSQL) locally and through App Engine Flex
<p>Locally: My local environment is Mac OS. I'm attempting to connect to my Cloud SQL (PostgreSQL) db using Java 8. I've whitelisted my IP and I am able to connect to the DB using pgadmin. My service account is also project owner for the project that the database is hosted in and the app engine environment</p> <p>This...
2
3,659
Python3: Multi-label text classification with reuters 21578 data set
<p>I am using the following code to classify a document in to three categories Sports, Politics and money. I can see that this code calculates Precision recall and F1. But I am not able to find a way to use this code to test against custom document a predict its label. </p> <pre><code>from nltk.corpus import stopwords...
2
1,179
Retrieving Celery task kwargs from task-failed / uuid
<h2>Main Issue</h2> <p>I'm testing how to handle certain task failure, for example handling a 'TimeLimitExceeded' exception which instantly kills the task and is not 'catchable' (Yes...I'm aware of the existence of 'SoftTimeLimit' but it doesn't fit my needs).</p> <h3>First Approach</h3> <p>This is my <code>tasks.py...
2
1,715
Nested ContentControls with template
<p>I have a custom <em>WindowStyle</em>, the XAML looks like this:</p> <pre><code> &lt;Style TargetType="{x:Type Window}" x:Key="WindowStyle"&gt; /** Some setters **/ &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="ContentControl"&gt; ...
2
2,578
SQL Server Merge, how to subset target by date range (year)
<p>I have been reading up on the MERGE syntax in SQL Server and it's perfect for what I need it to do, however I cannot for the life of me figure out how to prevent the target table from deleting old data that I don't want to match against.</p> <p>I have 11 million rows in Target, and I only want to match current year...
2
4,400
Google Maps API v3 in PhoneGap: Circle duplicating and drawing tangent line after move
<p>(This is a split off from my other post I made, <a href="https://stackoverflow.com/questions/13505692/google-maps-api-v3-in-phonegap-markers-not-drawing-properly-after-move">Google Maps API v3 in PhoneGap: markers not drawing properly after move</a>) . I've been working on a Google Maps API 3 application on Android...
2
1,956
Error consuming SOAP 1.1 operation send attachment using MTOM optimization
<p>I'm trying to consume a SOAP service that receives a message with an attachment. With SoapUI I made the call the service with success, but using WSO2 Integrator I receive the follow response error from server:</p> <p></p> <pre><code>OSB-382000: Couldn't create SOAP message due to exception: XML reader error: com.c...
2
12,366
Image Segmentation and Masking
<p>Need assistance with the simple task. I’m playing around with the <a href="http://users.cecs.anu.edu.au/%7Ehrezatofighi/Data/Leukocyte%20Data.htm" rel="nofollow noreferrer">LISC dataset</a> that contains hematological images taken from peripheral blood and segmentation masks of manual ground truth for these graphica...
2
1,245
R: Trying to format a data.frame created from a JSON object so that I can use write.table
<p>I’m using the R programming language (and R Studio) having trouble organizing some data that I’m pulling via API so that it’s writeable to a table. I’m using the StubHub API to get a JSON response that contains all ticket listings for a particular event. I can successfully make the call to StubHub, I get the succe...
2
2,375
TypeError: Router.use() requires a middleware function but got a undefined
<p>Everyone I'm beginner in NODEJS I'm trying to do small chat app.I'm facing routing problem in <strong>server.js.</strong> <strong>[ in the line app.use('/',chatcat.router); ]</strong>.I have attached the error below. Can anyone tell me?.how to resolve this problem. Thanks in advance...</p> <p>server.js</p> <pre><c...
2
1,535
What do I need to quote in sed command lines?
<p>There are many questions on this site on how to escape various elements for sed, but I'm looking for a more general answer. I understand that I might want to escape some characters to avoid shell expansion:</p> <blockquote> <p><a href="http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_03.html" rel="nofollow">...
2
1,120
Are layer-hosting NSViews allowed to have subviews?
<p>Layer-hosting NSViews (so NSViews that you supply a CALayer instance for and set it with <code>setLayer:</code>) can obviously contain subviews. Why obviously? Because in Apple's own <a href="https://developer.apple.com/library/mac/#samplecode/CocoaSlides/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004072" rel=...
2
1,061
Counting previous Attributes with a specific value in XSLT
<p>I apologize ahead of time if this isn't properly formatted, but...</p> <p>I need to take the following xml:</p> <pre><code>&lt;box r="?" c="?" b="?"&gt; &lt;h r="?" b="2"&gt; &lt;u&gt; &lt;v c="5" b="2"&gt; &lt;l&gt; &lt;h r="?" b="1"/&gt; &lt;/l&gt; &lt;r&gt; ...
2
1,219
Ionic ios capacitor splash screen working, but unable to add images
<p>I am trying to display a custom splash screen using ionic capacitor. I followed the splash screen documentation and got it working for general color backgrounds. But when I attempt to add images, it doesn't work. Here is my code:</p> <p>capacitor.config.json:</p> <pre><code>&quot;SplashScreen&quot;: { &quot;launc...
2
1,156
How to use JUnit and Mockito to mock inner logic
<p>I'm kind of new to Junit and Mockito and trying to understand how to mock parts of logic of a class. </p> <p>I have a method which does a http post and get call, but it might be a DB lookup. How do I mock the response from the HTTP call in this method</p> <pre><code> BufferedReader in = new BufferedReader(new Inp...
2
1,040
I have no idea why did Boost Asio SSL handshake always fail?
<p>I tried use Boost Asio and Openssl to post some json to a SSL server,my case was it sucks when the code execute handshake with the server,the error was "handshake: certificate verify failed" and I have no idea even I have Googled and viewed a branch of relative web pages ,I didn't find the answer yet,the SSL client...
2
1,828
How to bind to Tabcontrol.Items
<p>I have a WPF application that I'm trying to dynamically add items to a tabcontrol. I have a list of menu items that should be databound to the tabcontrol's items. The only problem is that TabControl.Items does not notify others that items have been added. I've tested this by binding instead to TabControl.Items.Co...
2
1,110
Python / Django / Bootstrap - How to add images to the bootstrap carousel via website admin panel?
<p>I have the following problem:</p> <p>For now I have a working static bootstrap carousel with 3 images. The main idea is to add an app which allows to change these images via the website admin panel. Now I have:</p> <p><strong>model.py</strong></p> <pre><code>class BGImagesModel(models.Model): image1 = models....
2
1,448
Umbraco custom validation form fields (confirmaton)
<p>I'd like to write a simple confirm email validation field in a form, what's the best way? here is my code till now, just a basic form. For confirmationEmail field I'd like to have a real time validation like the email field, not only on submit as I did:</p> <p>controller</p> <pre><code> public class ContactControl...
2
1,488
segfault when setting bool possible?
<p>I have a binary tree, whose nodes are defined as</p> <pre><code>typedef unsigned long ul; struct Fibonacci_node{ ul number; int n; bool isLeaf; Fibonacci_node * left; Fibonacci_node * right; }; </code></...
2
1,606
Notification center today widget flashes and then "unable to load" Swift
<p>I am developing a simple reminders app and I've run into some trouble with the Today Extension. The extension works perfectly on my iPad and in the simulator, however on my iPhone it flashes twice before displaying an "Unable to Load" message. I believe it is caused by some sort of memory problem, as didRecieveMemor...
2
2,368
Writing the text from a struct into a file via fstream
<p>I want to write the contents of the 6 films of the movies_iit struct into my file fout("data.dat").</p> <pre><code>// array of structures #include &lt;iostream&gt; #include &lt;string&gt; #include &lt;sstream&gt; #include &lt;istream&gt; #include &lt;stdio.h&gt; #include &lt;cctype&gt; #include &lt;fstream&gt; usin...
2
1,974
Why was the web service task canceled and how do I find out?
<p>When I'm trying to log in to my website using an online web service I wrote, I don't see anything happening at all...</p> <p>I should point out that this works 100% when I run everything from localhost.</p> <p>In my login:</p> <pre><code> private async Task DoLogin(string EmailAddress, string Password) { ...
2
1,498
Data Modal of primefaces not showing refresh data form backing bean
<p>I am new to primefaces and my english is not that much good. I have generated a datatable and when i click on data table view button a model diloag box will appear with backing bean data. My problem is my diloag is not showing current data from backing bean.but when i refresh the page by going to url it will show my...
2
10,532
How to implement an Enterprise Search
<p>We are searching disparate data sources in our company. We have information in multiple databases that need to be searched from our Intranet. Initial experiments with Full Text Search (FTS) proved disappointing. We've implemented a custom search engine that <em>works very well</em> for our purposes. However, we ...
2
1,653
Conan create package with dependencies
<p>I'm trying to build a conan package for netcdf-c. NetCDF requires zlib and hdf5 as dependencies, both of them are available through the conan center. </p> <p>I added them as requirements to my conanfile.py. When running <code>conan create . testing/build</code> to create the conan package from my conanfile.py CMake...
2
2,742
OpenCV - Detecting handwritten mark of checkboxes from questionnaire
<p>I'm working on a lot of patient intake questionnaires. Here is a scanned example of the Questionnaire. I need to process them and stored into the database, but I had a problem in detecting these handwritten marks:</p> <p>Patient Intake Questionnaire</p> <p><img src="https://i.stack.imgur.com/1kCxD.jpg" alt="Patien...
2
1,035
List the selected files in template table angular 2
<p>I am new to angular 2. Trying to list the file name in template table selected from the browser. Below is my code</p> <hr> <p><strong>Template.html</strong></p> <pre><code>&lt;input type="file" id="uploadFile" style="display: none" (change)='onClickUploadDocument($event)' multiple&gt; &lt;label for="uploadFile" ...
2
1,505
Iframe 3rd party cookie issue in internet explorer
<p>I am building an ASP.NET 3.5 application in which I have a page which loads another page in a different domain in an iframe. Below is the for <strong>Default.aspx</strong> page:</p> <pre><code>&lt;asp:Content ID="Content1" ContentPlaceHolderID="mainContent" runat="server"&gt; &lt;iframe src="isite.aspx" runat=...
2
1,065
Bootstrap navbar will not toggle
<p>I am rather new to using Bootstrap, and would love for one of you pros out there to show me where I am making my mistake. </p> <p>What I am trying to accomplish: I am working on a responsive website using Bootstrap. I wish for my navbar to be fixed at the top, and when the web page is reduced to a mobile size, I wo...
2
1,229
RESTful Collection Resources - idiomatic JSON representations and roundtripping
<p>I have a collection resource called Columns. A <code>GET</code> with <code>Accept: application/json</code> <a href="http://haacked.com/archive/2009/06/24/json-hijacking.aspx" rel="nofollow">can't directly return a collection</a>, so my representation needs to nest it in a property:-</p> <pre><code>{ "propertyName":...
2
1,027
Compare key value array in ejs to combo selected value
<p>I have a route js where I define get function like this:</p> <pre><code>exports.get = function (req, res) { var calls = [{ propertyTypes: function (acc) { return '/catalog/propertyTypes/'; }, }]; commercial_residential = { 1 : 'Residencial', 2 : 'Comercial' } propert...
2
1,717
twisted websocket chatserver openid authentication
<p>i have a python chatserver that uses twisted and autobahn websockets for connection.</p> <pre><code>factory = MessageServerFactory("ws://localhost:9000", debug=debug, debugCodePaths=debug) factory.protocol = MessageServerProtocol factory.setProtocolOptions(allowHixie76=True) listenWS(factory) </code></pre> <p>this...
2
1,575
android : progress indicator for image loading
<p>I am using the below algorithm for downloading and caching images. It is working good. Initial loading of an image takes time as expected. I want show a progress indication to show this. I want the progress indicator to come only in the image view not blocking other parts of the screen. For eg i have a list with eac...
2
1,619
Error trying to add a map: android.view.InflateException: Binary XML file line #9: Error inflating class com.google.android.maps.MapView
<p>I create the following class who extends MapActivity. The error is in this class here in the line </p> <p>View view = infalInflater.inflate(R.layout.car_map_view, null);</p> <pre><code>public class ShowCarMapChild extends MapActivity { private MapView mapView; private Car car; private String tag; @Override prot...
2
7,490
How to align figure/table to the top or bottom of the page in XSL-FO (FOP 2.1)
<p>In the case figure or table is a bit larger it would be really suitable to move them to the top or the bottom of the page. The ability to reflow table to the next page with repeating its headers is great but not always what I want. In the case table or figure fits well in the page and it is not necessarily anchored ...
2
1,728
Scikit-Learn failing to install on OS X: undeclared identifier and assignment errors
<p>In trying to install scikit-learn on my machine, I'm running into problems. I'm running OS X 10.8.4 with Python 2.7.5 from Homebrew, and I have the latest versions of Scipy and Numpy installed. </p> <p>I've tried installing scikit-learn via Pip as well as by cloning the latest source and building from scratch- this...
2
1,496
Unable to use const within a class in React
<p>I am following this tutorial </p> <p><a href="https://nickymeuleman.netlify.com/blog/gatsby-pagination#navigate-to-previousnext-page" rel="nofollow noreferrer">https://nickymeuleman.netlify.com/blog/gatsby-pagination#navigate-to-previousnext-page</a></p> <p>Everything is working fine, but I am unable to add const ...
2
1,197
Working out how many days old a person is?
<p>I need to work out how many days old someone is, but I'm not sure on the math. Here's what I have so far:</p> <pre><code>var birthYear = parseInt(prompt ('Enter your birth year:')); var birthMonth = prompt ('Enter the name of the month of birth:'); var birthDay = parseInt(prompt ('Enter your day of birth as an inte...
2
1,497
Adding authentication for an ftp server
<p>Hey im working on a project regarding using socket programming to design an ftp server-client application this is the code so far . What i need to do is add authenticity , i want users to be able to access certain files with a username and password and im really clueless D: </p> <p>FileServer </p> <pre><cod...
2
3,055
Continuously update TextArea
<p>I'm writing a program that creates a process using youtube-dl. That process has two <code>InputStream</code>s (inputStream and errorStream) of which I want to reroute each into a text area. </p> <p>I've been trying to get the <code>TextArea</code>s to update without locking the JavaFX thread. It's working but I fee...
2
1,765
recaptcha integration with Spring MVC
<p>I am trying to integrate recaptcha into my spring mvc application. Below is the code.</p> <pre><code>@RequestMapping(value="home.htm", method=RequestMethod.POST) public String processEmailLogin( @ModelAttribute("examLoginForm") ExamLoginDetails examLoginDetails, BindingResult result, ...
2
3,045
Repeating Animation and Adjustments in Flutter
<p>I'm trying to clone the timer of the app I use when I workout: Strong. So far, I've managed to implement all the main features and animations (which aren't many). I know my code is messy and there's probably better ways to implement what I'm trying to do if there are any suggestions on that they're also appreciated....
2
8,738
Confusion over poll() and recvfrom()
<p>I'm trying to implement a protocol in C that sends/receives raw Ethernet frames, and I've ran into some problems using <code>poll()</code> and <code>recvfrom()</code> in a Linux environment. I think my problem is mostly conceptual, so I'll avoid posting my code for now.</p> <p>I have two sockets for incoming data, ...
2
1,710
XSLT sum of nodes by parameter
<p>I have a problem with an XSLT: I like to compute the sum of nodes by a parameter. </p> <p>The XML source looks like this:</p> <pre><code>&lt;Documents&gt; &lt;Document&gt; &lt;Deleted&gt;0&lt;/Deleted&gt; &lt;DocumentType&gt;2&lt;/DocumentType&gt; &lt;Currency&gt;EUR&lt;/Currency&gt; &lt;Currency...
2
1,709
AR(1) with Nonlinear Least Squares using Marquardt Algorithm: EViews vs R
<p>Some weeks ago, I <a href="https://stackoverflow.com/questions/12805793/ols-estimation-with-ar1-term">posted</a> a poorly thought-out question plagued with vague information. This is my attempt to correct the original question and get better answers.</p> <p>The main <strong>problem</strong> is: I cannot obtain sim...
2
1,095
no pg_hba.conf entry for host / Connect call failed / Invalid data directory for cluster 12 main - Postgresql Ubuntu
<p>I'm trying to move my bot to an Ubuntu virtual server from Vultr but it's having a problem connecting to the postgres database. I've tried editing the config from md5 to true, and host to local, etc. But those only give me different errors and also make it stop working on my original machine too. It's working perfec...
2
1,026
FormSubmit says my form should use method=POST but it actually does
<p>I'm using FormSubmit to create a contact form in my static website (hosted on a server).</p> <p>My form looks like this:</p> <pre><code>&lt;div id=&quot;contact-area&quot; class=&quot;container&quot;&gt; &lt;h1&gt;~$ contactme&lt;/h1&gt; &lt;br&gt; &lt;form action=&quot;https://formsubmit.co/c379c2...
2
1,118
database records show without refreshing the page using ajax
<p>I'm trying to show the database values using ajax function. When I add a new row into my database table it doesn't show the records immediately. I have to refresh my page. Then only it shows the recent log details. I think I have a problem with ajax coding. I'm newbie to ajax. Someone help me to solve my issue..</p>...
2
1,176
Importing SASS variables into Vue component
<p>I'm working on building a webpage using Vue, Typescript, Webpack, and Bulma. I got everything working and building correctly but I noticed that some of my bundles were massive (over 2mb in some cases). After a lot of confusion I figured out it was because I was importing my main SCCS file that included Bulma, Bulma ...
2
1,476
Not able to import views in django, but it works in django shell
<p>I have the following simple urls.py:</p> <pre><code>from django.conf.urls import patterns, include, url from base import views urlpatterns = patterns('', url(r'^test$', 'views.test', name='test'), ) </code></pre> <p>And the following basic view: from django.shortcuts import render</p> <pre><code>def test(req...
2
1,683
how to redirect back to my ionic app from a payment site
<p>Good everyone. Please I need your assistance. I am using a payment gateway that needs to redirect back to my ionic app after a successful transaction. But after a successful transaction, I am having this error message "can't post to localhost:8100/home" but when I use a site URL for example(<a href="https://siteurl....
2
2,878
YUI Squarespace CSS manipulation
<p>I am relatively new to Squarespace and using YUI (Yahoo! User Interface Library), and I need some help being able to target and change <code>"input[type=radio]:checked"</code> to take on the CSS styling <code>.menuradio {text-decoration:none !important; border-bottom: 4px solid #000;}</code></p> <p>That said, I am ...
2
2,061
Monkeypatch with instance method
<p>I'm trying to monkeypatch how <code>pandas</code> Panel's slicing (<code>__getitem__</code>). This is straightforward to do with a basic function, foo.</p> <pre><code>from pandas import Panel Panel.__getitem__ = ORIGINAL_getitem def newgetitem(panel, *args, **kwargs): """ Append a string to return of panel._...
2
1,080
jQuery UI CSS styles not being applied to menu bar generated with getJSON
<p>I am trying to generate a jQueryUI menubar using JSON data. The JSON is being parsed correctly into valid HTML; however, the menubar displays as an unstyled unordered list and not as a styled menubar as the top one seen on <a href="http://view.jqueryui.com/menubar/demos/menubar/default.html" rel="nofollow">http://vi...
2
1,763
Hive - connection to Java via JDBC
<p>I have a problem. I can't connect my simple java application to my db. I think it's a problem with drivers.</p> <p>Here are hive logs, when I'm starting it: <a href="https://i.stack.imgur.com/dsSig.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dsSig.png" alt=""></a> My simple code:</p> <pre><c...
2
3,010
jQuery Calculations after appending more input fields
<p>I am building an expense template an am having an issue regarding using jQuery Calculations and click functionality to append a set of input fields.</p> <p>I am combining twooncodes, one to calculate the sum of the values in input fields, and the other to Add a new row of input fields when the user clicks so (these...
2
2,266
Delete a row from a MySQL database only if certain conditions are met
<p>I'm currently working on a simple windows form bug reporter for university and am having trouble. I'm trying to create a query where the user can only delete the bug if:</p> <ul> <li>The bug name exists</li> <li>The user logged in matches the user that reported the bug.</li> </ul> <p>Currently no matter which use ...
2
1,288
Maven with Spark, execution for Spark classes
<p>I have the second question to my <a href="https://stackoverflow.com/questions/33348156/maven-with-spark">Maven-Spark problem</a>. I can now compile all classes and also execute non-Spark classes. By the execution of some spark-class I have the next error message:</p> <pre><code>Error: A JNI error has occurred, plea...
2
2,102
React Service Worker: Uncaught SyntaxError: Unexpected token '<'
<p>I'm customizing my service worker in a React app created with CRA.</p> <p>The only change I made was to create a function to poll for live updates. So, my file looks like this:</p> <pre><code>// This optional code is used to register a service worker. // register() is not called by default. // This lets the app loa...
2
2,386
Azure functions v3 attach debugger to docker container in local started with docker-compose (dotnet)
<p>I`m trying to incorporate the azure function (c#) in the already existing docker-compose file. By reverse engineering from how visual studio starting container and build image, I have ended up with something like this:</p> <pre><code>version: '3.4' services: azure.storage.emulator: image: &quot;mcr.micro...
2
1,690
How to check if ssl certificate (X509 V1) is CA certificate that does not have certificate extension field?
<p>I have a X509Certificate (version 1) instance in Java and I need to identify if it is a CA certificate or user certificate.</p> <p>I tried this <a href="https://stackoverflow.com/questions/12092457/how-to-check-if-x509certificate-is-ca-certificate">How to check if X509Certificate is CA certificate?</a>, but with th...
2
1,744
npm Err : gyp Err npm ERR! inotify@1.4.6 install: `node-gyp rebuild`
<p>I get this error while implementing the command npm -i env-cmd --save dev</p> <p>i wantrd to add the env-cmd node module and used npm for it and wanted to save ot as a devDependency but everytime i run the above mentioned command i encounter the error below</p> <p>inotify@1.4.6 install /home/dev/Documents/task_manag...
2
15,095
Convert seconds to hhh:mm:ss in a chart
<p>I have a MsSql database which calculates the timespan between two dates in seconds. That works fine. I use this column afterwards in C# and write them in an array.</p> <p>This array is the input for a chart later on. So far this works well, but I cannot find a way to display the seconds in a format like hhh:mm:ss a...
2
1,648
IE Blocking Scripts
<p>IE 8 block my custom scripts every time i run my web site,and i need to click "allow scripts" to run it correctly.Its boring.</p> <p>Any ideas?</p> <p>The script:</p> <pre><code>// JavaScript Document var char=0; var caption = ""; var standby; var msg = "Lorem ipsum dolor sit amet, consenctuinv isdrulix core"; ...
2
4,084
WCF System.ServiceModel.EndpointNotFoundException
<p>I created wcf service - when i tried to connect from "debug" MS application for testing, everything looks okay when i did my own application, I always get the System.ServiceModel.EndpointNotFoundException error. Where is a problem?</p> <p>This is application settings:</p> <pre><code>&lt;system.serviceModel&gt; ...
2
1,757
xStream deserialisation of HashMap<String, List<String>> XML File
<p>serialisation works fine, but desirialisation wount work. I will post my Code and the errors copies from Eclipse.</p> <pre><code> &lt;dependency&gt; &lt;!-- for XML --&gt; &lt;artifactId&gt;xstream&lt;/artifactId&gt; &lt;groupId&gt;com.thoughtworks.xstream&lt;/groupId&gt; &lt;version...
2
3,777
Play an audio some time after another audio has ended while in a for-loop
<p>Currently I'm designing a Web application (game) on Tizen where I want to:</p> <ol> <li>Display an image</li> <li>Play an audio clip(around 15-17 seconds long)</li> <li>Do nothing for 5 seconds</li> <li>Play another audio clip(about 2-3 seconds)</li> <li>Hide the image</li> </ol> <p>These steps are to be performed...
2
1,632
Subprocess completes but still doesn't terminate, causing deadlock
<p>Ok, since there are currently no answer's I don't feel too bad doing this. While I'm still interested in what is actually happening behind the scenes to cause this problem, my most urgent questions are those specified in update 2. Those being,</p> <p>What are the differences between a <code>JoinableQueue</code> and...
2
1,707
Simple restangular example broken with AngularJS 1.2
<p>I'm doing a basic <code>Restangular</code> example and it works on <code>AngularJS 1.1</code>, however on <code>1.2</code>, the <code>REST</code> request is sent, data is received, but the table is not displayed properly. </p> <p>I read through some threads here about upgrading from <code>1.1 to 1.2</code> but I do...
2
1,273
Pyqt Change color of one word in TableView
<p>i need help changing the color of one word in my QTableView.</p> <h1>What i need to do is: when i open the csv file in my table, now i have sentences/words in my columns~rows and i need to color some words, like:</h1> <p>Here you can see my program with my csv. <a href="http://i.imgur.com/uIBQ2ch.jpg" rel="nofollo...
2
1,439
Solve Multiple Choice Knapsack (MCKP) With Dynamic Programming?
<h1>Example Data</h1> <p>For this question, let's assume the following items:</p> <ul> <li>Items: Apple, Banana, Carrot, Steak, Onion</li> <li>Values: 2, 2, 4, 5, 3</li> <li>Weights: 3, 1, 3, 4, 2</li> <li>Max Weight: 7</li> </ul> <h1>Objective:</h1> <p>The MCKP is a type of <a href="https://en.wikipedia.org/wiki/K...
2
1,654
Why isn't self working in my code
<p>I'm writing some code to create a toolbar that edits a map in ArcMap and I'm having some issues with getting variable values from other functions inside other classes that I'm using. </p> <p>All the functions are predefined so I can't change the <code>int</code> arguments or the code will throw an error. I checked ...
2
2,980
Generate random numbers without duplicates in a dynamic array C
<p>I want to randomize a dynamic array , with random numbers without duplicates in each column , and each column is limited , </p> <p>Check my main.c File </p> <pre><code>int main() { int i, j; int **p; srand(time(0)); p = malloc(9 * sizeof *p); for (i=0; i&lt;9; i++) { ...
2
1,186
Getting error on dropping the unique constraint column of a table in liquibase
<p>Getting this error when i tried to delete app_user_id column. I did remove the foreign key relation of app_user_id table. But idk why I am getting this only on running a test case.</p> <p>stackTrace</p> <pre><code>SEVERE 2/5/20 2:25 PM: liquibase: liquibase/mt-tenant-changelog-postgres.xml: liquibase/versions/8.0/...
2
5,359
Spring boot isn't serializing kotlin class
<p>I'm trying to build a simple api with spring boot and kotlin. When I make a request to save a new user everything goes well, a new user is persisted, but response body is empty. I don't know why, I return the new user. Please help me to understand why Jackson isn't serializing my kotlin class.</p> <p>I can assure t...
2
1,595
The specified HTTP method is not allowed for the requested resource
<p>I am using spring 4.1 and my Rest Controller signature looks like:</p> <pre><code>@RestController @RequestMapping("/api/device") public class ApiRestController { public ResponseEntity&lt;Response&gt; singleResponse() { System.out.println("SDR GET"); SingleDataResponse res = new SingleDataRespon...
2
1,295
CryptEncrypt/CryptDecrypt WinAPI functions fail when called from vb.net
<p>Any help with the following greatly appreciated.....</p> <p>I have some C++ code I've inherited which decrypts certain structures/byte arrays; I've been trying to write a test program in VB.net which exactly mimics the C++ decryption routine using the same functions, ie. using the WinAPI Crypto calls; in testing, C...
2
2,441
java - Queue method help needed
<p>I am doing a project in Java and I need to create a queue method.</p> <p>Every time someone is added to a room, they need to be added to the queue.</p> <p>I nee to create my own queue object in your program and write methods within the object to add to queue and take from queue. </p> <p>Every time a customer is a...
2
2,397
django form __init__ not including fields
<p>I have made a custom action for the admin page of one of my models wherein permissions can be granted to all the selected objects. There is an intermediate page which shows a multichoice field of the users to whom the permissions are to be granted.</p> <p>The entire action, start to finish, was working fine unless ...
2
1,533
JSONObject.fromObject cause java.util.ConcurrentModificationException
<p>When I check my server error log, I found </p> <pre><code>net.sf.json.JSONException: java.util.ConcurrentModificationException at net.sf.json.JSONObject.defaultBeanProcessing(JSONObject.java:818) at net.sf.json.JSONObject._fromBean(JSONObject.java:699) at net.sf.json.JSONObject.fromObject(JSONObject.jav...
2
3,286
Lumen PHP: hidden password field in model not filled using Model->fill()
<p>I have been having issues with my user signup code of my API I am working on.</p> <p>I have a UserController that takes the posted data and validates the fields. Then it will send the data to the SignUpUser method in my UserService class that makes a user model and fill in all the given data and send it to the User...
2
1,287
How to share a module between a parent and child module in Angular
<p>I'm new to Angular. I want to use a component (FuncionariosAlteraSenhaComponent) with routing and with a dialog. However I can't import a component in different modules.</p> <p>I've created a shared.module to import the FuncionariosAlteraSenhaComponent, to be used in others modules. These two modules are AppLogged....
2
1,258
Threading Box2D with pthreads
<p>So I'm essentially trying to implement an AIR Native Extension that does the physics simulation in C with interfaces through Actionscript.</p> <p>I've gone through quite a few iterations which I'll list below for interest sake and I'm at what I think could be my final attempt at getting this working in a more perfo...
2
1,340
PayPal IPN for subscription - Works partially
<p>I am running PayPal Subscription and I am trying to fire database writes based upon the response received. Up until yesterday, the code was working correctly. But today, strangely, the code stopped firing emails upon receiving payments. I am not sure if this is a glitch on PayPal's side or mine. I don't think its an...
2
5,758
How to Generate Breadcrumb Schema Dynamically using Javascript?
<p><strong>Below is the HTML actually used to display the breadcrumbs on each page</strong></p> <pre><code> &lt;c:forEach items=&quot;${breadcrumbArray}&quot; var=&quot;breadcrumb&quot; varStatus=&quot;loopCounter&quot;&gt; &lt;c:if test=&quot;${breadcrumb ne 'store'}&quot;&gt; ...
2
1,864
min/max of collections containing NaN (handling incomparability in ordering)
<p>I just ran into a nasty bug as a result of the following behavior:</p> <pre><code>scala&gt; List(1.0, 2.0, 3.0, Double.NaN).min res1: Double = NaN scala&gt; List(1.0, 2.0, 3.0, Double.NaN).max res2: Double = NaN </code></pre> <p>I understand that for a pairwise comparison it may sometimes be preferable to have <c...
2
1,052
Android Studio - Why WebView Doesn't Load Web URL
<p>Android Studio - Why WebView Doesn't Load Web URL</p> <p><a href="https://i.stack.imgur.com/Lc6fI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lc6fI.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/sCc70.png" rel="nofollow noreferrer"><img src="https://i.stack.im...
2
2,688
R - Merge data "list" into one data.frame
<p>When I use the list function:</p> <pre><code>el_nino_1974_2000_all &lt;- list() for (k in seq_along(el_nino_start_month)){ el_nino_1974_2000_all[[k]] = window(Nino3.4_Flow_1974_2000_zoo, start = (as.Date(el_nino_1974_2000[k,]$el_nino_start_mont)), ...
2
1,381
How to use Intents to pass data from Activity to BroadcastReceiver
<p>I have just started my first main project - a simple anti-theft application, that when my the phone is been text-ed, if it contains a certain string, it will send a sms back to the originating address, telling it the location of the phone. However, I am at the moment only trying to get the to phone receive a sms, ch...
2
2,821
GStreamer RTSP Server with TLS Example Fails
<p>I am trying to use GStreamer 1.7.1 to start an RTSP server with authentication and TLS support. The code I am using is nearly identical to the <a href="http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-video.c?id=7374976722852c93e59c3cee2a562f947cb7f310" rel="nofollow">file from source</a>, ex...
2
3,608
Spherical Voronoi Tessellation with Java 7: need fix for winding vertices around faces
<p>I am working on a problem that involves finding the Voronoi tessellation for points distributed over the surface of a sphere. As far as I can tell, my brute-force approach works, since visually it seems to find the Delaunay triangulation of the points. However, my algorithm seems to fail when defining each face's ...
2
7,633
flink parsing JSON in map: InvalidProgramException: Task not serializable
<p>I am working a on Flink project and would like to parse the source JSON string data to Json Object. I am using <a href="https://github.com/FasterXML/jackson-module-scala" rel="nofollow noreferrer">jackson-module-scala</a> for the JSON parsing. However, I encountered some issues with using the JSON parser within Fli...
2
1,335
Displaying appropriate error messages for users
<p><strong>UPDATE 1:</strong></p> <p>I now have the following code:</p> <pre><code>} catch( PDOException $e ) { error_log( $e -&gt; getMessage() ); switch( $e -&gt; getCode() ) { case 1452: echo "Sorry, the referral ID you have entered does not exist."; break; default:...
2
1,243
Problems linking to Lua 5.2.4, even when compiling sources inline
<p>I have a file configuration.cpp:</p> <pre><code>#include "configuration.hpp" struct game_config* get_game_config(lua_State *L, char* script) { debug("Attempting to load configuration from %s", script); // Execute the script luaL_dofile(L, script); // The environment should now be prepped, we can g...
2
2,631
How to detect if two paths intersect in android?
<p>I'm making a small <a href="https://en.wikipedia.org/wiki/Sprouts_(game)" rel="nofollow">sprouts</a> app where the user can draw paths between dots or on the screen with paths. I create arraylists of the coordinates of the paths and then attempt to compare them four points at a time to see if they intersect with pat...
2
2,263