title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
QScrollArea with FlowLayout widgets not resizing properly
<p>I want to create a widget similar to the KDE (or Gnome or MacOS) system settings (e.g., like this picture)</p> <p><img src="https://i.imgur.com/UuMe0l8.png" alt=""></p> <p>I already implemented a FlowLayout from the <a href="https://doc.qt.io/qt-5/qtwidgets-layouts-flowlayout-example.html" rel="nofollow noreferrer...
2
2,909
Cannot find static directory in Django app
<p>I am a bit of a novice when it comes to Django and Google App Engine, and I've been having trouble setting up project paths in my app settings. Specifically, I'm trying to reference a CSS file for use with a template. My directory structure is as follows:</p> <pre><code>app/ app/ -'__init__'.py ...
2
1,543
How does prototypal inheritance in JavaScript really works?
<p>I’m still not fully understanding the inheritance dychotomy (prototypal vs. classical) in JavaScript.</p> <p>If the <code>class</code> is just a syntactic sugar over prototypes, how I'm supposed to de-sugar it?</p> <p>May you show me the different approaches in creating React elements with classes and prototypes (...
2
1,223
How do I make a query to Google Places API?
<p>I'm trying to make a client-side jquery request on an HTML page (in my Spring project) to the Google Places API so I can determine the ratings of a particular business type within a radius of x,y. At the moment I'm trying to do it like so: </p> <pre><code> function getCafe(){ $(document).ready(function(){ ...
2
2,341
Vertical Bar Chart - HTML and CSS
<p>I am trying to do a vertical bar chart like this <img src="https://i.stack.imgur.com/ixwjv.jpg" alt="Vertical bar chart" /></p> <p>But I am getting like this</p> <p><img src="https://i.stack.imgur.com/RR5Dw.png" alt="My vertical bar chart" /></p> <p>At bottom of my vertical bar chart, both lines are attached togethe...
2
2,476
Android application crashes randomly after using JNI
<p>I have an application which uses a C library through JNI bindings. The same C library is used on iOS without any issues, and it was used for around 2 years already.</p> <p>I've tried implementing the same library on Android, and in general, everything works as expected, but the app crashes randomly after calling t...
2
9,642
ScrollView can host only one direct child - android
<p>i want to add ScrollView into my layout as below :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="vertical" android:fad...
2
8,486
How to write unit test for structural directive prefixed with an asterisk * in Angular
<p>I'm creating Angular examples project and also adding unit tests for it. Started adding examples with directives and after adding structural directive with simple creation test other directive tests started to fail with message which isn't clear enought what has to be fixed:</p> <pre><code>`Failed: Template parse e...
2
1,413
Letter Guessing Game in C
<p>The error I got was that the number of game wasn't shown correctly. For example, I chose to play 2 games. I, then, tried to guess the first number correctly. The solution was shown and then jumped to the next game. However, the second game was shown as Game 3 instead of Game 2. I tried again. This time, I guessed ...
2
1,738
How to sort nested JSON field in sequelize
<p>I'm trying to order <code>TabsTemplate</code> model based on the <code>sequence</code> field however, ordering is not working.</p> <p><strong>Routes</strong></p> <pre><code>/* Get Manufacturer Tabs List */ router.get('/', function(req, res) { var manufacturer_id = req.params.manufacturer_id; models.Manufacture...
2
1,852
Widget preview is using wrong size family
<p>I have a widget view looking like this:</p> <pre><code>struct WidgetEntryView: View { var entry: Provider.Entry @Environment(\.widgetFamily) var family var body: some View { switch family { case .systemSmall: ZStack { VStack(spacing: 12) { ...
2
1,261
ListView does not scroll
<p>I have some XAML code, and my problem is that the Listview height does not stay within the bounds of the Grid row but rather, grows with the amount of ListViewItem's added. This prevents the list from scrolling.</p> <p>How can I prevent this?</p> <p>Here is some reproduced xaml code:</p> <pre><code>&lt;Grid Back...
2
2,068
How to serialize empty ImageField to JsonResponse?
<p>I have a model:</p> <pre><code>class Item(models.Model): title = models.TextField(verbose_name='Title', default='Default title') photo = models.ImageField(verbose_name='Photo',upload_to='media/',blank=True) def __str__(self): return self.title </code></pre> <p>I am trying to serialize this mod...
2
1,129
Vuetable return to page 1 after I have clicked page 5 and updated one of the content then click back
<p>First, I clicked page 5 then clicked edit on one of item. Second, I clicked updated and clicked back to previous page which has vuetable. Then the vuetable pagination return back to page 1.</p> <p>Is there any solution to prevent the page number go back to 1? </p> <p>I have tried "query-params" but doesn't seem to...
2
7,042
Android: Cocos2d -x crash on sound
<p>My game is using Cocos2d-x. When a sound plays, the game crashes randomly on Samsung Galaxy SII, other devices run perfectly. Only a native dump is in the LogCat:</p> <pre><code>09-27 13:01:32.615: INFO/DEBUG(26994): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 09-27 13:01:32.615: INFO/DEBUG(2699...
2
3,369
Why routes are not added $router.addRoutes?
<p>Why routes are not added $ router.addRoutes? I tried everything I can not</p> <pre><code>async loadMenu() { try{ let res = await this.$http.get('/menu') this.menuItems = res.data res.data.forEach((e) =&gt; { this.$router.addRoutes([ { ...
2
1,032
Get HTML String From Webpage in Bukkit Plugin
<p>I'm trying to create a plugin for minecraft bukkit servers. The goal is to read the string on the first line of an html page. If the result is True it will execute a command.</p> <p>Here is the code I have right now:</p> <pre><code>import java.net.URLConnection; import java.util.Scanner; import java.util.logging.L...
2
1,294
Error: Each row of output must be identified by a unique combination of keys. Keys are shared for 2 rows: when using Unnest_token and spread
<p>This is the data frame I'm working with</p> <pre><code># A tibble: 268 x 5 Horodateur Gender Age Time Social &lt;dttm&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; 1 2021-04-23 09:59:16 Male [18,24[ 1-5 ...
2
1,766
Which is the most efficient way to iterate a directory?
<p>Say I have a directory foo, with some number of subdirectories. Each of these subdirectories has between 0 and 5 files of variable length which I would like to process. My initial code looks like so:</p> <pre><code> pool.query(` SET SEARCH_PATH TO public,os_local; `).then(() =&gt; fs.readdirSync(srcpat...
2
1,774
HDFS write failed org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.protocol.RecoveryInProgressException): Failed to close file
<p>I am trying to write a file in HDFS. Below is my sample code</p> <pre><code>URI uri = URI.create(sURI); System.setProperty(HADOOP_USER_NAME, grailsApplication.config.hadoop.user.name); Configuration conf = new Configuration(); conf.set(FS_DEFAULT_NAME, grailsApplication.config.fs...
2
1,057
Django celery daemon gives 'supervisor FATAL can't find command', but path is correct
<p><strong>Overview:</strong></p> <p>I'm trying to run celery as a daemon for tasks to send emails. It worked fine in development, but not in production. I have my website up now, and every function works fine (no django errors), but the tasks aren't going through because the daemon isn't set up properly, and I get thi...
2
2,422
libvlc "VLC is unable to open the MRL 'C:\Users\Public\Videos\Sample Videos\Wildlife.mwv'"
<p>I am writing a PySide Python application that interfaces with VLC. Works just fine running on Ubuntu, but when I move to Windows, I can't even get VLC to open a video file.</p> <p>I trimmed the VideoLAN PyQt example (<a href="http://git.videolan.org/?p=vlc/bindings/python.git;a=blob;f=examples/qtvlc.py;h=34aeedce11...
2
1,105
Table view reload from segmented control
<p>A few additional points to clarify the question below:</p> <p>All this happens in a single view controller which does core data as well as the main tableview access. I have done a little more digging (just as I am really not sure what loads when in an iOS app) and now know a little more. The reload call is actually...
2
1,281
Getting the StackTrace from original uncaughtException
<p>I'm trying to get the AndroidRuntime Exception StackTrace same as Logcat. However, when I Override the uncaughtException of UncaughtExceptionHandler, it gives me a different StackTrace other than the LogCat one. Here is my code: </p> <pre><code>private Thread.UncaughtExceptionHandler aovUncaughtExceptionHandler = ...
2
1,349
Tomcat Manager: Cannot Upload Large WAR file
<p>I am getting an exception while I try to deploy my app using Tomcat manager. The manager fails to upload the file. The size of my war file is 85 MB. But for small war files, the manager works fine. I tried with a "Hello World" application (size 5 KB), and it worked fine. I have increased max-file-size in manager's w...
2
1,873
Drag and Drop Game using AS3
<pre><code>import flash.events.MouseEvent; import flash.utils.Timer; import flash.events.TimerEvent; var wordArray:Array = [mc_clipA, mc_clipB]; var imgArray:Array = [Aimg, Bimg]; var posArray:Array = [ {x:816.15, y:396.05}, {x:518.3, y:410.05}]; var ClipA:MovieClip; var ClipB:MovieClip; var startXpositionClipA:Numb...
2
1,919
deno error: TS2345 [ERROR]: Argument of type
<p>I am having issue with this error Ts2345 while using docker run. any suggestions please?</p> <p>error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'. Object literal may on...
2
2,272
Merge XML documents into empty XML node?
<p><strong>EDIT</strong>: This isn't quite the same as the posted that was linked. The main problem I was running into was appending child nodes to an empty XML node. When selecting the node directly, it would return a <code>System.String</code> type, which doesn't have the <code>AppendChild</code> method. The fix was ...
2
3,291
Too Many Connections Error on RDS MySql via EC2 Jenkins
<p>I'm getting a too many connections error when accessing my AWS RDS MySql through my EC2 Jenkins server on when doing maven clean install (when running the tests), This doesn't happen when i run it locally, also accessing RDS.</p> <p>I tried increasing the Max_Connections in the RDS configuration to no avail.</p> <...
2
8,021
EXC_BAD_ACCESS on presentViewController:animated:completion
<p>I have been trying to solve this for the past two days. Unable to understand why my app crashes.</p> <p>I'm using <code>JASidePanel</code> library to achieve panel effect in my app. The left side panel is a tableview which acts like navigation guide for the centre panel. In one scenario, when a particular option is...
2
1,770
Overlay on Responsive Image for horizontal Image
<p>I am trying to create an overlay for responsive images in a horizontal gallery. The overlay <code>div</code> in the <code>li</code> has <code>position</code> and a large <code>z-index</code> value but still displays on background of the image. When I try to do <code>absolute</code> for an image with higher <code>z-i...
2
1,803
Entity Framework 4 association with non-key columns/fields and different columns/field names
<p>I'm building a new service with EF4 that connects to a legacy DB (that cannot be modified). </p> <p>(This BD seems to have been built by a DB genius as you'll see... dirty job, I know, but I have to do it)</p> <p>Basically, I have two tables (<strong>SegurosPassageiros</strong> and <strong>LocsPassageiros</strong>...
2
1,405
How to pass a claim in a cookie in ASP.NET Identity?
<p>I am trying to save a <code>Guid</code> value in a cookie. The way I want to save it is by setting a <code>Claim</code> for the user and getting it back in every controller for validation purposes.</p> <p><strong>Before going on the subject I have seen this question <a href="https://stackoverflow.com/questions/2038...
2
3,062
CompoundJS: Populating database with seed file hangs
<p>I'm trying to populate my CompoundJS application's Mongo database with seed files, but whenever I run <code>compound seed</code>, the terminal hangs after my console.log statements... the database fills, but I have to kill the command with Ctrl-c.</p> <p>I've tried doing <code>compound seed harvest</code>, but that...
2
1,051
Speed up range test for key values nested in jsonb array of objects
<p>Suppose I have the following <code>parents</code> table: </p> <pre class="lang-sql prettyprint-override"><code>create table parents ( id integer not null constraint parents_pkey primary key, name text not null, children jsonb not null ); </code></pre> <p>Where <code>children</code> is a <stron...
2
1,062
scrollViewDidEndZooming not called while zooming in a UIScrollView
<p>This could possibly be an Xcode bug? I have an <code>UIImage</code> inside a <code>UIScrollView</code> done programatically in code. The user can zoom into the image using the zoom gesture or double tapping the image. This part all works fine.</p> <p>Next, I am trying to detect when the scroll view has finished zoo...
2
1,467
AngularJS: input type=number" parse ngModel string value to number and back
<p>I am pretty new to angularJs. My problem is:</p> <p>My model data are kept in a database and if a project is reopened the data is displayed. With save the data are stored again in the database. I have a problem with displaying the number with since the value is stored as a string and must be parsed to an integer.<...
2
1,288
can't download cookie protected file with python
<p>All day long I'm looking to solve this. There is this <a href="http://www.some.site/index.php" rel="nofollow">http://www.some.site/index.php</a> that is requesting user and password + sends cookie. Alright, I get in like this: </p> <pre><code>import urllib, urllib2, cookielib, os import re # not required here but ...
2
2,026
How to implement a RecyclerView when using Model View Presenter pattern?
<p>I am working with MVP for the first time and I believe I get the idea of it but I am not sure about the RecyclerView. As far as I can say, MVP is about making views as passive as possible so all business logic goes to the Presenter but how can this be achieved for the Recycler View?</p> <p>Here is my code so far: <...
2
1,184
Running nvprof --metrics command under windows gives an error:cuda profiling error
<p>Running nvprof --metrics command under windows gives an error:</p> <pre><code>==6580== NVPROF is profiling process 6580, command: Project1.exe ==6580== Error: Internal profiling error 4292:1. ======== Error: CUDA profiling error. </code></pre> <p><a href="https://i.stack.imgur.com/KTAoy.png" rel="nofollow noreferr...
2
1,552
Python/Scikit-learn - How to actually predict?
<p>I have the following DataFrame, which I call main_frame:</p> <pre><code> Value Value 1lag 2lag 3lag 4lag Date 2005-04-01 0.824427 0.892308 1.000000 0.000000 0.000000 0.000000 2005-05-01 0.778626 0....
2
1,222
Node.js can't recognise any variables in .env
<p>I am following the fullstackopen.com course and I seem to have an issue with my .env file, currently when I try to connect to the database I get this error:</p> <pre><code>error connecting to MongoDB The `uri` parameter to `openUri()` must be a string, got &quot;undefined&quot;. Make sure the first parameter to `m...
2
1,597
POST action - no parameters
<p>I have a problem. I want to do a post action and I'm doing it like this:</p> <pre><code>string post_data = string.Format("taskId={0}&amp;inputId={1}&amp;value={2}", taskId, inputId, "101"); string uri = "http://localhost:60837/Default.aspx"; // Create a request using a URL that can receive a post. WebRequ...
2
1,291
Grunt fails trying to load an empty module
<p>I'm a bit stuck with my Jenkins setup on OSX Lion 10.7.3.</p> <p>I'm using Grunt in my webapp to run Jasmine tests, build less, create cache manifest etc. Everything works on my laptop Lion 10.7.5, but on the server box grunt fails from time to time with the following error:</p> <pre><code>$ grunt less module.js:...
2
1,968
Trying to space items in a ListView while using adapter and drawable. Margin is not working
<p>I am trying to have a listview where items have rounded corners and the items are spaced out from each other. This is done using a custom ArrayAdapter. </p> <pre><code>MyCustomAdapter arrAdapter = new MyCustomAdapter(); setListAdapter(arrAdapter); </code></pre> <p>I am using a drawable image to round the corners</...
2
1,709
Gradle: Why is the sourceSets.main.output available but other ones not?
<p>Ok I am using gradle to compile 4 sourceSets one is main and the other 3 are other small pieces of code being loaded by reflection based on the other classes available later in the "server".</p> <p>so far this works</p> <pre><code> configurations { extralibs worldguard5 w...
2
1,661
Get the checked value of radio buttons in a panel within a group box
<p>We're doing a project at school and in my program we have two radio buttons(yes/no) that's within a panel and those panels are within a groupbox. How can I get the values from the different radio buttons then? I'm just looking at getting a True/False value. It's like a simplified list of several health issues a user...
2
1,527
glfw + glew : unresolved external symbol with older functions
<p>I have some issues with glfw3 and glew.</p> <p>Here is the code : </p> <pre><code>#pragma comment(lib, "glew32.lib") #pragma comment(lib, "glfw3dll.lib") #include &lt;iostream&gt; #include "GLEW\glew.h" #include "GLFW\glfw3.h" void error_callback(int error, const char* description) { std::cerr &lt;&lt; desc...
2
1,029
Different results when using the LayoutInflator's inflate methods
<p>I want to know how the <code>LayoutParams</code> will work on <code>LayoutInflator</code>. And what is difference between:</p> <pre><code>LinearLayout childLayout=(LinearLayout)inflater.inflate(R.layout.childitemlayout, null); //FIRST WAY LinearLayout childLayout=(LinearLayout)inflater.inflate(R.layout.childitemlay...
2
1,074
Selenium test not failing correctly - Pass with configuration fail rather than "proper" fail
<p>Hi I'm still newbie to Selenium/Scripting/Java and I'me still at the stage of hacking together code from elsewhere to get stuff work( tutorials and recorders mainly)</p> <p>Anyway Im trying to write a script to check a particular 'element' is present (I will want to the the reverse as well) I can get the script to ...
2
1,622
AngularJS post to Jersey generates com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator$8 resolve SEVERE: null
<p>I have a jersey server. When I attempt to handle a POST from AngularJS (1.2.16), it is generating an error (below). When I use a java jersey client to post the message, the jersey server handles it fine.</p> <p>SEVERE: null java.lang.IllegalAccessException: Class com.sun.jersey.server.wadl.generators.WadlGenerato...
2
1,226
How to convert Instagram API in JSON to XML with PHP?
<p>I'm currently working to convert JSON from instagram API to XML so i can fit it into my web. Example of API URI: <a href="https://api.instagram.com/v1/users/3/media/recent/?access_token=180213154.5d9f31c.67ff117fa05643aab53e209dec05eb01&amp;count=1" rel="nofollow">https://api.instagram.com/v1/users/3/media/recent/?a...
2
2,401
What is the logic in spring to choose constructor when ambiguity constructors prasents
<p>First i need to tell <strong>I know how to solve this problem using type and index in Spring config file. but i want to learn how spring chose constructor when ambiguity constructors are presents</strong>.</p> <p>Pojo Class</p> <pre><code>package a.b.c; public class Square { private String color; private...
2
1,183
Calculate angle based on x, y position
<p>I am trying to calculate the angle for an arrow on a ball, based on the position where it is going to. The arrow moves, but in a total unexplainable direction, can anybody give some pointers?</p> <p>Codepen available: <a href="https://codepen.io/rayio/pen/LYYjGON" rel="nofollow noreferrer">Codepen</a></p> <p>I add...
2
1,026
Why the data write by poi in excel file was missing after I write this file again?
<p>I write a method "writeData" to write a column data from an existing excel file into a new excel file by apache poi. It works well. But when I try to call this method again, the previous data was missing. Why? Does anybody can help me?</p> <pre><code>public class ReadData { /** * @param args */ W...
2
1,124
Image in gallery is saved with wrong orientation
<p><br> To take a photo I'm using the camera installed on the device. The photo is saved inside the gallery but is <strong>always saved horizontally</strong>. <br> How do I fix it? <br></p> <p><strong>This is the intent when click on the button "add photo":</strong></p> <pre><code> private void dispatchTakePictureInt...
2
1,096
Svelte: Replace nested component by changing binded variable
<p>I am writing <strong>Svelte</strong> project, where I have <strong>Message</strong> component which represents some js object. </p> <p>There is ability to edit this object. For this purpose I desided to use two nested component <strong>MessageEditable</strong> and <strong>MessageReadable</strong>.</p> <p>They shou...
2
1,180
istream for a struct with a vector member
<p>Its not very clear to me how istream works from standard input (i.g. cin>> from keyboard) for a structure that has a vector member. I have a simple struct with double, string and vector members. I want to read structs from cin, and printing them with cout. I overload the &lt;&lt; and >> operators and here is my co...
2
1,292
How to force span's background color to be 100% width?
<p>I'm trying to force a span element background to be the full width of parent. <br> <br> <strong>Heads Up</strong><br> Yes… I'm fully aware of doing divs…<br></p> <blockquote> <p>(but divs are more of a hack rather than an actual solution to the problem)<br></p> </blockquote> <p>Must be something similar to a spa...
2
1,093
Which method to use when bulk-inserting data that needs to be transformed (Performance)
<p>I have been dealt the task of importing data from a file into an SQL Server database table daily. I researched different methods on doing bulk inserts and my idea was to use the <code>bcp</code> utility from the command line, by running a scheduled task daily. </p> <p>My biggest problem is I don't know how to or if...
2
1,096
Why is insertion into my tree faster on sorted input than random input?
<p>Now I've always heard binary search trees are faster to build from randomly selected data than ordered data, simply because ordered data requires explicit rebalancing to keep the tree height at a minimum.</p> <p>Recently I implemented an immutable <a href="http://en.wikipedia.org/wiki/Treap" rel="noreferrer">treap<...
2
2,529
CircleCI deploy looks successful, but exits with code 1?
<p>I have a circleci configuration that runs a script to deploy a storybook site. It's essentially <code>cd</code>ing into my frontend monorepo packages, running <code>yarn install</code>, builds the storybook and syncs it to an S3 bucket.</p> <p><em>(redacting a few things like names of packages and files)</em></p> <p...
2
1,249
How to trigger an EventKit alarm with Coordinates in Swift
<p>I don't know about anyone else, but EventKit seems to have very little in terms resources and tutorials online for you to refer to for help. </p> <p>I need to trigger an alarm when a user hits a radius of a set of coordinates, I wasn't sure of the best ay to do this, I was torn between local notifications, and Even...
2
1,603
Kafka listener error : 2 partitions have leader brokers without a matching listener
<p>I've deployed the confluent platform with 2 workers, 3 brokers, and 3 zookeepers on my AWS server. When I start Kafka I get the following error continuously :</p> <pre><code>[2019-07-16 12:47:25,126] WARN [Consumer clientId=consumer-4, groupId=connect-jdbc-mysql-sink-connector] 2 partitions have leader brokers wit...
2
1,025
error at setContentView - android.view.InflateException
<p>I have a splash screen which shows a image for 2 sec. The image is a PNG image. When I start my APP sometimes it crashes with the following error messages. The exact line where my app crashes is setContentView(R.layout.splash);</p> <p>key error lines : I could see there is some error with reference to java.lang.Out...
2
2,717
Flutter. Grouped list by a field which is a list
<p>I have a list of items with field groups. Groups is also list. I want to display this list of that items grouped by groups. The item can be the part of two or more group.</p> <pre><code>List&lt;Product&gt; _items = [ Product( id: '1', title: 'Apple and more more thing', description: 'Some data to...
2
1,066
Check if actor system has finished its work
<p>I have written an Akka-based automaton which can accept roman numbers from 1 to 20. The automaton works fine, but after handling the complete input I want to shutdown the system.</p> <p>Because I do not know when the automaton finishes I do not know when to send the stop signal. This results in the problem, that th...
2
1,249
gmaps4rails - Drop a marker and update fields attribute in a form
<p>I'm trying to implement this, from the gem wiki <a href="https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Javascript-goodies" rel="nofollow">https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Javascript-goodies</a></p> <pre><code>&lt;% content_for :scripts do %&gt; &lt;script type="text/javascri...
2
1,240
'Failed to find fragment for React Root View' React Native Android RNScreens
<p>I had to rebuild my gradle for android, and now I'm getting an error with RNScreens.</p> <p><code>Failed to find fragment for React Root View</code> shows in the app.</p> <p>Here is logcat:</p> <pre><code>2022-08-20 22:54:02.259 9195-9241/com.testApp.testApp E/WM-WorkerWrapper: Work [ id=b68c8532-e3ae-455d-9d84-a0a8...
2
2,293
Unresolved reference: kotlinx - Kotlin 1-0-0-rc-1036
<p>I'm working in an Android App and a few days ago I updated my Kotlin version from <strong>1.0.0-beta-1103</strong> to the release candidate <strong>1.0.0-rc-1036</strong> and now I can't run my app for something related to Kotlin Android Extensions.</p> <p>I use the <code>apply plugin: 'kotlin-android-extensions'</c...
2
1,336
Does "find" in Cypress wait for GraphQL requests to finish?
<p>I am learning to write tests for a MERNQ stack application and I am using cypress as my End to End testing tool. I am trying to make sure that my tests are written correctly so that they work as a long term solution. For now I just have one request for the route in question and I have the following test code:</p> <...
2
1,112
how to solve "Handling error: InvalidGrantException, Bad credentials"
<p>I want to work with OAuth2. but I have problem. I can't access token. this is my code</p> <p>model.entity.user:</p> <pre><code>package com.example.oauth2.model.entity; import javax.persistence.*; import java.util.List; @Entity(name = "users") @Table(name = "USERS") public class User { @Id @GeneratedVal...
2
4,067
Moving objects from one class to another (Java)
<p>just wondering how I would go about creating a playlist of song objects (song1, song2, song3, song4) where each object has it's own values (name, artist, filesize, duration). I am not able to use arrays/lists for this program. Just look at the <code>getSong()</code> and <code>addSongToPlaylist()</code> methods below...
2
1,325
Closing pipe does not interrupt read() in child process spawned from thread
<p>In a Linux application I'm spawning multiple programs via <code>fork</code>/<code>execvp</code> and redirect the standard IO streams to a pipe for IPC. I spawn a child process, write some data into the child stdin pipe, close stdin, and then read the child response from the stdout pipe. This worked fine, until I've ...
2
2,031
Asterisk - One way audio with PJSIP over PRI
<p><br /> I'm having a problem using PJSIP, callee hears me but I got absolute silence on my side..<br /> Few pointers:<br /> 1) Chan_SIP works perfectly.<br /> 2) PBX and phones are on the same network (no NAT).<br /> 3) The problem occurs only on outgoing calls over PRI (no problem when using IAX2 trunk).<br /> 4) Th...
2
6,982
Cannot access ActivityCompatApi23 - Kotlin - AndroidX - Dagger 2.17
<p><strong>Short error log</strong>: </p> <pre><code>&gt; :presentation:transformDataBindingWithDataBindingMergeArtifactsForDebug &gt; e: E:\MVVM\presentation\build\tmp\kapt3\stubs\debug\com\example\mvvm\ui\base\BaseActivity.java:9: error: cannot access ActivityCompatApi23 public abstract class BaseActivity extends d...
2
5,086
ARKit image recognized black and white
<p>I have a problem with recognizing an image. As you can see from the video that I have attached, frame the desired picture and gives me the image in black and white.</p> <p>This is the code I am using, my aim is to recognize the image of a particular painting and to see it in colors in AR.</p> <p>PS: the image for ...
2
4,615
Why does TreeStore.sync() not write to database?
<p>I've been assigned a task to extent and modify a Shopware plugin. The original author isn't in the company anymore. Before that I've never dealt with Shopware and ExtJs. So I spend the last couple of days getting myself into it and I think I understood the principles and paradigm so far.</p> <p>The only thing I'm h...
2
4,456
react render method is called Twice, changing url
<p>I am newbie in react. I read <a href="https://stackoverflow.com/questions/27628504/react-js-componentwillreceiveprops-being-hit-twice">this question</a> , but didn't solve my problem. I think I'm wrong with componentWillReceiveProps comprehension . My component and it's parent are like this: the parent:</p> <pre><c...
2
1,118
How to add RBAC roles to a Controller for a different kind of resource in Kubebuilder
<p>I am creating a new Operator with Kubebuilder to deploy a Kubernetes controller to manage a new CRD Custom Resource Definition.</p> <p>This new CRD (let's say is called <code>MyNewResource</code>), needs to list/create/delete CronJobs.</p> <p>So in the Controller Go code where the <code>Reconcile(...)</code> method ...
2
1,039
Trigger code or date format error in SQL Server 2008 R2
<p>I am using a capturing software, Abbyy FlexiCapture, after user done the verification (some sort of user key in data). It will export captured data into SQL Server 2008 R2 </p> <p>Once SQL Server identify there is an <strong>inserted data</strong> (new row), it will <strong>trigger</strong> code to <strong>update</...
2
1,935
Namespace is applied to child elements
<p>I have the following input(excluding full file for brevity):</p> <p><b>input.xml</b></p> <pre><code>&lt;Request&gt; &lt;EFS&gt; &lt;child1&gt; &lt;!-- children --&gt; &lt;/child1&gt; &lt;child2&gt; &lt;/child2&gt; &lt;!-- more children etc--&gt; &lt;/EFS&gt;...
2
1,965
XPath in MSBuild (SDC) and WIX
<p>Fresh Asking of this Question-></p> <p>I have a WIX file that I need to modify using MSBuild. It starts like this:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"&gt; &lt;?--... V...
2
1,043
"NHibernate.ObjectNotFoundException: No row with the given identifier exists" on access to child collection
<p>Little explanation: I have coupon series and coupons linked to the series. Some coupons may ne activated, and they are stored in the separate table. Here are my <em>.hbm.xml</em> files:</p> <pre><code>&lt;class name="AbstractCoupon" abstract="true"&gt; &lt;id name="Id"&gt; &lt;generator class="assigned" /&gt; &l...
2
2,514
How do I override the value supplied to a field annotated with @EJB?
<p>Suppose I have a class like this:</p> <pre><code>@Stateless @Local({ X.class }) public class XBean implements X { @EJB // name() attribute should by spec default to &quot;foo.XBean/y&quot;, but see below private Y y; // Y is @Local } </code></pre> <p>And elsewhere I have:</p> <pre><code>@Stateless @Local({ Y.cla...
2
1,372
Log4j2, no logs in file
<p>I am trying to configure log4j2 within a maven project without a standard structure, but even though the file is created nothing is appended.</p> <p>I have the following dependencies in the pom.xml </p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;org.slf4j&lt;/groupId&gt; &lt;artifactId&gt;slf...
2
1,362
Rails: unknown attribute
<p>This used to work when I had rails 3.0.8. After hearing about some security issues with ActiveRecord I decided to update everything and this got broken. Let me know if you need anymore info.</p> <p>error:</p> <pre><code>unknown attribute: gene_family_id </code></pre> <p>app/views/gene_families/show.html.erb</p> ...
2
5,510
Can't insert Symbols like '€' in MySQL using PHP/PDO
<p>I am trying to insert some data in my database table but I am getting this exception, when I am trying to save the € Euro symbol in the currency column: </p> <pre><code>PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\x80' for column 'currency' at row 1 </code></pre> <p>If I don't use...
2
4,175
FizzBuzz using Methods in Java
<p>I have solved this all inside the main method, however the professor has asked we follow very specific guidelines. Here are the instructions:</p> <blockquote> <ol> <li><p>Create methods with the following signatures (don’t forget <code>static</code>):</p> <ul> <li><code>private static boolean isFizz (int...
2
1,279
Rust tokio: Awaiting an async function in spawned thread
<p>Trying to call an async-function inside a new tokio thread results in an error for some functions.</p> <p>In this minimal example, crates tokio and iota-streams are used. Method send_announce() is async and returns an Address. Awaiting this method results in a compile error, stating that std::Marker::Send trait is n...
2
2,583
Make a payment through PayPal API in ASP.NET Core
<p>I am doing a project in ASP.NET Core. My requirement is, I want to integrate PayPal as the payment gateway. </p> <p>User can see set of items, with <strong>BUY NOW</strong> button, and when a button is clicked, i want to send that item's name and cost to paypal so it will charge the amount from the user.</p> <p>W...
2
2,643
Access java <List> from from jsp / jstl MVC app
<p>I have been finding it difficult to understand where I am going wrong. I understand that we should move with the times but I am not sure how to replace a scriptlet, that I can get to do the job, with the JSTL taglibrary functions.</p> <p>I have a Model class called Ranges.class which contains a rangeName (String) ...
2
2,163
ggplot2: use of scale_x_reverse on ROC plot
<p>I tried to reproduce ROC curve from the <code>plot.roc</code> function from <code>pRoc</code> package with <code>ggplot2</code>. </p> <pre><code>library(mlbench) library(caret) data(Sonar) set.seed(998) fitControl &lt;- trainControl(method = "repeatedcv", number = 10, ...
2
1,159
Update Maven dependencies in IntelliJ Idea
<p>I'm new to the ​​intellij idea.</p> <p>I'm trying to add a dependency (for example) jcl-over-slf4: jar but it is not added, here is an error in the logs.</p> <pre><code>017-12-02 14: 40: 41,903 [6473161] INFO - # org.jetbrains.idea.maven - org.apache.maven.project.ProjectBuildingException: some problems occurred w...
2
1,263
Using ec2_snapshot getting error message "boto required for this module"
<p>I am using Ubuntu Server 16.4 with ansible 2.4 on AWS</p> <p>My playbook is trying to take snapshots of ec2 vol. See below</p> <pre><code>- hosts: localhost connection: local become: yes become_method: sudo gather_facts: yes any_errors_fatal: True - name: Take snapshots of all volume" ec2_snapshot: ...
2
1,936
Creating a ring chart with Highcharts
<p>I'm attempting to create a "ring chart" similar to the ones found <a href="https://www.scribbletone.com/typefaces/ff-chartwell" rel="nofollow noreferrer">here</a> (scroll down to ring charts) with Highcharts using a donut chart. So, if I want to display a data value of 46% of something, it circles around counter-clo...
2
1,505
docker-compose picks the wrong ruby version
<p>When running docker-compose, it seems to pick the wrong ruby program. Using rbenv I have installed version 2.6.2 But there is also a version under /usr/bin that is at 2.6.3. I can't delete that version, also not as sudo. I have already uninstalled rbenv and re-installed it.</p> <p>The strange thing is this:</p> <p...
2
2,412
How to tokenize a code snippet using a Textmate grammar in Node
<p>I'm trying to syntax-highlight code snippets on my library website. I've tried Highlight.js and Prism, but neither of them tokenize the code correctly (it's Ruby), so in the end the code is not syntax-highlighted properly. This is because they both implement their own tokenization regexes, which is an approach that'...
2
1,281
Spring Security and custom Remember me filter: logout issue
<p>I need to define a custom RememberMeAuthenticationFilter so that I can override the <code>onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult)</code> method to put some custom logic.</p> <p>I've configured the XML in order to use my custom filter:</p> <pre...
2
1,724
How to combine two sf objects with the same CRS and non-overlapping area?
<p>Assuming I have two <code>sf</code> objects with the same coordinate reference system and non-overlapping area, how to correctly combine these two <code>sf</code> objects to create one <code>sf</code> objects?</p> <p>Here is an example.</p> <pre><code># Load packages library(tidyverse) library(sf) # Load the exam...
2
1,496