title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Cannot use helm upgrade in a gitlab-runner due forbidden secret access rules
<p>I want to use execute helm on a gitlab-runner on my kubernetes in gitlab pipelines.</p> <p>My gitlab.ci.yaml:</p> <pre><code># Deployment step deploy: stage: deploy image: alpine/helm:latest script: - helm --namespace gitlab upgrade initial ./iot/ tags: - k8s - dev </code></pre> <p>What i have...
1
1,036
How to read a binary file of double numbers using Java?
<p>I have a small application that is designed to get double numbers and store them into a binary file. Then read them all again one by one and store them into an array, but I can not figure out how to read the file properly?</p> <p>Here is the code:</p> <pre><code> import java.awt.*; import java.awt.event...
1
1,842
React+Reflux: Passing Variables to Data Stores
<p>I'm building a React+Reflux application that, among other things, allows for the creation/deletion/editing of categories. So far I'm able to display all categories and handle creation/deletion of categories within a React component through associated stores and actions. This all works great, updates the database a...
1
2,051
How to copy a 2D array from Device to Host in Cuda?
<p>I want to copy the results of a fft operation from device to host. </p> <p>This is what happens. The input is a pointer to a pointer to an float. the values get allocated during runtime. then it is transferred to the gpu and fft is calculated. Then the results are transferred to to float2 2D array. But the result ...
1
1,650
Customising ToggleButton state images using XAML
<p>I am currently using the XAML below to change the image on a toggle button for each state. How can I define a template or style that will allow me to define the images that are to be used in the button definition such that I don't have to repeat everything below for each button. Is this even possible ?</p> <p>Idea...
1
2,091
HTML removeChild() throws an unknown exception
<p>I seem to have a constant error with the function <code>removelink(id)</code>, below, which is called AFTER an item is added to a list, with an <code>onclick=""</code> behavior. Every time the function is called, an exception is thrown:</p> <blockquote> <p>"NotFoundError: Failed to execute removeChild' on 'Node':...
1
1,324
CardLayout with buttons that change the cards
<p>I am trying to write a short program that has a home page with title and 4 buttons, 3 of which will leave the home screen and go to a new page where you can input information accordingly. I started by using a drag and drop editor but have found through forums i should be using cardlayout instead i have looked over ...
1
1,204
Optimal way of reading a complete file to a string using fstream?
<p>Many other posts, like " <a href="https://stackoverflow.com/questions/2602013/read-whole-ascii-file-into-c-stdstring">Read whole ASCII file into C++ std::string</a> " explain what some of the options are but do not describe pro and cons of various methods in any depth. I want to know why one method is preferable ove...
1
1,281
FrameLayout onClick event doesn't work
<p>Have this layout in my app</p> <pre><code>&lt;FrameLayout android:gravity="center" android:layout_width="35dp" android:layout_height="35dp" android:clickable="true" android:layout_alignParentLeft=...
1
1,653
Force max-width 100% on div and contents
<p>I'm trying to display information for a plant right next to it and I want to force the information to stay right of the image of the plant as long as the screen has a specific min width.</p> <p>Problem is: if the information contains a line that's longer than the normal width of 100% of leftover width-space in the ...
1
1,160
The rule of thumb as to when we should use a global variable in a function
<p></p>When I code games with functions, I often get confused as to which variable to global. <p>I've heard that globalizing variables isn't a very practice, so I try to minimize the amount by not globalizing any, and only globalize the ones that the error message tells me to. But doing that is quite annoying, and it w...
1
1,110
XML Parsing with ElementTree and Requests
<p>I am trying to work with the Yahoo Weather API, but I am having a few issues parsing the <code>XML</code> that the API responds with. I am using <code>Python 3.4</code>. Here's the code I am working with:</p> <pre><code>weather_url = 'http://weather.yahooapis.com/forecastrss?w=%s&amp;u=%s' url = weather_url % (zip_...
1
1,228
Postman - Firebase notification ios
<p>I tried to send POST to firebase with Postman but i have an error : </p> <pre><code>&lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;Unauthorized&lt;/TITLE&gt; &lt;/HEAD&gt; &lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000"&gt; &lt;H1&gt;Unauthorized&lt;/H1&gt; &lt;H2&gt;Error 401&lt;/H2&gt; &...
1
1,128
Gradle Fails to Compile Basic Scala Project
<p>I cannot seem to get gradle to properly compile a simple Scala project. The directory looks like:</p> <pre><code>. ├── build.gradle └── src └── Main.scala </code></pre> <p>The <code>build.gradle</code> is simply:</p> <pre><code>apply plugin: 'scala' sourceSets { main { scala { srcDir ...
1
3,722
POST variables to web server?
<p>I've been trying several things from Google to POST data to a web server, but none of them work: I'm still stuck at how to convert the variables into the request, considering that the second variable is an SQL query so it has spaces.</p> <p>Does someone know the correct way to use a <code>WebClient</code> to POST da...
1
1,493
I want to execute a function upon the start of my node.js express server and execute an auth module, is this the correct way?
<p>I am currently building my server to execute an authentication function on startup using server/app listener. I am trying to use an external function in my controller file to do this, my server code below:</p> <pre><code>//Start listener on the port app.listen(port, () =&gt; { console.log(`Server is listening t...
1
4,461
Realtime yolov5 detection with Desktop screen as input
<p>I have a script that grabs an application's screenshot and displays it. it works quite nicely on my machine like a video with around 60FPS.</p> <pre><code>import os os.getcwd() from PIL import ImageGrab import numpy as np import cv2 import pyautogui import win32gui import time from mss import mss from PIL import Ima...
1
5,114
How to use Regular Expression in Swift to replace matching expressions with the template string instead of plain text
<p>I have a project with a main textView and two textFields. In the main textView field there is the text to process, in the first textField you enter a regular expression and in the second textField you enter the substitution template string. </p> <p>If in the second textField I enter text, all work fine, but if I e...
1
1,040
Order by using selected values from drop down list without using form
<p>Searched many options to find some easy solution where i can sort my results but din't find any. I want to order the displayed results by selected drop down values. I don't want to use "form". Want the other way to sort it.</p> <pre><code>&lt;div class="col-lg-2"&gt; &lt;label class="margin-bottom:25px;" style="mar...
1
1,169
how to solve org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
<p>I'm using elasticsearch </p> <pre><code>{ "name" : "Angela Cairn", "cluster_name" : "prod-elastic", "cluster_uuid" : "iKkcI5FwTsGMtXacl3Qg-g", "version" : { "number" : "2.4.4", "build_hash" : "fcbb46dfd45562a9cf00c604b30849a6dec6b017", "build_timestamp" : "2017-01-03T11:33:16Z", "build_snaps...
1
1,837
How to bundle typescript with webpack?
<p>I'm new to webpack. i want to bundle my project which is written in typescript but the destination file has the same codes of typescript which are not readable by browser so what is the messing step in my configuration bellow? The project works fine using script tags in html but i need to make them as bundle and mak...
1
2,764
JavaFX DragAndDrop with custom DataFormat
<h2>The Overview</h2> <p>I am setting up drag &amp; drop in a Java FX application. When I try to grab custom data from the <code>Dragboard</code> I am getting a <code>java.nio.HeapByteBuffer</code> instead of an <code>Object</code> as the JavaDoc stuggest. This byte buffer cannot be <em>cast</em> to my original data t...
1
1,165
JavaFX Label not updating with setText()
<p>I have done a lot of searching and cannot seem to find a solution to my problem, I am trying to get the label <em>selectedName</em> to update when the user enters his/her name inside Intro.fxml and appear on Main.fxml. However it still appears as default_user which is set in the initialize method. Admittedly the cod...
1
7,681
Cannot access remote EJB interface using JNDI
<p>How to remote access a method, or what am I doing wrong? Can you please tell me?:</p> <pre><code>public class OfferManagerBeanTest { private static Context ctx; @BeforeClass public static void initContainer() throws Exception { Properties props = new Properties(); props.setProperty(...
1
2,693
Print table footer at very bottom of last page only at footer section
<p>I am trying to make footer stick to the bottom of the very last page only at the footer section of the print preview </p> <p>The page content is dynamic so i dont know which is my last page.</p> <p>I have tried the below code and it makes the footer appears at the last page of the preview but not in footer sectio...
1
1,920
ENTITY object in the JSF SelectOneMenu is not working
<p>I want to get the instance of the Entity from SelectOneMenu so i can assign the entity variables to some other method. But it is pointing to null.</p> <h1>xhtml code</h1> <pre><code>&lt;h:selectOneMenu value="#{statusReport.projectDetID}" converter="ObjectStringConv" onchange="#{statusReport.retrieveReport()}" &gt...
1
1,986
RxDataSources cell reload animations not working properly
<p>I am having some issues with the <code>RxDataSources</code> cell reload animations for <code>RxSwift</code>. I have a simple table setup like so:</p> <pre><code>import UIKit import RxDataSources import RxCocoa import RxSwift import Fakery class ViewController1: UIViewController { @IBOutlet weak var tableView...
1
1,329
Unable to POST video file input using JS FormData object
<p>I actually did a lot of research and tried different ways to upload a video file using JQuery's <code>$.ajax()</code> and <code>FormData</code>. I am using an updated version of Chrome and Firefox and aware that uploading of file using <code>$.ajax()</code> is possible for <strong>jQuery 1.6</strong> and up. Right n...
1
2,019
Android Tab Layout tutorial?
<p>I want to be able to assign different images to my tabs in the TabLayout control depending on whether the item is selected or not. I followed the tutorial on the Android site but they made the example with just one image and for it it works. But it doesn't work for the rest of the tabs. How can I make it work? This ...
1
1,681
how to validate decimal numbers in PHP
<p>how to validate decimal numbers in PHP. I looked at is_numeric() but that won't work for me:</p> <blockquote> <p>bool is_numeric ( mixed var )</p> <p>Finds whether the given variable is numeric. Numeric strings consist of optional sign, any number of digits, optional decimal part <strong>and optional ...
1
2,511
How to create a Task with TaskFactory.FromAsync and custom Async procedures
<p>I am trying to test some classes that rely on a Task to do some background computation (retrieve data from a network location). The class gets a non-started instance of a Task, adds a ContinueWith method and then calls Start on the Task. Something like this:</p> <pre><code>private void Search() { Task&lt;Sear...
1
1,881
How to unescape json?
<p>I have an escaped json string, like</p> <pre><code>{\"uid\":\"93\",\"channel_origin\":\"\",\"sys_ver\":\"12.2\",\"carrier_network_code\":\"02\",\"rpn\":\"\\u9996\\u9875\",\"app_ver\":\"9.3.8\",\"event_time\":1556119062,\"carrier\":\"\\u4e2d\\u56fd\\u79fb\\u52a8\",\"event_guid\":\"E36FE60BFBFF405680906E3F95EC3953\",...
1
4,208
ElasticSearch: how to read output of _node/hot_threads
<p>I have a data node in ElasticSearch that is running high on CPU (99%) and searches are slow. Using <code>top</code> reveals it's elasticsearch's process that is using all of the CPU.</p> <p>I ran the <code>_nodes/hot_threads</code> API in that node and I got this output, but I don't know how to interpret it. Could ...
1
1,107
java.util.concurrent.RejectedExecutionException: pool=128/128, queue=10/10
<p>I am taking the below in the logcat:</p> <pre><code>Uncaught handler: thread main exiting due to uncaught exception 05-22 20:16:08.005: W/System.err(13637): java.io.FileNotFoundException: /data/logcat_0.txt (Permission denied) 05-22 20:16:08.005: E/AndroidRuntime(13637): FATAL EXCEPTION: main 05-22 20:16:08.005: E/...
1
2,772
unable to start logstash
<p>this is my first time running logstash on container. Im running logstash on the same container elasticsearch + kibana. Its running on ubuntu. i run my conf file by using</p> <blockquote> <p>/usr/share/logstash/bin/logstash -f conf.d/logstash.conf</p> </blockquote> <p>here is my logstash.conf :</p> <pre><code>in...
1
2,655
How to retrieve data from the server using fetch get method and show it in a table
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Link } from 'react-router' class Beacons exte...
1
2,005
Resize JavaFX table
<p>I have this simple example of a table.</p> <pre><code> import javafx.application.Application; import javafx.beans.property.SimpleStringProperty; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; i...
1
3,629
org.openqa.selenium.WebDriverException: chrome not reachable
<p>Trying to do some training Java Selenium testing, and I'm having trouble running the web driver... My code is very simple and yet, it won't work. I'm working on macOS Sierra Version 10.12.3 .</p> <p>My code is :</p> <pre><code>import org.junit.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium....
1
5,834
sonar findbugs heap size
<p>i am new to sonar. i am running sonar from Jenkins with sonar pulgin.</p> <p>When i am running from jenkins i am getting out of memory exception at findbugs</p> <p>below is the error:</p> <pre><code> Out of memory Total memory: 1037M free memory: 30M Analyzed: D:\Victor\autocreated\webapp\WEB-INF\classes ...
1
1,086
Implementing HuggingFace BERT using tensorflow fro sentence classification
<p>I am trying to train a model for real disaster tweets prediction(Kaggle Competition) using the Hugging face bert model for classification of the tweets.</p> <p>I have followed many tutorials and have used many models of bert but none could run in COlab and thros the error</p> <p>My Code is: </p> <pre><code>!pip i...
1
2,689
Vector drawable shown as full circle
<p>I have a following vector drawable:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="25dp" android:height="25dp" android:viewportWidth="25" android:viewportHeight="25"&gt; &lt;path android:fi...
1
1,532
Problem with IHttpAsyncHandler and ASP.NET "Requests Executing" counter
<p><h1>Solved:</h1><b>I found the solution to this. </b><s>Not sure why it happens but</s><b> Switching the application pool type to 'classic' from 'integrated' solves the problem. Now the 'Requests Executing' keeps going up, the actual application pool process thread remains low (~31 threads) and the app is <em>very</...
1
1,935
Spring HATEOAS links return in HAL format for single objects, and the spec format for an array of objects
<p>I am using Spring HATEOAS 0.20 (also tried 0.23) and there seems to be very strange behavior when returning a single object vs. an array of objects. When returning a single object, the resulting JSON returns HATEOAS links that are formatted via the HAL spec ("_links", which I do not want):</p> <pre><code>{ "_Id"...
1
1,935
Share specific PMD rulesets across multi module maven project
<p>I'm trying to share the same pmd configuration across all my submodules. I'm looking for the best way to achieve that</p> <p>I thought that I could place it in the parent project, like I did it for checkstyle plugin </p> <h2>Parent pom.xml</h2> <pre class="lang-xml prettyprint-override"><code>&lt;build&gt; ...
1
1,313
Custom Posts with same slug Redirecting to wrong post with same slug
<p>I have 2 Custom Post type posts.The video Post and City-guide Post The first Post(Video Post) contains the url: <a href="http://104.130.239.132/rick-owens/" rel="noreferrer">104.130.239.132/rick-owens/</a> and the second Post(City-Guide Post) conatins url:<a href="http://104.130.239.132/city-guide/rick-owens/" rel=...
1
1,820
Cannot read property 'getElementsByTagName' of null
<p>Please pardon my confusion as I stumble through this, I am new to javascript and this kind of thing. Please also pardon me if my code is garbage, because it is a combination of examples I found, and things I figured out (and didn't figure out)!</p> <p>I am trying to run this html file in Open Broadcaster Software:<...
1
2,859
JAVA SAX Parsing Error
<p>so I been asking a couple questions here today and with the help of the amazing SO community I've been able to understand the basics of SAX, as well as learn how to properly traverse a directory structure.</p> <p>Now, with my program, I can access the XML file I am looking for, but I am not sure what this error I a...
1
5,999
Rails 3.1 Select All checkbox
<p>this is my view:</p> <pre><code> @bulk_objects.each do |bulk_warehouse| bulk_error = @wh_errors[:"bulk_warehouse#{@count}"] if @wh_errors -%&gt; &lt;tr class="&lt;%= cycle("odd", "even") %&gt;"&gt; &lt;%= hidden_field_tag("bulk_warehouse_id#{@count}",bulk_warehouse.id) %&gt; ...
1
1,028
Unable to correct sudden "server certificate verification failed"
<p>I have the following problem:</p> <ul> <li><p>I have two machines here, a PC (Windows) and a Raspberry Pi (Raspbian).</p> </li> <li><p>I have a git repo on gitlab.com, using an https URL.</p> </li> <li><p>On the PC, I have been using and continue to use git (command line, git shell) with zero issues.</p> </li> <li><...
1
1,096
CUDA - Simple complex number multiplication
<p>I am trying to learn CUDA by writing basic code, which should hopefully put me in a better position to convert my existing C++ code to CUDA (for research).</p> <p>I need to do a fair bit of complex number manipulations, so I have written this very basic code to multiply an array of complex numbers with a real numbe...
1
1,479
Branca Python module is unable to find 2 essential json files when running an executable that uses folium
<p>There is a chance this is still a problem and the Pyinstaller and/or Folium people have no interest in fixing it, but I'll post it again here in case someone out there has discovered a workaround.</p> <p>I have a program that creates maps, geocodes etc and recently added the folium package to create some interactiv...
1
1,510
How to create a custom form action to a controller in admin html from Magento?
<p>I have created a form in admin html, but its action not working properly, the action not coming to the controller. My config.xml file shown below</p> <pre><code>&lt;adminhtml&gt; &lt;menu&gt; &lt;customercare module="customercare"&gt; &lt;title&gt;Calls&lt;/title&gt; ...
1
3,141
Problem when trying to implement Google Two Factor in a Laravel App
<p>I am trying to create an app where the user has the option to connect with google2fa. It enables the option on it's profile and then google2fa becomes active. However, after implementing this tutorial <a href="https://www.5balloons.info/two-factor-authentication-google2fa-laravel-5/" rel="nofollow noreferrer">https:...
1
2,965
CURLOPT_WRITEFUNCTION to get xml content
<p>I have used </p> <pre><code>curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); </code></pre> <p>and</p> <pre><code>size_t write_data(void *ptr, size_t size, size_t count, void *stream) { printf("%*.*s", size * count, size * count, ptr); } </code></pre> <p>to get the below output but i need to get onl...
1
1,235
ZF3 zend-mvc generic route for many controllers in one module not working
<p>I'm in ZF3, using the zend-mvc-skeleton and trying to configure a generic route that will match as many URLs as possible as I want to be able to create new controllers (including action methods of course), and have them immediately available.</p> <p>The common approach described in the documentation is to write a r...
1
1,273
Using Microsoft.AspNetCore.Mvc.Versioning, Swashbuckle.AspNetCore, and MaptoApiVersion
<p>I am having trouble with the following use of <code>MapToApiVersion</code>. From <a href="http://localhost:5000/swagger" rel="nofollow noreferrer">http://localhost:5000/swagger</a>, the 1.0 Docs and 2.0 Docs render the swagger ui properly and the corresponding swagger.json file is available. The 3.0 Docs fail to ren...
1
2,512
Return variable from onResponse Retrofit
<p>I do a API call to a webserver and I get the ID back in the method onResponse.</p> <p>Now I want to save this ID and return this id in the return of the method doLogin. How can I get that variable ID in the return statement?</p> <p>This is my code:</p> <pre><code>public class LoginController { public static ...
1
1,259
How to take data from local storage and to show in table in angular?
<p>I have made a login form which take username and password and store it into local storage and when clicked on login it shows welcome {username} on different page.But it only stores one username in localstorage. when we enter another username the previous get overwrite. i want to display all the usernames. </p> <pre...
1
1,155
How to use Dictionary as @Binding var in SwiftUI
<p>I will need to display a collapsed menu in SwiftUI, it is possible to pass one single bool value as binding var to subviews but got stuck when trying to pass that value from a dictionary.</p> <p>see code below:</p> <pre><code>struct MenuView: View { @EnvironmentObject var data: APIData @State var menuColla...
1
1,047
Convert keep dense_rank from Oracle query into postgres
<p>I'm trying to convert the following Oracle query into Postgres</p> <pre><code>select this_.GLOBAL_TRANSACTION_ID as y0_, this_.BUSINESS_IDENTIFIER as y1_, this_.ENVIRONMENT as y2_, count(*) as y3_, this_.HOST_NAME as y4_, listagg(process, ', ') within grou...
1
2,547
SAPUI5 Semantic Page, button in footer content
<p>I am developing of SAPUI5 application by using semantic page. I plan to add a button in footer content of page. But it display me the following error</p> <blockquote> <p>For scenarios involving fragments and nested views, your project must contain an index.html like or a localIndex.html file containing the da...
1
3,080
HDFS fsck command shows health as corrupt for '/'
<p>I have open source hadoop version 2.7.3 cluster (2 Masters + 3 Slaves) installed on AWS EC2 instances. I am using the cluster to integrate it with Kafka Connect. </p> <p>The setup of cluster was done last month and setup of kafka connect was completed last fortnight. Since then, we were able to operate the kafka to...
1
2,448
React Webpack - Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_4_
<p>My particular error is when submitting the form so running <code>login</code> I then see the below error, I have also included the actions/reducers and everything is included. I believe its something to do with upgrading to <code>react-router-dom</code>, but honestly I'm pretty baffed by this :/</p> <p><code>store_...
1
1,779
How to ADD an ArrayList of bean objects using Spring Forms in Spring mvc
<p>I'm currently developing a simple web application using spring mvc and i'm using spring forms in my jsp pages.</p> <p>I have a grid with multiple rows, and each row is to be selected to perform basic CRUD operations (multiple rows can be selected for create scenario). how to persist each row (List of beans: each ro...
1
1,322
How to create a variable number of textviews in android
<p>Hopefully this isn't a bad question, however I've searched through S.O. and haven't been able to find the answer. </p> <p>I am creating an android application that is essentially an alarm clock. I want the main activity to display all alarms that have been created along with some information about the alarms. My qu...
1
1,454
Maven modules are trying to use parent dependencies
<p>I have a maven project where the parent module has a lib directory containing various jars that are necessary for compilation, but aren't included in the final product. When I try to get the children modules to build it fails. It says "The following artifacts could not be resolved" then eventually says "Could not fi...
1
1,106
ASP.NET loses data from form after postback - repeater inside updatepanel inside repeater
<p>I have a ASP.NET web form where I have few checkboxes etc to make SearchCriteria object. When I click submit button I ask repeater1 to shew some records according to SearchCriteria. Inside repeater1 I have user control with updatepanel and another one repeater (ChildRepeater). </p> <p>My problem: when I click send ...
1
5,504
Python CSV to JSON: Why is JSON significantly larger than the CSV file and how can it be fixed?
<p>I've run into an interesting problem when converting a CSV file to JSON. I generate a CSV file based on output from an SQLite query and write this to the hard drive.</p> <p>I then load the CSV file into my script using Pandas:</p> <pre><code>import pandas as pd df_var = pd.read_csv('input.csv',header=0, low_mem...
1
1,271
server client chat program. Displaying online users
<p>I'm trying to display the online users in a server to a client. I've declared a client_struct which stores the necessary information when a client connects. I'm also forking a child process everytime a user is authenticated and wishes to communicate to the server. However when a second user connects to the server, t...
1
4,610
"Missing close double quote (")" error with BigQuery but I'm not uploading any quote
<p>I'm uploading some facebook post data into BigQuery. So I have the basics information : post name, post message, reach, likes, etc...</p> <p>I've clean all the post name and post message by deleting all the <code>"</code> however I still have the following error :</p> <blockquote> <p>file-00000000: Error detecte...
1
1,474
How to show content based on url parameter via JavaScript?
<p><strong>[Update] code I have edited</strong></p> <p>First, the plain HTML :</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;a href="javascript_accord.php/option/coke/"&gt;coke&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="javascript_accord.php/option/bubble-tea/"&gt;buble-tea&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="jav...
1
1,920
show div when error is occur
<p>i have validated a form.i want to show error message in a div.it has red background.i want to show it only occur a error.but my code always shows the red background div.but error message shows when error occurs.i want to show red background div and message when only occur a error.</p> <p>html code</p> <pre><code> ...
1
1,155
DER input, Integer tag error in Javapns iOS push notifications sender
<p>We use JavAPNS for sending push notifications to iOS devices. Push notifications to iOS devices are sent and recieved, when I am in Windows or OS X,but when I am in Linux environment this error occurs:</p> <pre><code>javapns.communication.exceptions.KeystoreException: Keystore exception: DER input, Integer tag erro...
1
1,117
No module named 'Adafruit_DHT' on a Raspberry Pi Zero W running Raspbian using Python 3 with Berryconda3
<p>I am using a Raspberry Pi Zero W where I connected a DHT11 Sensor from Adafruit. While setting up my Raspberry Pi I tried to install miniconda3 to manage my python packages. Somehow I could not install miniconda3 (I guess miniconda3 is not supported on the Raspberry Pi Zero W). However, I managed to install berrycon...
1
1,351
How to find the thumb of a slider to set its width
<p>I am creating a &quot;range slider&quot; from three slider controls stacked on top of each other. The basic idea is from here which uses two sliders.</p> <p><a href="http://www.thejoyofcode.com/Creating_a_Range_Slider_in_WPF_and_other_cool_tips_and_tricks_for_UserControls_.aspx" rel="nofollow noreferrer">http://www....
1
1,266
Spring kafka no message received
<p>I'm using spring boot 2.2.4-RELEASE, spring-kafka 2.4.2.RELEASE</p> <p>My scenario is the following one: </p> <p>In my microservice (let's call it producer microservice) I need to create kakfa topic and then, on some circumstances, I need to send message over a single topic.</p> <p>This message must be received a...
1
7,062
Android ScrollView scrolls to top after calling setVisibility(View.VISIBLE) on child view
<p>I have a <code>ScrollView</code> with a <code>RelativeLayout</code> inside it. This <code>RelativeLayout</code> then has several <code>View</code>s inside it. One of these several <code>View</code>s is a <code>CheckBox</code>. When the <code>CheckBox</code> is checked/unchecked, some of the other <code>View</code>s ...
1
4,027
java.lang.NoClassDefFoundError: org/apache/hadoop/hive/ql/metadata/HiveException when query in spark-shell
<p>I’m trying to integrate spark(3.1.1) and hive local metastore (3.1.2) to use spark-sql.</p> <p>i configured the spark-defaults.conf according to <a href="https://spark.apache.org/docs/latest/sql-data-sources-hive-tables.html" rel="nofollow noreferrer">https://spark.apache.org/docs/latest/sql-data-sources-hive-tables...
1
8,354
Decimal alignment formatting in Python
<p>This <em>should</em> be easy.</p> <p>Here's my array (rather, a method of generating representative test arrays):</p> <pre><code>&gt;&gt;&gt; ri = numpy.random.randint &gt;&gt;&gt; ri2 = lambda x: ''.join(ri(0,9,x).astype('S')) &gt;&gt;&gt; a = array([float(ri2(x)+ '.' + ri2(y)) for x,y in ri(1,10,(10,2))]) &gt;&g...
1
1,145
Android Media Player RTSP
<p>I'm trying to watch RTSP streaming on Android device. But if the server set password for the streaming my Android cannot play it. If without password it's ok. Here is my codes.</p> <pre><code>public class VideoFragment extends Fragment implements View.OnClickListener, SurfaceHolder.Callback, MediaPlayer.OnPreparedL...
1
2,807
Issue with Maven Site plugin
<p>I downloaded Jetty source and tried to run the following maven command:</p> <pre><code>mvn clean compile site -DskipTests -e </code></pre> <p>But the problem is that the maven-site-plugin doesn't work. I use Maven 3.0.5 (tried also with latest) and maven-site-plugin 3.3.</p> <p>The error looks like this:</p> <pr...
1
2,453
Express.js File Upload : 60s timeouts and HTTP connection timeout errors
<p>I'll explain very quickly what my applications does :</p> <ol> <li>Client uploads a document</li> <li>It gets processed</li> <li>The server create's a snapshot image of the pdf</li> <li>The server send's back the path to the snapshot image</li> </ol> <p>Now the issue is that this whole process from step (1) throug...
1
2,168
ViewPager PagerObserver was not registered
<p>My application closes when i turn off my screen and turn it back on.</p> <p>Logcat tells me that the cause of this error is pointing to java line 60 in my CourseFragment.class which extends Fragment. </p> <pre><code>mViewPager.setAdapter(infoTechPageAdapter); </code></pre> <p>I am implementing a ViewPager in my C...
1
2,484
Open and read thousands of files as fast as possible
<p>I need to open and read thousands of files as fast as possible.</p> <p>I have ran a few tests on 13 592 files and found Method 1 to be slightly faster than Method 2. These files are usually between 800 bytes and 4kB. I would like to know if there is anything I can do to make this I/O-bound process faster?</p> <pre...
1
1,865
R code for generalized (extreme Studentized deviate) ESD outlier test
<p>Here is the test I'm interested in: <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h3.htm" rel="nofollow">http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h3.htm</a></p> <p>How can I adapt this code into a function that accepts a vector of numeric values and returns a logical vector spe...
1
1,144
Setting up Xdebug with Docker Compose and WordPress image
<p>I am trying to set up Xdebug with docker-compose. I'm using PhpStorm IDE and the Docker image I'm using installs PHP 7.2. I'm trying to do this within the context of this WordPress image. Here is my current docker-compose.yml file:</p> <pre><code> version: '3' services: db: image: mysql:5.7 por...
1
2,716
Using PDO to make a MySQL search query and display list of results
<p>As the title suggests, I am trying to display a list of search results using PDO and MySQL...I have a table of recipes, which have recipe_id, name &amp; description. I would like to have a search box which can find a key word IN the name or description, i.e. "salad" or "carrots", and return a list of all matching re...
1
1,665
LayoutConstraints - Unable to simultaneously satisfy constraints
<p>I have an app, when I click on my profile page, I kept getting these errors in my console</p> <p>I have tried </p> <p><a href="https://i.stack.imgur.com/47OCg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/47OCg.png" alt="enter image description here"></a></p> <p>This is the entire constraint ...
1
4,148
XNA - Drawing Quads (and primitives) in right order
<p>I'm fairly new to 3D-stuff in XNA and unfortunately I have encountered a problem I can't find the solution for. (Don't even know what the problem is).</p> <p>To cut it short: I am drawing quads in my game using:</p> <pre><code> effect.World = Matrix.Identity * Matrix.CreateRotationX(Rotation.X) ...
1
1,099
plotting a sphere in python for an orbital trajectory
<p>How can I put a sphere of radius <code>1737</code> at the location of <code>(384400,0,0)</code>?</p> <p>This sphere would be the moon in my trajectory. </p> <p>Everything else with the code is fine, I just don't know how to add a sphere in that location with that radius.</p> <pre><code>import numpy as np from sc...
1
2,159
How to find prime factors of a number in c++?
<p>I am attempting project euler question number 3, and I don't get the desired result. My logic:</p> <ol> <li>List all the factors of the number 13195 and save them in an array.</li> <li>Check if each number in the array is a prime.</li> <li>If the number is found to be prime save it in an other array.</li> <li>displ...
1
1,201
Hibernate can't find org/hibernate/cfg/Configuration even though it is there
<p>For some strange reason, Hibernate doesn't want to find the cfg.Configuration class in the jar even though it is part of the .classpath. This is what my util class looks like </p> <pre><code>import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static...
1
1,880
The constructor SimpleAdapter is undefined
<p>I'm develping an app that makes queries on reomte databases, using Json and PHP over MySQL later will be over posgress becouse is more open.</p> <p>my problem is that my SimpleAdapter is considered undefined by the eclipse without any quickfix, the strange thing is that before adding the button when I was trying wi...
1
3,267
Setting the DataContext for a ContextMenu from a ListView's ItemContainer?
<p>I am using the mvvm pattern and I am having a hard time figuring out how to set the DataContext on a ContextMenu from inside a ListView’s ItemContainerStyle. </p> <p>I also do not understand why the ListView.ContextMenu and the ListView’s GridView.ColumnHeaderContextMenu can see the properties and commands from my ...
1
2,454
Flutter, Dart, FireBase: [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Invalid argument(s) - onTap GestureDetcture
<p>I am getting the following error when I run my app.</p> <blockquote> <p>[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Invalid argument(s)</p> </blockquote> <blockquote> <p>Exception caught by gesture Invalid argument(s)</p> </blockquote> <p><a href="https://i.stack.imgur.com/9zWcA.png" rel="nof...
1
1,411
Theos on Mavericks: symbols not found
<p><strong>Please scroll down, update below</strong></p> <hr> <p>I used this tutorial to get my hands dirty on Theos and jailbreak tweak development: <a href="http://iphonedevwiki.net/index.php/Theos/Getting_Started" rel="nofollow noreferrer">http://iphonedevwiki.net/index.php/Theos/Getting_Started</a></p> <p>The qu...
1
2,169
Json.net ignore null values of child objects
<p>I am new into json.net, so any help would be appreciated.</p> <p><b> I am using the net 2.0 version of json.net, because i need to integrate it in Unity3d engine </b> Suggested answer (using nullvaluehandling) just don't work! Should i consider this as restiction of the oldest version?</p> <p>So, a have an object ...
1
1,040
How can I stop this out of bounds exception in Java
<p>Hi I wanted to know how to write up a try and catch block to stop from getting the below error.</p> <pre><code>java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 </code></pre> <p>I have this method which takes a sentence and splits it into an ArrayList. I then use that to store values into a hashmap, where ind...
1
1,109
Play Framework: 2.0.2 PersistenceException:Cannot register class in Ebean server
<p>First of all, this question may seem much alike: <a href="https://stackoverflow.com/questions/9824190/play-framework-persistenceexception-the-type-is-not-a-registered-entity-ebea">Play Framework: PersistenceException: The type is not a registered entity? (Ebean)</a> but it's not...</p> <p>I'm trying to save an enti...
1
1,200
React Native: Firebase notification not showing
<p>When trying to send test notification from Firebase my app does not receive any event. In the notification composer I am picking specifically the <code>fcmToken</code> of my iOS device:</p> <p><a href="https://i.stack.imgur.com/qUxgi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qUxgi.png" alt=...
1
2,150