title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
AttributeError: 'Settings' object has no attribute 'DATABASE_ENGINE' | <p>Im new to django and python, trying to run a piece of django code on my system but im running into these problems , im running version 2.7 python and v1.4 django</p>
<pre><code>$ python manage.py runserver
Running in development mode.
Running in development mode.
Running in development mode.
Running in development ... | 1 | 1,222 |
Record Audio Using AudioRecord in android | <p>From the below code I can create test.pcm file but I couldn't play it in mobile or pc.</p>
<p>I have also tired with test.mp3, test.wav and test.raw. I got toast that player doesn't support this type of file. </p>
<p>does any one has idea that how can i play file which is i have recorded using AudioRecord?</p>
<... | 1 | 3,482 |
Flutter Streambuilder rebuilds constantly | <p>I have a stream builder listening to Firestore, and it kinda works. The main issue is that the streambuilder keeps rebuilding (if it doesn't cost me extra reads then no worries, but if it does then it's a problem which I'm assuming it does). When the main page first builds, when I segue to another page it builds aga... | 1 | 1,196 |
Expand Specific Accordion from URL | <p>If I use the adress "www.xxxxxx.com/test.html#chgd", the second accordion should be expanding.</p>
<p>I have used the source code from this website '<a href="https://stackoverflow.com/questions/22254248/bootstrap-3-expand-accordion-from-url">Bootstrap 3 expand accordion from URL</a>' but it does not work in this co... | 1 | 1,176 |
LinearLayout - Vertically not align | <p>I got a problem with LinearLayout on Android. I have four buttons. Each button has a fixed size, but the text can vary in length.</p>
<p>My problem is that they are not align with the top of each. They seen to be align with the top of the text inside of each botton which change depending on the number of line there... | 1 | 1,116 |
Resizing elements on formResize in delphi | <p>I'm currently trying to resize components in my form but i can't figure it out how it works. I've tried OnResize and OnCanResize event but it won't change my component heigh or widht.</p>
<p>What i did until now is adding like fixed values to my heigh when the user is resizing but it doesn't resize the given compone... | 1 | 3,306 |
log4net not logging in worker threads with MinimalLock model | <p>I have a rater "interesting" problem, where log4net doesn't write the log messages if they come from inside a worker thread in ASP.NET MVC. This seems to only be an issue when I've added <code><lockingModel type="log4net.Appender.FileAppender+MinimalLock" /></code> to my log4net configuration and when the webs... | 1 | 1,529 |
Tomcat 7 and AbstractSecurityWebApplicationInitializer are not working together | <p>I was following this <a href="http://blog.springsource.org/2013/07/03/spring-security-java-config-preview-web-security/" rel="nofollow">article</a> to try a basic http-auth without the use of a web.xml</p>
<p>I'm using Tomcat 7.0.41 and those are my dependencies on gradle:</p>
<pre><code> ext.springVersion = "3.... | 1 | 1,602 |
setState second argument callback function alternative in state hooks | <p>I made a code sandbox example for my problem: <a href="https://codesandbox.io/s/react-form-submit-problem-qn0de" rel="nofollow noreferrer">https://codesandbox.io/s/react-form-submit-problem-qn0de</a>. Please try to click the "+"/"-" button on both Function Example and Class Example and you'll see the difference. On ... | 1 | 1,756 |
jOOQ codegen maven plugin error with 3.4.1 but not with 3.1.0 | <p>I'm migrating a project from jOOQ 3.1.0 to jOOQ 3.4.1. I changed the jooq.version property in the pom file, launched a build, and got this error:</p>
<pre><code>[WARNING] Error injecting: org.jooq.util.maven.Plugin java.lang.NoClassDefFoundError: Lorg/jooq/util/jaxb/Jdbc;
</code></pre>
<p>I have tried <a href="htt... | 1 | 17,008 |
How to add new tabs with components using the 'name/selector of the component' programmatically using angular 2/4? | <p>I am using material tabs: <a href="https://material.angular.io/components/tabs/overview" rel="noreferrer">https://material.angular.io/components/tabs/overview</a></p>
<p>I have a page with a tab view that I want to use to populate one custom component per tab with a click of the button. Assume I have two components... | 1 | 1,117 |
Getting a user name through java script in sharepoint aspx page | <p>I am using Microsoft Office 365 (Plan P1). I have a user "ABC". I want that whenever ABC logs in, he is redirected to a specific site let's say Marketing site.</p>
<p>I am writing a javascript code as below:</p>
<pre><code><script type="text/javascript" language="javascript">
if(document.getElementById('<... | 1 | 2,889 |
Android autoLink cause render error | <p>I've got some problems with autoLink="phone" option of TextView.
My UI:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/TableLayout1"
android:layout_widt... | 1 | 2,467 |
Why am I getting this IndexOutofBoundsexception? | <pre><code>package org.example.mbtiapplication;
import java.util.ArrayList;
import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
im... | 1 | 4,345 |
Class cast exception in Ejb lookup | <p>I have a simple multimodule maven project with a war ejb and ear</p>
<p>When i am trying to access my ejb from a java pojo class using lookup it gives me class cast exception on wildfly it runs perfectly on jboss 7..</p>
<p>I have checked almost all the links related to this post please do help if anyone know how ... | 1 | 1,491 |
socket.setTcpNoDelay(true) is not working | <p>I have a problem in sending data packet using tcp socket. What my program does is pretty simple: Firstly, a client socket connects to a server socket. Then the server socket sends 5 "hello" back to the client and the client outputs the 5 "hello" to the console. Both the client and server run on my local computer and... | 1 | 1,119 |
How to force C# asynchronous operations to run in a...synchronized manner? | <p>I have these two classes: LineWriter and AsyncLineWriter. My goal is to allow a caller to queue up multiple pending asynchronous invocations on AsyncLineWriter’s methods, but under the covers never truly allow them to run in parallel; i.e., they must somehow queue up and wait for one another. That's it. The rest ... | 1 | 1,899 |
Modifying output of google.translate.TranslateElement.InlineLayout.VERTICAL | <p>I've read this answer <a href="https://stackoverflow.com/questions/9306015/modifying-element-from-google-translate-translateelement-results">Modifying element from google.translate.TranslateElement results</a> as well as others dealing with modifying the style and loading of the Google Translate translate element.</... | 1 | 1,168 |
How to FTP a file from an Android Gradle build? | <p>I'm trying to FTP the signed APK after a Gradle build. I've already added the new build config that will sign the APK, but I'm stuck trying to figure out how to invoke an FTP task. </p>
<p>I found an official looking sample at <a href="http://www.gradle.org/docs/current/userguide/organizing_build_logic.html" rel="n... | 1 | 1,301 |
Panning Image Using Javascript in ASP.Net Page Overflows Div | <p>I have an ASP.Net page that contains a <code><div></code> with an <code><img></code> tag within. The image is large so the <code><div></code> is set with a size of 500x500 pixels with overflow set to scroll.</p>
<p>I'm attempting to add image panning using a click and drag on the image. However, e... | 1 | 1,913 |
Azure Web Role not starting after upgrade to .Net 4.5 & osFamily 3 (Window 2012) | <p>I have MVC 3 Application that used to work fine on osFamily 1 (Win 2008 SP2) and .Net 4.0 and would like to upgrade to .Net 4.5 and Windows 2012.</p>
<p>My project is upgraded to .Net 4.5 and it builds without any problems and runs in emulator with no problems.</p>
<p>When I deploy to Windows Azure the role i get ... | 1 | 6,192 |
Getting username of logged in user in django | <p>I am new to Django and I just want to find a way to get the username of a logged in user and use it to get the boards of the user. I may have done the models wrong by adding another user model but I would like some help in getting the user's username. Here is my views file:</p>
<pre><code> from django.shortcuts ... | 1 | 1,134 |
How do I reference a role defined in a SAM template? | <p>I'm new to AWS SAM templates and want to be able to create a role with a selection of policies and then reference that role for a Lambda function. However, I get the following error when I try to deploy:</p>
<blockquote>
<p>Value 'MyRole' at 'role' failed to satisfy constraint: Member must
satisfy regular expr... | 1 | 1,468 |
"Failed: Cannot read property 'isPresent' of undefined" | <pre><code>it('should be able to create a task for a product as a CTA', function () {
browser.sleep(6222);browser.sleep(6222);console.log("ss");
productPage.productsTab.click();
expect(productPage.myProductsTab.isDisplayed()).toBeTruthy();
//select checkbox
productPage.selectProduct.click();
browser.sleep(... | 1 | 1,084 |
Unable to start activity ComponentInfo caused by NullPointerException | <p>When I run this code:</p>
<pre><code> package com.herring.android.finalproject;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.S... | 1 | 1,882 |
How to listen for Windows broadcast messages in .NET? | <p>i have an <code>Object</code> (i.e. not a form) that wants to listen for broadcast messages from Windows, e.g.:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms725497%28v=vs.85%29.aspx" rel="nofollow"><code>WM_SETTINGCHANGE</code></a></li>
<li><a href="http://msdn.microsoft.com/en-us... | 1 | 2,053 |
Laravel Eloquent Relationship - Inserting data into multiple tables | <p>I have the following structure:</p>
<p>3 tables: movies, actors, genres</p>
<p><strong>Movies Table Schema:</strong></p>
<pre><code>Schema::create('movies', function (Blueprint $t) {
$t->increments('id');
$t->string('title');
$t->integer('genre_id')->unsigned();
$t->... | 1 | 1,366 |
ERROR 1142 (42000): SELECT command denied to user 'admin'@'localhost' for table 'user' | <p>Getting the error depsite seemingly having rights to perform SELECT and other privileges</p>
<pre><code>mysql> show privileges;
+-------------------------+---------------------------------------+-------------------------------------------------------+
| Privilege | Context ... | 1 | 2,531 |
Kubernetes RBAC - forbidden attempt to grant extra privileges | <p>I'm using <code>Kubernetes</code> v1.8.14 on custom built <code>CoreOS</code> cluster:</p>
<pre><code>$ kubectl version --short
Client Version: v1.10.5
Server Version: v1.8.14+coreos.0
</code></pre>
<p>When trying to create the following <code>ClusterRole</code>:</p>
<pre><code>$ cat ClusterRole.yml
---
apiVers... | 1 | 6,203 |
PHP Serial Port Access | <p>I am trying to implement this code below, I have a wavecom gsm modem connected to COM6 <a href="http://imgur.com/QwkwfMc" rel="nofollow">http://imgur.com/QwkwfMc</a> it works on 3rd party sms gateway software but it is very expensive.</p>
<p>I am getting these errors</p>
<blockquote>
<p>Fatal error: Uncaught exc... | 1 | 2,564 |
How to calculate selected area longitude and latitude in google map? | <p>I am using google map API integration.I need to get latitude and longitude from particular selected area in that map. In my script based on selected area in google map.</p>
<pre><code> function clearSelection() {
if (selectedShape) {
selectedShape.setEditable(false);
selectedShape =... | 1 | 2,262 |
Browser connects to WCF service but not my WCF client. What can be the reason? | <p>On a production server (Windows Server 2003 SP2) I can connect to a remote WCF service with Internet Explorer 8: When I browse to the URL <a href="http://www.domain.com/Service.svc" rel="nofollow noreferrer">http://www.domain.com/Service.svc</a> (where my service listens) I get the expected info page of the service ... | 1 | 1,351 |
STM32F0 System Clock PLL configuration and/or temperature causing error? | <p>My project has started experiencing a problem in which the SysTick rate is usually, but not always set too fast. I have not changed the code that is relevant, and it seems to be temperature-related.</p>
<p>I am using an STM32F072B-DISCOVERY board, with VisualGDB on Visual Studio Community 2015.</p>
<p>My initializ... | 1 | 1,907 |
Java's Card Class example - printing enum values | <p>I am using the class card example from java website to try to build a game.</p>
<p><a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html" rel="nofollow noreferrer">http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html</a></p>
<p>I am taking in the number of hands and the number of cards pe... | 1 | 2,194 |
jQuery - jCarouselLite - Images are not showing up | <p>I have incorporated jCarouselLite with my already working site, however the PREV and NEXT buttons appear, but no IMAGES. The image links are correct.</p>
<p>Any ideas?</p>
<p>jQUERY:</p>
<pre><code><script type="text/javascript">
//jCarouselLite
$(function() {
$(".slider").jCarouselLite({
... | 1 | 1,510 |
msbuild wix proj file | <p>I have a current build using teambuild/msbuild that I need to integrate a wix compilation into.</p>
<p>The Wix project is not part of the solution that is being built instead it lives with the various tools that get pulled in with the TFSBuild.proj directory.</p>
<p>Before I can build the setup project I have to u... | 1 | 1,200 |
Codepen : " Uncaught SyntaxError: Unexpected token ( " in browser console when other environments don't throw errors | <p>I keep having
Uncaught SyntaxError: Unexpected token ( at pen.js:121
on my code on codepen, which causes it to abort execution, although it is working in Brackets & other editors and other people browsers.</p>
<p>Here is the link : <a href="http://codepen.io/N0bl3/full/EKPYZB/" rel="nofollow">http://codepen.io... | 1 | 3,273 |
Laravel Custom Wrapper for API Responses | <p>I am trying to structure my project in <code>Laravel</code> just created to use it as a <code>back-end API</code>. I want all my responses from <code>Laravel</code> to be returned in the <code>JSON:API</code> format defined on the official site: <a href="https://jsonapi.org/format/" rel="nofollow noreferrer">https:/... | 1 | 1,563 |
Calling Web Services with PHP SoapClient - How to? | <p>I am going crazy starting off with Web Services. I am trying to call the following WSDL using PHP and keep getting nowhere:</p>
<p><a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/usg/SessionCreateRQ.wsdl" rel="nofollow noreferrer">http://webservices.sabre.com/wsdl/sabreXML1.0.00/usg/SessionCreateRQ.wsdl</... | 1 | 2,240 |
Laravel routes going to wrong route | <p>I do not understand the following problem.</p>
<p>Here are me routes:</p>
<pre><code>Route::get('events', array('as' => 'events' ,'uses' => 'EventController@index'));
Route::get('event/{id}', array('as' => 'event' ,'uses' => 'EventController@view'));
Route::get('event/new_event', array('as'=> 'new_e... | 1 | 1,552 |
Apply Twitter Bootstrap stylings to CodeMirror? | <p>I have a form with a textarea where users can write some code. I'm replacing that textarea with a <a href="http://codemirror.net/" rel="noreferrer">CodeMirror</a> code editor box, so I want to apply Bootstrap stylings to it.</p>
<p>This is what the form looks like right now, where all the form elements except the c... | 1 | 1,108 |
How can I get location after 30 seconds in android? | <pre><code>import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle... | 1 | 1,259 |
Codeigniter 3 Docker Compose Setup | <p>I am currently working with WAMP on my computer, but I would like to move over to docker in order to make the Codeigniter application's setup easier. I am using CodeIgniter 3 which I have setup to use the HMVC model. On the docker setup, I can get to the index page of the whole application from the browser, but I ge... | 1 | 1,674 |
how to load Json to flutter listview | <p>I'm new to flutter and I'm developing a flutter app where I have to show in a listView the data on the database.</p>
<p>I get the data in JSON format.</p>
<pre><code>{
"data": [
{
"id": “1”,
"testo": "Fare la spesa",
"stato": "1"
},
{
"id"... | 1 | 1,223 |
Should I use npm install or npm update to keep my code up to date? | <p>So I'm working on some projects within my work space and I notice that a lot of my dependencies are roughly 3 years old, including React itself. The thing I'm worried about is that if I run <code>npm install</code> or <code>npm update</code> that things might break and I could run into a plethora of issues. In my ... | 1 | 1,503 |
table2CSV.js - Works wonderful, but having issues specifying which table to export | <p>I'm having trouble exporting using table2CSV.js when there are multiple tables on the page. </p>
<p>The first one will work correctly, but any other buttons will export a blank file. Any ideas? If you need more info please advise.</p>
<p>I want to add that it's always the first table on the page that works corr... | 1 | 2,019 |
Django Multilanguage on Models and Templates | <p>I've watched many solutions for working with models in multilanguage. But none of them it's easy enough to apply, including that doesn't work with south.
The apps that I watched was obtained from:</p>
<ul>
<li><a href="http://goodcode.io/blog/django-multilanguage/" rel="nofollow">http://goodcode.io/blog/django-mult... | 1 | 1,088 |
Cannot read property 'match' of undefined at useParams - React Hooks | <p>I am trying to send params in React Router and getting below error</p>
<p><a href="https://i.stack.imgur.com/3wRwK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3wRwK.png" alt="enter image description here" /></a></p>
<p>Code for reference
In my Route.js I have added browserRouter and Route</p>
... | 1 | 1,496 |
Spring mvc application does not start in Tomcat when i add global-method-security | <p>I am trying add method level security to my Spring MCV/Security. The application works if don't add
<code><security:global-method-security pre-post-annotations="enabled"/></code>.</p>
<p>I want method level security on controller methods which have request mappings </p>
<p>Tomcat error</p>
<p>FAIL - Applica... | 1 | 8,649 |
Recyclerview does not show anything? | <p>I'm trying to show list of strings in recycler view. For some reason it is not working. it does not show anything.
I dont know why it is not working, its not the first time that i use that, usally i did it with firebase recycler.</p>
<p>Here is my code</p>
<pre><code> rvTypeMusic = (RecyclerView)findViewById(R.i... | 1 | 1,499 |
Python mailbox encoding errors | <p>First, let me say that I'm a complete beginner at Python. I've never learned the language, I just thought "how hard can it be" when Google turned up nothing but Python snippets to solve my problem. :)</p>
<p>I have a bunch of mailboxes in Maildir format (a backup from the mail server on my old web host), and I need... | 1 | 1,744 |
extract a subdomain of data from a netcdf file using lat and longs as references | <p>I am trying to extract a specific subdomain of data from a 'tasmax' variable, from a netcdf file based on latitude and longitudes.My extraction criteria are: latitudes between 44 and 50 degrees latitude; and between 5 and -5 degrees longitude (France).</p>
<p>My 'lat' variable is 105 by 102 (dimensions: rlon,rlat, ... | 1 | 1,184 |
How to draw a Spanned String with Canvas.drawText in Android | <p>I want to draw a <code>SpannedString</code> to a <code>Canvas</code>.</p>
<p><a href="https://i.stack.imgur.com/TDlwU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TDlwU.png" alt="enter image description here"></a></p>
<pre><code>SpannableString spannableString = new SpannableString("Hello World!");
Fo... | 1 | 1,498 |
Camera.open() blocking UI thread | <p>I've looked at all the SO articles I could find on this but none of the solutions work for me.</p>
<p>When called Camera.open(), there is a 3 second (give or take) delay where the UI thread is blocked. I have attempted to put that in a background thread. I'm currently using the solution found <a href="https://sta... | 1 | 6,746 |
Microsoft C++ HTTP Server API (httpapi.lib) HttpReceiveClientCertificate function Return ERROR_NOT_FOUND ( 1168 ) | <p>Microsoft C++ HTTP Server API (httpapi.lib) for HTTPS</p>
<p>I want create https server in c++ by Microsoft http server api
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364510(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/aa364510(v=vs.85).aspx</a></p>
... | 1 | 4,904 |
jQuery: Change an element value after Ajax Call | <p>I am trying to change the value of a span after using jQuery.ajax.</p>
<h2>JavaScript</h2>
<pre><code>$(document).on('click', '.kssico', function(event) {
var for_uid = $(this).parents("li").attr('data'),
for_name = $(this).parents("li").attr('unme'),
dataString = "for_uid=" + for_uid + "&f... | 1 | 1,049 |
Calculate/validate bz2 (bzip2) CRC32 in Python | <p>I'm trying to calculate/validate the CRC32 checksums for compressed bzip2 archives.</p>
<pre><code>.magic:16 = 'BZ' signature/magic number
.version:8 = 'h' for Bzip2 ('H'uffman coding)
.hundred_k_blocksize:8 = '1'..'9' block-size 100 kB-900 kB
.compressed_magic:4... | 1 | 1,905 |
java.lang.RuntimeException: Unable to destroy activity | <p>In my android application I've given event option on overflow menu and on the event option the map is loaded but when I'm pressing back button the application unfortunately stopped. I've posted the code nad logcat as well.</p>
<pre><code>AlertActivity.java
public class Alert_activity extends Activity implement... | 1 | 9,993 |
GridView cannot display image | <p>Sorry for troubling. Im trying to display the selected fields in a asp.net gridview. i can display everything except the "product_img" where i should display the relevant picture in the gridview. </p>
<p>The problem is in gridview when i attached image url of image control to code-<code>'<%#"InsertProd.aspx.cs?p... | 1 | 1,144 |
Add multiple objects to an array? | <p>Every time I click an option of size and click add to cart I would like to add the data of the selected object to this array <code>cart</code>. This currently works kinda but only one object can be added and when you try to do it again the old data disappears and is replaced with the new object. </p>
<p>I would lik... | 1 | 1,115 |
How to remove [DCC Error] : E2035 Not enough actual parameters | <p>I am a Delphi learner. I was looking for some codes to convert basic colours in Hue, Saturation and Value. I have got it in <a href="https://stackoverflow.com/questions/17743821/how-to-convert-hsb-to-rgb">this forum</a> and I have implemented it like :</p>
<pre><code>unit Unit1;
interface
uses
Winapi.Windows, ... | 1 | 2,098 |
Plot NetCDF variable-grid data file using ggplot2: "Vector is too large" error | <p>I need to plot some data from <a href="https://copy.com/ZZk2oJNXxCTVJ4eu" rel="nofollow noreferrer">this</a> NetCDF file (1.1MB).</p>
<p>The file contains a 413x229 grid (94577 points). Every point has a precipitation value which I need to print in the correct LAT-LON. The grid is not necessarily constant, so that ... | 1 | 1,234 |
Subtitles/captions with Microsoft Azure Speech-to-text in Python | <p>I've been trying to figure out how to make subtitles with Microsoft Azure Speech Recognition service in Python, but can't figure it out. I've followed the tips someone else has answered here on getting the individual words, but even formatting those to .srt or .vtt seems convoluted.
Here's the code:</p>
<pre><code>i... | 1 | 1,418 |
Application crashing due to use of ANativeWindow API | <p>I'm calling my native function that uses <code>ANativeWindow API</code> from the java code from an <code>UI</code> thread as shown below:</p>
<pre><code>MainActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
// your stuff to up... | 1 | 1,857 |
Django tastypie: Resource show different in detailed request as in list request | <p>I Am just starting with django tastypie, and I Am enthousiastic about it.
My question: I Am searching for the same feature as in the admin view:
specify for foreignkey fields what to see in the list response of other objects and what in the detailed response.</p>
<p>let's say this is my simplyfied model:</p>
<pre>... | 1 | 1,310 |
Getting control value when switching a view as part of a multiview | <p>I have the following code in my aspx page:</p>
<pre><code><asp:Button id="display_button" runat="server" Text="Display" OnClick="Button1_Click" /> &nbsp;
<asp:Button id="edit_button" runat="server" Text="Edit" OnClick="Button2_Click" /> &nbsp;
<asp:Button id="save_button" runat="server" Text... | 1 | 1,356 |
Wrapping a db object in Go and running two methods in the same transaction | <p>In the effort of learning Go a bit better, I am trying to refactor a series of functions which accept a DB connection as the first argument into struct methods and something a bit more "idiomatically" Go.</p>
<p>Right now my "data store" methods are something like this:</p>
<pre class="lang-go prettyprint-override... | 1 | 1,247 |
FFMPEG for Android toolchains: arm-linux-armeabi-eabi-pkg-config - is there any toolchain in existence containing the pkg-config tool | <p>Does anybody know any toolchain for <b>ffmpeg linux arm </b> platform which contains the <b>arm-linux-androideabi-pkg-config</b> tool? <br><br>The Android NDK does not contain it. Also has anybody succeeded in building ffmpeg for android that contains the alsa device? Please note that libasound is present on my Ubu... | 1 | 1,965 |
How to make a button light up on hover with twitter bootstrap | <p>I'm building a site using the twitter bootstrap CSS, but I've run into a problem.</p>
<p><a href="http://twitter.github.io/bootstrap/scaffolding.html#responsive" rel="nofollow">nav bar example</a></p>
<p>If you look towards the end, "Bootstrap" is sort of hidden; it only lights up when you mouseover it (but it is,... | 1 | 1,249 |
Fortran procedure pointer to subroutines in derived type | <p>In Fortran, I need a procedure pointer inside a derived type that can point to one of several subroutines. This problem seems to be common on SO:</p>
<p><a href="https://stackoverflow.com/questions/34167276/fortran-save-procedure-as-property-in-derived-type">Fortran save procedure as property in derived type</a></p... | 1 | 2,514 |
Getting white screen on running npm start in my react js project | <p><a href="https://i.stack.imgur.com/LC5Vr.png" rel="nofollow noreferrer">So is <strictmode causing this problem ???</a><a href="https://i.stack.imgur.com/JnIAQ.png" rel="nofollow noreferrer">2</a>I am getting a white screen while i am trying to run npm start . The npm start works but I am getting a white screen on... | 1 | 2,241 |
White space at end of webpage, IE and Chrome show it in a different place? | <p>Hey all I posted a question earlier here : <a href="https://stackoverflow.com/questions/7460319/why-am-i-getting-white-space-between-my-html-element">Why am I getting white space between my HTML element?</a> which was solved.</p>
<p>I have continued working on this page and have ended up with the following:</p>
<p... | 1 | 1,722 |
Saving bounding box coordinates and images based on the class type into a different folder | <p>I'm using OpenCV + Python to apply a deep learning model and classify objects in 8 categories (animal types) namely, cat, dog, horse, deer, bear, lizard, monkey, no object detected (when the is no object detected in the image). </p>
<p>I have a folder that has images of all types of animals in it. I read all the im... | 1 | 3,185 |
How to convert ISO 8601 period to a string readable by humans [Android Studio]? | <p>Any suggestions on how to convert the <a href="https://en.wikipedia.org/wiki/ISO_8601#Durations" rel="noreferrer">ISO 8601 duration</a> format <code>PnYnMnDTnHnMnS</code> (ex: P1W, P5D, P3D) to number of days?</p>
<p>I'm trying to set the text of a button in a way that the days of free trial are displayed to the u... | 1 | 1,068 |
Gradle & Log4j - Unsupported Major.minor version 51.0 when trying to build | <p>I am using gradle to build and distribute a project, but I am getting an error whenever I try to use build command. </p>
<p>Here is the error message: </p>
<pre><code>C:\Users\jamatic\workspace\PersonModule>gradle clean build cleaneclipse eclipse
--stacktrace
:clean
:compileJava
error: Exception thrown while co... | 1 | 4,020 |
Hotel Reservation system in Django: How to make a room unavailable to other users for a period of time | <p>I am building a hotel reservation system for my a-level coursework and my problem is when a user books a room I want to make sure no other user can reserve that room for the duration of the time period that the room is occupied.</p>
<p>I tried using iteration to loop over the dates and have a boolean value that is ... | 1 | 1,536 |
Scrollable table with header and first 3 columns fixed | <p>I have a table with fixed header but the header and the body are not aligned properly. The no.of columns is more than 25. If I remove <code>"display:block"</code>, the header is not fixed.</p>
<p>Here is my Code </p>
<pre><code> <table width="100%" style="font-size:13px" id="data" cellpadding="4" cellspacing="5... | 1 | 16,814 |
APACHE 7 Failed to start component [StandardEngine[Catalina].StandardHost[localhost]] | <blockquote>
<p>I am trying to run maven application from eclipse Helios tomcat 7 server
and its giving me this error.
And also if you could tell me how to run maven application inside eclipse server</p>
</blockquote>
<pre><code> java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: F... | 1 | 2,979 |
$(...).getJSON is not a function | <p>I'm trying to develop a simple API call that returns my comments in a JSON response but when I click on it I get the error</p>
<p><code>$(...).getJSON is not a function</code> </p>
<p>My idea is, when I click on the button "Comment"(id=showarea) it immediately prints the comments from that answer and the textarea.... | 1 | 1,599 |
Standalone verification of Keycloak access-token | <p>I am using Keycloak to handle login and generate JWT tokens. I need to be able to verify the access token that I'm sending to my REST API service. Best practice is to use the JWT secret to verify the token directly rather than send it to the Keycloak server for verification. There are a lot of Java examples of doi... | 1 | 1,705 |
can't create persistent store coordinator | <p>I am getting the following error:</p>
<pre><code>*** Terminating app due to uncaught exception 'NSInternalInconsistencyExprojectception', reason: 'Managed object store failed to create persistent store coordinator: Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130... | 1 | 2,622 |
"no view found for id for fragment" error before onCreateView() called | <p>This is related to several posts, but I don't see anything that explains the order of view creation in the view hierarchy (static - xml and dynamic - in code).</p>
<p>I have a FragmentActivity hosting an Activity and a Fragment. I'm getting a runtime error from a view not being created for the fragment before the ... | 1 | 2,383 |
Spring MVC - The @SessionAttributes and status.setComplete() | <p>I'm facing a problem I don't really know how to solve.
I am developing a Bug Tracker (learning purposes only). I have a page to create a new issue and one page to edit an issue. Both, for now, have their own controllers.</p>
<p><strong>EditIssueController.java</strong></p>
<pre><code>@Controller
@RequestMapping(va... | 1 | 1,447 |
Fragments Failed to inflate | <p>I'm a little shakey on this so bear with me. I'm trying to teach myself and I'm currently working out of the WROX Android 4 Application Development for Beginners book. I'm currently on the section "Communication between fragments" and I feel like I'm getting it, but when I run the code taken right out of the book, ... | 1 | 3,604 |
'mongodump' is not recognized as an internal or external command,operable program or batch file | <p>Here I am going to back up my MongoDB <strong>Atlas</strong> database on my <strong>MERN</strong> project. I use the below code to backup, but this message shows when I run the express server. First create mongodb_backup.js, cron.js and require the server.js file. These are all working fine.
And one thing that is t... | 1 | 1,141 |
int/char conversion in network frames with C++/boost::asio | <p>Using g++ and boost::asio, I'm trying to format network message frames containing the size of the data to be transmited:</p>
<pre><code>+----------------+------------------------+
| Length | Message string |
| 4 bytes | n bytes |
+----------------+------------------------+
</co... | 1 | 2,605 |
Run Cucumber tests inside a docker container using java | <p>Problem statement : There is a linux vm on cloud , that we use to run our regression tests (The test source code is resides in the vm ), so we just need to create a docker container with a grid installed , we then call mvn clean test to run the tests on the grid</p>
<p>I tried two different approaches to this pro... | 1 | 2,129 |
How can I generically deserialize PropertyInfo with Json.NET? | <p>I need to serialize many different objects with Json.NET. I really have no control over the objects being provided, so I'm generically serializing and de-serializing with <a href="http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_TypeNameHandling.htm" rel="nofollow">TypeNameHandling.All</a>.</p>
<p>Howeve... | 1 | 1,233 |
Sweetalert2 multiple input validation | <p>I'm trying to have multiple forms inside mutiple modals, as I've read I have to use <code>swal.mixin</code> with queue, all of these forms have multiple inputs inside. </p>
<p>I've already done that, but can't find a way to validate all of these forms, any sugestion? </p>
<p>Here's my code:</p>
<pre><code> swa... | 1 | 1,421 |
Magento 2 / Custom Config Field Array Mapping | <p>hope your will have the time to help me.
On any circumstances my Magento 2 Array Mapping will not write selected="selected" to my field. Getting crazy about this.
The Data will be saved and fetched correct.</p>
<p>Big thanks to your help.</p>
<p>Version: Magento 2.2.2</p>
<p>/app/code/Sumedia/Switcher/Block/Admin... | 1 | 3,729 |
GCM connection error | <p>I am trying out implementing gcm server application using XMPP(CCS) and i cant able to connect to the google servers.
I am trying out the sample code from <a href="http://developer.android.com/google/gcm/ccs.html" rel="nofollow">http://developer.android.com/google/gcm/ccs.html</a></p>
<p>when i try to connect</p>
... | 1 | 1,214 |
Express/sequelize app deployed to Heroku giving SequelizeConnectionRefusedError | <p>I have an express/sequelize app that works fine in development on my machine. I've tried to deploy it via Heroku. I have a postgres database linked to my heroku app. The build passes, but the app won't launch. The error message from Heroku logs is:</p>
<blockquote>
<p>2016-12-03T11:26:06.614800+00:00 app[web.1... | 1 | 1,746 |
array_slice - how come this doesn't work in foreach | <p>total noob here. I've an array which looks like:</p>
<pre><code>Array
(
[15] => Array
(
[0] => Array
(
[id] => 5216
[name] => Grow your own Irish Shamrock gifts set
[ordered] => 473
[image] => FunShamrock... | 1 | 1,058 |
Adding dynamic components in a NgFor | <p>I would like to create a component which takes another one in parameter, and generate a collection of instances of this component.</p>
<p>(The objective in the end is to create a generic backoffice).</p>
<p>For example, with something like that :</p>
<pre><code><common-collection [component]="collectionDisplay... | 1 | 1,343 |
Positioning issue with border box sizing using padding by percentage | <p>I have problem aligning my div with box-sizing:border-box when I start to use padding by percentage, the position of the box will not match the percentage of the positions.</p>
<p>Here's the code, paste it to any html file to view it:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>Te... | 1 | 1,130 |
How to mount a volume to a pod in Kubernetes | <p>I'm trying to change my express server deployment from Deployment to Statefulsets in my Kubernetes cluster. After I added the volumeMounts to the yaml file, I gets the following error from the pod's log:</p>
<pre><code>npm ERR! path /usr/src/app/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall o... | 1 | 1,305 |
LNK 2019 unresolved symbol - FFmpeg | <p>I'm trying to use FFmpeg to open and read a video .avi
I work on win7 x64 with Visual Studio 2010</p>
<p>For now my code is very simple:</p>
<pre><code>#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "SDL.h"
#include "SDL_mixer.h"
int main (int argc, char *argv[]) {
AVFormatContext *p... | 1 | 1,134 |
Modified Knapsack algorithm | <p>I've different classes of items. Each item has <code>value</code> and <code>weight</code>. </p>
<p>For example:</p>
<p><code>ClassA: [A1, A2, A3]</code></p>
<p><code>ClassB: [B1, B2, B3]</code></p>
<p><code>ClassC: [C1, C2, C3]</code></p>
<p>How should I modify classic 0-1 Knapsack problem so that algorithm opt... | 1 | 1,232 |
How to improve performance of GeoIP query in BigQuery? | <p>I have loaded my application logs in BigQuery and I need to calculate country based on IP address from those logs.</p>
<p>I have written a join query between my table and a GeoIP mapping table that I downloaded from <a href="http://dev.maxmind.com/geoip/legacy/geolite/" rel="noreferrer">MaxMind</a>.</p>
<p>An idea... | 1 | 1,047 |
Testing Activity Using Mockito Framework | <p>Below is the Simple Calculator Application and I want to test it using Junit4 and mockito Framework i test that application on Junit4 and it works properly but I am facing problem on mockito implementation</p>
<p><strong>CalculatorOperationsInterfaces.java</strong></p>
<pre><code>public interface CalculatorOperati... | 1 | 1,037 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.