title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
com.mongodb.MongoTimeoutException when using MongoClient with list ServerAddress
<p>I'm trying to deploy a replica database onto one server with different port and connect with it. Everything is ok if I just use single ServerAddress and connect directly to Primary DB like this:</p> <pre><code>mongoClient =new MongoClient(new ServerAddress("104.236.106.53", 27000)); morphia = new Morphia(); ds = mo...
0
1,084
Writing to Unity's StreamingAssets folder at runtime, on Android?
<p>So...my goal is the following:</p> <ol> <li>Download an .mp4 video with an http request.</li> <li>Put it in the StreamingAssets folder in my Android APK, using www.bytes and File.WriteAllBytes().</li> <li>Play it on an Android device, using the EasyMovieTexture movie plugin I bought.</li> </ol> <p>However, I'm get...
0
1,455
TypeError: 'append' called on an object that does not implement interface FormData. Again
<p>I'm getting these errors in firebug when trying to do an ajax upload, but I can't figure out why. I was unable to find an answer in any previous posts.</p> <p>1.TypeError: 'append' called on an object that does not implement interface FormData. list.appendChild(li);</p> <p>2.TypeError: list is null list.appendChil...
0
1,972
jQuery datatables don't show table if haven't data
<p>I'm using jquery datatables with server side fetch data, my problem is when table of data is empty datatables hide table and don't show that, i want to show table with no any data on table message, how to have this option?</p> <pre><code>oTable_topics =$('#showTopics').dataTable({ "bLengthChange": false, "b...
0
1,453
iPhone KERN_INVALID_ADDRESS
<p>Im not sure why I am recieving this error, and I'm unable to track down the cause. This only happens on the device though, Simulator runs error-free as expected. Can anyone make sense of this crash log?</p> <pre><code>Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x61f6490a Cras...
0
2,499
Capture picture without preview using camera2 API
<p>What I want to achieve is capturing a picture without showing the preview, sending directly the output to an <code>ImageReader</code>. I have used the <a href="https://github.com/googlesamples/android-Camera2Basic/blob/master/Application/src/main/java/com/example/android/camera2basic/Camera2BasicFragment.java" rel=...
0
1,670
Giving a column multiple indexes/headers
<p>I am working with pandas dataframes that are essentially time series like this:</p> <pre><code> level Date 1976-01-01 409.67 1976-02-01 409.58 1976-03-01 409.66 … </code></pre> <p>What I want to have, is multiple indexes/headers for the level column, like so:</p> <pre><code> ...
0
1,271
Converting a jQuery plugin to TypeScript
<p>Ok so first off here is my very basic jQuery plugin</p> <pre><code>(function ($){ $.fn.greenify = function (options) { var settings = $.extend({ // These are the defaults color: '#556b2f', backgroundColor: 'white' }, options); }(jQuery)); $('a').greenify({ ...
0
1,998
Capture data from TextFormField on flutter for http POST request
<p>i am trying to make a login with flutter. I am consulting a web service. I want to send in the body of the Post request the username and the password from different TextFormField. how can i do that? Here is the code i've been working on.</p> <pre><code>import 'package:flutter/material.dart'; import 'package:device_...
0
1,464
Windows Azure Trace Log not working
<p>I'm sure I have missed something simple but I can't get simple Trace.WriteLine to work on Azure.</p> <p>Steps I have taken:</p> <p>Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString has been set up to our Azure storage account</p> <p>Import Module Diagnostics to service definition file.</p> <p><code>Web...
0
1,047
Running selenium-chromedriver using Protractor on linux
<p>I am using protractor to run tests against an Angular application. They work on my OSX environment but not on Linux where TeamCity is trying to run it.</p> <p>When I run this command on my local OSX environment, it works (tested on my co-workers machine, too):</p> <pre><code>./node_modules/protractor/bin/protracto...
0
1,935
DataTable memory huge consumption
<p>I´m loading csv data from files into a datatable for processing.</p> <p>The problem is, that I want to process several files and my tests with the datatable shows me huge memory consumption I tested with a 37MB csv file and the memory growed up to 240MB, which is way to much IMHO. I read, that there is overhead i...
0
1,080
open xml reading from excel file
<p>I want to implement openXml sdk 2.5 into my project. I do everything in this <a href="http://msdn.microsoft.com/en-us/library/office/gg575571.aspx">link</a></p> <pre><code>using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; using System.IO.Packaging; sta...
0
1,778
AttributeError: 'module' object has no attribute 'strptime' -- Possible Bug?
<p>I am a little bit confused as to why I am receiving the error AttributeError: 'module' object has no attribute 'strptime'. When I import datetime in my Python script and call datetime.datetime.strptime(string, format) everything works fine but when I write from datetime import datetime and call datetime.strptime(str...
0
2,638
Pagination controls not showing up in ng-table when fetching data from backend
<p>I am fetching a list of data from the backend and displaying it using ng-table. The problem is that its not showing the pagination controls. Previously, when I used dummy data to show the ng-table, pagination was working totally fine. Could someone help me out here?</p> <p>This is my HTML: </p> <pre><code>&lt;tabl...
0
2,888
Request method 'HEAD' not supported
<p>I run a new instance of Intellij Idea with apache tomcat 7.0.55 and I've created a new simple project but i get this errors continually : </p> <pre><code>Feb 28, 2015 11:54:13 PM org.springframework.web.servlet.PageNotFound handleHttpRequestMethodNotSupported WARNING: Request method 'HEAD' not supported </code></pr...
0
2,200
WPF: Implementing and binding (datagrid) to a custom collection
<p>I have a custom collection that I am passing to a WPF client, which is binding the collection to a <code>datagrid</code> using <code>AutoGenerateColumns="True"</code>. The datagrid, however, is displaying empty rows (albeit the right number of empty rows). What am I doing wrong? Following is some sample code. For no...
0
1,578
How to COALESCE a timestamp column?
<p>In PostgreSQL 9.3 I have the following table with 2 timestamps:</p> <pre><code>create table pref_users ( id varchar(32) primary key, first_name varchar(64) not null, last_name varchar(64), female boolean, avatar varchar(128), city varchar(64), mobile varchar(6...
0
1,974
Visual Studio C++ "ProjectName.exe has triggered a breakpoint" and other issues
<p>I've looked into this issue, but I haven't really received a good answer so I thought I'd ask here.</p> <p>I'm working on project in C++ that involves a bit of memory manipulation (allocating dynamic char arrays and putting memory addresses and full objects inside those arrays using placement new). </p> <p>I'm run...
0
2,009
ValueError: need at least one array to concatenate
<p>I am having issues with </p> <blockquote> <p>ValueError: need at least one array to concatenate</p> </blockquote> <p>Below is the whole error message. </p> <pre><code> Training mode Traceback (most recent call last): File "bcf.py", line 342, in &lt;module&gt; bcf.train() File "bcf.py", line 321, in t...
0
3,284
Why Swift is 100 times slower than C in this image processing test?
<p>Like many other developers I have been very excited about the new Swift language from Apple. Apple has claimed its speed is faster than Objective C and can be used to write operating system. And from what I learned so far, it's a static typed language and able to have precisely control over the exact data type (like...
0
1,462
How can we configure Kendo-UI ComboBox with Grid.
<p>I have a problem to configure the Kendo-Ui with Combo-box with custom values. I have seen this question <a href="https://stackoverflow.com/questions/9559269/how-to-use-combobox-as-kendo-ui-grid-column">How to use ComboBox as Kendo UI grid column?</a> but we are unable to configure the whole ... </p> <p>Please look...
0
3,216
Using loops with knitr to produce multiple pdf reports... need a little help to get me over the hump
<p>First of all, I must admit that I'm very new to knitr and the concept of reproducible analysis, but I can see its potential in improving my current workflow (which includes much copy-pasting into word docs).</p> <p>I often have to produce multiple reports by group (Hospital in this example) and within each hospital...
0
1,193
adb server version doesn't match this client
<p>Whenever I try to run <code>adb devices</code>:</p> <pre><code> $ adb devices * daemon not running. starting it now * * daemon started successfully * List of devices attached HT0ANRV05740 device </code></pre> <p>It says daemon is not running and restart...
0
3,118
Hiding a navigation bar with .hide()
<p>I have searched and searched trying to figure out what is wrong with my code. I would like to hide the navigation bar completely at a certain screen width but I am getting absolutely nothing. JS fiddle and Code Pen can't find anything and safari isn't showing syntax errors. I have only been at this a month, here it ...
0
1,064
@Inject, @EJB, @Local, @Remote, @LocalBean, etc... : confused?
<p>I have the following configuration:</p> <ul> <li>1 EAR on one GF containing 2 EJB-JARs with EJB components.</li> <li>1 WAR on another Glassfish server (<i>=> other JVM</i>) containing web components accessing the EJB components.</li> </ul> <p>I have 2 EJB business services in each EJB-JAR of my EAR, and they are a...
0
1,088
Unable to mute unzip output in script
<p>I wrote a script that unzips certificates from zips and tests the certs against one of our servers:</p> <pre><code>#!/bin/bash WORKINGDIR=$(pwd) if [ ! -f ./users.zip ]; then echo "users.zip not found. Exiting." exit 1 else unzip users.zip -d users echo "users.zip extracted....
0
1,121
Mapping a specific servlet to be the default servlet in Tomcat
<p>I am trying to implement a servlet that gets raw requests, and decide either to process them, or forward them to another backend server. It is similar to a load-balancer, where a received request is forwarded to one of the (in my case 2) destinations. One of the destination is remote (on another host). Furthermore, ...
0
1,041
“value $ is not a member of StringContext” - Missing Scala plugin?
<p>I'm using maven with scala archetype. I'm getting that error:</p> <blockquote> <p>“value $ is not a member of StringContext” </p> </blockquote> <p>I already tried to add several things in pom.xml, but nothing worked very well...</p> <p>My code:</p> <pre><code>import org.apache.spark.ml.evaluation.RegressionEva...
0
3,762
FancyBox returning "The requested content cannot be loaded. Please try again later." with link
<p>I'm using Fancybox to display inline content (a div with an image linked to a new page). The div and image display fine in the modal, but when the image is clicked to go to the new page, I get "The requested content cannot be loaded. Please try again later." error.</p> <p>The FancyBox javascript is as follows:</p> ...
0
1,064
youtube-dl DASH video and audio in highest quality without human intervention
<p>With youtube-dl I first look what video quality is available and then in second step I download highest possible quality (in this example <code>-f 137+140</code>). Youtube-dl will automatically merge audio and video stream (DASH format)</p> <p>How to automate that with shell script? With every URL, choose highest a...
0
4,122
Magento 2.4 Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
<p>I am trying to upgrade my Magento 2.3 store to 2.4. In trying to do so, when I try to run <code>bin/magento setup:upgrade</code> I receive the following error: <code>Could not validate a connection to Elasticsearch. No alive nodes found in your cluster</code></p> <p>Here is what I have so far.</p> <p>I am running ng...
0
5,985
iPhone display date picker on UITextField touch
<p>I followed this thread: <a href="https://stackoverflow.com/questions/7308754/datepicker-by-clicking-on-textfield">datepicker by clicking on textfield</a></p> <p>I imported both of the following protocols:</p> <pre><code>@interface ViewController : UIViewController&lt;UIActionSheetDelegate, UITextFieldDelegate&gt; ...
0
1,037
jQuery .show() adds style="display:inline-block" to elements
<p>I'm working on a site I inherited at work that shows donation progress using progress bars / labels. The majority of the lists will have 9 years in the (e.g. 1990-1999) but the last one has 13 (2000-2012). Because of this, I have a javascript function <code>showHiddenBars()</code> which shows / hides the respective ...
0
2,288
How to destroy a datatable?
<p>I'm using <a href="http://www.datatables.net/" rel="noreferrer">datatables</a> and using <a href="https://github.com/dangrossman/bootstrap-daterangepicker" rel="noreferrer">bootstrap-daterangepicker</a> to select a range for which data will be shown in Datatables.</p> <p>It is working fine.</p> <p>The problem is w...
0
1,142
gnuplot giving warning: Skipping data file with no valid points
<p>I am using the gnuplot script</p> <pre><code> #qe.conf set terminal png truecolor set output "qe.png" set xrange ["400" : "700"] set yrange ["0" : "1"] set style data lines plot "qe.txt" using 1:2 title "%Red", '' using 1:3 title "%G-r", '' using 1:4 title "%G-b", '' using 1:5 title "%R" </code></pre> <p>I am e...
0
1,484
the specified child already has a parent
<p>my code is here</p> <pre><code>if(c!=null) { c.moveToFirst(); String col = c.getString(2); // check.setText(col); check.setVisibility(0); while(!c.isAfterLast()) { String col1 = c.getString(1); String col2 = c.getString(2); String col3 = c.getStri...
0
2,261
Why getservletcontext isn't found?
<p>I'm trying to use <strong>getServletContext().getRealPath( "/" )</strong> , but I keep getting this error: </p> <p><strong><em>cannot find symbol symbol : method getServletContext() location: interface javax.servlet.http.HttpSession String path = session.getServletContext().getRealPath("/") + "layout/tiles/"...
0
1,181
Prevent table from wrapping
<p>How do I prevent a table from wrapping when it is inside of an outer table cell?</p> <p><strong>Have a look at the simplified example at the bottom of my question.</strong></p> <p>My aspx-tablerow:</p> <pre><code>&lt;tr runat="server" id="trButtons"&gt; &lt;td align="left" colspan="9" valign="top" style="white-...
0
2,662
ERROR in build.js from UglifyJs Unexpected token: punc (()
<p>I have developed an application on my local. The client and server run on different ports. The application runs fine on my local system. I have now pushed the code onto the server. When I try running the code using npm run build.</p> <p>I get an error that looks like this</p> <p><a href="https://i.stack.imgur.com/...
0
1,136
Responsive navbar with sidebar in vuejs ( bootstrap or bootstrap-vue )
<p>I am using Vue.js for my project and I have made a dashboard section but I want something that is responsive and should use bootstrap or bootstrap-vue or plain HTML, CSS. Attaching the pictures of the dashboard I want to have -&gt; <a href="https://i.stack.imgur.com/ARoKP.png" rel="nofollow noreferrer"><img src="htt...
0
4,429
How to display XSD validated XML using XSLT
<p>I've been fighting with this for some time now, and haven't been able to find a clear answer to this yet.</p> <p>As I understand correctly I can store data in an XML file, validate it using an XSD and then display the data neatly using an XSLT.</p> <p>However I've been having issues trying to perform XPath queries...
0
2,915
Moving to another view controller in iOS on Button Click
<p>I am very new to iOS and I am still trying to grasp things. I am trying out this simple program in XCode 5 where when a user clicks the button, he will be redirected into another view controller. I did what other forums told other askers to do, but I seem to encounter an error.</p> <p>Here are my codes:</p> <p>In ...
0
2,385
using custom IPrincipal and IIdentity in MVC3
<p>I create my own <code>IPrincipal</code> and <code>IIdentity</code> implementation as shown below:</p> <pre><code>[ComVisible(true)] [Serializable] public sealed class CustomIdentity : IIdentity { private readonly string _name; private readonly string _email; // and other stuffs public CustomIdenti...
0
1,303
Generate and Design Rdlc file programmatically
<p>I'm doing mvc reporting and i'm very new at it. I'm trying to create a report, and i have done it using rdlc. Everything works well, it can be exported to various format. My problem, when using rdlc is that we need to design and bind it first. How can i create an empty rdlc template, design and bind it with dataset ...
0
1,510
Star B-V color index to apparent RGB color
<p>I'm trying to convert a star's <a href="http://en.wikipedia.org/wiki/B-V_colour" rel="noreferrer">B-V color index</a> to an apparent RGB color. Besides look up tables and color ramps, it seems like there's no well known algorithm for doing this.</p> <h2>What's a B-V color index?</h2> <p>It's a number astronomers a...
0
1,890
How do I store a simple cart using localStorage?
<p>I'm trying to create a javascript cart for a prototype project I'm working on. I realise that in this situation an MVC framework like Angular/Knockout etc would be absolute perfect but I'm still learning how to use those so I can't use them for this particular project. I also realise I could maintain the cart server...
0
1,130
error: Entity class must be annotated with @Entity
<p>I decided to use kotlin with Room library and I really faced a lot of problems and tired from reading reference and finding a solution My Data Class:</p> <pre><code>@Entity data class HistorySong( @PrimaryKey var SongId: Int =0, @ColumnInfo(name = "song_name") var songName: String=...
0
1,562
Beginner-level Python threading problems
<p>As someone new to GUI development in Python (with pyGTK), I've just started learning about threading. To test out my skills, I've written a simple little GTK interface with a start/stop button. The goal is that when it is clicked, a thread starts that quickly increments a number in the text box, while keeping the GU...
0
1,898
Android Q: Get image from gallery and process it
<p>I know it seems like a very basic question, but it's specifically for Android Q.</p> <p>I just want to get an image from Gallery and compress it and send to the server. But because of the Android Q's Scoped Storage, it's harder than I thought. I'll first explain what I did with code:</p> <p>First I send out the in...
0
1,193
but these conflict with your requirements or minimum-stability
<p>I am creating my own slackbot. I decided to use project as a library to help me.</p> <p><a href="https://github.com/sagebind/slack-client/issues?utf8=%E2%9C%93&amp;q=stability" rel="noreferrer">https://github.com/sagebind/slack-client/issues?utf8=%E2%9C%93&amp;q=stability</a></p> <p>Now I need to install it with com...
0
1,475
Error publishing a new version of a package in npm
<p>I'm trying to republish a package using npm. I did update the package version in <code>package.json</code>, yet I get the following error:</p> <pre><code>npm ERR! publish Failed PUT 404 npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs \\node_modules\\npm\...
0
2,330
Python: requests can't login to a website
<p>I need to scrape website that requires login. I'm trying to create a <code>session</code> and login as I have to scrape different pages after logging in. But can't find out why it's not working.</p> <pre><code>import requests from bs4 import BeautifulSoup login_data = { "log":"login", "login"...
0
1,196
Error initializing entity framework database sequence contains no matching elements
<p>I've been staring at this for the last 5 hours, trying a bunch of things, but I'm not getting anywhere...</p> <p>When I try to start my MVC website who's database I've created using Entity Framework Code First, the database fails to initialize, throwing the following exception message: </p> <blockquote> <p>Sequ...
0
4,666
Dependency error while installing mysql workbench on ubuntu 12.04
<p>I am trying to install mysql workbench. I am getting below error. It seems that it looks for mysql in some default directory. I have all the required things installed, but not where mysqlworkbench is expecting it to be. Whats the way out!</p> <pre><code>local@host:/var/www/$ sudo apt-get -f install mysql-workbench ...
0
1,222
UnserializableDependencyException: WELD-001413: The bean declares a passivating scope but has a non-passivation-capable dependency
<p>I have the below CDI managed bean:</p> <pre><code>@Named @SessionScoped public class InfoPageController implements Serializable { @Inject private InfoPageMapper mapper; } </code></pre> <p>It throws the below exception during deployment to GlassFish 4.1:</p> <pre><code>Exception while loading the app : C...
0
2,072
JPA EntityManger preforming a database insert on merge?
<p>I am using JPA with Hibernate underneath, and I am having trouble getting merge to work, but before I describe the problems I am encountering with JPA, let me lay out what I am trying to accomplish, just in case my problems stems from my approach.</p> <p>I have data from on system that I need to place into another...
0
1,680
Handle 400 Bad Request From WebApi In Angular 6 (using HttpClient)
<p>Below is an Asp.net Core WebAPI which returns bad request with Error details as to its param when let's say duplicate a user is trying to register.</p> <pre><code>public async Task&lt;IActionResult&gt; Register([FromBody] RegisterModel registerModel) { if (ModelState.IsValid) { var u...
0
1,453
How to calculate running speed using accelerometer sensor in android
<p>I tried to calculate running speed sensor <code>TYPE_LINEAR_ACCELEROMETER</code> in Android, but the results I am getting is highly inaccurate. Calculated average acceleration is always positive value, so it keeps on increasing. Here is my procedure and code, please suggest me what is the correct way to calculate fr...
0
7,350
High system CPU usage when contending futex
<p>I have observed that when the linux futexes are contended, the system spends A LOT of time in the spinlocks. I noticed this to be a problem even when futexes are not used directly, but also when calling malloc/free, rand, glib mutex calls, and other system/library calls that make calls to futex. Is there <em>ANY</...
0
1,072
Unresolvable dependency resolving [Parameter #0 [ <required> $name ]]
<p><strong>Warning:</strong> This question is Laravel 4 specific.</p> <p>I've been using Facades in my controllers before. Therefore I know the code is working. Now I need to introduce dependency injection for various reasons.</p> <p>After refactoring the controller I get following error:</p> <blockquote> <p>Illuminate...
0
1,856
Explode array in apache spark Data Frame
<p>I am trying to flatten a schema of existing dataframe with nested fields. Structure of my dataframe is something like that:</p> <pre><code>root |-- Id: long (nullable = true) |-- Type: string (nullable = true) |-- Uri: string (nullable = true) |-- Type: array (nullable = true) | |-- element: string (...
0
1,067
java.lang.SecurityException: Prohibited package name: java.lang
<p>I'm getting the following error when trying to build my very simple webservice project. I've given the build.xml, my java file and path values</p> <p>The class file is getting generated, but service is not getting generated.</p> <p>Please help... It's bugging for a looooong time..</p> <p>Thanks! :)</p> <blockquo...
0
3,431
Multiple scenarios @RequestMapping produces JSON/XML together with Accept or ResponseEntity
<p>I am working with Spring 4.0.7 </p> <p>About Spring MVC, for research purposes, I have the following:</p> <pre><code>@RequestMapping(value="/getjsonperson", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Person getJSONPerson(){ logger...
0
2,936
PHP with MySQL is slow
<p><strong>(IMPORTANT) EDIT 3:</strong> Running the testajax2.php by itself and <em>not</em> Ajax. The duration is about the same, 1.02-1.03 seconds. So I guess that means the problem is in PHP-MySQL or <a href="http://en.wikipedia.org/wiki/XAMPP" rel="nofollow noreferrer">XAMPP</a>??</p> <p>When I ran it through a <a...
0
1,290
Chat box scroll to bottom?
<p>I have created a simple chatbox using PHP. I want this to be able to load a all the new message and scroll to the bottom of the <code>chatbox</code>. I'm using AJAX to reload the new messages, but cannot seem to make it scroll down to the bottom where the new messages appear.</p> <p>I have tried using <code>down.sc...
0
3,032
Java ArrayList starts with 1 not 0?
<p>I'm retrieving some data from <code>DB</code> with the <code>ff</code> code:</p> <pre><code>List&lt;modelA&gt; list= new ArrayList&lt;modelA&gt;(); list = modelA.getList(parameter); </code></pre> <p>This is what has been retrieved:</p> <pre><code>list[1] = "var1" list[2] = "var2" list[3] = "var3" </code></pre> ...
0
1,161
Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
<p>Using <code>tensorflow 2.4.1</code></p> <p>When I run my program, I'm getting this error and can't use my <code>gpu</code>.</p> <p>I'm using <code>CUDA 11.0</code>, <code>cudnn 8.0</code></p> <pre><code>2021-02-07 03:36:18.132005: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dy...
0
1,242
error: package org.testng.annotations does not exist [javac] import org.testng.annotations.Test;
<p>I have a simple project that I am trying to build using Ant. My project contains testng, but I get an error message when I try to run the build. Could you please help me? I have spent a lot of time trying to see what's the problem but without any results so far.</p> <p>Here is the project:</p> <pre><code>package s...
0
1,257
Django | joined path is located outside of the base path component {% static img.thumbnail.url %}, Error 400 with whitenoise
<p>I've finish my first app in Django and works perfectly, but still have pre-deployment problems since I set DEGUG=False ... Here is just to display an image in a template... T_T</p> <p>I was using this, but now it does'nt work when I use whitenoise to serve my image localy... And it return a Bad Request(400) error.....
0
2,308
PowerMockito mocking static method fails when calling method on parameter
<p>I'm trying to test a class which uses a calculator class with a number of static methods. I've successfully mocked another class in a similar way, but this one is proving more stubborn.</p> <p>It seems that if the mocked method contains a method call on one of the passed in arguments the static method is not mocke...
0
1,069
ASP .NET Core use multiple CORS policies
<p>I am trying to setup 2 CORS policies. One as an api default and the other to use on <code>Controllers</code> as I need them. The reason I want to do this is because I have an endpoint that takes in an object with email info and sends an email (to use with the contact me box on my webpage) and have it only accept r...
0
1,668
How to solve the BluetoothGatt : android.os.DeadObjectException error happened in Android?
<p>I following the page <a href="http://developer.android.com/guide/topics/connectivity/bluetooth-le.html" rel="noreferrer">Bluetooth Low Energy</a> for developing in <strong>Android 4.3</strong> for <strong>Bluetooth Low Energy</strong> .</p> <p>I already can turn on the Bluetooth , scan the device and connect to the...
0
11,791
Create from a List<Date> a List<List<Date>> that has all Dates which are subsequently put in Lists
<p>I hope you understood me. Hard to describe in english for me. So I have a List of sorted Date Objects. Now I want to put all Dates that are in a row (12/16/09, 12/17/09, 12/18/09...) in a List of their own. Stand-alone-Dates shall also be put in a List of their own.</p> <p>So from <code>(12/01/09; 12/02/09; 12/03/...
0
1,290
Django - A server error occurred. Please contact the administrator
<p>I've just started learning Django and followed their tutorial to the letter. I've tried to set up the website three times, every time I was greeted with the same error (in the title).</p> <p>Again, followed their official tutorial to the letter. I'm at Tutorial 2, where I'm supposed to access the admin page. When I...
0
2,805
Unfortunately, Camera has stopped
<p><a href="https://i.stack.imgur.com/MjYYf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MjYYf.png" alt="enter image description here"></a></p> <p>When I launch the Camera application I am getting this error, and this is my logcat. </p> <pre><code>12-08 12:50:10.393 2275-2369/com.android.launcher...
0
2,020
Best way to cache images on ios app?
<p>Shortly, I have an <code>NSDictionary</code> with urls for images that I need to show in my <code>UITableView</code>. Each cell has a title and an image. I had successfully made this happen, although the scrolling was lagging, as it seemed like the cells downloaded their image every time they came into the screen. I...
0
1,387
Android app unable to start activity componentinfo
<p>I'm a new Android programmer and recently, a lot of my projects have been getting this error:</p> <pre><code>07-31 23:45:19.592: ERROR/AndroidRuntime(716): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amrit.musifind/com.amrit.musifind.Main}: java.lang.NullPointerException </code></...
0
4,874
How to let kubelet communicate with apiserver by using HTTPS? v0.19
<p>I deployed apiserver on master node (core01) with following conf:</p> <pre><code>core01&gt; /opt/bin/kube-apiserver \ --insecure_bind_address=127.0.0.1 \ --insecure_port=8080 \ --kubelet_port=10250 \ --etcd_servers=http://core01:2379,http://core02:2379,http://core03:2379 \ --service-cluster-ip-range=10.1....
0
3,362
Style WPF radio button as toggle button with correct IsEnabled behaviour
<p>I need to style some grouped radio buttons as toggle buttons. To do this I've applied the following style to the radio buttons:</p> <pre><code>Style="{StaticResource {x:Type ToggleButton}}" </code></pre> <p>This gives me the style I'd like, but I noticed an annoying side effect. I need to be able to change the sel...
0
1,892
How to paginate with codeigniter 3.0.1
<p>I am trying to create pagination using CodeIgniter. It displays links fine, but when I click the links it shows 404 error. How to solve this?</p> <p><strong>Controller Example.php</strong></p> <pre><code>class example extends CI_controller { public function __construct() { parent::__construct(); $this-...
0
2,623
Cannot access a disposed object
<p>Cannot access a disposed object</p> <p>Anyone know why I would get this error "Cannot access a disposed object" on this line of code</p> <pre><code>Invoke(new UpdateTimerDelegate(UpdateTimer), new object[] { null }); </code></pre> <p>Hit start over then either accept / reject / or close the form -- seems to happe...
0
4,085
The page you were looking for doesn't exist - heroku+rails
<p>Good day. I am trying to deploy rails-application on heroku according to Hartl's book Ruby on Rails tutorial. I did <code>$ git push heroku master</code> and it was done correctly. But when i use <code>$ heroku open</code> there is a text </p> <blockquote> <p>`The page you were looking for doesn't exist.</p> </bl...
0
2,993
CMAKE libintl-8.dll is missing from your computer
<p>I've been looking for solutions, and honestly I'm stuck.</p> <p><a href="https://i.stack.imgur.com/w2R9m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w2R9m.png" alt="Screenshot"></a></p> <p>I'm trying to install Box2D, as you can see by the file paths.</p> <p>Anyway, this prompt appears seve...
0
1,028
Getting modal to dynamically resize when window is resized
<p>I've managed to get my Block UI modal dead centre but now the problem is that when the window is resized (made smaller or bigger), the modal (and the surrounding overlay) does not dynamically resize. Is there a way I can achieve this using jQuery? Here is what I've done so far: <a href="http://jsfiddle.net/2dpc7/" r...
0
1,726
SAML based SSO with Laravel
<p>I'm implementing SAML based SSO for one of the php web application. I'm using google as IDP. I've used <a href="https://github.com/aacotroneo/laravel-saml2" rel="noreferrer">Laravel 5 - Saml2</a> plugin and configured as per the steps given into it's documentation. I also added this app in google admin console as SA...
0
1,628
Basic Authentication for WCF
<p>I am trying to do a very basic but secure username/password authentication with wcf.</p> <p>However when I look at the value of the <code>ServiceSecurityContext.Current.PrimaryIdentity;</code> it contains the credentials of my windows machine and claims it is authorised (even though I have not yet done any authoris...
0
1,642
HttpInterceptor handling 401 error does not return Observable
<p>I am following this example: <a href="https://www.intertech.com/Blog/angular-4-tutorial-handling-refresh-token-with-new-httpinterceptor/" rel="nofollow noreferrer">https://www.intertech.com/Blog/angular-4-tutorial-handling-refresh-token-with-new-httpinterceptor/</a></p> <p>All works well, except the method <code>han...
0
1,443
Making use of -mfloat-abi=hard and -mfpu=vfp/neon Codesourcery Lite 2013.05-24
<p>To make use of vfp or neon I added -mfpu=vfp and -mfloat-abi=hard to my cross compilation. The Programm is a very simple hellofloat.cpp which then doesn't compile any more with the Sourcery CodeBench Lite 2013.05-24.</p> <pre><code>#include &lt;string&gt; #include &lt;iostream&gt; using namespace std; int main() { ...
0
2,053
dictionary update sequence element #0 has length 3; 2 is required
<p>I want to add lines to the object <code>account.bank.statement.line</code> through other object But I get following error: </p> <blockquote> <p>"dictionary update sequence element #0 has length 3; 2 is required"</p> </blockquote> <p>Here is my code:</p> <pre><code>def action_account_line_create(self, cr, uid, i...
0
1,310
How to show a splash screen for 3 seconds on Android?
<p>I would like the splash image to begin and stay for 3 seconds, and then disappear and continue or be replaced with the rest of the layout in the main.xml.</p> <p>This is my code:</p> <p>Main.java</p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWi...
0
1,038
CreateFile() returns INVALID_HANDLE_VALUE but GetLastError() is ERROR_SUCCESS
<p>I am opening a serial port using <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx">CreateFile()</a>. I've got a testcase (too complicated to redistribute) that consistently causes <code>CreateFile()</code> to return <code>INVALID_HANDLE_VALUE</code> and <code>GetLastError()...
0
2,022
Linphone for android is not working/missing libraries
<p>I am trying to run linphone code which I get from <strong>git://git.linphone.org/linphone-android.git --recursive</strong> . After downloading it successfully, I tried to compile and run it as per the README file. I used Cygwin for Autotools, Autoconfig, Automake, aclocal, libtoolize and pkgconfig &amp; Android ndk ...
0
1,621
Android Indeterminate ProgressBar does not spin
<p>Sorry if this has been asked before but I cannot find the answer for this (I have searched!)</p> <p>I have tried to follow the google/android documentation to make an indeterminate progressbar appear and spin while my app does a lengthy task.</p> <pre><code>protected void readData(final String whatToFind) { ...
0
1,248
Display JSON data to HTML page using JavaScript
<p>First time being exposed to JSON so please explain like I'm 5 without the jargon. I have been given a JSON file like this and need to display these items in a list in HTML. A lot of examples have the JSON object assigned to a variable- this isn't assigned to a variable so I'm unsure how to reference it. How can I ac...
0
1,182
Animation of dots using view pager
<p>I am working on a FragmentActivity which contains a ViewPager. ViewPager is provided three fragments using FragmentPagerAdapter.So i am able to implement swipe screens using viewpager.I can swipe the pages and on clicking next button ,i can move to next page/fragment as well .The following code is working for me :</...
0
1,947
Redirect to home page after login php
<p>I've created a login-form. How can I make so that when a user logs in he/she redirects to a page where it displays his/her name? I've walked through many tutorials on how to do this, but nothing was pretty good...</p> <p>main_login.php:</p> <pre><code>&lt;table width="300" border="0" align="center" cellpadding="0"...
0
1,117
Setting cookie to expire after one day
<p>I have used this code I got from git. Its basically set up to set a cookie to display a popup on the first visit to the site only. However, I want it to only set it for 24 hours. So if someone comes back to the site in a day or two it will show again. </p> <pre><code>(function ($) { 'use strict'; $.fn.fir...
0
1,074
No 'Access-Control-Allow-Origin' header is present on the requested resource. Ionic, AngularJS, Spring Boot 1.3
<p>I am using Ionic and Spring Boot 1.3. It wasn't until I upgraded to 1.3 that I am getting this problem...</p> <p>Apparently after updating to Spring Boot 1.3. CorsFilter is being ignored completely. All this deprecation is driving me nuts. So I looked up the NEW way and this is what I got.</p> <pre><code>package a...
0
1,413
Bellman Ford Algorithm in Java
<p>Can Anyone help with bellman ford algorithm in java to calculate the shortest path from the source vertex.</p> <p>I would also like the final updated predecessor nodes to be printed for each nodes after traversing all the edges and after all iterations This is my code</p> <pre><code>import java.io.*; import j...
0
1,235