title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How do you parse JSON with a colon in the name? Android/Java | <p>For example: <code>{ "primary:title":"Little Red Riding Hood"}</code></p>
<p>My Parser in Java (Android) is always getting stuck because of the colon between primary and title. I can parse anything else with ease, I just need help in this.</p>
<pre><code>public class MainActivity extends Activity {
/** Called ... | 1 | 1,930 |
Module not found: Can't resolve '@material-ui/lab/TabContext' in '/home/sanika/Desktop/Coding/React/my-forms/src/Components' | <p>I am new to ReactJs and I am trying to implement TabContext using material UI library of react and I am getting the error above. I think it's due to path. I tried to install material UI again but it didn't help. I am sharing my code.Please check</p>
<p><em><strong>my-app/src/App.js</strong></em></p>
<pre><code>impor... | 1 | 1,763 |
Phonegap doesn't copy plugin files to ios platforms directory during build | <pre><code>rm -rf plugins/*
rm -rf platforms/*
phonegap build ios //this works
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
phonegap build ios
</code></pre>
<p>Building for ios after adding a plugin fails. Here is the error:</p>
<pre><code>** BUILD FAILED **
The fo... | 1 | 1,129 |
How to left align peoperly my logo | <p>I have a page and its header navihation is properly inherit therefore its coming to the center.</p>
<p>But the Logo which is not coming to proper left, its going to left side of the page.</p>
<p><img src="https://i.stack.imgur.com/vAaIL.jpg" alt="Screenshot of the output"></p>
<p>HTML</p>
<pre><code><title>... | 1 | 1,034 |
How to maintain reference to object instantiate at runtime in Unity | <p>I need to instantiate an object at runtime, where the number of objects are based on a txt file (number of lines). All objects need to be clickable (onClick() event) and when they are pressed a tooltip must appear. Tooltips are specific ( Object1 -> Tooltip1, Object2 -> Tooltip2). Tooltips are just a Panel and they ... | 1 | 2,139 |
My chrome extension doesn't show errors to console, but it shows logs | <p>I've encountered an issue that drives me completely nuts.</p>
<p>My chrome extension doesn't report any errors to Developer Tools console. BUT: it still writes logs, works generally well, and the non-extension scripts on the page still report their errors.</p>
<p>I've seen some words that extension's errors can be... | 1 | 1,077 |
Creating a CroppedBitmap at runtime - won't load from resource | <p>I'm trying to write code that will load an image from a resource, and then crop it. This code works when I do all, or part, of it in XAML. I want to switch from all-XAML to all-code, so I can reuse this more than one place, with different Uris.</p>
<p>But when I try to do the same thing in code, I get a DirectoryNo... | 1 | 2,134 |
How to serialize an object and then send it over bluetooth | <p>I'm making a Battleships game and I want to send an Array of a class named Ships(which contains stuff like ship name, size, rotated or not and an arraylist for coordinates). I've googled this and looked on Stack overflow and I basically need to serialize the array, but this is where I'm stuck. I need to use ObjectOu... | 1 | 1,690 |
Mysql Error writing file /tmp/ Errcode 28 in phpmyadmin | <p>Every time I try to select from my Mysql table with million plus rows in phpmyadmin I receive the following error:
"Error writing file /tmp/ Errcode 28"</p>
<p>Server Stats:</p>
<pre><code>Filesystem Size Used Avail Use% Mounted on
/dev/vda1 30G 21G 7.5G 74% /
tmpfs 939M 0 939M 0%... | 1 | 1,093 |
How to align the elements to the top in a GridBagLayout? | <p>I want to put a text element in a <code>GridBagLayout</code> after clicking on a button.
But the elements are vertically centered. So how can I force the grid bag layout to position the elements to the top?</p>
<p>Here is an example code:</p>
<pre><code>import java.awt.*;
import java.awt.event.*;
import java.util.... | 1 | 1,360 |
Can SELECT and WHERE LINQ clause be combined? | <p>Here is what I have done to <code>Select</code> users into my model and then remove all the <code>null</code> records:</p>
<pre><code> model.Users = users
.Select(u =>
{
var membershipUser = Membership.GetUser(u.UserName);
return membershipUser != null
... | 1 | 1,197 |
ASP.Net Core JWT Login not setting HttpContext.User.Claims | <p>I have the following for my login code, and another method to retrieve the user ID in another call.</p>
<pre><code> // POST: /api/Account/Login
[HttpPost]
[AllowAnonymous]
public async Task<IActionResult> Login([FromBody]LoginViewModel model)
{
if (ModelState.IsValid)
{
... | 1 | 3,342 |
How to Transfer Large Files over wifi in iOS | <p>I downloaded <a href="http://developer.apple.com/library/ios/#samplecode/WiTap/Introduction/Intro.html">WiTap</a> Code From Apple's website. Its for transferring data over local wifi network. I am working in a project to interact as client - server architecture. I am sending NSData from client side to server. </p>
... | 1 | 1,821 |
maven - Failed to execute cargo:start | <p>I'm trying to configure <code>cargo</code> automatic deployment in my servlet project and I have these in <code>pom.xml</code> file:</p>
<pre><code> <dependency>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-core-api-module</artifactId>
<version>1.4... | 1 | 1,752 |
hyper-v generic failure when trying to make new vmswitch | <p>I can't do anything with hyper-v manager. Everything that i try gives the generic failure.</p>
<p>This all started after the update of 14-01-2020.</p>
<p>I even tried removing the updates but that doesn't because i can't remove 1 out of the 3.</p>
<p>Next option is reinstall.</p>
<p>What i have tried so far: </p... | 1 | 1,095 |
SocketException Permission denied - CakePHP 2.3 | <p>I receive that error when try send e-mail with <strong>CakePHP 2.3.0</strong>.<br />
My Cloud configuration is:</p>
<ul>
<li>PHP 5.4</li>
<li>Apache 2.2</li>
<li>MySQL 5.5</li>
<li>CakePHP 2.3.0</li>
</ul>
<p>Sorry about my english.</p>
<hr>
<pre><code>2013-03-06 09:15:05 Error: [SocketException] Permission deni... | 1 | 2,527 |
Capture dB levels from a WAV file | <blockquote>
<p>Python 2.7.3 (default, Sep 26 2013, 16:35:25) [GCC 4.7.2] on linux2
Linux Mint 14</p>
</blockquote>
<p>Using Python, I am reading a wav and putting the data to a text file. The entire script is below. It is my first Python Script.</p>
<p>The values for the micsec can be anything from 000000 to ... | 1 | 1,024 |
Add a "+" before each word in a string using jQuery | <p>I have created an array, "outData", using <code>javascript</code>, which looks like this:</p>
<p><a href="https://i.stack.imgur.com/zbHuF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zbHuF.png" alt="outdata array"></a></p>
<p>I'm now trying to: </p>
<ol>
<li>loop through the outData array us... | 1 | 1,441 |
How to Bind Static Class property to UI component in XAML / Xamarin | <p>In Xamarin application, I am not able to Bind the static property of the C# user defined static Class property (Colors.BackgroundColor) to XAML. I need to set the background of the color of grid by static value defined in static class.</p>
<p>But I am getting the error</p>
<blockquote>
<p>Type <strong>UserInterfaceD... | 1 | 1,195 |
Passing parameters to on click jquery event from dynamic list of anchor tags | <p>I'm working on a list of elements in my asp.net mvc project. Each element is part of a <code>ul</code>, and the list elements are generated based on a list in my model.</p>
<p>I'm trying to add a delete button to each of these elements, but I'm struggelig a bit with how to make these elements unique, for jquery to ... | 1 | 1,101 |
Python location, show distance from closest other location | <p>I am a location in a dataframe, underneath lat lon column names. I want to show how far that is from the lat lon of the nearest train station in a separate dataframe.</p>
<p>So for example, I have a lat lon of (37.814563 144.970267), and i have a list as below of other geospatial points. I want to find the point th... | 1 | 3,441 |
Hibernate deadlock | <p>Having a deadlock in webservice + hibernate... No idea why.</p>
<p>I have the following webservice code (core code of the function)</p>
<pre><code>public String createImageRecipe(...)
{
Session session = ICDBHibernateUtil.getSessionFactory().getCurrentSession();
try
{
session.beginTransaction(... | 1 | 1,248 |
Cannot catch wcf service exception in biztalk orchestration | <p>I'm trying to put exception handling into my working orchestration and cannot get the exception caught. It keeps suspending the message instead of executing my exception block to handle it more gracefully. </p>
<p>Any suggestions?</p>
<p>Here are the event log messages I'm getting:</p>
<pre><code>A message sent t... | 1 | 2,276 |
Configure gulp path for processed files | <p>When I do a gulp build, I get a dist folder with styles, scripts, index.html, etc. In the index.html, there is a pre populated path e.g. (src="scripts/abcd.js").</p>
<p>How can I make the path configurable - for example prepending a directory (somefolder/scripts/abcd.js)?</p>
<p>Here is my current gulp code: </p>
... | 1 | 1,276 |
Twitter Bootstrap 3 Glyphicons error | <p>I'm trying to upgrade from Bootstrap2 to Bootstrap3. Everything works so far, except the Glyphicons: a square is displayed instead of the icon: <img src="https://i.stack.imgur.com/wksmb.png" alt="enter image description here"></p>
<p>I'm using Symfony2. This is how I call Bootstrap CSS:</p>
<pre><code><link rel... | 1 | 1,273 |
Export .xslx data using Laravel Excel with parameter | <p>I want to export data from the database to .xlsx using Laravel-Excel.
I want to pass three parameters to query the data and download into excel file.
I already search and read a few examples but still failed to make the excel file to download.</p>
<p>This is my blade file. </p>
<pre><code>@section('content')
<d... | 1 | 2,643 |
Using Subtract layer in Keras | <p>I'm implementing in Keras the LSTM architecture described <a href="http://nlp.cs.rpi.edu/paper/multilingualmultitask.pdf" rel="nofollow noreferrer">here</a>. I think I am really close, though I still have a problem with the combination of the shared and language-specific layers. Here is the formula (approximately): ... | 1 | 1,067 |
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found | <p>I am using Ubuntu 20.04.3 and trying some QT-based apps. In my particular use case, I am trying to launch android file transfer and it throws me the following error:</p>
<pre><code> Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland"... | 1 | 3,934 |
Angular 9: Unable to change or modify HTTP headers | <p>My API server runs on Lumen framework and I have a CORS middleware installed there, accompanied with a middleware which manages JSON POST data. On the server side, everything is perfect.</p>
<p>Now, for the UI, I use Angular 9 with Material layout. I have a pretty simple <strong>login</strong> component: it basical... | 1 | 1,534 |
IIS Reverse Proxy Re-Encoding URLs Containing Percent Sign (%) | <p>I am trying to set up a reverse proxy for <a href="http://jenkins-ci.org/" rel="noreferrer">Jenkins</a> using IIS 7.5, <a href="http://www.iis.net/downloads/microsoft/application-request-routing" rel="noreferrer">Application Request Routing</a> 3.0 (ARR), and <a href="http://www.iis.net/downloads/microsoft/url-rewri... | 1 | 1,264 |
How to build a HTML from JSON and JQuery Templates | <p>I know I'm messing up the syntax somewhere but I can't figure out where. Code below. (I left out the body tag because it wasn't showing correctly in the preview)</p>
<pre><code><head runat="server">
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scri... | 1 | 1,173 |
How to properly set up Azure Functions logging, live metrics, and app insights with dependency injection | <p>About a month ago, I noticed that some of the monitoring functionality in the old Azure Functions portal interface stopped working. I wrote more details about the issues on the <a href="https://github.com/Azure/azure-functions-host/issues/6060" rel="noreferrer">Azure Functions Host GitHub</a> but my particular quest... | 1 | 2,058 |
How to Play RTSP Video in Android? | <p>I want to play Youtube Video on VideoView .
I have searched very much & find that VideoView Support rtsp URL Video .
But I am getting error: My android device is 2.3.5 & using Wifi.
My VideoView Code is:</p>
<pre><code> final VideoView videoView = (VideoView) findViewById(R.id.VideoView);
Bu... | 1 | 1,302 |
Django throws error no. 10053 when receiving POST from jQuery | <p>I'm trying out jQuery to send POST and GET requests to Django.</p>
<p>So far only GET is recognized, and POST I will get errors, and although GET works I cannot get the individual fields that I send to my Django app.</p>
<p>So I wonder what's the problem, and how do I get POST to work?</p>
<p><strong>views.py</st... | 1 | 1,445 |
Getting volume change notifications on Vista/7 (C++) | <p>I'm trying to get notifications whenever the master volume changes on Windows Vista/7. This is the code I'm using:</p>
<pre><code>#include <audiopolicy.h>
#include <audioclient.h>
#include <mmdeviceapi.h>
#include <endpointvolume.h>
#include <windows.h>
#include <shlwapi.h>
#incl... | 1 | 7,230 |
table view edit mode | <p>I have a Navigation controller on which a table view is there. I wanted two button on that navigation bar i.e. "Add to Favourite" and the other is "Edit".</p>
<p>Both the button should fire the event that makes the table view go in editing mode. From the "Add to favorite button i want the table view to go in insert... | 1 | 1,227 |
Spring Boot - Error during WebSocket handshake | <p>When I tried using WebSocket in my spring boot application I got this error : "WebSocket connection to 'ws://localhost:8080/Moda/chatroomServerEndpoint' failed: Error during WebSocket handshake: Unexpected response code: 400" (Default.html-Line 11).. My aim : Send message by two different tabs (ex: in Google Chrome)... | 1 | 1,331 |
How to disable Button while AsyncTask is running? (Android) | <p>I am trying to disable a button while a download task is being executed. I have tried using setEnabled, setVisibility and setClickable. I think I tried all combinations of these options. All of them disable the button click events while the task is performing, but the events are still being registered somehow, and w... | 1 | 1,821 |
How to run examples in mahout in action book | <p>I am trying to run the hello world example in chapter 7. I created the following in eclipse and then packed it into a jar:-</p>
<pre><code>package com.mycode.mahout
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
impor... | 1 | 2,017 |
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found | <p>I am in first in automated testing. So, I have a task to create automated script for API testing. I need to create https request with self-signed serificate. This certificate gave me our admins with p12 extension and password file. I exported this certificate to .cer extenssion. Than I created the trust store and im... | 1 | 1,879 |
UITableView Custom Cells Not Showing Up | <p>I have a UITableViewController with two IBOutlet's to two different UITableViewCell's that were made in IB. However they are not showing up in the tableView. If you can find the error, I will really appreciate it.</p>
<pre><code>
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSI... | 1 | 1,142 |
composer can only install one of: symfony/console | <p>I'm trying to upgrade from laravel 5.1 to 5.3. When attempting to run composer update, it's failing saying that I'm trying to install multiple versions of symfony/console. Part of the error is below </p>
<pre><code>Can only install one of: symfony/console[v3.1.0-BETA1, v2.8.9].
- Can only install one of: symfony/... | 1 | 1,456 |
How can I keep variables from being re-initialized every time I call a C++ function? | <p>How do I get past this variable initialization problem? If I only could figure out how to only initialize them only once...</p>
<pre><code>* Main.cpp : main project file.
/************************** Begin Header **************************/
#include "stdafx.h" //Required by Visual C ++
#include <string> ... | 1 | 3,741 |
How to get the publish url after uploading video to azure media service? | <p>i am able to upload the video to windows azure media service by web HTTP rest API. but after uploading i am unable to get the URL to run this uploaded video in my browser. but video is running after the manually publish in the azure port for this particular video.
so how i can get the uploaded video publish URL by... | 1 | 4,637 |
Multipart form upload to S3 using libcurl and CURLFORM_STREAM | <p>I am trying to upload in C/C++ code to S3 using libcurl. I am uploading binary data to be generated from a callback.</p>
<p>I've been staring at this for a while, so I may be way off :( but here is what my code looks like right now:</p>
<p>First, I build my form like so:</p>
<pre><code>struct curl_httppost *build... | 1 | 1,169 |
multiple get requests one controller: Unexpected request, unit testing - AngularJS | <p>I can find plenty of examples of single http calls from a controller and how to test them,but no examples of multiple testing.</p>
<p>My first test works fine without <code>Product.find(10)</code> in the controller. When I add that line however the first test collapses.</p>
<p>The errors: </p>
<p><code>Error: Une... | 1 | 1,950 |
Jackson Parse JSON Object as Array of Objects | <p>I am trying to parse the following JSON in Jackson:</p>
<pre><code>{
"x:y" : 1,
"x:z" : 2,
"u:v" : 3,
// Several dynamically generated entries...
}
</code></pre>
<p>The data is formatted this way and outside of my control. The entries are somewhat dynamic, but always of the form:</p>
<pre><code>"first:se... | 1 | 1,180 |
java.lang.IncompatibleClassChangeError using Spring and hibernate in glassfish | <p>I'm using spring(3.0.4.RELEASE) and hibernate (3.4.0.GA) and deploying into a glassfish (web_3.1) container.</p>
<p>I have 2 wars and I want them to share the same cache via JNDI (this is very important to me, I've already used terracotta but it is too heavy weight for our needs), so I've added the hibernate and eh... | 1 | 8,952 |
Spark groupByKey Clarification | <p>I am trying to process some data and write the output in such a way that the result is partitioned by a key, and is sorted by another parameter- say ASC. For example,</p>
<pre><code> >>> data =sc.parallelize(range(10000))
>>> mapped = data.map(lambda x: (x%2,x))
>>> grouped = m... | 1 | 1,405 |
rJava on MacOS Sierra 10.12.15: unsupported option fopenmp | <p>I'm trying to install rJava on MacOS Sierra. Have to tried the tips and guides elsewhere for other other version MacOS such as <a href="https://github.com/snowflakedb/dplyr-snowflakedb/wiki/Configuring-R-rJava-RJDBC-on-Mac-OS-X" rel="noreferrer">https://github.com/snowflakedb/dplyr-snowflakedb/wiki/Configuring-R-rJa... | 1 | 1,653 |
Powershell error when invoking another script | <p>I have two scripts that run fine as seperate scripts, but when I invoke one from the other then I get this error message:<br></p>
<blockquote>
<p>Exception Name: System.Management.Automation.MethodInvocationException
Exception Type:
Exception Message: Exception calling "Open" with "3" argument(s): "Could not ... | 1 | 2,017 |
NSAttributedString and emojis: issue with positions and lengths | <p>I'm coloring some parts of a text coming from an API (think "@mention" as on Twitter) using NSAttributedString.</p>
<p>The API gives me the text and an array of entities representing the parts of the text that are mentions (or links, tags, etc) which should be colored.</p>
<p>But sometimes, the coloration is offse... | 1 | 1,148 |
Spring Cloud Vault: Token (spring.cloud.vault.token) must not be empty | <p><strong>Hi everyone</strong></p>
<p>I created a program to test the vault with start.spring.io. And I configure the vault in the <strong>bootstap.properties</strong> file like this:</p>
<pre><code>spring.application.name=vault-test
spring.cloud.vault.uri=http://localhost:8200
spring.cloud.vault.token=MY_ROOT_TOKEN
<... | 1 | 2,023 |
routing and module in symfony 1.4 | <p>I have a serious problem about routing and envirenement or module in symfony 1.4,so I created three modules frontend , mobile and backend.</p>
<p>So in frontend and mobile module,I'm using almost the same routing : </p>
<pre><code>//apps/frontend/config/routing.yml
home:
url: /home
param: { module: user, acti... | 1 | 1,094 |
bootstrap validator : can't get the form to submit (validation ok) | <p>I'm writing this question after a long research on the web and in the pugin documentation. I may have missed something here, but I can't find what. </p>
<p>I'm using the bootstrapvalidator (<a href="http://bootstrapvalidator.com/" rel="nofollow">http://bootstrapvalidator.com/</a>) plugin to try to validate form ins... | 1 | 2,142 |
TypeError: this.props.location.state is undefined - | <p>I have a little problem with my application developed in ReactJS.
Here are my components <strong>App.js</strong>, <strong>AppFront.js</strong> and <strong>index.js</strong>.</p>
<p>Index.js</p>
<pre><code>import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';... | 1 | 1,810 |
Restoring saved TensorFlow model to evaluate on test set | <p>I have seen a few <a href="https://stackoverflow.com/questions/34982492/restoring-tensorflow-model">posts</a> on restoring <code>TF</code> models and the <code>Google</code> doc page on <a href="https://www.tensorflow.org/how_tos/meta_graph/" rel="nofollow noreferrer">exporting graphs</a> but I think I am missing so... | 1 | 1,027 |
Bindable must be on a member in an Observable class | <p>I'm new in data binding , this is my code but I get this error on building </p>
<pre><code>class DatabindingViewModel :ViewModel() {
val currentFruitName:LiveData<String>
get() = FakeRepository.currentName
fun changeNameOnClick()=FakeRepository.changeRandomFoodName()
//two way LiveData
@Bindable
val ed... | 1 | 2,204 |
Mongo: Bad Auth Authentication failed. | <p>I am trying to do a <strong>mongoose</strong> connection from <strong>Mongo Atlas</strong>. I have a cluster <code>ayman</code> and I am trying to connect it from Terminal(Ubuntu 18).
It says that I have successfully connected to the shard, but it says authentication failed. I am giving credentials defined as SCRAM ... | 1 | 1,476 |
How to verify JWT signed by keycloak using java | <p>I have JWT generated by keyCloack, RS256 something like this</p>
<p>sample:</p>
<pre><code>eyJhbGciOwia2lkIiA6ICJtSG1lajZEc09GaV9MejdSMjhzWjdMWkxBRXVzIn0.eyBzA2MzQvOTcwNjM1L1NNUyIsIi83Ni83NS9TTVMiXSwicHJYW1lIjoidGVzdDEwNUB1c2VyLmNvbSIsInVzZXJOYW1lIjoidGVzdDEwNUB1c2VyLmNvbSIsInVzZXJJZCI6IjU4NDM2NmQ4LWU5NDItNGJhNy04OG... | 1 | 1,425 |
Deploy spring-boot and angular 7 application using war into tomcat 8.5 | <p>I am trying to deploy the Angular 7 + Spring Boot application using war into tomcat. I have followed some steps to create war with angular code. War is created successfully with UI code. But I am not able to call UI code.
When I trying to call </p>
<ul>
<li>localhost:8080/war-name</li>
<li>localhost:8080/war-name/... | 1 | 7,597 |
Perform action on UISearchBar when Keyboard is down and the x has been tapped | <p>I have a <code>UITableView</code> with a <code>UISearchBar</code> on top and have a specific requirement that isn't working. </p>
<p>I have no Cancel button on my <code>UISearchBar (showsCancelButton = NO)</code> so I rely completely on the x within the <code>UISearchBar</code> to cancel the existing search. I rely... | 1 | 1,235 |
Uncaught TypeError: Cannot read property 'data' of undefined | <p>I need some help with this code, I have found some similar issues:</p>
<p><a href="https://stackoverflow.com/questions/6550795/uncaught-typeerror-cannot-read-property-value-of-undefined">Uncaught TypeError: Cannot read property 'value' of undefined</a></p>
<p><a href="https://stackoverflow.com/questions/15... | 1 | 1,399 |
One-hot encoding in pytorch/torchtext | <p>I have a <code>Bucketiterator</code> from <code>torchtext</code> that I feed to a model in <code>pytorch</code>. An example of how the iterator is constructed:</p>
<pre><code>train_iter, val_iter = BucketIterator.splits((train,val),
batch_size=batch_size,
... | 1 | 1,159 |
Android: How to sending pictures via socket correctly | <p>I'm trying to revise my android code which can only send string originally. The task is to let it can transfer pictures. I know there are so many different ways to implement this. But I tried and really don't know why my pictures cant be sent, although there is no problem with the connecting.
Is there anyone who can... | 1 | 2,114 |
A state mutation was detected between dispatches but I haven't mutated state | <p>I know this question has been asked before, but in almost all of them talk about the OP mutating the state directly, which I've tried to avoid using techniques like the spread operator (in both objects and arrays) but in spite of that I'm getting the following error:</p>
<pre><code>Uncaught Error: A state mutation ... | 1 | 1,345 |
Entity Framework Core Problem with Scaffolding entity with foreign key constraint | <p>Hi I scaffold DbContext from existing database using EF Core. The result context contains 2 related entities in <code>OnModelCreating(..)</code> like this:</p>
<pre><code>modelBuilder.Entity<MauYdc>(entity =>
{
entity.HasNoKey();
entity.ToTable("MauYDC"... | 1 | 4,091 |
udp packet caught by tcpdump, but not received by socket | <p>I wrote a rawudp program to send udp packet via raw socket, following the webpage <a href="http://www.tenouk.com/Module43a.html" rel="noreferrer">http://www.tenouk.com/Module43a.html</a>.
Then I wrote a udp server to listen to udp packets on given port.
The codes look like follows:</p>
<pre><code>...
sd = socket(AF... | 1 | 1,844 |
Radio button checked dot is not coming in center | <p>My Radio button's checked dot is not coming in center if radio option is checked.</p>
<p>Please find my fiddle below:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>/* c... | 1 | 1,208 |
Deploying on wildfly produces "Unable to acquire lock after 15 seconds" exception | <p>I am working with wildfly and i am getting "Unable to acquire lock after 15 seconds" exception. I don't know why am getting this exception.I tried with wildfly 8,9 and 10 as well.
Here is the decription of exception </p>
<p>thanks.</p>
<pre><code> 17:30:56,743 ERROR [org.infinispan.interceptors.InvocationContext... | 1 | 3,880 |
JQuery UI Dialog textarea | <p>I am trying to put a textarea inside a JQuery UI dialog box. I want to prepopulate this text area with a value. If I use <code><textarea></code> the dialog box does not even open. However, if I change it to <code><input type="text"</code>> then my dialog box works just fine. I'm not sure if the issue is... | 1 | 1,837 |
Error : ngModel cannot be used to register form controls with a parent formGroup directive | <p>This is the parent component. Added a child component and passed the form. Here Using both the form Control Name & NgModel(Is this a best practice). While loading the page console error " ngModel cannot be used to register form controls with a parent formGroup directive."</p>
<pre><code><div class="inner-wr... | 1 | 1,833 |
PostgreSQL database backup is empty - what's wrong? | <p>I want to configure backup of the Alfresco database (PostgreSQL rdbms).</p>
<p>For that I have a script like this:</p>
<p>psql-create-backup:</p>
<pre><code>#!/bin/sh
pg_dump -h localhost -U postgres -Fc -Z9 -c -f /home/bykovan/alfresco-data-backup/"`date +%d-%m-%Y`".alfresco.backup alfresco
</code></pre>
<p>I s... | 1 | 1,646 |
Select2 parameter for templateResult and templateSelection different (django) | <p>I've got a strange problem. I have a product select element item in my web application. Because there are quite many products in the database I've decided to load them dynamically with select2. The issue is that I want to pass an additional parameter (Unit) that would be displayed opposite the select box. So to find... | 1 | 1,568 |
I cant change the font size or family in my bootstrap 4 navbar | <p>Hi I have tried multiple different solutions from this site and others but I cant figure out what is wrong with my code. I am very new to coding so excuse me if it's obvious. </p>
<p>I cant change my font-family or size etc of the nav links from the css.</p>
<p>Here is the code.</p>
<pre class="lang-html prettypr... | 1 | 1,301 |
WCF Web Service - Unable to build proxy classes | <p>I'm trying to build a web service using WCF. Since the service will ultimately be consumed by non-.net languages, I've been attempting to test it using "Add Web Reference" or using WSDL.exe instead of the svcutil way. I've been getting the following errors though:</p>
<p>From WSDL.exe
- Error: Unable to import bin... | 1 | 2,210 |
Npm Error: Can't find Python executable "python", you can set the PYTHON env variable on Windows 10 | <p>I'am trying to run npm i command on my project but its showing an error can't find python executable python. you can set python env variable. Please any one help me on this. Great thanks in advance.</p>
<pre><code>gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the ... | 1 | 2,523 |
Psycopg2 fails to install on python 3 with pip issuing a fatal error | <pre><code>$ yum install python3 postgresql python-devel libpqxx-devel
Loaded plugins: langpacks, refresh-packagekit
Package python3-3.3.2-8.fc20.x86_64 already installed and latest version
Package postgresql-9.3.2-2.fc20.x86_64 already installed and latest version
Package python-devel-2.7.5-9.fc20.x86_64 already insta... | 1 | 1,045 |
Remove Line from Canvas in WPF | <p>Hy guys, I'm trying to delete a Line previously created by button pressed. I also want the line to be deleted by button pressed. There are a large number of lines on my canvas, so I've tried selecting it by name to delete it but I failed. Also I tried by Uid and did not work. </p>
<p>Here is the code for the line c... | 1 | 1,154 |
Define the style for PhoneTextBox in windows phone | <p>I'm rewriting the style for the PhoneTextBox, changing the default background to "transpanrent", the foreground to "White" and the BorderBrush to "White", because I want to design a Dark-Theme.</p>
<p>But a problem came up that the text-input-indicator disappeared. I thank the reason is that the foreground of the t... | 1 | 6,059 |
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation | <p>I encounter this error when I want to read a .xlsx excel file on my remote server but strangely not on my local machine. I've tried changing my codes from <strong>MessageBox.Show(mymessage)</strong> to<br>
<strong>ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + mymessage+ "');", true);</str... | 1 | 1,145 |
Array with 10 different random elements with no duplicate | <p>im trying to make an array of 10 different elements with Random(), so basically i have this</p>
<pre><code>public static int[] RandomArray (int xArra[]) throws java.io.IOException {
Random Rand = new Random();
int nal;
for (int i = 0; i < xArra.length; i++) {
nal = Rand.nextInt(11); /*I woul... | 1 | 1,056 |
Couldn't open file yolov3_custom_last.weights when trying to run darknet detection | <p>I've been trying to use YOLO (v3) to implement and train an object detection of Tank with <code>OpenImage</code> dataset.
I have tried to get help from <a href="https://colab.research.google.com/drive/1Mh2HP_Mfxoao6qNFbhfV3u28tG8jAVGk" rel="nofollow noreferrer">this tutorial</a> and my code pretty much looks like it... | 1 | 1,242 |
Crash when deleting row - Inconsistency in section not being updated | <p>When I delete a row from UITableView using commitEditingStyle, my app crashes with the following error message. The odd thing though is I am deleting from section 3. The inconsistency according to the message is from section 4. </p>
<blockquote>
<p><strong>* Assertion failure in -[UITableView _endCellAnimationsWi... | 1 | 1,166 |
Bad Request -Post method - JSON DateTime issue | <p>I have a Visual Studio (2015) project that includes a client part (Xamarin.Forms PCL) and a web service part ( WCF Rest). The web services use edmx to communicate with the database ( SQL Server 2016). JSON is used to exchange the data.</p>
<p>I'm new to creating/consuming WCF Rest services. I have no issue using th... | 1 | 2,068 |
Bash script to install the software | <p>I have bash script to install the tomcat and java, this will happen based on user selection inputs, this is working good as we expected. when the java and tomcat is not present it will configure one by one as per the below code. if the tomcat and java is already present then it will through the error in the terminal... | 1 | 1,830 |
Serialize 2 level nested attributes using active model serializers | <p>I am having a trouble in getting the nested attributes during the serialization.
Below is my OptionType model which has many OptionValues associated to it.</p>
<pre><code>#app/models/option_type.rb
class OptionType < ActiveRecord::Base
# Plugins
translates :name, :description
accepts_nested_attributes_for ... | 1 | 1,462 |
Vertical divs that expand and contract on click | <p>My goal is to have five or so divs inside a parent div. When a div is clicked it should expand over the other divs. What confuses me is how to get said div to expand above the other divs so when the reset/back/close button is clicked all of the divs are shown once again. </p>
<p>When hovered, the div should expand... | 1 | 1,096 |
how to correctly use peopledetect.py in opencv? | <p>I'm newbie of opencv and I have real need for detecting people/human within some images, I find python interface named peopledetect.py and I look through code just like this..</p>
<pre><code>#!/usr/bin/env python
import numpy as np
import cv2
help_message = '''
USAGE: peopledetect.py <image_names> ...
Pr... | 1 | 1,128 |
Circe cannot find implicit encoder | <p>I am trying to encode a few classes into json strings, however no matter what I try, my classes do not seem to be able to find an implicit encoder for the case classes I am using.</p>
<p>Here's the smallest example I was able to pare it down to.</p>
<pre><code>import io.circe._
import io.circe.generic.semiauto._
i... | 1 | 2,082 |
Reset service object after each test | <p>I'm trying to test my Auth service in my AngularJS app.</p>
<p>This is the service:</p>
<pre><code>'use strict';
angular.module('testApp')
.factory('Auth', function ($window, $http, $location, $q) {
var currentUser;
return {
authenticate: function (email, password) {
... | 1 | 2,519 |
Use radio button in RecyclerView to allow only 1 selection | <p>I'm trying to use RadioButtons in a RecyclerView and I only want the user to be able to select one item. So if the user selects one the previously selected needs to be deselected. I am trying to handle this inside my onBindView method. This is the code in my adapter:</p>
<pre><code>public class SelectCategoryAdapte... | 1 | 2,105 |
ReactJS with server side PHP templates? | <p>I just started learning about ReactJS and trying to figure out how - if - I could use it with my existing templates genarated at the server side by Symfony2 app.</p>
<p>The idea is to use ReactJS for updating parts of view (widgets - or from technical point, Symfony2 "partial templates"), for example to update a co... | 1 | 1,467 |
Searching in Datagridview using textbox VB.net | <p>Good day I am a beginner at vb.net programming and I'm having a problem about searching or filtering the datagridview using textbox. I have a one textbox for searching and a two button for retrieving values which is the student and vehicle. When the student button clicked the data for student is displayed and same f... | 1 | 1,913 |
java.lang.ClassNotFoundException: org.apache.commons.digester.Rule | <p>This is not a new question, but Im help/clue less... so asking it here... Im getting the error "java.lang.ClassNotFoundException: org.apache.commons.digester.Rule" when Im trying to run a DynamicReport sample project. My specifications are below:
Java - 1.7,commons-beanutils-1.9.3,commons-collections-3.2.2,commons-d... | 1 | 1,064 |
Angular circular dependency warning | <p>tl;dr: scroll down to solution</p>
<p>I have a circular dependency and I am getting a warning, rightfully so, however, I am managing it. The issue is that I have a chat component. In the corner you can select to see their profile page, while in their profile page you have the option to send them a message, hence th... | 1 | 2,860 |
JWT Token does not begin with Bearer String ,and in axioms when sending it began with Bearer | <p>I'm trying to send a post request sending the token in the header and also as a string. The problem is authenticating the header in the backend gives me the error <code>JWT Token does not begin with Bearer String</code>.</p>
<p>Below is the relevant code.</p>
<p><strong>Frontend</strong></p>
<pre><code> getUser()... | 1 | 1,397 |
Realm is already in a write transaction if I execute two transactions in the same method | <p>I need to eliminate the first records recorded by the realm db if they are more than a certain number, but I get this exception:</p>
<pre><code>Caused by: java.lang.IllegalStateException: The Realm is already in a write transaction in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSh... | 1 | 1,508 |
My window is sizing up in OpenGL | <p>I want to make the size of my window (800,800), however the GL command</p>
<pre><code>glutInitWindowSize(800, 500);
</code></pre>
<p>Isn't effecting my code in any way. Bellow is the source code in its entirety.</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include &... | 1 | 1,269 |
Java wont connect to my MySQL database | <p>I've been trying to connect to my MySQL database but it wont connect to it. When running my application I am running it with mysql-java-connector.jar but it still wont work. </p>
<p>Here is the connection method I am using: </p>
<pre><code>public static void createConnection() {
try {
Class.for... | 1 | 1,155 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.