title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Double to BigDecimal Java
<p>What would be the best way of changing all of these double values to BigDecimal? I guess I did not realize when I started I should use BigDecimal for financial based programs. I am quite new to Java and appreciate any and all feedback.</p> <pre><code>private static class TaxBracket { final double minSalary; ...
1
1,128
MYSQL Triggers New and OLD
<p>How can I get the New/Old values from a table when using a trigger? I tried putting the previous population into another table and got an syntax error. I have edited the table and put the city/country schema so others can view and try to assist me.</p> <pre><code>DELIMITER $$ USE `world`$$ DROP TRIGGER /*!50032 I...
1
2,603
Using maven cxf plugin cxf-codegen-plugin java artifacts from WSDL
<p>Using maven cxf plugin cxf-codegen-plugin java artifacts from WSDL. But the javacodes are not populating in the eclipse IDE. </p> <p>Do I need to specify the any other tags to get the java source code in the eclipse project.</p> <p>Below is my pom.xml </p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM...
1
3,685
How to create dBase (IV?) file?
<p>I'm trying to create a dBase file since it seems the .TransferDatabase() method in my Export vba code requires the file to exist (keep getting "Field will not fit in record". Assuming due to the file not existing).</p> <p>I came across one method online using vba:</p> <p><a href="http://edndoc.esri.com/arcobjects/...
1
1,873
Spring @EnableRetry throws InternalAutoProxyCreator
<p>I created sample <code>Spring-boot</code> application and it works fine without any error,</p> <p>now I want to practice <code>spring-retry</code> to retry some of the methods. If i don't use <code>@EnableRetry</code> my application starts without any errors but retry is not working.</p> <p>If I use <code>@EnableR...
1
2,666
HSQLDB + JUnit + Hibernate: java.sql.SQLException: invalid schema name
<p>I want to run a test with JUnit and Hibernate an in-memory database HSQLDB, but when the method is trying to commit the changes to the DB, this exception appears: (No Spring framework)</p> <pre><code>Caused by: java.sql.SQLException: invalid schema name: SRH in statement [select liquidacio0_.idLiquidacion as idLiqu...
1
2,263
Audio from Icecast server not playing in Chrome
<p>I'm having trouble getting static content (mp3 files) served by an Icecast server to play in Google Chrome browser with HTML5. The reason we're serving the mp3s via Icecast is policy: the CPB requires they be "streamed" and not "downloaded" since we're public radio. Our live audio streams play just fine in Chrome. <...
1
1,693
Spacy - NLTK: Language detection
<p>I am currently working on a project dealing with a bunch of social media posts. Some of these posts are in English and some in Spanish. </p> <p>My current code runs quite smoothly. However, I am asking myself does Spacy/NLTK automatically detect which language stemmer/stopwords/etc. it has to use for each post (de...
1
1,171
Container managed Transaction for JPA+Spring+Hibernate in Tomcat
<p>I am trying to configure JOTM with JPA,Spring, hibernate and tomcat. I have configured somehow but neither it perform inserts nor updates, in other words, i am unable to perform commits after inserting/updating data. I have following configuration.</p> <p><strong>%TOMCAT_HOME%/conf/context.xml</strong></p> <pre><c...
1
2,435
Connection between RabbitMQ and MassTransit
<p>Okay so I have the following problem, this is just a basic test-program but I'm already struggling. I'm very new to this and haven't found a similar scenario yet.</p> <p>Basically, I need to publish messages to a specific queue (more down the line, but the point is we need a fixed topology) and as far as I understa...
1
1,506
Laravel 4 ajax with partial views
<p>im new with laravel 4 started a few days ago. My problem is simple, i have a combobox which the client or the user changes and renders a "partial" view.</p> <p><img src="https://i.stack.imgur.com/WkAXj.png" alt="enter image description here"></p> <p>this is my first view. OnChange:</p> <p><img src="https://i.stac...
1
1,207
Python - AttributeError: 'bool' object has no attribute 'keys'
<p>I'm trying to solve a Sudoku puzzle with open CV package in python. So while I try to call the <code>solve_sudoku()</code> function in my main function, I get an error:</p> <pre><code>AttributeError: 'bool' object has no attribute 'keys' </code></pre> <p>This is the main code:</p> <pre><code>ans = solve_sudoku(st...
1
2,836
set current date on datepicker AngularJS
<p>So, a modal opens up when I click on a button on m md-card to select a date. This is the code for it:</p> <pre><code> &lt;!-- Modal --&gt; &lt;md-dialog aria-label="Date Picker"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close...
1
1,199
quiver plot in Python using 2D arrays
<p>Hi I am trying to use the quiver plot to create a vector field plot. Here is my logic and approach, I first create the x,y coordinates for position by np.arange and use a step size of 0.1. Then I mesh the grid for x,y. Then I import the x component of the function Fx, and the y component Fy into python as .dat fi...
1
8,818
How to resize and center an image and text on <li> grid?
<p>I have this code:</p> <pre><code>&lt;div&gt; &lt;ul class="g"&gt; &lt;li&gt;&lt;a href="proj1.html"&gt;&lt;img src="img/prev1.jpg" /&gt;&lt;/a&gt;&lt;p&gt;Only God Forgives&lt;/p&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="proj1.html"&gt;&lt;img src="img/prev2.jpg" /&gt;&lt;/a&gt;&lt;p&gt;Place To be&lt;/p&gt;&lt;/li...
1
1,290
CarrierWave File Uploads not working in rails
<p>I need to upload image to my filme collection application i use carrierwave to do this (<a href="http://railscasts.com/episodes/253-carrierwave-file-uploads" rel="nofollow">follows the railscasts steps</a>)</p> <p>step 1 i add gem 'carrierwave', '~> 0.9' to my Gemfile then run bundle step 2 rails g uploader image ...
1
1,035
Modal that use data-dismiss="modal" data-target="#id" don't go to their destination
<p>I am trying to focus the input field using modal data-target function on button click. It is focusin but a div called <code>&lt;div class="modal-backdrop in"&gt;</code> is created and modal didn't get close properly.<a href="https://i.stack.imgur.com/4yL9S.png" rel="nofollow noreferrer"><img src="https://i.stack.img...
1
1,156
How can I resize my ViewPager depends on the size of my screen?
<p>I'm trying to resize my ViewPager depends on the screen size of a device. My ViewPager is at the center of screen and has only a width of 300dp. I want my ViewPager height to resize depends on the screen size. Underneath of my ViewPager it has a ImageView, this ImageView covers a part of my ViewPager. </p> <p>In m...
1
1,721
Undefined reference to libxml2 but works on another c file
<p>I tested <a href="http://www.xmlsoft.org/examples/parse1.c" rel="nofollow">this</a> simple c file using libxml and it works fine, so I know that I have libxml installed correctly. However I tired running another file that has only this include statement <code>#include &lt;libxml/xmlreader.h&gt;</code> and I get all ...
1
2,501
add a new field in registration form, but it's doesn't work[fosuserbundle]
<p>I'm trying since yesterday to add a new field in the registration form, but its doesn't work. [fosuserbundle 1.3 -- symfony 2.6.11]</p> <p>I got an error message: </p> <p><strong>Attempted to load class "RegistrationFormType" from namespace "FOS\UserBundle\Form". Did you forget a "use" statement for "FOS\UserBundl...
1
3,016
Bootstrap 4 Holy Grail Layout
<p>I must be missing something obvious. Am trying to implement a derivative of the Holy Grail layout in Bootstrap 4.</p> <p>Instead of Header-->Left Column, Fluid Center, Right Column--> Footer, I wish to have my header and footer inside the Fluid Center Column. Obviously, with the header at the top, the footer at the...
1
1,350
Check if a div contains an image (HTML5 Drag and Drop)
<p>I've created a simple drag and drop game with HTML5. The items drag and drop as they should, however on drop I would like it to check if the image that is placed within the answer box div matches a javascript requirement.</p> <p>Javascript to handle Drag and Drop events:</p> <pre><code>function allowDrop(ev){ e...
1
1,133
dispatch group: for-loop *and* async calls within the for-loop
<p>I understand how to use a dispatch group in a simple for-loop. I, however, have a more complicated for-loop with more asynchronous calls <em>within</em> it. I want all the asynchronous calls to complete before executing the group completion code. I have tried to apply the principles in this answer to no avail- <a hr...
1
1,569
jquery autocomplete not showing the selected value in textbox
<p>I am creating a search bar using jquery autocomplete.</p> <p>Here is my autocomplete code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { $(function () { $(".txtSearch").autocomplete( { source: function (request, response) { ...
1
1,484
android.view.InflateException: Binary XML <Unknown>, and OutOfMemoryError?
<p>I am, using nearly 90 very big images,and i am using lazy loading for displaying that images in Gallery,and grid view.so after loading the images ,if you click on any button,it giving outofmemory(oom) error,and sometimes it giving Xml binary inflate exception.</p> <p>I am using very big images,equal to tablet size...
1
2,018
java mysql executeupdate update
<p>i tried writing a code, that would update a record when a button is pressed with any changes made to any fields. it displays an error message though. this is the code:</p> <pre><code> JButton button = new JButton("Save"); button.addActionListener(new ActionListener() { public void actionPerformed(Act...
1
1,783
Problems updating very simple appwidget
<p>I've been following <a href="http://www.helloandroid.com/files/xmaswidget/android_howto-hellowidget.pdf" rel="nofollow">this</a> tutorial trying to make a very simple clock widget for android. I'm able to create the widget, but it does not seem to update. I find this very strange as my code seems to be essentially w...
1
1,377
AWS EKS with Fargate pod status pending due to PersistentVolumeClaim not found
<p>I have deployed EKS cluster with Fargate and alb-ingress-access using the following command:</p> <pre><code>eksctl create cluster --name fargate-cluster --version 1.17 --region us-east-2 --fargate --alb-ingress-access </code></pre> <p>A Fargate namespace has also been created.</p> <p>The application being deployed h...
1
1,031
JAX-RS REST API Basic Authentication
<p>i am trying to implement basic authentication to somehow secure my rest api.To test, i tried below code to filter the url parameter that contains users however it is not aborting the request without authorization. and the most important is i need to implement it in the way that only update and delete needs to be a...
1
3,560
ERROR 2002 (HY000): Can't connect to local MySQL server after my.cnf update
<p>I'm trying to modify my <code>my.cnf</code> file in Ubuntu 12.04 to fine tune mysql. I copy pasted a file created with this tool <a href="https://tools.percona.com/wizard" rel="nofollow">https://tools.percona.com/wizard</a></p> <p>This does speed up mysql but when I try to access mysql via CLI, I get the following ...
1
3,508
Passing a date to a queryset based on a button click in Django
<p>I have RoastManifest View that querys date_scheduled (field from my RoastManifest model) and returns distinct values. I pass that queryset to a template and loop over the values and present them as buttons on the HTML file. I am able to click any button and pass the corresponding date into the URL,((localhost/sche...
1
1,104
pyqt emit signal from threading thread
<p>I'm trying to update a pyqt QProgressBar from multiple threads, and from what I understand the best way to do this is by emitting signals back to the main GUI thread (I tried passing the QProgressBar object to the worker threads and though it did seem to work I got a ton of warnings in the interpreter). In the follo...
1
2,000
How to Integrate Dropzone.js with ASP.NET Core MVC?
<p>I want to upload some documents in my database using an IFormFile. On client side I'm using Dropzone.js but it's not working properly. Whenever I hit Submit button it sends a null value in parameter. I Have two queries. 1. How to send Document (image/PDF) to the action method. 2. How to redesign (change style of) Dr...
1
1,328
AngularJs: Node is undefined
<p>Using Angular JS on IE11 is causing "Node is undefined" error. This is the script.</p> <pre><code>&lt;html ng-app="app" id="ng-app"&gt; &lt;head&gt; &lt;title&gt;Show Fruit&lt;/title&gt; &lt;link href="include/styles.css" rel="stylesheet"&gt; &lt;!-- Use Bootstrap --&gt; &lt;link rel="stylesheet" hr...
1
6,618
How to use ImageMagick in CodeIgniter
<p>I have a controller which can upload images. Now gd2 library works perfectly except for big images. So I want to use ImageMagick for this. But I can't get it working. I use mamp for my localhost.</p> <p>This is my code:</p> <pre><code>function voegfotostoe() { $config['upload_path'] = './uploads/'; ...
1
1,920
Jest spyOn is not a function
<p>I'm using Jest to test my React component but I've encountered an error I had never seen before.</p> <p>here's my <code>&lt;Row/&gt;</code> component:</p> <pre><code>class Row extends React.Component { constructor() { super(); this.state = { userId: '', showDetails: false, showModal: false, status: '', ...
1
1,589
How do I start my grails app locally?
<p>My developer set up an application on my local machine which is built on the Grails/Spring framework. I accidentally deleted the Unix exe script he gave me to run it locally in my browser and can no longer access the site. Unfortunately I cannot get in touch with him till after the holidays and I need to access this...
1
1,677
How to use app's sass variables in decorators of storybook (React)
<p>I've built a website with Gatsby.js (static website generator with React) and am trying to add storybook to it. </p> <p>I added a custom webpack config to storybook (following the instruction at <a href="https://storybook.js.org/configurations/custom-webpack-config/" rel="nofollow noreferrer">https://storybook.js.o...
1
1,912
Rails 404 error for Stylesheet or JavaScript files
<p>Rails can't load (404 error) CSS &amp; JS files on production but has no problem loading them in development.</p> <p>I'm using Capistrano for deployment and running Rails 3. My path on development is <strong>/www/myapp</strong> but my path on production is <strong>/www/myapp/current</strong>.</p> <p>The applicatio...
1
1,444
Laravel Hyn\Multi-Tenant Database [tenant] not configured
<p>I am working on a multi-tenant laravel application, and have run into an issue with the hyn\multi-tenant package. The documentation for hyn\multi-tenant states that the tenant database connection will be handled by the package, and that as long as the system connection is available and the user has privileges to add...
1
1,438
Avoid Horizontal Scrolling with JQuery DataTable plugin
<p>How can I set the column width in a table that uses <a href="http://datatables.net/" rel="nofollow noreferrer">JQuery DataTable</a> plugin to avoid the horizontal scroll ?</p> <p>What I've tried</p> <pre><code>var table = $(data.datatable.container).DataTable({ dom: "frtiS", ...
1
1,330
How to generate n-level hierarchical JSON from pandas DataFrame?
<p>Is there an efficient way to create hierarchical JSON (n-levels deep) where the parent values are the keys and not the variable label? i.e:</p> <pre><code>{"2017-12-31": {"Junior": {"Electronics": {"A": {"sales": 0.440755 } }, {"B": ...
1
1,206
matplotlib ax to figure extent - remove whitespace, borders, everything for plot of geopandas map
<p>I am looking for a solution to have a seamless map image plot with matplotlib. The current code works good and stable, however, it leaves a whitespace to the left and bottom. I would like to remove this whitespace and don't know how.</p> <p>My sample code for this:</p> <pre><code>import geopandas from seaborn impo...
1
1,245
Service has zero application (non-infrastructure) endpoints
<p><strong>I'm aware to the fact that there are other questions with the same title. I tried their solutions to no avail</strong>. </p> <p>I'm getting this message trying to start my service (Windows hosted) after registering it with <code>installutil</code>.<br> I have no experience with <code>WCF</code>, please be ...
1
1,627
C++ polymorphism with variadic function parameter
<p>I am sharing with you an issue that I got with a class using variadic function parameters. It is the class Thread shown in the following code. It is a wrapper of std::thread in order to use the function pattern.</p> <p>I wanted to use polymorphism with this function in inheriting the class Thread into a new class, ...
1
1,054
LinearLayout in navigation drawer
<p>I want place TextView of bottom ListView in navigation drawer. Throws <code>java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.v4.widget.DrawerLayout$LayoutParams</code></p> <h3>main.xml</h3> <pre><code> &lt;android.support.v4.widget.DrawerLayout ...
1
1,733
Failure to install old mysql2 gem
<p>I am using Mac High Sierra. I am using Ruby 2.2.1 with RVM. I need to use mysql2 with this Ruby on Rails app. I do have mysql 5.7 installed. I do have xcode installed along with the command-line tools.</p> <p>I am simply trying to get this company app working on my local machine. I know that I am very close but I h...
1
1,194
Jadira, Hibernate, and JSR 310 - java.lang.TypeNotPresentException: Type org.threeten.bp.Duration not present
<p>I'm trying to get Jadira, Hibernate 4, and JSR-310 working together and I'm getting a really odd exception that I can't find any info on through scanning the web. </p> <p>POM elements (related to Jadira/Joda)</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;joda-time&lt;/groupId&gt; &lt;artifactId&gt;joda-t...
1
1,419
sbt 0.11.1 doesn't retrieve scalatra 2.1.0-SNAPSHOT dependency
<p>I've just upgraded to sbt <code>0.11.1</code> that doesn't seem to be fetching a certain dependency. Things worked fine before the upgrade.</p> <p>I have this dependency:</p> <pre><code>"org.scalatra" %% "scalatra" % "2.1.0-SNAPSHOT", </code></pre> <p>And when I <code>compile</code>:</p> <pre><code>&gt; update [...
1
2,445
Prisma Not Returning Created Related Records
<p>i want to create a new graphql api and i have an issue that i am struggling to fix.</p> <p>the code is open source and can be found at: <a href="https://github.com/glitr-io/glitr-api" rel="noreferrer">https://github.com/glitr-io/glitr-api</a></p> <p>i want to create a mutation to create a record with relations... ...
1
1,499
iPhone: -[NSConcreteMutableData fastestEncoding]: unrecognized selector
<p>I am trying to do this:</p> <pre><code>self.somestring = [@"hardcodedstring" stringByAppendingString:someotherstring]; </code></pre> <p>But I keep getting:</p> <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSConcreteMutableData fastestEncoding]: unrecognized...
1
1,714
How to pass arrays of strings from both C and Fortran to Fortran?
<p>I am trying to pass an array of strings from C to a Fortran subroutine as well as from Fortran to that same Fortran subroutine. I have managed to pass single strings (i.e. 1D character arrays) successfully from both C and Fortran. However, I'm having trouble with arrays of strings. I am using ISO C binding on the Fo...
1
1,376
Pass variable from app.js to index.html
<p>i can successfully get data from the /api/session.json call and log it to my console.</p> <p>how do i send the output of this api call to my index.html file and replace "Username"?</p> <p>thanks!</p> <p>here is my app.js file for my angular application:</p> <pre><code>'use strict'; var staticApp = angular.modul...
1
1,092
updating/editing data from dataGridView to ms access database in c#
<p>I have a problem that am trying to solve for hours. Its 2 in the morning and even after reading tones of articles I still cannot solve the problem. I have c# windows app that loads data from ms access database into a dataGridView. I can succesfully load it, add new records and save it. However when I try to edit/rem...
1
2,241
How do I get perl to read the values from my html form as unicode?
<p>I have an html form that sends data to .cgi page. Here is the html:</p> <pre><code>&lt;HTML&gt; &lt;BODY BGCOLOR="#FFFFFF"&gt; &lt;FORM METHOD="post" ACTION="test.cgi"&gt; &lt;B&gt;Write to me below:&lt;/B&gt;&lt;P&gt; &lt;TEXTAREA NAME="feedback" ROWS=10 COLS=50&gt;&lt;/TEXTAREA&gt;&lt;P&g...
1
1,284
STM32F - SPI with DMA "ErrorCallback" and frames shifted
<p>I am communicating 2 uC (an arduino display as MASTER and STM32F429 as slave).Its communication consists of 10 bytes in full duplex through SPI using DMA, every 150ms.</p> <p>During some minutes the communication goes very good, both uC are sending their 10 bytes properly. During this time, I have noted that "HAL_S...
1
3,632
Speed up structured NumPy array
<p><code>NumPy</code> arrays are great for both performance and easy use (easier slicing, indexing than lists).</p> <p>I try to construct a data container out of a <code>NumPy structured array</code> instead of <code>dict</code> of <code>NumPy arrays</code>. The problem is the performance is much worse. About 2.5 time...
1
1,200
While loop for inserting values for each rows into the database using single submit button
<p>Currently, I am working on the attendance form. In this interface, it consists rows of student(get from student table). The list of students are viewed in the table. the first column is NO, second column in Birth No, third STudent Name, forth Attendance. in column attendance, there are three radio button which is PT...
1
1,471
Refreshing an UpdatePanel inside of a modal popup
<p>Obviously I am doing something wrong, just not sure what... I have a modal popup and inside of that is an Update Panel which in turn contains a gridview. When the modal popup is first called I would like to refresh the UpdatePanel (and grid data).</p> <p>I have the code working so that the panel is updated when a b...
1
1,685
Why am I getting MissingMethodInvocationException?
<p>I've a service that invokes a DAO through Spring, so now I'm trying to do some testing using mock. Here is my context:</p> <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/conte...
1
1,691
Searching column description description meta across all tables
<p>I am considering using extended properties to store table and column descriptions but I want to be able to search the descriptions across for ALL tables looking for the occurence of a particular substring.</p> <p>In the following example, the function shown returns a list the column descriptions for the table "PEOP...
1
1,053
Vim script to compile TeX source and launch PDF only if no errors
<p>I am switching to using Vim for for my LaTeX editing environment. I would like to be able to tex the source file from within Vim, and launch an external viewing if the compile was successful.</p> <p>I know about the Vim-Latex suite, but, if possible, would prefer to avoid using it: it is pretty heavy-weight, hijack...
1
3,667
Primefaces Fileupload on Wildfly
<p>I am trying to save a profile image in a database.</p> <p>Page:</p> <pre><code>&lt;p:graphicImage id="profileImage" value="#{myProfile.usersProfileImage}" /&gt; &lt;p:fileUpload fileUploadListener="#{myProfile.fileUploadListener}" auto="true" mode="advanced" ...
1
1,043
How to programmatically add an AjaxBehavior to a UIComponent with primefaces
<p>Since i've asked <a href="https://stackoverflow.com/questions/15769371/a-programmatically-added-ajaxbehaviour-into-a-commandlink-doesnt-work">my last question</a> (which still unanswered) i continued searching for a solution and lastly i found <a href="http://forum.primefaces.org/viewtopic.php?f=3&amp;t=5344&amp;hil...
1
2,759
jasperreport renders empty pdf
<p>Have: - a report generator class (Test.class). This class populates an JRBeanArrayDataSource with dummy non-empty values.</p> <ul> <li>a javabean (OficioSipoData)</li> <li>a simple report</li> </ul> <p>All i get is a blank pdf.</p> <ul> <li>Checked for exceptions. main() method throws nothing</li> <li>The list ...
1
2,713
REST API - works in chrome but curl did not work
<p>I am using a web service API. <code>http://www.douban.com/j/app/radio/people?app_name=radio_desktop_win&amp;version=100&amp;user_id=&amp;expire=&amp;token=&amp;sid=&amp;h=&amp;channel=1&amp;type=n</code></p> <p>Typing that address into the chrome, expected result (json file containing song information) could be re...
1
1,152
OpenGL - PBuffer render to Texture
<p>After my last post, when someone recommended me to use pBuffers, I digged a bit on Google and I found some cool examples to make Offscreen Rendering, using pbuffers. Some example, available on nVidia's website, does a simple offscreen rendering, which just renders on the pbuffer context, reads the pixels into an arr...
1
1,342
Bootstrap SelectPicker duplicates select lists on initialization
<p>After dynamically creating select lists using javascript by cloning html, and after the select list creation, the attempt to initialize the select lists using <code>$(MySelectList).selectPicker();</code> seems to succed but also after calling <code>.selectPicker()</code> it seems to duplicate several of the selects....
1
1,228
Oracle Forms crashes when trying to open form
<p>Oracle forms crashes when I'm trying to open a form in my local forms environment. This was earlier working for me but I did start to get this error after I have re-install my forms environment. The forms is also working as it should on the server. I get the following error in the Java console:</p> <pre><code>Excep...
1
1,567
How to stop Div from moving when resizing browser window
<p>I have a sidebar and an area for the content of my website. The sidebar is fixed, but the page content can be scrolled. However when the browser window is resized, the page content div is being pushed to the left as it is set to float to the right, and I would like it to never go further to the left than it is (curr...
1
1,826
JUnit test - Wrong number of parameters and @Parameter fields
<p>I have no experience with JUnit tests, but I am trying to learn them. For start, I wrote a very simple class <code>UrlParams</code>, which contains two public methods - <code>void addParameter(String name, String value)</code> and <code>String buildUrl()</code>. The usage of my class is also very simple.</p> <pre><...
1
1,280
Configuring caching for Hibernate with Spring Boot 2.1+
<h2>Context and question</h2> <p>I'm trying to configure EHCache with Hibernate in Spring Boot 2.2, but it seems I'm doing something wrong. I've looked at several tutorials and SO questions but didn't find something that matched fully my approach.</p> <p>I chose the approach of a no-XML, jcache configuration for the ...
1
2,972
How to split a character column into multiple columns in R
<p>I have a dataframe <code>x</code>:</p> <pre><code>dput(x) structure(list(District = structure(c(6L, 6L, 6L, 6L, 6L, 6L), .Label = c("District - Central (06)", "District - East (04)", "District - New Delhi (05)", "District - North (02)", "District - North East (03)", "District - North West (01)", "District - South...
1
1,223
GAN not converging. Discriminator loss keeps increasing
<p>I am making a simple generative adverserial network on mnist dataset.</p> <p>This is my implementation : </p> <pre><code>import tensorflow as tf import matplotlib.pyplot as plt import numpy as np from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/",one_hot=Tru...
1
1,707
Swing component setSize()/setBounds() issue
<h2>Contents</h2> <hr> <ol> <li>Overview</li> <li>Example Code</li> <li>Screenshots of Problem</li> </ol> <hr> <h2>1. Overview of problem</h2> <hr> <p>So I'm writing a GUI for a complicated program I'm developing, and I get tired of trying to get components to scale correctly when the window is resized. </p> <p>...
1
3,067
Google Maps API Reverse Lookup Address Details Accuracy
<p>I am using Google Maps API for reverse lookup of an address, specifically Country, City and ZIP code. The problem I have is that with geocoder when you input a specific lat lng you get a range of results based on the address detail accuracy. For example if you click on the street you get address detail accuracy of 8...
1
1,752
Android canvas.translate()
<p>I am using canvas.translate to change the coodinates of my canvas so that the viewport changes</p> <p>my code :</p> <pre><code>public class draw extends View { View v; Paint paint; int width; int height; int view_x; int view_y; static final int MAX_GAME_SPEED = 25; static int fps...
1
2,033
Lightgallery with images in separate divs
<p>I have multiple images in rows and I want <a href="https://github.com/sachinchoolur/lightGallery" rel="nofollow">Lightgallery</a> to capture all the images on my page. I can only seem to get separate light galleries for each row instead of one big gallery. The problem occurs because I have sets of images inside divs...
1
1,668
Angular2 - ngFor directive does not map the removed item
<p>I have an Item container and item pattern where the child items shoud be added and removed from its container. Adding is fine while remove does nothing. It seems that the angular2 *ngFor directive does not work when any of the child items removed. </p> <pre><code> import { NgFor} from 'angular2/common'; im...
1
1,656
Can a boost::asio::yield_context be used as a deadline_timer handler when doing cancel?
<p>I'd like to be able to do an asynchronous wait on a specific event. There are a lot of similar questions and answers on here (and all compile and work for me) but none with my specific scenario. Basically, what I need to be able to do is an async_wait, passing a yield context as the handler, to a timer that waits ...
1
1,677
Incomplete EF code-first cascade delete on many to many relationship
<p>I have a <code>PhoneNumber</code> entity which I'd like to reference across multiple entities. For example, a <code>Contact</code> entity that <em>has many</em> PhoneNumbers, and a <code>Business</code> entity with <em>one</em> PhoneNumber.</p> <pre><code>public class PhoneNumber { [Key, Column(Order = 0), Data...
1
1,428
ELB Health Checks Failing with running AWS ECS container
<p>I'm currently trying to deploy an application onto AWS ECS via CloudFormation templates. A docker image is stored in AWS ECR and deployed into an ECS Service fronted by an Application Load Balancer. </p> <p>My service starts, and my load balancer is created, but the tasks inside of the ECS service repeatedly fail w...
1
2,784
table outer border excluding last row
<p>Is there a way to have a table, with only an outer border, but not include the bottom row. So the bottom border of the second last row makes it look like the final row. I can only use css as it's wordpress, so I can't change the html! See the picture: <img src="https://i.stack.imgur.com/fTLzv.png" alt="enter image d...
1
1,877
Connection reset by peer [Errno 104] in Python
<p>I have witten a distributed program. Every node (Virtual machine) in the network sends data (through outgoing connection) to and receives data (through incomming connection) from every other node. Before sending data, all nodes has opend a socket to every other node (including the single source node). After a delay ...
1
3,765
crosstool-ng build fail
<p>I am using a guide from <a href="https://web.archive.org/web/20121101075104/http://free-electrons.com/doc/training/embedded-linux/labs.pdf" rel="nofollow noreferrer">Free-Electrons.com</a></p> <p>I am trying to install the crosstool-ng compiler and have go to the point where you run the following command under the t...
1
2,107
bundler: failed to load command: rspec
<p>I am new to Rails and I want to run Rspec using Mac.</p> <p>When I run: </p> <pre><code>bundle exec rspec spec/00_hello_spec.rb </code></pre> <p>I get the following response:</p> <pre><code>bundler: failed to load command: rspec (/Users/OumouKaba/Downloads/test-first-ruby-master/vendor/bundle/ruby/2.4.0/bin/rsp...
1
1,222
simplest MiniMax algorithm for TicTacToe AI in Java
<p>I was trying to get a grasp of MiniMax algorithm, and have read up on it. My initial approach was to implement a simple MiniMax algorithm, and then to add alpha-beta pruning. However this is my current code: </p> <pre><code>public int miniMax(char[] node, int playerNum) { int victor = checkWin(node); // returns...
1
1,179
Error creating bean with name 'entityManagerFactory' in spring boot
<p>I have problem when trying to add JPA to my Spring Boot program. how can I this issue ?</p> <p>My pom.xml file</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot...
1
8,569
Simple UTF8->UTF16 string conversion with iconv
<p>I want to write a function to convert a UTF8 string to UTF16 (little-endian). The problem is, the <code>iconv</code> function does not seem to let you know in advance how many bytes you'll need to store the output string.</p> <p>My solution is to start by allocating <code>2*strlen(utf8)</code>, and then run <code>i...
1
1,173
Using gmock Matchers to set std::function as method argument inside EXPECT_CALL
<p>Trying to unit test private callback method of a class</p> <pre><code>class MyClass{ public: MyClass(Component&amp; component) : component(component) {}; void Init(); private: void callback(); Component component; } void MyClass::callback(const std::string&amp; text) { ... } </code></pre> <p>Callback is regis...
1
1,130
Wepback. Loading chunk failed after using `import()`
<p>I'm working on <code>React</code> project and I had found out that one of budles files is too big and I need to split it. So, I tried to use <code>import()</code> sintax:</p> <pre class="lang-js prettyprint-override"><code>import React from 'react'; import thumbnails from './thumbnails.json'; export default class P...
1
2,171
Visual Studio 2010 Prerequisites x64 installation error
<p>Installing Visual Studio 2010, <strong>installation stops at Visual Studio 2010 Prerequisites x64</strong></p> <p>I have: Windows 7 Ultimate x64</p> <p>I tried installing it manually and it also failed</p> <p>The message says Setup Failed and the error log says:</p> <pre><code>[08/22/12,09:53:11] MSITOSIT: [2] C...
1
1,167
How can I receive data from socket continuously?
<p>I'm trying to receive data from a socket via Windows Service, but when I make a connection it becomes instant. I want to receive it constantly (It will disconnect when port is closed). How can I achieve this?</p> <p>This is my output for now;</p> <p>"GET / HTTP/1.1</p> <p>Host: 127.0.0.1:1994</p> <p>Connection: ...
1
1,716
MVC3 REST Routes & Http Verbs
<p>As a result of a <a href="https://stackoverflow.com/questions/8610451/mvc3-restful-api-routing-http-verb-handling">previous question</a> of mine, I have discovered two ways of handling REST routes in MVC3.</p> <p>This is a followup question where I am trying to learn factual differences/subtleties between these two...
1
1,049
install php yaml in linuxmint
<p>when i try to install php-yaml with</p> <pre><code>$ sudo apt-get install php5 $ sudo apt-get install php5-dev $ sudo apt-get install php-pear $ sudo apt-get install libyaml-dev $ sudo pecl install yaml-0.6.3 $ cd /etc/apache2/conf.d $ sudo vi yaml.ini extension=yaml.so $ sudo apache2ctl restart </code></pre> <p...
1
2,646
Unable to parse xml data with colon (:) from response using getNamespaces()
<p>I want to read whatever is inside the <code>&lt;q:content&gt;&lt;/q:content&gt;</code> tags in the following xml -</p> <pre><code>$xml = '&lt;?xml version="1.0"?&gt; &lt;q:response xmlns:q="http://api-url"&gt; &lt;q:impression&gt; &lt;q:content...
1
3,034
Tomcat hangs in Spring Boot application
<p>I am working in a web application which using <strong>Spring boot,SQL server activiti,websocket and angularJS</strong>.</p> <p>Sometimes, this application UI hangs ( not always ). I suspect this is because of connection pooling. This application is using <strong>default datasource properties</strong> from Spring Bo...
1
3,486
Parsing JSON array of objects in android
<p>I want to get the lineId, destinationName and timeToStation from this api call <a href="https://api.tfl.gov.uk/Line/25,86,w19/Arrivals?stopPointId=490009219W&amp;app_id=&amp;app_key=" rel="nofollow">https://api.tfl.gov.uk/Line/25,86,w19/Arrivals?stopPointId=490009219W&amp;app_id=&amp;app_key=</a> Can someone help wi...
1
1,826
addTextChangedListener() fired multiple times and for all edittext fields in listview
<p>I have a listview with 4 list item each containing 2 text views and 1 edittext view. I have defined a addTextChangedListener in the custom adapter to lookout for changes in edittext and then save the text.</p> <p>The addTextChangedListener is firing once when text in edittext view in list item 2,3 and 4 is changed ...
1
5,683
How to call a function in cubit class in initState?
<p>So, I have made a function in Cubit Class it is to get data from API. For now I just can get the data if I pressed a button. I wanna make the function automatically called when the page/screen is open. For your information, this page is the first page that will be launched when user open the app. Here is some of my ...
1
1,521