title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to return custom message from custom AuthorizeAttribute? | <p>I am using ASP.NET Core 3.1 WebAPI with Auth0.</p>
<p>I wanted to implement a custom <code>AuthorizeAttribute</code> that would perform simple permission checks and return 403 with a message if permissions are missing.</p>
<p>Here is the code:</p>
<p><code>Startup.cs</code> (ConfigureServices)</p>
<pre><code>service... | 2 | 1,204 |
Can't set headers after they are sent in nodejs | <p>how to send file in nodejs, i am creating one page app, so i just want abcd.html page to be delivered on request for first time,
here is my code to that</p>
<p>app.js</p>
<pre><code>var express = require('express'),
app = express(),
http = require('http'),
path = require('path'),
fs = require('... | 2 | 1,869 |
dynamic carousel slider jquery .append | <p>i have to construct a dynamic carousel with jquery ajax and my boss suggest me to use .append() method.
This is my carousel html code:</p>
<pre><code><div id="myCarousel">
</div>
<div class="container-fluid" id="slider">
<div id="pb_2">
<di... | 2 | 2,106 |
Spannable string with image not working with push notification | <p>I am trying to use spannable string with image on push notification. It is not working. Actually I want to show emoticon on push notification like wattsapp. If I am using simple spannable string it is working. The same spannable string with image is working fine with textview. </p>
<p>For this I have also tried cus... | 2 | 2,725 |
Changing a select input to a checkbox acting as an on/off toggle switch in Rails | <p>I have a set of 7 dropdown inputs allowing admins to say whether they are open or closed for business on a given day. I'd like that changed to 7 open/closed switches (presumably styled checkboxes?) but can't figure out how to do this!</p>
<p>Here are the relevant bits of code I currently have (prior to any change):... | 2 | 1,334 |
images rgb jpg to dicom with dcm4che3 | <p>I used the solution proposed by medPhys-pl, <a href="https://stackoverflow.com/questions/21087778/how-to-write-jpg-image-to-dicom-file-using-dcm4che3/">solution jpg to dicom with dcm4che3</a>.</p>
<p>I try convert file jpg to file dicom. when jpg is monochrome my code is sucessful, however if the file jpg is RGB, t... | 2 | 1,713 |
Controlling thread order using semaphores in C | <p>I'm new to C and I'm just trying to run this piece of code of Pacheco's book "<em>An Introduction to Parallel Programming</em>". And I just can't figure out how I should implement the semaphores initialization in <code>main()</code>. Are <code>&semaphores[dest]</code> and <code>&semaphores[my_rank]</code> ar... | 2 | 3,405 |
Django authenticate() always return None for a custom model | <p>I'm new to django, and I have to make a back-end with it.
my issue: I have multiple models (clients,driver,company) all of them should login and authenticate (each one on a diffrent app, but they all extend the same user model), i have seen so many questions like this, but none of them solved my issue which is authe... | 2 | 1,432 |
ASP.NET MVC 3 - EF 4.2 code-first - master-detail editing | <p>I'm stumped with a problem in ASP.NET MVC 3 - handling editing and updating of a master-detail relationship from a single MVC view.</p>
<p>I'm using Entity Framework 4.2 code-first to build a small app. It uses a <code>Person</code> class (which has <code>Name</code>, <code>FirstName</code> and so on), and an <code... | 2 | 1,666 |
Tests for maven plugins are incompatible with maven 3.0.4 | <p>I have a simple test for maven plugin:</p>
<pre><code>public class SimpleMavenTest extends AbstractMojoTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
// code
}
public void testCase() throws Exception {
// test case
}
@Override
pro... | 2 | 1,120 |
Ingress rule using host | <p>Can someone please help to spot the issue with <code>ingress-2</code> ingress rule? why <code>ingress-1</code> is working vs <code>ingress-2</code> is not working.</p>
<p><strong>Description of my setup, I have two deployments:</strong></p>
<p>1st deployment is of <code>nginx</code><br />
2nd deployment is of <code>... | 2 | 2,716 |
ILMerge / ILRepack dlls fail to register with Dynamics 365 plugin registration tool | <p>I'm trying to create a plugin for D365. I have package dependencies including</p>
<ul>
<li>Azure.DigitalTwins.Core</li>
<li>Azure.Core</li>
<li>Azure.Identity</li>
</ul>
<p>These .dll dependencies must be merged into a single .dll to register a plugin. I'm using an <a href="https://github.com/dotnet/ILMerge#to-run... | 2 | 6,447 |
Throwing WCF Fault Exception from RealProxy of Service Contract | <p>I have a C# application with a WCF backend and a UWP frontend. I have a service implementing my service contract. Everything works as expected if I catch exceptions on the services and re-throw them as Fault Exceptions. </p>
<p>Now I'm trying to clean up my service code by wrapping the service call using an instanc... | 2 | 2,034 |
The prefix "wsdl" for attribute wsdl:arrayType associated with an element type attribute is not bound | <p>I am new to soap and I was asked to implement a soap connection with the optained wsdl file. While following this <a href="https://wiki.eclipse.org/Creating_a_Top-Down_Java_Web_Service_Skeleton_from_a_WSDL_Document" rel="nofollow noreferrer">guide</a>, I ran into the following error:</p>
<blockquote>
<p>The prefi... | 2 | 1,223 |
Core audio high CPU usage when no sound playing | <p>I am just starting to learn Core Audio and made a simple test application the plays three different piano notes. It seems pretty good except for one small thing.</p>
<p>At first, the app uses about 7% or so of the CPU (visible in activity monitor), which I assume is normal because it is running a live <code>AUGraph... | 2 | 1,134 |
JAXB2 Maven Plugin cannot generate annotations or inject-code | <p>I currently have an ant task that does a great job of generating my domain objects from xsd and xjb binding files. It creates the annotations and injects code where I need it based upon a custom Plugin.</p>
<p>Now I'm trying to move all of this to Maven and while I can generate the objects I cannot get the code to ... | 2 | 2,199 |
Saving the contents of the ListView after drag and drop | <p>Initially I am having a simple ListView Activity that consists of few formulae and also a Button at the top.Whenever I click that Button it takes me to another Activity,where in I am dragging and dropping the contents of the ListView.This Activity also consists a Button and whenever I click this Button the order of ... | 2 | 3,200 |
How can I pass a vector of values to geom_vline when working with facets? | <p>I have a data frame that has several columns, with each column corresponding to a different id. I have created a density plot for each column using the following code:</p>
<pre><code> ggplot(melt(df),aes(x=value)) + geom_density() +
facet_wrap_paginate(~variable, nrow = 3, ncol = 2, page = 1, scales =
"free")
... | 2 | 1,384 |
Is sp_who2 for the entire server and why is it not detecting all high priority processes? | <p>I'm looking at sp_who2 and it appears as though all processes are in a sleep mode and our website is extremely slow. I was wandering if sp_who2 looks at only the current database, or is it looking at another database can be causing the problem and sp_who2 only looks at the current database.</p>
<p>Also is there a... | 2 | 1,166 |
Laravel Redis - artisan cache:clear - Connection refused [unix:/path/.redis/redis.sock] | <p> I have configured Redis (using a socket) in the Laravel in my hosting server. Everything works fine (I have tested reading from cache, sessions etc.), I have one database for a cache and a second one for users sessions.<br>
However, when I run "php artisan cache:clear" it shows the error:<br>
"In Ab... | 2 | 1,206 |
How to send information to the backend in React.js? | <p>I am very new to backend programming and I am quite confused when trying to figure out how to send data onClick to be stored in the backend. Right now the backend is a super simple flask server but my partner may be changing it to mySQL.
my application is a very simple react flashcard app that takes 10 questions fro... | 2 | 4,845 |
Mojolicious gives 404 when getting JS and CSS | <p>I'm new to Mojolicious, and I've got various things working, but I've come up against a problem which I've recreated in the following minimal bit of code.</p>
<p>The problem is a simple one: I can't get it to load external CSS and JS files. What surprises me is that it gives 404 errors as though it's trying to ser... | 2 | 1,192 |
Android - Firebase add to views count? | <p>So I have a <code>RecyclerView</code> which I populate with the <code>FirebaseRecyclerAdapter</code>. I retrieve the required data using this code:</p>
<pre><code>FirebaseRecyclerAdapter<HashMap,MViewHolder> adapter1 = new FirebaseRecyclerAdapter<HashMap, MViewHolder>(HashMap.class,R.layout.list_item,MV... | 2 | 1,188 |
Kubernetes service not able to curl itself inside docker | <p><strong>Background</strong><br>
I am testing the Kubernetes setting on <code>Minikube</code>. I have two simple services successfully setup and they are backed by simple docker image. Below is an example of my service configuration. I use <code>NodePort</code> to expose the service on port 80. </p>
<pre><code># ser... | 2 | 1,070 |
BUILD with Ant FAILED for Android on a Linux machine but succeeded on a Mac machine | <p>I am trying to build android project using ant from a linux machine. The project builds with no issues on my Mac machine but on the linux machine. Cannot seem to figure out why! </p>
<p>I typed </p>
<pre><code>ant release
</code></pre>
<p>Then I received the following message:</p>
<pre><code> BUILD FAILED
/andro... | 2 | 1,220 |
Download an Excel file from web server folder | <p>I am using PHPExcel to get Oracle SQL query results to an .xlsx file. I wrote my PHP code in <code>node--18769.tpl.php</code> and <code>node--18769.tpl.xlsx</code> file is downloading to webroot (/root/themes/bartik/templates) folder with result.</p>
<p>My requirement:</p>
<ol>
<li><p>Can I rename <code>node--1876... | 2 | 1,536 |
undefined method text for NilClass | <p>I have a simple crawler written in Ruby that should crawl specific site and save data into a CSV file. When I am trying to run the script, I keep getting undefined method error :</p>
<pre><code>boxers.rb:29:in `<main>': undefined method `text' for nil:NilClass (NoMethodError)
</code></pre>
<p>This is the cod... | 2 | 1,207 |
send XML using WebRequest Class | <p>Hi I want to send below XML data to web server by using webrequest class. I done it successfully by posting single variable. But i am not able to include below parsed XML into it. Please help me out. </p>
<pre><code>static void Main(string[] args)
{
using (XmlReader reader = XmlReader.Create("filepath... | 2 | 1,345 |
Javascript getting loading time of each iframe source | <p>I got a code that reads urls from a text file and puts them in a iframe one after another. I want to calculate the loading time of each page. I do that by marking the time before the iframe starts to load the url, and mark the time right aftrer its loaded. After load minus Before load gives me the loading time of ea... | 2 | 1,024 |
Make body move at same speed in Phaser+P2 and raw P2 | <p>I have a client-server game that uses P2 for some basic physics stuff. I want to run Phaser with P2 on the client and raw P2 on the server. The client will use the local P2 to predict the results from the server. But I'm having trouble getting bodies to move at the same speed in phaser+p2 and raw p2.</p>
<p>Belo... | 2 | 1,140 |
make <div> as a link and save the sizes of the containers | <p>So now I have this structure, and I'm happy with it. <a href="https://i.stack.imgur.com/mvVcU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mvVcU.png" alt="enter image description here"></a> The problem is that this containers should be active as a links. Until now the links are working only if ... | 2 | 3,212 |
"Normal" ratio of codebase vs. test assert problems when a test fails? | <p>I'm currently working on a project with some fairly significant business rules where the problem space is being 'discovered' as we are writing the solution (pretty typical chaotic project management kind of thing). We have decent test coverage & rely on them quite a bit to make sure our signficant changes don't ... | 2 | 1,076 |
How to use a turtle superclass | <p>I'm making a solar system replica using turtle graphics.
I want to make a star and a planet that both inherit from the same turtle superclass "solar_element", but I'm having problems.</p>
<p>I can make the star and planet using two different turtle classes with no problems:</p>
<pre><code>from turtle import Turtle... | 2 | 1,127 |
How to increase UDP socket recv buffer size to its maximum for Linux program? | <p>I am trying to increase the receive buffer size for an UDP socket but the final size does not seem to be predictable :</p>
<pre><code> LOG_INFO("UDP echo server default receive buffer size : " << rcv_buf << " bytes");
// increase default buffer sizes
rcv_buf *= 3;
LOG... | 2 | 1,944 |
FFMPEG Command in Android Failing to Execute | <p>I'm trying to execute ffmpeg commands through an android app I'm developing.</p>
<p>I found this post which has been somewhat useful:
<a href="https://stackoverflow.com/questions/15674165/problems-with-ffmpeg-command-line-on-android">Problems with ffmpeg command line on android</a></p>
<p>and I downloaded a static... | 2 | 1,381 |
how to create a GUI using data from xml file? | <p>what i want is to create a dynamic GUI that consists of a set of buttons ( in my case each button represents an element from the xml file ) and when i click a button there will be a creation of buttons which represents its childs..i dnt know if it is possible to do that using DOM or JAXB..i'll be so thankful if any... | 2 | 2,925 |
How to fix touch events and images disappearing in a TableView using Titanium Alloy in Android? | <p>I'm working with Titanium SDK 3.1.3 and deploying an Alloy project to Android.
I have a Window in a xml file called UserProfile like this:</p>
<pre><code><Alloy>
<Window class="container">
<View id="MainHolder">
<View id="MainHolderTitleView">
<V... | 2 | 6,250 |
How can I make carousel use 2 row in 1 column using Bootstrap | <p>From what I understand about row and col,
number 1 would be one row with .col-12,
then number 2 and 3 in one row but with carousel in the middle using two row. can it be done?</p>
<pre><code> <!--Carousel & Main Menu-->
<div class="container websiteheader">
<br>
... | 2 | 3,279 |
AJAX Form Submitting (Only on Firefox) | <p>I am running an AJAX contact form on my website (www.chrisanstey.co.uk), which is not submitting only in Firefox, but works absolute fine in every other browser. The form is uses the following PHP file:</p>
<pre><code><?php
$to = "me@somewhere.com"; //This is the email address you want to send the email to
if(... | 2 | 1,184 |
Pass entire Model."List" to another action in the same controller (from view) | <p>I really have no clue on how to do this...</p>
<p>I'm trying to pass my entire Model."List" to another action in my controller.</p>
<p>(The list that I'm trying to pass is the IEnumerable < Client > Results)</p>
<p>The view model:</p>
<pre><code>public class IndexViewModel
{
[DisplayName("Pesquisa")]
... | 2 | 1,838 |
In Svelte, you can use `array = array` to mark the array as needing a refresh in the view? | <p>That is, using</p>
<pre><code>array = array;
</code></pre>
<p>to trigger the view to refresh with the current <code>array</code>?</p>
<p>For example, the following uses</p>
<pre><code>cards = [...cards, {name}];
</code></pre>
<p>to "add" an entry to the array <code>cards</code>, but by assigning <code>cards</co... | 2 | 1,123 |
tailwind css does not apply dark mode on react project | <p>This is my first time using tailwind and I have a react project where I use react hooks to toggle between light and dark mode .</p>
<pre><code>const [darkMode,setDarkMode] = useState(false);
const toggleTheme = ()=>{
setDarkMode(!darkMode);
const root = window.document.documentElement; //add 'dark class ... | 2 | 1,337 |
JSON @attributes and @association levels with js and / or angularjs | <p>I'm currently working on a project that uses an API to retrieve, update and delete data. The API i'm using is the <a href="http://doc.prestashop.com/display/PS16/Using+the+PrestaShop+Web+Service" rel="nofollow noreferrer">prestashop API</a>. So after being able to retrieve data and update some items i stumbled upon ... | 2 | 2,570 |
Set LinearLayout's width inside TableRow to MATCH_PARENT | <p>I have a <code>TableLayout</code> with <code>MATCH_PARENT</code> for <code>width</code> and by code I add a <code>TableRow</code>, that inflates a <code>LinearLayout</code>, all have <code>MATCH_PARENT</code> for <code>width</code>.
If I remove the <code>LinearLayout</code> and I add the <code>TextView</code> to the... | 2 | 1,968 |
Returning a CollapsiblePanelExtender over/through ajax/javascript | <p>I would like to be able to return a programmatically generated collapsible panel extender through javascript along with it's panel and so on. I've got the panel and associated tables going through just fine however when I try and attach the cpe it breaks. and returns an error: </p>
<p>The cpe panel and such are bei... | 2 | 1,213 |
realm.xamarin throws error: The method 'Contains' is not supported. same for 'Any' | <p>i am writing a query which required 'WHERE IN' like clause in realm.xamarin linq query. below is the query i tried:</p>
<pre><code>var IdsToMatch = observations.Select(x => x.Id)
var results = from d in realm.All<Observations>() where IdsToMatch.Any(p => p == d.Id) select d;
</code></pre>
<p>also tried... | 2 | 2,214 |
SQLXML is not working from java | <p>Environment Details are : - </p>
<blockquote>
<p>Appserver is : - apache tomcat 8 jre 1.8 (latest as on March 01,2015)
Database is MS-SQL Server 2008</p>
</blockquote>
<p>Below is the Code Snippet: - </p>
<pre><code><%@ page import="java.util.*,java.io.*,org.xml.sax.* ,javax.xml.*, org.w3c.dom.*, javax.sq... | 2 | 1,443 |
Auto login Rocket.Chat with LDAP | <p>I am integrating Rocket.Chat into my system that share user account through LDAP database. We created a shortcut to go Rocket.Chat from our system, when user click to this shortcut, our system will open Rocket.Chat page with url type: <code>http://rocketchat.host:3000/?username={username}&password={password}</co... | 2 | 3,411 |
How can I fix the “TypeError: 'Tensor' object is not callable” error in Pytorch? | <p>I am trying to compute a linear function an image's pixels, followed by log softmax (it's for a classification task). I am not sure how to do this without getting errors. Here is the relevant code:</p>
<pre><code>...
torch.nn.functional.nll_loss(output, target) # error happens here
...
def __init__(self):
super... | 2 | 1,373 |
BroadcastReceiver & PROCESS_OUTGOING_CALLS | <p>I am trying to implement a BroadcastReceiver but it is not working. On virtual device this application is working perfectly. At my real device(Galaxy Nexus - Android 4.1.2) it does nothing! In the log from real device is no error about the application. Any ideas?</p>
<p>Outgoingcallinterceptor.java</p>
<pre><code>... | 2 | 2,678 |
Laravel & vue.js - not rendering imported component | <p>I'm starting to play around with vue.js on top of the laravel framework.</p>
<p>But im having trouble with rendering of a component which is imported.</p>
<p>My <code>app.js</code> (main entry point)</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-... | 2 | 1,351 |
DurandalJS Routing Behavior | <p><strong>What I Have</strong></p>
<p>Trying to understand what's going on and how to control it. I have a "public" view for users that have not yet been authenticated, and a "home" view for users that are authenticated. Here's my route config: </p>
<pre><code>app.start().then(function() {
//Replace 'viewm... | 2 | 1,091 |
STM32 Master/Slave SPI communication using HAL_SPI_TransmitReceive() | <p>I'm trying to test out a SPI master using HAL_SPI_TransmitReceive() as I will be communicating with an SPI slave. The SPI slave device is not yet available. I have two STM32F4 NUCLEOs that I am using. One that will be the master and one pretending to be the slave device. I've wired them together and am using the fol... | 2 | 3,148 |
List every file and folder of a shared drive in a spreadsheet with Apps Script | <p>I found a script that works flawlesly for My Drive that I want to adapt to also support Shared Drives.</p>
<pre><code> function onOpen() {
var SS = SpreadsheetApp.getActiveSpreadsheet();
var ui = SpreadsheetApp.getUi();
ui.createMenu('List Files/Folders')
.addItem('List All Files and Folders', 'listFile... | 2 | 1,233 |
c# Bitlocker information from Active Directory | <p>I'm trying to get bit locker recovery information for all users from active directory via below functions.
I've tried many different solution but none of them solved my problem.
I can get most of the computer properties like Operation System,Service Pack expect bit locker info.
Is there any special permission or me... | 2 | 1,212 |
Npgsql.PostgresException: 42P01: relation "table" does not exist | <p>I have a problem when I'm trying put data in a table "AccomodationCategories" with a many to many relationship but I'm getting the error:</p>
<p>Npgsql.PostgresException: 42P01: relation "AccomodationCategories" does not exist</p>
<p>So this is what my tables look like:</p>
<p><a href="https://i.stack.imgur.com/j... | 2 | 2,076 |
NullPointerException emergs when I try to extract data from a hbase table using newAPIHadoopRDD | <pre><code>Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:208)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:320)
at org.apache.hadoop.hbase.client.C... | 2 | 1,810 |
Keep modal open and showing error laravel | <p>Yes, I saw the other two post on this question unfortunately I still could not get it working, my modal still closes, how o I keep my modal open while showing the erors? am I missing out on something?</p>
<p>Controller:</p>
<pre><code>// check if the validator failed -----------------------
if ($validator-... | 2 | 2,391 |
CSS: Dynamic classes / attributes and media queries - how to solve this dilemma? | <p>Writing an extension for a Plugin I have the possibility to change all attributes of an HTML element using PHP.</p>
<pre><code>$attributes["style"] .= 'padding-left:10px;';
array_push($attributes["class"], "long-container");
array_push($attributes["class"], "super smooth");
$attributes["data-whatever"] = "great";
<... | 2 | 1,056 |
Use ButtonBase for ripple effect on Material UI TableRow | <p>I'm looking to add a ripple effect to the Material UI Table. I've tried a whole bunch of solutions but none of them quite seem to work perfectly. They all have their own quirks. </p>
<p>I did find <a href="https://stackoverflow.com/questions/29105677/material-ripple-effect-on-table-row">this</a> article, but not mu... | 2 | 2,239 |
Artifactory upgrade 6.16.2 -> 7.12.6 failing with Application could not be initialized: UNAVAILABLE: Network closed for unknown reason | <p>When upgrading Jfrog Artifactory from 6.16.2 -> 7.12.6 on a Windows machine, following the official instructions (<a href="https://www.jfrog.com/confluence/display/JFROG/Upgrading+Artifactory#UpgradingArtifactory-WindowsUpgrade" rel="nofollow noreferrer">Link</a>) i am getting the following error in <code>artifac... | 2 | 1,836 |
MySQL data from PHP to Javascript with JSON | <p>I am trying to use a code that will take data from a mySQL database bind that data to a variable, put all the resulting $x into a PHP array, and finally convert it to JSON format. I then take the JSON into javascript to handle the data from the data base there.</p>
<p>Please see my code:</p>
<pre><code><?php
... | 2 | 1,045 |
Using Biopython to parse a PDB file | <p>I need to parse through a PDB file using biopython in order to extract each line that pertains to an alpha carbon (CA). Here is the code that I use </p>
<pre><code>from Bio.PDB import *
parser=PDBParser()
io = PDBIO()
structure_2 = parser.get_structure('Y', 'A.pdb')
for l in structure_2:
if atom.get_id() == '... | 2 | 1,143 |
CircleCI error your tests likely make requests to this 'baseUrl' and these tests will fail if you don't boot your server | <p>I am running an Angular 2+ app with integration testing using Cypress.io and CI using circleCI.</p>
<p>I riffed off of a tutorial provided <a href="https://medium.freecodecamp.org/our-journey-for-using-circleci-2-0-to-build-and-deploy-an-angular-app-to-aws-s3-8e7ea3f51503" rel="nofollow noreferrer">here</a> for set... | 2 | 1,625 |
Custom Datagrid column header | <p>I'm Trying to create a datagrid with custom column headers with images.
The problem is that the binding is not working properly.</p>
<pre><code><Window.Resources>
<DataTemplate x:Key="header">
<Image Source="{Binding ColumnHeader}"/>
</DataTemplate>
<DataGridRowHeader... | 2 | 1,360 |
D3 grid lines and tick values issues | <p>I have a stacked area chart made using D3. I am facing two issues with my implementation.</p>
<p>1) i just want to display alternative tick values on the y axis. For example in my implementation y axis values are <code>0, 20, 40, 60, 80, 100</code> and so on. But i want to show values likes <code>0, 40, 80, 120</co... | 2 | 4,903 |
Can one build Eclipse projects from the command line? | <p>I would like to know if the issue of building Eclipse CDT projects from the command line has been resolved. I am unable to get this feature to work.</p>
<p>I am using Eclipse Indigo CDT. </p>
<p>I have three separate command line invocations of Eclipse.
Two commands import two projects into a workspace. There are ... | 2 | 9,898 |
Android - Pass "edit text" element value between tabbed fragments | <p>I have an activity with multiple swipe tabbed fragments. Each fragment has some check-boxes, edit text and switch fields. What I want is to navigate through all the tabs, edit the state of the fields then on last tab to collate the information within all the elements and save these details into a database.</p>
<p>M... | 2 | 1,674 |
How to prevent CXF secured webservices access from browser | <p>I am developing a basic WebService example using CXF and Spring.
Here are my classes:</p>
<pre><code>public interface AuthService {
@WebMethod
Person getPerson(@WebParam(name="user_id") Long userId);
}
</code></pre>
<p>The WS implementation is as follow:</p>
<pre><code>public class AuthServiceImpl implements ... | 2 | 2,506 |
SDL2: getting segmentation fault with TTF_RenderText after some time? | <p>Well, I wasn't sure if that's for code review or for this site, but it has a problem, so I suppose I'm in the right place. I'm trying to create a game using C and SDL. Here's the code(explanation below):</p>
<pre><code>//Includes
#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include <... | 2 | 5,032 |
What is correct workaround when updating entities in jhipster? | <p>I have a modelio UML class model. I have been updating it all the time and after that I run jhipster-uml .xmi to regenerate entities. I always ended up to error messages. I tried to delete from -jhipster files the entity.json files but it doesn't help. So could you tell me what is correct workaround to update entiti... | 2 | 2,484 |
Client Side Validation before sending data to server ASP.Net MVC | <p>I have a view in ASP.Net . I have added some controls in the view. I am trying to do client side validation before sending the data to server. If everything is fine, I want to send it to server.<br>
<strong>My code is here:</strong></p>
<pre><code> @using (Html.BeginForm("Index", "staff", FormMethod.Post))
... | 2 | 1,324 |
Why is Logcat showing "E/SQLiteLog﹕ (1) no such table: reg_info"? | <p>I changed the database version, added the appropriate amount of spaces to the SQL function to create a table and updated the parameters for the function that inserts input into the database, but LogCat still displays:</p>
<pre><code>E/SQLiteLog: (1) no such table: reg_info
E/SQLiteDatabase: Error inserting user_pas... | 2 | 1,247 |
Get selected option from dynamic dependent dropdown list - using Flask (Python) | <p>I'm trying to retrieve the selected option on a dynamic dependent dropdown list, but I only get <code>None</code> using <code>request.form.get</code>. My example generates a dropdown list in the image below:</p>
<p><a href="https://i.stack.imgur.com/Yvoc5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgu... | 2 | 2,463 |
How to calculate Frequency with Fast Fourier Transformation | <p>i am working on a pulse sensor project. I get data from the sensor like this:
<a href="https://i.stack.imgur.com/L6RZw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L6RZw.jpg" alt="voltage without artifacts"></a></p>
<p>Now i would like to use this code:</p>
<pre><code> #include <complex&g... | 2 | 1,827 |
Firestore ClassNotFoundException: com.google.auth.oauth2.GoogleCredentials and com/google/api/client/googleapis/util/Utils | <p>I have a gradle project in Intellij where I am trying to access the Firestore database by following the guide <a href="https://firebase.google.com/docs/admin/setup" rel="nofollow noreferrer">https://firebase.google.com/docs/admin/setup</a> but it throws ClassNotFoundException for google-oauth2 GoogleCredentials and ... | 2 | 1,825 |
How can I iterate over easily-differentiated colors? (jsfiddle included) | <p>For example: I'm generating a line chart that shows the sales performance of my client's stores. The user will be submitting store numbers (1-200) and the graph will draw a line for each store. I need a function that will return one color for each store and I'd like the colors to look significantly different from on... | 2 | 1,743 |
It always becomes 0 regardless of what is set to the currentTime of the audio tag | <p>I am making a player that can play music with a Web browser, but I am in trouble because I can not change the playback position. (currentTime)</p>
<p>Specifically, even if we assign a numeric value to the currentTime of mp3 music read with the audio tag of html 5, it will always be 0.</p>
<pre><code> <audio ... | 2 | 7,654 |
Multiple Dialogs on the same page | <p>I'm planning to make two different Dialog modals using <code>@material-ui/core</code>.</p>
<p>My file structure as is follows:</p>
<pre><code>|-components/
|-|-index.js
|-|-common/
|-|-|-header.jsx
|-|-|-searchModal.jsx
|-|-|-signModal.jsx
</code></pre>
<p>I'm trying to import those two different modals into <code>h... | 2 | 2,149 |
retrieve value in last object of localStorage | <p>I am trying to retrieve the last object in localStorage (a user with "name" and "email" attributes). I would like to access the "name" and "email" values individually, and print them out as a string. This is what my template outputs:</p>
<p><code>{"name":"eamon","email":"eamon.white@yahoo.com"}</code></p>
<p>I wou... | 2 | 1,479 |
How to make my NET.TCP WCF service to handle secure and unsecure communication | <p>I have a WCF service that needs to handle the following :</p>
<ul>
<li>1 Service</li>
<li>Regular TCP Endpoint</li>
<li>Secured customUsernamePassword Endpoint</li>
<li>Secured Windows Endpoint</li>
</ul>
<p>The system.serviceModel section looks like this :</p>
<pre><code> <system.serviceModel>
&... | 2 | 2,406 |
How to slove this error when using enable_if: "no type named ‘type’ in ‘struct std::enable_if<false, void>’" | <p>I want to invoke <code>pushArg()</code> method with different kinds of the type of <code>T</code>.</p>
<p>Here is the relate code snippet:</p>
<pre><code>//test.hpp
struct Demo {int a};
typedef int (*CALL_CFunction)(struct Demo* );
classs Ctx
{
/*push bool */
template <typename T,
typenam... | 2 | 1,063 |
Android Floating Action Button doesn't get fixed at the bottom | <p>I have a fragment which renders a recycleview with an floating action button. The problem is that when the list is empty, the fab keeps on the right top, when the list has few items, the fab keeps below the list but not at the bottom, and it only keeps totally at the bottom when the list fill the screen with items. ... | 2 | 1,175 |
Query multiple relationships in model october cms | <p>Hi I'm trying to make an combined query with October CMS active record implementation to filter out user selected input.</p>
<p>The are four models a <code>Color, Series, Department</code> and <code>Product</code> with the relationships as follows:</p>
<p>The <code>Product</code> model </p>
<pre><code>public $bel... | 2 | 1,056 |
You must call removeView() on the child's parent first! How to get rid of this error? | <p>I have made this simple app that uses explicit intents to move from an activity to another. </p>
<p><a href="https://i.stack.imgur.com/XSPLs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XSPLs.png" alt="enter image description here"></a></p>
<p>It works fine for all activities (e.g. move from ... | 2 | 5,367 |
IOS Bluetooth LE Scanning Devices not adding to the uitableview | <p>I would like to implement the bluetooth scanning and connect module for IOS using uitableview. When it comes to the execution, there has no items being added to the list. Would you please tell me what else I have to do to show the list of bluetooth devices with device name , uuid , and so on ? </p>
<p>For instance,... | 2 | 2,939 |
Error in Grocery Crud while loading page | <p>Error:</p>
<pre><code>Fatal error: Call to undefined method grocery_CRUD::set_js_lib() in assets/grocery_crud/themes/custom_checkbox_flexigrid/views/list_template.php on line 3
</code></pre>
<p>Code:</p>
<pre><code>$this->set_css($this->default_theme_path.'/custom_checkbox_flexigrid/css/flexigrid.css');
$th... | 2 | 1,581 |
The Grid Search (HackerRank) - Python | <p>I'm a developer for a few years but I'm practicing my algorithm skills.</p>
<p>I'm faced with <a href="https://www.hackerrank.com/challenges/the-grid-search" rel="nofollow">"The Grid Search"</a> in HackerRank and even though I could solve it, I want to know if this is a decent method to do it.</p>
<p>PS: I'm tryin... | 2 | 1,480 |
RecordRTC video upload AmazonS3 Timeout error | <p>I am currently developing a component that allows you to make webcam videos and upload them directly to amazon s3. For that purpose I user RecordRTC library and Amazon S3 storage. I have discovered a strange issue, and I am not sure whether it has to do with RecordRTC blobs or with amazon configuration. When the fil... | 2 | 1,236 |
Sonarqube and working with multiple unit test reports | <p>I have a Web Application using a mix of C# and JavaScript / Type Script.
I'm trying to get code coverage and unit test results for both language types here. Individually this works fine, but when attempting to run both its a no go.</p>
<p>The coverage is fine but the importing of unit test reports isn't</p>
<p>Run... | 2 | 2,077 |
Trouble with Django Logout Page, django-registration logout.html Template Form Fields | <p>I am using <code>django-registration</code>. After getting it working, I went on extending views and forms for field customization using Bootstrap.</p>
<p>I have this working for everything except the logout page. In the default method, I simply built the form by scratch and it worked OK. But when trying to use Dja... | 2 | 1,056 |
Swagger-ui not working with complex objects | <p>When the object has another cutom object i get an error from swaggerUi:</p>
<blockquote>
<p>Caused by: java.lang.NoSuchMethodError: io.swagger.models.properties.RefProperty.(Ljava/lang/String;Lio/swagger/models/refs/RefFormat;)V</p>
</blockquote>
<p><a href="https://i.stack.imgur.com/0a28M.png" rel="nofollow nor... | 2 | 1,263 |
CheckBoxFor not binding to model | <p>My application works like this: A user chooses a project from a dropdown list and it loads a partial view. The controller action that returns the partial view pulls data from a database and populates the checkboxes in the partial view with the values that exist in the database. To do that, obviously the model is ret... | 2 | 1,769 |
How do I pivot dynamically in Linq using this example | <p>The problem below is in the code, i.e. the bit that says DY1 =, DY2 =, etc. I don't know how many there will be so I need to do it dynamically.</p>
<p>Here is my textfile :</p>
<pre><code>Product, Origin Year, Development Year, Incremental Value
Comp, 1992, 1992, 110.0
Comp, 1992, 1993, 170.0
Comp, 1993, 1993, 20... | 2 | 1,050 |
How do I successfully make an okHttp request in Kotlin | <p>Issues:
1. The request is not hitting my python flask server.
2. My app crashes whenever this code is run.
*Note: I have used Postman to test the localhost address, which is successful</p>
<p>I am trying to create an okHttp request in my kotlin android application.
I have implemented the needed dependencies in... | 2 | 1,038 |
Laravel 5 - Checking if the user session has expired | <p>I am trying to implement a way to check if the user session has expired and then pop-up a modal letting the user know.</p>
<p>Here is what I have so far.</p>
<p>Route</p>
<pre><code>Route::get('auth-check', ['uses' => 'UsersController@authCheck', 'as' => 'auth.check']);
</code></pre>
<p>UsersController</p>... | 2 | 1,057 |
Error with pymunk space.remove method | <p>I have a ball generator, that "generates" and adds balls(circles) to the simulation. </p>
<p>The ball is to be removed when it hits a static poly in list <code>s_boxes</code>.<br>
This is done by a collision handler <code>ball_wall_collision</code>.</p>
<p><strong>The Error:</strong><br>
The following pop-up wind... | 2 | 1,103 |
App crashes with out of memory when capturing a photo in Cordova 3.0 app | <p>I am running a <strong>Phonegap (Cordova 3.0) app</strong> on my Android 2.3.6 Nexus One smartphone. My problem is that when I launch the camera and capture the image, after capture the app crashes and forced to be closed.</p>
<p>I used logcat app to take a look at the logs and this is what I have:</p>
<pre><code>... | 2 | 1,543 |
Module doesn't provide an export named "default" | <p>There are a two similar question but their solutions either are a work around that stops using modules or don't solve my issue. The modules don't seem to be working as expected. I'm running this through a local host server, using node and I just updated node. I'm sure the cause of this error, so I put all the files ... | 2 | 1,227 |
Updating related Data with Entity Framework 6 in MVC 5 | <p>Using EntityFramework 6, I would like to update Customer in the following scenario:</p>
<pre><code>public class Customer
{
public int Id {get; set;}
// 100 more scalar properties
public virtual IList<Consultant> Consultants {get;set;}
}
public class Consultant
{
public int Id {get; set;}
... | 2 | 1,092 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.