title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Angular 2: How to test that an NgBootstrap component (and contents) are on the page?
<p>This problem keeps coming up in my tests, where I'm trying to test the contents of an element inside an NgBootstrap component (like a modal). It seems like the test can't even tell that the component exists, even though the Karma browser page displays the component just fine.</p> <p>For example, I'm using an NgbMod...
1
1,203
Next tab with button
<p>Hello I have the body form HTML code</p> <pre><code>&lt;body&gt; &lt;div id="page-content" class="header-clear"&gt; &lt;div id="page-content-scroll"&gt;&lt;!--Enables this element to be scrolled --&gt; &lt;div class="content padding-content-tab"&gt; &lt;div id="test-tab"&gt; ...
1
1,804
HTML form returns NULL fields
<p>I have a basic form with several fields that i want to validate before submitting the code. However when i pass the form data to the js it says that the fields are null. Any help please? Im new at JS so please be patient with me. The relevant form. Theres a button to toggle the forms display but i dont think that h...
1
1,184
When does an NSOperationQueue start its first operation?
<p>I've created a test project in which I'm testing my assumptions about <code>NSOperation</code> and <code>NSOperationQueue</code> before using them in my main project.</p> <p>My code is pretty simple, so I'm going to include all of it here. This is using a command line Foundation project with ARC turned on.</p> <h2...
1
1,174
Making a 10x10 grid from a list of arrays
<p>I'm struggling to list my array as a 10x10 grid, the output I keep getting isn't what I'm looking for. I was hoping someone could help me out.</p> <pre><code>import numpy as np x = 1 y = 1 scale = 10 nn = [] for x in range(1,scale+1): mm = [] for y in range(1,scale+1): xy = [x,y] mm.appe...
1
1,076
Using different package names for bindings and wsdl using the jaxws maven plugin
<p>We have a special requirement with our application: files generated <strong>against the wsdl</strong> should have <strong>a given package name</strong> and files <strong>generated against xsd files</strong> should have <strong>another package name</strong>.</p> <p>There does not seem to have a way to customize this...
1
3,039
Using DataInputStream after BufferedReader
<p>A sample binary PGM file is as follows:</p> <pre><code>P5 # This is a comment 10 10 255 #image intensity information in bytes that I am unable to copy paste here </code></pre> <p>like</p> <p><a href="https://i.stack.imgur.com/knewG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/knewG.png" alt=...
1
1,925
android - TextViews with line break
<p>I have TextViews and I want have their in rows as with line break. TextViews are objects with some functions. Their are words in array separated by comas. I want show its in a sequence with line break.</p> <p><strong>This is my code:</strong></p> <pre><code>int i; String p = "one, two, three, four, five, six, seve...
1
1,092
MessageBeep not playing any sound
<p>I'm trying to use the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms680356%28v=vs.85%29.aspx?f=255&amp;MSPPError=-2147217396" rel="nofollow noreferrer"><code>MessageBeep</code></a> API to play a sound, but no sound plays.</p> <pre><code>MessageBeep(MB_ICONINFORMATION); MessageBeep(MB_ICONASTER...
1
1,700
Navbar not expanding to fill width of page
<p>I am making a website and I want it to look nice when being used on mobile. However, I can't figure out to eliminate the excess white space on the right of the <code>navbar</code>.</p> <p><strong>Picture of the problem:</strong></p> <p><img src="https://i.imgur.com/mCxDGz0.png" alt="Picture of the problem"></p> <...
1
1,526
Dual-line bilingual paragraph in LaTeX
<p>An interlinear gloss can be used to layout a translation of a document.</p> <p><a href="http://en.wikipedia.org/wiki/Interlinear_gloss" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Interlinear_gloss</a></p> <p>Usually this is done word-by-word or morpheme-by-morpheme. However, I would like to do this in...
1
1,413
Socket Programming: Connection Reset exception - Java
<p>I'm trying to do a program that reads data from a remote server (I don't have access to the server code) and prints it. It crashes when I use the method InputStream.read(), throwing me this exception: java.net.SocketException: Connection reset</p> <p>Here is my code:</p> <pre><code>import java.io.IOException; impo...
1
1,081
Why is there such a big difference in the execution time of a query ran by ADF and in SQL Developer
<p>I have a strange issue with a query running in my JDeveloper ADF web application. It is a simple search form issuing a select statement to Oracle 10g database. When the search is submitted, ADF framework is (first) running the query, and (second) running the same query wrapped within "<code>select count(1) from (......
1
1,051
Get WrappedArray row valule and convert it into string in Scala
<p>I have a data frame which comes as like below </p> <pre class="lang-none prettyprint-override"><code>+---------------------------------------------------------------------+ |value | +---------------------------------------------------------------------+...
1
1,642
Android - How do I get location updates in the background in a service
<p>I need to access location in the background when my app is running.</p> <p>I successfully received location updates when my main activity implemented <code>android.location.LocationListener</code></p> <pre><code>if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManage...
1
1,204
how to insert data into two tables from one form?
<p>well, now, i created a form, and this is it:</p> <pre><code>&lt;html&gt; &lt;body bgcolor="lightblue"&gt; &lt;form align="center" action="connect2.php" method="post" style="bgcolor:red"&gt; &lt;div style="margin-left:433px" &gt; Registration No.: &lt;input type="text" name="reg" /&gt;&lt;br /&g...
1
2,866
How to use Razor class library inside a ASP.NET Core application
<p>I wrote a simple Razor class library as following</p> <p><a href="https://i.stack.imgur.com/5XyTP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5XyTP.png" alt="enter image description here" /></a></p> <p><strong>Areas/Library/Pages/_ViewStart.cshtml</strong></p> <pre class="lang-cs prettyprint-o...
1
7,093
How do I change the REST context generated by enunciate?
<p>I have the following annotation in my RESTEasy code:</p> <pre><code>@Path("/v1/authenticateService") </code></pre> <p>Enunciate generates a "Mount Point" in the documentation as:</p> <pre><code>/rest/v1/authenticateService/authenticate </code></pre> <p>I have tried using the following in my enunciate.xml, to ove...
1
1,430
Jackson not consuming the JSON root element
<p>I'm using JAX-RS + Jersey to consume the web-service request and Jackson to translate JSON data:</p> <pre><code>@Path("/") public class JAXRSRestController { @Path("/jsonRequest") @POST @Consumes(MediaType.APPLICATION_JSON) public Response submitJsonRequest(SampleObject sampleObject, @Context HttpHe...
1
1,231
Passing parameters with HttpURLConnection when Uploading audio file
<p>As i took the code from the one of stack overflow answers. <a href="https://stackoverflow.com/questions/14351870/send-txt-file-document-file-to-the-server-in-android">Send .txt file, document file to the server in android</a></p> <p>Modifying the following code, I'm trying to POST audio/video file to online php ser...
1
2,079
Django - AttributeError: 'UserProfile' object has no attribute 'urls'
<p>I'm trying to extend <code>User</code> in Django. This new <code>User</code> should have more attributes than built-in <code>User</code> and some of them should be required during registration. Moreover, I would like to see this new type of user in <code>Admin</code>. I've followed official tutorial and <a href="htt...
1
1,474
Inserting google maps api into ionic template page
<p>I'm new in ionic but I would try convert my old app into this powerfull framework. I'll try to use google maps api into a template page loaded.</p> <p>this is my app.js</p> <pre><code>angular.module('starter', ['ionic', 'starter.controllers']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { ...
1
3,568
paste variable names inside R function
<p>With the help of <a href="https://stackoverflow.com/users/1201032/flodel">flodel</a> I <a href="https://stackoverflow.com/questions/10002536/how-do-i-replace-numeric-codes-with-value-labels-from-a-lookup-table">found a way to replace numeric codes with value labels from a lookup table</a>.</p> <p>Ambitious as I am,...
1
1,119
How to load a dynamic component in angular tab?
<p>I need to load the components dynamically into the tabs in angular. I have a parent component which has angular tabs in it. Inside the tab control, I need to load the child components dynamically. </p> <p>Initially when the Tabs are loaded it should be loaded with a component1, and on some user interactions it shou...
1
2,051
matplotlib pyplot.show: Invalid RGBA
<p>I just need to draw scatter plot in 3D.</p> <pre><code>from mpl_toolkits import mplot3d from matplotlib import pyplot as plt ax = plt.axes(projection="3d") ax.scatter(dots_x, dots_y, dots_z, c='red') plt.show() </code></pre> <p>There dots_x, dots_y, dots_z are coordinates (python lists). Every time I running progr...
1
2,721
How to convert a T-SQL query into a Stored Procedure?
<p>I am running <code>SQL Server 2012</code> and I need to convert a <code>T-SQL</code> query into a <code>Stored Procedure</code>. My aim is to run a <code>SQL</code> job that will execute this <code>Stored Procedure</code> on a daily basis.</p> <p>My <code>T-SQL</code> query stands as follows:</p> <pre><code>DECLAR...
1
1,206
Left Joins in Grails
<p>How to call joins in grails.Here are my Domain classes :</p> <pre><code>package com.org.domain class CoverageList { Integer id Integer pub_cat_id Integer brand_id Integer brand_set_no String cov_list_desc Date edit_date Date part_edit_date Integer category_id static constraint...
1
1,315
How to get the RGB values from am imageview in android
<p><strong>What i am trying to do:</strong> I am trying to get the RGB values from an image</p> <hr> <p><strong>What is happening:</strong> I am getting the null pointer exception in </p> <pre><code>final Bitmap bitmap = ((BitmapDrawable)imgUsrClrId.getDrawable()).getBitmap(); </code></pre> <hr> <p><strong>Questio...
1
1,848
Cannot import psycopg2 from python3 on fedora 27
<p>I've just upgraded to Fedora 27, and have been unable to get psycopg2 working. </p> <p>I'd very much appreciate any help anyone can provide. </p> <p>As a simple test case, I've been executing<br> <code>&gt;&gt;&gt; import psycopg2</code><br> at the interactive shell. This works fine for Python 2.7, but fails for...
1
1,106
Session on Flask server with Python requests package not working
<p>I've written Flask server with flask_login. To login user, I use <code>login_user(user)</code>, and I have one page of my site protected with <code>@login_required</code>. As a client, I use Python requests package, that's the code:</p> <pre><code>import requests sess = requests.session() sess.post("http://page.on/...
1
1,586
Vue.js - click events and "this"
<p>I have a todo list in vue and I'm using <code>pop()</code> to clear out/delete list items. See the code in question below:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>/...
1
1,252
How can I read a timestamp with timezone (timestamptz) value from PostgreSQL in Rust?
<p>What's the right Rust data type to use for a <code>timestamptz</code> when using postgres version 0.17.0 with Rust 1.40.0?</p> <p>I read the docs for <a href="https://docs.rs/postgres/0.17.0/postgres/types/enum.Timestamp.html" rel="nofollow noreferrer"><code>Timestamp</code></a> but have no idea what this means or ...
1
1,478
Android: Can't identify the correct answer in a quiz game
<p>Well, I'm with this problem about 3 days. I'm making a quiz game, but I can't identify if the clicked button contains the correct answer or not. Following some tips that I saw around here, I did some alterations in my code. See the new code:</p> <pre><code>package com.app; import java.util.ArrayList; import java.u...
1
2,321
Object provided to Escape helper, but flags do not allow recursion in Zend Framework 2
<p>So i work in a <strong>Zend Framework</strong> project and i am using <strong>Doctrine</strong>, i create my Form, Controller and Entities, but when i run my project i got this error :</p> <pre><code>Object provided to Escape helper, but flags do not allow recursion </code></pre> <p><strong>This is my Entity :</st...
1
6,092
Good approach for updating the GUI continuously in wxPython using threads?
<p>I am working on a GUI app using python v2.7 and wxPython v3.0 on windows 7 OS. I have to update my GUI continuously which contains lots of panels. Each panels contains a <code>wx.StaticText</code>. I have to update these <code>wx.StaticTexts</code> continuously. I thought of using <code>threads</code>. Also I am usi...
1
1,262
Android: Softkeyboard moving TextEdit out of screen
<p>I am trying to the softkeyboard so the user can enter his information to create a new account on my android app. The problem is that some of my TextEdits are always flowing outside the screen and the user can not see what he actually typed. The screen looks this way:</p> <p><img src="https://i.stack.imgur.com/U2wzr...
1
1,828
Aligning SVG elements to appear center vertically and horizontally
<p>I have an SVG element which will be reused and will be of different size. As of now, I have to adjust viewbox manually to make it appear centre. Is there is any svg solution to centre irrespective of any size.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div ...
1
1,553
Warning: Error in match.arg: 'arg' must be NULL or a character vector
<p>I am trying to select the cell in the DataTable and show the corresponding position/value. But it seems not working... I ran the code from <a href="https://yihui.shinyapps.io/DT-selection/" rel="nofollow">the example cell code from Yihui</a> but still showing the same error as I got from my code:</p> <p><a href="ht...
1
1,354
How to get name from SQLite Database in android
<p>I am developing an android application in when user enters in the app, the first activity asks his name to enter in textfield. By clicking on submit button, the name of the user stores in SQLite database and another activity opens and the name of the user will display in next activity. Now, I want something like tha...
1
3,020
"moov atom not found" when using av_interleaved_write_frame but not avio_write
<p>I am attempting to put together a class that can take arbitrary frames and construct a video from it using the ffmpeg 3.3.3 API. I've been struggling to find a good example for this as the examples still seem to be using deprecated functions, so I've attempted to patch this using the documentation in the headers and...
1
4,447
How do i make this search bar work in flutter
<p>Here is the code for my search bar, whenever i enter some value in the search bar i want it to show items available on the list which matches the entered value.</p> <pre><code>class HeaderWithSearchBox extends StatelessWidget { const HeaderWithSearchBox({ Key key, @required this.size, }) : super(key: key...
1
1,644
PostgreSQL: Iterate through a tables rows with for loop, retrieve column value based on current row
<p>I have the following 2 tables</p> <pre><code>CREATE TABLE salesperson_t ( salespersonid numeric(4,0) NOT NULL, salespersonname character varying(25), salespersontelephone character varying(50), salespersonfax character varying(50), salespersonaddress character varying(30), salespersoncity ch...
1
1,177
COLOR_ATTACHMENT's - How to render to multiple textures as color attachments inside a Framebuffer Object?
<p>I am trying to render to multiple textures as <code>COLOR_ATTACHMENT</code>s without success. All I get from displaying them is a black screen (with a red clear fill) meaning my texture is read but is 'empty'.</p> <p>My pseudo code is : attach 3 textures to an FBO with texture indexes 1, 2 and 3 and color attachmen...
1
2,375
react hooks dispatch action with use dispatch
<p>Hello I have a problem calling my action using usedispatch</p> <p>he arrives on my action but for some reason he does not pass on my return. stop here: console.log('here is get all products'); and no go to my getallproducts:</p> <pre><code>export const getAllProducts = () =&gt; { console.log('here is get a...
1
1,644
Attempt to invoke virtual method 'void android.os.Bundle.putString(java.lang.String, java.lang.String)' on a null object reference
<p>I am creating a health based nav drawer application in Android Studio, and want to use the google drive to store some user details. I have been through the rigmarole of setting the application up to connect to the drive api and have used the google exemplars to write out to the application folder. I wish to place th...
1
5,091
Configuration of JTDS for use with HikariCP + Spring + MS SQL Server
<p>I kept googling for configuration of JTDS (1.3.1) for use with HikariCP (2.4.3), Spring (4.1.2), and MS SQL Server (2008), but unable to find a complete and working example.</p> <p>Here is what I have:</p> <pre><code>&lt;bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close"&gt; ...
1
1,227
ControlParameter can't find control which is in a UserControl
<p>I am fairly new to ASP.NET, but have been rolling right along, able to get past all hurdles thus far, with a little research. But I've got a little issue that I can't seem to get around, involving a custom control I've created.</p> <p>The control is a little widget that pops-up via JQuery and contains controls for ...
1
2,865
Spring repository using stored procedure with REF_CURSOR
<p>I can't figure out how to use cursor as an output parameter for stored procedure in PostgresSQL. I've been following this <a href="https://gist.github.com/thomasdarimont/129bc15d0ccc459610c2" rel="nofollow">https://gist.github.com/thomasdarimont/129bc15d0ccc459610c2</a> but I can't get it work.</p> <p>Hibernate ver...
1
4,871
ArgumentException was unhandled; Value does not fall within the expected range
<p>I am trying to select and play a video file and detect face using "haar cascade". When i select a video file it shows exception "ArgumentException was unhandled" in this line<br> <strong>int len = (int)memde.StreamLength;</strong><br> This is the code I used: </p> <pre><code>private void button1_Click(object sender...
1
1,291
Nested location with alias
<p>I have a directory/web app that is located outside of the web root directory of my site.</p> <p>Say the site is here:</p> <pre><code>/var/www/site/htdocs/ </code></pre> <p>And the external app is located here:</p> <pre><code>/var/www/apps/coolapp/ </code></pre> <p>My question is how can I configure nginx to map...
1
2,079
Creating multiple transactions in a single hibernate session
<p>I have created a Quartz Job which runs in background in my JBoss server and is responsible for updating some statistical data at regular interval (coupled with some database flags)</p> <p>To load and persist the I am using Hibernate 4. Everything works fine except one hick up.</p> <p>The entire thread i.e. Job is ...
1
1,863
XmlSerializer escapes an added escape character
<p>I'm using the <code>XmlSerializer</code> to output a <code>class</code> to a <code>.xml</code> file. For the most part, this is working as expected and intended. However, as a requirement, certain characters need to be removed from the values of the data and replaced with their proper escape characters.</p> <p>In...
1
1,275
Spring boot application with Office 365 authentication
<p>I'm developing an application (spring boot for backend and react for frontend) with authentication with Office 365. But I want to use my own group and permissions for Users. For instance, when a User access to /api/auth for the first time, I want to retrieve informations from microsoft graph and save it to my DB an...
1
2,208
Configure Tomcat 8 with Postgres
<p>I want to configure Tomcat 8 with PostgreSQL</p> <p>I added this in context.xml</p> <pre><code>&lt;Resource name="jdbc/DefaultDB" auth="Container" type="javax.sql.DataSource" username="postgres" password="qwerty" url="jdbc:postgresql://localhost:5432/crm" driverClassName="org.postgres...
1
1,104
Configuration path "security.access_control" cannot be overwritten
<p>I'm busy trying to configurate Fouserbundle on Symfony 2.6.9. But doesn't work, i got this message:</p> <p><strong>ForbiddenOverwriteException in BaseNode.php line 223: Configuration path "security.access_control" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one c...
1
1,563
jenkins integration sonar error, Cannot run program "svn" Eorror
<p>When I build my project with Jenkins, I got the error as below. But if I remove sonar config, it's ok</p> <h1>Log:</h1> <pre><code>[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project bsp-cmts-provider: java.io.IOException: Cannot run program "svn" (in directory "/...
1
1,956
how to fetch the data from sqlite database and show in listview in android
<p>after login page I want show the A for Apple,B for Boy....ect upto F..in listview. But in my application i login success fully only login table is created success fully but mainmenu is not created.. i want create mainmenu table in test database after that i want fetch the data from mainmenu table to listview in andr...
1
2,133
DFP issue : div element is already associated with another slot
<p>I am new to DFP. I am trying to show an image from collection of images to a single slot with time interval of 5 sec. What i found is some images get display in 5sec and some came and changes within 2 or 3 sec. This inconsistency looks very ugly. I tried to debug with google force console and found this logs :</p> ...
1
1,678
How to make a ListView inside a grid in WPF fill the whole screen, even when resized
<p>I have a control which is a grid where the first row contains some buttons, with fixed height, and the second (and last) row contains a ListView. Then I have a main screen which contains only a menu and this user control above. I would like to have the size of the ListView as the maximum for the window, which means ...
1
1,224
What does {error C2338: (boost::has_trivial_destructor<T>::value)} mean for boost::lockfree::queue ? What am I missing here?
<p>I have a struct <code>MyClass</code> inside another class <code>MyOuterClass</code> I am trying to put into a boost::lockfree::queue. My structure looks like below</p> <pre><code>struct MyClass { MyClass() {} MyClass(const string&amp; topic, const string&amp; multicastChannel, const string&amp; netInterface...
1
1,024
com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type using a RecyclerView
<p>I am facing this problem since , i read this post <a href="https://stackoverflow.com/questions/38864428/database-databaseexception-cant-convert-object-of-type-java-lang-string-to-type">database.DatabaseException: Can&#39;t convert object of type java.lang.String to type</a> but still am getting the same error, wher...
1
1,918
Creating a new column in pandas quantile using Quantile function
<p>I want to create a column Quantile, for each date. Calculated the Quantile for each unique value Sales value. Ie Category always corresponds to the same number in sales for each particular date.</p> <p>I have dataframe which is indexed by date. There are many dates and multiple of the same dates. Example of the sub...
1
1,558
Getting "Unexpected character '/' (code 47)" exception when running simple Odata4j consumer
<p>I am a beginner to odata4j. I am trying to run the following program using odata4j v0.7 library-</p> <pre><code>import org.core4j.Enumerable; import org.odata4j.consumer.ODataConsumer; import org.odata4j.consumer.ODataConsumers; import org.odata4j.core.OEntity; import org.odata4j.examples.AbstractExample; public c...
1
1,032
How to tell htmlunit to ignore certain errors
<p>I am currently trying out HtmlUnit. I want to fill out an form and then submit it. But this results in an error, which seems to be caused by a file not being accessible, which results in a connection reset being thrown. How can I suppress this, as this is not crucial considering the loading process of the whole webs...
1
2,265
Fast capture stack trace on windows / 64-bit / mixed mode
<p>Like most of you probably know there exists plenty of different mechanisms to walk stack traces, starting from windows api, and continuing further into depth of magical assembly world - let me list here some of links I've already studied.</p> <p>For of all let me mention that I want to have mechanism of memory leak...
1
1,578
How to reset a select box after hiding a modal?
<p>I have a select box:</p> <pre><code>&lt;select class="selectpicker" id="select_seleccionar_proyecto_id"&gt; &lt;option value="0"&gt;Seleccione..&lt;/option&gt; &lt;option value="1"&gt;Tarea número 1&lt;/option&gt; &lt;option value="2"&gt;Tarea número 2&lt;/option&gt; &lt;option value="3"&gt;Tarea nú...
1
1,461
Programming to android, My layout xml files won't update when i build the project
<p>I'm working currently on a test project in order to practice some of the basic features of android layout before i get to work on my project. For now i'm experiencing with some buttons and activity change, and got stack on one frustrating problem.</p> <p>At first i wasn't sure why my new Layout just won't show some...
1
2,555
Iterate array object in liquid template
<p>I have a problem when my Liquid template iterate in array object. I want to transform an input json into another output json.</p> <p>It is my Liquid Template:</p> <pre><code>{% assign clientList = Clients.value %} { "value": [ {% for client in clientList %} { "ACCOUNTNUM": ...
1
1,295
CSS: Maintain aspect ratio in responsive img with max-width and max-height
<p><sub>(Similar questions are already asked at stackoverflow, but this question has more constraints, such as both a specific max-width, max-height, a required specific height and width, and no layout shift.)</sub></p> <h1>Problem:</h1> <p>I want to have a responsive image with the following constraints:</p> <ul> <li>...
1
1,171
JasperReport iReport: JRException: Error retrieving field value from bean
<p>I'm trying to understand how iReport works and how to create a simple jrxml file. The report has a title and header and the data should be in a table. When I try to check how the report looks like using the preview button, I could see the title and header but not the table (Please note that I use that I clicked the ...
1
6,164
OperationalError: No such Column
<p>I am very new to Python and working on the djbyexample tutorial. I continue to get an operationalerror related to one of my two models and im not sure why (though i'm sure its an obvious answer).</p> <p>I've set up two models:</p> <pre><code>from django.db import models class DateTime(models.Model): datetime =...
1
2,191
In-App-Billing - BillingHelper no fully instantiated
<p><strong>What I try to do</strong></p> <hr> <p>Hello Guys, I'm trying to create some In-App-Products for my App, its for donation use. Because im giving away free musik of my friend - he raps. Whatever, I created 5 In-App Products on my developer-account:</p> <ul> <li>donate_small</li> <li>donate_midsmall</li> <li...
1
7,482
C# Update DataGridView from BackgroundWorker
<p>Still struggling to get live data from my database to datagridview. This time I am attempting to do it via background worker. The only thing it gives from doWork method is an INT for backgroundWorker1_ProgressChanged method. I want to send my objects such as DataTable to it as well, so I could refresh data which is ...
1
1,731
WPF add item to datagrid bound to observablecollection exception
<p>I have a simple application which shows a list of books.</p> <p>BookViewModel.cs</p> <pre><code> public class BookViewModel : INotifyPropertyChanged { private readonly IBookRepository _bookRepository; private bool _isDirty = false; public ICommand UpdateCommand { get; set; } ...
1
2,359
Cannot load XLS transformer. Please make sure a Transformer implementation is in classpath
<p>Good Morning, I'm trying to replicate this: <a href="http://jxls.sourceforge.net/getting_started.html" rel="nofollow">http://jxls.sourceforge.net/getting_started.html</a> </p> <p>Using my own class action instead of employees. But I have some issue.</p> <p>This is my code:</p> <pre><code>package src; import jav...
1
2,459
AndroidAnnotations and EventBus
<p>I have an annotated Activity in a library, which is a subscriber to an EventBus event from the same library. It looks something like this, greatly simplified:</p> <pre><code>@EActivity(resName = "activity_foo") public class Foo extends Activity { public void onEvent(BarEvent event){ doSomething(); ...
1
2,198
Client-server text file transfer using UDP & sockets in C++, server creates a blank file
<p>First of all, I'd like to point out that i'm not a good programmer, so please be patient with me. The logic in the program is as follows: the client sends the server a text file, the server saves it under a different name. In short, very similar to this topic: " <a href="https://stackoverflow.com/questions/11254447/...
1
3,320
Find the first missing positive integer in Python
<p>I have the following task:</p> <blockquote> <p>Given an unsorted integer array, find the first missing positive integer. Your algorithm should run in O(n) time and use constant space.</p> </blockquote> <p>After thinking and getting a hint, I decided to change the input list A. The following is the code:</p> <pr...
1
1,518
Flask Tutorial: Could Not Import app in Visual Studio Code 1.37.1
<p>Am trying to learn Python3 / Flask using Visual Studio Code on my macOS machine.</p> <p>Using:</p> <ul> <li>macOS Mojave (10.14.6)</li> <li>Visual Studio Code 1.37.1</li> <li>Python 3.7.4 64 bit (venv)</li> </ul> <p>Tried the instructions in the following tutorial:</p> <p><a href="https://code.visualstudio.com/d...
1
1,101
Better performance from datagrid grouping
<p>I have a DataGrid which I am using with an ICollectionView to group items in a large collection, 20k+ rows in some instances. I have used this approach before with varying success with showing all rows or virtualizing to create a more responsive page. In this instance I would like to virtualize as much as possible t...
1
1,358
[Vue warn]: Failed to mount component: template or render function not defined. Error
<p>I'm trying to build a Vue app, but I am getting this error on the console:</p> <blockquote> <p>[Vue warn]: Failed to mount component: template or render function not defined.</p> </blockquote> <p>This is my code:</p> <p><code>header.vue</code></p> <pre class="lang-html prettyprint-override"><code>&lt;header&gt...
1
1,119
WPF XAML - Creating a Button with Border, Path and text overlaying each other, all styles controlled by the Button
<p>I'm trying to create a <code>Button</code> that has a <code>Border</code> (rounded corners), which has a <code>Path</code> vector overlaying it and the <code>Path</code> has some text from <code>Label</code> on top of it.</p> <p>I've created triggers that when you hover over this Button the style of all these neste...
1
1,340
Android TV published app not visible in sony bravia android tv
<p>I have developed an app using <code>Leanback Library</code>. The app is working fine on <code>Sony Android TV</code>.</p> <p>But when I have published the app successfully on <code>play store</code> then when i am searching app on my <code>Sony Android TV</code> store it is showing <code>No Results Found</code> mes...
1
1,360
Combobox with Checkboxes
<p>I am trying to make a combobox that shows check boxes, and selecting each checkbox will update the text of the combobox to display everything that has been checked. For some strange reason it works only on the first item in the checkbox and it has completely baffled me as to why. I have a dummy project that is pre...
1
1,316
Objective-c asynchronous communication: target/action or delegation pattern?
<p>I'm dealing with some asynchronous communication situations (Event-driven XML parsing, NSURLConnection response processing, etc.). I'll try to briefly explain my problem:</p> <p>In my current scenario, there is a service provider (that can talk to a xml parser or do some network communication) and a client that can...
1
1,151
How do I insert a new node before first node of a doubly-linked list?
<p>I am looking at how to insert a new node before the first node of a doubly-linked list. I'm getting confused with the <strong>auxiliary nodes required</strong> for this operation and the <strong>sequence of steps</strong> in which to perform the operation. I would be grateful for a hint on how to solve this problem ...
1
1,509
Vue 3 Package Update Errors
<p>Vue 3 app broken/will not compile following package update. Zero errors prior to update.</p> <p>I am receiving the following node console errors.</p> <p><strong>Errors</strong></p> <pre><code>&quot;export 'createElementBlock' (imported as '_createElementBlock') was not found in 'vue' &quot;export 'createElementVNode...
1
1,831
How do I use a Transaction in a Reactive Flow in Spring Integration?
<p>I am querying a database for an item using R2DBC and Spring Integration. I want to extend the transaction boundary a bit to include a handler - if the handler fails I want to roll back the database operation. But I'm having difficulty even establishing transactionality explicitly in my integration flow. The flow ...
1
3,322
Laravel 5.4 send mail with attachment giving error - using Mailtrap.io
<p>I am trying to send email with an attachment in a developing environment - using <code>mailtrap</code> for the same. This attachment can be of any file type. But, I always end up receiving the error:</p> <blockquote> <pre><code>Expected response code 250 but got code "502", with message "502 5.5.2 Error: command n...
1
1,310
Multiple file upload with AJAX and Codeigniter
<p>Hi there I am trying to upload multiple images using ajax and codeigniter. I am new to ajax and jquery so please help me understand what I am doing wrong or not doing</p> <p>Here is my controller code and upload function:</p> <pre><code> private function setup_upload_option() { $config = array(); $confi...
1
2,766
C# Random Number
<p>I am working on a project in which I need to generate 8 random numbers. I am having an issue with the random number part being very time consuming for some reason. What I mean by 8 random numbers is I need a string that is 8 characters long consisting of the numbers 0-9. Example 01234567 or 23716253 etc. </p> <p>I ...
1
1,477
How to show TextView in xml layout
<p>i have a layout made in xml for an android app. The last textview it is not shown. why? what can i do? i try setting the linearlayout with height : fill_parent, wrap_content and match_parent: this is the layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://sche...
1
1,255
Is there any way to get CPU temperature using Powershell?
<p>I want to develop a Powershell script to get CPU temperature. Currently I'm using <code>MSAcpi_ThermalZoneTemperature</code> class using <code>Get-WMIObject</code>:</p> <pre><code>Get-WmiObject -Class MSAcpi_ThermalZoneTemperature -Namespace &quot;root/wmi&quot; </code></pre> <p>As a result of above command I'm gett...
1
1,591
CSS Vertical JQuery Menu
<p>Where I'm at currently - <a href="http://officialspeed.tk/projects/" rel="nofollow">http://officialspeed.tk/projects/</a></p> <p>ok to get a better understanding of what I'm trying to learn you can head <a href="http://officialspeed.tk/projects/" rel="nofollow">here</a> to see where I'm at.</p> <p>I wanna hover ov...
1
1,172
Error: [mobx-state-tree] Failed to resolve reference XXX to type 'User'
<h3>Context</h3> <p>I have a React application that is backed by mobx-state-tree (MST). One of the pages makes two <strong>parallel</strong> API calls to fetch a list of <code>Projects</code> and a list of system <code>Users</code>.</p> <p>The responses of these two APIs are then applied as snapshot to two sibling no...
1
1,358
java LDAP read timeout when timeout is not reached?
<p>I have a Java application that connects to an LDAP using LDAPContext. Below are my environment properties:</p> <pre><code> env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put("com.sun.jndi.ldap.read.timeout", READ_TIMEOUT); env.put("com.sun.jndi.ldap.connect.timeout", CO...
1
1,507
Webpack Obfuscator Issue: Cannot read property 'tap' of undefined
<p>I need help with obfuscating my typescript code. I'm using this Electron template though the issue seems particular to webpack and the obfuscator.</p> <p><a href="https://github.com/codesbiome/electron-react-webpack-typescript-2021" rel="nofollow noreferrer">https://github.com/codesbiome/electron-react-webpack-types...
1
2,201
500 - An error has occurred – DB function reports no errors when adding new article in Joomla
<p>I have an article that I want to publish on my Joomla! site. Every time I click apply or save. I get error <code>500 - An error has occurred! DB function reports no errors</code>. I have no idea why this error comes up, al I can think is that it's a server error. </p> <p>I'm using TinyMCE to type articles together ...
1
1,573
React hooks, setting state on select
<p>I'm trying to add sorting feature to my data but I have some issues, I decided to try to play with React hooks a bit and not sure if I do something wrong, the problem is that when I select some value by Select, then eventho state has been changed, there is no differences on the page, after I click second time in ano...
1
1,822
How to find the center point of this rectangle
<p>I am trying to find the center point of the <a href="https://imgur.com/mwNh4s9" rel="nofollow noreferrer">green rectangle</a> which is behind the fish, but my approach is not working. Here is my code:</p> <pre><code>#Finding contours (almost always finds those 2 retangles + some noise): _, conts, hierarchy = cv2.fi...
1
1,037