title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How to update a form controller in AngularJS after changing input constraints
<p>I have been recently working on dynamically changing constraints on input fields on a form. The aim was to make a back-end-driven form, whereas all fields and their constraints are being sent to us by a server. Whilst I managed to get the constraints to be added/removed as we please by creating a simple directive, i...
1
1,166
How Reduce image size loaded with glide on memory in android
<p>I'm trying to load an image from the internet using glide, but the size is too big for my application(The image size in dimensions 400X400 and the memory allocating is 352KB and the size of ImageView is same as the image dimensions), I have tried to decode the bitmap after loading it and then apply it to the ImageVi...
1
1,243
How to reference a global function in a Vue component?
<p>I have a Vue component that has a 'select state' dropdown element. I want to add a js function that populates the options with the 50 states instead of having to hard code them. I will also have this dropdown in a couple other places so I want this function to be accessed from outside the component. What is the best...
1
1,514
Openshift / Keycloak 4.8.3. Login to Admin Console infinite redirect loop
<p>I have been using Keycloak for a while from an RPM installation without any issue so far. Now we are migrating most of our services into an Openshift Cluster (3.9). Before migrate the Keycloak to the latest version in my current server (4.8.3) I am making a clean installation in the Openshift Cluster, and here comes...
1
6,141
Datetime value not showing properly in jQuery data table
<p>I want to get the timestamp in data table . how to format my datetime in the jquery datatable function? </p> <p>sql server datatime data, how to edit the columns so that i cant get the proper datetime in the data time. i have tried with type: 'date-dd-mmm-yyyy', but its not working</p> <pre><code> 2018-11-23 07:49...
1
1,181
float object has no attribute __getitem__
<p>This is the error I'm getting from this function:</p> <pre><code>TypeError: 'float' object has no attribute '__getitem__' </code></pre> <p>The <code>self.target</code> is just an tuple and <code>self.x</code> and <code>self.y</code> are ints, I don't know what I've done wrong. </p> <pre><code>class Robot(object):...
1
1,844
android.view.WindowManager$BadTokenException: Unable to add window --
<p>We are running a long running application (runs for over 5 hrs) to track the path through the GPS. We are not growing any data over time. Using a few global variable to maintain distance and time. But when we are trying to show the Dialog box some time we are getting crash, but very hard to reproduce. This is the...
1
2,461
Alert dialog in listview from selected item
<p>I am having some problems with an alertdialog box. I have a listview containing some strings and when i click the box, it shows an alert dialog box giving the option to book or cancel (its a taxi app). I am trying to get it so the name of the item chosen shows in the alert dialog box. But everytime i try it comes up...
1
1,683
How to dispatch response data from api on action in react redux?
<p>I'm currently working on an e-commerce project and we are using react-redux. But I'm having a problem with returning a response from API instances using Axios request call on the action for Login with Jwt module.</p> <p>This is Axios file that consists of base URLs and instances.</p> <p><strong>api/lib/axios.js:</...
1
3,983
I want to release the CVPixelBufferRef in swift
<p>I want to create a video from image.<br> So, I was the source of the link to the reference.<br> Link:<a href="https://stackoverflow.com/questions/25611086/cvpixelbufferpool-error-kcvreturninvalidargument-6661">CVPixelBufferPool Error ( kCVReturnInvalidArgument/-6661)</a><br></p> <pre><code>func writeAnimationToMovi...
1
1,754
picocontainer for singleton DI
<p>I'm trying to use picocontainer for DI but still getting my shared object instantiated several times instead of being automatically managed as a singleton. Here's an example to illustrate. Classes ASteps and BSteps receive a SharedObject instance through their constructors. I expected it to be managed as a singleton...
1
1,208
Avoiding overfitting in LSTM
<p>I have written code using Keras and TensorFlow to recognize a pattern in a cyclic dataset. The thing which I worried about was overfitting and how to avoid from being overfitted. Now, from the loss value and accuracy, it seems I have become overfitted. The code is below:</p> <pre><code>#importing libraries import n...
1
1,395
text inside table jups to new line when i resize window
<p>I have table with 4 columns and 1 row width set to 100% in css.</p> <p>When i re-size window from screen to smaller text from last cell jumps to new line. and if i change zoom in browser "Ctrl+mouse wheel up" when text reaches edge of window it jumps to next line.</p> <p>I noticed if i set table width to 1000px an...
1
1,156
Android - Show alert dialog in AsyncTask
<p>I'm trying to show an alert dialog when a user fails to enter valid email and password to log in. Since the login process has to deal with HTTP request and JSON, I put it all in an AsyncTask and I'm not sure if that's the problem why my alert dialog can't show (I hope not). So this is method <code>checkUser</code>, ...
1
1,233
MVC5: Custom Validation on client side not working
<p>Based upon this link <a href="https://stackoverflow.com/questions/5816313/mvc3-unobtrusive-validation-group-of-inputs">here</a> I made custom validation, its same as the one in link. But for me the client side validation doesn't work.</p> <p>Here is my <strong>validator</strong></p> <pre><code>public class AtLeast...
1
2,975
No long-running conversations - IllegalArgumentException: Stack must not be null
<p>I have a very simple application with just 2 pages on WebLogic 10.3.2 (11g), Seam 2.2.0.GA. I have a command button in each, which makes a redirect-after-post to the other. This works well, as I see the URL of the current page I am seeing in the address bar.</p> <p><strong>BUT</strong>, even though I have <strong>n...
1
2,886
How to delete entire row of the table on click checkbox of that row in angular 7
<p>I have a table whose data is coming from loop.Here when you press add button new similar row will be added at just bottom.Again when you press edit button all textbox will be enable(initially disable).Till now working fine.But when I check single checkbox or multiple checkbox and press delete button all the row base...
1
1,185
How do I delete a row in a join table automatically, to avoid a ConstraintViolationException?
<p>This seems like it should be a pretty simple question, or at least have a simple answer. But - I'm really not a database guy, and I'm still pretty far down on the Hibernate learning curve. That said, here's the setup:</p> <p>Consider a unidirectional many-to-many relationship between two entities, from <code>Foo</...
1
1,103
pip install packages failing: Invalid requirement & No matching distribution
<p>I am trying to install packages in a python 3.6.3 virtual environment. I keep getting errors.</p> <p>I have tried pip with <code>--ignore-installed</code> flag like: <code>pip install -I -r package-list.txt</code>. </p> <p>Here is part of what I have in <code>package-list.txt</code>.</p> <pre><code># This file ma...
1
1,144
Error while using local persistent volumes in statefulset pod
<p>I am trying to use local persistent volume mentioned in <a href="https://kubernetes.io/blog/2018/04/13/local-persistent-volumes-beta/" rel="noreferrer">https://kubernetes.io/blog/2018/04/13/local-persistent-volumes-beta/</a> for creating my statefulset pod. But when my pod tries to claim volume. I am getting followi...
1
3,100
way to access user's Google Finance portfolio?
<p>I noticed that Google removed the Finance API for Google App Engine. All I want is a list of stock tickers that they have in their Google Finance portfolio. Is there any way to still pull this data from the end user's portfolio, given that the API has been removed? I'm trying to manually retrieve it given that I ...
1
1,160
Cannot disable manual commits on Kafka message using Spring-integration-kafka in Spring-Boot App
<p>As I am new to kafka, my group is using Spring-Integration-kafka:2.0.0.RELEASE on a Spring-boot application. I was able to consume kafka message with my KafkaConsumer based on this example <a href="http://howtoprogram.xyz/2016/09/23/spring-kafka-tutorial/" rel="nofollow noreferrer">here</a>.</p> <p>For this spring-...
1
1,344
How to prepopulate an object before updating using spring mvc and hibernate?
<p>What's the best practice to pre-populate an object before saving this object with hibernate?</p> <p>What i've done:</p> <p><strong>My controller:</strong></p> <pre><code>//The Form @RequestMapping(value = "user/{id}/edit", method = RequestMethod.GET) public String edit(@PathVariable("id") Long userId, ModelMap mo...
1
1,827
Populating a jsp drop-down menu with the values present in database
<p>How to populate a drop-down menu in JSP with the values present in the database (following MVC architecture) ? Tried doing this Inside EmployeeDAO.java</p> <pre><code>private List&lt;EmployeeVO&gt; empIDList; public List&lt;EmployeeVO&gt; getStateList(){ empIDList=new ArrayList&lt;EmployeeVO&gt;(); ...
1
1,147
Autofac Lifetime Management
<p>I'm working on an ASP.NET MVC project that support external plugins, now, I'm moving from Unity to Autofac and I need to wrap the lifetime objects of Autofac so the plugins won't have to reference it, in Unity I could do something this.</p> <pre><code>public sealed class UnityScopeFactory : IDependencyScopeFactory ...
1
1,476
Spring + Hibernate save() not working
<p>I'm attaching the Spring service (problematic) code below :</p> <pre><code>@Async public void performSeismicOperations(Integer sessionUserId, int seismicFileId, String seismicFileName, ShClstr targetCluster, Collection&lt;String&gt; listOperations, String processedFolderName, ...
1
3,040
While loop not reading in the last item
<p>I'm trying to read in a multi line string then split it then print it .. here is the string :</p> <pre><code>1T1b5T!1T2b1T1b2T!1T1b1T2b2T!1T3b1T1b1T!3T3b1T!1T3b1T1b1T!5T1*1T 11X21b1X 4X1b1X </code></pre> <p>When I split the string with <code>!</code> I get this without the last line string :</p> <pre><code>1T1b5...
1
1,251
Tomcat conection pooling for oracle DB using Jndi
<p>For my project i want to use tomcat connection pooling for oracle DB using jndi and getting exception while executing the below code:</p> <p>This is the exception which i am getting:</p> <pre><code> javax.naming.NameNotFoundException: Name java: is not bound in this Context at org.apache.naming.NamingContext...
1
2,460
Serializing Exception to be throwable
<p>While I realize there is a similar question (<a href="https://stackoverflow.com/questions/486460/how-to-serialize-an-exception-object-in-c">How to serialize an Exception object in C#?</a>), and though the answers on that page were helpful, they didn't exactly solve the problem or answer the question posed.</p> <p>I ...
1
1,130
Iterating over the lines of a file
<p>I'd like to write a simple function that iterates over the lines of a text file. I believe in <code>2.8</code> one could do:</p> <pre><code>def lines(filename: String) : Iterator[String] = { scala.io.Source.fromFile(filename).getLines } </code></pre> <p>and that was that, but in <code>2.9</code> the above doe...
1
1,810
Flutter (Dart): Merge two videos and view the new output in the device's gallery (photos)
<p>I am aware that there already exists a solution to a very similar question, which can be found on the following link: <a href="https://stackoverflow.com/questions/56165137/flutter-dart-find-two-video-segments-and-merge-them-into-a-single-valid-video-f">Flutter/Dart: Find two video segments and merge them into a sing...
1
4,434
Why every few minutes activity on local.oplog.rs locks mongo clients
<h1>The problem:</h1> <p><em>Every one or two minutes, the mongo clients halt for about 3 seconds. Normal operation time for updates is about 1 or 2 milliseconds. When this slowness appear, we have a bunch of updates lasting 1 to 3 seconds.</em></p> <p>The slow queries log does not show anything related to this. Neit...
1
7,659
C++ multithreads run time issue
<p>I have been studying C++ multithreads and get a question about it. </p> <p>Here is what I am understanding about multithreads. One of the reasons we use multithreads is to reduce the run time, right? For example, I think if we use two threads we can expect half of the execution time. So, I tried to code to prove ...
1
1,114
Change max-job size of beanstalkd
<p>Does somebody how to change the max-job size of beanstalkd ? I have the problem that I get the message <strong>JOB_TOO_BIG</strong> and at <a href="https://stackoverflow.com/questions/24428837/adding-job-to-beanstalkd">Adding Job to beanstalkd</a>, it says that the default size is 65k. Does somebody know how to cha...
1
4,447
Woocommerce wc_price filter usage
<p>i have doubt regarding usability of wc_price filter , When i look the code [<a href="https://docs.woocommerce.com/wc-apidocs/source-function-wc_price.html#489]" rel="nofollow noreferrer">https://docs.woocommerce.com/wc-apidocs/source-function-wc_price.html#489]</a> i can find wc_price filter .</p> <pre><code>functi...
1
1,480
Error: no such column: rango_category.views
<p>I am working through the Tango with Django tutorial, in the <a href="http://www.tangowithdjango.com/book/chapters/models.html#exercises" rel="nofollow">exercises for the fifth section</a>, I stumbled. I used solutions for another StackOverflow question on this topic, but I kept getting this error:</p> <blockquote>...
1
1,390
What is the height of a "line" in a wheel event? (deltaMode = DOM_DELTA_LINE)
<p>The <code>wheel</code> event in Firefox >= 17 has a <code>deltaMode</code> property. With the OS/mouse I'm using, it's set to <code>1</code> (or <code>DOM_DELTA_LINE</code>). This setting means that the <code>deltaX</code> and <code>deltaY</code> event values are measured in lines and not pixels. Sure enough, if I p...
1
1,220
Using Python's FTP library to retrieve files
<p>this is my first post on here so I'm happy to be a part of the community. I have a fairly mundane question to ask, but it's been a fairly annoying problem so I'm hoping to find answers.</p> <p>So I'm trying to use Python's FTPLIB module to retrieve a binary file.</p> <p>The code entered directly into the interpre...
1
1,228
Cant play sound more then 7 times in android
<p>When i play sound files in android i am getting this error:</p> <blockquote> <p>11-17 15:58:14.482 158-20904/? E/OMXNodeInstance: setConfig(f3f:google.mp3.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001) 11-17 15:58:14.482 158-20904/? I/ACodec: codec does not support config priority (err -2...
1
1,606
Rails App with Bootstrap Modal View containing form, submit and disappear modal view without reloading page
<p>I have a rails app which presents a form for visitors in a modal view. When the submit button is clicked, I want the form to submit and the modal view to disappear without reloading the page behind it. I've tried binding the modal view's dismissal to the form's submit function in javascript, but it's not working cor...
1
1,247
adding a dynamic linearlayout to the current view android
<p>I am trying to add a linearlayout to a scrolview this is my code the code compiles, but it doesn't show me the new layout</p> <p>this is the original layout (that i want to add to it)</p> <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ScrollView01" android:l...
1
1,116
How to map values (from a CSV file) with Pandas DataFrame efficiently?
<p>I have a CSV such as this:</p> <p><a href="https://i.stack.imgur.com/RBefh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RBefh.png" alt="enter image description here"></a></p> <p>Where the first column can have gaps, but the second and the third do not have gaps in the middle of the values.</p...
1
1,140
console.log() is not working when I use postman
<p>I have this function that I was trying to debug because i was getting an error. I have since fixed the issue because I found someone with a similar problem, but being able to console log one of the parameters in the JwtStrategy would have really helped and given me a better understanding what was being passed throu...
1
1,216
Getting Parser Error: inconsistent cell count within the table - while running tests in Parallel - Selenium Cucumber Maven framework with Junit
<p>I have configured Selenium-cucumber maven framework with Junit. After adding the cucumber-jvm-parallel plugin &amp; maven-surefire plugin , commented the statements inside @CucumberOptions which we have written inside TestRunnerTest.java file .After configuring like this, run through CLI . Then my test script fails....
1
4,472
Update state with object from key input [React]
<p>I'm trying to update the state of my component based on key inputs, and pass it to another component.</p> <p>I can get call <code>keyboardInput()</code> and console.log the correctly when one of the arrow keys are pressed, however I cannot get the returned value to render in <code>&lt;p&gt;The current input is: {th...
1
1,199
why I can't remove the badge after receiving notification?
<p>I am trying to implement push notification using Firebase Cloud Messaging, I send the message through firebase console. when composing a message in Firebase console, I set the badge number to be 1 like the picture below</p> <p><a href="https://i.stack.imgur.com/k3R4Y.png" rel="noreferrer"><img src="https://i.stack....
1
1,164
how to parse nested JSON response asp.net (vb.net)
<p>I have a JSON response that I need to parse into an object in ASP.Net (Vb.net or c#), but I don't see any examples for a nested response string and how to parse (only simple value pairs).</p> <p>Here's one:</p> <pre><code>{ "ticker": { "high": 3.494, "low": 2.9, "avg": 3.197, "v...
1
1,839
react-i18next on React Native No overload matches this call typescript
<p>Iam trying to configure react-i18next 11.8.2 in my React Native app with typescript 4.1.2:</p> <pre><code>i18n.use(initReactI18next).init({ resources: { en, es, }, lng: 'es', fallbackLng: 'es', interpolation: { escapeValue: false, }, }); </code></pre> <p>with two resources files (en, es).</p>...
1
1,788
Traceback in dynamic programming implementation of Needleman-Wunsch algorithm
<p>I almost have my needleman-wunsch implementation working but I am confused on how to handle the traceback on a specific case.</p> <p>The idea is that in order to re construct the sequence (the longest path) we re-calculate to determine the matrix the score came from. The edge case I am having a problem with is when...
1
4,515
Problems with memory dynamic allocation: main: malloc.c:3096: sYSMALLOc
<p>I'm writing a simple function to create a list which represents a deck of cards. Here's the definition of the structs</p> <pre><code>typedef struct { float valoreEff; char *seme; char *valore; } carta; struct Mazzo { carta info; struct Mazzo *nextPtr; }; typedef struct Mazzo mazzo; typedef mazzo *mazzoPtr...
1
1,081
Show/hide certain sections of a form using JavaScript. How to only show one section at a time?
<p>I have the following for set-up:</p> <pre><code>&lt;form action=&quot;?&quot; method=&quot;post&quot; name=&quot;contactform&quot;&gt; &lt;div class=&quot;question&quot;&gt; &lt;p&gt;&lt;span&gt;&lt;input type=&quot;radio&quot; name=&quot;answer&quot; value=&quot;Yes&quot; onclick=&quot;showHide('one')&quot;/&g...
1
1,206
Fluent NHibernate PersistenceSpecification Component and Reference Tests
<p>I have two problems.</p> <p>1 . FNH does not test my component correcty and I dont know why.</p> <blockquote> <p>System.ApplicationException: Expected 'DomainModel.Model.Publisher' but got 'DomainModel.Model.Publisher' for Property 'Publisher'.</p> </blockquote> <pre><code>[TestMethod] public void CanCorr...
1
1,370
Spring ClassCastException with Generic Form Bean Class
<p>I'm trying to use a generic class as a Spring form backing bean, but end up with a ClassCastException when the Spring framework attempts to cast the Object into the actual type.</p> <p>On submission of the form, the following error occurs when attempting to call a method on the SrvRecord object (line 105, marked wi...
1
1,966
How to add image to Email body_python
<p>I use python for sending Email.I need to insert picture to body e-mail like this :</p> <p><a href="https://i.stack.imgur.com/doXuS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/doXuS.jpg" alt="I need like this:"></a></p> <p>But my output not show image like this :</p> <p><a href="https://i.st...
1
1,620
Using the Hyper-V sockets between Windows host and Linux guest
<p>I want to write simple application that communicates between the Hyper-V host and its virtual machine using Hyper-V sockets (netcat over vsock). In the Internet there are a few documents describing how to do it: <a href="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-s...
1
1,674
Why does IPC::Open3 get deadlocked?
<p>I went through the documentation of <a href="http://perldoc.perl.org/IPC/Open3.html" rel="noreferrer">open3</a> and here is the portion that I could not understand:</p> <blockquote> <p>If you try to read from the child's stdout writer and their stderr writer, you'll have problems with blocking, which means you'll wa...
1
1,818
How do I close a window in PyQT when opening a new one?
<p>I am trying to create something, for school. I am using PyQT and QtDesigner. I was unaware that I wasn't supposed to edit the PYUIC4 generated code. Is there a way to close the window when opening a new window? Any help would be much appreciated, thanks:</p> <pre><code>from PyQt4 import QtCore, QtGui from medLogin ...
1
3,186
Issue with simple python server. socket.accept() accepts input /favicon.ico even after I (supposedly) close the socket
<p>I'm new to stack overflow and socket programming. Thanks in advance for your help!</p> <p>A little background: I am trying to implement a simple python server. I am trying to connect through TCP and am just trying to return the some parsed text from the request (I am trying to send back the text variable "message")...
1
1,367
How to idiomatically convert from Option<T> to Result<T, ()>?
<p>I'm a Rust newbie! What's the best way to convert from an <code>Option&lt;T&gt;</code> to a <code>Result&lt;T, ()&gt;</code>?</p> <p>The <a href="https://doc.rust-lang.org/std/convert/trait.TryFrom.html" rel="noreferrer">TryFrom</a> trait seems prevalent and returns a Result. The popular num_traits' <a href="https:...
1
1,027
codeigniter - fatal error class 'CI_Controller' not found after upgrade php and apache
<p>i am upgrade apache From 2.2.19.0 To 2.4.16.0 And php From 5.3.7.0 To 5.6.12.0 now i get this error:</p> <blockquote> <p>Fatal error: Class 'CI_Controller' not found in system\core\CodeIgniter.php on line 234</p> </blockquote> <p>CodeIgniter.php line 221-235</p> <pre><code>// Load the base controller ...
1
4,932
Java : Writing a String to a JPG File
<p>Alright, so I am writing a small program that should have taken 10 minutes to complete however I am running into unforeseen problems. </p> <p>The program should take in some old files I had in a vault program on my old phone, they are basically Jpg files but with an added "obscured" text to the front of the file. ...
1
1,736
Adding Subtotals to Pandas Groupby
<p>I am looking for a cleaner way to add subtotals to Pandas groupby. </p> <p>Here is my DataFrame: </p> <pre><code>df = pd.DataFrame({ 'Category':np.random.choice( ['Group A','Group B'], 50), 'Sub-Category':np.random.choice( ['X','Y'], 50), 'Product':np.random.choice( ['Product 1','Product 2'], 50), 'Units_Sold':np....
1
1,140
Clickable img wrapped in label not working in IE8
<p>I have the following markup and Javascript:</p> <p><strong><a href="http://jsfiddle.net/chridam/ft4Hb/" rel="nofollow">JSFiddle</a></strong></p> <p>HTML:</p> <pre><code>&lt;form method="get" action="some-url-here"&gt; &lt;div class="UserFilter"&gt; &lt;ul class="UserFilter"&gt; &lt;li&gt; &lt;label cl...
1
1,167
IntelliJ 15 with QueryDSL and Gradle
<p>I have a Spring-boot 1.4 project in IntelliJ 15 using gradle 2.3 and QueryDSL 4.1.3 that won't build because my entities are not being built into Q classes by Querydsl. I have the following:</p> <pre><code> buildscript { ext { springBootVersion = '1.4.0.BUILD-SNAPSHOT' querydslVersion = '4.1.3'...
1
3,547
CUDA & VS2010 problem
<p>I have scoured the internets looking for an answer to this one, but couldn't find any. I've installed the CUDA 3.2 SDK (and, just now, CUDA 4.0 RC) and everything seems to work fine after long hours of fooling around with include directories, NSight, and all the rest. Well, except this one thing: it keeps highlighti...
1
1,088
Added ng-select reactive form validation messages not showing
<p>I added an error message to ng-select component to show error messages when it's dirty and value not selected. But the error message is not showing. But the validation is working.</p> <p><a href="https://ng-select.github.io/ng-select/" rel="nofollow noreferrer">https://ng-select.github.io/ng-select/</a></p> <pre><...
1
1,102
STM32F303: ADC with DMA only works a few times
<p>I am currently working with a Nucleo-64 board that has the STM32F303RE chip. For programming I use the Arduino IDE with the STM32 packages. I want to avoid HAL for now because I think it is rather confusing when you have to learn the registers and the library functions at the same time.</p> <p>I want to be able to ...
1
3,827
Azure Devops Pipeline - file not found in build context
<p>Getting an error in the Azure DevOps Pipeline:</p> <pre><code>Step 7/17 : COPY [&quot;demo6/demo6.csproj&quot;, &quot;demo6/&quot;] COPY failed: file not found in build context or excluded by .dockerignore: stat demo6/demo6.csproj: file does not exist </code></pre> <p>NOTES-run the pipeline in diagnostics mode and ...
1
1,191
How to restart graphics drivers with Powershell or C# without admin privileges
<p>I need to restart the graphics driver automated on computers which users should not have admin privileges. My options to archive this is using powershell or C# code called from powershell.</p> <p>The simplest way to restart the graphics driver is mentioned in this Question: <a href="https://stackoverflow.com/quest...
1
1,139
How to loop inside a react const variable in the render method
<p>I have a mapped const variable which I use to inject to my return in the render method. My issue is now, the object I am mapping, has a collection of objects itself. I would like to loop through each one and add jsx syntax in. This is what I have:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-co...
1
1,535
xPath insert before and after - With DOM and PHP
<p><strong>I need to add a class to a HTML structure.</strong></p> <p>My class is called "<em>container</em>" and should start right after <strong>&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;/h4&gt;</strong> (the child of ul and its simblings, not grandchilds) and should end right before the closing </li> of the same element.<...
1
1,761
Merge neighbouring HTML table cells with same value using JS
<p>I've been wrestling with this for a while. I have a table which is automatically generated based on some JSON data, which may vary. I'd like to merge neighbouring cells in the first column which have the same value, e.g. "fish" and "bird" in this table:</p> <pre class="lang-html prettyprint-override"><code>&lt;tabl...
1
1,683
Yii CJuiAutoComplete data from Ajax request does not display list choice
<p>Autocomplete does not display data from sourceUrl;</p> <p>Controller</p> <pre><code>public function actionTestAutoComplete() { $r = array( array("label"=&gt;"Test 1", "value"=&gt;"Test 1") , array("label"=&gt;"Test 2", "value"=&gt;"Test 2") , array("label"=&g...
1
1,513
How I pop-up a jquery dialog with mysql data?
<p>I have a question about jQuery UI Dialog box and showing dynamic content from a database. </p> <p>Here I have a table which is generating blog post using php and mysql and in that table, there is a column to view contents which are belong to each blog post.</p> <p>That link is something like this - </p> <pre><cod...
1
1,698
Drag and drop between two React components
<p>I am trying to create a React app where I can drag and drop a DOM element from a "palette" of available DOM elements into a blank "canvas" area in the second component. The available elements appear as an unordered list of React components the user can use to build a customized website. (I am basically trying to cop...
1
2,680
PHP connecting Oracle and mySQL
<p>I' trying to get some data from Oracle via ODBC to mySQL database. And then Insert some lines in mySQL database. I manage to list the lines from ORACLE but fail to Insert into mySQL.</p> <pre><code>$time_start = microtime(true); set_time_limit(10000); //ligação ODBC ORACLE $connect = odbc_connect("test", "test",...
1
1,352
Bad type annotation. Unknown type
<p>I keep getting the warning mentioned above but can't figure out why. I've added deps.js and deps.js contains a reference to the type.</p> <p>Here is the offending code:</p> <pre><code>goog.provide("MyCompany.MyApp.dom"); MyCompany.MyApp.dom.getArticleAmountInput_=function(){ return document.getElementById("a...
1
1,587
Sqlite UPDATE question
<p>Hi i'm writing an iphone application that requires sqlite and one update query. So simply,why this works:</p> <pre><code>NSString *query=[NSString stringWithFormat:@"%@%@%@%@%@", @"UPDATE ZTABELLA SET ZTYPE =",@"1", @" WHERE ZNAME='",@"stringaoggetto",@"';"]; sqlite3_exec(database2, [query UTF8String], NUL...
1
1,065
java.net.SocketException: Connection reset on Selenium driver.close() or driver.quit() statements
<p>I am seeing a <em>java.net.SocketException: Connection reset</em> almost every time I use a driver.close() or driver.quit() statement. The browser does get closed and the exception isn't affecting any of my tests so far, but I would still like to understand why this is happening.</p> <p>I checked for a version incom...
1
1,067
How to get the GLTools library from SuperBible to work in Ubuntu? or an alternative?
<p>I recently bought the SuperBible 5th edition book. I use Ubuntu 12.04 LTS. I use Code::Blocks. I'm not very proficient with C++ libraries and setting up. I wanted a book that will guide me from scratch. I was disappointed when I saw that the book doesn't help us set up projects in Linux.</p> <p>They use 2 libraries...
1
1,028
XMLHTTPRequest not working on server on localhost
<p>I'm developing a <code>node.js</code> RESTful server for home use on a RPI with Raspbian, and for testing, I've created a <strong>test HTML page</strong> that makes various <code>XMLHttpRequest</code>s to it. </p> <p>When developing I'm using a test <code>nodemon</code> server on my dev machine (a desktop machine, ...
1
1,301
Getting template was precompiled with a newer version of Handlebars error with my Node.JS app?
<p>I am trying to create a Node.JS app that uses the open source Alpaca Forms package:</p> <p><a href="http://www.alpacajs.org/" rel="nofollow noreferrer">http://www.alpacajs.org/</a></p> <p>I'm using Node version: <strong>v0.10.25</strong></p> <p>When I run the test page from the tutorial:</p> <p><a href="http://w...
1
3,283
Show Progressbar while i get records from a cursor
<p>I have this code:</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.apod_eso2); File f = new File(Environment.getExternalStorageDirectory() + "/Database.sqlite"); CursorFactory factory = null; db...
1
1,721
Proper use of views and subviews in AngularJS
<p>I'm new to AngularJS and I'm struggling a little bit with my multiple views. Maybe someone can shed a light on how this should be done.</p> <p>What I'm trying to achieve: I'm trying to implement some kind of file explorer, where there are two columns: the left column contains all subfolders and files in a folder, t...
1
1,563
ImageView displays PNG but not JPEG
<p>strong textI am trying to load a picture from the gallery and display it in an image view, PNG pictures are being displayed fine but the JPG images are not displaying at all and I have no idea why </p> <p>here is the code:</p> <pre><code>public void openGa(View view){ //create a ga||ery intent and set the ...
1
1,249
JQuery simple tab program does not show nested Div Tag
<p>This code shows the primary div tag elements fine but ignores or does not recognize CSS and HTML in a child div tag.</p> <p>I can get this code to open multiple divs but not the divs nested inside the first level of divs. 6 hours later I am hoping for outside help.</p> <p>Here is the code:</p> <pre><code>&lt;htm...
1
1,906
Why "Address already in use" happens
<p>I am making an C++ socket application.</p> <p>It connects with android device.</p> <p>When I close connection on phone during receiving data..</p> <pre><code>Framebuffer Ready [PCast] Waiting for connection [PCast] Connected .... [PCast] Data arrived [PCast] *** Downloading mode *** [PCast] Downloading file. Plea...
1
5,081
ModuleNotFoundError: No module named 'config'
<p>I know there is a similar question to this:</p> <p><a href="https://stackoverflow.com/questions/50836060/django-admin-startproject-results-in-modulenotfounderror-no-module-named-conf">django-admin startproject results in &quot;ModuleNotFoundError: No module named &#39;config&#39;&quot;</a></p> <p>But the answer do...
1
1,267
Using navigation properties instead of LINQ Join in WebApi controller
<p>I am using Entity Framework Code First and LINQ to Entities in a Web Api Controller. </p> <p>I have 3 tables that are related with the following relations/ navigation properties: (the model classes are as follows)</p> <p>My Reservation class:</p> <pre><code>[Table("Reservations")] public class Reservation { ...
1
1,560
Binary Bomb Phase 3 -- Confused about using jump table
<p>I am trying to figure out the correct input to defuse the bomb at phase 3 of the binary bomb lab. I have figured out that the input must be two integers, and that the first integer must be less than 7. I have been using an arbitrary first value (1) to try to figure out the second value by using the jump table, but I...
1
1,887
Create an order programmatically in Woocommerce Subscription
<p>I want to create an order (programmatically) of a Subscription Product. I found code from this question: <a href="https://stackoverflow.com/questions/36729701/programmatically-creating-new-order-in-woocommerce">Programmatically creating new order in Woocommerce</a>, which I used to try make it work. </p> <p>I was n...
1
1,985
pthreads: using multiple threads to calculate successive prime numbers
<p>I am trying to get the example code to work such that multiple threads will calculate the sum of successive prime numbers (note that the original author's algorithm for successive prime calculation is very inefficient). So far, running unit tests shows that the output is inconsistent, i.e. it will change slightly ea...
1
2,779
Loss not changing no matter the learning rate
<p>I have built a deep learning model, slightly similar to the VGG net. I'm using Keras with a Tensorflow backend. The model summary is as follows:</p> <pre><code>model = Sequential() model.add(Conv2D(64, 3, border_mode='same', activation='relu', input_shape=(180,320,3))) model.add(Conv2D(64, 3, border_mode='same', ac...
1
2,049
Accessing a model from a Rails 3.1 Engine
<p>I have been wrestling with this for the last day and it's driving me NUTS!</p> <p>As an learning exercise I decided that I would package up some of my code into a Rails Gem. This code has a controller action, a route, a model and a helper so I decided that the most suitable method of creating a Gem would be to crea...
1
1,613
How to do Delete confirmation for a table data with bootstrap Modal in Django?
<p>I'm having a table to show a list of actions in my app. I can delete any action in that table. So, I have added a delete button in every row. This delete button will trigger a 'delete confirmation' bootstrap modal.</p> <pre><code>&lt;table class="table table-hover"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th sc...
1
1,742
Executing Async tasks in fragments
<p>I am attempting to execute an async task in a fragment after converting my activities into fragments. When I call my async task from the activity I have to pass 'this' with it in order to allow the async task to change text and things after it receives the information. I am a bit confused on how to do this all with ...
1
2,429
How to test Web.API method with RestSharp passing in ClaimsPrincipal
<p>I'm having a bit of trouble with a specific implementation of testing out my Web.API methods using RestSharp. I have been very successful in performing POSTS and GETS in my open (non-secured) methods. However, when I have to send in a token to determine access I have problems.</p> <p>Here is the implementation:</...
1
1,979
Rails Active Record Relations to Enumerable
<p>In certain cases when I get an ActiveRecord Relation I'm experiencing strange behavior with <code>.each</code> on an ActiveRecord::Relation</p> <p>It seems to be when ActiveRecord::Relation delegates <code>:each</code> to <code>:to =&gt; :to_a</code> (<a href="https://github.com/rails/rails/blob/v3.2.6/activerecord...
1
1,103
Selecting buttons at random in java
<p>How can I randomly select a java button, I am trying to create a tic-tac-toe game where the user plays the cpu or another player. I have it working fine for 2 players but am stuck on 1 player game, I dont know if it can be done but my idea is that I just randomly select a button for the cpu check to see if its been...
1
1,358
How to do gitversion in Gitlab CI with docker?
<p>I have this in my gitlab-ci.yml:</p> <pre><code>variables: DOCKER_DRIVER: overlay2 DOCKER_TLS_CERTDIR: "/certs" DOCKER_HOST: "tcp://docker:2375" determine version: stage: preparation tags: - docker image: gittools/gitversion script: - pwd - echo $(pwd) - gitversion /output json /show...
1
1,456