title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
PDFBox 2.0.8 - Extracting an image from one document and using it in another | <p>I am writing a Java application to work as a template reader and writer. I have had success with working with text, but having some dificulty with the images...</p>
<p>Getting the images was the easy part - using a class extending PDFStreamEngine</p>
<pre><code>package readingPdf;
import java.io.IOException;
impo... | 2 | 2,263 |
MySQL LIKE from JOIN clause and GROUP_CONCAT returns only one row from joined table | <p>I have 3 tables: regions, realestate and one-to-many realestate_regions table.<br>
I need to search realestate by address. I have following select query:</p>
<pre><code>SELECT re.id, GROUP_CONCAT( r.name ) AS address
FROM realestate re
JOIN realestate_regions rr ON re.id = rr.reid
LEFT JOIN regions r ON rr.rid = ... | 2 | 1,256 |
Swift 5 - Not able to receive Push Notification through FCM | <p>I am having trouble with getting push notification, here's my payload</p>
<pre><code>{
"to": "erOZW7CN....(fcm token)",
"data": {
"body": "Incoming-Call",
"title": "AppName",
"type": "incoming-call",
"n... | 2 | 1,761 |
How can I dynamically add bootstrap alerts to a page using javascript? | <p>I'm working on creating a todo list using Bootstrap. <a href="https://i.stack.imgur.com/JoDo4.png" rel="nofollow noreferrer">Here's how I'd like it to look</a>. I've created the form and know how to access the data in the form.</p>
<p>What I don't know how to do is dynamically add the alerts to the page using JavaS... | 2 | 1,660 |
Bringing up the Google Signin Screen in SwiftUI | <p>I am playing around with the Google sign in screen and swiftUI, but I keep getting a bunch of messages in my logs that I don't really understand - now the logs I can live with, but the problem I am having is that I can't call the same function multiple times...</p>
<pre><code>import SwiftUI
import GoogleSignIn
clas... | 2 | 1,733 |
Django Simple History - Tracking M2M field changes (with "through") | <p>I am using django-simple-history to track changes to my fields, and from what I see, it seems like django-simple-history does not track changes to M2M fields. I tried introducing an intermediate model for the M2M fields, and then attaching a HistoricalRecords() field within that intermediate model, but it seems like... | 2 | 1,131 |
Dynamically Change JTextField? | <p>My purpose here is to have the user click 10 buttons and have it show the sum in the uneditable JTextField. I did a little test in the console to show it was calculating right and to my success it was: The console was adding up the numbers as I clicked them. ( <a href="http://i.imgur.com/Cwyjm0h.jpg" rel="nofollow">... | 2 | 1,422 |
Android getText from EditText return NULL | <p>in this simple Application of my first program in Android i want to get <code>username</code> and <code>password</code> from User. but after click on button that return <code>NULL</code> and thats incorrect, <code>username</code> and <code>password</code> fields have string and are not <code>NULL</code>.
<code>Textu... | 2 | 1,807 |
Submodules with Dagger and AndroidInjectors | <p>I have been Dagger with the pre Android Injector style for a while, and have now decided to try the new methods. Til now, I was basically declaring on <code>AppComponent</code> like this: </p>
<pre><code>@Singleton
@Component(
modules = [ApplicationModule::class,
NetModule::class,
Ap... | 2 | 2,796 |
How to do a Read More over text with some transparency? | <p>I am trying to do a Read More button which must be over the hidden text, and the hidden text must have some transparency you can barely see it, like this example:</p>
<p><strong><em>(Ignore the turquoise colour cells)</em></strong>
<a href="https://i.stack.imgur.com/6R1RR.png" rel="nofollow noreferrer"><img src="ht... | 2 | 2,176 |
ASP.NET MVC Database not being created/uploaded System.ComponentModel.Win32Exception: The system cannot find the file specified | <p><strong>Background</strong><br>
I have just created an MVC website (as an application) using <em>Visual Studio 2013 Express for Web</em> from the default MVC template using the "Individual user accounts" option. I have created views to fit and added two fields ("Username" and "Birthdate") to the accounts model (usin... | 2 | 10,715 |
Django - Checkboxes & ManytoMany relationships in TemplateView | <p>I have a app where users can register their company and then select a number of settings from a list. Both the company and services are different models. </p>
<pre><code>class Company(models.Model):
name = models.CharField(max_length=100)
(...)
class Service(models.Model):
name = models.CharField(max_l... | 2 | 1,292 |
mod_wsgi cannot load mysql | <p>First I will list my environment and status:</p>
<p>Environment:</p>
<ul>
<li>System: Mac OS 10.6</li>
<li>Python: 2.6</li>
<li>Apache: 2.2</li>
<li>mod_wsgi: 3.3</li>
<li>mysql: 5.x</li>
<li>php: 3.5</li>
<li>trac:0.12</li>
</ul>
<p>Status:
I can run trac as alone-server without problem.
Now I integrate trac to... | 2 | 1,102 |
RecyclerView height wrap_content doesn't work in NestedScrollView | <p>So I have <strong>recyclerView</strong> with height <strong>wrap_content</strong> as I understand this means that <strong>recyclerView</strong> should expand and collapse whenever I add items to it or remove, but for some reason in <strong>NestedScrollView</strong> it doesn't behave like that when I add new Objects ... | 2 | 3,273 |
ERROR: Failed building wheel for cytoolz when installing web3.py on macOS | <p>while trying to do</p>
<pre><code>pip install web3
</code></pre>
<p>I am always getting the following error</p>
<blockquote>
<p>Building wheel for cytoolz (setup.py) ... error ERROR: Command
errored out with exit status 1: command:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -u -c
'import io,... | 2 | 2,820 |
How can I handle multipart form data in Java NIO Htttp Server | <p>I have implemented a Non Blocking Htttp Server by using Java NIO. It works fine for x-www-form-urlencoded POST requests. But when i try it for a HTTP multipart request with large file, it is not working. In that situation Server unable to make response to http client. This is my source code for the NIO Server.</p>
... | 2 | 2,103 |
How to insert another UPDATE SQL command to execute in this code, which use another SQL command to delete one or multiple records | <p>I have this code work for deleting one or multiple records from order table when user select order from checkboxes. Now that I have inventory module, I want my inventory record update qty (add the product quantity back to current inventory) once the order had been canceled. </p>
<p>Actually, this shouldn't be probl... | 2 | 2,706 |
More than one process_item method in pipeline file in python scrapy | <p>I am working on scrapy, i have created two spider files with two different urls in a single scrapy project.</p>
<p>And the two spiders scraping perfectly when runned individually. Actually the problem is each url has different items to fetch so declared all items in <code>items.py</code> file.
Here after scraping i... | 2 | 1,746 |
Creating a user using the SonarQube API returns a 401 | <p>I'm trying to create a user using the SaonarQube API (version 6.2 or up).</p>
<p>I have setup a SoapUI project that contains a few test scripts. One of them is login in and creating a user. this one returns a 401 whe the user creation call is done.</p>
<p>The login is used for other calls as well and proves to wor... | 2 | 1,075 |
Simply assign a Material to loaded .OBJ - ThreeJS | <p>I've been hitting myself overhead with this one for the good three hours now..
My question is, would someone be kind enough to reorganize my example in such a way, that the object that I load comes with a color, any color</p>
<pre><code> var loader = new THREE.OBJLoader()
loader.load(... | 2 | 1,065 |
Dependency injection failure on one controller only | <p>I have two MVC projects that have identical configuration and they use Unity for depending injection.</p>
<p>The first has 10 controllers and the second one has 20 controllers and dependency injection works perfectly for all of these and has been working well for over a year now.</p>
<p>Today I tried to copy 1 con... | 2 | 1,342 |
Angular 6 Dynamic Complex Model-Driven Reactive Forms | <p>I'm trying to create a form which is built dynamically according to a certain model using Angular's reactive forms. The model is a complex object <strong>which can change</strong>, and contains nested objects and values, for example (in TypeScript notation):</p>
<h3>model.d.ts</h3>
<pre class="lang-ts prettyprint-ov... | 2 | 2,971 |
Read from file on JButton click | <p>I'm having an issue with my java project. I've done my homework through searches and reading and I can't seem to find what I need. What I need to be able to do is each time I click a button, read a line from a text file and input it to text fields. I think the latter part won't be difficult as soon as I have an i... | 2 | 1,300 |
“IllegalStateException: Incompatible execution data for class in…” exception from Jacoco when run for an existing ear | <p>I’m trying to test a legacy big fat EAR (app.ear) application using Arquillian and TestNG. To run the test I have added the testable war file (test.war) in to the existing app.ear and deployed on WildFly 10 server remotely.</p>
<pre><code>@Deployment
public static EnterpriseArchive createDeployment(){
return Sh... | 2 | 1,307 |
Runtime error on Windows when trying to load image with libpng | <p>I am using <a href="http://phash.org/">pHash</a> and that library uses <a href="http://www.libpng.org/pub/png/libpng.html">libpng</a>. I am having issues running my program because libpng fails loading a PNG file.</p>
<ul>
<li>Version of libpng: <a href="https://sourceforge.net/projects/libpng/files/libpng14/1.4.19... | 2 | 1,414 |
Search and Filter with Pagination | <p>I started learning react and working on a personal gaming db website project. I'm struggling to make my filtering/search and pagination to work together. I'm using a local json file for my data and the flow I had in mind was to filter the data first before doing a pagination. But I can't make both of them work, it's... | 2 | 2,197 |
Gathering SQLite row id to delete entry from context menu | <p>I query my database and it returns sorted arrays to populate a <code>ListView</code>. When I click on the <code>ListView</code> I can obtain the Row ID according to my database, but my context menu can't access the same array, any guidance on how to go about fixing this? Most of the examples I found online won't hel... | 2 | 4,618 |
Bootstrap: modal and transform-scale on body | <p>I use bootstrap 4 (but I have the same issue on bootstrap 3).</p>
<p>In my css, I have a <code>transform:scale(0.9)</code> on my body.</p>
<p>When I open a modal the page scrolltop (that's not really a scroll, I think its a css issue) and the modal and backdrop are on the top of the page and not just upper the cli... | 2 | 1,462 |
RealURL extension not working for typo3 v6.2.x when domain given as IP Address | <p>I have a webpage tree structure given below</p>
<p><img src="https://i.stack.imgur.com/H105k.png" alt="Web Tree Structure"></p>
<p>In this tree when I access like <code>http://localhost/mysite</code> its redirect to "Root Local" and accessed like <code>http://192.168.1.20/mysite/</code> its redirect to "Root IP" ... | 2 | 1,827 |
Youtube Fetch All Playlists | <p>I am using a PHP script to find all the playlists that a particular user ID has uploaded. The problem is the script is not returning all the playlists, but only some of them .</p>
<p>I want to get all the playlists, but not all of them are fetched.</p>
<p>Check it out here : <a href="http://fescomax.com/android_mi... | 2 | 3,083 |
NetSuite Advanced PDF > Display items in a Grid format: | <p>Sorry for being such a newbie as I haven't really tried this before. If this is already answered before, can you please provide the link so I can review it? Here's pretty much what I'd like to accomplish:</p>
<p><a href="https://i.stack.imgur.com/PNfex.png" rel="nofollow noreferrer">enter image description here</a>... | 2 | 1,181 |
how to hide selected item from spinner list in android | <p>i want to hide selected item from the list of spinner just this questions <a href="https://stackoverflow.com/q/26307553/7784663">Hide the selected item from the custom spinner list</a> but i didn't get the answer. i just want to do exactly like the question in link my code is....</p>
<pre><code>toolbar.xml
<... | 2 | 2,313 |
pdfMake javascript pdf content is misplaced | <p>I have the following code, i think is well written but it keeps rendering the pdf content misplaced, </p>
<blockquote>
<pre><code><html> <head>
<title>Ingreso Simple</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.20/pdfmake.js"></script>
<script src="h... | 2 | 4,178 |
How to launch HTA from VBScript | <p>HTA calls external VBScript and after that it turns into suspend mode. At this point control is transferred to the VBScript. As a result of VBScript code execution it may happen that the machine would be rebooted. After the reboot HTA starts automatically and stays suspended; while the VBScript continues to work (le... | 2 | 1,676 |
Call to undefined method : laravel | <p>I have simple blog crud app, I have added tags to my pages, am using <a href="https://select2.org/" rel="nofollow noreferrer">select js</a> for selecting and editing tags in input,</p>
<p>Now I want when a user clicks edit certain page the input should contain tags related to that page.</p>
<p>I mean something li... | 2 | 1,214 |
Binding number keys to buttons for calculator | <p>How do I go on about doing this? I don't like the the idea of having to press each individual button. I'm really trying to understand all of this. I get the concept of binding I just don't know how to do it. </p>
<pre><code>from tkinter import *
class Calc():
def __init__(self):
self.total = 0
... | 2 | 2,046 |
python ontimer vs thread | <p>This is an extension of my recent post. Now that I know about onTimer and Thread, starting a new post.</p>
<p>I did away w/ the while loop in the main. Replaced with onTimer() and Thread. But same results, cant move both objects simultaneously. Code for both listed below: Any advice is appreciated...this is my firs... | 2 | 4,434 |
SendGrid API 405 Method Not Allowed when trying to send an email | <p>EDIT 3: This 405 error has something to do with my IIS Express dev environment. I managed to get everything working on my azure web app.</p>
<p>EDIT 2: Duh. I didnt have the environment variable set.</p>
<p>EDIT: I have made some progress thanks to you helpful fellows. Seems I have an authentication problem now ev... | 2 | 1,259 |
Spring security error Circular view path [index]: would dispatch back to the current handler URL [/index] again. Check your ViewResolver setup | <p>I am getting following error while running spring boot security app with gradle -</p>
<p>javax.servlet.ServletException: Circular view path [index]: would dispatch back to the current handler URL [/index] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view... | 2 | 3,005 |
Why Chrome adds tbody tag to each table row? | <p>I have two tables that fill up throw an event.</p>
<p>The stylesheet is made for that the even rows get painted white.</p>
<pre><code>table {
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</code>... | 2 | 1,405 |
this call is ambiguous between the following methods or properties when using 2 models in a view c# razor | <p>I am having trouble using 2 models in a view in mvc. When I try to reference the second model using razor it is giving me this error:</p>
<pre><code>The call is ambiguous between the following methods or properties: 'System.Web.Mvc
.Html.DisplayNameExtensions.DisplayNameFor<System.Collections.Generic.IEnumerabl... | 2 | 1,866 |
How to calculate slope of moving average accurately for a series of points? | <p>What I am trying to do is calculate a simple moving average for a specified period of time for stock prices. I referred to a lot of online resources and all of them recommend using the <code>rolling_mean</code> function to calculate a moving average.</p>
<p>I did the above like this:</p>
<pre><code>
def getEODData(s... | 2 | 2,224 |
Is this Sedgewick code correct? | <p>I am solving an optimization problem in which, among other things, I must maximize flow networks. I implemented a c++ code based flow-maximization algorithm based in the following <strong>java code</strong> that appears in the book of Sedgewick "Algorithms in Java, Third Edition, Part 5: Graph Algorithms", which max... | 2 | 5,550 |
mPDF - No PDF generated when called from within another function | <p>I have a mail_merge function (using cakephp) which when called directly from the browser e.g.
domain.com/contacts/mail_merge will generate the PDF and save it to the server as needed with the database mapped fields.</p>
<p>When however I try to call this mail_merge function from another function. e.g. $this->mail_m... | 2 | 1,372 |
ggplot2 ggsave: keep embedded fonts in exported .png | <p>Numerous people have had the issue where a custom font shows up in the ggplot but disappears upon export using <code>ggsave</code>, but I've only ever found solutions to this for exporting pdfs (e.g. <a href="https://stackoverflow.com/questions/27542302/ggplot-embedded-fonts-in-pdf">ggplot embedded fonts in pdf</a>)... | 2 | 1,118 |
document.getElementById('textbox').focus() not working after submit form | <p>I am trying to implement a simple form, and I am trying to set the focus on the first textbox in the form after submit, it's just not working. I could not use the code snippet on this site because I am using localStorage, and it didn't allow me to use it)</p>
<p>Here's my code on Codepen: <a href="http://codepen.io... | 2 | 1,124 |
Send data through bluetooth programmatically | <p>I need to send data from my android phone to the android emulator that is in my PC through Bluetooth functionality. I understand there's a need of using the client and server side function. However, I don't understand how to invoke my methods into the onCreate function through these codes:</p>
<pre><code> public... | 2 | 1,170 |
ConanException: Package require 'qt' not used in components requires | <p>I've created a project which has two targets, <code>core.dll</code> and <code>runner.exe</code>.
<code>Core.dll</code> depends on <code>Qt5::Core</code>.
<code>Runner.exe</code> depends on <code>core.dll</code>.</p>
<p>Also I've created a conan recipe <code>conanfile.py</code>.</p>
<p>I defined <code>qt</code> in <c... | 2 | 1,421 |
Remove top level category from wp_list_categories | <p>Lets say I have a list of categories </p>
<p>I`m trying to hide the top categories (P1,P2...), but stil keeping the hierarchical structure of my list.</p>
<pre><code>P1
-Ch1P1
--Ch1.1P1
--Ch2.1P1
--Ch3.1P1
-Ch2P1
--Ch1.2P1
--Ch2.2P1
-Ch3P1
--Ch1.3P1
P2
-Ch1P2
--Ch1.1P2
--Ch1.2P2
-Ch2P2
--Ch1.2P2
-Ch3P2
P3
-Ch1P3
-... | 2 | 1,426 |
Wrong Input Layout for DX11 | <p>I tried to write new vertex shader (exactly vertex shader is NULL and input is going to geometry shader but this shouldn't be a difference) with different input layout like other shaders in my application. But I'm getting invalid arg during input layout creation and don't know why. So here is my C++/shader code:</p>... | 2 | 2,642 |
How to add woocommerce-pagination and woocommerce-ordering dropdown to custom shortcode | <p>I've created a custom shortcode to display products with a minimum stock amount and would like to add pagination to the results as well as calling the woocommerce-ordering dropdown to be displayed on the page.</p>
<p>Here's the shortcode:</p>
<pre><code>// Minimum Stock Shortcode
add_shortcode( 'minimum_stock', 'm... | 2 | 1,360 |
Rowspan and alignment issue | <p><img src="https://i.stack.imgur.com/F0ejL.png" alt="enter image description here"></p>
<p>Hi, Attached is the image of the popup where in I'm using rowspan for alignment. Still am not getting the proper alignment.</p>
<p>Here is the Css and MArkup tags. ALL the text boxes shld be left aligned with uniform space be... | 2 | 11,344 |
Strange Results with Numeric Predictor in Naive Bayes in R | <h1>Update:</h1>
<p>the following code should be reproducible</p>
<pre><code>someFrameA = data.frame(label="A", amount=rnorm(10000, 100, 20))
someFrameB = data.frame(label="B", amount=rnorm(1000, 50000, 20))
wholeFrame = rbind(someFrameA, someFrameB)
fit <- e1071::naiveBayes(label ~ amount, wholeFrame)
wholeFrame$... | 2 | 2,365 |
IndexOutOfBoundsException in ListView | <p>I've seen this question a couple of times before but none of the answers seem to fit my case.
As with the others, the exception is withing the Android code and not mine.</p>
<p>The weird thing is it only happens with Android 4.1 and 4.2. My Galaxy 3 recently updated to 4.3 and the problem disappeared.
OTOH, on a Ne... | 2 | 11,647 |
react-google-login clears the cookie/session information in my app | <p>I have setup authentication in my app using <a href="https://www.npmjs.com/package/react-google-login" rel="nofollow noreferrer">https://www.npmjs.com/package/react-google-login</a>. I am unable to figure out why the session/cookie information disappears in my application when I reload the page. That is logged in us... | 2 | 1,480 |
JUnit Test Class failure test | <p>In my program in the GradeBook Class i was supposed to add a toString method to the GradeBook class that returns a string with each score in scores separated by a space.</p>
<p>This i have done and when i create the JUnit Test i am supposed to Use the toString method to compare the contents of what is in the scores... | 2 | 1,541 |
error with train from caret package using method gam: | <p>I have a <code>gam</code> model that I know works just fine in <code>R</code>, but when I try to "<code>train</code>" the same model using the <code>caret</code> package it returns an error saying that the input data columns are lists. Does anyone understand this?</p>
<p>The code that I am running is as follows:</... | 2 | 2,014 |
Php shopping cart security | <p>i've managed to create a working shopping cart and my next concern is security. Mostly about the arcitechture and session security.</p>
<ol>
<li>Should i make sessions somehow secure, if there's no authenticated login and sessions are deleted when browser closes? or is session_start() enough in this case?</li>
<li>... | 2 | 6,429 |
Combine org mode capture and drill modules to learn vocabulary | <p>I want to use the <code>capture</code> module of <code>org-mode</code> to create a data base of new words that I want to learn, and then use the <code>drill</code> module to learn them (flash cards style).</p>
<p>In my <code>org-capture-templates</code> I added the following:</p>
<pre><code>("v" "Vocabulary" entry... | 2 | 1,061 |
SELECT UPDATE SQL Not Working | <p>I have 2 forms </p>
<p>First Form has </p>
<pre><code>Public Class frmMain
Friend strBillIDNumber As String
Friend strBillPassword As String
Friend ds As New DataSet
Friend cnn As OleDbConnection
Friend sql As String
Friend adptr As OleDbDataAdapter
Dim attempt As Integer = 1
Private Sub btnSign_Click(sender As ... | 2 | 1,968 |
AutoCAD Plugin Can't Locate Resources | <p>I have written an AutoCAD plugin that displays images based on what form item the user has selected. An example of an image being called to display would be</p>
<pre><code>previewBox.Image = System.Drawing.Image.FromFile("Window Width.PNG");
</code></pre>
<p>However, even though the .PNG file is in the same direct... | 2 | 6,210 |
Android getintent() method crashes | <p>I am developing an Android app with base API 11. I've been sending data between activities using intent and fetching data using getintent() getextras() all along. predominantly,I've been testing in API 23, i ran the same in api 15, it crashes.Even a simple getintent.hasextra also crashes. Is this a compatibility iss... | 2 | 2,141 |
Android room aggregating data by day month or year | <p>I'm trying to graph data that I've stored using Room. For this I have a Session entity and then 1 to many relations for the session such as number of steps, blood pressure and oxygen levels that are recorded during the session.</p>
<p>For the session I store the start time and I'd like to be able to group sessions ... | 2 | 2,174 |
WildFly DataSource Services which failed to start | <p>I configured a DataSource using WildFly to open a connection, but when I run WildFly I got this error:</p>
<pre><code>11:47:46,874 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 60) MSC000001: Failed to start service jboss.persistenceunit."services.war#DataSourceBLX": org.jboss.msc.service.StartEx... | 2 | 2,125 |
java.lang.NoClassDefFoundError: Lcom/hazelcast/core/HazelcastInstance | <p>I am trying to include hazelcast jars in Wildfly-8.2.1-Final. I have done following steps.</p>
<ol>
<li>Included all jars to wildfly_Home\modules\system\layers\base\com\hazelcast\main</li>
<li><p>Included module.xml inside the main folder.
<code>
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jb... | 2 | 3,851 |
Spring Data JPA repositories use in EJB timer causes TransactionRequiredException | <p>I would like to use spring data repositories in my Java EE project. I use:</p>
<ul>
<li>WildFly 10.0.0</li>
<li>Hibernate 5.0.7 </li>
<li>Spring Data JPA 1.10.6 </li>
<li>CDI instead of Spring DI</li>
</ul>
<p>I have created the following classes and interfaces:</p>
<pre><code>@Entity
public class TestEntity {
... | 2 | 7,082 |
How do I get Rust's openssl crate to decrypt data from the symmetric-encryption gem without the gibberish that Node Crypto automatically removes? | <p>I'm decrypting legacy data created by a Ruby on Rails application using the symmetric-encryption gem in Rust. See my earlier question <a href="https://stackoverflow.com/questions/47661306/">How do I decrypt data encrypted by Ruby's `symmetric-encryption` gem in another language?</a>.</p>
<p>I've already impleme... | 2 | 1,290 |
I need to pull digit places (like tenths place, hundredths place, etc...) | <p>I need to pull out a specific number place, like tenths place, out of numbers that the client puts in. For example, they put in the number 156 and if I need the tenths place, they pull out the 5. Or if they need the hundredths place it will pull out 1. </p>
<p>This is my first Java programming class so we haven't g... | 2 | 1,064 |
How to make a custom field required based on country on WooCommerce checkout? | <p>I've added a custom field to the checkout page (billing_vat) and it needs to be required when the country is set to Ireland (IE).</p>
<p>Currently, I've changed the label to show that it's required in the same way as all the other fields using JavaScript and have hooked into 'woocommerce_get_country_locale' to chan... | 2 | 1,170 |
Android playing the audio file in a listview | <p>I have a listview that show all files in the folder <code>/diarioscolastico</code></p>
<p>This is my code</p>
<pre><code>public class ActivityRegistrazione extends ActionBarActivity {
private static final String LOG_TAG = "AudioRecordTest";
private static String mFileName = null;
private MediaRecorder... | 2 | 2,658 |
Scala: type mismatch; found : scala.concurrent.Future[Option[models.Account]] required: Option[?] | <p>Give then following code:</p>
<p><code>AccountsDAO.scala:</code></p>
<pre><code>def find(id: EntityId): Future[Option[Account]] =
collection.find(Json.obj(Fields.Id -> id)).one[Account]
</code></pre>
<p>And <code>AccountService.scala:</code></p>
<pre><code>def getAccount(id: Option[Credentials]) = id.flat... | 2 | 1,217 |
Why am I unable to import SVG in Jest? | <p>This is the component I want to test</p>
<p>footer/index.jsx</p>
<pre><code>import React from "react";
import logoImg from "@/assets/images/components/header/logo-header.svg";
import HeaderTextImg from "@/assets/images/components/header/header-text.svg";
function Footer() {
return (... | 2 | 1,147 |
Fail to resolve com.github | <p>I am trying to build my android project in android studio 3.0.1 but before it loads completely it shows me error <strong>Fail to resolve com.github</strong> and When i click on Show in file cursor points me to <strong>implementation 'com.github.clans:fab:1.6.2'</strong> this dependency in build.gradle(Module:app)</... | 2 | 2,028 |
React Native -- Nativebase drawer not open in my project | <p>i am working on react native nativebase drawer component in my application so i follow all steps as below</p>
<p>package.json</p>
<pre><code>"dependencies": {
"@expo/vector-icons": "^6.2.2",
"native-base": "^2.3.7",
"react": "16.0.0",
"react-native": "0.51.0",
"react-native-device-info": "^0.13.0",
"react-native-r... | 2 | 1,074 |
Youtube-dl download script debug | <p>Dumping very bad idea of updating this post. New place for this script:
<a href="https://gist.github.com/Wogol/66e9936b6d49cc5fecca59eaeca1ca2e" rel="nofollow noreferrer">https://gist.github.com/Wogol/66e9936b6d49cc5fecca59eaeca1ca2e</a></p>
<hr />
<p>Im trying to create a .command macOS script (Should also work und... | 2 | 4,963 |
Different Tooltip for each SVG circle on D3 Map | <p>I am making a world map of businesses linked to their performance rating: so each business will be represented by a point, that has a tooltip with the performance (and other info.) I'm using the map example <a href="http://bl.ocks.org/phil-pedruco/6522279" rel="nofollow noreferrer" >here </a></p>
<h3>The Map Data:</... | 2 | 1,567 |
Excel NumberFormat for on range not working using c# | <p>I am trying to format currency column range using this format</p>
<blockquote>
<p>NumberFormat = "$ #,##0.00";</p>
</blockquote>
<p>Every time I get this result </p>
<blockquote>
<p>£ 1,016.89</p>
</blockquote>
<p>Here is the completed function for setting columns</p>
<pre><code>public void SetColumns(List&... | 2 | 1,396 |
List structure - checking for sublist | <p>As i'm new to C programming, I'll be posting entire (not long code). Tasks i've been given are to implement insertion of an element inside list, while list stays in order, to print it, and then to check if one list is sublist of another.
Although my <em>insert</em> and <em>print</em> methods work, I get a bunch of ... | 2 | 1,402 |
Set color of a pixel in an image | <p>Hey,I'm trying to make a program which loads a colored image as grayscale on canvas and then returns the color to the pixels clicked.
I'm stuck here when the setrgb() method is not doing what its supposed to. I have copied the color from original image by getRGB() and am using setRGB() to assign it to a new image.
I... | 2 | 1,701 |
unrecognized token issue with jackson api while deserializing | <p>I have written a custom serializer and deserializer for reading json strings over kafka.</p>
<p>The Json Serializer and Deserializer looks as below</p>
<pre><code>package com.kafka.api.serdes;
import java.util.Map;
import org.apache.kafka.common.errors.SerializationException;
import org.apache.kafka.common.seria... | 2 | 2,730 |
IllegalArgumentException: Version must be >= 1, was 0 | <p>I'm getting an <code>"IllegalArgumentException: Version must be >= 1, was 0"</code> error on the line:</p>
<pre><code>super(context, name, factory, version, errorHandler);
</code></pre>
<p>in the following class and I'm not sure exactly why this is happening (I'm simply trying to add a username and password to ... | 2 | 1,455 |
How to configure Log4j for Spring on JBoss | <p>I am trying to deploy spring mvc + tiles demo project on my JBoss 5.1.0GA server. I run into this issue with Log4J:</p>
<pre><code> 02:35:49,443 ERROR [StandardContext] Error listenerStart
02:35:49,443 ERROR [StandardContext] Context [/travel] startup failed due to previous errors
02:35:49,443 INFO [[/travel]] ... | 2 | 2,247 |
Qt App causes Segmentation Fault upon GLWidget.show(); | <p>When I step through the debugger, I get the following pop-up message:</p>
<pre><code>The inferior stopped because it received a signal from the Operating System.
Signal name :
SIGSEGV
Signal meaning :
Segmentation fault
</code></pre>
<p>Which is dependent (I think) on these lines of code:</p>
<pre><code>#ifnde... | 2 | 2,602 |
insert a record in mysql db using php | <p>am working on a project of surveys on android, it's about login ( this part works)and inserting data this part doesn't work is the questionnaire, when the man of survey log in to the application, there is a survey to do, in this project i started with 5 question with yes or no answers as a prototype, he must answer ... | 2 | 4,797 |
React State undefined after Set in componentDidMount | <p>This is Presentation file:</p>
<pre><code>import React, { Component } from 'react'
class CreateZone extends Component {
constructor(){
super()
this.state = {
zone: {
name: '',
zipCodes: []
}
}
}
new... | 2 | 1,704 |
Linux kernel module: How to reinject packets the kernel considers as NF_STOLEN? | <p>Good evening. Posting to this site is new for me, but I've been a thankful reader, who has learned a lot from this forum, for quite a while now. This is the first time I am encountering a problem I neither can solve myself, nor with the help of entries which already exist on Stackoverflow or any other resource the i... | 2 | 3,471 |
Python - SQLite to CSV Writer Error - ASCII values not parsed | <p>Afternoon,</p>
<p>I am having some trouble with a SQLite to CSV python script. I have searched high and I have searched low for an answer but none have worked for me, or I am having a problem with my syntax.</p>
<p>I want to replace characters within the SQLite database which fall outside of the ASCII table (large... | 2 | 1,062 |
Google Maps for Rails - update markers with AJAX | <p>I am working on a web app and I use Ruby on Rails. Our index is made of a map and of a search field. You can search a location and the map updates its markers.</p>
<p>I would like to use Ajax to avoid refreshing the page. So I added <code>remote: true</code> to the form, a <code>respond_to</code> in the controller ... | 2 | 1,444 |
Only Receiving Part of Apple Subscription Notification in Google Cloud Function | <p>I am trying to set up a Google Cloud Function (GCF) to handle Subscription Notifications from Apple. I am familiar with GCF, but not very familiar with writing my own REST API and the Nodejs methods of handling the data Apple sends with the notification. I am receiving the Apple notification, but only a "chunk" of... | 2 | 1,695 |
cakephp no id passed to Form | <p>I have two forms, one to edit room details and the other to edit Extras. Within the forms I pull in a file upload and pass in the id. For some reason one requires a url and the id does not get passed in. Both have the same code. Can see why they are differnt.</p>
<p><strong>Room form</strong></p>
<pre><code> ... | 2 | 2,347 |
camunda spring boot starter with gradle gives processEngineConfigurationImpl bean missing | <p>My issue is quite similar to <a href="https://stackoverflow.com/questions/41842156/when-setting-embeddedservletcontainerfactory-with-camunda-spring-boot-processeng">this one</a> and it's kinda straightforward: copy paste service from maven to gradle project makes starters non operational.</p>
<p><a href="https://gi... | 2 | 3,205 |
Python always crashes using pydobc connection | <p>I am having a hard time with <code>pyodbc</code> module (<code>python3</code>). The following code always crashes python (I run it from DOS terminal). The crash happens when <code>main()</code> function returns. My data source is a 4D v13 database remote server. I am using 4D-ODBC driver which seems to be properly i... | 2 | 1,708 |
ng-repeat with form in angularjs | <p>I have created dynamic forms with ng-repeat directive. I am getting form field according to userid value. Once I have filled every field in form my add user button should be enabled. As of now its not enabled. I have attached my code below.</p>
<p><strong>My html code:</strong></p>
<pre><code><div ng-app="myApp... | 2 | 1,177 |
Pulling date and time from Excel to Pandas and combining it to a timestamp | <p>Final Edit (hopefully):
Oh my god you solved it!
After upgrading to Pandas 0.15.2, this solution seems to work:</p>
<pre><code>trades['OEDatum'] = (trades[['OEDatum', 'OEUhrzeit']].apply
(lambda x: dt.datetime.combine
(x['OEDatum'].date(), x['OEUhrzeit']), axis=1)... | 2 | 1,311 |
select all checkboxes if none are select in php query | <p>I have a script wher users can find exercise from a database, I have checkboxes for the user to find specific exercises the script works fine when a least 1 checkbox is selected from each checkbox group however I would like it that if no checkboxes was selected then it would the results of all checkboxes. </p>
<p>... | 2 | 1,365 |
Unable to Autowire an interface which extends CRUD repository | <p>I am new to spring boot and trying to build a demo app. I would like to connect to a mysql DB using hibernate and fetch contents from a table. This is what my project structure looks like:</p>
<p><a href="https://i.stack.imgur.com/Hi5U8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hi5U8.png" a... | 2 | 2,777 |
GCC ignores __attribute__((section("CCMRAM"))). How to fix? | <p>I am trying to use core-coupled memory (CCMRAM) of my cortex-m4 (STM32F407). It works fine with Keil MDK-ARM but gcc-arm-none-eabi ignores <code>__attribute__((section("CCMRAM")))</code>.</p>
<pre><code> #define configTOTAL_HEAP_SIZE 1000*1024
#define region1_HEAP_SIZE (40*1024)
#define region2_HEAP_SIZ... | 2 | 1,866 |
Show multiple product custom fields values in cart on Woocommerce | <p>I have a problem with custom fields & values from my product page appearing on the cart page. As you can see from the screenshots, I have three fields: "Color," "Texto1" and "Texto2" and only the first seems to appear on my cart page.</p>
<p>This is the code that print the fields on the product page: </p>
<... | 2 | 2,535 |
Does the creditCard function exist in Omnipay PayPal Express? Or only in PayPal Pro? | <p>This question is maybe similar to <a href="https://stackoverflow.com/questions/28218397/using-paypal-pro-in-omnipay">THIS</a> and <a href="https://stackoverflow.com/questions/18495788/setting-shipping-info-in-omnipay">THIS</a> but I'm not entirely sure. </p>
<p>I've made a shopping cart that sends the product detai... | 2 | 2,676 |
passing InputStream to a different class and getting a NullPointerException | <p>I am trying to create an InputStream inside my activity. It creates just fine but I am trying to pass the created InputStream to a class where I actually want to work with the InputStream. The InputStream in created inside an onClick method on my activity. The second I try to pass the InputStream object to a met... | 2 | 1,339 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.