title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Google Cloud StorageException: Anonymous caller does not have storage.objects.create access to the Google Cloud Storage object
<p>I'm trying to upload images to the Google Cloud Storage Client and I get this exception, I've tried searching regarding this but there are no question regarding this issue in android and unable to go forward, here is my code:</p> <p>MainActivity.Java</p> <pre><code>public class MainActivity extends AppCompatActivity...
2
3,362
How To concatenate Two Json object in Asp.Net
<p><a href="https://i.stack.imgur.com/LgEne.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgEne.png" alt="This one is of other"></a><a href="https://i.stack.imgur.com/TdVKn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TdVKn.png" alt="This one is the output"></a><a href="https:...
2
1,268
500 Internal Server Error When I Submit Form
<p>I have one simple form when i click submit form in online we have internal error 500 but after submitting form i have updated data.</p> <p>it is working good locally but submitting form online have the same issue.</p> <p>I added my code here,</p> <pre><code>&lt;form action="purchase.php" method="post"&gt; &lt;...
2
4,602
Why is Android inverting some of my drawables for dark theme (night) but not others?
<p>My app uses the <code>Theme.AppCompat.DayNight.NoActionBar</code> <code>AppTheme</code>, and has a navigation drawer. All my drawables are XML vectors and the paths in them are black. For the uses of these drawables that are in the menu in my sidenav, something somewhere in Android or the SDK has inverted the drawab...
2
1,327
Android; BitmapFactory.decodeFile(file) returns null, file is known to exists
<p>I am attempting to render a photo I have taken with the following class, which returns the used file:</p> <pre><code>public File takePhoto(){ Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); File destination= null; try { destination = createFile(); } catch (IOException err...
2
1,396
How resolve my EXC_BAD_ACCESS (SIGSEGV)
<p>I run my application on iOS 8.2. The application is runing and execute my code well, on one of my tested devices it is crashed. how can i fix it? why it is crash on specific device?</p> <p>I run a zombie test, there is no zombies.</p> <p>Here is my report :</p> <p><strong>The report</strong></p> <pre><code>Incid...
2
4,579
Foreach iteration only returning last value from last loop
<p>I'm trying to grab and count all the replies for each post for example all the replies for a specific post are labeled <code>2</code> under the column <code>level</code> but my foreach loop only grabs the value from the last iteration. For, example lets say I want all the comment replies from <code>post_id</code> <c...
2
2,316
The UVa 3n + 1 in C++ with Dynamic Programming
<p>So, there are ways to do this, and/or optimize this. Stupid that I am, I immediately wants to implement a recursive function, which later caused a segmentation fault, and then I tried to adopt dynamic programming, and it seemed to work, but somehow I got Wrong answer.</p> <p>Problem <a href="http://uva.onlinejudge....
2
1,036
How to merge first 3 columns for rows with same value in PDF
<p>I'm using <code>itextSharp</code> to export a DataTable to a pdf table. I can export the data to a pdf table using the sample code i have posted below. The DataTable contains close to 21 columns.</p> <p>The first column in the pdf (DataTable) might contain similar values for any number of rows. If the data values i...
2
1,454
Unhandled Rejection -SyntaxError- Unexpected end of JSON input
<p>My JSX file returns the API data when accessed from myjson.com; but when I attempt to access the data from the <strong>provided URL</strong> for the API, I get an "Unhandled Rejection -SyntaxError- Unexpected end of JSON input" error. <strong>The provided</strong> URL, when placed into Postman, returns data via GET ...
2
1,249
Laravel relationship is not loading in Resource?
<p>I want to load the relation of order with customer but it is returning <code>null</code> in the postman<br><br> <a href="https://i.stack.imgur.com/YFUb6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YFUb6.png" alt="enter image description here"></a></p> <p><br> <strong><em>Customer Model</em></...
2
2,830
MVP (Model-View-Presenter) in VBA and returning a value
<p>I am trying to implement the MVP pattern in VBA for a winform as I wish to be able to reuse the same code for the model/presenter but be able to change the view (winform) for another one easily. I think I have the basics sorted out, however, as the forms are more like "settings" forms rather than say, "interactive" ...
2
1,528
"None is not a generator" in Python - El Farol algorithm
<p>I'm writing El Farol model from Netlogo in Python. However, I keep receiving this error and I have no idea how to move on:</p> <pre><code>Traceback (most recent call last): File "&lt;ipython-input-444-99b2c0f618f2&gt;", line 3, in &lt;module&gt; village.run() File "&lt;ipython-input-441-cb8708c7230d&gt;", l...
2
2,902
java.lang.IllegalArgumentException: Not a managed type in spring boot app
<p>I am getting following error in my code</p> <blockquote> <p>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'locationServiceImpl': Unsatisfied dependency expressed through method 'setLocationrepo' parameter 0; nested exception is org.springframework.beans.fa...
2
1,511
Submenu Horizontal To Vertical in CSS
<p>My Current Menu navigation bar in html: -</p> <p>You can see my blog Live by click this Link :- <a href="http://www.4time2fun.com" rel="nofollow">www.4time2fun.com</a></p> <pre><code>&lt;div id="topmenu"&gt; &lt;div id="navigation"&gt; &lt;ul class="categories"&gt; &lt;li class="articles"&gt; &lt;a href="#Link"&...
2
1,655
How to remove element from datatable
<p>A simple application that uses Primefaces <a href="http://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml" rel="nofollow">datatables with radio button selection</a> doesn't behave properly. When I choose an element with radio button, the <code>event</code> argument is <code>null</code> in <code>delete...
2
1,503
Sending reply message from python script
<p>I developed a camel application that has capabilities to communicating to external systems via Active MQ broker and at the moment I am putting together a short presentation to show how it works.</p> <p>For that I chose python as the external system as it is free, easy to install and had a bit of exposure in the pas...
2
1,301
Expose abstract type as Q_PROPERTY to QML
<p>I am using Qt 4.8 with BB10. </p> <p>I defined a base interface for classes to implement:</p> <pre><code>class AbstractImageProcessor : public QObject { public: AbstractImageProcessor(QObject * parent) : QObject(parent) {} virtual QImage process(const QByteArray &amp;data) = 0; virtual ~AbstractImagePr...
2
1,147
Use component id in Castle Windsor generic object configuration
<p>2 questions in one, but very much related.</p> <p>Is it possible with Castle Windsor to resolve a configuration entry such as -</p> <p>Assembly.Namespace.Object1`2[[${ComponentId1}],[${ComponentId2}]], Assembly</p> <p>Where ComponentId1 and ComponentId2 are defined as components. Castle Windsor doesn't seem to be...
2
1,951
simple 3d code which throws exception!
<p>I have found a code in the internet but really I don't know that for what it throws these exceptions,please help me !really I need your help thanks.</p> <pre><code>run: java.lang.UnsupportedOperationException: No AudioDevice specified at com.sun.j3d.utils.universe.Viewer.createAudioDevice(Viewer.java:986) ...
2
1,073
PrimeNG stop to open accordion
<p>How I can to force not open an accordion in PrimeNG. I mean in some circumstances I don't wanna that the accordion I selected opens. I tried in this way but it doesn't work</p> <p><a href="https://www.primefaces.org/primeng/showcase/#/accordion" rel="nofollow noreferrer">https://www.primefaces.org/primeng/showcase/...
2
1,064
Adding a new js file to my lambda function using Serverless
<p>I'm trying to create an API on AWS Lambda, and using Serverless framework for deployment.</p> <p>I'm a complete noob at it, so I'm not sure I'm doing the right thing. So here's the old favorite, hello world (index.js):</p> <pre><code>const serverless = require('serverless-http'); const express = require('express')...
2
1,494
Swift updating UITableView with new data
<p>I'm trying to repopulate my <code>UITableView</code> with data from another JSON call.</p> <p>However my current setup doesn't seem to work, and while there are many identical questions on SO the answers I could find I've already tried.</p> <p>I'm saving my API data in <code>CoreData</code> entity objects. And I'm...
2
4,402
Azure pipelines submodules clone failed
<p>I created main project</p> <p><a href="https://dev.azure.com/GilbertHsu/pipeline_test" rel="noreferrer">https://dev.azure.com/GilbertHsu/pipeline_test</a></p> <p>with 3 projects as submodules in the main project</p> <p><a href="https://dev.azure.com/GilbertHsu/otherProjectA" rel="noreferrer">https://dev.azure.com/Gi...
2
1,612
Webpack+SemanticUI+React: process is not defined
<p>I have found numerous posts about the Webpack error:</p> <pre><code>Uncaught ReferenceError: process is not defined </code></pre> <p>most of which suggest adding a plugin to the <code>webpack.config.js</code>:</p> <pre><code>plugins: [ // ... new webpack.DefinePlugin({ 'process.env': { NODE_ENV: ...
2
1,346
SQL View Error - Msg 207, Level 16, State 1, Procedure OrderItems_vw, Line 16 [Batch Start Line 0] Invalid column name 'Brand'
<p>I never work with views so im a bit newb to how they work and the purpose of a view. Anyway, I'm getting an error on a sp. I think its related to my view. Pretty sure the view is broke and need to rebuild it. At least logically that sounds like the issue to me. I don't know and I dont know how to rebuild it if thats...
2
8,048
Send file to the server with Retrofit and WebKitFormBoundary in PartMap
<p>I have a query generated by the postman to send files and some info to my server. It works fine in my program. </p> <pre><code> MediaType mediaType = MediaType.parse("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"); RequestBody body = RequestBody.create(mediaType, "---...
2
1,641
Dynamically bind a knockout component with a cshtml template breaks the viewmodel
<p>I have an issue with knockout components in our SPA, on a certain page I'm trying to implement a component; all observables passed through the <code>params</code> attribute are working as they should. But when I create <code>ko.observable(), ko.computed, ..</code> in the component's viewmodel they just don't work as...
2
1,072
ASP.NET Web Pages Web Service Calls Redirecting to about:blank
<p>I just reformatted my computer and re-installed everything. I enabled IIS, the website I am working on in Visual Studio 2015 is working fine, even with the SQL database. However, none of my web services are returning any data. The web services are all .asmx web services. I tried going to the .asmx page itself and in...
2
1,618
Unable to use a variable within a "sh clause" in a Jenkins pipeline, what could be the reason?
<p>I'm writing a Jenkins pipeline.</p> <p>I'd like to set the GRADLE_USER_HOME variable with the <code>current directory/.gradle</code> and so I'm populating the cwd variable with the <code>pwd()</code> function which is supposed to return the current working directory.</p> <pre><code>stage 'Host preparation' cwd...
2
2,512
How to sum project values in column based on unique project ID?
<p>So to describe my question, I created a simplified dataframe like this:</p> <pre><code>df_test &lt;- data.frame( proj_manager = c('Emma','Emma','Emma','Emma','Emma','Alice','Alice'), proj_ID = c(1, 1, 2, 2, 2, 3, 4), stage = c('B','B','B','B','B','A','C'), value = c(15,15,20,20,20,70,5) ) </code></pre> <p...
2
1,184
How to expose database view in WebAPI Odata V4
<p>I have imported view from database to edmx and added [Key] attribute to model POCO class:</p> <p>namespace TFOMS.Domain.Model</p> <pre><code>{ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; public partial class vw_Tariffs_PR { public int T...
2
1,120
Bouncy Castle works differently on Android and Console program. How to encrypt using public key in PEM file
<p>I am encrypting using Bouncy Castle. I am using RSA and public key is stored in PEM file. I am finding that when I run the code in simple console project (not Android project) everything works fine - meaning the encrypted string can be decrypted using the private key. However, when I run the same code in Android app...
2
1,564
After multiple requests send to the server 500 (Internal Server Error)
<p>I am working on the Django application where I want to create multiple asynchronous requests with ajax to django server. It works fine if there is less than 5 asynchronous requests but if there is more requests django <code>return 500 (Internal Server Error)</code> for some of the requests. If I make synchronous aja...
2
1,092
Set the delay time for each <test> in TestNG
<p><strong>First as info</strong>: I put each <code>@Test</code> in a different class (so of course each class only has 1 <code>@Test</code> annotation).</p> <p>Actually my goal is to want to rerun the same class with different parameter, but I want to run another class first beforehand.</p> <p>I've tried to find many ...
2
2,557
HttpClient GetAsync ThreadPool Starvation
<p>We have a microservice oriented backend stack. All of the microservices built top of <code>Nancy</code> and registered as windows services with <code>topshelf</code>.</p> <p>One of the service, which handles most traffic (~5000 req/s), started to have threadpool starvation problem on 3 out of 8 servers.</p> <p>Thi...
2
1,426
WPF Application slowing down on i5 Processor machine
<p>One of the developed application in WPF is running very slow on i5 process Laptop. UI contains multiple user controls (200+) in nested Items control. Same application is running with good performance in one of the Desktop machine.</p> <p><strong>Below is the detailed configuration of Laptop where its very slow (50 ...
2
4,222
Rspec - uninitialized constant error User
<p>I have written tests on Rspec for my model User and get error while starting 'rspec spec'</p> <p>NameError: uninitialized constant User</p> <p>my test <strong>spec/models/ivd/user_spec.rb</strong></p> <pre><code>require 'rails_helper' module Ivd RSpec.describe User, type: :model do let(:user) { FactoryGirl...
2
2,105
SignalR self host connection issue
<p>I recently created a proof of concept console application using SignalR (self host). It worked a treat for our use. The client connected fine and I was able to send updates from the server to the client. Lovely!</p> <p>I've now transferred the code from the Console application to a winforms application for a pretti...
2
1,266
How to query amount of allocated memory on Linux (and OSX)?
<p>While this might look like a duplicate from other questions, let me explain why it's not.</p> <p>I am looking to get a specific part of my application to degrade gracefully when a certain memory limit has been reached. I could have used criteria based on remaining available physical memory, but this wouldn't be sa...
2
1,847
How to generalize my algorithm to detect if one string is a rotation of another
<p>So I've been going through various problems to review for upcoming interviews and one I encountered is determining whether two strings are rotations of each other. Obviously, I'm hardly the first person to solve this problem. In fact, I did discover that my idea for solving this seems similar to the approach taken i...
2
1,793
FormControl Label is crossed by Outline border in Material UI - ReactJs
<p>I am using Material UI and have provided form validation with react-hook-form. The problem is that in an outline formcontrol, the label is crossed by the outline border.</p> <p>Example: <a href="https://i.stack.imgur.com/ZTEnJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZTEnJ.jpg" alt="enter i...
2
1,913
RelayCommand Params & Binding
<p><strong>View:</strong></p> <p>Playing with a basic calculator using WPF(MVVM). I've 1 TextBox for the first num, 1 TextBox for the second num, 1 TextBlock for the results and 1 Button to execute the AddCommand and return the result. What's the right XAML syntax to bind these controls to the right Data.</p> <p><str...
2
1,419
submit form loaded on the bootstrap popover
<p>I have dynamically created rows, on each rows i have a add button when user click on the add button then dynamically created form will be loaded on the bootstrap propover.<br> <a href="http://jsfiddle.net/aSZ6q/" rel="nofollow noreferrer">FIDDLE DEMO</a></p> <p><strong>my problem is :</strong> </p> <p>why this ...
2
2,291
Tensorflow InvalidArgumentError: indices[40] = 2000 0 is not in [0, 20000)
<p>I was runnig this code (<a href="https://github.com/monkut/tensorflow_chatbot" rel="nofollow noreferrer">https://github.com/monkut/tensorflow_chatbot</a> main code in execute.py) on my Windows7 with python 3.5 and tensorflow r0.12 cpu and an error occured after just 300 steps. Then I tried to change the vocabulary s...
2
2,526
Problem with control template on listbox item
<p>I have own style on listbox item, here is it:</p> <pre><code> &lt;Style x:Key="friendsListStyle" TargetType="{x:Type ListBox}"&gt; &lt;Setter Property="ItemTemplate"&gt; &lt;Setter.Value&gt; &lt;DataTemplate&gt; &lt;Grid Name="RootLayout...
2
6,450
Build failed with "package org.apache.poi.xssf.usermodel does not exist" error in Azure DevOps
<p>As I run my below script to read data from excel functionality locally no issues in the execution.</p> <pre><code>public String getCellDataString(String sheetName, int rowNum, int colNum) throws IOException { File file = new File(System.getProperty(&quot;user.dir&quot;)+&quot;/excel/ExcelWorkBook.xlsx&...
2
1,472
Webpack generates big file
<p>Webpack generates too large a file<br> Webpack 2.x<br> Webpack experts, i now want to connect <code>css</code> in the<code>js</code> file<br> How i include</p> <pre><code>import 'bootstrap/dist/css/bootstrap-theme.min.css'; import 'bootstrap-select/dist/css/bootstrap-select.min.css'; import 'bootstrap-multiselect/d...
2
1,034
Dividing MDLMesh into multiple SCNGeometry
<p>I have an <em>.obj</em> file containing a 3D model, divided into multiple smaller meshes, e.g. a front and a back.<br> My goal is to load this file into a SceneKit View and interact with the different parts of the model, to color them, select them, hide them, or move them individually.</p> <p>I was able to load the...
2
1,375
jquery mobile multipage in separate html files
<p>I have a Jquery Mobile multipage with different pages </p> <pre><code> &lt;title&gt;TEST&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=...
2
2,902
Running Kafka consumer inside Apache ServiceMix
<p>I am trying to create a bundle using camel-kafka, and run it inside servicemix. The module is a very basic kafka consumer which uses camel-kafka connector, and consumes messages from a kafka topic. I am able to successfully run the module using mvn camel:run, however installing the same module inside service mix a...
2
3,413
jQuery imgAreaSelect - issue with image and area selection passed from form
<p>I've just started working the jquery umgareaselect and I think its just what I need, however I have an issue with the image I've uploaded. The upload script is working fine and the image is successfully saved to a folder called 'upload' on the server. I use a couple of asp variables to store the location of the file...
2
1,180
How to save matlab trained model in libsvm
<p>I'm new to libsvm and matlab. I have downloaded libsvm 3.17 from the web site and trained my dataset using Matlab. I wanted to save the file and I used svm_savemodel.c which refused to compile in matlab. This is the message that I get</p> <pre><code>mex svm_savemodel.c Creating library C:\Users\mark\AppData\Local\T...
2
1,366
C# generics performance vs interface
<p>Consider the following C# code:</p> <pre><code>interface IFace { void Do(); } class Foo: IFace { public void Do() { /* some action */ } } class Bar { public void A(Foo foo) { foo.Do(); } public void B&lt;T&gt;(T foo) where T: IFace { foo.Do(); } public...
2
1,040
jQuery File Upload Using PHP
<p>I am trying to do a simple pdf/excel file upload by storing the file into an upload folder and saving the name into the database. The problem here is that after i click on the upload button, the database saves my <code> $transaction-&gt;test = &quot;something&quot;;</code> but not the file or directory.</p> <pre><c...
2
1,124
Gem "audited-activerecord", "~> 4.0 gives undefined method `audits'
<p>I am using: Rail 4.1.7 Ruby 2.1.4</p> <p>I just installed <a href="https://github.com/collectiveidea/audited" rel="nofollow noreferrer">Audited GEM</a>:</p> <pre><code>gem &quot;audited-activerecord&quot;, &quot;~&gt; 4.0&quot; $ rails generate audited:upgrade $ rake db:migrate </code></pre> <p>Model</p> <pre><code>...
2
1,950
How to get the count from a dataframe from a Dash Callback
<p>I'd like to display the count of certain criteria inside a div in my dash layout based off callback selection from dropdown.</p> <p>I'm able to get the dropdown for the values in a pandas dataframe column, but I'm having trouble figuring out how to display the total count of the a selected element of the column. <...
2
1,395
DialogFragment From RecyclerView
<p>now i have new problem ..... i don't know how initialize dialogfragment in recyclerview and recyclerview in fragment , so who know haw to make it ?</p> <p>Fragment code:</p> <pre><code>public View onCreateView( LayoutInflater inflater, ViewGroup container3, Bundle savedInstanceState) { ...
2
1,692
Conenection between Mysql and Visual Studio 2019 for macOS doesn't work
<p>I'm trying to develope a Web Application (.net core MVC) with Visual Studio 2019 for macOS and as database I use Mysql.</p> <p>I've been looking for videos, websites where tell you how to make the connection, but all attempts have been failed.</p> <p>I'll show you my code:</p> <p>NuGet Packages:</p> <ul> <li>Mi...
2
4,939
Validate MVC field at client side
<p>I have problem validating one field at client side, Here is my code:</p> <p>Model:</p> <pre><code> public class Registration { public int Id { get; set; } [IsUserExistAttribute(ErrorMessage = "Email already exists!")] [EmailAddress(ErrorMessage = "Please enter valid Email")] [Re...
2
1,754
Angular Route Displays Raw JSON on Browser Refresh
<p>I am building a MEAN stack app. I've set up a proxy config for development. I am successfully calling an API from Angular/Node, but when I refresh the browser, the Angular route displays my raw JSON data like this:</p> <p><a href="https://i.stack.imgur.com/LXZy4.png" rel="nofollow noreferrer"><img src="https://i....
2
1,559
Spring Boot using dramatically more memory on 64-bit JVM
<p>When running the same Spring Boot application on a 64-bit JVM (vs 32-bit), the memory usage is dramatically higher. </p> <p>For the sample Eureka application below, the 32-bit JVM uses about 100 MB of RAM, whereas the 64-bit JVM uses about 700 MB of RAM. Running multiple microservices on the same computer starts to...
2
1,427
CursorAdapter breaks CHOICE_MODE_MULTIPLE option
<p>I have a <code>ListFragment</code>, where I add a <code>CursorAdapter</code> to my <code>ListView</code>, and I want to be able to click several rows, to use contextual action bar. I use SherlockActionbar, and it works fine, when I use a simple <code>ArrayAdapter</code>. But when I switch to <code>CursorAdapter</cod...
2
1,093
Fork error: resource temporarily unavailable
<p>I have written this code in a project based on the client-server model but in one of my files I have this error: fork error resource temporarily unavailable. this is the <em>Code</em>:</p> <pre><code>#include "LibreriaFunzioni.c" int main (int argc , char *argv[]) { int list_fd,list_fd2,fd,fd2,SocketFiglioSede...
2
2,881
Django : Extract data from table to initially populate a form
<p>I'm looking to initially populate my Django form with data based from another app. I followed this SO example in order to write my function : </p> <p><a href="https://stackoverflow.com/questions/3833403/initial-populating-on-django-forms">Initial populating on Django Forms</a></p> <p>However, I didn't succed to ge...
2
1,080
Multicast server receive the same data it sends
<p>I'm trying to allow clients that connect to my UDP server to send packets to the server, I have a server running so packets can be sent to the clients, but trying to send packets back via the client to the server seems to create some weird errors. </p> <p>If I start the server, then open a client, the client will r...
2
2,761
Exchange Web Service API really slow but only if called from WPF application
<p>I am trying to build a WPF application that queries our Exchange 2010 SP2 using the Exchange Web Services API.</p> <p>However, I'm finding that if I use the Exchange API from a WPF application, the calls to the API are really, really slow. In fact they are two orders of magnitude slower than running the exact same ...
2
2,507
How do you download *all* pipeline resources in a job?
<p>The <code>deployment</code> job automatically downloads all the pipeline resources. However, standard <code>job</code> does not. I tried to use <code>- download: current</code>, but that does not download the pipeline resources.</p> <p>The reason I want to do this is to simulate a deployment for GitOps. The simu...
2
1,041
Error with a simple Spinner on Android
<p>I'm learning about Spinners in Android, and I've tested the code that appears in this link of Android Developers: <a href="http://developer.android.com/guide/topics/ui/controls/spinner.html" rel="nofollow">http://developer.android.com/guide/topics/ui/controls/spinner.html</a></p> <p>But it doesn't work, these are t...
2
1,580
Improper reflection in recursive ray tracer
<p>I'm implementing a recursive ray tracer with reflection. The ray tracer is currently reflecting areas that are in shadow, and I don't know why. The shadow aspect of the ray tracer works as expected when the reflective code is commented out, so I don't think that's the issue.</p> <pre><code>Vec Camera::shade(Vec acc...
2
1,577
Windows Forms: How to make the Form and a Grid Change Sizes Together?
<p>In C#, I have a table displayed using a <code>DataGridView</code>. The table is significantly smaller than the form in which it appears, and so the table fills only a small portion of the upper-left-hand corner of the form.</p> <p>My question: how can I (programmatically) make either: (1) the table automatically ...
2
1,163
Streaming images with Nodejs on embedded device
<p>I'm trying to stream images from a Node.js server to a client site. I've started with <code>socket.io</code>, but my implementation is fairly memory intensive (and possibly leaking as I'm not fluent in JavaScript). I'm just prototyping at this point with 10 sample images:</p> <h3>Server Side</h3> <p>Responds to a ...
2
1,048
how to set default value for element if that element is absent in xml file through jaxb unmarshalling in java
<p>The issue is I want to set a default value for "name" element which is absent in input.xml file.How can I achieve this through jaxb?, I dont want to do it through java model. Is there a way to get it through shema or through jaxb. Below is the code:</p> <p><strong>1. customer.xsd</strong> </p> <pre><code>&lt;xs:sc...
2
1,112
Is there a way to iterate through a javascript object's prototype variables and functions?
<p><strong>This question is no longer applicable to what I'm trying to do because I have to declare the name of the pmp objects with a name.</strong></p> <p>I want to be able to associate an object with each prototype function for my class without doing it manually for each prototype. I've tried seeing what's inside p...
2
1,609
How to display user-specific content based on which user is logged in
<p>My site has a login feature which only requires a user enter their email. If they're email is in my MySQL database, they are granted access to a private php page (results.php). I'm trying to develop a method of identifying which user is logged in, and depending who it is, display particular content within that page....
2
1,050
How to trigger a function from onclick using Node.js
<p>I am new to using Azure, after using Google Apps Script to write web apps for many years. I needed to change how I was working die to some incompatibilities with iPhones. I was using javascript and HTML, so have recreated the app with node.js.</p> <p>I am able to return the html page, and run client side scripts, h...
2
1,363
How can I increase the accuracy of my image classification keras model in Python?
<p>I am trying to classify a group of bee images into two classes - bumble bee and honey bee with the resulting format being a CSV file like -</p> <blockquote> <p>id,bumble_bee,honey_bee</p> <p>20000,0.75, 0.25.</p> </blockquote> <p>I have a running model, but the accuracy is very low and I've tried a bunch of differen...
2
1,338
AWS Lambda: Using executable with python
<p>Hello <a href="https://aws.amazon.com/de/blogs/compute/extracting-video-metadata-using-lambda-and-mediainfo/" rel="nofollow noreferrer">this tutorial</a> pretty much describes exactly what I need to do and explains it pretty well, but it just doesn't work for me. Isearched for similar cases and even found others hav...
2
2,224
Spring App + Tomcat + XSLT = TransformerFactoryConfigurationError
<p>I am trying to deploy a Spring 3.0 Webapplicatoin to a tomcat5.5 server running on CentOS. Deployment works, but when I try to access the application I get a <code>TransformerFactoryConfigurationError</code>:</p> <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org....
2
1,042
Showing C# <summary> tags in Jekyll Github pages using Highlight.js
<p>To show <a href="https://stackoverflow.com/a/11811335/2404470">codes successfully with simple HTML</a>, I have added <a href="https://highlightjs.org" rel="nofollow noreferrer">Highlight.js</a> in my <a href="http://xameeramir.github.io/" rel="nofollow noreferrer">Jekyll based blog</a> which is running on <a href="h...
2
1,108
Chrome Extension - Getting "tab was closed" error on injecting a script
<p>I am writing a chrome extension which detects the type of file being opened and based on that injects a script on the page which does many other things. Here is the part of my code for the background.js which is injecting the script:</p> <pre><code>chrome.webRequest.onHeadersReceived.addListener(function(details){ ...
2
1,812
responsive layout with Bootstrap,.visible-phone not working
<p>Trying to hide two banners when users are using phone, but using the classs such as .visible-phone or visible-desktop not working.</p> <p>I then searched and thought maybe by adding the .less and less.js would solve the issue but failed either. </p> <p>Code in HTML:</p> <pre><code>&lt;link type="text/css" rel="st...
2
2,633
How to connect circles with lines using canvas
<p>I am using canvas tag to create circles on over world map image. I want to connect the multiple circles with lines using Canvas tag. As of Now I am able to draw circles but couldn't able to draw lines. </p> <p>HTML</p> <pre><code>&lt;img src="http://educypedia.karadimov.info/library/worldoutlinemap.gif" width="500...
2
1,104
Better ways to reference multi-level pointers?
<p>As for now I'm trying to make a basic "fly mode" for a game where such one does not exist. For that I need to manipulate the game memory, and that means that pointers will have to be used to access the memory (from withing a DLL).</p> <p>As for now I use this code:</p> <pre><code>#define AddVar(Type,Name,Address) ...
2
2,170
GetX Get.toNamed() is ignoring onGenerateRoute on Navigator
<p>I have a problem, I'm using GetX in my Flutter Application. I need to use nested navigation cause I'm using BottomNavigationBar. First I have a Navigator Widget, the problem is when the Get.toNamed method is called and the onGenerateRoute is not executing.</p> <p>This is my code</p> <pre><code>class NavigatorPage ex...
2
1,237
Cobertura report not increasing the code coverage with Powermock
<p>I am using Cobertura maven plugin [version 2.7] to understand the code coverage for my tests. I am using PowerMock [version 1.6.6] to mock dependent objects. But when I run <strong>mvn cobertura:cobertura</strong> and check the report, the coverage remains the same. It works fine when I do not use mocking. Is this a...
2
1,027
Server forcibly closing connection when attempting SSL connection
<p>I'm trying to create an ssl connection between server and client, but I keep getting a <code>ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine</code> error.</p> <p><strong>client.py</strong></p> <pre><code>class Client(object): def __init__(self...
2
1,401
Connection aborted.', RemoteDisconnected('Remote end closed connection without response') while using python
<p>Hello I am attempting to reach <code>https://api.louisvuitton.com/api/eng-us/catalog/availability/M80016 </code> through a session while using request in python. Currently I am unable to reach it and get an error of <em><strong>Remote end closed connection without response</strong></em>. I have been trying to debug ...
2
1,795
Pagination Django Class Based View Not Working Properly
<p>I'm trying to use Django (v2.0) pagination with CBV and got issues. The pagination is active because the tag {% if is_paginated %} returns "True" and shows the "PagNav" and the browser path changes too, like this (..?page=1, ...?page=2, etc...) but the displayed elements are all, not 3 just as I set in "paginate_by=...
2
4,247
Why isn't Liferay Faces processing JSF portlet action events?
<p>I am having issues with trying to use Liferay Faces along with any JSF components to fire action events.</p> <p>I've gone through the first part of Liferay's <a href="https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/develop-jsf-portlets-liferay-portal-6-2-dev-guide-en" rel="nofollow norefer...
2
4,339
Accessing html Span tag in Selenium
<p>I want to access the collection of <code>span</code> tag which is having <code>value attribute</code> like below<br></p> <p><code>&lt;span class="label_xmlvalue_row value" value="Automation_TestBundle_13thMarch"&gt;</code><br></p> <pre><code>&lt;iframe&gt; &lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;ta...
2
1,027
Android Layout Help - Half of screen should be upside down
<p>I'm OK with the java for this beginning app I'm attempting. But the XML still boggles my mind a little. I've included a picture of what I'm trying to achieve: <img src="https://i.stack.imgur.com/hHRh4.jpg" alt="enter image description here"></p> <p>And here is the code I have so far. I'm happy with the way it ca...
2
1,089
PowerShell through C# - Asynchronous RunspacePool - Key has already been added
<p>Long time lurker (especially on this problem). I have been studying asynchronous posts on this website directly related to my problem, but I have not found a solution. I have also tried many different variations of the below code to no avail.</p> <p>What is happening is I asynchronously execute <code>ps.BeginInvo...
2
2,612
ElasticSearch aggregation - get the exact time of a max histogram value in a timeseries
<p>I am quite new to elasticsearch, so apologies if this is a trivial question. </p> <p>I have a time series with irregular updates every n number of seconds that I want to plot historically. The data contains a long variable called 'score', and a long variable with the epoch called 'time' for each 'score' as the tim...
2
2,257
Error while defining my Keras model: " AttributeError: 'NoneType' object has no attribute '_inbound_nodes' "
<p>I'm trying to build a keras model, the problem appeared after adding lines to perform zero-padding then merge 2 layers. The code is as follows:</p> <pre><code>import keras from keras.layers import * from keras.models import Model from keras.activations import softmax import keras.backend as K query = Input(name='q...
2
1,883
Verification link not activating account
<p>So I've sent a link after registration to Verify an account, the link contains the users email address and a 32 character code for example:</p> <pre><code> $to = $email; $subject = 'Signup | Verification'; $message = ' Thanks for signing up! ...
2
1,025
LWP connect issues despite fresh install
<h1>Update</h1> <p>Working on a theory, I edited <code>LWP/Protocol/http.pm</code> to include a sleep statement in the subroutine <code>request</code>:</p> <pre><code>if (!$has_content || $write_wait || $has_content &gt; 8*1024) { WRITE: { # Since this just writes out the header block it should almost ...
2
3,191
How to insert struct into stl::map C++
<p>I am trying to use a loop to populate a map using the insert method. I have a map that I am trying to populate using this method:</p> <pre><code>void board:: insertToMap(Letter c, int num){ this-&gt;myRackMap.insert(pair&lt;Letter, int&gt;(c, num)); } </code></pre> <p>and I call this helper method in this loop...
2
1,090
Access model instance methods in view (Sails.js / EJS)
<p>I've noticed that when a model instance (object) is passed to a view it is stripped of all functions. Is there any way around this?</p> <p>Example:</p> <p>My User model has method fullName which intelligently merges first name, last name, and prefix.</p> <p>In the controller I have:</p> <pre><code>User.find().do...
2
1,134
Android app working smoothly in Samsung but not working in Huawei phones
<p>I have an Andriod application which is working perfectly fine in Samsung phones but is very slow in phones like Huawei. It's very slow and after some time it crashes.</p> <p>The most common error in my logcat is:</p> <ul> <li>E/IPCThreadState: binder thread pool (15 threads) starved for 1149 ms</li> <li>E/Location...
2
10,046