title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
I can´t get my -/+ button to work (calculator) | <p>I am learning Java. I am programming a calculator for practice, but I can´t get the <kbd>+/-</kbd> button to work. The button is supposed to make the number negative/positive. If you for example type <code>5 + 3</code> and want <code>3</code> to be <code>-3</code>, it just removes <code>5+</code> and only displays <... | 3 | 4,628 |
Partition several vectors into groups (knowing the range of the values of each group) for barplots | <p>My name is Natasa, I’m new in R. I’m impressed by what R can do, but unfortunately I don’t have the time to learn it from the beginning.</p>
<p>I have a lot of vectors (11) with 10000 values/numbers each, so I will be using a more “compact” version. Let’s say that I have 4 vectors: Where TI=Time, and RE= Region (1, ... | 3 | 1,352 |
JSON String Parsing | <p>im trying to parse json data sent from php using android. Here is the code. the json output looks something like this :
"{documents:[{idnumber:'28044684',doctype:'National ID'}],success:1}"</p>
<p>im getting the error <code>ERROR parsing JSONObject value [null];</code> even when I directly assign the json output to... | 3 | 2,320 |
What is the proper way to handling OnClick ButtonView and other View in RecyclerView with touch listener? | <p>I have problem on Handling OnClick ButtonView and other View in RecyclerView Staggered Grid with OnTouch.</p>
<p>This my item RecyclerView:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="ht... | 3 | 2,141 |
How to "properly" send sms when call is received? | <p>I am trying to have an Android <strong>Service</strong> listen for an incoming phone call and when one does occur, grab the incoming number and text it a message.</p>
<p>In my service I have made a <strong>PhoneStateListener:</strong></p>
<pre><code>TelephonyManager tManager = (TelephonyManager)getSystemService(Co... | 3 | 1,878 |
how to force ActionBar to display ALL items | <p>i tried some sugestions here but no one worked,</p>
<p>this is the problem, the arrow indicate where i want them</p>
<p>the action bar is displaying just 2 icons
<img src="https://i.stack.imgur.com/M2Zqo.png" alt="enter image description here"></p>
<p>and the other are in the 3 dots menu</p>
<p><img src="https:/... | 3 | 1,580 |
load prohibited on esp32 during ISR execution | <p>I have set up an interrupt that changes a boolean to true and in void loop(), I am constantly checking if the boolean is true like so:</p>
<pre><code>TTGOClass *ttgo;
bool irq = false;
void setup()
{
Serial.begin(115200);
ttgo = TTGOClass::getWatch();
ttgo->begin();
ttgo->openBL();
ttgo-&... | 3 | 2,762 |
Different behaviour on returning from startActivityForResult() among Android 10 and 11 | <p>I have a strange behaviour when I run my app in Android 11 and 10. I have an activity containing a searchview, a spinner and a recycler view to filter and show a list of persons, and a fragment that displays the details of the selected one.</p>
<p>In the onCreate() method of the activity I set the listener of the se... | 3 | 8,362 |
How to implement "flutter_local_notifications" plugin inside" flutter_background_fetch" to push notification online WITHOUT FIREBASE in Flutter | <p>I want launch the notification when the background process is triggered,
I tried call the notification class inside BackgroundFetch method but didn't work ,However when i print a debug message it works.</p>
<p>and i want to make this functionality isolated from the business logic of the app
this is my attempt </p>
... | 3 | 3,045 |
How can I refactor this C# code currently using Dictionarys to have even less redundancy and be more typesafe? | <p>Because of business decisions which are above my paygrade, I need to parse and merge multiple XML files.</p>
<p>In order to cut down on redundant code, I have this map:</p>
<pre><code> private static readonly Dictionary<string, Type> listTypeByFileName = new Dictionary<string, Type> {
... | 3 | 1,461 |
Python crashes when importing classes and modules into tkinter program | <p>I'm running Python 3.8 in PyCharm IDE, macOs Catalina 10.15.4. While developing my Tkinter program the problem is that if I import any module or some class from another file Python launcher will crash and throw an error:</p>
<pre><code>2020-04-22 02:10:57.952 Python[17930:1345160] -[SDLApplication _setup:]: unrecog... | 3 | 1,805 |
How can I show a list of parent categories and their sub category posts | <p>I need to show lists in this order.. parent-sub-category-title => sub-category-title => sub-category posts. The following code gets me the parent title but doesn't give me the posts. Can anyone tell me why?</p>
<p>parent category title</p>
<p>sub-category title</p>
<p>sub-category-post</p>
<pre><code> //get a... | 3 | 1,061 |
Android mediarecorder doesn't record data when using libvlc | <p>I want to use the android MediaRecorder to record a remote url. I called a fragment from an acticity with an url, and LibVLC plays that.
I check it's acticvity's onClick event from a Timer task. I want to start recording here. It works, it calls start, but the recording doesn't work.
It creates the output file, but ... | 3 | 4,963 |
HttpURLConnection working in Java but not android | <p>We've been trying to send a POST request to a node.js server in an android app. Because the old apache dependencies are deprecated (and I can't seem to access them - I've tried) we've been using the HttpURLConnection classes. We've coded a class in java that works as just a standalone class (Request.java) but when i... | 3 | 1,724 |
ICTU/zap-baseline - Authenticated login is not scanning post login urls | <p>I have created a temporary login at <a href="https://demoqa.com" rel="nofollow noreferrer">https://demoqa.com</a> I can see authentication but the urls after authentication are not followed, the same happens on my own website and <a href="http://altoromutual.com" rel="nofollow noreferrer">http://altoromutual.com</a>... | 3 | 10,749 |
who to wirte a correct pull function | <p>I want to implement pull-stream by C++ , reference "<a href="https://github.com/pull-stream/pull-stream/blob/master/pull.js" rel="nofollow noreferrer">https://github.com/pull-stream/pull-stream/blob/master/pull.js</a>"</p>
<p>But I got this error:</p>
<pre><code>error: no matching function for call to 'pull'
note:... | 3 | 1,260 |
Scala memory issue on List vs. Vector | <p>I wrote a solution to project Euler problem #59 in Scala and I do not understand why switching between Vector and List adds what I think is a memory leak.</p>
<p>Here is a working, brute force solution using Vectors.</p>
<pre><code>val code = scala.io.Source.fromFile("e59.txt").getLines()
.flatMap(l => l.sp... | 3 | 4,579 |
RatpackServer.start in connection with ratpack-pac4j causes non-static context error | <p>I have got very incomprehensible (for me) trouble with RatpackServer's start method. </p>
<p>Fristly, I mean this method</p>
<pre><code>static RatpackServer start(Action<? super RatpackServerSpec> definition)
throws Exception
</code></pre>
<p>and here is my code:</p>
<pre><code>public stati... | 3 | 3,346 |
PHP failed to load string from other function as parameter | <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code> public function test_passing_string() {
$this - > load - > model(array('registration/Registration_model', 'Jawaban_lab_mo... | 3 | 1,527 |
Restrict supported types of a template class by using variadic templates | <p>I'm trying to handle image processing operation classes which are only compatible for certain combinations of: </p>
<ul>
<li>a set of dimensions [1,2,3, ...]</li>
<li>a set of types [int, float, double, ...]</li>
</ul>
<p>One working method would be to define a generic template class which handles the default-case... | 3 | 1,172 |
How to consume secured API from IBM MobileFirst using http adapters | <p>I'm trying to invoke an API which is having authentication. I'm getting an error like "<strong>Http request failed: java.net.SocketTimeoutException:Read timed out</strong>".</p>
<p>Generally when I run this url(<a href="http://samirkantalenka-test.apigee.net/zsubmitalv-3" rel="nofollow">http://samirkantalenka-test.... | 3 | 1,062 |
How to add prefix to an Observable column value using map() operator? | <p>I have an Observable value returned from a service method and I want to add a prefix e.g. 'Prof' as a prefix using <code>map()</code> operator.</p>
<p>My method that returns Observable is:</p>
<pre><code>list(): Observable<EmployeesDto> {
items: Employees;
...
}
</code></pre>
<p>And here is the approa... | 3 | 1,057 |
Can't set iframe video to a responsive size centered to page | <p>I am trying to have my iframe video center to page and also resize. I have tried setting the height to a viewpoint height and using 100% for the width. I have also tried to take in the padding to half of the page. When I give the div a height the video resizes to the div - even when the size is smaller. Right now se... | 3 | 5,210 |
Insert Dynamic Subtotal Formulas with VBA | <p>I wrote a code which insert some formulas into the worksheet depending on the length of code of the item.</p>
<p>I want it more dynamic and remove all "d" "e" like references in the Range formulas. The dynamic formula shall be according to the Last Column of the Range "Budget".</p>
<p>T... | 3 | 1,804 |
Trying to get older program to work but get Error [MongoError]: failed to connect to server | <p>This is the code for the mongodb server login</p>
<pre class="lang-js prettyprint-override"><code>/* Moduless */
const mongoose = require('mongoose');
const express = require('express');
const nunjucks = require('nunjucks');
const bodyParser = require('body-parser');
const http = require('http');
const moment = requ... | 3 | 1,072 |
Android (java) : Navigation icon instead back arrow in toolbar | <p>Currently my navigation icon that leads to my "AppBarConfiguration" disappears automatically as soon as I switch to the next fragment to leave a back arrow.
How can I make sure that on all the following fragments, the navigation icon is displayed instead of this arrow?</p>
<p>Thank you for your help!</p>
<... | 3 | 1,967 |
Getting null object reference error while using BottomSheetBehavior | <p>I created standard bottom sheet xml file
and I included bottom sheet xml inside to fragment CoordinatorLayout.</p>
<p>after compile and run app</p>
<p>I encounterd this error</p>
<pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ourdesign, PID: 8015
java.lang.NullPointerException: Attempt to in... | 3 | 3,819 |
How to put CSS card over background image | <p>I'm struggling with this CSS card, I want it over the background image, but I don't know how, I already tried positioning
I accidentally placed the background image in the header, but I changed it to a div but it still doesn't work
Can someone help?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-c... | 3 | 1,894 |
JS file doesn't load in html with node js | <p>when i launch my node js server to open NavThor.html, this one doesn't load the map script. With the render method i change current html page but I think the problem is that my map.js cannot be load. That strange because when i tried to put the script directly into the html everything is good and run succesful.
I gi... | 3 | 1,210 |
Get date of oldest git commit since last git tag | <p>I'm trying to find what is the oldest git commit date since the git tag released. I found this other SO question <a href="https://stackoverflow.com/questions/12082981/get-all-git-commits-since-last-tag">Get all git commits since last tag</a> and from there I tried this command (where <code><tag_name></code> is... | 3 | 1,257 |
Unable to pass the ec2-instance details while creating AWS network load balancer using AWS CDK for python | <p>I am trying to create two EC2 instances and a Network load balancer using python for AWS-CDK. I am unable to pass in the target type details which are the above two instances while creating the NLB target group. In short, I need to create EC2 instances and attach a network load balance along with it. Please refer to... | 3 | 4,232 |
Not getting selected radio button value from one HTML form to another in Python Flask | <p>I have a home page with radio buttons. I select an item (database type) and want to get the checked-value in python code and then after some validation want to display another form to connect to the selected database type. But after trying so many things, I am unable to get the selected-radio-button value and then u... | 3 | 1,089 |
Main Thread used when using coroutine IO Thread in Kotlin | <p>I'm trying to get data from server using Volley and HTTPURLConnection. Used coroutine IO Thread to prevent blocking Main thread, but screen stops when doing the job(which means main thread is blocked). </p>
<p>Weird thing is, it works perfectly when doing other jobs using Jsoup and HTTPURLConnection. Only differenc... | 3 | 1,907 |
How do I automate a date to be inserted into a datagridview? | <p><strong>[This is solved, i have added the answer at the bottom]</strong></p>
<p><strong>[Original Question]</strong>
How do I automate adding a date to be inserted into a datagridview?</p>
<p>The datagridview is not binded or sourced to any SQL server as anything that user will write into the DataGridView will the... | 3 | 1,532 |
Quicker way of transforming matrices in r? | <p>I am trying to transform a matrix according to various rules.</p>
<p>Take this matrix, m:</p>
<pre><code>x<-c(NA,0,0,0,0,0,4,NA,0,0,1,1,0,0,NA,0,2,4,4,1,3,NA,2,3,0,1,2,0,NA,1,0,0,0,0,0,NA)
m<-matrix(x,6,6, byrow=T)
rownames(m)<-colnames(m)<-LETTERS[1:6]
m
# A B C D E F
#A NA 0 0 0 0 0
#B ... | 3 | 1,215 |
Google graph api chart show all values on h axis | <p>Hi I am trying to show all values on h axis starts from 12 and ends at 20 shold display like
12, 13, 14, 15, 16, 17, 18, 19, 20.</p>
<p>I tried using ticks as</p>
<pre><code>hAxis: {
ticks: dataTable.getDistinctValues(0);
}
</code></pre>
<p>Above line of code does not working.</p>
<p>Below is my current cod... | 3 | 2,421 |
Can't move carousel caption and navigation at the bottom using Bootstrap | <p>I am trying to create this design in Bootstrap carousel:</p>
<p><a href="https://i.stack.imgur.com/APlhm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/APlhm.jpg" alt="enter image description here" /></a></p>
<p>But I can't push down the caption, the titles as well as put the navigation at the ve... | 3 | 2,054 |
Webpack throwing error "File to import not found or unreadable: modules/*." | <p>I am trying to import a bunch of scss files to main styles.scss but in the webpack compilation I get an error
"File to import not found or unreadable: modules/*."
Here is my webpack.config.js:</p>
<pre><code>import path from "path";
import { fileURLToPath } from "url";
import webpack fr... | 3 | 1,163 |
I cannot find what is wrong with my code | <p>I cannot find out why the first button in the div on this code does not work on HTML files.
I have checked many javaScript and HTML validators but none of them work.
on codecademy.com and w3schools.com it works but not on HTML files.</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<style>
... | 3 | 1,114 |
Sails + ReactJS : Unexpected token, can't find why | <p>I'm working on a Sails JS application and i try to use React in it. I'm new to both React and Sails since a few days.
I tried it with a "simple" example, i have a list of user, and i want to display a list of them using React.
I have a method "getUsers" in "MainController" that return the users object. When i go to ... | 3 | 1,315 |
Cordova - JS - Build doesn't seem to work after changing the JS file | <p>I am using cordova 6.2.0</p>
<p>Targeted platform is Android, SDK API Level: 15 - 19, </p>
<p>Here's the code for index.js file</p>
<pre class="lang-js prettyprint-override"><code>var app = {
initialize: function() {
this.bindEvents();
},
bindEvents: function() {
document.addEventListener('deviceready', ... | 3 | 1,465 |
individual if statem. ok, multiple similar if statem. in for loop produces NA's | <p>i wrote a function where the individual if statements execute ok.
If I place them in a for loop I get NA's as a result. I can't find my error.</p>
<p>Total data:</p>
<pre><code>structure(list(ID = c("ClearHelder", "Donkerblauw", "Donkerbruin", "Donkergeel", "Donkergroen", "Donkeroranje", "Donkerroodpaars", "Lichtb... | 3 | 5,202 |
How do I make a Hero Widget Animate in an Overlay/PopupRoute | <p>I have a settings page with options that show a popup when they are clicked because it can't fit in a small container. I used an Overlay to display the popup (<code>Overlay.of(context).insert(OverlayEntry());</code>). The problem was that it would just pop in place with no animation.</p>
<p>I then tried an alternati... | 3 | 1,749 |
Could not find or load main class when trying to connect MariaDB | <p><strong>Error</strong>: Could not find or load main class...</p>
<p>What am I doing wrong when trying to connect Maria DB in java? I'm a novice developer in java so don't be rude...</p>
<p>Am I compiling in a wrong way this file? Also I tried to download mysql and mariaDb drivers but still had no success...I think... | 3 | 2,022 |
Impersonate a user in .Net Core | <p>I am trying to impersonate a user in .NET core to copy a file directly to shared drive. I have looked it up online and copied and changed code but my Login function does not work.</p>
<p>Here is the code</p>
<pre><code> #region Impersionation global variables
public const int LOGON32_LOGON_INTERACTIVE = 2;... | 3 | 1,202 |
Inflated view with NativeAd | <p>I would like to inflate a view storing NativeAd inside. The code is as follows:</p>
<h2>Code:</h2>
<pre><code> public void insert_Native_ad()
{
boolean purchased_noAd = checked_purchase_ad();
if (purchased_noAd)
{
}
else
{
DisplayMetrics displayMetr... | 3 | 1,455 |
Network threads blocking the GUI | <p>I'm just working on C # and WPF.</p>
<p>I'm developing an application that should handle data transfers on the LAN.</p>
<p>In particular, for each transfer progress bars are displayed, green if it is a download, red if it is an upload.</p>
<p>Initially I had made some fictitious attempts in which I simulated tran... | 3 | 1,851 |
Issue adding new xml node | <p>I am not understanding why I am not able to create new xml node.</p>
<p>The code is a try to create a new node and update the view.</p>
<p>Even the textContent property I can't catch in my alerts.</p>
<p>Anything wrong on the code? Another doubt. Why does not it work on IE?</p>
<p>Full Code: <a href="http://jsfi... | 3 | 1,145 |
Aggregating schedule data by start and end times | <p>I have a tricky problem that has had me scratching my head for a little while. I have some data that represents the delivery of "widgets" over a variable number of days, broken down into half hourly slots. </p>
<p>For example (apologies for formatting - haven't quite got to grips with it):</p>
<pre><code>Date ... | 3 | 1,165 |
Next getStaticPaths throws error: A required parameter (slug) was not provided as an array in getStaticPaths for /[[...slug]] | <p>I have NEXTjs connected to Strapi API. On my address http://localhost:1337/api/global?populate=* from where I get data with Axios in this format:</p>
<pre><code>{
"data":
{
"id":1,
"attributes":
{
"Title":"ESN Hradec Králové",
"links":
... | 3 | 1,141 |
Run Time Error with a Doubly Linked List | <p>So, I've tried to implement a doubly linked list in C++.
It compiles just fine, but the moment it runs, it crashes and exits.
It just says "Process returned -1073741819"</p>
<p>(I'm using Code::Blocks and the GNU GCC Compiler btw)</p>
<p>I have a feeling that the problem lies in the constructor, but I'm not exact... | 3 | 2,123 |
C# using C library with pointer etc | <p>I have a .dll without source code.
That library is wrote in C... I have only one .h
An extract of the library is this:</p>
<pre><code>typedef enum
{
SSHD_ERR_NONE = 0,
SSHD_ERR_INVALID_HANDLE,
SSHD_ERR_NULL_POINTER,
}sshdErr_t;
typedef struct
{
unsigned long Year; //
unsigned long ... | 3 | 1,830 |
Suddenly my html started acting weird on an Angular project | <p>I was coding a signUp page when I realized my inputs(checkbox and file) were texts instead of what they were supposed to be. I started undoing things to see what messed it up, and at some point when I deleted a simple input the error went away. I was investigating what in this input could have been causing the probl... | 3 | 5,672 |
Convert query in select and group in rails | <p>I am learning <code>join</code> tables query generation. I can achieve my goal without <code>join</code> table using association. But now my question is how can I get the same result as using <code>join</code>, <code>select</code> and <code>group</code>?</p>
<p><strong>Models:</strong></p>
<pre><code>class User &l... | 3 | 1,074 |
How to form a symmetric cluster of 3 nodes with discovery-groups in ActiveMQ Artemis? | <p>I have created a StatefulSet in Kubernetes with three replicas. The override-broker XML file is as follows -</p>
<pre><code><configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/artemis-configurati... | 3 | 3,226 |
Not able to open Visual Studio Community installer | <p>I am trying to install Visual Studio Community edition using the installer from the official site but when I download the installer and run it ,it opens and automatically closes within 2 secs. I am just not able to get my head around as to why it is not working. Any suggestion would be greatly appreciated.</p>
<p>He... | 3 | 1,242 |
Rounding tax amount for Paypal | <p>In a US e-commerce webshop I am looking for input on how to solve an issue with <a href="https://developer.paypal.com/docs/api/orders/v2/" rel="nofollow noreferrer">Paypal Orders API</a></p>
<p><strong>Example</strong></p>
<p>The price per lamp excluding tax is <strong>$1547</strong></p>
<p>A customer adds 2 of thes... | 3 | 1,772 |
How to create a double-seeded "if" loop using three data.frames in R? | <p>I have one data frames as below, <code>df1</code> and <code>df2</code>:</p>
<pre><code># data
df1 <- read.table(text = "
SNP CHR BP A1 A2 zscore P CEUmaf LOC
rs58043752 1 3344877 A G 0.289 0.7726 . 1:3344877
rs2483242 1 3345145 A ... | 3 | 1,524 |
Generate multiple 2D arrays from column data of a pandas dataframe and store them in a data structure | <p>I have several versions of this type of DataFrame. </p>
<p>My idea was to structure each individual value column in a 2D mesh/array <strong>for each time step</strong>. These 2D arrays should be sequenced by increasing TIME values and stored as a separate dataset (in pandas or numpy??) per variable.
This way i coul... | 3 | 1,435 |
celery daemon stopped working after I killed celery process | <p>I have started job with wrong parameters which would cause it to run forever. I just killed main celery process with kill -9. After that service does not start whatever I do. When running from command line, it starts fine. I'm running Ubuntu 18.04. Log file created but has 0 bytes.</p>
<p>Here is the output of syst... | 3 | 1,344 |
AFNetworking timeout is not working | <p>I am using AFNetworking V2.5.4. </p>
<p>The default timeout for AFN is 60s, this is too long for my app. I want to set it as 20s.
So I tried follow code <code>manager.requestSerializer.timeoutInterval = 20;</code>
But it's not working. I searched some post saying I need add <code>[manager.requestSerializer willCh... | 3 | 1,302 |
jQuery UI Draggable not dragging from the correct place | <p>When I grab my draggable(s), they seem to snap incorrectly to the grid on the right - this has me confused!</p>
<p>Any idea how I can drag an element and have it snap closer to my cursor??</p>
<p>code:</p>
<pre><code><html>
<head>
<title></title>
<script type="text/j... | 3 | 1,299 |
Select all data WHERE x = $_SESSION value | <p>Since I have already posted this and some people discarded my question as a "duplicate" without actually answering it (the page where they told me to look wasn't relevant), and I still can't get any answer, here it is, again... </p>
<p>I would like a page to display all results corresponding with a <code>id_slogan<... | 3 | 5,193 |
How to send over data from database to wear? | <p>My program requires me to send data from a database in the phone over to android wear of the same program when a <code>Button</code> is clicked. I have been trying to send it by converting the database to <code>JSON</code> and then taking those datas from the <code>JSON</code> recieved and entering them in the datab... | 3 | 3,488 |
Connection object throws nullpointerexception in database class | <p>I'm dealing with a problem within my database class in Netbeans. I'm trying to display an html-page which you can use to search data about patients by just typing the patient ID in the input. When you click on "Get patient data", the servlet should connect to my database and get all the data. Though, this is not the... | 3 | 6,875 |
Returning the value of an async axios API call to a variable | <p>I do apologise in advance for what seems like a stupid question that has been answered so many times before, however I just can't get my head around exactly how to accomplish what I'm trying to do and I've been going round and around in circles for hours now re-writing the same bit of code over and over again.</p>
<... | 3 | 1,343 |
Cannot use Options API in Vue 3 with Webpack | <p>I have a question about the Options API in Vue 3 which might be specific to my implementation with Webpack 5. From the docs and articles it seems that in Vue 3 you can use both the 'old' Options API and the 'new' Composition API interchangeably in Vue 3.</p>
<p>However when I have the following code in my Vue 3 app:... | 3 | 1,030 |
polysemy does not detect a member | <p>I am trying to write a bunch of statements with Hspec inside a single polysemy's <code>Sem</code> Monad as such:</p>
<pre><code>{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures ... | 3 | 1,351 |
c# Sockets Programming Errors | <p>Hello im trying to create a connection which connect two pc. In local code the below is working without any trouble but when we starts the clients code in different pc, we cant connect. The code is below. where is the mistake?</p>
<p>the client side:</p>
<pre><code>void Start()
{
Debug.Log(string.Format("Star... | 3 | 2,339 |
Complex Object KStream GlobalKTable left-join | <p>I am new to Kafka Streams. I want to perform following KStream-GlobalKTable pure DSL based left-join operation, and not using map operation.</p>
<p>I have an input stream <code>a.topic</code> which is <String, A>, where value :</p>
<pre><code>{
"b_obj": {
"b_value": "xyz&qu... | 3 | 2,908 |
Final, immutable objects are not constants? | <p>The class <code>Integer</code> is a wrapper of the <code>int</code> primitive type (<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html" rel="nofollow noreferrer">https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html</a>). An object is considered immutable if its state cannot change ... | 3 | 1,112 |
Teach a (specialized) Swift Array to be Equatable | <p>[ Please vote to close; I agree as OP this should reference <a href="https://stackoverflow.com/questions/33332613/is-it-possible-to-add-type-constraints-to-a-swift-protocol-conformance-extension">Is it possible to add type constraints to a Swift protocol conformance extension?</a> ]</p>
<p>I've played with this for... | 3 | 1,064 |
Error When Activating Conda Environment Windows 10 | <p>I just installed Anaconda3 and when I open the Anaconda command prompt, it shows me this error:</p>
<pre><code> # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Tra... | 3 | 3,857 |
How to search particular element under some parent element without using Index of element | <p>I have a search box and when I search some Device I get results of all devices matching string, e.g. if I search AppleiPhone XS, a result I get will be Apple iPhone XS MAX, Apple iPhone XS DEMO DATA, Apple iPhone XS.</p>
<p>Now I want to click on the link which is below Apple iPhone XS, but without using Index of t... | 3 | 1,375 |
I cannot pull values from an array in a different class | <p>The printout of the array lifegrid2 just gives all zeros. I tested the lifegrid array in MyPanel and that is populating, but the values are pulling through as zeros. I checked by putting some values in lifegrid2 and they are being wiped, so it is pulling through from MyPanel, but only zeros. There are no errors b... | 3 | 1,745 |
How to retrieve data from self-made restfull_api | <p>I trying to retrieve the information from my API via Y/views.py from another app in the same project. I am receiving the following error ([WinError 10061]). Although, i am able to perform get/post/put via my json_main.js. Thanks to all who support me in this journey. Please read what is already working. And as addit... | 3 | 1,061 |
PushBack Objects on a vector c++ | <p>I have this:</p>
<pre><code>void StudentRegister::ReadDataFromFile(){
try{
streampos begin,end;
char delimeter[3] = {',', '\n', '\0'};
int numChars = 0, tmpNumChars = 0;
int pos1 = 0, pos2 = 0, pos3 = 0, startIndex = 0;
ifstream file1("Students.txt", ios::in);
if (!file1) throw MyExc... | 3 | 1,837 |
Why A / <constant-int> is faster when A is unsigned vs signed? | <p>I have been reading through the <a href="https://en.wikibooks.org/wiki/Optimizing_C++" rel="nofollow noreferrer">Optimizing C++ wikibook</a>. In the <a href="https://en.wikibooks.org/wiki/Optimizing_C++/Code_optimization/Faster_operations" rel="nofollow noreferrer">faster operations chapter</a> one of the advice is ... | 3 | 1,184 |
Swift: Prime Number app: Variable initialisation | <p>Im quite new to programming, so hopefully someone can explain this to me in plain english..
Im trying to build an app in Swift that tells you wether the number inputted is a prime number or not. If it isn't prime, it should also tell you the factors of the numbers, e.x. if the user inputs 6, it tells you that 6 isn... | 3 | 1,199 |
C++ Class Files Not building Binaries in Eclipse Mars Running on Linux OS | <p>New to C++ and getting the dreaded "Binaries not found" error while executing my code. This only happens when I have created a source file that includes the code for a Class. When I write programs that don't include a Class, this does not happen. For instance, this program creates binaries when I build the project f... | 3 | 1,153 |
Mutating array within an array (Polymer iron-list) | <p>I currently have an iron-list within another iron-list. The parent's data comes from a firebase-query element, and the child's data is computed from each parent item. The db structure and code looks a bit like this:</p>
<pre><code>DB: [
category1: [
itemId1: {
price:... | 3 | 1,368 |
MVC Crud Operations not working | <p>I'm performing emp CRUD operations with save and update operations using<br>
Spring MVC, using SimpleUrlHandlerMapping. But when I run the project it is<br>
throwing an error called /WEB-INF/MAC-servlet.xml not found. I created the
above xml file in WEB-INF itself. Please solve this one. I added all Spr... | 3 | 2,149 |
Deleting Many-To-Many entry | <p>How can one delete a Many-To-Many entry?<br>
I have the entities <code>Client</code> and <code>Restaurant</code> and a relationship table and entity between them: <code>ClientRestaurant</code> having the following columns: <code>ClientID</code>, <code>RestaurantID</code>, <code>DateOfBill</code>.<br>
A client entity... | 3 | 1,401 |
Android best way to generate an image from a layout engine (justified text, box positioning, embed images...) | <p>It's been three days I'm looking for (and test) libs which can perform a generation of an <strong>image</strong> from <strong>textual content</strong>. I develop an app on <strong>Android</strong> with the Augmented Reality <a href="http://www.metaio.com/SDK/" rel="nofollow noreferrer">Metaio SDK</a>. To apply a tex... | 3 | 1,458 |
ANTLR character string seen as identifier | <p>i'm working on a sql parser to allow our programmers to create a mysql like query which is then automatically translated to mssql or mysql queries, depending on what you want. This to allow flexible transitions between mysql and mssql databases.</p>
<p>I currently have what I set out to create except that there is ... | 3 | 2,472 |
How Spring Data Neo4j abstraction handles creation & update (repository.save) | <p>For the purposes of testing, I created a simple domain in the form of a tree of companies and their orders, so:</p>
<ul>
<li>company delivers orders</li>
<li>company has only one company above</li>
<li>company can have multiple collectors below</li>
</ul>
<p>And this is how I represented it:</p>
<pre><code>@Node
pub... | 3 | 2,395 |
For loop is taking too long | <p>Edit: Here is the code above the loop for more helpful answers if it wasn't the problem.</p>
<pre><code>import os
import pandas as pd
import numpy
import csv
from math import *
ParcelSize = 50
UARFCN = 3087
y= r"C:\Users\Heba R\Desktop\GP\Pilot1.csv"
x= r"C:\Users\Heba R\Desktop\GP\Cell.csv"
scanner_File = pd... | 3 | 4,670 |
Requirejs optimizer and mainConfigFile errors | <p>I am attempting to run r.js against our webapp, but am running into the following error:</p>
<blockquote>
<p>Error: Error: The config in mainConfigFile /home/ubuntu/dev/proj/web/insight/js/main.js cannot be used because it cannot be evaluated correctly while running in the optimizer. Try only using a config that ... | 3 | 2,346 |
Java programming- error tracking | <p>I have a raffle draw program that used to have many commands and components, etc.
But I would like to make it a lot simpler by omitting many commands or components such as buttons or labels.
When I tried to do so, errors arose (42 errors) all of which say: </p>
<pre><code>error: class, interface or enum expected.
<... | 3 | 8,819 |
How to connect Android GRPC client to azure app service, I am doing such work but its not wroking | <p>Basically, this code sign in the user with API, using GRPC but I could not connect the android app.
Every time it returns another error but not the response after searching on too many links it gives another solution which does not work at all</p>
<pre><code> ManagedChannel channel = ManagedChannelBuilder.for... | 3 | 1,589 |
java.lang.ClassCastException Adapter cast to an Activity | <p>I have a function like this</p>
<pre><code> private void goToSalesActList(View view) {
CustomerActivity ca = (CustomerActivity)view.getTag();
Intent intent = new Intent(this, SalesActListActivity.class);
Bundle bundle = new Bundle();
bundle.putParcelable(Const.OBJ_USER, user);
bundle.putParcela... | 3 | 1,779 |
Can't understand the error is existing | <p>Error:</p>
<pre><code>temp:-1: 6
p[0]: 6
loop:p[0]: 6
temp:0: 5
p[1]: 5
loop:p[1]: 5
temp:1: 4
p[2]: 4
loop:p[2]: 4
temp:2: 7
p[3]: 7
loop:p[3]: 7
temp:3: 9
p[4]: 9
loop:p[4]: 9
temp:4: 8
p[5]: 8
loop:p[5]: 8
temp:5: 4
temp:5: 9
temp:5: 0
p[6]: 0
loop:p[6]: 0
temp:6: 1
p[7]: 1
loop:p[7]: 1
temp:7: 2
p[8]: 2
loop:p[... | 3 | 1,570 |
IONIC build PROD | <p>I am trying to build my app for production.</p>
<blockquote>
<p>Error: Error encountered resolving symbol values statically. Calling
function 'makeDecorator', function calls are not supported. Consider
replacing the function or lambda with a reference to an exported
function, resolving symbol Injectable in
... | 3 | 2,103 |
Summing multiple float values into a new float (Double values) | <p>How can I sum multiple doubleValues into a new double? At the moment I have tried like this: </p>
<pre><code>double sum = doubleWantToSum1 + doubleWantToSum2 + doubleWantToSum; //etc...
</code></pre>
<p>And further, I want to use the result for this equation in</p>
<pre><code>double tooMuch = sum - 100;
</code></... | 3 | 1,569 |
Android - Drawing lines using bitmap on TouchImageView | <p>Basically I would like to draw lines on an image so that when that image is zoomed, the lines would also get zoomed proportionally, or any kind of interactivity like fling or zoom reset. I'm using TouchImageView as my ImageView and here's my code</p>
<pre><code>public class ParkA extends Activity{
@Override
... | 3 | 1,525 |
Why is my context disposed before I can use it? | <p>I'm implementing a very simple query using the <code>HotChocolate</code> GraphQL library in a .Net 5 project. I've been following the <a href="https://github.com/ChilliCream/graphql-workshop/blob/master/docs/1-creating-a-graphql-server-project.md" rel="nofollow noreferrer">tutorial series</a> from the HotChocolate G... | 3 | 1,651 |
How to check if a coupon has granted free shipping in Woocommerce? | <p>ORIGINAL QUESTION:</p>
<p>We need to know if a coupon has specifically granted free shipping.</p>
<p>In my test scenario I have two coupons applied to the cart, one with free shipping and one without. The var_dump clearly shows one coupon like this: </p>
<pre><code> ["free_shipping"]=>
bool(true)
</code></p... | 3 | 1,302 |
bootstrap not working on mobile (Python flask) | <p>I am creating a sort of website portfolio with the Python flask framework. The html page looks fine in chrome even with the mobile preview. But the bootstrap does not seem to be working when I view the page on my iphone 7plus. The list items and the image classes do not seem to be working. What seems to be the probl... | 3 | 2,040 |
Occupied Position in Tic-Tac-Toe Game [C] | <p>One question about this code: if the choice the player picks is already taken, how do I make him/her choose again?</p>
<p>If I compile the code now, it will change the the position for the one the user chose, and this can't happen.</p>
<p>Obs: the "drawing" of the tic-tac-toe game should appear before this (<code>... | 3 | 3,337 |
Function returning reference to self can't compile, while the same code can | <p>Given two snippets, which tries to return reference to a member value from self, I really can't understand why the one with separate function doesn't compile.</p>
<p>This works (<a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=58d1ba564e2a52fe2ac0eb395a363614" rel="nofollo... | 3 | 1,033 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.