title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
In C++11 lambda syntax, heap-allocated closures? | <p>C++11 lambdas are great!</p>
<p>But one thing is missing, which is how to safely deal with mutable data.</p>
<p>The following will give bad counts after the first count:</p>
<pre><code>#include <cstdio>
#include <functional>
#include <memory>
std::function<int(void)> f1()
{
int k = 12... | 1 | 1,384 |
Spring Boot Test: Unknown Entity when using hibernate | <p>Following along on a theme of questions related to Spring Boot. I am trying to set up a an integration test with the following:</p>
<pre><code>@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {TestApplicationConfig.class,TestPersistenceConfig.class,MvcConfig.class,SecurityConfig.class},loader... | 1 | 4,939 |
Codility: PrisonEscape Solution | <p>I've recently solved <strong>PrisonEscape</strong> challenge on <strong>Codility</strong>.
<a href="https://codility.com/programmers/challenges/phosphorus2014" rel="nofollow">Phosphorus</a></p>
<p>I got <em>33/100</em>. To my opinion my code was covering all of the corner cases. Unfortunately it didn't. </p>
<p>L... | 1 | 2,406 |
NodeJS/Mongo: Looping a query through various collections | <p>I'm looking to loop a query through various collection with MongoDB using the <a href="http://mongodb.github.io/node-mongodb-native/2.2/api/index.html" rel="noreferrer">NodeJS Driver</a>.
For this test, I've used the <a href="http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#findOne" rel="noreferr... | 1 | 1,886 |
cmake error with catkin_make, ROS installation | <p>I have created a workspace as catkin_ws. Then, <code>catkin_make</code> was run successful.
After I type <code>catkin_create_pkg ros_basics_tutorials std_msgs rospy roscpp</code> and then the all folders and files created in ros_basics_tutorials folder.</p>
<p>However After this command, I type <code>cd catki... | 1 | 1,191 |
Sending GPS location via GSM module | <p>I am using a SIM900A GSM module and a NEO-6m GPS module. I want to send the location via the GSM module when the GSM module receives a message.</p>
<p>My code is working when I am receiving and sending any message with the help of the GSM module, but it is not working when I join the two, i.e. GPS and GSM modules.<... | 1 | 1,625 |
Retrieve Specific Active Directory Properties | <p>I'm using the built in .NET System.DirectoryServices.ActiveDirectory to access an Active Directory Domain Controller. </p>
<p>I'm attempting to enumerate the collection of user properties from the server - not the values, but rather a list of modifiable settings for any user.</p>
<p>Essentially, this is a mirror o... | 1 | 5,336 |
Android ListView: Application did not close the cursor or database object | <p>My <code>listview</code> activity will not display a particular row(<code>sName</code>) in my List view <code>UI</code>. I am able to add item to me <code>sqlite</code> DB but after trying to get my <code>listview</code> to refresh when my DB is updated, my list view is blank. </p>
<p>I do not receive any error whe... | 1 | 1,738 |
How to enable nvm in steps in circleci 2.0? | <p>Here are my steps in my </p>
<pre><code>steps:
-run:
name: Setup nvm and npm
command: |
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
export NVM_DIR=$HOME/.nvm
source $NVM_DIR/nvm.sh
nvm install 8.9 && nvm alias default 8.... | 1 | 1,303 |
Can't get Chart.js to run in a Vue.js component | <p>So I am trying to display a nice chart using <a href="http://www.chartjs.org/docs/" rel="nofollow">Chart.js</a> inside a Vue.js component... Should not be so complicated but I am hitting a wall there.</p>
<p>Here is my component code (syntax is based on <a href="https://github.com/vuejs-templates/webpack" rel="nofo... | 1 | 1,058 |
Condition does not work when using a streamBuilder in Flutter | <p>I'm trying to implement a screen that displays data from Firebase but I want the <code>streambuilder</code> to check if the database is empty, if it's empty I want it to show a text saying "no data" but if it's not, I want it to show the data from firebase.</p>
<p>This is the code I have but it does not wo... | 1 | 1,358 |
Twitter Bootstrap - Make row take up the remaining height | <p>Before people mark this question as duplicate, let me tell everyone I have tried all the suggestions that were given before in SO, especially <code>display: table</code>. That does not work with Bootstrap.</p>
<p>What I want to achieve is the following-:</p>
<pre><code>---------------------
| Nav Bar |
|... | 1 | 2,036 |
Identity 2.1 - Remove from all previous roles, then add to specific role? Plus error in calling UserManager when doing so | <p>I am writing a user manager for a system administrator where you can perform various functions on the user object. My current dilemma is I want to be able to write something like</p>
<pre><code>await UserManager.RemoveFromRoleAsync(userID, any);
</code></pre>
<p>and have that person removed from all previous roles... | 1 | 1,932 |
SwiftUI Combine: @Published is only available on properties of classes | <p>I have the following code and Im getting the message error:</p>
<blockquote>
<p>'wrappedValue' is unavailable: @Published is only available on
properties of classes</p>
</blockquote>
<pre><code>//*
/**
Chat
Created on 29/07/2020
*/
import SwiftUI
let lightGreyColor = Color(red: 239.0/255.0, green: 243.0/255.0, blu... | 1 | 1,622 |
WPF Binding not updating Visibility | <p>I'm having trouble with the binding to a visibility of a grid. I've had projects where I've done this before and have tried to replicate the same coding used previously, and I've searched around and added in the bool to visibility converter based off some other articles but still nothing.</p>
<p>All that I am tryi... | 1 | 2,400 |
Issues with WCF and SOAP WS-Security PlainText Username (No SSL) | <p>We need to consume a SOAP 1.1 Web Service, developed using Java, from within a C#/.Net 4.0 application. We have no access to the service programming or the server it resides on. The service is exposed over a non SSL connection and requires WS-Security, Username/PasswordText.</p>
<p>Using SoapUI (http://soapui.org... | 1 | 1,318 |
SwiftUI Programmatically Select List Item | <p>I have a SwiftUI app with a basic List/Detail structure. A new item is created from
a modal sheet. When I create a new item and save it I want THAT list item to be
selected. As it is, if no item is selected before an add, no item is selected after
an add. If an item is selected before an add, that same item is selec... | 1 | 1,576 |
How to align text with the bottom of an XSL-FO block? | <p>I am writing an XSLT script, that transforms an XML input document to an XSL-FO intermediate document, which get transformed into a PDF output document.</p>
<p>My <code>fo:simple-page-master</code> exists out of three parts, a page header, body, and footer.</p>
<pre><code><fo:layout-master-set>
<fo:si... | 1 | 1,117 |
fullcalendar set color of dropped div | <p>This is my full calendar implementation:</p>
<pre><code>$(renderTo).fullCalendar({
timeFormat: 'HH:mm',
axisFormat: 'HH:mm',
defaultView:view,
firstHour: 7,
firstDay: 1,
titleFormat: {
month: 'MMMM yyyy',
week: "MMM d[ yyyy]{ '&#8212;'[ ... | 1 | 2,079 |
Spring MVC + Jackson: Dynamic Json serialization | <p>I'm using Spring MVC 3.0.5 with Jackson 1.7.2.</p>
<p>I wish to implement a Dynamic Bean serializer assignment mechanism, for example, let's say that my MVC Controller returns (<code>@ResponseBody</code>) an Object of type MyObject. By default, Jackson's SerializerFactory will look for the most appropriate Serializ... | 1 | 1,182 |
Android custom scheme not working | <p>Manifest.xml</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.kt.myapplication" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup=... | 1 | 1,809 |
CSS Scroll-Snap API? | <p>I am curious...do the CSS scroll-snap properties have a API (events) that can be hooked into via JavaScript?</p>
<p>I am tinkering with the idea of creating a website that uses scroll-snap to move between 100vh "slides". After each slide is done "scroll-snapping" I would like to trigger an animat... | 1 | 1,287 |
append value into dropdown-list | <p>i'm using the source code for multiple selection</p>
<p><a href="http://code.google.com/p/dropdown-check-list/" rel="nofollow">Dropdown check-list</a></p>
<p>Since, the example has been shown for the static values, i have edited as per my requirement, And i was trying to populate the values of the dropdown list us... | 1 | 1,083 |
XML comments are not shown in Swagger documentation, is this bug in swagger? | <p>The Swagger xml comments are not showing in the doc UI, not sure i am missing something here.. atleast someone direct me that this is a bug</p>
<blockquote>
<p><strong>Step1: Create a new brand new ASP.NET web application Web API project</strong></p>
</blockquote>
<p><a href="https://i.stack.imgur.com/69n88.png" rel... | 1 | 1,776 |
C# XPath Soap, how to navigate to embedded node | <p>In C#, Asp.Net, I am trying to return the Error node inside of BISearchResponse:
I am able to get the GetWireResult node returned in an XMLNode.
How do I get to the Error node?</p>
<pre><code><?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" ... | 1 | 1,432 |
How do you use the Elasticsearch Ingest Attachment Processor Plugin with the Python package elasticsearch-dsl | <p>I'm having trouble trying to use the <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html#ingest-attachment" rel="nofollow noreferrer">Ingest Attachment Processor Plugin</a> with ElasticSearch (5.5 on AWS, 5.6 local). I'm developing in Python (3.6) and am using the <a href="... | 1 | 1,741 |
Return JSON from javascript function | <p>I want to get the latitude longitude of the on-click events in a leaflet and return the lat long in JSON for the following code:-
What JSON code I have to include to get the result in the following format:-</p>
<pre class="lang-js prettyprint-override"><code>{
click_1: {
lattitude: "bac",
longt... | 1 | 1,132 |
MongoDB Java API com.mongodb.DBPortPool gotError | <p>I'm currently working on a project using the MongoDB Java API. I have been working on this project for a while, but have recently come across an issue that I cannot resolve. I am trying to make a database system that is fault tolerant. To simulate a database crashing, I have my program connect to a Mongodb server... | 1 | 3,625 |
Dereferencing pointer to incomplete type 'struct ____' | <p>I am attempting to create a type in C that can accept most primitive types. I am new to C and don't understand structs very well. My error occurs on line 10 (of main.c) and it will also occur on line 11 if line 10 is removed (also of main.c). If anyone has an ideas/pointers I would really appreciate it! Many thanks!... | 1 | 1,037 |
Getting error "Argument of type 'typeof Header' is not assignable to parameter of type 'ComponentType...' or 'StatelesComponent'..." | <p>First, I'm relatively new to the react world having coded largely APIs for the majority of my career. I'm building a react application for a non-profit and I'm just trying to get off of the ground.</p>
<p>I've added a header class as follows:</p>
<pre><code>import './header.css';
import * as React from 'react';
i... | 1 | 1,254 |
Spring Data - MongoDB - Aggregation how to project all fields of grouped reference document | <p>I have 2 documents, Topic and comment. Each topic has many comments and the documents look like this:</p>
<pre><code>@Document
public class Topic {
@Id
private String id;
@Indexed(unique = true)
@NotBlank
private String title;
}
@Document
public class Comment {
@NotBlank
private Stri... | 1 | 1,034 |
LINQ to SQL Peculiarities | <p>I'm encountering some peculiarities with LINQ to SQL.</p>
<p>With a relatively simple query, I want to select some fields, but have the date fields formatted as strings, which I first achieved like this:</p>
<pre><code> var list = dataContext.MyLists.Single(x => x.ID == myId);
var items = from i... | 1 | 1,029 |
how to findout action taken against Strictmode policy violation | <p>I am new to android and debugging an existing application. While the application is running, I am getting StrictMode policy violation. I want to find out what actions are taken after the violation has occurred? I am pasting the logs. </p>
<pre><code>D/StrictMode( 4548): StrictMode policy violation; ~duration=68 ms:... | 1 | 2,091 |
3-column full screen app layout in Bootstrap 3 | <p>I'm creating an admin dashboard for an app, where I need a layout like this:</p>
<pre><code>---------------------------------------------------------------------------------
| |
| NAVBAR ... | 1 | 1,472 |
Selenium unable to find a specific field | <p>I am using selenium to submit data on a form. The website has recently updated its form and now selenium can't find fields that it was able to find before the changes. </p>
<p>I submit data to: <a href="http://bit.ly/ioKvAL" rel="nofollow">http://bit.ly/ioKvAL</a></p>
<p>here is what I have:</p>
<pre><code>import... | 1 | 1,873 |
MySQL Joins and Full Text search | <p>Any full-text, MySQL experts out there?</p>
<p>I wrote a question yesterday asking for any suggestions on how to use full-text search with a lot of joins, a bit lazily, I hadn't actually made an attempt.</p>
<p>Since then, I've a had a good attempt at mastering it myself, building a few successful test queries, ag... | 1 | 1,573 |
can not find the declaration of element 'resources' | <p>I trying to add Adobe Creative Sdk into Android app ,I follow this(<a href="https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html" rel="nofollow noreferrer">https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html</a>) tutorial ,but when I synic the project following ... | 1 | 2,028 |
relation "account_emailaddress" does not exist - django error | <p>I am following this tutorial to integrate social media login to my django project - </p>
<p><a href="http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/">http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/</a></p>
<p>However after completing all the steps, when I try to ... | 1 | 1,619 |
Docker for Windows: SQL Server Database on persistent Volume with Windows-Container | <p>On Docker for Windows and working with <strong>windows containers</strong>, I cannot get my persistent volume to work on the main database directory of the windows container. This would be <code>C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA</code>
How can I get the benefits of persistent volum... | 1 | 1,422 |
Checkable table header checkbox is not working | <p>I am using jQuery datatable with ICheck box in my MVC4 application.</p>
<p><img src="https://i.stack.imgur.com/Kl81P.png" alt="enter image description here"></p>
<p>I try to fired the event of header check box click but it's not working please see my code. </p>
<p>below.</p>
<p><strong>Html</strong></p>
<pre><c... | 1 | 1,827 |
How do I load data into Kendo UI Grid using server side paging? | <p>I have the following code that builds a kendo ui grid:</p>
<pre><code> // build grid columns
// the check box column is always visible for all users
var columns = [{
field:'<input id="masterCheck" class="check" type="checkbox" /><label for="masterCheck"></label>',
temp... | 1 | 4,684 |
Javascript throws 'ReferenceError: require is not defined' | <p>I am running a piece of Javascript code inside my Python code using the <code>js2py</code> library.It works fine for all kinds of Javascript code thrown at it and processes the result.However I am encountering an error when a <strong>'require'</strong> keyword is used in the Javascript code.Here is my code below</p>... | 1 | 1,231 |
create next and previous button to show single element in javascript(laravel quiz app) | <p>I am trying to build a quiz application. Almost done, now I want to show my all of question to show to the user only one question and when user click next button then, next question will appear and answered question will hide.If user did not choice any answer of two, then user not be allowed to clicked next button. ... | 1 | 2,536 |
PyQt: How to get the root object from QQmlApplicationEngine | <p>I try to display a dynamic object using PyQt and QML, But I get this error:</p>
<pre><code>win = engine.rootObjects()[0]
</code></pre>
<blockquote>
<p>IndexError: list index out of range </p>
</blockquote>
<p>Here is my code PyQt:</p>
<pre><code>import sys
import os
from PyQt5.QtWidgets import QApplication
fr... | 1 | 1,388 |
Javascript quiz timer | <p>Hi I am making a quiz using javascript but am struggling to put in a functioning countdown timer. This may be a simple question but how can I make it so that once the timer reaches zero it'll submit the quiz and tell the user times up? I have tried a few different ways but to no avail. Any help is appreciated.</p>
... | 1 | 1,377 |
Reportlab error: 'Table' object has no attribute '_colpositions' | <p>I'm trying to teach myself reportlab from the user guide. The document I need to create is just formatted text that needs to go in specific places on the page. In the following snippets, table_data is a list containing 3 strings. I imported Table as pdfTable because my application has a Table class. </p>
<p>First,... | 1 | 1,479 |
Delphi soap https authentication failure pops up a dialog box | <p>We have a delphi XE application that uses SOAP (THTTPRIO etc) communications which (in delphi) works over WinInet.dll, by default. We fixed the authentication code so that it works, using https authentication, and when the user name and password for https are correct, everything is fine.</p>
<p>The problem is that... | 1 | 1,142 |
WP_query category__in array only pulls from first category id | <p>I am trying to get ALL post id's for posts in these categories (relation OR): 10,11,12,13,14 with certain extra attributes. My problem is with the categories however.</p>
<p>My args array for my wp_query is as follows: </p>
<pre><code>$args = array(
'orderby' =>'ID',
... | 1 | 1,178 |
Hashicorp Vault Error: Error checking seal status | <p>I am working on generating self-signed certificates with Hashicorp vault and successfully generated the CA certificate, issuing ca, ca-chain and private keys using these links below:
<a href="https://learn.hashicorp.com/vault/identity-access-management/iam-policies" rel="noreferrer">Policies</a>, <a href="https://le... | 1 | 1,622 |
React Bootstrap make only one collapse open up when being rendered with a map function / display relevant information in each collapse | <p>I am trying to display the relevant tasks for a user after clicking on a button called "View Tasks". The problem I am having right now is, when I click this button, all React Bootstrap Collapse Components open up and the tasks being shown are displayed under all users, but it should only be shown for one specific us... | 1 | 1,029 |
Why am I getting an ""Object" does not contain a definition for "Index"" error? | <p>I've looked and looked but I can't seem to find any solution to this problem so I decided I might as well ask.</p>
<p>I'm following <a href="http://www.youtube.com/watch?v=0ZoDmeAZAD8" rel="nofollow">this tutorial</a> to help me create an address book in C# using WinForms. I've created the GUI, and the "Person" cla... | 1 | 1,583 |
.NET SVCUTIL does not generate namespaces properly | <p>I have a WSDL document with 2 namespaces, and I am trying to generate proxy classes using SVCUTIL.EXE. For some reason, in the generated code the types get placed into default namespace, not in the correct name for mapping provided.</p>
<p>Here is my WSDL:</p>
<pre><code><?xml version='1.0' encoding='UTF-8'?>... | 1 | 4,521 |
GenericADOException: could not insert | <p>I'm trying to save my order object in the database that has a relationship many-to-one with the table pastaIndividual.</p>
<p>But, I'm getting this exception:</p>
<blockquote>
<p>Error: NHibernate.Exceptions.GenericADOException: could not insert:
[FrancosPoS.DBMapping.order][SQL: INSERT INTO order (price, cash... | 1 | 1,652 |
Vue bind after AJAX partial loads? | <p>I am just getting started with Vue.js and trying to incorporate it into an app I've been building for a while. My app is built using Laravel, a fair amount of jQuery, etc.</p>
<p>All of my navigation elements in my app are using AJAX (not via Vue) to return partial views. So any internal link or form submission is ... | 1 | 1,066 |
Understanding Typescript Record type with React's useContext | <p>I'm having some issues understanding the record type in a generator function I'm developing for React contexts.</p>
<p>Here's my generator function:</p>
<pre><code>import * as React from 'react'
export type State = Record<string, unknown>
export type Action = { type: string; payload?: unknown }
// eslint-dis... | 1 | 2,008 |
Spring Boot pass/upload file from one api to another via WebClient | <p>I have two Spring Boot Apis where I am first sending the multipart file from postman to one spring boot application and from there to the second spring boot application like so</p>
<blockquote>
<p>Postman (file) -> API 1 -> API2</p>
</blockquote>
<p>When the file is uploaded from postman to API1 everything goe... | 1 | 10,200 |
SharedPreferences.getInt("cumulative", 0) catch 22 - how to resolve? | <p>Unlike other values, in which I can initialize in <code>onCreate()</code> every time the app starts:</p>
<pre><code> @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Editor editor = prefs.edit();
editor.putInt("re-initiative-value", 0);
editor.commit... | 1 | 1,239 |
Issue on installing a build agent for TFS 2017 | <p>I have a stand-alone single server TFS 2017 RTM installation on SQL Express. It is not in any domain, but on my laptop. Have brought it up for my own usage (for learning too). Set it up to run on a self-signed certificate for SSL.</p>
<p>Thought of setting up a vNext build agent on the same machine. I remember some... | 1 | 1,356 |
iTextSharp Adding Background Color to Watermark Text | <p>I am adding watermark text to PDFs in a class library I have created. The code I posted below works fine, however the watermark is sometimes difficult to read because it overlays with content on the PDF. How would I go about adding a white background color around the watermark text? I basically would like the wat... | 1 | 1,357 |
How to create tiny PE (Win32) executables using MinGW | <p>I have the following C program:</p>
<pre><code>#include <windows.h>
void __cdecl mainCRTStartup() {
DWORD bw;
HANDLE hfile = GetStdHandle(STD_OUTPUT_HANDLE);
WriteFile(hfile, "Hello, World!\r\n", 15, &bw, 0);
ExitProcess(0); /* Needed for successful (0) exit. */
}
</code></pre>
<p>I compile it w... | 1 | 1,234 |
HTML5/jQuery metronome - performance problems | <p>As mentioned in the title I'm trying to create a jQuery/JavaScript based metronome along with the HTML <code><audio /></code> tag to play the sound. </p>
<p>It works "okay", but it seems to me the <code>setInterval</code> method is not working accurately enough. I searched some threads here, but for I am new ... | 1 | 1,496 |
google maps circle overlay - fixed size on zoom in and zoom out of the map | <p>I'm trying to add a circle overlay to a map, but I have to make the circle to stay the same size if a user zooms in or out of the map
The below code shows how I am displaying the circle on the map</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0... | 1 | 1,909 |
Renaming and selecting columns simultaneously in pandas | <p>I've been trying to select columns and renaming it with <code>pandas</code>. In <code>R's dplyr</code> it is pretty straight forward but when it comes to pandas I could not find a way to do it.</p>
<p>For example </p>
<pre><code>import numpy as np
import pandas as pd
np.random.seed(128)
df = pd.DataFrame(np.rando... | 1 | 1,217 |
Getting jquery event to fire for element in ajax loaded partial view (bootstrap modal form) | <p>I'm trying to figure out the correct approach for initializing jquery events referencing partial view elements loaded via ajax. Specifically I'm trying to use bootstrap-datepicker.js in a in a bootstrap modal form. </p>
<p>Background: Had a functioning page with datepicker working. Project for today was to convert ... | 1 | 1,237 |
semaphore_wait_trap blocking the UI | <p>My apps UI stucks because of <strong><code>semaphore_wait_trap</code></strong>. I don't know how to track it. I've checked if I am updating any UI from background thread. But did not find any. Here is the stack trace.</p>
<p><a href="https://i.stack.imgur.com/XhBzr.png" rel="nofollow noreferrer"><img src="https://i... | 1 | 8,679 |
Delaunay Triangulation in C++ | <p>The following steps assume you start with two points – A & B – and are trying to determine the point C to be used to form a
triangle:</p>
<p>a. Create a member function that will determine if a given point C is left or right of the line formed by two points A and B. Hint: to do this, take the cross product of t... | 1 | 3,567 |
Calling Tornado coroutines from synchronous code | <p>This will be a long question, so: </p>
<p><strong>TL;DR:</strong> I have a Python 2.7 threaded network server with a request handler, call stack looks like:</p>
<pre><code>WorkerThread -> requestHandler -> func1 -> func2 -> .. -> func10 -> doStuff -> BlockingIO
</code></pre>
<p>I want to use ... | 1 | 2,374 |
TypeError: _new_message() missing 1 required positional argument: 'message' | <p>Hi I'm getting a TypeError and I'm not sure what I'm doing wrong here the type error is <code>TypeError: _new_message() missing 1 required positional argument: 'message'</code> which I'm assuming means I would need to instantiate a class instance? </p>
<p>This is what I've done as you can see I've added <code>messa... | 1 | 1,192 |
Twig framework and datetime errors | <p>I'm running an events site - powered by PHP/MySQL, on Apache 2.28.
I can get the HTML table to display as per <a href="http://devzone.zend.com/article/13633" rel="nofollow">http://devzone.zend.com/article/13633</a>.</p>
<p>For this site on localhost, I'm using the Twig framework mentioned at www. twig-project. org<... | 1 | 1,167 |
change the config in angular2-query-builder dynamically | <p>Here, i am trying to change the operators based on the field value in Angular2-query-builder. My TS file.</p>
<pre><code> @Component({
selector: 'my-app',
template: `
<div>
<h2>Hello {{name}}</h2>
</div>
<query-builder [(ngModel)]='uiExpres... | 1 | 4,809 |
BackgroundWorker C#, Read from txt files - Write to a csv | <p>The following code actually does what i want it to do however I'm trying to make it optimal and as im still learning about the BackgroundWorker etc I thought you could give me a few tips. The trouble is I can run the program but because it's quite a long operation (1000's+ lines per text file), it doeant update the ... | 1 | 1,870 |
android scan barcode from camera with google barcode api (what is missing?) | <p>in my app dependencies i have</p>
<blockquote>
<p>compile 'com.google.android.gms:play-services:11.0.4'</p>
</blockquote>
<p>in manifest file i have </p>
<blockquote>
<pre><code><uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<u... | 1 | 2,524 |
core data changes don't merge | <p>I have set up a nonhierarchical dual-MOC architecture (one for the main thread, one for a private thread) with save notifications for merging changes:</p>
<pre><code>- (NSManagedObjectContext *)managedObjectContext
{
if (_managedObjectContext != nil) {
return _managedObjectContext;
}
NSPersisten... | 1 | 1,681 |
What is sys/ioctl.h? Where/how can I add this for installing libtecla? | <p>I am trying to use libtecla with the bladeRF on Windows 10. However, after trying to make install, I am seeing the following error. I have not clue what is wrong. I see that it says there is no file or directory named sys/ioctl.h, but why is this? I am using MinGW for the GCC binary files of 5.3.0.</p>
<pre><code>$... | 1 | 1,558 |
How do I remove blank rows from a CSV file in python? | <p>Good evening! I'm currently working on a python 3 script to create a CSV file with specified columns of data. I'm really close to finalizing it, but I've run into a problem I just can't get past.</p>
<p>Basically, I'm trying to add two values (floats) together from two columns and append them to another column; how... | 1 | 1,527 |
How to start activity from another module | <p>I have two modules. App and module Test. Module app contains MainActivity with button. Module Test contains MainActivity two. I want to run Test/MainActivity from module app by click on button. But Android still cannot see MainActivity from module Test. See below.</p>
<p>Module app Manifest:</p>
<pre><code><?xm... | 1 | 1,180 |
How to improve StAX xml parser speed in java? | <p>I have a XML parser using <code>StAX</code> and I am using it to parse a huge file. However, I want to bring the time down as low as possible. I am reading the values putting it into an array and sending it off to another function to evaluate. I am calling the <code>displayName</code> tag and it should go to the ne... | 1 | 2,380 |
Laravel 5.1 illuminate/queue capsule error 'Class encrypter does not exist' | <p>I have the need to push jobs on a queue from outside the Laravel framework. Found the queue capsule manager that should make this possible:</p>
<p><a href="https://github.com/illuminate/queue" rel="nofollow">https://github.com/illuminate/queue</a></p>
<p>Trying the following as per their example code:</p>
<pre><c... | 1 | 1,421 |
Hiding Rows if Cell in a Column Contains Certain Text or Autofiltering a Single Field with 4 Criteria | <p>I have a sheet with columns A through M, containing a table including all rows and columns. If, in column E, a cell contains the string(s) "Drive", "Inactivity", or "Halt" then I want the row to be hidden. If, in column E, a cell does <em>not</em> contain the string "UF_", then I want it to be hidden.</p>
<p>I have... | 1 | 1,082 |
How to solve error "Unable to find valid certification path to requested target while executing command react-native run-android" | <p>I'm totally new to React Native
I have created first project in React Native with the following commands:</p>
<ol>
<li>react-native init Hello</li>
<li>cd Hello</li>
<li>npm start</li>
<li>react-native run-android</li>
</ol>
<p>But while executing <strong>"react-native run-android"</strong> I'm getting this error... | 1 | 2,331 |
Microsoft Bot Framework image size in adaptive card | <p>I'm trying to set the height of an image in a bot framework adaptive card. It doesn't have to be exact, but it should be close.</p>
<p>For the following markup</p>
<pre><code>
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"speak": "",
"typ... | 1 | 1,834 |
Mouse hover zoom image to be only shown when mouse hovered | <p>I have made this mouse hover image zoom page. But I want the output to be shown on the left side and only when someone hovers the mouse on it. In this code the output window is continuously opened.</p>
<p>HERE IS MY CODE:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="fa... | 1 | 1,542 |
Set Imageview as wallpaper with a Button | <p>I have a problem with my code, I want to set an image from an <code>ImageView</code> as the wallpaper, I have a gallery and when I press an image from there the <code>ImageView</code> changes, so I don't know where to put the code for <code>onClick</code> to my button.</p>
<p>This is my code:</p>
<pre><code>public... | 1 | 1,628 |
Convert xml with namespaces to json in java | <p>I'm trying to convert xml to json using java and then convert the json back to xml after modifying which should give the same xml. The xml attributes have namespaces.</p>
<p>My sample xml : </p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<ns2:testplan xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" ... | 1 | 1,727 |
webpack-cli Unknown argument: --output | <p>My npm, node js versions:</p>
<p><a href="https://i.stack.imgur.com/BOkSi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BOkSi.png" alt="enter image description here" /></a></p>
<p>When I try to run the <code>npm dev</code> command:</p>
<p><a href="https://i.stack.imgur.com/ozlKy.png" rel="noreferrer"><im... | 1 | 1,922 |
Bootstrap spacing between images | <p>How can I delete spacing between images? I want images side by side.
Now I have this:</p>
<pre><code> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<div class="container">
<div class="row">
<div class="col-lg-1">
&l... | 1 | 1,235 |
Program to repeat based on user input using nested loop | <p>I'm trying to make a nested loop at the bottom of the main function, that if the user enters "y" the program will repeat, if "n" the function will return 0 and stop, and if the user enters some other letter give an error, to re-enter choice.</p>
<p>If I enter "y", the program repeats
If I enter "n", i get nothing j... | 1 | 1,363 |
JAVA Get & Set methods with calculations | <p>new to Java and trying to set up get and set methods. Although one I need to do as calculation based off getSalary() multiplied by getMonths() to get a Year to Date total. </p>
<p>I haven't been able to find out if calculations are possible in get or set methods or I may just be such a newbie I have it in the wrong... | 1 | 1,102 |
How to extract an XML document from a BLOB column in Oracle thats been compressed in Java | <p>I have a table in Oracle 11G (11.1) that has a BLOB column containing XML documents.</p>
<p>The XML document has been written to the table using a java program and has been serialised and compressed using java.util.zip deflator.</p>
<p>Is there a simple way to extract this document using SQL or PLSQL to reverse th... | 1 | 1,385 |
Performance of dynamically created type | <p>Using C#, I am noticing a significant difference in perfomance when populating a list with instances of a dynamically generated type versus a simple struct. The code below includes 4 different methods for populating a list with 100,000 objects.</p>
<p>Each method performs differently:</p>
<p>Button1: 15 millisecon... | 1 | 2,172 |
how to return current working directory from function? | <p>has experience with high level programming languages. I read the Rust book and now trying to survive and understand how the "things" in Rust works. I would love that someone explain what the heck is - Ok(()) and how to deal with it? My goal is to return result from function in to the variable where the out... | 1 | 1,171 |
Android & SQLite : how to display the multiple column value | <p>i hope you guys can help to solve my problem.</p>
<p>my problem is cant retrieve the multiple value of column. In my database contain 4 columns (id, namaStation, ticket, masa). right now the program only displayed value of namaStation. It mybe because of the toString() method in Comment class because its only retur... | 1 | 1,142 |
Sorting ngTable doesn't work when heading gets clicked | <p>I'm currently working on a table that requires some sorting. Since the project is using Angular (v1.2.12) I started using the <a href="http://bazalt-cms.com/ng-table/" rel="nofollow">ngTable</a> module (v0.3.2).</p>
<p>The default sorting is the title but the year can also be used as sorting option. When I load the... | 1 | 1,291 |
General TypeScript usage for modules / namespaces | <p>I have a standard web page (not an app rendered with angular, react, vue, etc) that uses jQuery, and other libraries. </p>
<p>I want to integrate good practices with TypeScript.
What is the best way to do this? </p>
<p>My current idea is to have 3 files:</p>
<ol>
<li>the index.d.ts (describes the types of my modu... | 1 | 1,377 |
How to do Scipy curve fitting with error bars and obtain standard errors on fitting parameters? | <p>I am trying to fit my data points. It looks like the fitting without errors are not that optimistic, therefore now I am trying to fit the data implementing the errors at each point. My fit function is below:</p>
<pre><code>def fit_func(x,a,b,c):
return np.log10(a*x**b + c)
</code></pre>
<p>then my data points ... | 1 | 1,249 |
how do i link login form to html website on computer | <p>I have started to create a website by simply writing HTML on my Mac in TextEditor. I have managed to create buttons as links and interconnect some of the pages together. I want to slowly develop my website over time such as adding a database etc.</p>
<p>I have watched a yt video on how to create a login page and I'... | 1 | 1,199 |
Show return value of Function in Angular Typescript | <p>I am using angular and I want to show in HTML the result of a function. when I use</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code> var geo = function onLocationFound(e) {... | 1 | 1,528 |
Spring Boot: Type cannot be null; nested exception is java.lang.IllegalArgumentException: Type cannot be null when running Stored Procedue | <p>Good morning, I am new to Spring Boot, and I am performing a rest service that must invoke a procedure stored in the database, the question is that you receive the mobile and must return a code and result, as shown below:</p>
<p><a href="https://i.stack.imgur.com/MbPb4.png" rel="nofollow noreferrer"><img src="https... | 1 | 2,889 |
How to get min max and avg from table in mysql with different rows? | <p>i have a table with record given below. What i want is single select query which shows first record min second record avg and third record max value group by mediaid? </p>
<pre><code>trans_id playtime mediaid(F.K.)
-------- -------- -------------
1 32 2
2 ... | 1 | 2,485 |
Window creation failed - LoadFrame(IDR_MAINFRAME) Fails C++ | <p>I'm in the middle of upgrading some windows applications (Legacy Code) from VC 6 to VS2010. Most of the applications compiled and would run after cleaning up expected conversion errors, but I'm having a lot of trouble with this. Here is where LoadFrame() fails and the application exits. The error returned here is 0.... | 1 | 1,198 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.