title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Clear Android Edit Text inside a listview | <p>I have a edit text and a Save button inside my list view. I have to clear the text when the user clicks the save button. I have tried like </p>
<pre><code>txtDescription.setText("");
</code></pre>
<p>But not worked. Any one know why it is not worked ? The Adapter class is attached</p>
<p>Please Help Me, Thanks i... | 1 | 2,368 |
FTPClient.storeFile() returning false and FTP return code is 450 and says file is busy | <p>My requirement is to write a file to file server and for any connectivity or issues while writing file to file server need to draft a mail.</p>
<p>While testing below code in testing environment by business,<strong>client.storeFile</strong> returning false for few files .We are placing files manually in target file... | 1 | 1,568 |
Problems with Picasso and Recyclerview - Images get refreshed on scrolling but in the wrong imageviews | <p>I am working on a simple app where I search for a Tv show, where the app generates a GET request to TMDB. From there I am trying to display the images and details of results in a cardview. I am using Picasso for loading the images from TMDB and it works fine. The problem is when I scroll, the images loaded first get... | 1 | 2,315 |
Push Notification Badge Count Not Updating | <p>this is my code for apple push notification, when the application is running and notification coming i am incrementing the badge count and getting desired result when i click home button, on app icon. but when i am not running my application and notification comes, it didn't auto increment badge count and remains to... | 1 | 1,127 |
generate build timestamp in Go | <p>I want in a Go program (using Go 1.11.1 on Debian/Linux/x86-64) to keep the build timestamp with a line explaining the last <code>git commit</code>.</p>
<p>In a C program (FWIW my <a href="http://github.com/bstarynk/bismon/" rel="noreferrer">bismon</a> project is doing something very similar), I would just generate... | 1 | 1,978 |
C# HttpClient.SendAsync always returns 404 but URL works in browser | <p>I am developing an C# console application for testing whether a URL is valid or not. It works well for most of URLs. But we found that there are some cases the application always got 404 response from target site but the URLs actually work in the browser. And those URLs also works when I tried them in the tools such... | 1 | 1,059 |
One more Fatal error: gnutls_handshake: A TLS packet with unexpected length was received | <p>All,</p>
<p>After installing the new cert from Comodo in my MS2012 server, my FTPS connections from my RHEL6 server are failing with "gnutls_handshake" error. We moved from Verisign signed to Comodo. I went through the different "set" commands but still unable to connect successfully. Can you please help? Thanks a ... | 1 | 1,861 |
Will using %chin% to subset character columns of an auto-indexed data.table ever improve speed? | <blockquote>
<p><strong>TLDR:</strong> When using more recent versions of <code>data.table</code> that use auto-indexing, is there any benefit from using <code>%chin%</code> to subset a data.table on character columns?</p>
</blockquote>
<p>In the past, using <code>%chin%</code> from <code>data.table</code> in place ... | 1 | 1,740 |
OperationalError at /no such table: django_session error on public server, site works fine on local server | <p>I am trying to send data taken from a form to another views page to process it. I am using sessions to send that data. It works fine on a local host, the data is sent and received successfully, however, on a public server it crashes. I found a couple of posts regarding the same problem but their issue is mostly rela... | 1 | 1,174 |
I'm not able to click on Element, no Error - WebDriver/Java/Firefox | <p>I'm currently attempting to automate some of our manual testing in my place of work. I've only picked up Selenium yesterday, so bear with me, if this questions is easily answered. I feel like i've researched for a few hours with no success.</p>
<p>My current issue, is that WebDriver navigates to the URL, but doesn'... | 1 | 3,221 |
How to access an array (JSON) in the front-end JavaScript that was passed by Python (Flask)? | <p>I'm a real noobie using the Flask framework (and client-server generally), so bear with me. I have a basic HTML template file with a bit of Flask (uses the {% ... %} notation) passing in a JSON object from a python file. Right now, as a simple sanity check it's outputting the content of <code>motifs</code> (an array... | 1 | 1,237 |
While processing template api/[TodoController], a replacement value for the token TodoController could not be found | <p>I'm new to this and following this <a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.2&tabs=visual-studio" rel="noreferrer">.Net ASP.NET wep api tutorial</a> but cant get past this error. When doing the "Test the GetTodoItems method" and running the Postman to get/se... | 1 | 1,816 |
Unable to start Kestrel in Docker container | <p>I have an application written against .NETCore 2.0. I can run the application on my CentOS 7 box in a bash without any problems.</p>
<p>I successfully generated a dockerfile and built a docker image.</p>
<p>When I start the image as container with <code>docker run</code> I get the following exception:</p>
<pre><c... | 1 | 1,045 |
Uncaught SyntaxError: Unexpected token < in JSON at position 0 from Codeigniter response | <pre><code><option value="Petrol/Diesel">Petrol</option><option
value="Petrol/Diesel">Diesel</option>
</code></pre>
<p>is the output generated when I see it in chrome>network. </p>
<blockquote>
<p>Cannot use 'in' operator to search for 'length' in </p>
</blockquote>
<p>Or I get above error.... | 1 | 1,122 |
unicode' object has no attribute 'get' in Django | <p>I am trying to follow the [Django Tutorial 6][1] to do the user authenication. But i get stuck. I am getting this Attribute error: unicode' object has no attribute 'get'. The models,view and forms are provided below. Not sure where the error is... Need some help...</p>
<p>models.py</p>
<pre><code>from django.db im... | 1 | 1,811 |
extract value from raster stack from spatialpolygondataframe | <p>I have a raster stack with 27 rasters in it. I have 27 corresponding polygons in a spatial polygon data frame. I want to take polygon[i] overlay it on raster[i], extract and sum the values from raster [i], get a count of the number of cells within the polygon[i] and then divide the sum value by the # of cells. In... | 1 | 2,074 |
Codeigniter multiple upload of different file-types | <p>I want to upload an audio file and an image in the same form and store their names in the db...what happens is only one of the files is uploaded (the one that is first in row)
the other gives an error of not allowed type</p>
<p>here is my view:</p>
<pre><code> <?php echo form_open_multipart('index.php/en... | 1 | 1,536 |
ChangeTracker Entity Framework 4.1 - Original Values of Related Objects | <p>I have a base class that I inherit from that has two zero to many relationships with other entities:</p>
<pre><code>public abstract class WebObject
{
public WebObject()
{
RelatedTags = new List<Tag>();
RelatedWebObjects = new List<WebObject>();
}
[Key, DatabaseGenerated(... | 1 | 1,864 |
ASP.net Session login | <p>I'm trying to implement a session login into my web application. At the moment I'm receiving an error message "The name 'txtUserName' does not exist in the current context. When I check the aspx file the textbox ID="txtUserName" exists.</p>
<pre><code><h2>
Log In
</h2>
<p>
Please enter you... | 1 | 2,001 |
Backbone.Marionette, collection items in a grid (no table) | <p>I am trying to figure how to effectivly move a collection of models to a grid pattern in the view.</p>
<p>This is a question about Row/Column principle of a simple collection.</p>
<p>Say I have the following <em>Collection</em>:</p>
<pre><code>[
{id: 1, title="test 1"},
{id: 2, title="test 2"},
{id: 3... | 1 | 1,776 |
Finding Percentage of marks in Javascript | <p>I am trying to get percentage of marks submitted in form. But I am unable to understand what I am doing wrong in my code. I am taking marks from students and displaying their name and percentage. I am using form and input and submitting it to get the percentage in javascript.</p>
<p><div class="snippet" data-lang="... | 1 | 1,241 |
How to get IP address of incoming request SOAP | <p>I have the following classes, how I can get the IP address of the incoming request source? I have checked several solutions on the internet but could not find some suitable one, if you need more information about the project structure I can add, thanks</p>
<pre><code>@EnableWs
@Configuration
public class WebServic... | 1 | 1,155 |
PHP - Fatal Error: Call to undefined method - but method exist | <p>I'm currently creating a ticket handler system, however, I keep getting a very surprising error when I try to call one of my classes.
The error is:</p>
<pre><code>Fatal error: Call to undefined method makeTickets::submitNewTicket() in /home/shortcut/public_html/MYDOMAIN/explore/account/tickets.php on line 68
</code... | 1 | 1,072 |
React context being lost after redirect | <p>Creating context</p>
<pre><code>export default React.createContext({
user:null,
login:()=>{}
})
</code></pre>
<p>Context controller </p>
<pre><code>export default class ContextHandler extends Component{
state = {
user: null,
}
logout = () => {
this.setState({
user: null
})
}
login = use... | 1 | 1,218 |
Kendo Grid Ajax Data binding | <p>I am trying to implement the Grid in ASP.NET MVC 5 app. I have use table in razor to test code and is pulling data properly, however i am trying to do server binding using provided Kendo helper classes but i am struggling to pull data to view. I am using Repository pattern and UnitOfWork.... the code is below ...</p... | 1 | 1,104 |
Android can not resolve subscribe method in rxjava | <p>Im tring to use rxjava with retrofit in android studio. In fact i followed this <a href="https://code.tutsplus.com/tutorials/getting-started-with-retrofit-2--cms-27792" rel="nofollow noreferrer">https://code.tutsplus.com/tutorials/getting-started-with-retrofit-2--cms-27792</a> tutorial
This is what everything that ... | 1 | 1,113 |
Fallback disables - Hystrix | <p>I'm using Hystrix in my environment associated with Liferay and other external services. My circuit gets some fails and opens the circuit to a specific service. Everything is fine so far. However, the circuit never changes to closed again. My fallback is disabled with this property:</p>
<p>hystrix.command.default.f... | 1 | 6,541 |
Spring boot migration : non-compatible bean instance of type [com.sun.proxy.$Proxy89] | <p>I am trying to migrate old spring application (spring + jsp for presentation layer + hibernate) to spring boot.
Everything is migrated without problems unless I add dispatcherServlet and add @EnableWebMvc. I got this error:</p>
<pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean ... | 1 | 2,841 |
django inline editing - inline form only required if at least one field is filled out | <p>I created a view which returns a form including a contact form and two phone_number forms, following this example: </p>
<p><a href="http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/" rel="nofollow noreferrer">multiple forms</a></p>
<p>The phone number forms should only b... | 1 | 2,143 |
signalR connection breaks after redirection to another view in MVC3 app | <p>I am trying to implement SignalR in my existing MVC3 application to send alerts to all connected client. I am using Persistent connection. Just to test this i have placed a broadcast button on _Layout page. Clicking on broadcast button sends some text using connection.send($(‘#msg’).val()); and is successfully recei... | 1 | 1,045 |
Rails 6 ActionText rich_text_area works normally, does not appear when rendered in a layout | <p>I'm rendering a form that utilizes the ActionText input rich_text_area, which is the Rails implementation of the Trix WYSIWYG rich text editor. It's been working fine until I started refactoring my views to use a layout, where the form content can yield different forms. The form renders fine <em>except</em> for the ... | 1 | 1,480 |
nginx-prometheus-exporter deployment failing | <p>I am trying to deploy <code>Nginx</code> with <code>nginx-prometheus-exporter</code>. Following is my deployment</p>
<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: local
name: nginx
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containe... | 1 | 1,595 |
Mapping 2 String fields to OffsetDateTime with MapStruct | <p>I have the following DTO which has 2 fields that must be converted to OffsetDateTime:</p>
<pre><code>@Data
public class AppointmentDTO {
private String id;
@NotNull
private String startTime;
@NotNull
private String endTime;
@NotNull
private String timeZoneStart;
@NotNull
pri... | 1 | 1,136 |
Can Yarn and NVM Coexist on Windows? | <p>Yarn was working for me until I decided I needed multiple versions of node. So I uninstalled yarn and installed nvm, following instructions from <a href="http://digitaldrummerj.me/windows-running-multiple-versions-of-node/" rel="noreferrer">the following guide</a></p>
<p>I then successfully re-installed yarn using ... | 1 | 1,096 |
TypeError: updatedService.save is not a function when using testing NestJS API with Jests and Mongoose | <p>Depending on the user input DTO, A product's information can be Updated using <code>HTTP PATCH</code>. My NestJS Service is as follows:</p>
<pre class="lang-js prettyprint-override"><code>
async updateAProduct(product: ProductDTO ) {
const updatedProduct = await this.findProduct(product.id);
if (prod... | 1 | 1,950 |
MVC3 Request.Form value is null | <p>Issue: In the controller, the Request.Form values are null and count is 0. This is happening after hosting my website with a web hosting firm. However there is no issue while I am developing the website.</p>
<p><strong>HTML PART</strong></p>
<pre><code><form action = "@ViewBag.SearchLink" method="post" style="v... | 1 | 1,847 |
HTML5 Canvas Flip Card Animation | <p>I am trying to create flip card effect using html canvas by drawing it in the canvas.</p>
<p>no ccs3 tricks needed. It should be done in a native manner;</p>
<p>this is my initial test using phaser.js by changing the scale</p>
<pre><code><html>
<head>
</head>
<body>
<div id... | 1 | 1,056 |
Why does GCC 9.1.0 sometimes complain about this use of strncpy()? | <p>This is a 40-line MCVE (<a href="https://stackoverflow.com/help/mcve">Minimal, Complete, Verifiable Example</a>) — or something close to minimal — cut down from a 1675 line source file that originally included 32 headers (and most of those included multiple other headers — compiling it with <code>gcc -H</code> lists... | 1 | 1,646 |
Angular lazy loading - don't see it is working | <p>I defined a lazy loading module.</p>
<p>this is SettingsRoutingModule module-</p>
<pre><code> const routes: Routes = [
{
path: '',
component: SettingsStandaloneComponent,
children: [
{
path: '',
redirectTo: 'profile... | 1 | 1,117 |
Why does this getOrElse statement return type ANY? | <p>I am trying to follow the tutorial <a href="https://www.jamesward.com/2012/02/21/play-framework-2-with-scala-anorm-json-coffeescript-jquery-heroku" rel="noreferrer">https://www.jamesward.com/2012/02/21/play-framework-2-with-scala-anorm-json-coffeescript-jquery-heroku</a> but of course play-scala has changed since th... | 1 | 1,455 |
Android Real Time Multiplayer - Room Creation is failing | <p>I am using <code>Android Play Games - Real Time Multiplayer</code> for my app. When I create a new room, the callback <code>onRoomCreated()</code> returns <code>STATUS_NETWORK_ERROR_NO_DATA</code> 5% of the times. I do not know why I get this error sporadic. </p>
<p>Some post recommends should be closed before crea... | 1 | 7,324 |
Is it possible to find exact matches only when searching for a phrase in Lucene.net? | <p>I know similar questions have already been asked, but I cannot find any answers that suit what I am looking for.</p>
<p>Basically, I want to search for phrases and only return matches which have that exact phrase <strong><em>only</em></strong> and not partial matches.</p>
<p>e.g. A document has "This is a phrase" ... | 1 | 1,328 |
How to import js file from src file into index.html? | <p>I am creating one system using React and I am still new to React. I need to add js file in my index.html where that js file is located in the src folder. I need to import this js file in order to make my system works. Does anyone know how to solve my problem? Thanks in advance.</p>
<p>This is how I import my js fil... | 1 | 1,122 |
How to pass an Informix Collection Parameter (LIST, SET, MULTISET) in c# through an ODBC Connection | <p>I'm looking for a way to pass an Informix List Parameter in C#.</p>
<p>I asked a previus question of How to pass a multi value parameter to Informix, but now I need to execute it from C#.</p>
<p>The related question is <a href="https://stackoverflow.com/questions/10825468/informix-how-to-pass-use-and-execute-multi... | 1 | 1,395 |
Querying Tables with Composite Primary Keys using Spring-data-cassandra | <p>I'm getting the following exception when using the findOne() or findAll() method of CassandraReporitory:</p>
<pre><code>Caused by: java.lang.IllegalStateException: property does not have a single column mapping
at org.springframework.data.cassandra.mapping.BasicCassandraPersistentProperty.getColumnName(BasicCas... | 1 | 1,588 |
Symfony - Creating a ParamConverter - Fails to register the converter name | <p>I created a custom @ParamConverter to manage editing a student record based on a Route of <code>/student/{id}</code>,
but when I run it I get an Exception "No converter named 'asymatic_param_converter' found for conversion of parameter 'id'.</p>
<p>The error is caused because in <code>vendor/sensio/framework-ex... | 1 | 1,861 |
VBA SelectSingleNode xpath with multiple namespace | <p>I have simillar problem to others trying to search with xPath through XML with two namespaces but still looking on other topics it dosen't seem to work:</p>
<p>XML:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<IE515 xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.mf.gov.pl/xsd/EC... | 1 | 1,604 |
Module was expected to contain an assembly manifest | <p>I have a project that has been working fine in Visual Studio 2013 that is written in C# using WPF. This project has a few dependencies:</p>
<ul>
<li>GalaSoft.MvvmLight Toolkit</li>
<li>Newtonsoft.Json</li>
<li>Xceed.Wpf.Toolkit</li>
</ul>
<p>Prior to last night the project has been working fine, ran and was able t... | 1 | 3,805 |
PostgreSQL 9.5: Combine json_agg results into single json object | <p>I am struggling with the following SQL query:</p>
<p>There is a table <strong>data_tracks</strong> with coordinates describing a trip. Each trip is uniquely identified by a <strong>trip_log_id</strong>. After reaching the trip's destination, the user needs to participate to a survey. The answers of the survey are s... | 1 | 2,685 |
Apache Poi Android | <p>I am using <code>Apache Poi</code> in an Android application, but I have a problem with the <code>HSSFWorkbook</code>.</p>
<p>I just want to read an Excel file found in the internal memory of the Android tablet.
(To display data in Android application)</p>
<p>my code: </p>
<pre><code>@Override
protected void onC... | 1 | 2,404 |
Can't click button in UIView | <p>I create a menuView in <code>self.view</code>,menuView has two subViews which are UIView.
this UIView contains 4 UIButton ,but i can't click any one of it. <code>userInteractionEnabled</code> set YES, button's frame set correct in View Debugging.
code:</p>
<p><strong>UPDATE:</strong><a href="https://github.com/gshu... | 1 | 1,276 |
Objective-C -- Subclass of delegate in subclass | <p>This is a fairly complicated inheritance hierarchy, so bear with me (I've tried to simplify things rather than state the exact case I am using which is even more complex):-</p>
<p>Let's say I create a subclass of <code>UITextField</code> called <code>TextField</code> which is my own custom enhanced general-purpose ... | 1 | 1,120 |
Mysql_query Unknown column 'name' in 'where clause' | <p>stackoverflow this is my very first post :D.
Now down to business, I am creating a private game site, that will be pulling IP Addresses (not sure if that's even legal, but I want the code done in case it is, so I can just put up my site) and storing them in a mysql database, since the names are already in the table... | 1 | 1,373 |
Insert multiple data in dynamically added table to database with codeigniter | <p>I have a table with dynamically added rows. Something like this</p>
<p><a href="https://i.stack.imgur.com/EvzuJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EvzuJ.jpg" alt="enter image description here" /></a></p>
<p>User can add rows in each category (Basic, Type Rating, and General) dynamical... | 1 | 4,350 |
How to store NSMutableArray to NSUserDefaults and show results in TableView? | <p>I want to save the Notifications which come from server in my application and also make a User Interface to give users the ability of chosing which Notification(message) to read. In a scheduled method my client controls for changes inside the server and the communication is in JSON format. I have parsed it and can s... | 1 | 2,456 |
How am I supposed to choose the location of config files in maven project | <p>I am building a command line tool which relies on some configuration files. </p>
<p>On development, I put those files under <code>src/main/resources</code>, and accessed by <code>getClass().getResourceAsStream("/config-file-name")</code>, which works well.</p>
<p>I choose maven-assembly-plugin to build the jar wit... | 1 | 1,395 |
ggplot2 - geom_ribbon bug? | <p>This code throws an error and I can't figure out why...</p>
<pre><code>library( plyr )
library( ggplot2 )
library( grid )
library( proto )
# the master dataframe
myDF = structure(list(Agg52WkPrceRange = c(2L, 2L, 2L, 2L, 2L, 2L, 3L,
5L, 3L, 5L, 3L, 5L, 3L, 2L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L,
3L, 3L, 3L, 3L, ... | 1 | 1,256 |
How to redirect when server-sent-event is finished in Flask on server side? | <h2>Question</h2>
<p>How can one redirect to another page when server-sent-event is finished in Flask and on server side?</p>
<h3>Problem description</h3>
<p>An EventSource was implemented on client side code (JavaScript) and a Response was returned on server side code (Flask, Python). The EventSource will be closed... | 1 | 1,525 |
WebRTC: How to calculate user bandwidth/network latency of RTC Peer Connection | <p>So, I'm working on an App that utilises WebRTC to provide video/audio communication between peers.</p>
<p>I'd like to provide some feedback to users in regard to their network connection/bandwidth/latency etc in order to suggest possible solutions if bandwidth etc is terrible. </p>
<p>WebRTC has a <a href="https:/... | 1 | 1,192 |
Uploading large files to aws s3 bucket without loading to memory | <p>I am trying to upload 2GB+ file to my bucket using <code>MultipartFile</code> and <code>AmazonS3</code>, controller:</p>
<pre><code>@PostMapping("/uploadFile")
public String uploadFile(@RequestPart(value = "file") MultipartFile file) throws Exception {
String fileUploadResult = this.amazonClient.uploadFile(fil... | 1 | 3,030 |
How to enable and disable a submit button based on if passwords are matching? | <p>I am creating a form where the user will register for a website and in that form there are two input fields to help confirm the users password. I am trying to disable the submit button when the passwords are not matching and then reenable it when the passwords do match. I currently have the disable part working but ... | 1 | 1,242 |
Truth table with 5 inputs and 3 outputs | <p>I have to make a truth table with 5 inputs and 3 outputs, something like this:</p>
<p><code>A B C D E red green blue<br>
0 0 0 0 0 0 0 0<br>
0 0 0 0 1 0 0 1<br>
0 0 0 1 0 0 0 1
.
.
.
.
1 1 0 1 0 0 1 1<br>
.
.
.
1 1 1 1 1 1 0 1</code></p>
<p>etc. (in total 32 rows, th... | 1 | 1,387 |
Error in importing Pylab | <p>I am trying to import Pylab using the <code>import matplotlib.pyplot as plt</code>. However I received an error message below. Does anyone have a fix for this? I'm using Enthought's distribution, which uses IPython 0.12.</p>
<pre><code>In [1]: import matplotlib.pyplot as plt
----------------------------------------... | 1 | 4,917 |
Avoiding Nested If Else / Switches - Java | <p>I am reviewing some code(Java) and making changes based on a business logic flow chart. The current code relies on a large amount of if statement's - something I want to try and move away from. I have been reading about Polymorphism and being trying to wrap my head around how to apply it to my situation. I can make ... | 1 | 1,297 |
How to get process's base address with MODULEENTRY32? | <p>I'm looking to do something in this example: <a href="https://stackoverflow.com/questions/13045864/python-how-to-get-the-start-base-address-of-a-process">Python - How to get the start/base address of a process?</a>. I'm having the same issue as the person in that topic, in that the pointers cheat engine provides is... | 1 | 2,661 |
Bootstrap dropdown list button as a form element | <p>This is bootsrap drop down menu</p>
<pre><code><div id="mySelect" class="select btn-group m-b" data-resize="auto">
<button style="font-weight:700;background-color:#fff;border-style:solid;
border-width:2px" type="button" id="expirymonth" name="expirymonth" data-toggle="dropdown" class="btn btn-white... | 1 | 1,166 |
Polymorphic Association in Active Admin Not Passing All Parameters | <p>I created a Polymorphic Association in Active Admin for the creation of Keyword associated with Industry. I can display the association fine in Active Admin (the association was created in the console) but when I Update and create New, only the keyword parameters gets passed. If I go back to the console and update, ... | 1 | 1,028 |
Django Nested admin | <p>here is my code:</p>
<p>models.py</p>
<pre><code>from django.db import models
class Country(models.Model):
country_name = models.CharField(max_length = 20, default = '', )
country_other_details = models.CharField(max_length = 100, default = '', null = True)
class Meta:
verbose_name_plural = "Co... | 1 | 1,756 |
MediaPlayer.setOnCompletionListener not executing | <pre><code>public class MainActivity extends AppCompatActivity
implements View.OnClickListener {
private MediaPlayer mediaPlayer;
private ImageButton playBtn,previousBtn,forwardBtn,rewindBtn,nextBtn;
private SeekBar seekBar;
private int[] songsName = {R.raw.song1,R.raw.song2... | 1 | 3,268 |
Getting tz is not a function error when testing a method in Angular 2 service that uses moment-timezone | <p>I am getting <code>__WEBPACK_IMPORTED_MODULE_2_moment__.tz is not a function</code> when testing a method that uses <code>moment.tz(time)</code> functionality.
When I test just a dummy function that uses <code>moment.js</code> everything is alright.</p>
<p>I checked karma and webpack configs but they don't mention... | 1 | 1,115 |
JPA 2.1: Introducing Java 8 Date/Time API | <p><strong>I'd like to add support</strong> for the <strong>Java 8 Date/Time API (JSR-310)</strong> in my JPA-enabled application.<br></p>
<p>It's clear that <strong>JPA 2.1</strong> <a href="https://stackoverflow.com/a/23718471/324152">does not support the Java 8 Date/Time API</a>.<br>
As a workaround, the most commo... | 1 | 1,498 |
Error : redefinition of default parameter | <p>I have two methods to implement named : Compute_correlation and cca. This is how I define them :</p>
<pre><code>namespace dlib
{
template <typename T>matrix<typename T::type,0,1> compute_correlations (
const matrix_exp<T>& L,
const matrix_exp<T>& R
);
... | 1 | 1,600 |
How is the stack pointer changed in this program with call and ret | <p>My questions pertain to the actions that seem to happen between the line when context is changed especially concerning <code>RSP</code> and <code>RBP</code>.</p>
<p>Given this very simple program:</p>
<pre><code>Reading symbols from ./function_call...done.
(gdb) disass main
Dump of assembler code for function main... | 1 | 1,144 |
Creating and filling a NxN grid in UWP Xaml | <p>I am trying to create a UWP puzzle game, I want to cut the picture into n parts and then show the pieces in a grid.</p>
<p>My problem is, how to force a certain NxN style. Right now I have to maximize the window in order to see a 3x3 grid, if I shrink either side, it will converge to a 2 column, 1 column grid. Is t... | 1 | 1,230 |
Android gcm client using GoogleCloudMessaging | <p>I am using the new way of using gcm described <a href="http://developer.android.com/google/gcm/client.html" rel="nofollow">here</a> using <code>GoogleCloudMessaging</code> class.
But 9 out of 10 times it is giving me <code>SERVICE_NOT_AVAILABLE</code> error. Only once it registers a device.</p>
<pre><code>07-01 14:... | 1 | 2,159 |
Invalid use of non-static data member | <p>I want to create a file in which I can add Persons to a PersonList including a counter that makes sure that the capacity of the PersonList is not exceeded. I commented all the functions to make clear what task(s) they should perform.</p>
<p>During compilation I get the following error:</p>
<pre><code>invalid use o... | 1 | 1,498 |
Adding Auto Layout constraints programmatically to a subview of constant width and height | <p>I have a UIView of size 20x40 which has been added as a subview of a ViewController. The smaller UIView is draggable across the screen and depending on the position it has been dragged to, the UIView will reset the 'X' coordinate to stick to the screen edge.</p>
<p>However, I want to use/learn 'Auto Layout' to add ... | 1 | 1,204 |
Why the Laravel validation is not working? | <p>I have the form below for a user register in a conference. The form can have custom questions, in this case, it has the custom question "Phone" and is a required question so I want to validate that in Laravel. The name and surname fields should also be required.</p>
<p>But the validation it´s not working properly, ... | 1 | 3,297 |
Delete selected row from TableView, and the effective use of SceneBuilder in JavaFX | <p>I'm trying to make an application that creates a table from text in a file and then the user can add or delete words. The text file is used else where in my app to populate dropdown boxes so the user can only choose the text in the dropdown boxes.</p>
<p>My problem is I can't delete from the table only add to it an... | 1 | 2,911 |
This is how I installed JRuby on Windows -> Why did it not work? | <pre><code>* Download JRuby 1.20. (zip file)
* Extract the zip into C:\JRuby120
* Edit sytem "environment variables":
* Add JRUBY_HOME -> point it to C:\JRuby120
* Modify the PATH environment variable to point to C:\JRuby120\bin;
</code></pre>
<p>After all this, I open up cmd.exe and type <strong>jruby</strong></p... | 1 | 2,401 |
Unzip Error java.io.EOFException with java unzip code | <p>i am getting this error when i try to unzip a large zip file of about 56MB it works fine for smaller zip files. still new to java so take it easy on me please</p>
<pre><code>java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterI... | 1 | 1,124 |
Camera is null when the surfaceCreated method is executed for second time | <p>I have a problem with the camera object when the surfaceCreated method of a SurfaceHolder.Callback is called for second time, I mean:</p>
<p>I create an object camera in my onResume method from my activity, and this works fine showing the preview display, but when my activity goes to pause the surfaceview is destro... | 1 | 1,198 |
Access controller scope from directive of nested directive | <p>please see my <a href="http://jsfiddle.net/DavidSlavik/N7aKa/12/" rel="noreferrer">fiddle</a> and help me find a way to access function myAlert from nested directive "choice". A found some solutions where was shared some properties of scope like this: <a href="http://jsfiddle.net/zbD95/6/" rel="noreferrer">http://js... | 1 | 1,071 |
Constant BadRequest when posting JSON to endpoint using HttpClient | <p>I am struggeling to consume an API endpoint (<a href="http://ogre.adc4gis.com/convertJson" rel="nofollow noreferrer">http://ogre.adc4gis.com/convertJson</a>) that takes JSON data and returns a zip file. Visiting <a href="http://ogre.adc4gis.com" rel="nofollow noreferrer">http://ogre.adc4gis.com</a> shows the paramet... | 1 | 1,750 |
getting warning "assignment makes integer from pointer without a cast" | <p>I get this warning on line 59:</p>
<blockquote>
<p>assignment makes integer from pointer without a cast.</p>
</blockquote>
<p>How can I fix it? Here is the whole file (copied from <a href="http://pastebin.com/BrmjBAS0" rel="nofollow">http://pastebin.com/BrmjBAS0</a>):</p>
<pre><code>/* bkerndev - Bran's Kernel ... | 1 | 1,034 |
Expected a string but was BEGIN_OBJECT error | <p>I have the following JSON, code and model:</p>
<h3>This is the wire format of the JSON</h3>
<pre><code>{
"success": "false",
"http": "ok",
"status_code": "200",
"invoice_detail": {
"notifications": [
{
"quantity": "414",
"price": "5412",
"total_price": "15748",
"na... | 1 | 1,364 |
Getting 'SurefireExecutionException' while running TestNG project via maven test | <p>I have a main class that I want to run via maven, this main class dynamically creates testng.xml file and that's how the testing starts. But when I run my project via 'Run as->maven test' I get 'SurefireExecutionException' . Below is the pom.xml:</p>
<pre><code><build>
<pluginManagement>
<p... | 1 | 4,240 |
JNDI lookup in a servlet's init parameter a good idea? | <p>I am currently building a Java EE web application and found <a href="http://www.javaworld.com/javaworld/jw-06-2004/jw-0628-performance.html?page=1" rel="nofollow">this</a> article that has given me some great pointers on how to build a better application. The first tip is "<strong>Use the HttpServlet init() method f... | 1 | 1,307 |
Serverless Offline: Error while running handler, cannot find module | <p>I've been trying to use <code>serverless-offline</code> / <code>serverless-offline-python</code> and a family of other node packages (<code>serverless-s3-local</code> for example) to build an offline testing environment for some lambdas that I've written.</p>
<p>Using <code>serverless-offline-python</code>, I am ab... | 1 | 2,195 |
Complex Mule XPath Expression throwing exception | <p>I am trying to run below XPath expressions in Mule. Its giving me errors one after another.
Can someone help me correcting these Mule XPath expressions :</p>
<pre><code> <xm:namespace-manager includeConfigNamespaces="true">
<xm:namespace prefix="acord" uri="ACORD.org/Standards/Life/2" />
<... | 1 | 1,763 |
Using apache-airflow-providers-snowflake on airflow (no module named Snowflake) | <p>I have installed package <code>apache-airflow-providers-snowflake</code> on airflow on docker and i am getting error</p>
<blockquote>
<p>No module named Snowflake
Please refer attachment (check the error mentioned for the snowflake hook file)
<a href="https://i.stack.imgur.com/zSxgW.png" rel="nofollow noreferrer"><i... | 1 | 3,371 |
fullCalendar UNIX timestamp conversion issues with selection event | <p>I'm using jQuery widgets DatePicker and Dialog to interact with fullCallendar by Adam Shaw <a href="http://arshaw.com/fullcalendar" rel="nofollow">http://arshaw.com/fullcalendar</a>. I have a lot of things working. I can use the DatePicker to jump to a specific date in fullcalendar. When I make a selection to book a... | 1 | 3,136 |
Symfony 2 - Multiple entities with one form | <p>I've got the following tables with relationships:</p>
<ul>
<li><code>UserAddress</code> table (Holds basic information for the address)</li>
<li><code>UserAddressFields</code> table (Holds the value for each field associated to an address)</li>
<li><code>UserAddressFieldsTranslation</code> table (Holds the field id... | 1 | 2,705 |
Undefined index "order", mapping error? | <p>I have a <code>ManyToMany</code> relationship defined as follow:</p>
<p><code>OrderHasMedia.php</code> </p>
<pre><code>/**
* @ORM\Entity
* @ORM\Table(name="order_has_media__media")
*/
class OrderHasMedia {
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="PL\OrderBundle\Entity\Order", inversedBy="orde... | 1 | 1,379 |
color:transparent on text in ie (highlight text in textarea using overlay technique)? | <p>I'm trying to replicate the functionality of facebook's status update where tags within the post are highlighted. E.g, you hit the '@' character, and autocomplete to a page you are a fan of, and then that tagged piece of the text is highlighted even as you continue to type.</p>
<p>After digging into the dom, it lo... | 1 | 1,135 |
smslib not sending sms why? | <p>I am trying to send a sms with smslib but It did not send the message, can somebody guide me on this?</p>
<p>this is my code:</p>
<pre><code>import org.smslib.AGateway;
import org.smslib.IOutboundMessageNotification;
import org.smslib.Library;
import org.smslib.OutboundMessage;
import org.smslib.Service;
import or... | 1 | 1,719 |
SL4. Binding by ElementName is not working within DataTemplate | <p>There is an another headache with DataTemplate.</p>
<p><br><strong>Description:</strong>
Using Silverlight 4, Mvvm, etc. (standart set of developer tools for Silverlight LOB applications).
<br></p>
<p>List of entities is succesfully binded to <code>DataGrid</code>. One property (nullable bool BoolValue) is respons... | 1 | 1,071 |
batch/offline processing design book / documentation | <p>Is there a book or any documentation available that describes the best practice for designing batch (offline) processes for sharing data between two parties?</p>
<p>I have found some useful information on the spring batch site, but it is quite low level:
<a href="http://static.springsource.org/spring-batch/batch-pr... | 1 | 1,413 |
How to convert Blob data in MYSQL to Android ImageView | <p>Android 3.1 (API 12) - Strict, this is a commercial app and will not be on any other devices. </p>
<p>I (n00b) am trying to retrieve an array of images stored as Blobs in Mysql on our servers and add them to <code>ImageView</code>'s in Android. </p>
<p>First, server-side: I am not sure whether to <code>base64_enc... | 1 | 3,935 |
Phonegap webintent | <p>I have to send email using webintent in phonegap for android.I am getting error in the following code.I dont understand how to call the function in script in the index.html file.I am getting json exception.Can anybdy help me to solve this??</p>
<p>WebIntent.java</p>
<pre><code> public class WebIntent extends Plug... | 1 | 5,548 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.