title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Error parsing JSON Array, DOCTYPE | <p>ive got a working listview which receives JSON from my DB. But when i try with this link: I get "Error parsing data org.json.JSONException: Value
<p>The JSON output is clean and should work! My activitiy</p>
<pre><code>package com.spxc.ssa.streaming;
import java.util.ArrayList;
import java.util.HashMap;
import... | 1 | 5,044 |
touchesBegan method not called when i tap on UIImageView from multiple UIImageView display same as gallery in mobile | <p>I want to touch on UIImageView and that image display in another view in full size using navigate the view. same as gallery in mobile.
just creating demo programmatically. because I'm new in iphone developing.</p>
<p>Here is my code. </p>
<pre><code>- (void)viewDidLoad
{
NSLog(@"Enter in viewDidLoad method")... | 1 | 1,049 |
Symfony 4, find() an entity | <p>Thanks to the symfony doc <a href="https://symfony.com/doc/current/doctrine.html#updating-an-object" rel="nofollow noreferrer">https://symfony.com/doc/current/doctrine.html#updating-an-object</a>, i am able to use get/set methods from my entity called 'Produit'.</p>
<p>But when i call the method setProduit() (from... | 1 | 1,164 |
Using SWIG wrapped functions from Windows .dll | <p>I'm having a problem using functions from a <code>.dll</code> shared library that is exported with SWIG interface.</p>
<blockquote>
<p>Version Info</p>
<p>Python: 2.6.4</p>
<p>Swig: 2.0.4</p>
</blockquote>
<p>The big picture is: I have some code developed under Linux using C++ and wrapped using SWIG. I compiled the ... | 1 | 3,776 |
AngularJS debugging techniques | <p>the story:</p>
<p>i solved a problem about angularjs searching on google and i found the solution.<br>
the problem has started from a specific version of angularjs, when the angular team has removed a module from the core of the library and now you have to explicitly indicate if you use it.<br>
the module i'm speak... | 1 | 4,174 |
Unable to attach or mount volumes in Kubernetes | <p>Since I updated my Digital Ocean cluster to Kubernetes 1.21, I have multiple errors mounting nfs volumes on deployments and statefulsets like this one :</p>
<pre><code>Unable to attach or mount volumes: unmounted volumes=[storage], unattached volumes=[storage kube-api-access-p2rxg config]: timed out waiting for the ... | 1 | 4,785 |
R ggplot2: geom_text error (object not found)... aes() clashing? | <p>I just want to add Kruskal-Wallis test results that I compute outside the plot, at the top of some boxplots. I know I could calculate <code>kruskal.test</code> in the same <code>geom_text</code> line, but in this case I'd rather keep it outside since I already have it.</p>
<p>Please check the following MWE:</p>
<p... | 1 | 1,319 |
AttributeError: module 'scipy.interpolate' has no attribute 'spline' | <p>I'm using Python 3.6 and trying to run the following code which is from <a href="https://stackoverflow.com/questions/14344099/smooth-spline-representation-of-an-arbitrary-contour-flength-x-y/18091373#18091373">here</a>:</p>
<pre><code>from __future__ import division
import numpy as np
import matplotlib.pyplot as pl... | 1 | 1,422 |
Deleting events from Calendar not being deleted | <p>I am trying to make my App add reminders to the user's Calendar. The code searches for the <code>title</code> and <code>start date</code> to check if the event already exists in the Calendar before adding it (so as not to have duplicates). My problem is that: if I remove the event from the Calendar manually (using t... | 1 | 1,267 |
What is the difference between a nhibernate query cache and entity cache when using second level caching? | <p>I am trying to setup nhibernate second level caching <a href="http://www.gitshah.com/2012/03/nhibernate-and-caching-part-2.html" rel="noreferrer">and i see in this article,</a> and i am trying to understand the difference between query caching and entity caching. It says you need to add</p>
<pre><code> Cache.Re... | 1 | 1,070 |
How to run multiple kafka consumers on the same box independent of each other? | <p>I have two Kafka consumer <code>ConsumerA</code> and <code>ConsumerB</code>. I want to run these two kafka consumers independent of each other on the same machine. There is no relation between them at all. These two kafka consumer will work on different topics on the same machine.</p>
<ul>
<li>Each consumer should ... | 1 | 2,377 |
How to use loopj-async-http android library on Intentservice? | <p>I am trying to create connections using the SyncClient provided with </p>
<p><a href="https://github.com/loopj/android-async-http" rel="nofollow">https://github.com/loopj/android-async-http</a></p>
<p>I am not able to connect to my Webservice, it shows me the following logs</p>
<pre><code>12-05 19:54:45.397: W/Sy... | 1 | 1,215 |
Property 'http' does not exist on type 'MyproviderProvider' | <p>I know this question has been asked on this platform but I couldn't pin point a solution to my problem. I am creating a login page for an app which gets user's login details from mysql database using http. On my <strong>MyproviderProvider</strong> I am getting <strong>Property 'http' does not exist on type 'Myprovid... | 1 | 1,924 |
How to send email for failed jobs in shell scripts | <p>I have a shell script. To this script I am passing arguments from a file. This file contains tables names</p>
<p>The script is working fine. I am able execute the command for all the tables in the file.</p>
<p><code>shell script</code></p>
<pre><code>#!/bin/bash
[ $# -ne 1 ] && { echo "Usage : $0 input f... | 1 | 1,160 |
ORA-01652 - unable to extend temp segment by 4096 in tablespace (oracle 10) | <p>Problem:</p>
<p>I'm new to Oracle, and I think I'm missing some basic knowledge that is causing my temp tablespace to fill up.</p>
<p>I'm opening a connection to my database and running a pl/sql procedure multiple times to insert rows. Each time I run the procedure, the number of free blocks decreases in my TEMP t... | 1 | 1,304 |
Prevent reading data from an empty FIFO from blocking | <p>Within a Python 3 web application, I need to shell out to a command line utility that processes an image, writes its output to a named pipe (fifo), and then parse that output (the content of the pipe) into a PIL/Pillow Image. Here's the basic flow (and working code so long and there are no errors!):</p>
<pre class=... | 1 | 1,105 |
Access the whole video memory through OpenGL programming | <p>How to access the video memory of graphics card through OpenGL programming, specifically, to get all contents of video memory?</p>
<p>I have tried the following two methods, but failed. With attaching them down, I hope you could point out the error in my program or in my understanding of the structure of video memo... | 1 | 1,524 |
yum install failed i686 x86_64 | <p>my version is 6.10 oracle linux</p>
<p>it is trying to istall both x86_64 and i686 packages
i am trying to install glibc package manually as it fails during my puppet run with exact same error as below:</p>
<pre><code>yum install glibc-2.12-1.192.el6.i686
Loaded plugins: pulp-profile-update, security, ulninfo
Sett... | 1 | 1,454 |
Rails 4 - undefined method 'attributes' for nil:NilClass | <p>I have a many-to-many relationship between Users and Documents. Users can invite other users to collaborate on their documents by entering their email. The application will look up a user by email and set the user_id in DocumentUser. If a user is not found, I am getting this error: Rails 4 - undefined method 'attrib... | 1 | 1,339 |
Jedis connections not being released | <p>I am having issues using Redis with a Jedis connection pool. </p>
<p>The behaviour I am seeing is that after connections are established they are not being released back into the connection pool.</p>
<p>I know this because using the <code>redis-cli client list</code> command I can see the connections still hanging... | 1 | 1,225 |
C# Dragdrop event of Richtextbox is not firing | <p>I am building a simple form with only a panel with two rich text boxes, and the only functionality is to allow the user to drag and drop text between the two rich text boxes.</p>
<p>Here is the code:</p>
<pre><code>using System;
using System.Windows.Forms;
namespace Exmaple
{
class PanelForm : Form
{
... | 1 | 1,323 |
PHP - FPDI - Rotate Image | <p>I am using FPDI to import a PDF over the top of an image. I have everything working, but now I want to rotate the image. Here is my code:</p>
<pre><code> require('fpdf.php');
require('fpdi.php');
class PDF_Rotate extends FPDI {
var $angle = 0;
function Rotate($angle, $x = -1, $y = -1) {
... | 1 | 1,227 |
Grunt build - Running "concurrent:dist" (concurrent) task Killed | <p>For some reason, when doing a <code>grunt build</code> on my VM, it simply dies off in this way:</p>
<pre><code>...
Running "concurrent:dist" (concurrent) task
Killed
</code></pre>
<p>I am not sure what is happening. Seems to be able to build on my local computer, not sure why it doesn't work on my VM. </p>
<p>An... | 1 | 4,624 |
Hibernate is looking for not existing DTYPE column in table | <p>For some reason Hibernate is looking for not existing <strong>DTYPE</strong> column in table. I wonder why? In my previous project everything is ok. But here i added class Freelancer in hierarchy and seems somehow it causes problem</p>
<pre><code>Hibernate:
select
user0_.id as id2_6_0_,
user0_.... | 1 | 1,169 |
Echo in the same page after using contact form | <p>I am working on my website right now and I have encountered a little problem, I am not that great at PHP but managed to put together a contact form that works fine, the code will be below, the thing is that after submitting, I want it to echo on the same page as the button, like underneath it or something like that ... | 1 | 1,769 |
CSS to target Windows Phone 7 | <p>I'm trying to add a .css file that targets Windows Mobile, and as <code>media="handheld"</code> does nothing for this device I've followed instructions from <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/03/22/targeting-mobile-optimized-css-at-windows-phone-7.aspx">an official Windows Phone s... | 1 | 1,077 |
MapView cannot be resolved or is not a field | <p>Hi I am new to Android programming and working on Eclipse. I am having an error "MapView cannot be resolved or is not a field" in the following program:</p>
<pre><code> import java.util.List;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import... | 1 | 1,097 |
Is maxpooling on odd number possible? | <p>I am going through the Udacity DeepLearning Nanodegree and working on the autoencoder mini project. I do not understand the solution, nor how to check it myself. So this is 2 questions. </p>
<p>We start with 28*28 images. These are fed through 3 convolutional layers, each with padding of 1, and each with a maxp... | 1 | 1,616 |
mysql replication with multiple slave instances on a host, relay bin keeps changing | <p>I have 2 slave mysql instances running on a host, which replicates data from a master on a different host. All instances are mysql 5.6. The relay bin log for the slave instances keep on changing even though there is no change from the master.
The following is the <code>show slave status\G</code> for slave1:</p>
<... | 1 | 1,189 |
How can I kill a custom dialog - before it's been created? | <p>Clearly I have a case of what I like to call "chicken or the egg" syndrome. I am trying to find a way to kill an alert dialog which isn't created until the end of the process.</p>
<p>What I am trying to do: When asked "Do you want to RE-DOWNLOAD this gallery?", I want to KILL the underlying pop-up (alert/builder) ... | 1 | 1,953 |
Retrieving data from Html.DropDownList() in controller (ASP MVC) | string returned? | <p>I have the following problem: </p>
<p>I have a form in site/banen (currently local running webserver) which is using a SQL database. The link is made using ADO.net and is instantiated in the controller in the following way:</p>
<pre><code>DBModelEntities _entities;
_entities = new DBModelEntities(); // this part i... | 1 | 1,687 |
Object array rendered as empty array in Swagger UI | <p>I have the following model definitions in an OpenAPI/Swagger spec:</p>
<pre><code>"definitions": {
"models.Equipment": {
"title": "Equipment",
"type": "object",
"properties": {
"Features": {
"type": "array",
"items": {
"$ref... | 1 | 1,108 |
Dynamic OnClick Button Event | <p>I have a table that is created dynamically, and I want to put an EDIT / DELETE buttons with onclick events in each row.</p>
<p>However, I don't know how to make them unique with the row's id and then make an onclick event for each so I can update/delete the values from the row.</p>
<p>I tried:</p>
<pre><code><... | 1 | 1,643 |
ExtJs doesn't load data to a form | <p>this is my model</p>
<pre><code>Ext.define('Contact', {
extend : 'Ext.data.Model',
fields : [ {
name : 'first',
mapping : 'name.first'
}, {
name : 'last',
mapping : 'name.last'
}, 'company', 'email', {
name : 'dob',
type : 'date',
dateFormat : 'm/d/Y'
} ]
</code></pre>
<p>});</p>
<p>an... | 1 | 1,506 |
Send and Receive IQ XMPP ASMACK Android | <p><strong>Background:</strong></p>
<p>I have been able to implement one to one chatting through <code>XMPP</code> in android using <code>asmack</code> library. I am able to send presence to the server as well. I am using <code>OpenFire</code> server for my Chat based application. </p>
<p><strong>Problem:</strong>
I ... | 1 | 1,387 |
MySQL Error: Lock wait timeout exceeded; try restarting transaction Query | <p>I found many people got the same error message from MySQL with the same error state=41000 amd same error code=1205.</p>
<p>However most of them involved 2 transactions and a deadlock.</p>
<p>Based on <code>SHOW ENGINE INNODB STATUS</code> output, there is only 1 transaction:</p>
<pre>
============================... | 1 | 1,710 |
pyspark: ImportError: No module named numpy | <p>I am using pyspark, and got the result rdd from the following code:</p>
<pre><code>import numpy
model = PrefixSpan.train(input_rdd,minSupport=0.1)
result = model.freqSequences().filter(lambda x: (x.freq >= 50)).filter(lambda x: (len(x.sequence) >=2) ).cache()
</code></pre>
<p>The <code>input_rdd</code> looks... | 1 | 2,492 |
Scan error: sql: Scan error on column index 11: destination not a pointer | <p>I understand what the issue is, I am not providing a pointer address when I am trying to scan the fields from my database call - however in this situation I am not quite sure how to work around it.</p>
<p>I have a struct that looks like this:</p>
<pre><code>type ItemsRequest struct {
Sku string `json:"sku... | 1 | 2,547 |
Rank column in Power BI that change dynamically | <p>Trying to create Organization Chart using <strong>custom visuals</strong> in Power BI Desktop, the requirement is to show chart with filtered data which applies by <strong>Slicer</strong> on department column. </p>
<p>I struck with the limitation of custom visual (which logical), to get proper chart in visual, data... | 1 | 1,757 |
Error parsing parameter '--parameters': Expected: '=', received: 'P' | <p>I am working with aws cli cloudformation. While using the JSON parameters file along with yml template, I keep getting the error. I tried using create stack update stack as well as the change set.</p>
<pre><code>Error parsing parameter '--parameters': Expected: '=', received: 'P' for input:
- ParameterKey: Functio... | 1 | 1,139 |
Socket not registering when the other end is closed | <p>I'm working on a client/server application where the connections from the client to the server stay open until the client application is closed.</p>
<p>If the server application goes down unexpectedly, while the client is reading data, I want the client to treat this as an exception, but then to catch the exception... | 1 | 1,912 |
Correct Way To Run Test Set Up with Nunit TestCaseSource | <p>I am trying to run multiple tests using TestCaseSource in NUnit. But I am struggling to get the [SetUp] to run when I want it.</p>
<p>At the moment it works how I want it to but it doesnt feel "right". So the following is the main test case code (simplified):</p>
<pre><code>public class ImportTestCases
{
Impo... | 1 | 1,075 |
Can't connect to my server when I put in my IP in Java | <p>Okay so I'm trying to learn Java client/server stuff, and am going through the tutorial code as follows. When I change "localhost" to my ip it stops working though. Please help.</p>
<p>Edit: "127.0.0.1" seems to work too, but not my real IP.</p>
<pre><code>/*
* Copyright (c) 1995 - 2008 Sun Microsystems, Inc. Al... | 1 | 2,480 |
jqxwidgets dropdownlist change event (and at the same time row update function) works multiple times then grid is locked | <p>I'm trying to bind dropdownlist(inside jqxgrid cell) to database, but change event for dropdownlist (and at the same time row update function) works multiple times then grid is locked. Dropdownlist is bound to column having datafield "UrunAdi". And, it is an asp .net mvc3 project. Any advice?</p>
<p>Code is:</p>
<... | 1 | 1,570 |
Multiple element/attribute sorting in XSL | <p>I am trying to sort several levels of data using a XSL document. I got it to work but it is using a bunch of recursion. I am trying to avoid this because I figured using multiple sorts withing a single node shold have worked. Is there a way to change the XSL below to be less recursive? I am sorting on USER/USERID... | 1 | 2,181 |
mongodb atlas connection issues with ssl | <p>I've created a cluster using mongodb atlas. But, I couldn't connect to that using local mongo shell.</p>
<p>When I use the below connection string, it says --ssl unrecognized.</p>
<pre><code>Harshavardhans-MacBook-Pro:bin harshavmb$ mongo "mongodb://m123-rs1-shard-00-00-wn1jr.mongodb.net:27017,m123-rs1-shard-00-01... | 1 | 2,532 |
WPF: Binding an integer to a TextBlock with TemplateBinding | <p>I have a custom control in WPF. In this I have a <code>DependencyProperty</code> of the type <code>int</code>. In the template for the custom control I have a <code>TextBlock</code>, I and would like to show the value of the integer in the <code>TextBlock</code>. But I can't get it to work.</p>
<p>I'm using <code>T... | 1 | 1,044 |
ZoneAwarePromise has been overridden | <p>After upgrading an application to rc-7 and running my unit tests to be sure nothing broke, I got this error message on about half of my unit tests.</p>
<p>"Error: Zone.js has detected that ZoneAwarePromise '(window|global).Promise' has been overwritten.
Most likely cause is that a Promise polyfill has been loaded a... | 1 | 1,599 |
How to map values from a database to a view model in MVC 4 | <p>I am having trouble with what should be a very simple task. I'm trying to map values retrieved from a database to a view model. I then want to pass that as the model to my view.</p>
<p>The view model is called EditAdminModelVM and it contains a smaller subset of properties from a larger class called UserProfile. I ... | 1 | 2,087 |
Loading SVGs with Webpack in react (@svgr/webpack) | <p><strong>Webpack config:</strong></p>
<p>1-For <code>.svg</code> i use config:<code>{ test: /\.svg$/, use: ['@svgr/webpack'] }</code></p>
<p>2-for <code>.scss</code> is use config:</p>
<pre class="lang-js prettyprint-override"><code> {
test: /\.(sc|sa)ss$/,
exclude: /\.module\.(scss|sa... | 1 | 1,652 |
Android: constraintLayout not working inside CardView | <p>I am trying a layout which has following general layout hierarchy
ConstraintLayout>CardView>ConstraintLayout>Button.</p>
<p>The 2nd constraintLayout must stick to Bottom Right of cardView.</p>
<p>Expected Result:
<a href="https://i.stack.imgur.com/Mf0lA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Mf0... | 1 | 1,405 |
ipython notebook installation on mac os x | <p>I am wondering if anyone has installed ipython notebook on mac OSX? </p>
<p>Currently I am able to run it in the <strong>terminal note</strong> but as soon as I type in the notebook version, there are problems encountered in running it.</p>
<p>Below is the error I have gotten:</p>
<blockquote>
<p>Traceback (mos... | 1 | 2,166 |
Windows: Apache Spark History Server Config | <p>I wanted to use Spark's History Server to make use of the logging mechanisms of my Web UI, but I find some difficulty in running this code on my Windows machine. </p>
<p>I have done the following:</p>
<p>Set my spark-defaults.conf file to reflect </p>
<pre><code>spark.eventLog.enabled=true
spark.eventLog.dir=file... | 1 | 1,304 |
HTML/CSS a <div> won't go below another one | <p>I have this page where all the div's seem to work and then all of the sudden my last one breaks. I have two divs in my CSS, one being centeredRight and one centeredLeft. They are lined up down the page. But my last div on the left seems to get pushed to the right.</p>
<p>Here is my CSS.</p>
<pre><code>.centeredlis... | 1 | 2,978 |
Android Manifest File Not Picking Up Default Launch Activity | <p>If on run/debug configuration, if I specify a launch activity, then my app runs fine, but when I select 'Launch Default Activity' I get "No Launcher activity found!" error from android adb despite the fact that I have specified the launch activity in my manifest file. I'm using android 2.1. </p>
<p>I've tried refre... | 1 | 2,601 |
Swiper Custom Pagination With Scrollbar | <p>I am trying to create a custom pagination scrollbar using <a href="http://idangero.us/swiper/demos/" rel="nofollow noreferrer">Swiper 4.0.6</a>. </p>
<p>I would like something similar to the scroller halfway down <a href="http://moransh4.github.io/Luca/" rel="nofollow noreferrer">this page</a>. See the titles above... | 1 | 1,182 |
Run a python script on schedule on Google App Engine | <p>I'm looking for a good samaritan that can provide with a very basic skeleton to run a python script using Google App Engine. I have read the documentation, check on related SO questions but I'm lost with the WebApp format. All I want to do is run one python script which accepts arguments or several python scripts, 6... | 1 | 1,383 |
Docker container running vue-cli Welcome Page on localhost: This site can’t be reached | <h2>Question</h2>
<p>I would like to see the vue-cli welcome page in chrome, running from a Docker Container on my Mac. I am struggling to set up the proper configuration for this to work. What am I missing? Here is what I have tried.</p>
<h2>Steps</h2>
<p><em>Installed</em></p>
<ol>
<li>Docker for Mac - 17.12.0-ce... | 1 | 1,992 |
Fresh kotlin android project configuring error | <p>Updated Android Studio to 3.1, and created fresh Kotlin project and added fresh Kotlin module to the main app. Now trying to build the project it fails at Configure build with "A problem occurred configuring project ':app'."</p>
<p>And the error under build tree is somewhat generic:</p>
<pre><code>org.gradle.api.P... | 1 | 5,107 |
JSON Error when calling phonegap plugin. | <p>I used a screenshot plugin for ios when I developed an iphone/ipad app. I am now creating an android version of the app and am trying to implement the android version of the plugin. </p>
<p>My java part fo the plugin looks like this:</p>
<pre><code>package org.apache.cordova;
import java.io.File;
import java.io.F... | 1 | 1,381 |
ObservableCollection<T> not updating the UI | <p>So I have an observable collection that I am updating and I can see the values have changed but the UI is not changing. Here is what I have</p>
<pre><code>public static class GeoLocations
{
public static ObservableCollection<Station> _locations = new ObservableCollection<Station>();
public sta... | 1 | 1,392 |
Sending images over http to browser in C | <p>A am new to C and I am trying to implement a web server in C. I can successfully send .txt and .html files to the browser. However, I can't send any images, although I have correct content-type header which recognises that the image is .jpg.
Here is the function I use to find the content-type:</p>
<pre><code>char ... | 1 | 1,759 |
RecyclerView with multiple view types and paging library with boundary callback | <p>I have a project in which I want to show multiple Items ( Image, Text, Video etc.) to the user. I am aware of how multiple view types work for the RecyclerView.
In my project, I have included most of the recommended <code>Android Architecture Components</code>
like <code>Room</code>, <code>Paging</code>, <code>LiveD... | 1 | 2,743 |
Hamburger-menu in jQuery | <p>I just started using jQuery, and tried to make a hamburger menu. Is it possible to only have the menu as a little square in the top right corner, and a logo in the top left?</p>
<p>Right now the black bar from the menu is filled out like a nav bar.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-... | 1 | 1,528 |
AssociationTypeMismatch Error on Ruby on Rails app | <p>I am having problems with my ruby on rails app. I have two models - 'patient' and 'address', a patient has one address, and an address belongs to a patient.</p>
<p>Patient.rb</p>
<pre><code>class Patient < ActiveRecord::Base
has_many :charge_slips
has_one :address
validates_presence_of :last_name
valid... | 1 | 1,873 |
Bootstrap 4 tabs not wrapping | <p><strong>Problem happens in alpha 6 but not alpha 5</strong></p>
<p>In bootstrap 3 tabs would wrap onto the next line so they could be used on smaller screen sizes.</p>
<p>In Bootstrap 4 they don't wrap and poke off the side of the screen. This is example from the Bootstrap 4 documentation.</p>
<p>How do i make i... | 1 | 1,228 |
Need Help ! (Minecraft Hack Client ESP) | <p>I need help by programming my Hack ESP for my minecraft hack client !
I saw this code in a Youtube tutorial but it wont work for me!</p>
<p>Code: </p>
<pre><code>package net.YouNeedHimAndYouHeNeedsYou.hacks;
import org.lwjgl.input.Keyboard;
import net.YouNeedHimAndYouHeNeedsYou.client.Category;
import net.YouNeed... | 1 | 1,654 |
Change Button color to green when checkbox is checked | <p>I want to change the color of button <strong>select menu</strong> when i click(check) on the checkbox.</p>
<p><strong>Button to select menu:</strong></p>
<pre><code><button id="bttn" onclick="loadMenu()" data-toggle="modal" href="#myModalMenu"
class="btn btn-circle red-intense">Select Menu</button>... | 1 | 1,131 |
JSF 2: Navigate to external URL from a backing bean | <p>This is kind of an extension to the question
<a href="https://stackoverflow.com/questions/3297579/navigate-to-external-url-from-a-backing-bean/8609444#8609444">Navigate to external URL from a backing bean?</a></p>
<p>I need to invalidate the session in the backing bean method and then forward to an external URL. T... | 1 | 2,005 |
.Net Web API 2, OWIN, and OAuth: Scopes and roles. What are the differences? | <p>I would like to create a clearer picture in my mind as to what the differences are between roles and scopes in .NET Web API projects. This is more of a best-approach question than anything else, and I am finding myself to be a little confused as to how best authorize users that want to access my API. I come from a .... | 1 | 1,862 |
Spring Data jpa (hibernate) nullpointer Exception when adding List of Entities | <p>first my Code.</p>
<p><strong>Specialization</strong></p>
<pre><code>@Entity
public class Specialization {
@Id
private String name;
@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name="att_id", referencedColumnName="ID")
private List<Attribute> attributes;
//Getters and Setters
... | 1 | 1,127 |
Devise - Listing Users | <p>in my rails app I need to list the users by username, the error I get is</p>
<pre><code>NoMethodError in Posts#index
Showing C:/Users/Corey/Dev/statlog/app/views/posts/index.html.erb where line #12 raised:
undefined method `username' for #<Array:0x3893298>
Extracted source (around line #12):
9: <div cla... | 1 | 2,770 |
NullPointerException in hive query | <p>I have a hive table that is basically interactions on a website. I need to find the number of sessions where the last interaction has x, y and z of certain values. I get a NullPointerException and I'm not able to determine why.</p>
<p>(Note: Names have been changed to protect the innocent.)</p>
<pre><code>SELECT C... | 1 | 1,042 |
malloc.c:2379: sysmalloc: Assertion... failed | <p>Im currently writing a program that uses Heap class, to find the max value in part of array (size of part is k), which is moving in array, until reaches the end. It crushes on dataset:
3
1 2 3
1
with misstake: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned l... | 1 | 2,750 |
java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session; | <p>I am linking Struts2 and hibernate with help of struts2-fullhibernatecore-plugin.</p>
<p>Unfortunately I get this error . I found that the problem may be on my class-path with hibernate versions. </p>
<p>Here is my <code>pom.xml</code>. <strong>It is now edited and works perfectly</strong>:</p>
<pre><code> <... | 1 | 2,535 |
The request filtering module is configured to deny a request where the query string is too long | <p>the below code is added in web config i got the below error message(please check the below query string).</p>
<pre><code><!--<authorization>
<deny users="?" />
</authorization>-->
</code></pre>
<p>if i remove the above authorization code the page is launching.</p>
<p>Requested URL <... | 1 | 2,250 |
How do I create a (dockerized) Elasticsearch index using a python script running in a docker container? | <p>I'm trying to index a containerized Elasticsearch db using the Python client <a href="https://github.com/elastic/elasticsearch-py" rel="nofollow noreferrer">https://github.com/elastic/elasticsearch-py</a> called from a script (running in a container too).</p>
<p>By looking at existing pieces of code, it seems that <... | 1 | 1,090 |
Unresolved dependecies when changing from Grails 2.1.1 to Grails 2.4.4 | <p>I have imported a project in Eclipse (GGTS) based on Grails 2.1.1 and need to update it to version 2.4.4. I am using Windows 7 with a 32 bit-Eclipse version (Kepler).</p>
<p>When checking the dependencies, I am getting the following errors:</p>
<pre><code> Starting process on CARMBEL11628/10.113.134.246
Loading... | 1 | 1,455 |
Oracle ADF: LOV not working on create | <p>I have a ViewObject (VO1) with a ListOfValue that points to a ViewObject (VO2), and fetches records from VO2. There is no ViewCriteria added on VO2.
When testing in the BC tester, the LOV works fine. Both on editing a row in VO1, and when creating a row in VO1.</p>
<p>Using the LOV in a jspx page, the LOV works fin... | 1 | 1,199 |
Weird Nan loss for custom Keras loss | <p>
I'm trying to implement a custom loss in Keras but can't get it to work.</p>
<p>I have implemented it in numpy and with keras.backend:</p>
<pre class="lang-py prettyprint-override"><code>def log_rmse_np(y_true, y_pred):
d_i = np.log(y_pred) - np.log(y_true)
loss1 = (np.sum(np.square(d_i))/np.size(d_i))
... | 1 | 3,150 |
Android Chromecast sender app, cast button doesn't appear in action bar | <p>I went through this <a href="https://developers.google.com/cast/docs/android_sender" rel="nofollow noreferrer">https://developers.google.com/cast/docs/android_sender</a>
up to "Handling device selection" paragraph including.
I expect that cast button should appear in action bar, but it isn't. And I suppose that Chro... | 1 | 2,772 |
handlebars.js doesnt render document | <p>I ve got a problem with handlebars.js. perhaps it is totally trivial but i am also totally new in handlebars. So...here is sample code in my index.html which goes like this:</p>
<pre><code> <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
... | 1 | 1,831 |
How to fix the AttributeError: 'str' object has no attribute '_radius'? | <p>I have this python code which seem very straight forward but when I try to load it I get an error as above. you can view the full error message below too. Please what am I doing wrong? Thanks you.</p>
<pre><code>import math
class Circle2D(object):
def __init__(self, x = 0, y = 0, radius = 0):
self._x =... | 1 | 1,226 |
how to update data form file json using d3.js (zoomable circle pack) | <p>I'm working on a real-time visualization of incoming data stored in a json file. I use D3 for the visualization. This is the chart I use: <a href="http://mbostock.github.io/d3/talk/20111116/pack-hierarchy.html" rel="nofollow noreferrer">http://mbostock.github.io/d3/talk/20111116/pack-hierarchy.html</a> </p>
<p><img... | 1 | 4,302 |
Spinner onItemSelected doesn't work when i use setAdapter() | <p>I have 1 spinner named spinner1. visiblity set to invisible. then i use an image button to perform click to launch spinner.
When i give array data from strings.xml. it calls onItemSelected. (static array)
but when i user arrayadapter to setadapter of spinner. it doesnt fire onItemSelected event.</p>
<p>let me show... | 1 | 2,407 |
$httpBackend.flush() still needs timeout for defining objects | <p>I am unittesting my AngularJS app with Karma and stubbing the backend with $HttpBackend. Somehow, the flush() method does not seem to resolve all my requests as some of the variables in the controller still remain undefined. However, if I add a timeout before resolving my expectation it works fine!</p>
<p>My Contro... | 1 | 1,626 |
Click: Use another function in chained commands with context object | <p>I recently have been using the <a href="http://click.pocoo.org" rel="nofollow noreferrer">click package</a> to build command line interfaces which has worked perfectly, so far.</p>
<p>Now I got into some trouble when using chained commands in combination with the context object. The problem is that I somehow get an... | 1 | 1,077 |
Merge two dataframes on datetime index and column | <p>I have two dataframes created like this:</p>
<pre><code>date1 = pd.date_range('1/1/2011', periods=3, freq='8H')
date2 = pd.date_range('1/1/2011', periods=2, freq='12H')
df1 = pd.DataFrame({'cat1': ['1', '1', '2']}, index = date1)
df2 = pd.DataFrame({'cat1': ['1', '2'],
'cat2': ['111', '222']}, i... | 1 | 1,242 |
React js: How to open a local path via HTML button on webpage | <p>How do I open a local path on my computer, say <code>/home/mypath/Desktop/Projects/projectFolder1/</code> using an <code>HTML</code> button on my webpage?
I am trying to do this because I would like to dump a certain amount of <code>.pdf</code> documents inside the folder.</p>
<p>Below the code that I am using:</p... | 1 | 1,397 |
TeamCity, Maven Build not found child module | <p>I've Maven project with one subproject, when I run my install task on parent project from IDEA (IntelliJ IDEA) all works fine and <strong>maven</strong> resolve child module. </p>
<p>My projects are versioned on <strong>subversion</strong>, and this is the filesystem structure:</p>
<pre><code>project
|--pom.xml
|-... | 1 | 1,823 |
VBA ADODB Transactions | <p>Have an application developed in Access 2010 connected to MySQL Server via ODBC.</p>
<p>I have 2 tables </p>
<p><code>ContactDetails</code> with columns:</p>
<pre><code>ID, FirstName, LastName, TelNo, MobileNo, EmailAddress, PrimaryContact, TimeStamp
</code></pre>
<p>and <code>ReportingType</code> with columns:<... | 1 | 1,229 |
Field not injected in Android Dagger project | <p>I am playing with Dagger on Android. I created a model <code>UserPreference</code>, a module called <code>PreferenceModule</code> and another class <code>UserPreferenceTest</code> which is a test of the <code>PreferenceModule</code>. I have below 3 java files</p>
<p>UserPreference.java</p>
<pre><code>package com.s... | 1 | 1,204 |
Moving a photo uploaded with Dropzone.js and PHP | <p>I'm trying to use <a href="http://www.dropzonejs.com/" rel="nofollow noreferrer">dropzone.js</a> to add an easy drag-and-drop interface for a user to upload up to 10 photos to my server (currently WAMP). I'm using PHP 5.4 on the back end.</p>
<p>Following <a href="http://www.startutorial.com/articles/view/how-to-bui... | 1 | 1,051 |
Entity Framework 4 - One-To-Many Relationship with a view with CTP5 (code first) | <p>I'm attempting to map a 1-M relationship between two entities where the first one is normally mapped to a table and the second one is taken from a view.</p>
<p>The involved entities are:</p>
<pre><code>public class Institute
{
public int Id { get; set; }
public string Name { get; set; }
//...
publi... | 1 | 1,311 |
Test if save method is hit in unit test | <p>I'm starting with unit testing in the asp.net mvc 4 framework.</p>
<p>I got a repository with basic crud methods and a save method. When I create a unit test I create a test repository and test if e.g. a item to the collection is added. That all goes smoothly but I cannot test if the save method is hit. </p>
<p>I ... | 1 | 1,169 |
Form being randomly submitted as GET instead of POST | <p>This is kind of crazy.</p>
<p>Here's a form on our <a href="https://blog.stackoverflow.com/2011/05/stack-exchange-is-an-openid-provider/">OpenID provider</a>:</p>
<pre><code> <form method="post" action="/affiliate/form/login/submit?affId=7" autocomplete="off">
<table class... | 1 | 1,658 |
Why am I getting the exception "Consider using a DataContractResolver or add any types not known statically to the list of known types" | <p>I'm trying to serialise a object to Xml using the DataContractSerializer. I have the following classes;</p>
<pre><code>[ActiveRecord(Lazy = true)]
[KnownType(typeof(RoomType))]
[DataContract]
public class Room : ActiveRecordBase<Room>
{
[PrimaryKey]
[DataMember]
public virtual Int64 RoomId { get;... | 1 | 1,352 |
How to really decode a 7Bit email message using PHP? | <p>I have code that reads emails from a server and then parse them before inserting the data into a database. </p>
<p>I am using the <a href="http://php.net/manual/en/book.imap.php" rel="nofollow">IMAP extension</a> in PHP to help me with this.</p>
<p>Here is what I am doing to read the data</p>
<pre><code>//read ne... | 1 | 1,948 |
Saving animated GIFs using PIL (image saved does not animate) | <p>I have Apache2 + PIL + Django + X-sendfile. My problem is that when I save an animated GIF, it won't "animate" when I output through the browser.</p>
<p>Here is my code to display the image located outside the public accessible directory.</p>
<pre><code>def raw(request,uuid):
target = str(uuid).split('.')[:-1]... | 1 | 1,156 |
Dynamically add SVG circle in a SVG group? | <p>I am using SnapSVG library. I am trying to add a dynamically created SVG circle into a SVG group. A new circle is added every time I click a link (Add Composite). Then I try to push that newly created circle to an array and pass the array to the group (drag) function. I basically want to drag all the circles and rec... | 1 | 1,449 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.