title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Java: How to iterate through an array of type linked lists and append those to an array
<p>For homework in an algorithms class we had to write a program that implemented a Radix sort algorithm. I ended up implementing it in a round about way, and it functions correctly. However there is a part of my code that is an atrocious looking if else block in a for loop. I have to retrieve the items out of an ar...
2
1,050
Sencha Touch 2 - undefined getValues() when form values are retrieved from the controller
<p>I am trying to create a form embedded inside a Panel and trying to retrieve the contents of the form fields from within the controller. </p> <p>Below is my view and controller code. </p> <pre class="lang-js prettyprint-override"><code>Ext.define('MyApp.view.SignIn', { extend: 'Ext.Container', ...
2
5,329
How to test a React component having async functions with jest & enzyme
<p>I have a component:</p> <p><strong>RandomGif.js</strong></p> <pre><code>import React, { Component } from "react"; import Gif from "./Gif"; import Loader from "./library/Loader"; import { fetchRandom } from "../resources/api"; class RandomGif extends Component { constructor(props) { super(props); this.h...
2
1,284
Is there any way to detect multiple touches on my screeen in flutter?
<p>I have this piece of code and what it does is when touching on the screen a blue circle appears and follows the tap/drag location of my finger . What i want to achive is to have this blue circle appear each time theres a new finger on the screen even if there are 2 or 3 touches at the same time. Please Help me I am...
2
1,236
How to change values in Flask session dictionary using forms?
<p>I'm writing shopping cart on Flask.</p> <p>My cart based on session and forming dictionary like this:</p> <pre><code>[{'qty': 1, 'product_title': 'Post num six', 'product_id': 6}, {'qty': 1, 'product_title': 'Post five', 'product_id': 5}, {'qty': 1, 'product_title': 'Fouth post', 'product_id': 4}] </code></pre> ...
2
1,310
Multinomial logit models and nested logit models
<p>I am using the mlogit package in program R. I have converted my data from its original wide format to long format. Here is a sample of the converted data.frame which I refer to as 'long_perp'. All of the independent variables are individual specific. I have 4258 unique observations in the data-set.</p> <pre><code> ...
2
1,586
How to add comment to a reactive data table in shiny
<p>This question is an extension of the question I posted: <a href="https://stackoverflow.com/questions/56503342/add-text-comments-to-a-datatable-in-shiny/56504173?noredirect=1#comment99613376_56504173">this question</a></p> <p>I created a dataframe with 3 columns: num, id and val. I want my shiny app to do the follow...
2
1,215
How to filter list view using search edittext with JSON url
<p>am using edittext for search form <code>JSON</code> url datas, i give search field. search each letter type on <code>editText</code> filter the <code>listview</code>, at same time <code>listview</code> reload, if <code>edittext</code> empty show all current list. how to that please help me...</p> <pre><code> @Overr...
2
1,889
Apache Camel: Failed to create Producer for endpoint, reason: ArrayIndexOutOfBoundsException
<p>I'm routing ActiveMQ messages using Apache Camel.</p> <p>Some times! I get this exception in my router:</p> <pre><code>[ERROR] DefaultErrorHandler(Camel (camel-1) thread #11 - Threads):161 - Failed delivery for (MessageId: queue_Q. ... on ExchangeId: ...). Exhausted after delivery attempt: 1 caught: org.apache.cam...
2
1,746
OpenGL 4 core profile, shaders and MFC
<p>I'm trying to get shaders to work in an MFC app with an OpenGL 4 core profile.</p> <p>I did this in a Win32 app to make sure it works (it does, drawing a triangle in the lower part of the window):</p> <pre><code>BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store in...
2
6,407
Registry Changing When I Log Off (or On??)
<p><strong>Summary</strong></p> <p>I'm using C# .NET 4.0 Framework on 64 bit Windows 7 to write to the registry, and one of the values I write seems to change when I log off (or on, I can't tell), but only the first time I log off and back on.</p> <p>Please help me understand what I'm missing.</p> <p><strong>Full St...
2
1,323
Spring Security "No bean named 'filterChainProxy' available" error
<p>I followed several tutorials to use Spring security but I still have the same "<em>No bean named 'filterChainProxy' available</em>" issue.</p> <pre><code>org.apache.catalina.core.StandardContext.filterStart Exception starting filter [filterChainProxy] org.springframework.beans.factory.NoSuchBeanDefinitionException:...
2
1,753
Data binding memory leak
<p>When I open my fragment that used data binding, memory leak occur as shown in below. Is there any appropriate answer to solve this?</p> <p>I used</p> <ul> <li>Data binding</li> <li>Navigation</li> <li>Lifecycle</li> <li>Material ui</li> </ul> <pre><code>┬─── │ GC Root: System class │ ├─ androidx.databinding.ViewD...
2
1,359
Rails scalar query
<p>I need to display a UI element (e.g. a star or checkmark) for employees that are 'favorites' of the current user (another employee).</p> <p>The Employee model has the following relationship defined to support this:</p> <pre><code> has_and_belongs_to_many :favorites, :class_name =&gt; "Employee", :join_table =&gt;...
2
1,366
Spring boot JMS : How not to lose jms message when internal application error happens at the JMS receiver
<p>If JMS receiver fails due to some reason like database connection failure, then JMS message will be lost. could anybody suggest me what is the common solution avoid losing JMS messages with spring boot application</p> <p>Should I resend the message back to the queue where it originated in case of error while proces...
2
1,229
Project not compiling properly with AspectJ Maven
<p>I am trying to work with <strong>AspectJ</strong> in <strong>IntelliJ Community Edition</strong>.</p> <p>It's not working as expected. Where do am I making a mistake? Any help/insights would be very much appreciated.</p> <p><strong>Technology Ref:</strong></p> <ol> <li>IntelliJ IDEA 2018.2.4 (Community Edition)</li>...
2
2,117
How to (move) or Add an jpg 'Image' from one div to another div using jquery?
<p>Hi all i am working on jquery here i have my html like this</p> <pre><code> &lt;div class="grid row-fluid"&gt; &lt;div&gt; &lt;span class="span1"&gt; &lt;input type="checkbox" class="regular-checkbox" id="Header" /&gt; &lt;label for="Header"...
2
1,120
Extra column in bootstrap table
<p>Why there is an extra column in the table? <img src="https://i.stack.imgur.com/9tHsi.png" alt="table image"></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-html lang-html prettyprint-override"><code>&lt;link re...
2
1,500
Why are my tests slow after upgrading rails from 3.1.0 to 3.2.0?
<p>I followed these upgrade instructions: <a href="http://railscasts.com/episodes/318-upgrading-to-rails-3-2" rel="noreferrer">http://railscasts.com/episodes/318-upgrading-to-rails-3-2</a></p> <p>Here are my three small upgrade changes:</p> <p><strong>(1) Gemfile</strong></p> <pre><code>-gem 'rails', '3.1.0' +gem 'r...
2
2,016
Sync and Async problem. System.aggregateexception 'one or more errors occurred.' when I try to get a list of objects from an URL
<p>So, I am trying to get a json with a list of movies from tmdb and for that I've created the methods down here. The problem is that if a run it syncronously it gave me TimeOut.</p> <pre><code>public void getMovieInfo(string kWord) { using (WebClient web = new WebClient()) { ...
2
1,060
Interactive Form depending on Select List not working
<p>So I am trying to make this clip submission form interactive in the following way:</p> <p>I want the second Select list choices to change according to which city is selected in the first select list. </p> <p>Here is my script function code: </p> <pre><code>&lt;script&gt; function spotListChange(s1, s2) { var ...
2
1,133
Send list to jsp tag
<p>I wanna to send the list element (Which is located on my JSP) :</p> <pre><code>${mylist} </code></pre> <p>To my custom tag mytag.tag , this is what I have in my JSP page :</p> <pre><code>&lt;tags:mytag list="${mylist}" &gt;&lt;/tagsmytag&gt; </code></pre> <p>But When I send it like that , I cannot access its ele...
2
2,139
Mathematica how to efficiently find the minimum value using an ordering function
<p>I have the following list of pairs of data:</p> <pre><code>pairs = {{3, "John"}, {1, "Bob"}, {2, "Jane"}, {1, "Beth"}}; </code></pre> <p>I would like to find the pair of data with the minimum first value. In the example above the pair I am looking for is: <code>{1, "Bob"}</code> or <code>{1, "Beth"}</code>, but n...
2
1,992
Automapper EF Core throws "Value cannot be null. Parameter name: querySource" for navigation Properties
<p>I am getting <code>Value cannot be null. Parameter name: querySource</code> error from Automapper when mapping navigation properties.</p> <pre><code>.ForMember(p =&gt; p.Region, opt =&gt; opt.MapFrom(p =&gt; (p.RegAddressId.HasValue &amp;&amp; p.RegAddress.CountryId.HasValue)? p.RegAddress.Country.Region: p.N...
2
1,297
user pointer in python
<p>*I am trying to display preview from webcam captured using v4l.</p> <p>Here is an idea of how the code looks like:</p> <pre><code>from ctypes import * from v4l2 import * from Image import fromstring from Tkinter import Tk, Label from ImageTk import PhotoImage from ctypes.util import find_library libc = CDLL(find_...
2
1,324
Tabular Suggestion for sap.m.Input in SAPUI5
<p>I'm trying to create a autocomplete function for a text field. My situation is that I have a Dialog using xml fragment which contains a sap.m.Input text field:</p> <pre><code>&lt;core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" displayBlock="true" controllerName="SaleHelper.controller.SimpleForm"&gt; ...
2
1,960
Google Sign In error: Status Code: SIGN_IN_REQUIRED when signing in with Google on android
<p>Everytime I try to login with Google API, I get the following error. My manifest has the appropriate permissions and I did create my credentials accordingly. So I don't know what the problem is. The consent screen doesn't show either.</p> <pre><code>com.omer.notetoself D/NTS:﹕ ConnectionResult{statusCode=SIGN_IN_RE...
2
2,586
VB.NET Gecko Web Browser javascript function calling?
<p>I am using <code>GeckoWebBrowser</code> within my <code>VB.NET</code> (Windows Form App) program. The <code>GeckoWebBrowser</code> loads a local <code>html</code> file. This <code>html</code> has embed in-line a <code>svg</code> file (<a href="http://i.stack.imgur.com/z19NK.png" rel="nofollow">human body diagram wit...
2
1,067
Spring data Ldap Repository return empry List when findAll is used
<p>I trying to integrate ldap with spring using </p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.springframework.ldap&lt;/groupId&gt; &lt;artifactId&gt;spring-ldap-core&lt;/artifactId&gt; &lt;version&gt;2.3.2.RELEASE&lt;/version&gt; &lt;/dependency&gt; &lt;depen...
2
1,787
Spring (for Android) and Jackson2: PUT as application/x-www-form-urlencoded
<p>I am somewhat new to HTTP REST operations on Android, and a server I am working with uses PUT commands to process updates. I am having a difficult time using Spring (for Android) with Jackson2. The server doesn't seem to work with <code>application/json</code> put requests (though it will reply with them), and only ...
2
1,278
Cloud Speech API return code=UNAUTHENTICATED, cause =java.io.IOException: Error getting access token for service account:
<p>I use Google Cloud Speech API(StreamingRecognize via gRPC) for speech recognizing in my app. I got the problem with authenticate on Android devices API level &lt; 23. </p> <pre><code>V/NativeCrypto: SSL handshake aborted: ssl=0x5b0ed2d0: Failure in SSL library, usually a protocol error ...
2
2,834
Why do HTML elements with CSS sizes measured in pixels appear slightly larger on iOS?
<p>I am working on a website with a navigation bar using a simple unordered list. The CSS values for each of these HTML elements are measured in px. I have been using <strong>Inspect Element</strong> in Google Chrome to measure the upper padding of the <strong>ul</strong> tag that centres the list and the padding of th...
2
1,707
How to set up prefix_same_as_start in read_options in RocksDbSharp
<p>I'm using <a href="https://github.com/warrenfalk/rocksdb-sharp" rel="nofollow noreferrer">RocksDbSharp</a> library, which is implementation of <a href="https://github.com/facebook/rocksdb" rel="nofollow noreferrer">RocksDb</a> from facebook in C#. I would like to filter my records by part of a key, but unfortunately...
2
1,073
Write RGB values to a BITMAP image file
<p>I am currently working on imaging processing using arrays to store R,G,B values from a 24 bit BITMAP image of width 120 and height 100 pixels. Visual Studio 2010 is being used. </p> <p>I have currently extracted the individual R,G,B values into three separate2D arrays from the 24 bit bitmap (it is assumed correct ...
2
2,463
Is it possible to prevent postback when changing the GridView Paging Index?
<p>I am trying to create my own online quiz website using ASP C#.</p> <p>I tried to bind the question from database into <code>gridview</code> and set the page size of the <code>gridview</code> to 1. And then I tried to pull the answers option (4 option) into <code>radioButton</code>.</p> <p>But when I tried to move ...
2
4,348
Wordpress ajax contact form doesn't return data
<p>I'm making a WordPress theme where every post will have a contact form. The contact form will collect information about the visitor and send a mail to the site administrator. It will also send an email to the visitor with a link to a downloadable PDF (this code is not done yet).</p> <p>The problem I have is that th...
2
1,408
Spring security shows 'Your login attempt was not successful due to' for custom membership
<p>I am puzzled with spring security, when I open sign-in page, it shows following error message <em>even before submitting the form</em>. I have no clue how to solve the issue.</p> <pre><code>Your login attempt was not successful due to </code></pre> <p><strong>my-servlet.xml</strong></p> <pre><code>&lt;?xml versi...
2
4,265
Read and Write XML in C# using Linq
<p>I want to read and edit the xml file through code. How can I achieve this using XML and Linq? Please help, my xml coding skills are not good. </p> <p>I want to get the <strong>Entity</strong> with <strong>Name</strong> 'new_test' and read/edit the <strong>RibbonDiffXml</strong> content in that node. </p> <p>Examp...
2
1,069
Ebooks reader not capturing embedded font for epub file
<p>I have a problem in my epub reader, it displays all content correctly but it's not capturing the embedded font in the CSS file. </p> <p>When I run the same file on other readers the embedded font is displayed but when I run the html file on one of the browsers like Firefox it shows the same result as my app and it ...
2
1,711
How to populate sidebar information with infowindow data?
<p>I have a fully-functioning Google Maps V3 map that works fine the way it is. However, I dislike InfoWindows because they take up too much map space when displaying the info. My solution around that is to place information in a <b>sidebar</b> to the right of the map. The information inside the InfoWindow would be tra...
2
1,546
Calling a function inside same class not working, typescript
<p>I am new to typescript and I am having a problem with calling a function inside the same class: I have a function like this:</p> <pre><code>createPost(url: String, data: any) { $.ajax({ url: url + "/" + GLOBAL.REGISTER_URL, type: "POST", data: data.serialize(), success: function() { ...
2
2,005
java.lang.RuntimeException: Delegate runner 'androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner' for AndroidJUnit4 could not be loaded
<p>I'm using <code>androidx.test.runner.AndroidJUnitRunner</code> as my <code>testInstrumentationRunner</code> from <code>androidTestImplementation 'androidx.test:runner:1.2.0'</code>. Also, I annotated my test with <code>androidx.test.ext.junit.runners.AndroidJUnit4</code> using the syntax <code>@RunWith(AndroidJUnit...
2
1,178
iOS8 Touch ID & Passcode
<p>i using this code in iOS 8 for security and uses touch ID </p> <pre><code>- (IBAction)authenticateButtonTapped{ LAContext *myContext = [[LAContext alloc] init]; NSError *authError = nil; NSString *myLocalizedReasonString = @"Authenticate using your finger\r Scan Your Finger Now"; if ([myContext...
2
2,688
texstudio problems with language tools
<p>I have already asked in the forum of LanguageTools but the said it seems to be a problem of Texstudio which does not send the language parameter to the server. Do you have an idea what might be the problem. I am using Linux mint 17.2, Java 8 and TexStudio 2.6.6 Stacktrace from the server:</p> <pre><code>2016-05-13 ...
2
1,427
Python- Assertion error when performing nosetests
<p>I am new to web.py . I was following ex52 LPTHW , and I had to perform nosetests on all the tests in tests folder. But I am getting 1 failed test due to assertion error. I tried reading different assertion errors and why they occur , but I cant figure out this one. I tried expanding the errors which the server coul...
2
2,503
Can't prevent users going back to the admin page after logging out - Laravel 4
<p>I'm facing a weird issue while developing a very basic application using Laravel 4. I have created the functionality following the documentation of laravel 4's user authenticating docs where users can sign up to ask different questions and only the registered users can access to the secret/admin page. Everything wor...
2
2,114
How to transform tensors to numpy.ndarray in Keras?
<p>I have got a Tensorflow Tensor within Keras (&lt; class 'tensorflow.python.framework.ops.Tensor'>) which needs to be transformed into a numpy.ndarray. Is there an easy solution to this task? </p> <p>I did time-comsuming research via Google and trial/error. It seems that I have to use tensorflow sessions, but I do...
2
1,856
How to create indexPath from NSArray of Dictionaries
<p>Okay I am trying to create an indexPath value from a <code>NSArray</code> of <code>NSDictionary</code> values so that when I go through to my tableview I can place an accessory tick on the side.</p> <p>I have an <code>NSArray</code> of <code>NSDictionaries</code> that look like this</p> <pre><code>{ HAS = ...
2
1,065
Checkboxes in editor template are not bound to model in post action
<p>I am using an editor template to display a checkbox for each role a user can be assigned to. The model is:</p> <pre><code>public class UserModel { [Required] [Display(Name = "User name")] public string UserName { get; set; } [Required] [DataType(DataType.EmailAddress)] [Display(Name = "Emai...
2
1,961
FetchedResultsController doesn't see the changes in managedObjectContext after data import
<p>I'm working on the data import part in my app, and to make the UI more reliable, i followed this Marcus Zarra article <a href="http://www.cimgf.com/2011/08/22/importing-and-displaying-large-data-sets-in-core-data/" rel="nofollow">http://www.cimgf.com/2011/08/22/importing-and-displaying-large-data-sets-in-core-data/...
2
1,082
Debugging C# - stack overflow exception?
<p>Below is my code for a Battleship game. I keep getting the following error:</p> <blockquote> <p>Process terminated due to StackOverflowException. . </p> </blockquote> <p>It keeps pointing to </p> <pre><code>char[,] Grid = new char[10, 10]; </code></pre> <p>How can this be fixed?</p> <pre><code>using System; ...
2
1,718
Convert a "php script to send push notification" in android http post
<p>I want to convert <strong>a php script</strong>(to send push notification in android devices) in to <strong>a android http post</strong> code.</p> <p><strong>php script (working fine)</strong> :</p> <p><strong>printed response :</strong> </p> <p>{"multicast_id":7657471480142898452,"success":1,"failure":0,"canoni...
2
1,318
ReSwift - How to deal with state changes that depend on old state as well as new state in the View
<p>I am trying to work with ReSwift in my ios project and had a question regarding how to deal with changes in my view. I am finding that I need to know what the old state was before I can apply changes proposed by the new state coming in. I never needed to know what my old state was while working with redux in my reac...
2
1,587
jQuery UI datepicker and mobile "wrapper"
<p>I have tried to use mobile "wrapper" for jQuery UI datepicker based on <a href="http://demos.jquerymobile.com/1.4.1/datepicker/" rel="nofollow">that page</a></p> <p>Working code (part of Wordress template) looks like:</p> <p>Header:</p> <pre><code>&lt;link type="text/css" href="/css/custom-theme/jquery-ui-1.8.18....
2
1,025
Controller not redirecting to my jsp
<p>I've been reading other posts for hours related to this subject. I will explain how it goes:</p> <p>I Access recuperar.jsp, it is just 1 form to set the user's e-mail to recover password. It calls my LoginController.java - method (processaSenha).</p> <p>At processaSenha method, I just send an email to the user wit...
2
10,156
iOS: Methods of ViewController subclass not visible in other classes
<p>I'm currently trying to develop an iPhone application. Most things are working as I would expect and prefer.</p> <p>Right now the issue I'm having is that when adding methods to one of my ViewControllers the methods are not visible from other parts of my applications.</p> <p>When I add the same methods, with the s...
2
1,195
Trying a Java pong
<p>I'm trying to do a Java Pong game. I have very little experience with Java and need some help. I've read a lot of stuff online, and below is the code I've come up with. I've created the following classes, but all I get is a grey screen. I'm just trying to implement the simplest solution for this. Could anyone point ...
2
1,974
How to Customize MasterDetailPage Of a xamarin forms app on UWP?
<p>I am building an app using xamaring forms but I cannot Change the Header of the master page in UWP, It works fine on android but not uwp.</p> <p>Here is a screenshot: </p> <p><a href="https://i.stack.imgur.com/YnKPC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YnKPC.png" alt="enter image desc...
2
1,497
grequests with requests has collision
<p>I am using grequests python module to call some APIs. I want to make two functions. </p> <ol> <li>A single request(use requests module)</li> <li>A multiple request(use grequests module)</li> </ol> <p>When I use two modules in two different files, it runs normally, but when I import two modules in the same file, re...
2
2,800
Enable Textbox on SelectedIndex change
<p>I am grabbing some records from a database depending on the id number of the page, the amount of records that will display will vary, anywhere to 1 record to 50. I need to take these records then choose which ones I will be modifying, deleting, or won't change at all. I would like it to look like this:</p> <p>Can't...
2
1,444
How to mock Angular service properly? Karma Jasmine test: Expected spy service.getShipPhotos to have been called once. It was called 0 times
<p>I am working with Angular 12 and Karma-Jasmine 4 and am testing to verify that the function getSingleShip is being called by the function retrieveShip, but the test result shows it has not been called at all. I suspect the real service is being called instead of the mock. How do I mock the service properly?</p> <p>T...
2
1,113
Video Background of slide on Slick Carousel Issues
<p>There's a few issues with video backgrounds in the Slick.js carousel that I am running into.</p> <p><strong>HTML:</strong></p> <pre><code>&lt;div id="mySlick"&gt; &lt;div class="item"&gt; &lt;img class="carousel-item-background" src="images/01.jpg"&gt; &lt;/div&gt; &lt;div class="item...
2
1,047
Removing a element from an array list without using libraries. Java
<p>I have implemented a function which removes an element from an array list. I should not the ArrayList libraries! See my code below:</p> <pre><code>/** * removes a LendItem at a specified (index) position. * This functions returns the item removed from the list or null if no such item exists. This * function leav...
2
1,029
Nginx conf for prerender + reverse proxy to django + serving angular in html5 mode
<p>The mouthful of a title says it all: </p> <p>We've got an Angular frontend with a Django backend providing a REST API that is exposed independently at endpoints <code>example.com/api/v1/*</code></p> <p>The Angular app runs in HTML5 mode, and we want hard-links to <code>example.com/foo/bar</code> to bring users int...
2
1,161
Spring data MongoDb query based on last element of nested array field
<p>I have the following data (<strong>Cars</strong>):</p> <pre><code>[ { "make" : “Ferrari”, "model" : “F40", "services" : [ { "type" : "FULL", “date_time" : ISODate("2019-10-31T09:00:00.000Z"), }, { "type...
2
1,063
Android Google maps crash when offline
<p>I have a application that is about finished. When the phone is online everything works as it should.</p> <p>Since the application is soon to be released i tested it when the phone is offline. This makes it crash.</p> <p>After some debugging i found out that if i do not add any overlays it does not crash. ( i just ...
2
1,502
Running MVC 6 ASP.NET 5 localization example for dnx rc2
<p>I am trying to run the AspNet5Localization example project from here <a href="https://github.com/damienbod/AspNet5Localization/tree/rc2" rel="nofollow">https://github.com/damienbod/AspNet5Localization/tree/rc2</a></p> <p>However, when I open the solution a warning box appears:</p> <blockquote> <p>DNX SDC version...
2
1,138
Marking url as dead. Last error: HostUnreachableError
<p>I have updated my ElasticSearch cluster from 6.6 to 7.6.2, as part of this upgrade the _all field and the <em>default</em> fields were removed.</p> <p>I updated the cluster, checked the logs, and sure enough, one of my templates was complaining those fields existed. All my other templates were still correctly colle...
2
4,146
Keras: Data augmentation affecting training speed?
<p>I'm currently using Tensorflow with Keras (Python3) for Deep Learning, and I'm trying to implement an efficient data generator. As Keras also offers a <a href="https://github.com/fchollet/keras/blob/master/keras/preprocessing/image.py" rel="nofollow">data generator implementation</a>, I compared the training speed w...
2
1,780
PCF Kafka with Kerberos authentication - Running Locally but Failing in PCF
<p>I am facing issue when Connecting to Kafka through SpringBoot using Kerberos Authentication. I am using the custom Kafka connection manager with following details -</p> <pre><code> bootstrap-servers-sasl: node1:9094, node2:9094, node3:9094           protocol: SASL_SSL           mechanism: GSSAPI           k...
2
3,719
Change Font Family and Font Size using HtmlAgilitPack
<p>I need to change <strong>font family</strong> and <strong>font size</strong> of the given HTML to a specific font family and size. (Ex: Times New Romen, size: 12) Do you know how it could be done using HtmlAgilityPack?</p> <p>Font size can be defined in many ways in the given html. Ex: using <code>&lt;Font Size=""...
2
1,528
Android testing with Robolectric and AndroidAnnotations
<p>I've developing application using AndroidAnnotations and want to use Robolectric for unit testing.</p> <p>I can't get it working though. Application and tests are placed in single project. Source is placed under <code>/src/main/java</code> and test under <code>/src/test/java</code>. Both folders are source folders....
2
10,187
render multiple d3 charts without overwriting each other
<p>I have a collection of data (represented by a Backbone.js collection) containing two sets of data (for this example - in real world app, there will be more). i want to represent each set of data in a small d3.js bar chart. When I render the first bar chart, everything looks great, but when I render the second bar ch...
2
2,108
Texture Array access not working Opengl 3.3, GLSL 330
<p>I am trying to use a 2D texture array as a texture atlas. I have the following code to render a single square. The square renders if I replace the texture lookup in the fragment shader with a simple colour output, and it renders one of the textures properly if I use and set up a simple 2D texture instead of a 2d Tex...
2
1,982
Language Bar change language in c# .NET
<p><strong>TL;DR</strong>: Trying to solve the issue that <code>InputLanguage</code> changes the input layout but does not update the Language Bar display.</p> <hr> <p>I am writing a custom plugin for Trados Studio. Part of this is interfacing with languages both in the app itself and in Word, as in this question: <a...
2
1,541
iOS Google Maps, different custom images for Clusters and individual markers
<p>I am using Google Maps SDK in my iOS app. I am populating the map using the clustering methods.</p> <p>I have set custom images for the different clustering buckets ex. 10,20...</p> <p>The individual markers however have the default (google maps red marker icon).</p> <p>I would like a custom icon for clustering a...
2
2,236
How to efficiently merge two overlapping contours into one big contour?
<p>I have a huge image ( about 63000 x 63000 pixels = 3969 Megapixels ) what i have done so far is i decided to make "tiles" of (1024 x 1024) and do my calculations based on these tiles, resulting in an 62 x 62 image tile grid! (this works out very well and has the advantage of making the image viewable with zoom-in a...
2
2,033
How To Configure Django Authy For Two Factor Authentication
<p>I have been researching Django 2 factor for the last couple days. I've finally come to a point where I've gotten the Django Twilio phone verification to work. Here is the code the working code...</p> <pre><code>from authy.api import AuthyApiClient from django.conf import settings from django.shortcuts import rend...
2
1,079
oracle.jbo.NoObjException: JBO-25003: Object <ObjectName> of type DataControl is not found
<p>I get the following exception when I am trying to run Oracle ADF on Tomcat 8.5.24 and JRE 1.8.0_201.</p> <pre><code>oracle.jbo.NoObjException: JBO-25003: Object &lt;ObjectName&gt; of type DataControl is not found. at oracle.adf.model.binding.DCIteratorBinding.getCheckedDataControl(DCIteratorBinding.java:2880) ...
2
1,103
Speedup sum of intensities calculation by using JOCL/OPENCL
<p>Hi I'm new to JOCL (opencl). I wrote this code to take the <strong>sum of the intensities per image</strong>. The kernel takes a 1D array of all the pixels of all the images put behind eachother. An image is 300x300 , so that's 90000 pixels per image. At the moment it goes slower than when I do this sequentially.</p...
2
2,402
Cannot import antlr4 lexer grammar in combined grammar using Eclipse Kepler
<p>Given:</p> <p><strong>Simple.g4</strong></p> <pre><code>grammar Simple; import SimpleLexer; prog : entry+ EOF; entry : a semi tail; semi : ':'; tail : TAIL; a : 'a'; W:; </code></pre> <p><strong>SimpleLexer.g4</strong></p> <pre><code>lexer grammar SimpleLexer; TAIL : [a-z]+; </code></pre> <p>They are both in...
2
2,527
Getting socket connection timeout with localhost android
<p>I have created one api in local host using php. This as I test in postman its working well but when I am calling in the url from android its giving an exception of socket connection time out.</p> <p>Its ampps server, not able to connect.</p> <p>This is my php script:</p> <pre><code> &lt;?php //echo error erro...
2
2,713
how to disable a select button after onclick on a value of another select button
<p>I am new to jQuery and CSS.</p> <p>I am doing a simple application.My requirement is ,I have two select button ,when I will click on first select button value then corresponding value will come in the second select button.</p> <p>I have 5 values in the first select button and I have corresponding value only for f...
2
3,217
JSON Parse Error using Adobe Flex - PHP - SQL
<p>I am trying to return results from my SQL database, using PHP to convert it into JSON, which is then read by Flex.</p> <p>Here is the parse error I receive -</p> <blockquote> <p>JSONParseError: Unexpected &lt; encountered at com.adobe.serialization.json::JSONTokenizer/parseError()[/Users/mesh/src/as3corelib/s...
2
1,516
Diving score array program
<p>I have a dive scoring program. However, I am having difficulty getting the lowest score and handling the input after an error has been made. Could someone advise? Thank you for any help you could give. Yours truly, Quang Pham</p> <pre><code> Is there code to get the lowest and highest scores? How come...
2
2,938
Define a Style for a Button when Hover in a universal App
<p>I have tried to define this style when I hover on each button in the designer,like this:</p> <p><a href="https://i.stack.imgur.com/gxjU5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gxjU5.png" alt="enter image description here"></a></p> <p>but I get this result when I hover on each Button wit...
2
2,234
Add LIMIT query in php
<p>How can I add LIMIT query in it? I have adding it in </p> <pre><code>$SQL = "SELECT * FROM eins_policy LIMIT 500 "; </code></pre> <p>but it did not display the list.</p> <p><a href="https://i.stack.imgur.com/OH3jL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OH3jL.png" alt="enter image descr...
2
2,614
Android Studio 4.0.1 Cannot access androidx.appcompat.app.AppCompatActivity
<p>Didn't happen before until I deep cleaned a few days ago (some combination of the following)</p> <ul> <li><code>rm -rf ~/.gradle</code></li> <li><code>rm -rf {projectRoot}/.gradle</code></li> <li><code>git clean -fdx</code> )</li> </ul> <p>Suspect: <code>appcompat</code> version conflicts</p> <p>build.gradle:<br /> ...
2
6,778
What is up with capturing Xamarin CollectionView Selections only sending null objects?
<p>I have been using every example on the internet to make my CollectionView send the object to my ViewModel, with no luck! This is being tested as an Android project, by the way.</p> <p>One weird thing to note: instead of the selected cells turning orange (like the MS sample solutions), my CollectionView items just f...
2
1,176
THREE.js custom tangent attribute how do i load it
<p>I'm looking at this example:</p> <p><a href="http://threejs.org/examples/webgl_custom_attributes.html" rel="nofollow">http://threejs.org/examples/webgl_custom_attributes.html</a></p> <p>and notice that the custom displacement attribute gets filled by vertices.length</p> <pre><code>for ( var v = 0; v &lt; vertices...
2
1,122
I do not have access to the "employeeID" attribute of the "Active Directory" users through "C#"
<p>I do not have access to the "employeeID" attribute of the "Active Directory" users through "C#"</p> <p>I do not have access to the "employeeID" attribute of the "Active Directory" users through "C#", I verified that the users have a value in the attribute "employeeID" from the same "Active Directory", but the code ...
2
1,320
SpinLock in C#. In which type of algorithm SpinLock is a better choice against Monitor?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/14611320/why-everyone-states-that-spinlock-is-faster">Why everyone states that SpinLock is faster?</a> </p> </blockquote> <p>This question is concerning SpinLock, Monitor &amp; Interlocked.</p> <p>I made 2 tes...
2
8,635
android studio onClick not found
<p>In Android Studio, I'm getting an error that the onClick listener(which was generated on the XML page by Android Studio) cannot be found. I haven't had any problems previously until today, so I can't figure out what is wrong. I have already tried removing the android:theme tags, but that did not help.</p> <p>Here i...
2
3,681
is it possible to preload html before displaying on webview
<p>I have searched whole internet and couldn't find the solution so decided to ask expert that is it even possible.</p> <p>I have a Blog for which I am developing iOS app but it takes too much time loading the content. </p> <p>So is it possible to pre load html (not images) of all articles before user opens the artic...
2
1,122
Using filters to count values in Kibana / Visualize?
<p>(I am quite new to ELK stack and may ask something obvious...)</p> <p>I have documents describing customers informations, with data such as name, address, age, etc... Sometimes, not all these fields exist and I would like to know the number of documents having them filled.</p> <p>If the data looks like:</p> <pre>...
2
1,187
Why doesn't adjusting scilimits in matplotlib work properly?
<p>I am trying to make a plot with the same <code>scilimits</code> using the following code:</p> <pre><code>from matplotlib import rc rc('text', usetex=True) plt.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"] plt.figure(figsize=(8, 8)) aaaa = [64673.753739998487, 47600.685099333175, 103536.00001368104, 7244...
2
1,901
Identifying the second lowest and second highest value in Java
<p>This is not only working when you input two or more same value, it will make the output all zero instead of giving the same result as first highest and second highest. Also we can't use array and arraysort or any sorting function.</p> <p>For example if I input 4 4 2 2 1, it will make all the result 0 instead of giv...
2
4,482
IOException in Java (Android): Transport endpoint is not connected
<p>In my Android application, which was copied from answer to <a href="https://stackoverflow.com/questions/13450406/how-to-receive-serial-data-using-android-bluetooth">this question</a> (and then slightly changed due to UUID-related problems with Samsung Galaxy tabs) I successfully connect to OBD device via bluetooth.<...
2
4,650
Why EhCache not caching this query?
<p>Looking at Hibernate metrics, it appears that there is no use of second level cache for specific query:</p> <pre><code>org.hibernate.HibernateException: More than one row with the given identifier was found: 1242, for class: com.hibernate.query.performance.persistence.model.Store INFO: Session Metrics { 2857282...
2
5,301
Data-augmentation generators not working with TensorFlow 2.0
<p>I am trying to train model with image data-augmentation generators on TensorFlow 2.0, after downloading Kaggle's cats_vs_dogs dataset using below code.</p> <pre class="lang-py prettyprint-override"><code>train_datagen = ImageDataGenerator(rescale=1. / 255, rotation_range=40, ...
2
1,277