title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to decrease prod bundle size? | <p>I have a simple app, initialized by <code>angular-cli</code>.</p>
<p>It display some pages relative to 3 routes. I have 3 components. On one of this page I use <code>lodash</code> and Angular 2 HTTP modules to get some data (using RxJS <code>Observable</code>s, <code>map</code> and <code>subscribe</code>). I displa... | 0 | 1,931 |
Git: Fetching latest commit on a branch | <p>I'm struggling to understand something about GIT.</p>
<p>We've got a repository with a number of branches in it. I can fetch a local copy of one of those branches (git checkout -b ...), make some changes, then push them back. If I fail to tag the end of the branch, however, how do other users get the head of the br... | 0 | 1,170 |
How to include test classes in Jar created by maven-shade-plugin? | <p>I'm trying to package my test classes in to an executable jar with dependencies using Maven, but I'm struggling to get this right.</p>
<p>This is my pom.xml so far:</p>
<pre><code><project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.c0deattack</groupId>
<artifactI... | 0 | 2,764 |
NumberFormatException For Input String in JAVA | <p>I've written some code which calculate employee's Total overtime,Rate per hour,Total amount based on their overtime,medical,bonus,others etc etc.Here is the code, </p>
<pre><code> int salary = Integer.parseInt(txt_salary.getText().trim());
int overtime = Integer.parseInt(txt_overtime.getText().trim());... | 0 | 1,430 |
What is this Error: at com.google.common.base.Preconditions.checkNotNull | <p>I am a new automation tester, Working on sample test scripts, Need some help from you guys, I have tried to use POM and basic TestNG.</p>
<p>I have created 2 packages - pages and testcases.</p>
<p>I am getting some error when I am trying to access the "ClickJoin, Enterusername" methods from my pages packages. I ha... | 0 | 2,233 |
VB.net Garbage collector not releasing objects | <p>First of all, thanks in advance for your help. </p>
<p>I've decided to ask for help in forums like this one because after several months of hard working, I couldn't find a solution for my problem. </p>
<p>This can be described as '<i>Why an object created in VB.net isn't released by the GC when it is disposed even... | 0 | 1,341 |
I am getting - java.io.IOException cannot be resolved error though importing the IO | <pre><code>// Using a do-while to process a menu selection.
public class Menu {
public static void main(String args[]) throws java.io.IOException {
char choice;
do {
System.out.println("Help on: ");
System.out.println(" 1. if");
System.out.println(" 2. switch"... | 0 | 1,122 |
Unrecognized token 'message': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') | <p>When I send a post request, I get this error.</p>
<pre><code>Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'message': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 9]
</code></pr... | 0 | 2,152 |
How do I change an HTML table cell value by a dynamically added button in each row | <p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var insert = document.getElementById('insertitem');
insert.addEventListener('click', function() {
var table = document.getElementById('insertfirsttable'),
itemType =... | 0 | 1,490 |
Setting full screen leaflet.js map using bootstrap | <p>I'm working in a template based on these examples:</p>
<p><a href="http://getbootstrap.com/examples/dashboard/" rel="nofollow">http://getbootstrap.com/examples/dashboard/</a></p>
<p><a href="http://leafletjs.com/examples/choropleth.html" rel="nofollow">http://leafletjs.com/examples/choropleth.html</a></p>
<p>And ... | 0 | 2,847 |
Linux postfix/dovecot 554 Relay access denied | <p>I have this error <code>554 Relay access denied</code> when trying to send email from my outlook client.</p>
<p>I can read incoming mails but cannot send.</p>
<p>If i connect with telnet localhost 25 i can send external emails, but with outlook client it doesn't work.</p>
<p>Here's my postfix and dovecot config ... | 0 | 1,228 |
Use Excel VBA to click on a button in Internet Explorer, when the button has no "name" associated | <p>I'm trying to use excel to automate the value entering in a time sheet. The time sheet is on a web page.
Right now I'm able to load the page, enter my username and password and then entering the time sheet by itself. See code below. </p>
<p>At this point I need to click on a button to open sub-forms. I can't kn... | 0 | 1,380 |
Spring 3.1 @Cacheable - method still executed | <p>I'm trying to implement Spring 3.1 caching as explained <a href="http://www.javacodegeeks.com/2011/02/spring-31-cache-abstraction-tutorial.html" rel="noreferrer" title="here">here</a> and <a href="http://blog.springsource.org/2011/02/23/spring-3-1-m1-caching/" rel="noreferrer">here</a>, but it doesn't seem to be wor... | 0 | 1,924 |
Relinking database tables: Access, VBA | <p>I have a procedure that relinks all the tables in a database baed on whether or not they are a linked table. Currently this is set up to run automatically as it's set inside an AutoExec macro which calls the function. </p>
<p>The code works but <strong>only if I close the database and reopen it</strong>. I know tha... | 0 | 1,191 |
spring boot feign client getting HTTP 404 | <p>I am currently just checking how to use Feign as Declarative REST client in one of my project.</p>
<p>following is Feign Client</p>
<pre><code>@FeignClient(name = "SEARCHCABMS",configuration = AppFeignConfiguration.class)
public interface SearchCabMsClient {
@RequestMapping(value = "api/searchcab/l... | 0 | 1,836 |
Projections.count() and Projections.countDistinct() both result in the same query | <p>EDIT: I've edited this post completely, so that the new description of my problem includes all the details and not only what I previously considered relevant. Maybe this new description will help to solve the problem I'm facing.</p>
<p>I have two entity classes, Customer and CustomerGroup. The relation between cust... | 0 | 1,084 |
Using xsl:variable in a xsl:foreach select statement | <p>I'm trying to iterate through an xml document using xsl:foreach but I need the select=" " to be dynamic so I'm using a variable as the source. Here's what I've tried:</p>
<p>...</p>
<pre><code><xsl:template name="SetDataPath">
<xsl:param name="Type" />
<xsl:variable name="Path_1">/Rating/Pat... | 0 | 1,175 |
Python's requests triggers Cloudflare's security while urllib does not | <p>I'm working on an automated web scraper for a Restaurant website, but I'm having an issue. The said website uses Cloudflare's anti-bot security, which I would like to bypass, not the Under-Attack-Mode but a captcha test that only triggers when it detects a non-American IP or a bot. I'm trying to bypass it as Cloudfl... | 0 | 2,972 |
ActionView::Template::Error ( isn't precompiled): | <p>In production (Heroku), I'm getting the following error:</p>
<pre><code>Started GET "/articles/1" for 50.134.181.231 at 2012-06-17 00:37:35 +0000
2012-06-17T00:37:35+00:00 app[web.1]: ActionView::Template::Error ( isn't precompiled):
2012-06-17T00:37:35+00:00 heroku[router]: GET wandr.com/articles/1 dyno=web.1 queu... | 0 | 1,034 |
Android: Execution failed for task ':app:packageDebug'. > data | <p>I am just created sample project and facing this issue. Can anybody help on this to resolve this ? </p>
<pre><code>* What went wrong:
Execution failed for task ':app:packageDebug'.
> data
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskE... | 0 | 3,042 |
How to Edit and Save ViewModels data back to database | <p>I have a ViewModel which is joined by three Entities to get data from all entities into one view form. Although i succeeded to implement the same. But i have no idea how to Edit and Save data back to the database. My model classes are joined by one to one relationship.</p>
<p>My Models are:</p>
<pre><code>public c... | 0 | 1,342 |
How to fix "<hash_map> is deprecated and will be REMOVED. Please use <unordered_map>"? | <p>I am learning C++ so I am working through the book <em>Programming: Principles and Practice using C++</em>.</p>
<p>I am on the first drill, which is how to make a 'Hello, World!' program using Microsoft Visual Studio 2015. I have used the source code as provided in the book.</p>
<pre><code>#include "../../std_lib_... | 0 | 3,025 |
How to get closest player (FiveM Lua) | <p>This is a question regarding FiveM Scripting using the LUA language;</p>
<p>I want to get the ID or name of the closest player to the player executing the event. How do I get this? I currently have: (Client.lua)</p>
<pre><code> while true do
Citizen.Wait(0)
local ped = GetPlayerPed(-1)
i... | 0 | 1,197 |
HTTP Status 404 - Servlet dispatcher is not available | <pre><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId... | 0 | 3,902 |
Resolving type definitions from imported schema in XJC fails | <p>I've got this API using JAXB to conveniently use object models, generated from XML Schemas by the XJC (XML-to-Java) compiler, through named references. It abstracts the creation of JAXB contexts and finding ObjectFactory methods away by all sorts of background magic and reflection. The basic gist of it is that you'd... | 0 | 4,174 |
Why does Eclipse say that "errors exist" but shows nothing in console? | <p>I am using Eclipse to build a program and when I go to run it, it says that "errors exist", I run it anyway, there are no errors showing up in the console and the application runs a blank screen. Why is this?</p>
<p>Additional Info: I recently have been trying to change my previous layout, from a very crude form, t... | 0 | 5,205 |
Cannot find Typescript module even though tsc successfully manages to resolve it | <p>I have a Node.js project written in Typescript which is expected to run as a CLI, and am having trouble to import a module located out of the <code>node_modules</code> directory using an absolute path (relative paths work fine). It might be important to mention that I am using the <a href="https://github.com/oclif/o... | 0 | 1,206 |
Exception Value: 'NoneType' object has no attribute 'endswith' | <p>Right, I am trying to setup a django dev site based on a current live site. I've setup the new virtualenv and installed all of the dependencies. I've also made a copy of the database and done a fresh DB dump. I'm now getting the error above and I have no idea why.</p>
<p>My django.wsgi file seems to be pointing at ... | 0 | 4,955 |
How do I call a jquery function on submitting a form? | <p>I have a form which is given below :</p>
<pre><code> <form method="post" id="contactForm" action="">
<fieldset class="contactFieldset">
<ul>
<li>
<label for="contactName" class="leftLabel">*Name:<... | 0 | 1,923 |
VSTS build: Packages failed to restore - Unable to resolve 'NETStandard.Library (>= 1.6.1)' for '.NETStandard,Version=v2.0' | <p>I'm getting </p>
<blockquote>
<p>Unable to resolve 'NETStandard.Library (>= 1.6.1)' for '.NETStandard,Version=v2.0'.</p>
</blockquote>
<p>in VSTS build using Hosted2017 build agent after I upgraded my aspnetcore app to <code>netcoreapp2.0</code> and my libraries to use <code>netstandard2.0</code>. </p>
<p>Works... | 0 | 1,198 |
Android Support Library ActionBar not Working in 2.3 Device | <p>Hello friends i implemented ActionBar support Library with v7 Appcompact . I extend my Activity class with ActionBarActivity . Below is my Main Class</p>
<pre><code>import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.SearchView;
import android.view.Menu;
impor... | 0 | 1,562 |
Passing data between activities from listview to another activity | <p>I am trying to pass the data from this main activity to another activity</p>
<p><em>I am successful in sending data between activities .... Like the data from Edit-text to next activity through <code>putExtra</code> and <code>GetExtra</code> methods and passing as intents</em></p>
<ul>
<li>But i am facing challeng... | 0 | 2,002 |
JSON.parse: unexpected character error | <p>I'm having a problem. I have the list of JSON objects in a separate file but want to parse them into a data table. Every time I try to parse them, I get an unexpected character error...</p>
<p>Here is the code</p>
<pre><code>var myJSONObject = {
"orders" : [{
"orderId" : "K2_001... | 0 | 1,263 |
Could not find codec parameters for stream 0 | <p>When I run this command:</p>
<pre><code>ffmpeg -y -i ./in.mp4 -c:v png -f image2pipe -thread_queue_size 1024 -r 25 -t 186.75 -i - -filter_complex overlay=0:0 -c:v libx264 -pix_fmt yuv420p -movflags +faststart ./out.mp4 < ./out.png
</code></pre>
<p>I get an error:</p>
<pre><code>(git)-[master]
ffmpeg version 2... | 0 | 1,942 |
How to extract the data from data.store to an array? | <p>here is my xml code:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<root>
<investors>
<investor name="Active"/>
<investor name="Aggressive"/>
<investor name="Conservative"/>
<investor name="Day Trader"/>
<investor name="Very Active"/>
</... | 0 | 1,307 |
RODBC not recognizing my odbc settings | <p>I'm running R 2.15.2 on a Red Hat Linux 6 server. My goal is to connect to a MS SQL Server Database on another machine via RODBC. I did my research and downloaded and installed the linux version of the MS SQL ODBC driver from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=28160" rel="noreferrer">... | 0 | 1,154 |
Windows Service LdapException: The LDAP server is unavailable | <p>I have a Windows Service that provides data through WCF to a Windows Forms application. The service takes care also of user authentication, validating user password using LDAP over the company Active Directory servers.</p>
<p>The problem is that it works for weeks (even months), than something happens and the LDAP ... | 0 | 1,387 |
Call to undefined function query() when it is defined | <p>I have searched through similar questions and can't find the answer, though I am a beginner so may have missed it.</p>
<p>I am trying to call the <code>review_create()</code> function I have included the <code>reviews.php</code> which contains this function. However, I am getting the error </p>
<blockquote>
<p>F... | 0 | 1,691 |
AngularJS dynamic required attribute in directive and form validation | <p>I have a directive that receives whether an element should be <strong>required or not from a REST api</strong>. Right now, I can't seem to get the form to invalidate when an attribute is set to required. </p>
<p>So, in essence I'm able to dynamically add the 'required' attribute from the directive below, but it doe... | 0 | 1,395 |
werkzeug.routing.BuildError: Could not build url for endpoint | <p>I have created a web API to render a webpage with navigation. Below is my code</p>
<pre><code>from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/testsite/')
def home():
return render_template('home.html')
if __name__ == '__main__':
app.run(debug=True)
@app.route('/about/... | 0 | 3,250 |
Android : Caused by: android.os.NetworkOnMainThreadException | <pre><code>String response = getResultForRequest(url);
</code></pre>
<p>Where 'url' is JSON formatted which return bunch of data using http GET method.</p>
<pre><code>public static String getResultForRequest(String urlString)
throws IOException {
URL url = new URL(urlString);
HttpURLConnection urlConn... | 0 | 2,183 |
Fetch, process and display the result on the same page | <p>I have a jsp page containing a form where a user fills in some value. Now i pass these values into a servlet which processes it and retieves a related set of data. Now, i am able to retrieve the data in the servlet page, but am not able to display it on the same jsp page at which i fetched the request. </p>
<hr>
... | 0 | 1,052 |
Accessing ASP HiddenField in javascript | <p>I have been searching through here and google for a few days now, trying to figure out why I cannot get the value of a hiddenfield variable in javascript. When accessed, the value is returned as undefined.<br>
I have an ASP HiddenField inside an UpdatePanel which is part of a custom user control in a .aspx web page... | 0 | 1,249 |
LNK2019: Unresolved external symbol | <p>I've seen plenty of other questions like this but I just couldn't figure this problem out with the help of them. I've understood that it's a linking problem but from what I can see, I've got the linking straightened out. </p>
<p>I'm writing a chat server/client (with the help of <a href="http://johnnie.jerrata.com/... | 0 | 1,861 |
bootstrap-table-filter-control extension doesn't work in bootstrap-table | <p>I use <a href="http://bootstrap-table.wenzhixin.net.cn/" rel="noreferrer">bootstrap-table</a> and would like to use <a href="http://bootstrap-table.wenzhixin.net.cn/extensions/#table-filter-control" rel="noreferrer">table-filter-control</a> extension. In <a href="https://github.com/wenzhixin/bootstrap-table-examples... | 0 | 1,219 |
Download file from server with angular $http.get | <p>I am trying to trigger a file download when a user clicks on a "Download PDF" button. A call is made to the API which makes a few checks, and then returns the file. I don't want the file to open in the browser. I have read a lot of stackoverflow-questions about how to do this, but can't get it to work. I get the fil... | 0 | 1,487 |
Failed prop type The prop is marked as required but its value is `undefined` | <p>I'm using react v4, and I'm trying to list an array in the page "treinamentos", but I'm getting an error as I load the page: </p>
<blockquote>
<p>Failed prop type: The prop <code>treinamentos</code> is marked as required in
<code>Treinamentos</code>, but its value is <code>undefined</code>.</p>
</blockquote>
<... | 0 | 1,052 |
Unable to interact with anything in Cordova app | <p>I'm having trouble getting any sort of interactivity from my first Cordova project. I have experience in HTML, Javascript and CSS, so I figured Cordova would be a perfect introduction to hybrid app development but I can't seem to get even a basic HTML button to work on the app.</p>
<p>I'm using Windows 10 with Andr... | 0 | 4,460 |
onClick method not working properly after NestedScrollView scrolled | <p>I used NestedScrollView with CoordinatorLayout to enable scroll animation for Toolbar (by app:layout_scrollFlags="scroll|enterAlways").</p>
<p>NestedScrollView contain the LinearLayout as the root child, I put the 2 TextViews into LinearLayout to enable expand/collapse animation. The one was set Visible
and other o... | 0 | 1,292 |
How to underline label with underline effect in Xamarin Forms? | <p>I followed <a href="http://smstuebe.de/2016/08/29/underlinedlabel.xamarin.forms/" rel="noreferrer">this</a> tutorial to create underline effect. However, when my page starts it breaks without exception being caught. Has anyone managed to create underline effect? Here is a code:</p>
<p>UnderlineEffect.cs:</p>
<pre ... | 0 | 1,113 |
AVAssetExportSession export fails non-deterministically with error: "Operation Stopped, NSLocalizedFailureReason=The video could not be composed." | <p>We add subtitles to a video recorded by the user, but the export by our AVAssetExportSession object fails non-deterministically: sometimes it works, and sometimes it doesn't. It's unclear even how to reproduce the error.</p>
<p>We noticed the asset tracks seem to get lost during export.</p>
<p>Before exporting, th... | 0 | 1,580 |
How create table only using <div> tag and Css | <p>I want to create table only using <code><div></code> tag and CSS.</p>
<p>This is my sample table.</p>
<pre><code><body>
<form id="form1">
<div class="divTable">
<div class="headRow">
<div class="divCell" align="center">Customer ID</div>... | 0 | 1,091 |
Ruby error Net::ReadTimeout | <p>I am making a series of API calls using httparty. The first two API calls succeed, but the third one fails. It pauses for about 60 seconds (default timeout period) and then returns this error:</p>
<pre><code>/Users/luigi/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/protocol.rb:158:in `rescue in rbuf_fill': Net::Re... | 0 | 1,260 |
HTML table column of equal size | <p>With the below code, I get the columns size being different (esp the last column is small) I would like to have all the three columns to be of same size.Thanks.</p>
<pre><code><html>
<body>
<h4>Two rows and three columns:</h4>
<table border="1" width="100%" height="400" align="top">
&l... | 0 | 1,287 |
How to include a CDN to VueJS CLI without NPM or Webpack? | <p>I'm new on VueJS ans Webpack. I've created a project with VueJS CLI and trying to work with it. I need to insert an CDN to my code.</p>
<p>When working with standard HTML, CSS & JS solutions, I'd include CDNs like this: </p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babe... | 0 | 1,143 |
SQL Server : Arithmetic overflow error converting expression to data type int | <p>I'm getting this error </p>
<blockquote>
<p>msg 8115, level 16, state 2, line 18<br>
Arithmetic overflow error converting expression to data type int.</p>
</blockquote>
<p>with this SQL query</p>
<pre><code>DECLARE @year VARCHAR(4);
DECLARE @month VARCHAR(2);
-- S... | 0 | 1,276 |
Filtering data in laravel and handling the views | <p>I have a tv show netflix-esque project I'm building where I have a <code>Shows</code> page which I want to filter on format. Each show contains episodes which can have a tv, dvd and bd format. </p>
<p>Currently I'm filtering using separate routes and controllers which extend the base <code>ShowsController</code>.</... | 0 | 1,101 |
Why HTML1113: Document mode restart from IE9 Standards to Quirks | <p>I open a webpage in IE9 - and all of a sudden the document mode switches to Quirks mode. The page itself is dead simple - no doctype, no meta tag, just a piece of (test purpose) javascript inside the xslt forming the page.<br>
See <a href="http://home.arcor.de/martin.honnen/xslt/test2012041901.xml" rel="noreferrer">... | 0 | 1,377 |
How to handle exception thrown by object in @Requestbody in spring boot 2 | <p>I have a rest controller class as follows which throws custom exception when user object is invalid. But those exception got wrapped by spring framework and not handled by the specific exception handler defined in controller advice.</p>
<pre><code>@PostMapping
public ResponseEntity<String> process(
@PathVar... | 0 | 4,140 |
Android Studio - JAVA - TIC TAC TOE | <p>I have made my first tic tac toe game on android, but I have found a bug and I dont know how to fix it.</p>
<p>When player1 wins with last turn in certain combinations like bottom row horizontal or first vertical row then it pops - It is a draw - when there is winner.</p>
<p>Here I define my variables.</p>
<pre><... | 0 | 3,891 |
how to avoid default method implementation in swagger codegen interface? | <p>I would like to avoid "default" implementation in interface generate by the maven plugin swagger codegen.
For example, with petstore swagger : <a href="http://petstore.swagger.io/v2/swagger.json" rel="nofollow noreferrer">http://petstore.swagger.io/v2/swagger.json</a></p>
<p>I generate interface with maven plugin :... | 0 | 1,226 |
Flutter - Pass values between routes using pushReplacementNamed | <p>I'm trying to pass values between routes using <code>Navigator.pushReplacementNamed()</code>, but I'm not getting it.</p>
<p>I can not figure out what the correct syntax and logic is in which data will exit <code>pushReplacementNamed</code> and get the <code>routes</code> key.</p>
<p>Can you help me?</p>
<p>Enter... | 0 | 1,953 |
Tracking AJAX error on readystate 0, status 0 and statusText error | <p>I read all these similar questions: <a href="https://stackoverflow.com/questions/7018247/jquery-ajax-error-readystate0-responsetext-status0-statustexterr">1</a>, <a href="https://stackoverflow.com/questions/10555285/ajax-response-readystate-0-responsetext-status-0-statustext-error">2</a>, <a href="https://stackoverf... | 0 | 1,323 |
WCF service, response in SOAP or plain XML, how? | <p>I am struggling few hours with this and can't find a solution to the communication problem.
My service need to communicate with clients via SOAP or plain XML</p>
<p>My service will be written based on WCF framework, however my clients not.</p>
<p>Could you show me step by step how to change my service code and con... | 0 | 3,964 |
Record RTSP stream with FFmpeg libavformat | <p>I'm trying to record RTSP stream from Axis camera with FFmpeg libavformat.
I can grab video from files and then save it to another file, this is OK. But camera sends strange data, FPS is 100 and camera sends every 4th frame so result FPS is about 25. But libavformat set packets dts/pts for 90000 fps (default?) and n... | 0 | 1,262 |
java.io.FileNotFoundException: /storage/sdcard/MyApp/questions.txt: open failed: EACCES (Permission denied) | <p>I have a problem when I try to save a file. First of all, it worked correctly when I try it on an older Eclipse, but I have to use new Eclipse so I export the project from the older Eclipse and import it on the new. Now it doesn't save and give me this excepction:</p>
<pre><code>java.io.FileNotFoundException: /stor... | 0 | 2,385 |
if else statement and while loop | <p>Please have a look at the following code</p>
<pre><code>namespace Funny
{
class QuesionsAndAnswers
{
private double firstNumber;
private double secondNumber;
private double userAnswer;
private double computerAnswer;
private string operators;
private bool ans... | 0 | 1,271 |
XAMARIN: cross platform FontFamily | <p>I need to specify different FontFamily for different Labels in my app. I need to use the default fonts (e.g. Roboto for Android and Helvetica for iOS) with their modifications (e.g. Light, Medium, Bold). As far as I understand I should be using Roboto-Light and Helvetica-Light to get the Light version of the fonts (... | 0 | 1,615 |
React site warning: The href attribute requires a valid address. Provide a valid, navigable address as the href value jsx-a11y/anchor-is-valid | <p>I am getting a warning on a React site I built</p>
<pre><code>./src/components/layout/Navbar.js [1] Line 31: The href attribute requires a valid
address. Provide a valid, navigable address as the href value jsx-a11y/anchor-is-valid
</code></pre>
<p>on the following code:</p>
<pre><code> <p>
... | 0 | 1,045 |
SSH, Connection established, but stuck | <p>I can ssh to server in my house, but I fail to ssh by some VPN or public wifi(not all). when I type <code>ssh -v user@server.domain</code>, I got this:</p>
<pre><code>OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
... | 0 | 1,117 |
Form Validation using javascript in joomla | <p>I want to use form validation. I have used javascript for this and I have downloaded the com_php0.1alpha-J15.tar component for writing php code but the blank entries are goes to the database.
Please guide me...
sample code is here...</p>
<pre><code><script language="javascript" type="text/javascript">
functi... | 0 | 2,442 |
Passing form input values as a List of objects from a JSP page to a Servlet | <p>Here is a <strong>simplified</strong> (NOT real world) example. Suppose there is a domain model - a class <em>Movie</em>, which has a List of actors. A class <em>Actor</em> has three fields (<em>name</em>, <em>birthDate</em>, <em>rolesNumber</em>). The following code is an illustration of this scenario:</p>
<p><em>... | 0 | 1,924 |
LARAVEL 5.5 - Insert Data into Database from FORM with Eloquent Model | <p>I have a problem with inserting Data into Database.</p>
<p>All i have done till now is :</p>
<p>Create a Model with Controller and Migration via:</p>
<pre><code>php artisan make:model Cars -mcr
</code></pre>
<p><br/>
So, now all of my files looks this way :</p>
<h2>Cars - Model</h2>
<pre><code>namespace App;
... | 0 | 1,879 |
DbUnit H2 in memory db with Spring and Hibernate | <p>Hi I'm trying a little POC with JPA and unit test to verify that the DB schema is created. I'm working with H2 DB and I set to Hibernate create the schema from the entities, but when DbUnit tries to initialize the DB from a dataset I always get a Table ... not found in tableMap. I read that I have to add the propert... | 0 | 2,070 |
How to serve django media files via nginx ? | <p>I'm new at Nginx, I've successfully bound my django project to Nginx. However I can't serve my static files and I guess I set my media folder's location wrongly. Here is my file tree:</p>
<pre><code>root_directory
my_django_project
...
manage.py
app1
app2
media
... | 0 | 1,341 |
what could be causing this rails ioerror closed stream? | <p>I have a rails application, running in development mode ( with a sqlite database ). The application's purpose is to allow users to upload files through a java client. </p>
<p>If a user wants to upload a folder, all the files inside it will be recursively uploaded. If a user wants to upload a file, the file will be ... | 0 | 3,697 |
CSS li items stacking on top each other | <p>I'm building a mobile menu and my list items are trying to unexpectedly stack on top of each other. I imagine that I can somehow set the same distance to the top or something like that since they stack on top of each other but can't seem to find and fix the issue.</p>
<p><strong>CSS:</strong></p>
<pre><code>nav#na... | 0 | 1,262 |
Copy contents of current worksheet to vba created worksheet | <p>I'm tearing my hair out trying to do what should be a really simple adjustment to a macro.</p>
<p>copy and paste doesn't seem to work. I get a property not supported error.</p>
<p>All I am trying to do is copy all cell contents from the original activesheet in the originating workbook (which will be sName) and pa... | 0 | 1,250 |
Update nested subdocuments in MongoDB with arrayFilters | <p>I need to modify a document inside an array that is inside another array.
I know MongoDB doesn't support multiple '$' to iterate on multiple arrays at the same time, but they introduced <strong>arrayFilters</strong> for that.
See: <a href="https://jira.mongodb.org/browse/SERVER-831" rel="nofollow noreferrer">https:/... | 0 | 1,312 |
How to launch JUnit 5 (Platform) from the command line (without Maven/Gradle)? | <p>I'd like to run a class containing JUnit 5 tests from the command line. Unfortunately, I have some outside dependencies that prevent me from using Maven, Gradle, or other build systems.</p>
<p>In JUnit 4, I could accomplish this like</p>
<pre><code>java .:"lib/*" org.junit.runner.JUnitCore TestClass
</code></pre>
... | 0 | 1,393 |
Debug Assertion Failed! Expression: is_block_type_valid(header->_block_use) | <pre><code>Debug Assertion Failed!
Program: ...nts\Visual Studio 2015\Projects\Project 5\Debug\Project 5.exe
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: 892
Expression: is_block_type_valid(header->_block_use)
For information on how your program can cause an assertion
failure, see the Visual C++... | 0 | 2,964 |
Spring with FreeMarker: Could not resolve view with name 'Home' in servlet with name 'MyServlet' | <p>I am trying to create a very simple integration of FreeMarker and Spring. However, when I run my example, I get an exception:</p>
<pre><code>GRAVE: Servlet.service() for servlet MyServlet threw exception
javax.servlet.ServletException: Could not resolve view with name 'Home' in servlet with name 'MyServlet'
at ... | 0 | 1,997 |
How to plot grad(f(x,y))? | <p>I want to calculate and plot a gradient of any scalar function of two variables. If you really want a concrete example, lets say f=x^2+y^2 where x goes from -10 to 10 and same for y. How do I calculate and plot grad(f)? The solution should be vector and I should see vector lines. I am new to python so please use sim... | 0 | 1,085 |
Wordpress Editor JS Error "TypeError: Cannot read property 'get' of undefined" | <p><strong>The Issue:</strong>
When editing pages or posts, tinymce doesn't load because of this error.</p>
<pre><code>editor.min.js?ver=4.7.3:1 Uncaught TypeError: Cannot read property 'get' of undefined
at Object.d [as go] (editor.min.js?ver=4.7.3:1)
at HTMLAnchorElement.<anonymous> (editor.js?ver=4.7.... | 0 | 2,045 |
"Function not declared in this scope" Error in compiling openCV code | <p>I'm trying to write some code which uses openCV functions. I started by taking some of the example code available in the documentation:</p>
<pre><code>#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( in... | 0 | 1,750 |
Query MongoDB with $and and Multiple $or | <p>As stated in the <a href="https://docs.mongodb.com/manual/reference/operator/query/and/" rel="noreferrer">documentation</a>, this is not possible.</p>
<hr />
<h1>AND Queries With Multiple Expressions Specifying the Same Operator</h1>
<p>Consider the following example:</p>
<pre><code>db.inventory.find( {
$and : [... | 0 | 1,036 |
C++ Console Application1.exe has triggered a breakpoint | <p>when I try to set </p>
<pre><code>cub.SetArray(cube);
</code></pre>
<p>I get an error </p>
<pre><code>Console Application1.exe has triggered a breakpoint
</code></pre>
<p>What I'm doing wrong? When I try to debug <code>cub -> cubesarray</code> I get size -842150451. I don't understand why.Here's my all code<... | 0 | 1,792 |
How to add footer to NavigationView - Android support design library? | <p>How can I set footer settings and profile items to <code>NavitationView</code>? to looks like the Inbox by email navigation drawer. The <code>NavitationView</code> items are inflated by menu resource, but I don't know how to set bottom items to a menu resource, or how can I set a custom view to <code>NavigationView<... | 0 | 1,117 |
Why does my App start incredibly slow (10s+) at first run, showing only white screen on android 5.0? | <p>I have a freshly created app (built in android studio 2.0), having a few activities.</p>
<p>When I test it on my Android 4.3 (note 2) device it starts nicely and fast after a clean install, in turn the same app on my samsung galaxy S4 with android 5.0, hangs for about 10-15 seconds while showing a white screen only... | 0 | 3,552 |
How can constructing an X509Certificate2 from a PKCS#12 byte array throw CryptographicException("The system cannot find the file specified.")? | <p>I'm trying to construct an <code>X509Certificate2</code> from a PKCS#12 blob in a byte array and getting a rather puzzling error. This code is running in a desktop application with administrator rights on Windows XP.</p>
<p>The stack trace is as follows, but I got lost trying to troubleshoot because <code>_LoadCer... | 0 | 1,190 |
Dart Object -> JSON String failing to convert to JSON | <p>I'm trying to serialize an object to JSON and then back from JSON to object again.</p>
<p>This is the code snippet that is supposed to give me proper JSON:</p>
<pre><code> LoginRequest req = new LoginRequest();
req.username = username;
req.password = password;
req.created = 123456;
req.test = "KOTS... | 0 | 5,214 |
Add Keys and Values to RouteData when using MVCContrib to unit test MVC 3 controllers and Views | <p>Okay so I am using MVCContrib TestHelper to unit test my controllers, which works great.</p>
<p>Like so many people though, by unit test I really mean integration test here and I want to at least make sure my views render without error given the model provided...otherwise I can miss a whole class of bugs basically ... | 0 | 1,327 |
Stripe payment gateway integration in codeigniter | <p>I use Stripe payment gateway in codeigniter using stripe.js. In stripe payment process first do client side validation and then after server side validation by stripe php 2.1.1 library. Client side validation working ready but server side validation gives error. I put stripe php 2.1.1 folder in codeigniter library f... | 0 | 3,575 |
"XML Parsing Error: junk after document element" | <p>Hey everyone I'm trying to display a Google map with dynamic locations retrieve from database I was following <a href="https://developers.google.com/maps/articles/phpsqlajax_v3" rel="nofollow">developers.google.com/maps/articles on phpsqlajax_v3</a>.I created the database and the table looks like this</p>
<p><stron... | 0 | 1,766 |
Error on server/client c program: "Connect: socket operation on non-socket" | <p>I'm working on a socket program and everything seems fine when compiling. First I compile and run the server and then I compile and run the client. The server will run fine, but when the client starts up, I receive an error message in the <code>Connect()</code> function. Although the socket appears to be okay, the c... | 0 | 1,094 |
VBA retrieve HTMLBody from Outlook mail | <p>First I create an email via Outlook: </p>
<pre><code>Sub CreateHTMLMail()
'Creates a new e-mail item and modifies its properties.
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Set olApp = Outlook.Application
'Create e-mail item
Set objMail = olApp.CreateItem(olMailItem)
Dim sHTML_Open ... | 0 | 2,051 |
"No route to host" error when client sends request to server (C Networking) | <p>I have a basic client/server setup in C which works only if the client and the server are on the same machine. Is there any reason why my client wouldn't be able to send a request to my server if they are on different machines? </p>
<p>In this instance I am running my server on a virtual machine and trying to run t... | 0 | 1,525 |
Android Animation: Wait until finished? | <p>I would like to wait until an animation is finished* in an Android ImageView before continuing program execution, what is the proper way to do this?</p>
<ul>
<li>(in this context "finished" means that it runs through all of its frames exactly one time and stops on the last one. I am unclear whether this animation w... | 0 | 1,475 |
How to create custom dialog box with two button in android? | <p>How to generate custom dialog box in android like this,
<a href="https://i.stack.imgur.com/6fteP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6fteP.png" alt="enter image description here"></a></p>
<p>I want just like this.
How to generate it. please give me suggestion.</p>
<p>i have used below code fo... | 0 | 1,306 |
Jetpack Compose: How to change theme from light to dark mode programmatically onClick | <p>TL;DR change the theme and recompose the app between light and dark themes onClick.</p>
<p>Hello! I have an interesting issue I have been struggling to figure out and would love some help. I am trying to implement a settings screen which lets the user change the theme of the app (selecting Dark, Light, or Auto which... | 0 | 1,062 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.