title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Python Can't Catch pymssql Exception
<p>The try/except is not capturing the specified pymssql exception in the following snippet:</p> <pre><code>import pandas as pd from fps.databaseconnections import DatabaseConnections from pymssql import ProgrammingError DatabaseConnections_instance = DatabaseConnections() db_cnxn = DatabaseConnections_instance.get_c...
2
1,292
Android Studio keeps saying, that I need to declare a final variable
<p>Hey I´m new in programming, especially in java and xml. I want to make a game where a progressbar show the time that is left for a task to do but Android Studio keeps saying, that I need to declare a final variable to use i++ and mProgressBar.setProgress (i); because its in a inner Class. But as far as I know a fina...
2
1,394
Symfony : CreateForm / Why my textarea do not appear?
<p>I have a problem to display a textarea from a form I've created with Symfony.</p> <p>The textarea appears in html but it has no <code>display: block</code> in the css. It has nothing in the css, to be clear.</p> <p>When I add a <code>display:block</code> in the css myself, it simply stripped by chrome/firefox.</p>...
2
1,169
Vaadin build failure after changing in the vaadin version and vaadin plugin version
<p>Build failure after I changed the pom.xml file's vaadin version no and vaadin plugin version no </p> <pre><code>&lt;vaadin.version&gt;7.4.5&lt;/vaadin.version&gt; &lt;vaadin.plugin.version&gt;7.4.5&lt;/vaadin.plugin.version&gt; </code></pre> <p>then i tried to clean and rebuild the project but build failure shows ...
2
7,164
Google API error
<p>I am trying to use google API to get events off calendars on an account. I am using a service account. I am receiving two errors when I attempt to manually echo the code or it will remain a blank page if I use foreach(...). Here are the two errors:</p> <pre><code> Fatal error: Uncaught exception 'Google_Service_Exc...
2
1,299
Flutter: OTP is being sent again and again although user is registered in Firebase Auth
<p>I'm using <code>flutter_auth</code> package to apply <strong>Phone Auth</strong>. Normally it sends the <strong>OTP</strong> when a new phone number is registered. But it is sending <strong>OTP again and again</strong> although the user's phone number is there in <code>Firebase authentication list</code></p> <p>One...
2
3,224
Write audio packet to file using ffmpeg
<p>I am trying to write audio packet to file using ffmpeg. The source device sending the packet after some interval. e.g. </p> <pre><code>First packet has a time stamp 00:00:00 Second packet has a time stamp 00:00:00.5000000 Third packet has a time stamp 00:00:01 And so on... </code></pre> <p>Means two packet per se...
2
1,631
Changing pretrained AlexNet classification in Keras
<p>I am using a AlexNet with pretrained weights(heuritech/convnets-keras) for a classification problem with 8 classes instead of 1000. After initialising the network with <code>Model(input=..,output=..)</code> and loading the initial weights, I drop the last two layers, Dense(1000) and Activation(softmax), and add my o...
2
1,117
Apache Mina: How to write a Http Server?
<p>I'm trying to write an Http Server using Apache Mina.</p> <p>According to Mina's architecture, there should be 2 filters for this task, one for Http Request Passing and another for processing the request and generating the response. So using the Mina example codes, I came up with the following code, that has an acc...
2
2,210
Get unjoined values in mysql
<p>I have 2 tables in Mysql </p> <p><strong>Table 1 --</strong></p> <p>Id &nbsp;&nbsp;&nbsp; candidate_id &nbsp;&nbsp;&nbsp; resume</p> <p>25&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hjksdf.jpg</p> <p>2...
2
1,277
use R to remove header (6 lines) from .asc file (ESRI ascii grid) and export
<p>I have over 800 .asc files (ESRI ascii grids) that each have a header consisting of 6 lines, then the raster data separated by spaces. Here is a small file as an example. I read it in using read.asciigrid (sp package).</p> <blockquote> <p>new("SpatialGridDataFrame" , data = structure(list(mydata.asc = c(4, ...
2
1,058
How can I change slide by mouse scroll?
<p>Is there any way I can get the example I have at <a href="https://jsfiddle.net/PortfolioCSG/wzcgp7y1/15/" rel="nofollow noreferrer">https://jsfiddle.net/PortfolioCSG/wzcgp7y1/15/</a> to change slides by scrolling the users mouse (as well as using the navigation dots/arrows)?</p> <p>I'd like for the user to be able t...
2
4,073
Display another laravel blade view as a modal in a page
<p>Good day everyone, please, I am new to Laravel, I am creating a project management app, I created an index page for projects and I have a button where I can be able to create new projects, it is entirely another blade file, I need to display the blade as a modal, I tried using @include and bootstrap modal, but the i...
2
3,200
Swift: Delay in UITableViewCell Selection
<p>I have a UITableView inside of another view. Whenever I click on a cell in the table, I would like that cell to be highlighted until it is clicked again to deselect it. Using the didSelectRowAtIndexPath method, I have accomplished this. However, the cell selection takes a long time. I have to hold down on a cell...
2
1,075
Bootstrap modal with content cant be opened twice
<p>Just starting out so please bear with me :)</p> <p>I have searched all over this site for answers but I could not find one that matched my problem.</p> <p>I'm trying to open a bootstrap modal and get some content for it using the jQuery ajax form plugin. It works and the content is showed in the modal, however, wh...
2
1,143
When moving a UILabel vertically with a UIPanGestureRecognizer, how do I stop them from going too far in either direction?
<p>I'm trying to make the user be able to move the <code>UILabel</code> up and down across the view by attaching a <code>UIPanGestureRecognizer</code> to the <code>UILabel</code> and subsequently altering the constant of a constraint from the <code>UILabel</code> to the top of its view. So basically if the gesture reco...
2
1,524
Spring boot app deployment error: "ServletException: Failed to instantiate WebApplicationInitializer class"
<p>Can not deploy spring boot app on tomcat server(os hp-ux). Please any help</p> <p>MainClass:</p> <pre><code>@SpringBootApplication @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) public class NgrkApp extends SpringBootServletInitializer implements WebApplicationInitializer{...
2
2,060
DropDownListFor in Asp.Net MVC 4
<p>I have a sample application in Asp.Net MVC 4. I don't find the way to obtain the selected id from the DropDownListFor helper and assign it as parameter to an ActionLink.</p> <p>Here is my models:</p> <pre><code>public class EmpresaLibroViewModel { //property a usar en vista Index ya que son iterables publ...
2
1,310
Apache Kafka + Apache Camel Integration + POC issue+ java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:459)
<p>This is my route builder. Here i am trying to insert data from my file to topic.Later, i am passing through my main method and using camel context i am running it. I have tried several codes but none helped me. i am working on POC of Apache kafka - Camel. </p> <pre><code>public class SimpleRouteBuilder extends Rou...
2
1,956
Can ASP.NET.Core be used without the DI Container
<p>I am using ASP.NET.Core to embed a web server into a large legacy desktop application. My middleware components need to reference pre-existing application objects.</p> <p>With difficulty I have got this working using the native DI container, but the resulting code is extraordinarily obtuse and opaque.</p> <p>What ...
2
1,150
inserting unique elements from std::vector to std::set
<p>I have a class called <code>Point</code>, used to store x and y double values. I have a <code>std::vector</code> of <code>Point</code>s that contain duplicate values. I am trying to count the number of unique items in this vector.</p> <p>I thought since <code>std::set</code> only unique objects, creating a <code>se...
2
1,037
How to check if reading the last line AND if at last line, how to add a new line at the end of file in JAVA?
<p>I am relatively new to programming, especially in Java, so bear that in mind when answering. </p> <p>I'm programming a simple collectible card game deck building program, but file reading/writing proved to be problematic. </p> <p>Here is the code for "addDeck" method that I'm trying to get working: </p> <pre><...
2
1,536
Jboss EAP 6.3 - listen to remote JMS topic (HornetQ)
<p>I have one Jboss EAP 6.3 instance with the HornetQ topic hosted there (jndi - "java:jboss/exported/jms/topic/TestTopic" so should be visible remotely) and I have another instanse (say Client) deployed to the same Jboss version. I have to listen to that TestTopic from the Client using @MessageDriven approach. I googl...
2
3,091
Equivalent of Marshmallow dump_only fields for Pydantic/FastAPI without multiple schemas
<h3>Question</h3> <p>Is it possible to replicate Marshmallow's <code>dump_only</code> feature using pydantic for FastAPI, so that certain fields are &quot;read-only&quot;, <em><strong>without</strong></em> defining separate schemas for serialization and deserialization?</p> <h3>Context</h3> <p>At times, a subset of the...
2
2,372
Designing thermometer in Android
<p>Have tried many ways to design a thermometer in android but they are all suck.</p> <p>The last work is using a vertical progress plus a circle.xml:</p> <p>drawable\verticalprogressbar.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/...
2
1,182
C++ QT OSX Qt::META+Qt::Key_Tab shortcut bind
<p>I’m trying to bind <code>Qt::META</code> + <code>Qt::Key_Tab</code> shortcut in <code>QTabWidget</code> to switch tabs (like it works in chrome or many other applications). I have tried every single solution found in google, but this shortcut combination is not working.</p> <p>I have tried:</p> <ul> <li>Combinati...
2
1,083
ServerSelectionTimeoutError: basicdatabase-w4eg3.mongodb.net:27017: [Errno 11001] getaddrinfo failed
<p>I don't understand why this error is occurring in my code while connecting the code to the database of MongoDB. Here is my code:-</p> <pre><code>import Credentials client = Credentials.client db = client.VisitorBook company = input('Enter Company Name: ') result=db.Company_name.insert_one({'Name':company}) print(r...
2
2,264
Unable to resolve dummy/0.0.0: missing requirement
<p>I've a problem when try deploy a profile on a cluster of fabric8 CR5.</p> <p>this's a log part on karaf.log</p> <pre><code>2014-09-09 12:33:43,142 | INFO | o.fabric8.agent) | DeploymentAgent | 66 - io.fabric8.fabric-agent - 1.1.0.CR5 | DeploymentAgent updated with {repository.karaf-enterprise=mvn...
2
2,405
How to use "required" attribute in a form, when we use e.preventDefault()?
<p>I need to make a form in html5, no problem. But this form needs the e.preventDefault on the submit button, to add some links on a new page. And the inputs in the form must have the "required" attribute. So my problem is, when I don't use e.preventDefault, "required" works, but my new link doesn't appears on my page...
2
2,680
How to return nested array using Nusoap complextype in PHP?
<p>I am writing a web service in php using nusoap library. I can return simple variables such as string, integer and also only one complextype which is struct. But I can not return array of structs. I research nearly all example in a week about this but it doesn't work. So where I am going wrong?</p> <p><strong>Code</...
2
1,661
Chart JS not working with Phonegap
<p>i got a dynamically loaded Chart working on several browsers and also on my iPhone. But when i try to open the chart with phonegap on my iPhone the canvas is totally buggy. </p> <p>Are there any known issues using Chart JS with Phonegap?</p> <p>it should look like this: <a href="https://i.stack.imgur.com/qGVdL.png...
2
1,401
JavaCV : Tracking objects using the Camshift algorithm
<p>I want to track objects using the Camshift algorithm. I tried to correct the bugs that I found in the JavaCV translation of the original OpenCV Camshift file. </p> <p>Here is my code: </p> <pre><code>package objectTracking; import com.googlecode.javacv.CanvasFrame; import com.googlecode.javacv.FrameGrabber; impor...
2
5,503
Time Complexity of Efficient way to find power of a number
<p>I have written a small piece of code to find the power of a number </p> <p>Can any one tell me how to find the time complexity of this code. and what is the time complexity of this code. and is it a efficient way to find powers of a number</p> <p>the code is : </p> <pre><code>public static void main(String[] arg...
2
1,257
Angular click event triggers on entire component in recursive nested component
<p>I have 2 components - list view component detail component. The detail component is being rendered recursively and has a click handler.</p> <p><strong>List View Component</strong></p> <p>HTML:</p> <pre><code>&lt;app-basket-item-detail *ngFor="let rootBasketItem of rootBasketItems$ | async" ...
2
1,478
micronaut HttpResponse reading body text
<p>Trying to capture the response.body() text which is actually xml.</p> <pre><code>@Get(uri="/testxml") public String testxml() { System.out.println("Reading Response body test"); HttpResponse response = streamClient.test(); CompositeByteBuf content = (CompositeByteBuf) response.body(); byte[] bytes ...
2
2,071
Multiplication of digits in two linked lists
<p>I am trying to multiply digits that are stored in two singly linked lists. However, my algorithm has turned to be getting very complex. I am doing the multiplication the way we did in elementary schools. Getting the value of one of the lists and multiplying in to each value of the other list till we cover all number...
2
1,199
Multi-Layer Perceptrons in EmguCV
<p>I'm trying to implement Multi-Layer Perceptrons (MLP) neural networks using EmguCV 3.1 (a dot NET wrapper for OpenCV library) in C#(Windows Form). In order to practice with this library I decide to implement <code>OR</code> operation using MLP. </p> <p>I create MLP using "Initialize" method and learn it using "Trai...
2
1,514
Tensorflow access denied in config_util.py while training
<p>I have a problem with training a model in <code>tensorflow</code>. I am working on Windows 10. When I run the command:</p> <pre><code>python ./object_detection/model_main.py --pipeline_config_path=C:/Tensorflow/object-detection/ssd_mobilenet_v1_coco_2018_01_28 --model_dir=C:/Tensorflow/object-detection/output-model...
2
1,069
How to store an ArrayList of custom objects using the Internal Storage?
<p>I want to store the ArrayList of custom objects called WordList using the Internal Storage.</p> <p>Here's my code:</p> <pre><code>@SuppressWarnings("serial") public class WordList extends MainActivity implements Serializable { public String name; public ArrayList&lt;String&gt; wordarray; public ArrayList&lt;Strin...
2
1,661
canvas js dates are repeating on x axis
<p>I am using <code>canvasjs</code> for showing data in chart format. all is working fine beside dates are </p> <p>repeating when there is less data.</p> <p>Here is my JS</p> <pre><code>var chartResponses = new CanvasJS.Chart("chartResponses", { animationEnabled: true, toolTip: { enabled:...
2
1,098
Select2 group with Infinite scroll
<p>I am using select2 group option with infinite scroll and data are coming by Ajax calling per page 10. Here is some problem arises, suppose user 1 has 15 data and user 2 has 15 data, at first 10 data are coming from user 1 and in next page 10 (5 data for user1 and 5 data for user2). no problem for data getting but th...
2
1,571
Data is Null. This method or property cannot be called on Null values. Entity Framework core
<p>I tried to get the list of data but I am getting null from <code>GetAllList()</code> method. In this project I am using .Net core with ORM Entity Framework core code first approach with repository pattern</p> <p>Entity class</p> <pre class="lang-cs prettyprint-override"><code>public class SIDGenerator { public i...
2
1,926
Unix time from API to normal format
<p>I'm using openweathermap for my application <a href="https://openweathermap.org/current" rel="nofollow noreferrer">https://openweathermap.org/current</a> and I need to input the current time with weather in the city. </p> <p>The time in the API in UNIX format. How I can input the time in application in normal forma...
2
1,299
Browser overrides my CSS font
<p>I've built a website. In all browsers everything looks cool and nice.</p> <p>But today one of my clients discovered that in his opera browser the fonts are different. It's a computer font, I mean, you can't use that font by css, it's some custom font.</p> <p>in CSS file, for that text fonts and as a default Body f...
2
10,504
AngularJs auth service behaves strangely
<p><em>Updated</em>: <a href="https://gist.github.com/zishe/6972512" rel="nofollow">code in JS</a></p> <p>I borrowed auth (session) service from <a href="https://github.com/angular-app/angular-app" rel="nofollow">angular-app</a>, and strongly modify it:</p> <pre><code> angular.module('auth', []) .factory('sessio...
2
1,133
Trying to send list of class object as response to REST API
<p>I am trying to send List of my NotificationEntity class objects as a response to REST API call. What is happening is when the call is made, a query will run through database which will return a List of NotificationEntity class object(s) and when I am trying to send the List as JSON, I am getting error as </p> <bloc...
2
3,859
Drupal 8.5.1 Upgrade Errors - Where to Look for Troubleshooting?
<p>I am in the process of upgrading a site from 8.3.5 to 8.5.1</p> <p>I have the codebase updated, I have the modules configured through composer, and upgraded my drush installation with cgr and am running drush 9 within the installation. I have this site running just fine on a dev database in my local environment</p>...
2
2,971
Angular 5 Does not work on IE9
<p><a href="https://i.stack.imgur.com/iz3mq.jpg" rel="nofollow noreferrer">enter image description here</a>I have Angular Apps that works fine on IE11, But when I run it on IE9 I got the following error</p> <blockquote> <p>observable error: Error: Access is denied.</p> <p>SCRIPT438: Object doesn't support prope...
2
1,523
Unable to get username and password from angularjs to spring security
<p>Developing app on Angular.js with Spring Security. I am not able to send the username and password from UI to spring security. Getting null pointer exception. After debugging found that, username is null. Searched a lot on google but not able to fix it. When I click on login button, the debugger takes me to the user...
2
3,060
Spring saml sample application with https idp url throws exception: No IDP was configured, please update included metadata with at least one IDP
<p>How to configure spring saml sample application for adfs https idp url? I could successfully run the sample application using SSOCircle. Now, I am trying to use the client's ADFS url instead and I am getting the following exception:</p> <pre><code>org.opensaml.saml2.metadata.provider.MetadataProviderException: No ...
2
4,338
IE8 'attr(...)' is null or not an object
<p>I'm trying to get a jquery IE placeholder fix to work. It works fine in IE9 but in IE8 I keep getting an alert... </p> <blockquote> <p>'attr(...)' is null or not an object </p> </blockquote> <p>This is the code I am using. Am I doing something wrong?</p> <pre class="lang-js prettyprint-override"><code>&lt;!--...
2
1,182
Substitute for std::array when using boost::asio read_some() function, boost::array crashes at read_some() function call
<p>I am working on reading results from a socket read using boost's sockets and a char array. Based on examples I've seen online (including the Boost docs), I have this so far:</p> <pre><code>#include &lt;boost/asio.hpp&gt; #include &lt;array&gt; #include &lt;string&gt; #define MAXSIZE 1000000 //... void MyClass::proc...
2
1,093
STM32 Flash Write causes multiple HardFault Errors
<p>I am trying to write several bytes of data onto the STM32F410CBT3 Flash Memory Sector 4 (size of 64KB), and I chose this sector and assume it is safe to use as the code is approximately 30KB (which would probably reside in sectors 1 and 2). The microcontroller's clock speed is clocked at 100MHz (through PLL).</p> <p...
2
3,689
Efficient way to read a XLSX file and storing the data in Grails
<p>I need to read a XLSX file which contains around 50K rows in 5 sheets and is of about 7MB in Grails.</p> <p>I need to read the file sheet by sheet and need to store each row to a database table.</p> <p>but i am getting </p> <pre><code>Java heap space. Stacktrace follows: Message: Executing action [abx] of control...
2
1,624
How to properly return an image from QLThumbnailGenerator? (SwiftUI)
<p><strong>My Problem</strong> How do I return a cgImage from QLThumbnailGenerator.shared.generateRepresentations(for: ... )?</p> <p><strong>My Hangups/Attempt (Code Below)</strong> My attempt has a function (line 13) that returns a CGImage for a ListView entry (line 39). I tried to use an empty CGImage (line 18), but...
2
1,354
Inlining Algorithm
<p>Does anyone know of any papers discussion <em>inlining algorithms</em>? And closely related, the relationship of <em>parent-child graph</em> to call graph.</p> <p><strong>Background:</strong> I have a compiler written in <code>Ocaml</code> which aggressively inlines functions, primarily as a result of this and some...
2
1,624
Why is my parallel code slower than serial?
<p><strong>Issue</strong></p> <p>Hello everyone, I have got a program (from the net) that I intend to speed up by converting it into its parallel version with the use of <code>pthreads</code>. But surprisingly though, it runs <strong>slower</strong> than the serial version. Below is the program:</p> <pre><code># incl...
2
1,684
Sort data in a text file in alphabetical order - Java
<p>I want the output to list the userNameGenerator in alphabetical order. I converted the HashSet into an ArrayList because sets cannot be sorted, so I changed it to an ArrayList to sort out the list in alphabetical order. I used Collections.sort to sort the list of strings in alphabetical order, however, the output is...
2
1,778
Module build failed from Sass-Loader when setting up Material UI kit React
<p><strong>My environment</strong> I've got an RoR app setup with React Native. I use rails server and webpack for my development environment.</p> <p><strong>attempt to add UI library</strong> I added the material ui files as required in the <a href="https://demos.creative-tim.com/material-kit-react/?_ga=2.208268241.2...
2
2,354
Template parse errors when overriding DataTable component of primeNg
<p>I want to override the template of the <code>DataTable</code> component of <code>primeng</code> and this is how my code looks like:</p> <p><strong>my-datatable.component.ts</strong></p> <pre><code>import { Component, OnInit, ElementRef, Renderer2, ChangeDetectorRef } from '@angular/core'; import { DataTable, DomHa...
2
4,527
c# generic method overload not consistent with abstract Visitor pattern
<p>experimenting with Visitor pattern and generic method I found a kind of discrepancy in C#.NET. AFAIK C# compiler prefers an explicit overload to a generic method, therefore the following code:</p> <pre><code>public abstract class A { public abstract void Accept(Visitor v); } public class B : A { public over...
2
1,103
Serializing Objectify Keys using Gson
<p>Has anyone been able to serialize/deserialize objects using gson which have Key (the objectify ones) fields?</p> <p>I'm trying to use gson to do so but it seems several people online have had issues serializing appengine keys. Any tips?</p> <p>When I attempt to do so I get the following error on deserialization:</...
2
1,648
Kotlin Coroutines Run blocking not working as expected and Cannot block execution of for loops
<p>In my app i'm executing two for loops however those for loops need to scheduled in a order here is the use case:</p> <p>There are two for loops : 1- ImageStickerslist 2-TextStickerslist</p> <p>What i want to do is after imagestickerslist if properly finised only then textstickerslist will be executed. </p> <p>He...
2
4,266
angular 2 service subscription only updates after second click on component with routerLink(s)
<p>Angular 2.0 rc 5, router version 3.0.0 rc1</p> <p>I have an angular 2 app that uses a service to communicate between components, a parent component that has a <code>&lt;router-outlet&gt;</code> and a child component that has routerLinks. I am using NgClass to update css classes for animations. I added the service s...
2
2,164
Take Input Type File (HTML) to JavaScript and Send an Email Using PHPmailer
<p>i'm using PHPMailer, JavaScript and PHP, through my code i send the email to specific user, next step is attach a file with the email.</p> <p>But i have two questions about that:</p> <ol> <li>first one is related with the following code:</li> </ol> <p>HTML part:</p> <pre><code>&lt;input type="file" name="myFile"...
2
1,069
Clipped Floating Action Button CSS
<p><strong>The problem</strong></p> <p>I'm trying to create a website using <a href="http://www.getmdl.io" rel="nofollow noreferrer">Material Design Lite</a>, and I'm trying to insert a Floating Action Button on the top of a card. But thing is... It's getting clipped! I'm not sure why, I'm kinda new to this world.</p>...
2
1,139
Upload multiple files with PHPMailer safely
<p>I'm building a contact form where users will provide some information and maybe upload multiple images.</p> <p>I'm using code inspired by <a href="https://github.com/PHPMailer/PHPMailer/blob/master/examples/send_multiple_file_upload.phps" rel="nofollow noreferrer">PHPMailer example to send multiple attachments</a><...
2
1,058
ERROR org.sonatype.guice.bean.reflect.NamedClass - Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver
<p>I have maven project, so I tried to maven install for making jar. But I faiied because of the java.lang.ClassNotFoundException. So, I found the jar that includes the class. And I added the dependecny in pom.xml.</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt; &lt;ar...
2
6,013
Ansible Cloudformation, how to not break if Resource already exists?
<p>I have the following AWS Cloudformation config, which sets up S3, Repositories.</p> <p>When I run it via an ansible playbook, on the second time running the playbook this happens</p> <pre><code>AWS::ECR::Repository Repository CREATE_FAILED: production-app-name already exists etc </code></pre> <p>How can I make it...
2
2,038
Change image in specified div when checkboxes are selected
<p>I am wanting to display an image in a div when checkboxes or buttons are selected. I need to to be able to select multiple boxes and display a different image based on the total selection. </p> <p>The selection matrix would be as follows: A, B, C, D, AB, AC, AD, BC, BD, ABC, ABD. C and D cannot appear together. Whe...
2
3,424
Can't get voice commands on Android Auto Media App work
<p>I have an Android App with working Auto capabilities which has been rejected from the store because:</p> <p>"Your app does not support all of the required voice commands. For example, your app does not contain an Intent filter for action "android.media.action.MEDIA_PLAY_FROM_SEARCH"."</p> <p>So i looked to at leas...
2
1,942
django-summernote view uploaded image from template
<p>I'm trying to view my uploaded images when uploading from summernote.</p> <p>Here is my static and media for settings.py:</p> <pre><code>STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_URL = '/static/' STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] MEDIA_ROOT = "static/" MEDIA_URL = "/./" </code...
2
1,210
vb.net how do i add a new rows (and update) from datagridview programmatically to sql database
<p>asking a new question with regards to my previous problem.</p> <p>so this is how it goes, so far i was able make the following code to work (thanks to @JADE for helping me out, (a lot ) :)</p> <pre><code>Dim connstr As String = "server=midtelephone\sqlexpress; database=testdb; user= sa; password=sa;" cmdconn ...
2
1,525
Getting Direct Link of File With Extension in Lumen
<p>I am using Lumen and I have an audio file in my <code>uploads/videos/</code>. I want to return the URL of the exact path (like <code>app.com/videos/one.mp4</code>).</p> <p>I have achieved same thing in a very bad-practiced way by putting /{fileName} in routes, giving /one.mp4 and by removing the extension from Stri...
2
1,162
Accessing and coloring specific text within HTML table cell without using RegExp
<p>This is a portion of my table:</p> <p><strong>index.php</strong></p> <pre><code>&lt;tr&gt; &lt;th&gt;data_uwr&lt;/th&gt; &lt;td&gt;-1.413\-5.113&lt;/td&gt; &lt;td&gt;-3.314\-3.650&lt;/td&gt; &lt;td&gt;-0.001\-0.010&lt;/td&gt; &lt;td&gt;-1.052\-1.052&lt;/td&gt; &lt;td&gt;-1.052\-1.052&lt;/td...
2
1,641
Alternatives to stats::reshape
<p>The melt/cast functions in the reshape package are great, but I'm not sure if there is a simple way to apply them when measured variables are of different types. For example, here is a snippet from data where each MD provides the gender and weight of three patients:</p> <pre><code>ID PT1 WT1 PT2 WT2 PT3 WT3 1 "M"...
2
1,056
Spring Boot connection with two MySQL databases
<p>I'm following the Baeldung tutorial for multiple datasource connections (<a href="https://www.baeldung.com/spring-data-jpa-multiple-databases" rel="nofollow noreferrer">https://www.baeldung.com/spring-data-jpa-multiple-databases</a>) but my connections to the databases aren't working.</p> <p>I have the connections ...
2
6,194
no selected rows from datatable show in datalist with primefaces
<p>if I select some rows in checkbox of datatable and press "view" button. it will be showed in a datalist. but there nothing in the datalist. it seemes that, the "selectedServers" have not store the selected rows from datatable.</p> <p>i need help! </p> <h2>list.xhtml</h2> <pre><code>&lt;?xml version='1.0' encoding...
2
3,896
How to do Abstract Entities in Realm.io in Swift
<p>I am converting from CoreData to Realm.io I did a little experiment to see how Realm.io handles situations where I need to have subclasses of a class that is an RLMObject.</p> <p>Model</p> <pre><code>import Realm @objc enum RecurrenceEnum : Int { case Daily = 1 case Weekly = 2 case Monthly = 3 } clas...
2
1,042
Missing certain part of Cookies using requests.get()?
<p><strong>BackgroundInfo:</strong></p> <blockquote> <p>I am scraping amazon. I need to set up the session cookies before using requests.session.get() to get the final version of the page source code of a url.</p> </blockquote> <p><strong>Code:</strong></p> <pre><code>import requests # I am currently working in C...
2
1,335
AsyncTask #3 error parsing JSON object. String cannot be converted to JSONObject
<p>Can someone please tell me what my error is? I downloaded this code from AndroidHive.info. I keeping getting a "Error parsing data error. Also can someone show me how to find out what line the error is on?</p> <pre><code>public class NewProductActivity extends Activity { // Progress Dialog private Progress...
2
6,612
Image on bootstrap navbar to stick out above and below menu bar
<p>How can I make a bootstrap navbar like that: <a href="https://i.stack.imgur.com/oOJi2.png" rel="nofollow noreferrer">Navbar</a></p> <p>The image should be centered on the navbar.</p> <p>Here is what I have currently:</p> <pre><code>&lt;div class="navbar navbar-static-top"&gt; &lt;div class="navbar-inner"&gt; ...
2
1,037
What shortest path maze algorithm is this?
<p>I am trying to know and understand as many algorithms as I can and I stumbled across a strange algorithm in a contest packet that finds the minimum number of steps to solve a maze (shortest path). I understand it 100%, but I don't know what algorithm it is and the packet did not state the name of it. I would really ...
2
1,811
Reciving Error BC30455: Argument not specified for parameter 'description' of 'Public Sub New(description As String, quanity As Integer)'
<p>This is my first time posting and i am really desperate. I have researched everywhere even my textbook to solve my issue and have came up empty after 20hrs(split between 3 days) of trying to fix this one error. Here is the exact text the code displays on a web page when trying to access one of my pages while debuggi...
2
2,933
failed to resolve parameter for parameter dispatcher of type IMvxMainThreadDispatcher when creating
<p>My Android App is crashing in the production environment, our crash reporting tool is XamarinInsights, it dumps the following stack</p> <pre><code>at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.GetIoCParameterValues (System.Type type, System.Reflection.ConstructorInfo firstConstructor) [0x00066] in &lt;4ddde23419c...
2
1,189
The first item in my ListView will not update when I change the text of an already visible TextView
<p>I have a ListView that is getting populated by my custom BaseAdapter with views that contain a couple of TextViews and ImageButtons. If the user selects an item from a PopupMenu on one of the list items, it changes the text of an associated TextView on that list item. This is working great for all of the items in my...
2
1,787
.net maui Cannot get updated fields in an Observable collection to update in bound collection view
<p>I'm trying to update actual fields in an ObservableCollection that is bound to a CollectionView.</p> <p>The CollectionView updates fine on adding, removing items, but not if I programmatically change an item in the list.</p> <p>I understand from this post <a href="https://stackoverflow.com/questions/19981460/observa...
2
1,735
Correlation of 2 time dependent multidimensional signals (signal vectors)
<p>I have a matrix M1 , each row of which is a time-dependent signal.</p> <p>And I have another matrix, M2, of the same dimensions, each row of which is also a time dependent signal, used as a "template", to recognize signalshapes in the first matrix.</p> <p>I want as a result a column vector v, with v [i] is the co...
2
1,597
Convert String to XMPP Stanza using Smack Android
<p>or </p> <ul> <li><p><strong>Q) Generate XMPP Stanza From String.</strong></p></li> <li><p><strong>Q) Cast String into XMPP Stanza.</strong></p></li> </ul> <p>By using Smack library in Android,</p> <pre><code>Message message = new Message(); message.setStanzaId("123"); message.setFrom("923442621149"); message.setT...
2
1,121
consuming web service in WPF
<p>i want to use a web Service(WSDL) in my WPF App.</p> <p>i have add it as a Service Reference to my app.</p> <p>Code to call it is as :</p> <pre><code>ServiceReference1.WebService_ISB_SAB_Interface_ExtSoapClient soap = new ServiceReference1.WebService_ISB_SAB_Interface_ExtSoapClient(); ServiceReference1.Request...
2
1,694
Wrong code when combining anonymous and nested procedures
<p>I've got some unexpected access violations for Delphi code that I think is correct, but seems to be miscompiled. I can reduce it to</p> <pre><code>procedure Run(Proc: TProc); begin Proc; end; procedure Test; begin Run( procedure var S: PChar; procedure Nested; begin Run( ...
2
1,071
Flink Streaming: From one window, lookup state in another window
<p>I have two streams:</p> <ul> <li>Measurements</li> <li>WhoMeasured (metadata about who took the measurement)</li> </ul> <p>These are the case classes for them:</p> <pre><code>case class Measurement(var value: Int, var who_measured_id: Int) case class WhoMeasured(var who_measured_id: Int, var name: String) </code>...
2
1,669
Total, Quantity, Price in Laravel
<p>I have a table named 'products' with 5 fields (id, title, price, quantity, total).</p> <p>My goal is to calculate via the form products.create the total, price * quantity.</p> <p><strong>Database - products</strong></p> <pre><code>public function up() { Schema::create('products', function (Blueprint $...
2
1,711
App Crash after signing app with resource shrinking and Proguard
<p>This is the first time I got this type of exception while building a signed APK. I searched a lot but could not find any useful information to fix this. </p> <p>Any information will help me a lot. Because I already spend a lot of time fixing this. I also want to reduce the APK size.</p> <p>I am creating a signed A...
2
1,409
Run Azure PowerShell script in Docker container
<p>I would like to run an Azure-PowerShell script in a Docker container. As Docker is quite new to me, maybe I just do not understand some concepts correctly.</p> <p>As far as I understand, the Dockerfile below is based on <strong>Linux</strong>, and has <em>PowerShell</em> and <em>Azure PowerShell</em> installed?</p> ...
2
1,153
How can I diagnose a long running transaction and save the data if possible?
<p>I'm running into an issue with a long running transaction that is blocking all writes to the database as a result. I'm wondering, what is the best way to diagnose this issue and is it possible to force the transactions to commit and save the data that is currently hung up?</p> <p>Background info: The app is using a...
2
1,805
Android scrollview shrinks imageview
<p>This is my <strong>layout xml</strong> with a <code>Relativelayout</code> in a <code>Scrollview</code>:-</p> <pre><code>&lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;RelativeLayout android:id="@+id/layout1" android:layout_width="wrap_cont...
2
1,385
Duplicate files copied in APK META-INF/INDEX.LIST using Gluon
<p>I'm deloping a code in neatbeans on javafx with the latest gluon version, and when I run it in my laptop the program doesnt have problems, but when I try run in android </p> <p>I achive this message </p> <blockquote> <p>com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/...
2
1,355
Request JSON data in WCF REST Service and call through jQuery
<p>I am developing a scenario in which I have to insert the data in xml file.</p> <p>Following is my service contract:</p> <pre><code>namespace WcfService1 { [ServiceContract] public interface IService1 { [OperationContract] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Jso...
2
2,046
Dapper - Mapping class names/properties to database fields
<p>I have a class... </p> <pre><code>public class WireTransferRequest { public int RequestID { get; set; } public DateTime RequestDate { get; set; } public string RequesterName { get; set; } public string AuthorizerName { get; set; } public string AuthorizerSignature { get; ...
2
1,862