title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Correct implementation of SI, SIS, SIR models (python)
<p>I have created some very basic implementations of the mentioned models. However, although graphs seem to look right, the numbers don't add up to a constant. That is for the sum of susceptible/infected/recovered people in each compartment should add up to N (which is total number of people), but it doesn't, for some ...
1
1,350
Error while cross compiling Qt for a raspberry pi3
<p>I want to cross compile Qt to develop a gui for a raspberry pi. I have been following this tutorial: <a href="https://wiki.qt.io/RaspberryPi2EGLFS" rel="nofollow noreferrer">https://wiki.qt.io/RaspberryPi2EGLFS</a></p> <p>I am using this configure command: </p> <pre><code>./configure -release -opengl es2 -device l...
1
2,151
c++ returning a single value from a linked list
<p>I have the following code but it gives an error on the line - e = list.first();(towards the end of the code). It says that it cannot convert Node to char can someone tell me how to get return the first value from the linked list in the variable e. </p> <p>Thanks for all the help:)</p> <pre><code>// // main.cpp //...
1
1,911
Error Build Gradle
<p>I found this error when create new project on android studio, i dont know what happen to my setting. Anyone can explain how to resolve this error on android studio?</p> <blockquote> <p>Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For ...
1
2,882
Spring boot It is indirectly referenced from required .class files
<p>I've added the following in my repository</p> <pre><code>@Repository public interface ReceiptRepository extends JpaRepository&lt;Receipt, Integer&gt;, QueryDslPredicateExecutor&lt;Receipt&gt;{ public Page&lt;Receipt&gt; findForCriteria(Predicate predicate, Pageable p); } </code></pre> <p><strong>QueryDslPredic...
1
1,395
Gradle build using IBM JDK not using TLS 1.2
<p>We are invoking gradle build from Jenkins and Java being used is IBM java 1.8. After the build is completed the packaged ear file is supposed to be published on Artifactory and thats where it fails because it is using TLSv1 whereas the artifactory server uses TLSv1.2 (RECV TLSv1.2 ALERT: fatal, protocol_version). W...
1
1,910
check all checkboxes in a parent div, onclick using jQuery based on selectbox value
<p>Here i want to solve two issues,</p> <ol> <li>I've got a bunch of checkboxes, I would like to restrict the user to check the checkboxes based on selectbox value.</li> <li>There are two div.checkbox, i want to check all checkboxes while clicking on parent div based on selectbox value</li> </ol> <p>From above, i hav...
1
1,055
PersistenceUnit: jpaData - Unable to build EntityManagerFactory
<p>I have set up a spring and hibernate project and get the following exception:</p> <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContext.xml]: Invocation of init method fai...
1
3,367
Uncaught ReferenceError: Invalid left-hand side in assignment (anonymous function)
<p>I've implemented the UI Jquery slider <a href="http://jqueryui.com/slider/#steps" rel="nofollow">http://jqueryui.com/slider/#steps</a> and it works very well. But know what I want to do is make the slider moving when clicking on some links. </p> <p>But I get the error : <em>Uncaught ReferenceError: Invalid left-han...
1
1,992
How can I use the square root of a number that the user enters in an input box, instead of the number itself?
<p>I'm trying to make an Android app, and the feature that I'm working on right now is calculating the square root of a number entered by the user.</p> <p>How can I take a number that the user enters in a text box, and use the square root of that number in the <code>doCalc</code> part of my program? I'm limiting the n...
1
1,907
Percentile aggregate for SQL Server 2008 R2
<p>I'm using SQL Server 2008 R2. I need to compute a percentile value per group, something like:</p> <pre><code>SELECT id, PCTL(0.9, x) -- for the 90th percentile FROM my_table GROUP BY id ORDER BY id </code></pre> <p>For example, given this DDL (<a href="http://sqlfiddle.com/#!3/a3661/1" rel="nofollow">fiddle...
1
1,488
Prometheus operator "Error opening query log file: permission denied"
<p>I'm trying to run Prometheus operator on Kubernetes, but after I trying to persist data on Rancher-RBD, there is an error:</p> <pre><code>level=info ts=2020-10-31T12:40:33.171Z caller=main.go:353 msg=&quot;Starting Prometheus&quot; version=&quot;(version=2.22.0, branch=HEAD, revision=0a7fdd3b76960808c3a91d92267c3d81...
1
1,801
Can't figure out what this error means (rails Net::OpenTimeout: execution expired)
<p>I got an error on my rails app: Net::OpenTimeout: execution expired</p> <p>I researched this error and everyone relates it to Mailer, which I don't think it relates to for me. Here's the error stack trace:</p> <pre><code>/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878 in "initialize" /vendor/ruby-2.0.0/lib/ruby/...
1
3,999
How can I use math.random but only for certain values?
<p>Here's what I have (it's just an excerpt from my entire code):</p> <pre><code>int num = (int) Math.random()*100; switch(num) { case 0 : compChoice = "R";break; case 1 : compChoice = "P";break; case 2 : compChoice = "S";break; } </code></pre> <p>How can I get it to only come up with a random...
1
1,376
BadPaddingException: invalid ciphertext
<p>I would like some help as this is my first time in coding cryptography code.</p> <p>The encryption code appears to be working correctly, but the decryption throws an error.</p> <p>The error I get is:</p> <p><strong>de.flexiprovider.api.exceptions.BadPaddingException: invalid ciphertext</strong></p> <p>in the <st...
1
2,807
Transform XML with multiple XSL files
<p>I have some XML that I'd like to transform into HTML using a number of XSL files. These XSL files are all related through xsl:import and xsl:include statements, and all required to complete the transform.</p> <p>I know the XSL works, because using the <code>&lt;?xml-stylesheet type="text/xsl" href="transform.xsl"?&...
1
1,198
Need to access a value in the HTML Table using xpath from PYTHON SELENIUM
<p>I have a Web browser's app UI Table as shown like this...</p> <pre><code>DATAPOINT VALUE STATUS Output Voltage 95.0 VAC Nominal PS Input Voltage 15.0 VAC Nominal Inverter Status Off Nominal Major Alarm No Alarm Nominal Minor Alarm No A...
1
1,379
Calling Swift Closure Inside Closure
<p>I have the following code: </p> <pre><code> twitterAPI?.verifyCredentialsWithUserSuccessBlock({ (userName, password) -&gt; Void in twitterAPI?.getUserTimelineWithScreenName(userName, count: 100, successBlock: { ([AnyObject]!) -&gt; Void in }, errorBlock: { (error :NSError!) -&gt; V...
1
1,057
change Tab based on HTML Select value
<p>Could someone help me connect these bits of code. I'm using Twitter bootstrap and I have a Dropdown list and when the user selects an item in the dropdown list I want to show the tab that corresponds to the item selected.</p> <p>Here's my html code so far...</p> <pre><code> &lt;select&gt; &lt;option&gt;Sel...
1
1,377
Rails select2 ajax tags
<p>I'm using the select2 jquery gem. I'm trying to get the list of topics matching what the user types. It's not working as expected and i've spent all day trying to find out why. I keep getting this error in the console</p> <pre><code>Uncaught TypeError: Cannot call method 'toUpperCase' of undefined select2.js?body=1...
1
1,239
java.lang.ClassNotFoundException: net.sf.json.JSONObject
<p>Am trying to initialize JSONObject in my servlet</p> <pre><code> JSONObject obj = new JSONObject(); UserInfoBean ui= getInfo(empId); try{ obj.put("ID", empId); obj.put("Name", empName); obj.put("Address", address); obj.put("Phone", phone); } catch(Exception e...
1
1,111
mvc 5 run function on every page load
<p>Many of the answers i've searched for on stack are related to older versions of asp.net mvc, so i wanted to post a new question as it relates to running a function on every page load <strong>specific to mvc5</strong>. i basically want to run a query every single time a page loads. </p> <p>I <a href="http://weblog...
1
1,273
How to register after sheet (register) events in Laravel Excel 3.0
<p>I have used laravel excel version 2.1 previously . In version 2.0 cell designing was pretty easy . So i started a new project in latest edition of laravel (5.5) and was shocked to know that we can't use laravel excel version 2.0 in this version of laravel . I installed latest version of laravel-excel 3.1 and sheet ...
1
1,717
How to disable letterboxing and adjust UI5 for the widescreen?
<p>I have an UI5-based app (1.66+), which works correctly, but there are huge empty spaces on the left and right sides of the screen (aka <a href="https://experience.sap.com/fiori-design-web/letter-boxing/" rel="noreferrer">letterboxing</a> is on):</p> <p><a href="https://i.stack.imgur.com/Msoac.png" rel="noreferrer">...
1
1,576
Internal Exception: java.sql.SQLException: No database selected
<p>I know this question is very common among persistence users. I've visited so many the threads and questions on so many forums and still I'm not getting solution.</p> <p>I've created <em>RESTful web services from database</em> (an option in Netbeans 8.0.2). I've also created connection pool and JNDI for this projec...
1
2,773
Why sbt compile doesn't copy unmanaged resources to classpath?
<p>Could you tell me why <code>sbt compile</code> doesn't copy unmanaged resources to classpath? On the other hand <code>sbt package</code> does. As result I can't start debugging unless I invoke <code>package</code> call manually :(</p> <p>I'm using SBT 0.12.1</p> <p>Below is my build.sbt.</p> <pre><code>import Ass...
1
1,033
XMLDSIG XML Digital Signature. What bytes are really signed?
<p><strong>Good day to all, first of all WALL OF TEXT WARNING! I've done a lot of research and i'll post some code I'm sure will help someone. I've put italic in the Blah blah parts, leaving the "important" parts in normal text.</strong></p> <p><strong>Short question:</strong> Are the SignedInfo node bytes (from [60] ...
1
10,280
How can I get an HMONITOR handle from a display device name?
<p>I want to obtain a monitor handle (<code>HMONITOR</code>) that can be used with the Windows multi-monitor APIs for a <em>specific monitor</em> attached to the system <em>by index</em>. For example, say I have three monitors attached to my system and forming part of my desktop; I want to get a handle to monitor 3.</p...
1
1,035
Python sklearn PCA.explained_variance_ratio_ doesn't sum to 1
<p>I am using sklearn's PCA module. I am using the following code to set up the analysis.</p> <pre><code>from sklearn.decomposition import PCA pca = PCA(n_components=9) p = pca.fit([row[:-1] for row in norm]) </code></pre> <p><code>norm</code> here is my normalized dataset, with a unique identifier in the last column...
1
1,290
I tried all ways, but still my area is calculated wrongly in Postgis
<p>I created a very simple polygon in the middle of Germany to demonstrate my problem.</p> <p>You can visualize it in geojsonlint using the following GeoJSON</p> <pre><code>{"type":"Polygon","coordinates":[[ [10.439844131469727,51.17460781257472], [10.430574417114258,51.1753073564544], [10.429565906524658,51.17179607...
1
1,046
Uncaught ReferenceError: initializeApp is not defined
<p>I'm trying to connect a contact us form on my web app to firebase and I get this error. </p> <p>These are my JS scripts in the head tag; </p> <pre><code>&lt;!--&lt;script src="presentation.js"&gt;&lt;/script&gt;--&gt; &lt;!--&lt;script src="home1.js"&gt;&lt;/script&gt;--&gt; &lt;script type="module" src="contact.j...
1
2,593
Android using ksoap calling PHP SOAP webservice fails: 'procedure 'CheckLogin' not found
<p>I'm trying to call a PHP SOAP webservice. I know my webservice functions correctly because I use it in a WPF project succesfully. I'm also building an app in android, using the same webservice.</p> <p>The WSDL file can be found here: <a href="http://www.wegotcha.nl/servicehandler/service.wsdl" rel="nofollow">http:/...
1
1,772
Jackson: deserializing recursive object
<p>I'm trying to parse the filter parameters sent by a KendoUI grid to my web service and am having some issues convincing Jackson to parse this JSON. As far as I know, I can control the format of the parameters that Kendo sends, but I do not know how I would marshal the parameters into a better format so they remain u...
1
1,216
Clean way to stop RMI server
<p>A RMI server which works fine without the stopServer functionality.</p> <pre><code>public class HelloServer extends UnicastRemoteObject implements HelloInterface { private final static int PORT=1102; private final String serverName="server"; private Timer timer; public HelloServer() throws Remote...
1
1,208
How to show grid lines in flatList in react native
<p>I have list of employee details. I need the grid lines between them (to view as a table). How it is possible with flatList in react native?</p> <pre><code> &lt;View &gt; &lt;View style={Styles.empTab}&gt; &lt;ScrollView horizontal={true} &gt; &lt;View s...
1
1,215
v-data-table doesn't updates on a new data
<p>I have a object <code>portfoliosData</code> in a Vuex store. This object has a property <code>metrics</code></p> <pre><code> state: { portfoliosData: { performance: [], metrics: [] }, </code></pre> <p>When performing an action I mutate the property in the store and want to show the updates in ...
1
2,157
Primefaces confirm dialog retains its background opacity after it is dismissed
<p>Someone who have used Primefaces 4.0-SNAPSHOT may have noticed the following warning.</p> <blockquote> <p>The appendToBody attribute of the ConfirmDialog will be deprecated in future versions. Please use appendTo="@(body)" now</p> </blockquote> <p>Along with Primefaces 4.0 RC1, I have this piece of code.</p> ...
1
1,026
Cannot implicitly convert type 'List<AnonymousType#1>' to 'IEnumerable<Models.APPLICANT>'
<p>Trying To Left Join 2 Tables</p> <pre><code> public IEnumerable&lt;APPLICANT&gt; GetApplicant() { IEnumerable&lt;APPLICANT&gt; applicantdata = Cache.Get("applicants") as IEnumerable&lt;APPLICANT&gt;; if (applicantdata == null) { var applicantList = (from a in conte...
1
1,128
How to show label for overrided checkbox in Symfony Twig
<p>I've overrided the Twig template for my forms in my symfony application so that I could have more control over the labels for checkboxes.</p> <p>However, I am having problems with the checkbox label.</p> <p>Here is the code I overrided in my custom template file:</p> <pre><code>{# Labels #} {% block form_label %}...
1
1,158
ERROR: Cannot create PoolableConnectionFactory (isValid() returned false)
<p>What is the problem? I Use H2 DATABASE</p> <p>Someone have a solution for my problem ? I Use H2 DATA BASE, Hibernate 5</p> <p>This hy HibernateConfig.java</p> <pre><code>package com.train.shoponlinebackend.config; @Configuration @ComponentScan(basePackages = {"com.train.shoponlinebackend.dto"}) @EnableTransactio...
1
2,861
One-to-One mappings of basic type, into a single class in Hibernate
<p>So the situation is as follows: there is an entity which needs to be connected with a dictionary. Imagine a following structure</p> <pre class="lang-sql prettyprint-override"><code>create table Address ( addressId bigint not null, addressLine1 varchar(255), city varchar(255), country varchar(255), ...
1
1,436
JSF rerender composite component: insertChildren problems
<p>I'm making my first composite component in JSF but I am stumped by a rerender that behaves oddly. Here is the component implementation (it's meant to be a popup):</p> <pre><code> &lt;composite:implementation&gt; &lt;h:outputScript name="nb-popup.js" library="js"/&gt; &lt;h:outputStylesheet name="nb-popup...
1
2,306
GCM Failed to resolve target intent service
<p>I tried to get the GCM push notifications working on my Android 6.0.1 device. Unfortunately I'am running into an error. The log says:</p> <blockquote> <p>E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement E/FirebaseInstanceId: Error while delivering the message: Servic...
1
1,205
Re-encoding h.264 content with a different bit rate using Android MediaCodec
<p>I'm attempting to re-encode a h.264 mp4 file with a different bit rate using the Android MediaCodec API's introduced in 4.2.</p> <p>I am able decode and play the content (prior to changing the bit rate) using the MediaCodec API but if I attempt to re-encode the content with a different bit rate prior to decoding it...
1
4,018
Codeigniter - How to passing multiple data from multiple table to a single View?
<p>I've table in database.</p> <p><code>tbl_parameter</code> column:</p> <pre><code>parameter_ID | parameter_name | parameter_unit | parameter_method ------------ | -------------- | -------------- | ---------------- 3001 | Salt | % | Titrimetri 3002 | pH | - ...
1
4,891
i got this error: "ImportError: cannot import name python" How do I fix it?
<pre><code>File "G:\Python25\Lib\site-packages\PyAMF-0.6b2-py2.5-win32.egg\pyamf\util\__init__.py", line 15, in &lt;module&gt; ImportError: cannot import name python </code></pre> <p>How do I fix it? If you need any info to know how to fix this problem, I can explain, just ask.</p> <p>Thanks</p> <p>Code:</p> <pre><...
1
1,216
How to use vlookup or formulas in SXSSFWorkbook with Apache POI?
<p>I am Java developer. I am trying to write a large <code>xlsx</code> file (Excel) using the <code>SXSSFWorkbook</code> class of the Apache POI library.</p> <p>I have no choice to write large file due have more than 200000 rows. but I need to use some formulas or vlookup with external sheet. when I use: </p> <pre><c...
1
1,224
Pagination with JSP servlet and Bootstrap
<p>I have the following coding of a data table in JSP. it gives results taken from a servlet and post in the table. I need a pagination for the results.</p> <pre><code>&lt;table class="table table-striped hero-spacer"&gt; &lt;thead&gt; &lt;tr&gt; &lt;td&gt;&l...
1
1,551
Debugging a Node.js Azure function
<p>Hi, I am trying to debug and develop locally a simple JavaScript timerTrigger function azure application but I am having trouble. I am trying to follow along this tutorial: <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/...
1
2,083
Require assistance with simple pure Java 11 WebSocket client example
<p>There appears to be very little Java 11 (pure Java non framework based) WebSocket <strong>client</strong> code examples on the web so I'm hoping StackOverflow can come to the rescue for me once again.</p> <p><a href="https://craftsmen.nl/java-11-is-here-to-stay/" rel="noreferrer">This</a> is the closest I've found,...
1
1,034
Query running very slow on big MongoDB db
<p>I have a MongoDB db with a single rather large collection of documents (13GB for about 2M documents) sitting on a single server with 8GB RAM. Each document has a text field that can be relatively large (it can be a whole blog post) and the other fields are data about the text content and the text author. Here's what...
1
1,150
OAuth access token request failing (NSErrorFailingURLStringKey)
<p>I have the following steps completed in the OAuth process:<br> 1) Request token<br> 2) Authorize token<br> 3) Receive PIN number<br></p> <p>What I can't get to work is getting the access token with the PIN I receive. It always hits my <code>accessTokenTicket:didFailWithError</code> selector.</p> <p>Here's the URL...
1
1,218
Kafka Consumer is not receiving message in Spring Boot
<p>My spring/java consumer is not able to access the message produced by producer. However, when I run the consumer from console/terminal it is able to receive the message produced by spring/java producer.</p> <p>Consumer Configuration :</p> <pre><code>@Component @ConfigurationProperties(prefix="kafka.consumer") publ...
1
1,404
Undefined reference to Logger::getInstance() - but only in some cases
<p>I'm using log4cplus (compiled from current git master), but i get undefined reference errors by the linker. However, these errors occur <em>only at some classes</em>.</p> <p>In general each class has the following form:</p> <h3>Header (.h)</h3> <pre><code>// ... #include &lt;log4cplus/loggingmacros.h&gt; // ... ...
1
2,316
Create an array of JSON Objects
<p>I need to create a JSON Object for an Arraylist. Below is the code</p> <pre><code>public boolean submitOrder(ArrayList&lt;OrderDetailsData&gt; orderList) { serUri = "lists.json"; method = "post"; JSONObject jsonObject = new JSONObject(); JSONObject json = new JSONObject(); ...
1
1,082
Unity The parameter host could not be resolved when attempting to call constructor
<p>When I attempt to instantiate my instance of the base class I get the error:</p> <p>a ResolutionFailedException with roughly the following error "The parameter host could not be resolved when attempting to call constructor"</p> <p> I'm currently not using an Interface for the base type and my instance of the class...
1
1,242
jqgrid viewGridRow dialog big span and icon
<p>I have a JQGRID with some data and Id like to show the row data in a dialog when the users double clicks the row. Did that with:</p> <pre><code>ondblClickRow: function(rowid) { jQuery(this).jqGrid('viewGridRow', rowid); } </code></pre> <p>But I had 2 problems with that:</p> <p>1: I have an icon in one of the...
1
2,036
Hibernate performing too many queries
<p>I believe that I'm misunderstanding how subselect and eager works; my goal is to improve performance as I encounter the N+1 problem</p> <p><strong>Edit</strong> I'm wondering whether it would be quicker for me to just use the create SQL query method and create the objects myself although I was hoping hibernate woul...
1
1,769
jqgrid duplicate rows in spite of having uique id
<p>Issue: I am sending 10 rows from server(lets assume jqgrid requests 10 rows each time).</p> <p>1st fetch : 10 rows sent/displayed (id:1 to 10) View 1 - 10 of 25 in grid</p> <p>2nd fetch : 10 rows sent/displayed (id:11 to 20) View 11 - 20 of 25 in grid</p> <p>3rd fetch : 5 rows sent/10 rows displayed (id:21 to 25 ...
1
1,390
VirtualBox 6.0.8, Vagrant 2.2.4 Hangs on SSH auth method: private key
<p>I am new to Vagrant. I am trying to get a suitable developement envirement in order to create a symfony project but for some reason, I can't seem to get this working. What ever machine i build i always get stuck at the "SSH auth method: private key" line.</p> <p>I made a lot of reading in the past 2 days and this p...
1
1,785
VBA macro to group all rows under one heading, headings when more than one heading exists
<p>I am writing a vba macro to achieve the following but do not how to implement it. Would any please provide some guidance?</p> <p>Currently, the data is as follows(subitem spans from column B onwards):</p> <pre><code>ITEM ONE [Subitem one... ] ITEM ONE [Subitem two ...] ITEM ONE [Subitem three...] ITEM TWO [Subit...
1
1,376
Angular2. Exception: No Directive annotation found on Alert
<p>I am getting the following exception in my browser logs:</p> <blockquote> <p>No Directive annotation found on Alert</p> </blockquote> <p>Stacktrace:</p> <pre><code>Error: No Directive annotation found on Alert at new BaseException (webpack:///./~/angular2/src/facade/exceptions.js?:15:23) at DirectiveResolver.re...
1
3,720
Finding UUIDs in Android 2.0
<p>I am writing a program which needs to be run in Android 2.0. I am currently trying to connect my android device to an embedded bluetooth chip. I have been given information as to use fetchuidsWithSDP(), or getUuids(), but the page I read explained that these methods are hidden in the 2.0 SDK, and must be called usin...
1
1,458
Position sticky with submenu not scrolling
<p>I am using bootstrap v-4 beta2 and I want to create sticky top menu with submenu. Everything is working on desktop but when on mobile when I click to open submenu I cant see whole submenu and when I am scrolling with whole website but not menu. I found out I have to do something with li.dropdown - when I added posit...
1
2,274
PHP - UTF-8 to Chinese ANSI (GB2312?) - Export CSV file
<p>I post this after several hours of research (several times...). I couldn't find any answer yet.</p> <p>My goal is to write a CSV file using PHP. This file has to have the Chinese ANSI encoding (I suppose it's GB2312 for simplified Chinese, in notepad++ I only see ANSI as encoding). It's a must to import to another ...
1
1,096
Android Uploading large files
<p>I am pretty much new to android development, and I am trying to upload a file of size 25 to 50 MB to a web server, and am getting the out of memory error. I am struggling for past 2 days and have no clue, where I am going wrong.</p> <p>Got any suggestions on where I am going wrong?</p> <p>The code I am working on ...
1
1,537
helloworld.c fails to compile with 100+ errors
<p>I believe I am dealing with some kind of corrupted library. I wrote the following code:</p> <pre><code>//helloworld.c #include &lt;stdio.h&gt; int main() { printf("Hello, world!\n"); return 0; } </code></pre> <p>And compiled it with the foll...
1
2,484
How do I get v-card in Vuetify to take up full height of container?
<p>Please have a look at this Vuetify fiddle: <a href="https://jsfiddle.net/L4r5aftq/" rel="nofollow noreferrer">https://jsfiddle.net/L4r5aftq/</a></p> <pre><code>&lt;div id="app"&gt; &lt;div class="address-card-container" style="background-color: pink;"&gt; &lt;v-card&gt; &lt;div c...
1
1,744
Python sum dict values based on keys
<p>How to sum values from dict where values are string. I mean how to sum values where multiply key is same in dictionary.</p> <h1>dict</h1> <pre><code>values = [ { &quot;rashod&quot;: 0, &quot;prihod&quot;: 230.0, &quot;prod_name&quot;: &quot;r&quot;, &quot;prod_hola&quot;: &quot;t&...
1
1,038
How do I use a Flutter MethodChannel to invoke a method in dart code from the native swift code?
<p>I have looked at many similar questions on this topic, but none of the solutions have worked for me.. I am developing an App in Flutter, but want to call a specific method in my <code>main.dart</code> file from <code>AppDelegate.swift</code> in the native iOS project.</p> <p>To remove all other variables I have extr...
1
1,297
How to add NavHostFragment in a Fragment destination?
<p>My goal is to understand and use the Navigation component in the best way with a complex navigation architecture (I suppose).</p> <p>To make the global context, I use a main BottomNavigationBar with 5 items. For the management of the fragments associate, I use the example given by Google : <a href="https://github.c...
1
4,526
java.lang.RuntimeException: takePicture failed on mCamera.takePicture android
<p>I want to capture photos continuously so that every time user don't have to press the button. </p> <p>My code</p> <pre><code>public class CameraView extends Activity implements SurfaceHolder.Callback, OnClickListener { private static final String TAG = "CameraTest"; Camera mCamera; boolean mPreviewRunning = false...
1
2,305
Oracle.DataAccess.Client Error
<p>Background: This website use oracle and spring.net. <br> version of the Oracle.DataAccess: 4.112.2.0 <br> version of the Spring: 1.3.2.40943 <br></p> <p>Webconfig file</p> <pre><code>&lt;db:provider id="SDDbProvider" provider="Oracle.DataAccess.Client" connectionString="User Id=****; Password = *****; ...
1
1,722
Sanic and Motor use different event loops
<p>I am new to Sanic and I am trying to get it to work with Motor. I did manage to get everything to work in a single file, however, when I try it out within my project structure, I am running into the below issues.</p> <pre><code>[2018-02-28 17:26:58 +0530] [3720] [ERROR] Traceback (most recent call last): File "/us...
1
2,056
Group By Week on Redshift
<p>I'm trying to count my table by week but the <code>DATE_TRUNCT('week',date)</code> function considers Monday as the start of the week but I need for the week to start in Sunday.</p> <p>This is the query, which runs properly but with starting in Mondays...</p> <pre><code>SELECT DATE_TRUNC('week',myDate) AS Referenc...
1
1,309
Elasticsearch on Docker - Failed to create enrollment token when generating API key
<p>Going through the <a href="https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-stack-docker.html#get-started-docker-tls" rel="nofollow noreferrer">Elasticsearch docs</a> for setting up Elasticsearch/Kibana with Docker, but I'm getting several errors. I follow the steps exactly. I'm running ...
1
5,790
RxJava -- Terminating Infinite Streams
<p>I am exploring reactive programming and RxJava. It is fun, but I am stuck on a problem for which I cannot find an answer. My basic question: what is a reactive-appropriate way to terminate an otherwise infinitely-running Observable? I also welcome critiques and reactive best practices regarding my code.</p> <p>As a...
1
1,236
How to load images dynamically from server and display them
<p>i have images stored on my server i.e. i have a directory on my server such as : $uploadsDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'uploaded_files/';</p> <p>i need to load each of the image from the directory and display in on the following html :</p> <pre><code>&lt;div class="image-set"&gt; ...
1
1,517
docker login issue - request canceled while waiting for connection
<p>All of a sudden docker is showing a strange issue in my system. <code>docker login</code> is intermittently failing and <code>docker pull</code> is not working at all :(.</p> <p>Here is one instance where the <strong>docker login</strong> was successful but the docker pull failed with an error.</p> <pre><code>$ dock...
1
1,274
Nuget restore fails for ASP.NET Core 2.0 project on build server
<p>I am trying to build an ASP.NET Core 2.0 application for .NET Framework 4.6.2 (not .NET Core) with TeamCity on Windows Server 2012R2.</p> <p>The following components are installed in the server:</p> <ul> <li>Microsoft .Net Core SDK - 2.0.0.0</li> <li>Microsoft .Net Framework (4.5.2, 4.6, 4.6.2)</li> <li>Microsoft ...
1
3,460
Import vendored dependencies in Python package without modifying sys.path or 3rd party packages
<h3>Summary</h3> <p>I am working on a series of add-ons for <a href="http://ankisrs.net/" rel="noreferrer">Anki</a>, an open-source flashcard program. Anki add-ons are shipped as Python packages, with the basic folder structure looking as follows:</p> <pre><code>anki_addons/ addon_name_1/ __init__.py ...
1
1,173
My custom view DialogFragment is not resize when keyboard is shown even though using SOFT_INPUT_ADJUST_RESIZE on Dialog Window
<p>I have the following custom view <code>DialogFragment</code>.</p> <p><a href="https://i.stack.imgur.com/0sNAH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0sNAH.png" alt="enter image description here"></a></p> <p>When I tap on the <code>EditText</code>, soft keyboard is shown. Currently, the ...
1
4,665
npm start finishes with - FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
<p>So I am trying to deploy my project to AWS LightSail instance</p> <ol> <li>I cloned my repo</li> <li>npm install</li> <li>npm start.<br /> And then the Allocation failed Error happened</li> </ol> <p>Error:</p> <pre><code>&lt;--- JS stacktrace ---&gt; FATAL ERROR: MarkCompactCollector: young object promotion failed...
1
2,586
Failed to set remote offer sdp: Session error code: ERROR_CONTENT
<p>I have a problem connecting peer-to-peer video from native android browser to safari 11 desktop (vice versa), here is the error:</p> <p>Unhandled Promise Rejection: OperationError (DOM Exception 34): Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set remote v...
1
3,337
Getting started with Meteor: Show/Hide Templates on click
<p>I have two template forms in a page one for "Log In" and another "Sign Up". Understood to use <code>Accounts</code> package from documentation. But could not figure out how to toggle between these two forms when user clicks on "Log In" link or "Sign Up" link? <br/>Code:</p> <pre><code>&lt;body&gt; &lt;div class="bl...
1
1,194
Morse Code and Binary Tree
<p>I want to implement the generateTree() method but something got wrong. The idea is that, once generated from the Array of strings, I should be able, thanks the decode method, to translate from morse code to text. Thanks in advance for any help. Only left is also the printTree() method. </p> <pre><code>import java.i...
1
2,194
Log4j appenders for spring DependencyInjectionTestExecutionListener
<p>for one of my applications I have a problem with log4j and appenders for the spring 3. The exact error warning message is "log4j:WARN No appenders could be found for logger (org.springframework.test.context.support.DependencyInjectionTestExecutionListener). log4j:WARN Please initialize the log4j system properly.".</...
1
1,913
Caught signal 11 (Segmentation fault: address not mapped to object at address (nil))
<p>I am practicing simple parallel programming by using MPI now. The code is meant to simulate the image processing by randomly generating N*N matrix and using simple neighborhood weighted-averaging filter without processing the first and the last row and column. I got no error during the compile time but I got some er...
1
3,581
Riak node no longer working after changing IP address
<p>I'm using an instanced Amazon EC2 virtual Ubuntu 12.04 server as my single Riak node. I've gone through all the proper stages of setting up Riak on the instance using the guide on the basho website <strong><a href="http://docs.basho.com/riak/latest/tutorials/installation/Installing-on-Debian-and-Ubuntu/" rel="norefe...
1
1,417
Groupable table header with filter below header
<p><strong>Problem</strong></p> <p>I'd like to create a groupable table header with a filter row below the header.</p> <p>I guess the straightforward approach would be to include the filter components in the header. The problem is that the components aren't editable.</p> <p>I searched, but didn't find a good or work...
1
6,850
Merging data in d3.js
<p>I'm Pythonista and trying to learn d3.js (smile).</p> <p>I have a server with a socket. My page subscribes to it. Server sends updates as JSON <code>'[["id0", 0.38], ["id1", 0.70], ["id8", 0.71]]'</code>. I wrote the following simple page:</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;ti...
1
1,803
Jmockit Expectations/Verifications for calls to private methods when testing a public method?
<p>Can anyone advise if it is possible to use an expectations/verifications to test that private methods are being called the-right-number-of-times/right-parameters.</p> <p>The Class under test has been Mocked-Up - with one private method overridden.</p> <p>Am Testing a public method which calls into a number of priv...
1
1,273
What's the module name if deploy jdbc in Jboss AS 7 as web application
<p>From this <a href="https://stackoverflow.com/questions/16414426/configure-jdbc-driver-in-jboss-7-as-a-deployment-or-as-a-module">post</a> start from Jboss AS7 the jdbc driver is able to deploy as regular application. However a question is, how other application is able to refer to this jdbc jar?</p> <p>here is what...
1
1,038
struts2 Session maintaining
<p>I am developing a web application using struts 2 MVC framework. I am currently working on login module of it. I am new to these technologies. I am facing problems in maintaining sessions. I want that if some one directly hits the url of the profile page(page that is opened on successful login), then he or she is red...
1
3,045
XSL:FO why is inline is not a valid child of "fo:table"? How can I fix this?
<p>Question: How can I resolve this error "XSL:FO inline is not a valid child of "fo:table" ?</p> <p>Assume that I have a document with a simple table that look like this:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;diffreport&gt; &lt;css /&gt; &lt;diff&gt; &lt;table border="1" cellpadding="1"...
1
3,694
Parsing CSV files using Regex in Java
<p>I'm trying to create a program, which reads CSV files from a directory, using a regex it parses each line of the file and displays the lines after matching the regex pattern. For instance if this is the first line of my csv file</p> <pre><code>1997,Ford,E350,"ac, abs, moon",3000.00 </code></pre> <p>my output shoul...
1
1,153
Spring fails for userinfo endpoint returning signed JWT
<p>We're working on a Spring Boot application that is an OIDC client. The identity provider (IdP) is a third-party service and fully OpenID Connect and OAuth 2.0 compliant (as far as we can tell). As it's built with high security in mind, its <em>UserInfo</em> endpoint returns a <em>signed</em> JWT (instead of a regula...
1
1,162
SVG + css3 animation not working with link markup
<p><strong>Hi folks!</strong></p> <p>I've been reading the awesome article <strong>&quot;Using SVG&quot;</strong> from Chris Coyer (<a href="http://css-tricks.com/using-svg/" rel="noreferrer">http://css-tricks.com/using-svg/</a>), and decided to use some things to make an animated logo. But I'ts been a little fight. I'...
1
2,302
script to convert Csv to xml
<p><strong>Need to process the file using for loop</strong></p> <p>I have written below code to convert csv to xml. Here have written separate tag for each column.<br> In input file have column from 1 to 278. In output file need to have tag from A1 to A278, </p> <p>Code :</p> <pre><code>file_in="Prepaid_plan_vouche...
1
1,072
Fix java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JsonAutoDetect
<p>Getting following exception while running the program.</p> <pre><code> Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonAutoDetect at com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std.&lt;clinit&gt;(VisibilityChecker.java:170) at com.fasterxml.jac...
1
1,334