title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
webpack file-loader does not load background image
<p>I've been having this problem for a while and I see that other people have it too, but even though I have the same code as them it is still not working and I don't know what I'm doing wrong. I'm working with react, webpack, babel and scss for a project. At first I create a main component which has a background image...
1
3,434
Redux - managing preload state
<p>I'm building an application, where I need to preload <code>people</code> and <code>planet</code> data (<em>it's likely that in the future more preload requirements may be added</em>) on launch of the application. I want to have value in the store that represents the global state of the app as <code>loaded: &lt;boole...
1
1,138
Karatsuba Algorithm without BigInteger usage
<p>I have been trying to implement Karatsuba Algorithm in java without using BigInteger. My code is applicable only when both the integers are same &amp; have same number of digits. I do not get the correct answer however I get answer which is quite near to the right one. For instance I get 149 when 12*12. I can not fi...
1
1,484
Displaying console output in jtextarea even when other actions occur
<p>I found this code here: <a href="https://stackoverflow.com/questions/14357418/how-to-display-console-output-in-java-jtextarea-one-by-one-in-a-loop-when-button">how to display console output in java JTextarea one by one in a loop when button action is triggered</a> and it displays console output in a jtextarea. I hav...
1
1,193
RTCP / RTP communication issue
<p>Unfortunately I'm still stuck with a little implementation of a RTP / RTCP communication to access my IP camera properly.</p> <p><em><strong>What do I want to do</em></strong></p> <p>The camera has an internal buffer which I want to read. So I communicate with the camera via RTSP and tell it to stream the data. Wh...
1
1,261
How can I test my JwtAuthentication class using JUnit & Mockito?
<p>I can test my <code>JwtTokenAuthenticationFilter</code> class. How can I write the test cases of this class using Mockito &amp; JUnit? I can Only test this class.</p> <p>I don't understand how I can mock the class.</p> <pre class="lang-java prettyprint-override"><code>public class JwtTokenAuthenticationFilter exte...
1
1,310
Apache2 virtual host not working
<p>After few days of trying to setup apache2 virtual hosts on my localhost I am seriously loosing my patience. Can you guys help me? Everything seems ok, but when I am trying to access local.droidbb.com in my browser I am getting response of </p> <blockquote> <blockquote> <p>Unable to load page. Problem occurre...
1
1,086
Error pages for exceptions during page rendering
<p>In the backing beans of my JSF application, certain exceptions may be thrown at any time, and I want to react to this by redirecting to an error page. I have included the <a href="http://omnifaces.org" rel="nofollow">omnifaces</a> FullAjaxExceptionHandler, and my <code>web.xml</code> contains</p> <pre><code>&lt;err...
1
3,116
JNI_CreateJavaVM crash my program without any message or exception
<p>Recently I begin to use JNI in my project. Here is my code:</p> <pre><code>options[0].optionString = "-Djava.class.path=."; memset(&amp;vm_args, 0, sizeof(vm_args)); vm_args.version = JNI_VERSION_1_2; vm_args.nOptions = 1; vm_args.options = options; vm_args.ignoreUnrecognized = JNI_TRUE; status = JNI_CreateJavaVM(...
1
3,930
CSS - Three divs next to each other and 100% height
<p>Im working on a layout for a website and I'm trying to set up my css rules for the layout in the following image: <img src="https://i.stack.imgur.com/QpioV.png" alt="layout"></p> <p>I want left &amp; right divs to extend to the height of content div, I'm not very familiar with the clear attribute and how to use it....
1
1,205
how to cancel previous axios with redux in react
<p>i have the following action in my action file.</p> <pre><code>import axios from 'axios'; import $ from 'jquery'; var CancelToken = axios.CancelToken; var source = CancelToken.source(); export const FETCH_WORKERJOBS = 'fetch_workerjobs'; export function fetchWorkerJobs(page, size, where, sort) { const request ...
1
5,547
Mapstruct mapping with condition and nullValuePropertyMappingStrategy
<p>I apologize if the title is not clear, let me make it clear by giving sample codes:</p> <p><strong>UpdateProfileDto</strong></p> <pre><code>public class UpdateProfileDto { @NotEmpty private String firstName; @NotEmpty private String lastName; @Size(max = 20) private String currentPasswor...
1
1,664
HTML page background image is display in node js server
<p>This is my html file. 1st.jpg file is in same folder. But still it's can't load on server. I don't understand what to do. I tried using inline css, embedded css as well external css also.</p> <p>In debugging they shows Image can't load. </p> <p>Code:-</p> <p><div class="snippet" data-lang="js" data-hide="false" d...
1
2,561
AttributeError: 'Image' object has no attribute 'new' occurs when trying to use Pytorchs AlexNet Lighting preprocessing
<p>I tried to train my model on <code>ImageNet</code> using <code>inception</code> and <code>Alexnet</code> like preprocessing. I used <a href="https://github.com/fastai/imagenet-fast/blob/master/imagenet_nv/fastai_imagenet.py" rel="nofollow noreferrer">Fast-ai imagenet training script</a> provided script. <code>Pyto...
1
1,151
How to prevent <v-responsive> from growing with content?
<p>In my Vue.js application (with vuetify) I want a v-sheet with (√2)/2 aspect ratio (width/height = (√2)/2). In this v-sheet, I have some content that can grow but I don't want the v-sheet to grow with its content. According to vuetify documentation, aspect-ratio : "Sets a base aspect ratio, calculated as width/height...
1
1,547
Ordering box plots on x axis by mean
<p>I'm trying to plot a boxplot in R using ggplot2.</p> <p>here's my code with sample data:</p> <pre><code>df = structure(list(Closeness = c(0.0919540229885057, 0.0950259836674091, 0.0957367240089753, 0.0960240060015004, 0.0901408450704225, 0.0970432145564822, 0.0939794419970631, 0.0943952802359882, 0.092152627789776...
1
1,265
Excel to SQL Code: Cannot find Column 8 Error
<p>I have been over my code numerous times and hope someone can help me see something I don't. I'm trying to pull data from Excel into a SQL table with multiple columns in VS2010 but when I try uploading the data, I get the error "Cannot Find Column 8." I see nothing wrong with column 8 nor any of the other columns. An...
1
1,187
Java Servlet/JSP Custom Error Page
<p>I have a custom error page setup for basic debugging whilst I'm programming and for some reason none of the values from the try catches get through. The error page just says: "Null null null". If anyone can help with this I'd be very grateful.</p> <p>Servlet:</p> <pre><code>package com.atrium.userServlets; import...
1
3,908
Hazelcast Map TTL not working with spring cache abstraction
<p>I am trying to get Hazelcast 3.0.2 working with Spring abstraction however it seems the TTL functionality is not working.</p> <p>I have configured my spring context in the following way</p> <pre><code>&lt;cache:annotation-driven cache-manager="cacheManager" mode="proxy" proxy-target-class="true" /&gt; &lt;bean id=...
1
1,340
How can I display the responsive datatable's expand/collapse icon in the right side of the first column's value?
<p>I'm using responsive datatable (<a href="https://www.datatables.net/extensions/responsive/examples/display-control/classes.html" rel="nofollow noreferrer">https://www.datatables.net/extensions/responsive/examples/display-control/classes.html</a>). but the expand/collapse icon is appearing in the left side of the fir...
1
1,339
Angular 2 - Unit test binding to nested custom form control
<p>I've got a custom from control with selector <code>app-date-picker</code>. It implements <code>ControlValueAccessor</code>. I have a component called <code>MyPage</code> that contains this custom form control via:</p> <pre><code>&lt;app-date-picker class="address__from-date" [(ngModel)]="fromDate"&gt;&lt;/app-date-...
1
1,466
PDO Insert not working
<p>I'm trying to take a record from one table in my database and place it in another table (as a backup of the data - needs to be kept for 7 years, including deleted data). The select works, the delete works, but the insert doesn't. What's wrong? What can I do to fix it?</p> <p>Code:</p> <pre><code>////////// DELETE ...
1
1,096
Simple Scala XML parsing
<p>I have an XML file containing a couple hundred messages like the following, denoting passage times of a car at checkpoints.</p> <pre><code>&lt;ttt:appMsg xmlns:ttt="railrt/ttt/v0100" channel="rct" id="019176" time="2016-06-08T06:01:01.260"&gt; &lt;rct:st prodDatum="2016-06-08" Number="62713"&gt; &lt;pbpData pat...
1
1,352
(android-layout) GridView with Image and Text adds extraspace around Image
<p>I want a Gridview with Images and corresponding Text over them. It nearly does work, but there is some extraspace around my images. I first thought the space would be below textview und the imageview, but when removing the text, same space has been there. I read that I would have to add android:adjustViewBounds="tru...
1
2,345
Truncate overflow text in table cell, so table does not go wider than screen
<p>I am trying to display various items in tabular format (each entry has various attributes). The following is also required:</p> <ol> <li>Columns should be dynamic so as to closely fit content, no fixed widths (handled by table layouts)</li> <li>Rows should be clickable to activate an action on that row's entry, e.g...
1
1,690
How do I remove Python installations with PowerShell Package Management?
<p>I want to write a script which cleans up all existing versions of Python on a machine, and a separate script to re-install both versions 2.7 and 3.5 in standardized locations. I'm currently trying to do this using the Package Management cmdlets in PowerShell 5.1.14393.187.</p> <p>For the cleanup script, I started w...
1
1,941
Error 404--Not Found - Unable to call REST WebService
<p>I am not lucky so far to get the solution for the below error,</p> <p>"Error 404--Not Found</p> <p>From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:</p> <p>10.4.5 404 Not Found</p> <p>The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or ...
1
1,527
How to use SSL with Django app (deployed using mod_wsgi and virtualenv)
<p>Disclaimer: I don't really know what I'm doing, so I may have phrased things wrong. I've also never asked/answered a question on here before!</p> <p>I have a Django app running on Apache that I deployed using mod_wsgi and virtualenv. I want some parts of the app to use SSL, however when I install the SSL certificat...
1
1,756
Refused to load the stylesheet '......' because it violates the following Content Security Policy
<p>I'm working on an application that implements browser-policy. Based on the documentation here [https://themeteorchef.com/tutorials/using-the-browser-policy-package][1], I added the options of allow some domains like Google Fonts, W3 Schools css.</p> <p>To my surprise all the option set did results more in a bulky er...
1
12,952
Why do I get this error message: "undefined reference to `PerformChat(char*, char*, char*, char*, char*)'"
<p>I am trying to compile my program that uses ChatScript libraries. This is my code inside a file named <code>main.cpp</code> :</p> <pre><code>#include &lt;iostream&gt; #include "common.h" using namespace std; char* output2; unsigned int InitSystem(int argc,char* argv[]); void InitStandalone(); int main(int argc...
1
2,632
Sonar exception can not create ClassLoader
<p>I am running Sonar from Jenkins (Ant job, not maven) with <code>Invoke Standalone Sonar Analysis</code> build step. I am getting the following error:</p> <pre><code> 15:46:46.369 INFO .s.p.s.SquidExecutor - Java AST scan done: 33664 ms 15:46:46.370 INFO .s.p.s.SquidExecutor - Java bytecode scan... 15:4...
1
7,237
Glassfish 4 Acessing EJBs via Standalone Application
<p>I am trying to access an EJB via JSE Standalone application.</p> <p>I was struggling a lot with JNDI Names not being found during lookup.</p> <p>After some research without any solution I found in the Glassfish server log after a deploy a message stating something like:</p> <p>"[glassfish 4.1] [INFO] [AS-EJB-0005...
1
1,077
c# streamwriter "process cannot access file" error even when it's closed and disposed
<p>I am making simple text editor and got problems with saving. So I have 2 codes for saving, one is to save file using button and another ctrl+s keyboard shortcut, when saving with button everything works perfectly, but when i save with shortcut i get this error: </p> <blockquote> <p>"process cannot access file bec...
1
2,124
Posting Html with images (WYSIWYG) to ASP.net core controller
<p>I'm having trouble posting my wysiwyg content to my controller in asp.net core. I can't seem to get any value from the form editor. The value for the Content property comes to the controller as null. I'm using the summernote form editor to handle my richtext box editor.</p> <p><a href="https://i.stack.imgur.com/...
1
1,548
UWP windows 10 Visibility Binding to a global Variable
<p>I am trying to bind the visibility of a control to a Global variable:</p> <p>I have a Visibility Converter:</p> <pre class="lang-cs prettyprint-override"><code>public class BooleanToVisibilityConverter : IValueConverter { public bool IsReversed { get; set; } public object Convert(object value, Type targetTy...
1
1,155
Singleton pattern for IndexWriter and IndexSearcher Lucene.net
<p>I'm using <strong>Lucene.net 3.0.3.0</strong>(the latest version right now). I would like to know if using a single instance of <strong>IndexWriter</strong> and <strong>IndexSearcher</strong> is a good choice in production environment(considering thread safety). I read in the documentation that creating new objects ...
1
1,445
Why is Maven trying to compile my code as -source 1.3?
<p>I get this error <code>mvn -e package</code> in Ubuntu 12.04:</p> <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project HadoopSkeleton: Compilation failure: Compilation failure: [ERROR] /home/jesvin/dev/hadoop/HadoopMahoutSkeleton-master/...
1
1,786
`getByRole` can't find the name of the appropriate textbox
<p>Here is the test for the :</p> <pre class="lang-js prettyprint-override"><code> it(&quot;changes the state when body input is changed&quot;, () =&gt; { render(&lt;CommentForm /&gt;) // let input = screen.getByLabelText(&quot;Your Name&quot;); let input = screen.getByRole(&quot;textbox&quot;, { name: &q...
1
1,551
How do you clear a determinate progress bar for reuse?
<p>I have an Activity with a button that starts a long running task. I perform the task using an AsyncTask and display a determinate ProgressBar that is updated as the task progresses. Everything works fine the first time the task is run, but on subsequent runs the dialog appears, but is already at 100% and 100/100. I'...
1
1,579
c# serialized data
<p>I have been using BinaryFormatter to serialise data to disk but it doesn't seem very scalable. I've created a 200Mb data file but am unable to read it back in (End of Stream encountered before parsing was completed). It tries for about 30 minutes to deserialise and then gives up. This is on a fairly decent quad-cpu ...
1
1,380
How to store JoinHandle of a thread to close it later
<p>I am trying to run a thread in background and then change an AtomicBool to ask the thread to stop. To ensure the thread stopped properly, I want to call <code>join</code> method of the JoinHandle.</p> <p>Instead of calling join, if I just wait (<code>thread::sleep_ms</code>) for sometime after setting the AtomicBoo...
1
1,172
Push to "fork" Git Error - src refspec master does not match any. failed to push some refs to 'https://
<p>I understand that similar topics have been posted on this site many times before. I read them and tried all the suggestions. Somehow, I still cannot successfully push the local code back to the "fork" in GitHub using Git Bash.</p> <p>I "fork"ed a project, which is vlerdas-subscribe, in the GitHub by clicking the ...
1
1,142
Numba and guvectorize for CUDA target: Code running slower than expected
<p>Notable details</p> <ul> <li>Large datasets (10 million x 5), (200 x 10 million x 5)</li> <li>Numpy mostly</li> <li>Takes longer after every run</li> <li>Using Spyder3</li> <li>Windows 10</li> </ul> <p>First thing is attempting to use guvectorize with the following function. I am passing in a bunch of numpy arrays...
1
1,581
c# streaming over http to iphone
<p>i am trying to stream video over http to iphone without a streming server with .net. After some tests i found that if you just upload iphone compatible video to your server, iis7 works just fine and iphone startsplaying video after small buffer time and continues to download in the background.</p> <p>My problem is,...
1
2,492
ns: Avg: can't use non-numeric string as operand of "+"
<p>This a code to simulate an MM1 queue server (not really an important fact). I'm trying to get the average value to the number of packets in the queue for each run. Given that I read the value of lambda from a file, modify it, save the new modified value of it in the file again, and run the simulation with current va...
1
1,808
Getting NSData from an NSURL
<p>I am trying to upload a photo from my app into a web service.</p> <p>The flow I am attempting to create is as follows:</p> <blockquote> <ol> <li>User takes photo with camera </li> <li>Photo is saved to camera roll under a custom album</li> <li>URL of the saved photo is given to my store</li> <li>Store at...
1
1,205
Google Pub Sub "Permission Denied" for project owner account
<p>I've been trying to get the Google Pub/Sub Java libraries to work using the Quickstart guides. None of them work as written, at least not for me. I'm working in IntelliJ, Maven framework, OSX, Java 8.</p> <p>Take <a href="https://cloud.google.com/pubsub/docs/reference/libraries" rel="nofollow noreferrer">this examp...
1
1,799
References Needed for Implementing an Interpreter in C/C++
<p>I find myself attached to a project to integerate an interpreter into an existing application. The language to be interpreted is a derivative of Lisp, with application-specific builtins. Individual 'programs' will be run batch-style in the application.</p> <p>I'm surprised that over the years I've written a couple ...
1
1,500
J2ME button command not working
<p>I'm currently working on an j2me application and I'm having a hard time dealing with command button. Can someone please help me. The button was suppose to direct in a second form but when I click it, it's not working. Here's my code:</p> <pre><code> import javax.microedition.midlet .*; import javax....
1
6,385
ggplot theme remove y-axis on two plots in gtable, keep on third plot
<p>I am trying to remove the y-axis on two ggplots that are in a gtable with a third ggplot. I would like to show the y-axis for the leftmost graph in the gtable and remove the y-axis completely from the subsequent graphs; however, I would like the x-axis to remain on all plots.</p> <p>My graph looks like this: ![nuc...
1
1,713
Angular 2 and Eclipse - Failed to load resource: the server responded with a status of 404
<p>So I am having an issue with displaying my first component in angular 2. I followed this <a href="https://stackoverflow.com/questions/35890887/how-to-get-angular2-to-work-in-eclipse-with-typescript">post to setup typescript.</a> I followed the 5 min quick start guide <a href="https://angular.io/docs/ts/latest/quicks...
1
1,937
How to Stop the Table from Resizing Itself to Fit the Screen?
<p>I have tried to set the width to a specific value (1300px) and it doesn't to change anything... </p> <p>I got this piece of code from someone else and I'm a beginner so please help me out here. Thanks in advance.</p> <p>Following is the code: Click on Next Iteration! until the column added is out of your window sc...
1
11,797
Clean AND practical way to handle node_modules in a Dockerized Node.js dev environment?
<p>I have been trying to dockerize (both for development and later for production) a MERN stack application recently, and the interaction between Node.js (more especially the node_modules) and Docker kind of puts me off. In the whole question, I will designate the computer that is used for development as the "host mach...
1
2,085
Android Studio Execution failed for task ':app:dexDebug'
<p>I'm trying to start my first Android Studio app and coming across the same error over and over when I try to run or debug. I'm building a music app using the Spotify API and have imported the zipped jar files in the correct directory (under libs in my app).</p> <p>What seems to be the problem is that maybe my SDK f...
1
1,381
Dividing html table into multiple tables in jquery
<p>How can I divide html table into multiple tables using jquery, for example I want to divide the table with two rows each and repeat the header. Here is my example of HTML table.</p> <pre><code> &lt;table border="1" id="mainTable"&gt; &lt;tr&gt; &lt;th&gt;header 1&lt;/th&gt; &lt;th&gt;header 2...
1
1,936
Android: using sharedPreferences in a broadcast receiver
<p>I'm trying to create an application that will trigger a toast message if the phone receives an SMS containing a string that is stored in the default preferences. My problem is that I'm having trouble getting the toast to appear when the SMS is received. I've tested my code for the receiver with a declared string and...
1
1,086
has no member named c++
<p>I have some problem. I created program with dynamic stack and when I compiling get errors: <strong>'class stos' has no member named 'push' , 'class stos' has no member named 'pop' , 'class stos' has no member named 'destroy' , 'class stos' has no member named 'isempty'</strong>. In language C program is fine, but in...
1
1,725
/vagrant not populated with files
<p>I have Vagrant (1.7.4) configured with the default configuration from <code>vagrant init</code> using the latest version of VirtualBox (5.0.16 r105871) on OS X (10.11.4) and the latest <code>ubuntu/trusty64</code> box version (v20160323.0.0). </p> <p>My VM has the matching version of guest additions, but I can't se...
1
1,158
Tabhost nullpointerexception when tabhost isn't the only thing in the layout
<p>I've noticed that there are numerous issues with using tabhost, but none of them really fit my issue. I am trying to create a view with an <a href="https://github.com/johannilsson/android-actionbar" rel="nofollow">action bar</a> on top, then a row of tabs under the bar. Here's my activity layout.</p> <pre><code>&...
1
3,583
Eclipse History view blank
<p>After updating to Eclipse 4.5 Mars the History view always remains blank, no matter if I drag a file from the Eclipse Navigator or select Team >> Show History from the context menu. I'm using both Git and CVS - the problem is the same.</p> <p><img src="https://i.stack.imgur.com/cqPcI.png" alt="enter image descripti...
1
1,607
Spring 4 MVC , WARNING: No mapping found for HTTP request with URI in DispatcherServlet with name [...] & HTTP 404 Error
<p>My project suddenly broke ,dispatcher servlet is unable to forward to my view, I started initially getting </p> <p>WARNING: No mapping found for HTTP request with URI [/thedallasapp_poc/] in Disp atcherServlet with name 'mvc_dispatcher' &amp; 404 Error in the browser.</p> <p>Than after changing settings I got no ...
1
17,550
Unable to determine structure as arff in WEKA
<p>I tried the proposed solutions online by saving the file in ANSI and deleting the first line and changing the attributes to numeric instead of real as follows and even by adding a '}' symbol at the line 29 but I still get the following error in WEKA when I try to import the arff file. </p> <p>Error Message:</p> <p...
1
1,271
MySQLdb not inserting... and i do have cursor.commit()
<p>I apologize in advance for the long code, but it might be relevant. It's also easier that making new code to demonstrate. I can DROP the table using phpMyAdmin, run this script, then go back to phpMyAdmin and see that it created the table. However, the table is empty, and this script <em>should</em> populate with a ...
1
1,452
ASP.NET GridView Newbie Questions About TFOOT and TH
<p>Greetings!</p> <p>I'm still learning about the GridView control and I have one bound to an ObjectDataSource. My Web form looks like this:</p> <pre><code>&lt;asp:GridView ID="ourGrid" runat="server" DataSourceID="ourDataSource" onrowdatabound="ourGrid_RowDataBound" HeaderStyle-CssClass="header_style"...
1
1,917
universal method for working with currency with no rounding, two decimal places, and thousands separators
<p>i am a newbie learning python (2.7.3) and was given a simple exercise calculating costs but soon became interested in really being able to control or understand the 'exactness' of the results that were being produced. if i use the calculator on my computer i get the results i think i am after (ie they seem very spe...
1
1,157
How to Add Separators after List items In CSS
<p>I am trying to create a List items and adding separators between them i tried everything but problems remains there. here is the image i want my list menu look like :-</p> <p><img src="https://i.stack.imgur.com/pXoHn.png" alt="enter image description here"></p> <p>the css and html code i am using is this :-</p> <...
1
1,224
Read the value of a referenced entity's PropertyInfo using EF4
<p>I would like to dynamically read the values of the PropertyInfos of EntityObjects that I come across when looping through the PropertyInfos of a parent entity (the column values of the instance of ImageType that is connected to the current instance of Image, f.i.).</p> <p>The main entity's type is only known at run...
1
1,692
Windows splash screen using GDI+
<p>The eventual aim of this is to have a splash screen in windows that uses transparency but that's not what I'm stuck on right now.</p> <p>In order to create a transparent window, I'm first trying to composite the splash screen and text on an off screen buffer using GDI+. </p> <p>Currently, I'm just trying to compos...
1
1,422
PHP calendar scheduler displaying event
<p>We are currently in the process of adding an event scheduler for our web control panel to allow users of the company to post their work events and track reports and the like.</p> <p><strong>A little background</strong></p> <p>The database with the events is structured to include the following:</p> <pre><code>cid,...
1
2,025
Where do I find the assembly that creates a static variable in the .data section of my C program?
<p>First time poster. 2nd year CS student.</p> <p>I am exploring the creation of static variables in the .data section of the Virtual Address Space in the context of a C source->GCC compilation->Linux execution environment.</p> <p>C program is test.c</p> <pre><code>int main() { register int i = 0; register int...
1
1,355
RAII wrapper for OpenGL objects
<p>I want to write a simple RAII wrapper for OpenGL objects (textures, frame buffers, etc.) I have noticed, that all <code>glGen*</code> and <code>glDelete*</code> functions share the same signature, so my first attempt was like this:</p> <pre><code>typedef void (__stdcall *GLGenFunction)(GLsizei, GLuint *); typedef v...
1
1,058
How to set a css property (background-color) dynamically in React?
<p>I have a slideshow based on an array of objects with its characteristics, one of them is the <code>background-color</code> of the current slide. I have a property called <code>bg</code> which stores it. This is what I am using to set each background-color, which changes to every image, however I am using an <code>in...
1
1,826
how to edit and insert data from the single form
<p>This is my controller. Here the function <code>add_post()</code> is the function that is used in both adding and updating data. The problem is that if I want to edit the form then I can get the value from the database into the form of respective area but when I want to add the data using the same function I cannot. ...
1
2,559
Python3: HTTP Error 302 while using urllib
<p>I want to read the value of different stocks from websites. Therefore I wrote this tiny script, which reads the page source and then parses out the value:</p> <h2>stock_reader.py</h2> <pre><code>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from re import search from urllib import request def main(): links...
1
1,776
Spring Boot Gradle - could not resolve all artifacts for configuration
<p>I am having an issue with one of my local builds. I used the spring initializer to generate a demo gradle project. Executing <code>gradle bootRun</code> leads to the following error:</p> <pre><code>FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'demo'. &gt; ...
1
1,430
Sliding Tabs With RecyclerView
<p>I want to display text and images in sliding tabs using the RecyclerView. I think I have it setup correctly to this point and I think the last piece of the puzzle is the LayoutManager but it gives me an error under the onCreateView I already made a variable for it so I am not sure how to go on further.</p> <p>This...
1
6,023
How to set label width inside itemrenderer for spark list in a liquid layout?
<p>In a flex project that I have that is designed to scale 100% to the web window, I have a spark list. And I have a simple itemrenderer that takes the data and displays a name, and a message. Just think of it like a simple instant messenger display. The problem is that for my <code>msg_txt</code> label I want to give ...
1
1,358
Deploying CXF SOAP Web Services to Apache Tomcat
<p>I've recently re-written a web services application to use CXF instead of Axis. The switch was easy enough, but I'm having issues deploying the webapp. Previously, with Axis, you could navigate to a page, served by Tomcat, that would list all Axis services; something similar to <code>http://localhost:8080/axis2/se...
1
1,724
travis cannot build because Error: Cannot find module 'react-test-renderer/shallow'
<p>The <code>npm run test</code> works fine locally. </p> <p>However , travis insists that the build is failed and it shows the following log : </p> <pre><code>react-test-renderer is an implicit dependency in order to support react@15.5+. Please add the appropriate version to your devDependencies. See https://github....
1
1,149
Undefined reference to constructor and destructor c++
<p>The error that I'm getting is this:</p> <pre><code>||=== Build: Debug in Building Sim (compiler: GNU GCC Compiler) ===| obj/Debug/main.o||In function `__static_initialization_and_destruction_0':| /home/josh/Documents/cpp/building_sim/main.cpp|15|undefined reference to `User::~User()'| /home/josh/Documents/cpp/build...
1
1,524
Failure delivering result ResultInfo android
<p>My app is when user click take a photo button,it will save a picture in external storage.in this face it's working when i check in my folder in device.But I don't understand why My intent equal null ,while i putExtra into intent.And </p> <p>this is my code</p> <pre><code>private void captureImage(){ //check Is...
1
1,513
Spring CannotGetJdbcConnectionException, nested exception jdbc4.MySQLNonTransientConnectionException
<p>Using MySQL version 8.0, mysql-connector-java version 5.1.48, Spring Core 4.3.4, and Spring Boot version 1.4.2. </p> <p>Connection string is <code>jdbc:mysql://localhost:3306/DBNAME?user=USERNAME&amp;password=PASSWORD</code></p> <p>Username, password, and database name are all properly set when debugging.</p> <p>...
1
5,357
Rails 4 API with Strong Parameters?
<p>I'm building a simple API with Rails 4, but with my "create" method, it all goes horribly wrong.</p> <p>Here is the relevant part of my routes file:</p> <pre><code>namespace :api, defaults: { format: 'json' } do # /api/... Api:: scope module: :v1, constraints: ApiConstraints.new(version: 1, defaul...
1
3,442
Unable to connect to OnVif enabled camera using C#
<p>I am working with IPCams for the first time and I am trying to connect to an OnVif camera. I have looked on various forums and stack overflow and I have come up with the following code.I know the code doesn't do anything useful but it is just a proof of concept for now. It finds all 4 cameras on my network and then ...
1
3,756
bootstrap-sass tables - how to generate a single row that spans whole table width to display message when table empty (along with column headings)
<p>I have a table I have generated and converted to look like bootstraps styles using the supported htlm and css elements.</p> <p>I have included in my code (Rails 3.2.3) the unless command to display the table rows when data is present, but to display a message in what I hope to be a single row (spanning all columns)...
1
1,617
Can't switch to javascript alert in Selenium Webdriver
<p>In my tests, I have many alerts that appear. For example, if I don't fill out a required item in my form, I get an alert. So far, I have been able to switch to them and perform my actions (verify text, click ok/cancel) by using the below code. </p> <pre><code>basicClick(AppObjects.Continue); String warningT...
1
2,120
log4net LogicalThreadContext not working
<p>I have what is either a bug in log4net, or a misunderstanding on my part.</p> <p>I'm trying to use <code>LogicalThreadContext</code> to associate some data with a call context and have it propagate to any log statements made by any thread in that context. That is the purported advantage of <code>LogicalThreadContex...
1
2,061
Open CV Codec FFMPEG Error fallback to use tag 0x7634706d/'mp4v'
<p>Doing a filter recording and all is fine. The code is running, but at the end the video is not saved as MP4. I have this error:</p> <pre><code>OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v' </code>...
1
1,943
android : has any view something like hidden value?
<p>I wonder, has any standart view (imageview, imagebutton, textview, button etc) something like hidden value ?? so i need set each item this value and then, for example, get it from view in onclick event.</p> <p>error log</p> <pre><code>07-11 13:06:23.263: ERROR/AndroidRuntime(989): Uncaught handler: thread main exi...
1
1,423
How to download gif images from url and save to storage in android
<p>I want to add feature in my app to download a GIF Image from url to my phones storage. How can I do this into my application </p> <pre class="lang-java prettyprint-override"><code>public class Download { Context context; String url; ProgressDialog progressDailog; public void saveImage(Context cont...
1
1,176
Behave / python3: Test undefined even if the step function is present
<p>I have started using behave to define behaviour-driven tests on Python3. The first tests went fine, but now I am incurring in a most puzzling error.</p> <p>I have define this Gherkin file <code>sra-to-isatab-batch-conversion.feature</code>:</p> <pre><code>Feature: SRA to ISA-tab Batch conversion # perform a batch ...
1
1,171
SQL - How to return only rows which have a value which appears more than once?
<p>I'm fairly new to SQL server...but I have a problem. I've written the below query, which works just fine for displaying all visits (encounters) and lab results for a patient in 2012. </p> <pre><code>SELECT pat.patient_id, pat.last_name, Pat.first_name, pat.ethnic_group, pat.race, pl.icdcode, enc.encounter_date, la...
1
2,749
javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7fa2258640: Failure in SSL library, usually a protocol error
<p>I am trying a demo Android app to connect servlet (both local server and aws instance) it gives Handshake failed error. I have tried with volley and http client also. The relevant code and logcat result is following. Currently I am using Android version 7.1 and redmi 5A cellphone for testing.</p> <pre><code>import ...
1
4,869
Changing controller path
<p>Alright so i've been trying to change my controller path (so my project is more structured) but sadly everytime i try to route with the controller like so:</p> <pre><code>Route::get('/', ['as' =&gt; 'home', 'uses' =&gt; 'PagesController@index']); </code></pre> <p>Now that returns me a error page:</p> <pre><code>R...
1
1,850
Draw driving route between 2 GeoPoints on GoogleMap SupportMapFragment
<p>This is a tricky question, been banging my head for a day, please help.</p> <p>I use Google Maps Apis to get the shortest driving distance and its routes, points, etc between 2 GeoPoints that I provide, see code below</p> <pre><code>private JSONObject GetDistance(String src, String dest) throws Exception { Str...
1
11,755
Jest reference error 'describe' is not defined when running Next.js build
<p>I am struggling to get a <code>next build</code> completing without the following error being thrown:</p> <pre><code>&gt; Build error occurred { ReferenceError: describe is not defined </code></pre> <p>The <code>dev</code> server and tests run fine but it does not seem to pick up the <code>jest</code> global <code...
1
1,788
How to convert XML into the array with PHP?
<p>I'm trying to split an XML in the array, below is my php codes: </p> <pre><code> &lt;?php $xml = simplexml_load_file("test.xml") or die("Error: Cannot create object"); foreach($xml-&gt;children() as $books) { echo $books-&gt;title . "&lt;br&gt; "; echo $books-&gt;tutor . "&lt;br&gt...
1
1,227
Material design: Change toolbar color when navigation drawer is opened
<p>I'm trying to recreate the material design toolbar as seen in the google play store, where the navigation drawer doesn't overlap the toolbar itself, but does overlap it's tabs. My main activity looks like this with the closed drawer on the left and the open drawer on the right:</p> <p><img src="https://i.stack.imgu...
1
1,115
Uploading a file from a web app with dropzone.js
<p>I am building a web app. I have to let a user upload a picture or drag-and-drop one into the browser. To help with this, I'm using <a href="http://www.dropzonejs.com/" rel="nofollow">dropzone.js</a>. My challenge is, I need to customize the appearance a bit. </p> <p>My customization requires features that seem pret...
1
1,723
Bootstrap Accordion Expand/Collapse All not functioning properly
<p>Here's the process to break this:</p> <ol> <li>click Music Notation</li> <li>click Expand/Collapse All</li> <li>click Music Notation</li> <li>click Expand/Collapse All</li> <li>click Expand/Collapse All again</li> </ol> <p>Notice how Music Notation will NOT open back up, even though, you should be able to see in t...
1
2,153