title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to pass an object from a fragment to an activity detail view using ViewModel(MVVM)? | <p>I'm using MVVM as architecture, how can I pass an object from a fragment(recycler + viewModel) to an activity(detail view + viewModel)?</p>
<p>This is the viewmodel for the fragment</p>
<pre><code>class BuyViewModel : ViewModel() {
private lateinit var buys: MutableLiveData<List<Buy>>
private var buyRe... | 2 | 1,125 |
How can I disable all action buttons while shiny is busy and loading text is displayed | <p>Inside a Shiny App I want to disable all buttons while the app is running. I have a lot of action buttons, dependencies and some renderui stuff, so that I think using shinyjs:disable(button) is crucial and very unclean over 40 and more buttons. </p>
<p>Is there an easy way to disable a button (or all buttons/slider... | 2 | 1,223 |
How to understand "useBox" in react-three-fiber | <p>I'm interested in learning how to create dynamic objects and group them together entirely in react/JavaScript. I'm looking at the chair and table in this example as my model:</p>
<p><a href="https://codesandbox.io/s/ragdoll-physics-forked-bntr9" rel="nofollow noreferrer">https://codesandbox.io/s/ragdoll-physics-for... | 2 | 1,742 |
PagerTemplate in gridview not working properly | <p>I am not getting the point why this is happening.</p>
<p>I have a Gridview, inside that I have implemented a <strong>pagerTemplate</strong>. It is showing me the correct records which are coming from the database.</p>
<p>First of All, I took the logic of implementing the gridview pager part from <a href="http://ms... | 2 | 2,664 |
Syslog-ng fails to read and write locally | <p>This is my first question on StackOverflow so forgive me if I accidentally break some rules. </p>
<p>What I am trying to do is have a program write a simple log and have syslog-ng read that log and then write to another file. </p>
<p>This input log file is a file containing random numbers. </p>
<p>Here is the con... | 2 | 1,096 |
How to set an image on imageView from the gallery and image taken by camera in Android? | <p>In my app I want to set an image on a <code>ImageView</code> from gallery and I want to set an image which is taken by the camera. I have tried this code, when I load image from the gallery, it is working. But when I try to take a picture to set on <code>ImageView</code>, that activity is loaded but the image is not... | 2 | 5,518 |
VRPTW: How to handle time windows and slacks for the special depot node? | <p>I find reading all values of an assignment, obtained from</p>
<pre><code>assignment = routing.SolveWithParameters(search_params)
</code></pre>
<p>of routing problems with time windows quiet tricky. First of all, there are nodes and indices. I obtain the indices of a vehicle (route) via</p>
<pre><code>index = rout... | 2 | 1,643 |
Python Autobahn websocket | <p>I am impressed by all the things Python can do. What I like to know is if I can implement a Python script that can call a JavaScript function.</p>
<p>The Python code I use is detecting an NFC card and reads the Unique ID. Currently I use a Java applet to interact with an HTML page. I think Python is much lighter an... | 2 | 1,221 |
Apigility with Doctrine 2 ODM MongoDB | <p>When i get entity from my API i got error:</p>
<p><strong>PHP Fatal error: Call to a member function createQuery() on a non-object in /Sites/system.local/vendor/zfcampus/zf-apigility-doctrine/src/Server/Resource/DoctrineResource.php on line 442</strong></p>
<p>DoctrineResource.php (function on line 442 - fetchAll... | 2 | 5,444 |
Why accepted two same 5-tuple socket when concurrent connect to the server? | <p>server.go</p>
<pre><code>package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
_ "net/http/pprof"
"sync"
"syscall"
)
type ConnSet struct {
data map[int]net.Conn
mutex sync.Mutex
}
func (m *ConnSet) Update(id int, conn net.Conn) error {
m.mutex.Lock()... | 2 | 2,967 |
BPEL eclipse "assign" initialize | <p>I have been working on eclipse for WS-BPEL processes. In a basic helloworld.bpel process, an <code>assign</code> block (which is between <code>receiveInput</code> and <code>replyOutput</code> blocks)requires input and output validation. But once I set input variable to input->payload->input and output to output->pay... | 2 | 1,865 |
Fit button width in GridLayout column Android | <p>I tried to create a GUI - GridLayout 2 rows & 2 cols (you can see in the image). I want the button width is fit the column (2) width. But the result is overflow.</p>
<p><a href="https://i.stack.imgur.com/4l9L3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4l9L3.png" alt="enter image descrip... | 2 | 1,723 |
CDI Beans module deployment failed- LifecycleException on deploying webapp | <p>I'm trying to run a web-app on tomee1.7.1 in eclipse Luna. On adding java source source files, the server fails to start giving the below stacktrace. I'm stuck here for a few days now.</p>
<p>I'm running java 1.8.40. The problem is that I can't relate this stack trace to any of my code.</p>
<pre><code> INFO: Open... | 2 | 6,959 |
How to add splash color or ripple effects to IconButtons or elevated Buttons | <p>On this screen there is an iconButton, a microphone the user must tap before repeating a word. I added splashcolor to the properties of the IconButton, but nothing shows when user taps. Same thing with ToolTip.</p>
<p>I had noticed random behaviors with my elevated buttons in other screens, sometimes we see the ripp... | 2 | 3,214 |
Yii2 Swift_SmtpTransport gmail not working | <p>I'm trying to send an email using yii2 mailer component.</p>
<p>config web.php</p>
<pre><code>'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emai... | 2 | 1,053 |
Angular2 NGRX/Store View Not Updating | <p>Sorry for yet another Angular 2 view update question but I haven't been able to find an answer in any other responses. I'm mentioning the use of NGRX/Store here though I doubt its the reason the view isn't updating.Oddly enough it seems to update once (at least) but manages to stay a step behind. The last (most rece... | 2 | 2,171 |
No Ice Candidates gathering, peerConnection.iceGatheringState returns "complete" right away | <p>I've been stuck on this for a while now. My code is based on <a href="https://webrtc.org/getting-started/firebase-rtc-codelab" rel="nofollow noreferrer">https://webrtc.org/getting-started/firebase-rtc-codelab</a>. I basically just changed it to React and firebase realtime database instead of firestore. </p>
<pre><c... | 2 | 2,009 |
Pins not showing up in Chrome Google Maps Api V3 | <p>For some reason my pins aren't showing in the chrome browser. They do in safari, opera, firefox etc etc but not in chrome.</p>
<p>I get an undefined typeerror in the google api lib, so can't do anything with it.</p>
<p>This is my code where i add my google map:</p>
<pre><code>var map;
function loadStores(){
goog... | 2 | 1,243 |
CakePHP -- limiting results from one model to those with matching conditions in an associated model | <p>I'm just getting started in CakePHP, and am running into trouble limiting retrieved results to those where a field in an associated model matches a certain value. I've found a lot of related questions here and elsewhere, but they seem to deal with situations that are either more complicated or more simple than my sc... | 2 | 1,943 |
Unity Game Crashing on Startup due to Admob only on Android 12 devices | <p>Actually my game is crashing on android 12. I tried a lot but couldn't figure out. I know the actual reason is admob because when i remove admob game is working fine and I am using latest admob plugin(6.1.2) (tried other versions too) for unity 2020.3.23f1.[<img src="https://i.stack.imgur.com/Cg6xK.jpg" alt="This is... | 2 | 9,555 |
Amazon Polly API | <p>I am trying to use Amazon Polly REST API.<br>
Can someone, please, help me to do this?<br>
I am using Java and OkHttp3 and tried this:</p>
<pre><code> String url = "https://polly.us-west-2.amazonaws.com/v1/speech";
String postBody = "{\"OutputFormat\":\"mp3\",\"Text\":\"Some text to listen\",\"TextType\":\"t... | 2 | 1,079 |
Getting the data from the Custom View Renderer in the platform specific from Shared Project in Xamarin.Forms | <p>I am developing a mobile application using Xamarin.Forms. In my application, I am implementing custom camera using a custom view. I have successfully implemented the custom camera view. What I am trying to do now is, I would like to retrieve some data from custom view renderer in the platform-specific when a button ... | 2 | 4,593 |
Integrate Spring Boot in a legacy application | <p>I want to integrate Spring Boot in one of the existing application. So I decided to start with a POC first.
I downloaded a sample working code from <a href="http://www.journaldev.com/3531/spring-mvc-hibernate-mysql-integration-crud-example-tutorial" rel="nofollow">http://www.journaldev.com/3531/spring-mvc-hibernate... | 2 | 1,686 |
How to right align a div within a table cell without wrapping? | <p>Peculiar requirements that I couldn't come up with a proper solution for:</p>
<p>For content in a table cell with a <code><div></code> appended, how can I right align that <code><div></code> while preventing the whole cell from wrapping?</p>
<p>Here's what I have for consideration: <a href="https://jsf... | 2 | 1,214 |
iOS CPU usage skyrockets here | <p>I have an issue with my app where it spikes up to over 100% CPU usage when gathering data. I have done everything I can think of to reign in the processing so that it doesn't lock the device up, and still continues to get the data that's needed.</p>
<p>Our customers have some big databases, so downloading the enti... | 2 | 2,667 |
get function signature from FrameInfo or frame in python | <p>While writing my own exception-hook in python, I came to the idea of using the <code>inspect</code>-module to provide myselfe more information about how the function got called.</p>
<p>This means the <strong>signature</strong> of the function as well as the <strong>arguments</strong> passed to it.</p>
<pre><code>i... | 2 | 1,099 |
issue with adding a new member in etcd cluster | <p>I have 3 node etcd cluster running on docker</p>
<pre><code>Node1:
etcd-advertise-client-urls: "http://sensu-backend1:2379"
etcd-initial-advertise-peer-urls: "http://sensu-backend3:2380"
etcd-initial-cluster: "sensu-backend1=http://sensu-backend1:2380,sensu-backend2=http://sensu-backend2:23... | 2 | 1,342 |
Xcode / iOS6 / UIWebView URL / HTML links do not work | <p>After looking through numerous Stack Overflow posts, I was unable to find a solution to my problem. If I am asking a question that has already been answered elsewhere, kindly give me a nod in the right direction. </p>
<p>And, please, don't be too harsh on me if I might be using the wrong terminology, as I am still ... | 2 | 1,203 |
Click event not handled on li click | <p>I'm trying to launch a click event on an <code>li</code> but it doesn't seem to work.</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-js lang-js prettyprint-override"><code>$( document ).ready(function() {
$(... | 2 | 1,381 |
How to create a basic, empty, WDM driver? | <p>I am trying to convince Visual Studio 2013 to build a driver. But never having seen Visual Studio 2013 successfully build a driver, i have no idea how to fix the problem.</p>
<p>So it's time to go back to the beginning. Delete the entire solution and start adding things one-by-one until it fails to build. Except i ... | 2 | 1,157 |
Delete Even Number of Nodes in Linked List And Print in Reverse | <p>What should be the logic followed for this scenario.</p>
<p>I have a linear linked list. I want to print the list in reverse order starting from the second last node.. but while removing even number of nodes.
For example:
34(Node 1- Odd), 65(Node 2 - even), 733(Node 3 - odd), 34(Node 4 - even),
56(Node 5 - odd),... | 2 | 1,419 |
JSF- can't log out | <p>Here is my the template I use in <code>index.xhtml</code>:</p>
<pre><code><!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<tit... | 2 | 2,170 |
Set up Varnish + Drupal on Docker | <p>I have three docker containers, one is running php5+apache with Drupal installed, and the other one is running varnish 4.1, and the last one is running MySQL. Here's my docker-compose.yml</p>
<pre><code>version: "2"
services:
app:
container_name: drupal.app
build: .build/php5-apache
working_dir: "/var... | 2 | 2,122 |
How do I automatically update Java SWT table cells that already have information? | <p>I am trying to update this table automatically with a syncexec. The code I am pasting is a test code that produces the same symptoms I am experiencing, but instead of live data from an external source, I am using the random number generating utility. </p>
<p>I have 2 columns. One column is a place holding number... | 2 | 2,793 |
WPF : Select/Deselect ListView's Data items on click of Select All checkbox control | <p>I am working on a WPF application where I have to bind three different <code>ListViews</code> grouped inside a <code>GroupBox</code> container.</p>
<p>This is the XAML for the display:</p>
<pre><code><GroupBox Header="Zone2 Sensors" Height="250" Name="grpBoxZone2" Width="380" Margin="25,248,90,660" Grid.Column=... | 2 | 5,043 |
Exporting trained TensorFlow models to C++ | <p>I am trying to export trained TensorFlow models to C++ using <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py" rel="nofollow noreferrer">freeze_graph.py</a>. I am trying to export the ssd_mobilenet_v1_coco_2017_11_17 model using the following syntax:</p>
<pre><co... | 2 | 3,540 |
How to get non matching strings from two sets in JAVA? | <p>How should i get non matching elements only one time?
My Code is as follow:</p>
<pre><code>Set<String> hashSet = new HashSet<String>(); //consist 90 elements
Set<Object> hashSet2 = new HashSet<Object>();// consist 9 elements
for (String string : hashSet ) {
for(Object obj: ha... | 2 | 13,311 |
Python: how to write this code to run on GPU? | <p>I have been trying for quite some time to implement my code to run on GPU, however with little success. I would really appreciate someone helping with the implementation.</p>
<p>Let me say a few words about the problem. I have a graph G with N nodes and a distribution mx on each node x. I would like to compute the ... | 2 | 1,271 |
COMPUTE SUM is not working properly | <p>I have been working on the following query and cannot get it to COMPUTE:</p>
<pre><code>BREAK ON "Package ID" SKIP 2 on report
COMPUTE SUM OF "Package Cost" ON "Package ID"
COMPUTE SUM OF "Package Cost" ON REPORT;
Select distinct p.PkgID "Package ID", p.PkgName "Package Type", to_char(p.PkgCost, '$99.99')"Package ... | 2 | 2,698 |
Matlab 2011b and mingw64 | <p>I've followed the guidance I found <a href="https://stackoverflow.com/questions/8552580/using-gccmingw-as-matlabs-mex-compiler">here</a>.</p>
<p>I have almost completed the work. The following section is the paragraph of batch conversion work. I have created a batch file to convert a lot of DLLs pre-built by MSVC i... | 2 | 1,308 |
Unable to merge schemas and resolvers correctly using graphql-tools | <p>I tried to connect schemas and resolvers using <strong>graphql-tools</strong>. To do this, I moved them into separate folders, and used the <strong>mergeSchemas</strong> and <strong>mergeResolvers</strong> functions. I need to do this because there will be many models, the files will be large, and there will be conf... | 2 | 2,523 |
TCP server stops sending SYN/ACK, instead just sends ACK after several normal TCP sessions | <p>I have a few thousand devices behind a NAT talking to two servers. Each device is behind a local router (think modem/router), at which they get NATed to a private network that has thousands of these devices, and at the gateway for this private network, TCP sessions from these thousands of devices get NAT overload / ... | 2 | 1,259 |
MVC 4 disable values in multiple dropdowns using Razor | <p>I have an issue where I'm trying to add two dropdowns per object. The objects are dynamic so I could have 6 objects, each with 2 corresponding dropdowns inside them. Inside these dropdowns, there will be 1-4 selections and the initial empty value. For the corresponding dropdowns per object, I would like it to only a... | 2 | 2,009 |
If radio buttons is checked then display div in Codeigniter | <p>I'm trying to create a user form, I am stuck in it bacause I want that if A radio button is checked then display a div.I could not do this as I am little bit weak in javascript. please find my code below.
My button is</p>
<pre><code> <label>
<input type="radio" name="groups[]" value="6"> Head of Dis... | 2 | 1,215 |
Dataframe save after join is creating numerous part files | <p>I am trying to learn programming with Dataframes. With below code i am trying to join two CSV on a column and then saving it as a combined CSV. Running this code in SCALA IDE i am seeing almost 200 small part files as a result. Could you please help me understand what is going wrong here-</p>
<pre><code>import org.... | 2 | 3,935 |
CMake cant find the external libraries when subdirectory is used to build dependencies for each target | <p>I have a set of libraries and their respective tests, and they are organized in the following fashion:</p>
<pre><code>-Lib1
-Lib1_Test
-Lib2
-Lib2_Test
-Lib3
-Lib3_Test
....
</code></pre>
<p>and so on. some of these libs depend on others, for example <code>Lib1</code> depends on <code>Lib2</code>, and Lib3 depends o... | 2 | 4,906 |
CMake can't find boost. | <p>I am not familiar with CMake. I'm trying to compile a library GTSAM 4.0. using CMake. The instruction for compiling is provided here:</p>
<p><a href="https://bitbucket.org/gtborg/gtsam/src/c82fe1fde2fc988b6bde5e4798b66129bbb5da19/INSTALL?fileviewer=file-view-default" rel="nofollow noreferrer">https://bitbucket.org/... | 2 | 10,630 |
After updating Intelij getting Exception in thread "main" java.lang.NoClassDefFoundError: org/testng/TestNG | <p>After updating intelij i cannot run anymore testng.xml.
If i run my tests as a separate Class it works fine and runs. But if i run it as a suite Testng.xml i got error. </p>
<pre><code>/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/A... | 2 | 2,470 |
How do I add a vertical separator line between 3 displayed values? | <p>I have 3 values displayed consecutively on the screen and I need to add 2-3 vertical separator lines between all of them.The issue is everytime I add a view/ divider between them they shift to the left or right way too much and some values cut off/ disappear. I was wondering if there is a way to go abotu it, below i... | 2 | 3,308 |
how to send string array from custom adpter to main activity | <p>I am a new android Developer and i want to send String Array from Custom ADapter to main activity class but my code is not working and I am Using CustomAdapter class please can any help me</p>
<p>My ContactList class is following.....</p>
<pre><code>public class ContactList extends Activity {
ListView lvContac... | 2 | 3,297 |
Tax Calculating Console Application Issue | <p>I am having some issues with this app that i need to write for a c# class. I am getting an Unhandled Exception error. I know the problem relies within program.cs and TaxMath.cs, but I am unsure of where to go from here, any guidance would greatly be appreciated.</p>
<p>Error:</p>
<p><div class="snippet" data-lang=... | 2 | 2,143 |
Android login activity - Error parsing data org.json.JSONException: Value  of type java.lang.String cannot be converted to JSONObject | <p>Im making a log in activity to connect to a MySQL database. For some reason I keep getting this</p>
<pre><code>08-13 08:45:59.739 1144-1159/com.amity.paul.amity E/JSON Parser﹕ Error parsing data org.json.JSONException: Value  of type java.lang.String cannot be converted to JSONObject
08-13 08:45:59.739 ... | 2 | 6,823 |
Tomcat does not prompt certificate for web application (OpenAM) | <p>I have been trouble shooting my set up of OpenAM for a while, still could not make it work as wanted. I wanted OpenAM to be able to to do OCSP validate authenticating user through my own copy of EJBCA. Therefore, I need tomcat prompt for user certificate and pass it to OpenAM. Visiting OpenAM from HTTPS is fine, an... | 2 | 1,051 |
Django error: invalid syntax (<unknown>, line 1) when iterating queryset | <p>I've been working with django for a few months now, and normally a simple google search takes care of any of my problems (usually with a link to SO). I have finally come across something that I can't find a solution to and is completely baffling.</p>
<p>General error information:</p>
<p>Request Method: GET
Request... | 2 | 1,896 |
JWT Token not found 401 error when trying to access my api plateform? | <p>I am facing a small problem I don't really know how to fix, I tried some solutions that I will mention later but still got nothing, it is an authentication problem, when trying to make my User authenticate.</p>
<p>Well I have a User entity like this : </p>
<pre><code><?php
namespace App\Entity;
use ApiPlatfor... | 2 | 1,967 |
NSMutableArray causes memory buildup, not Autoreleasing with ARC | <p>I created an array using the following code. After the 12 images have no longer needed, I set the imageArray to nil and reload a new set of images into this array. When I run the app in instruments I can see a memory buildup issue. I also ran heapshots and it shows 12 images still lingering even after I set the a... | 2 | 2,019 |
ANR because of AdMob (com.google.android.gms.policy_ads_fdr_dynamite) | <p>I see lots of ANRs because of AdMob (com.google.android.gms.policy_ads_fdr_dynamite) in Google Play Console. The AdMob version is <code>com.google.firebase:firebase-ads:17.1.3</code>.</p>
<p>Is there anything I can do to resolve this issue?</p>
<p>Here is the log:</p>
<pre><code>"main" tid=1 Waiting
"main" prio=... | 2 | 7,341 |
Keras gives nan when training categorical LSTM sequence-to-sequence model | <p>I am trying to write a Keras model (using the Tensorflow backend) that uses an LSTM to predict labels for sequences like you would in a part-of-speech labeling task. The model I have written returns <code>nan</code> as a loss for all training epochs and for all label predictions. I suspect I have my model configured... | 2 | 1,999 |
ERROR NullInjectorError: R3InjectorError(AppModule) - Using DI for angular content translation | <p>I have an angular project which has the following architecture (i removed hml & css) :</p>
<pre><code>|_ app.component.ts
|_ app.module.ts
|_ app-routing-module.ts
|_ components
|_ site
|_ site.component.ts
|_ site.module.ts
|_ site.en.module.ts
|_ site.fr.module.ts
|_ ... | 2 | 2,770 |
scrollTop or scrollLeft on horizontal website? | <p>I have a website I am working on (here is a basic <a href="https://codepen.io/caitlinmooneyx/pen/xvgBvY" rel="nofollow noreferrer">example</a>), yesterday I got some help to implement active states on the radio-style button navigation, and I am now trying to link this up so that it also changes on page scroll/when i... | 2 | 3,040 |
Print python database query to HTML document | <p>I wrote some python to query an Oracle database and I would like it to print the results in a formatted HTML table when I look at it with my browser. I am unsure how to do this.</p>
<p>The python I wrote is as below: </p>
<pre><code>#!/usr/bin/python2.6
import imp,datetime
import cx_Oracle
def index():
conn_s... | 2 | 1,357 |
Import excel into multiple tables - PHP and MYSQL (codeigniter) | <p>with the function below, you can import data from an Excel spreadsheet to the database via PHP.</p>
<p>A table <code>client</code> contains the following fields:</p>
<pre>
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`address` VARCHAR(255) NOT NULL,
</pre>
<p>But I need the columns: <code>$... | 2 | 1,204 |
Strange behaviour with Japanese IME in Windows 10 1709 | <p>I am facing a problem in Windows 10 Creators update where, when I try to input something to my application using IME, the first character is ignored; i.e., If I use IME to enter the japanese hiragana character 'か' by typing K & A, i end up getting only 'あ' with the K being lost. This happens to the first charact... | 2 | 2,488 |
cannot find symbol method onActivityResult(int,int,Intent) | <p>Im following the tutorial of In-app Billing from the following link:</p>
<p><a href="http://www.techotopia.com/index.php/An_Android_Studio_Google_Play_In-app_Billing_Tutorial" rel="nofollow">Android Studio Google Play In-app Billing Tutorial.</a></p>
<p>Im implementing this logic in a Contact Adapter class which e... | 2 | 4,871 |
MVC Model is null during post | <p>Hi guys im having problems when posting, my model appears to be null on http post which is weird, there is no problems during the get method, everything populates as it should be but during post model is null. please help.</p>
<p>View</p>
<pre><code> @model ComplianceCheck.Models.ViewModel.ArrivalModel
@for (i... | 2 | 1,464 |
I am new to node js how to get dependent dynamic dropdown from database | <p>my node code:</p>
<pre><code>app.get('/block_name', function (req,res){
var sql='SELECT `block_name`,`block_id` FROM `tbl_block` ';
connection.query(sql,function(err, result) {
if (err) throw err;
res.json(result);
});
</code></pre>
<p>});</p>
<p><code>app.get('/site_name', function (req,res){</code></... | 2 | 1,068 |
Docker maven fabric8 plugin (on Windows): building image gives incompatibility issues ? | <p>Via Maven I would like to build a Docker image from a Springboot project.
I run: mvn clean package docker:build
Issue: </p>
<pre><code>ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (default-cli) on project spring-boot-docker: Execution default-cli of goal io.fabric8:docker-maven-plugin... | 2 | 1,602 |
How to find all multiple uses of the same xml element id value? | <p>Somehow, I'm using the same xml element id value more than once. The xml written to a file is truncated before I can see where the duplicate usage of the id value is. The sax parser exception is not too helpful. How can I tell the javax.xml.bind.Marshaller to write all the xml even though it fails to validate? H... | 2 | 2,684 |
Accessing nested JSON data in React Component | <p>Hi i am just starting to learn react as a side project.</p>
<p>Im using an express backend to call an api that returns some JSON to my component. I cant seem to access the nested array to iterate over and display.</p>
<pre><code>import React, { Component } from 'react';
import '../../app.css';
export class Table ... | 2 | 1,366 |
How to get the TitledBorder's title to display properly in the GUI | <p>I have the GUI displaying properly for the most part, except for one thing. The TitledBorder("Numeric Type") does not display the entire title for the right JPanel. I believe it has something to do with the BorderLayout Manager. Instead of displaying "Numeric Type" within the border, just "Numeric..." displays. ... | 2 | 1,242 |
Apache Avro is not generating UUID | <p>Avro is not generating UUID class in code for fields no mater what I tried. </p>
<p>Versions: 1.8.2 & 1.9.1</p>
<p>I tried to generate UUID with such schema: </p>
<pre><code> "type": "record",
"name": "RecordWithUUID",
"namespace": "avro",
"fields": [
{
"name": "uuid",
"type": {
... | 2 | 1,377 |
Unable to change ownership using chown even as root user | <p>Below is a snippet of my automation script, ownership gets changed for the directory (or)mount point - /deploy/umbro/$Client to ind$Client:ind as expected, but on the other hand, ownership for the directory (or)mount point, under the case statements are not getting changed.
Still remains as root:root</p>
<p>Not e... | 2 | 1,440 |
CSharpCodeGenerator "Could not find file C:\Windows\Temp\...dll" | <p>I was awoken today by an alarming text message from the server monitor service that one of my servers was down, and has been for the past 7 hours.</p>
<p>The server runs a WCF web-service hosted in IIS.</p>
<p>I checked in IIS and my Application Pool was stopped. There was nothing in the Event Logs on the server.<... | 2 | 1,110 |
Sending Calendar Events (Invitations) using iCal4j library (Java - Spring) | <p>This question is relating to iCal4j library integration with a Java (Spring) application.</p>
<p><strong>Use case</strong> -
In my application, when a user creates an event from the UI, the invitees should receive a calendar invitation, which they can add to their personal calendar (Google calendar, Outlook calenda... | 2 | 1,083 |
Android Virtual Device - Black screen and I've tried everything | <p>This is a fresh install of Android Studios on Ubuntu 16.04.</p>
<p>I just get a black screen on the AVD every time. I been reading related threads tried the following:</p>
<ul>
<li>Changing to software gpu </li>
<li>many different device profiles</li>
<li>many different andoid system image versions</li>
<li>wiping... | 2 | 2,353 |
no matching function for call to std::vector<std::tuple> push_back | <p>I have a sample program containing 6 timepoints using <code>high_resolution_clock::now()</code> from standard <code>chrono</code> header. I take differences b/w each of them resulting in 3 differences and caste them as <code>auto duration1 = std::chrono::duration_cast<std::chrono::microseconds>( t2 - t1 ).coun... | 2 | 1,172 |
Symfony2 - Unrecognized option "entity" under "security.providers.db_users" | <p>I'm implementing a user authentication for my project (an API) where the login will be done using oAuth third parties (Facebook and Google+).</p>
<p>My project is using MongoDb and Doctrine MongoDB Odm.</p>
<p>For reach this objective I've created a User Document:</p>
<pre><code>class User implements UserInterfac... | 2 | 1,346 |
feathersjs -> Error 401 with message 'Error' and NotAuthenticated | <p>I thought to make a stack for my error now. I had some issues firing up authentication, but that was for my working project is a different version. I also had a problem with a different service and column naming convention then the default. Then it failed due to sequelize and mssql with the 'FETCH' 'NEXT' what I sol... | 2 | 6,159 |
Migrating Oracle geometry rows from geodetic to cartesian | <p>I have a table (<code>granule</code>) with about 4 million unique geometry objects that currently have SRID = 8307. </p>
<p>I am trying to create a SECOND table, with the same data, but using a cartesian coordinate system. </p>
<p>I created the table, </p>
<pre><code>create table granule_cartesian (
gran... | 2 | 1,378 |
How to declare CURL body for CoinBase API call in php | <p>I want use php curl to interact with coinbase api. Simple API calls that does not require data to be passed are successful. What I want to do is <a href="https://developers.coinbase.com/api/v2#create-address" rel="nofollow noreferrer">create address</a>.<br>
CLI curl works. The command line curl command sample is be... | 2 | 1,181 |
Is there a way to customize the default progress bar (circular, not horizontal), with out using drawable resources? | <p>I am just wondering if there is a simple way to customize the default circular progress bar provided in android.</p>
<p>Let me clarify the question.</p>
<p>I just want a circular shape showing some dynamism representing progress (network connection) as shown on many apps, below the text displaying my application n... | 2 | 1,055 |
Error in custom provider, java.lang.IllegalArgumentException: java.lang.ClassCastException | <p>I am writing a play 2.0 application using jcloud. </p>
<p>This is the first time I am using "play dist" to run my application. </p>
<p>Everything is working well when I use "play run" or "play start" and even "play stage" but when I run "play dist" and then "dist/start" I get the error pasted below (had to remove ... | 2 | 10,176 |
Test Doctrine ODM respository with phpunit in Symfony2 | <p>I want to test this simple query:</p>
<pre><code>public function findArticlesByUsers($ids) {
$qb = $this->createQueryBuilder();
$qb
->addOr($qb->expr()->field('creator.id')->in($ids))
->addOr($qb->expr()->field('modifier.id')->in($ids))
->ad... | 2 | 2,497 |
How to verify a webhook with Ruby? (In Rails) | <p>I'm looking to learn how to verify a <a href="https://paddle.com/docs/reference-verifying-webhooks/#!" rel="nofollow noreferrer">Paddle</a> webhook with Ruby? <a href="https://paddle.com/docs/reference-verifying-webhooks/#!" rel="nofollow noreferrer">Their example has an option on how to do it with PHP, Python and J... | 2 | 2,089 |
SOAP with Node.js & arguments spreading | <p>I have to consume a SOAP API which is basically designed for PHP and has always been user with a PHP client. Problem is, I work with Node.js, and I encounter an issue I cannot handle.
Here is a part of "could-be-working" code :</p>
<pre><code><?php
try {
$client = new SoapClient(null, array(
'locatio... | 2 | 1,130 |
Cannot use libclang with Qt | <p>I encountered a strange bug when I tried to use libclang in a Qt application.</p>
<p><strong>test.cpp</strong></p>
<pre><code>#include <QApplication>
#include <QMainWindow>
#include <clang-c/Index.h>
int main (int argc, char *argv[]) {
QApplication a(argc, argv);
QMainWindow w;
w.s... | 2 | 1,109 |
How to connect outlook IMAP server go through proxy server uisng perl | <p>I want to connect IMAP server but i am not able to connect directly imap server that's why i used proxy but still i am not able to connect and read emails.
Following is my code,</p>
<pre><code>#!/usr/intel/bin/perl
use strict;
use warnings;
# fill in your details here
my $username = 'username@companyname.com';
my ... | 2 | 1,165 |
How to store value in hyperlink link selected row in gridview asp.net C#? | <p>I have a gridview.I have a hyperlink field and I want that when I click on hyperlink field, then row value is store in session and page redirect to other page. How can I do this?</p>
<p>Here is my aspx markup:</p>
<pre><code><asp:GridView ID="GridView1" runat="server" Height="36px"
style="margin-left: 270p... | 2 | 1,321 |
Cognito custom-message triggered lambda returns InvalidLambdaResponseException | <p>I've created a lambda and assigned it to cognito throw the UI as its custom-message lambda.
Here is the code in typescript: </p>
<pre><code>export const handler = async (event) => {
const trigger = event.triggerSource
const customMessage = cloneDeep(customMessages[trigger])
if (customMessage) {
... | 2 | 1,073 |
Android Thread Allocation - growing heap? | <p>Hi everyone out there,</p>
<p>i am developing an android application against API 7 at the moment in which i use an activity which need to be restarted. Lets say my activity looks like this:</p>
<pre><code>public class AllocActivity extends Activity implements OnClickListener{
Button but;
private Handler h... | 2 | 1,172 |
Open a file.txt and find the possible start and end positions of its genes | <p>Hi I have a file and I would like to open it and find the start and end positions of its genes,also I have some extra imformations.The beginning of each gene is mapped by the following pattern. There is an 8 letter consensus known as the Shine-Dalgarno sequence (TAAGGAGG) followed by 4-10 bases downstream before the... | 2 | 1,346 |
Custom button with drawable, like facebook | <p>I have been all morning trying to do an custom shape like as facebook button like this:</p>
<p><img src="https://i.stack.imgur.com/RHST9.png" alt="Facebook Login Button"></p>
<p>But I'm trying to do it customizable, so in the future I could change the icon for example, but I'm going crazy.</p>
<p>How I can make a... | 2 | 1,309 |
knockout.js doesn't work in chrome but works fine firefox | <pre><code> $(function(){
$("#herb_pinyin").autocomplete({source: "api_herbs.php"});
$.extend(bindings, {
ingredients: ko.observableArray(),
newIngredient: {
pinyin: ko.observable(""),
dosage: ko.observable(""),
dosageType: ko.o... | 2 | 1,241 |
Console Exception and converting fatal errors into exception with ExceptionHandler | <p>my goal is to save exceptions and errors that occured during a console command.</p>
<p>I'm using console.exception native symfony event, registered as follow :</p>
<pre><code>kernel.listener.console:
class: Evo\CronBundle\EventListener\ConsoleListener
arguments: [@doctrine.orm.entity_manager]
... | 2 | 1,618 |
TypeError: 'float' object is not subscriptable in 3d array | <p>guys I'm trying to write a function which get a 3-D array and check how many of its cells are empty.
but i will got the following error</p>
<pre><code>in checkpoint
if m[i][j][0] == 0:
TypeError: 'float' object is not subscriptable
</code></pre>
<p>my function is as following</p>
<pre><code>def checkpoint(m, i, ... | 2 | 2,013 |
Building an android library project with jar dependencies | <p>I have been struggling with a problem for a few days now and I am at a loss for how to fix this. I am working with an Android Library project that is being compiled using the Android tool as provided by the android sdk. Inside the project, I follow the standard structure of an an android project (where my jar files ... | 2 | 1,066 |
Maven/GAE - Missing some Datanucleus classes | <p>I have been struggling for hours trying to figure the good pom.xml out for my already existing GAE/J project.</p>
<p>Here is the "most working" version of my pom.xml (and it's probably terribly messy):</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"... | 2 | 10,025 |
Is there a maximum Time Stamp Validity Duration when a client is set to a future datetime vs the server | <p>We set our Security on our custom Binding as below:</p>
<pre><code>var lSecurity = lCustomBinding.Elements.Find<TransportSecurityBindingElement>();
lSecurity.LocalClientSettings.DetectReplays = false;
lSecurity.LocalServiceSettings.DetectReplays = false;
lSecuri... | 2 | 1,755 |
Ext JS 4: Getters and setters in view | <p>I've been thinking about this problem for a while, and I can't seem to come up with a reasonable solution. What I would like to do is create getters/setters for a textfield/its value in my view. I realize that the preferred Ext JS way is using a reference within the controller and getting it that way, but that doesn... | 2 | 1,865 |
android:layout_centerInParent / RelativeLayout | <p>i have 3 layers, all of them are RelativeLayouts or based on it:</p>
<ol>
<li><p>content-class</p></li>
<li><p>overlay-class</p></li>
<li><p>infobox-layout</p></li>
</ol>
<p>In my code i generate an Overlay-object which inflates a infobox-layout. And then i add the Overlayer to the Content-Layer.
My goal is to cen... | 2 | 1,351 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.