title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Remove comments when running rspec | <p>When I test my rails app using rspec, a bunch of long comments appear.
How can I remove them ?</p>
<pre><code> ActionController::RoutingError:
No route matches [GET] "/events"
# /Users/hadi/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:36:in `call_app'
# /Users/hadi/.rvm/gems/ruby-2.3.0/g... | 3 | 1,118 |
How to terminate thread using condition returned by wx.CallAfter()? | <p>I am very new to wxPython and also not familiar with thread concept. I would appreciate a lot if anyone could provide info sources or suggestion to my question. </p>
<p>I had created a GUI using wxpython to allow users run my script with inputs. Since one step takes 20 min to run so I plan to create a Progress Dial... | 3 | 1,439 |
pod spec lint fails with 400 | <p>I followed all the steps from <a href="https://guides.cocoapods.org/making/using-pod-lib-create" rel="nofollow noreferrer">https://guides.cocoapods.org/making/using-pod-lib-create</a> to make my openSource library available on cocoapds.
At the end of the steps before publishing run <code>pod lib lint</code> command ... | 3 | 1,711 |
when replace the xml elements with the help of xsl stylesheet using java,not getting replaced | <p>how to replace the child tag name with xsl.
here the below is my structure of xml.</p>
<pre><code> <Checkpax xmlns="http://xml.api.com/test">
<customerLevel>
<customerDetails>
<paxDetails>
<surname>MUKHERJEE</surname>
<... | 3 | 2,999 |
My program will not calculate totals | <p>I am doing a school project and I am supposed to create a database that will calculate rental equipment. It supposed to calculate the number of days and calculate a total for the entire bill. My program doesn't calculate.
Here is the code for the program: </p>
<pre><code>Public Class VandemanForm
' Declare mo... | 3 | 2,105 |
Loop breaks after certain amount of iteration | <p>I've a job to do some migration on wordpress sites, although I don't think wordpress has anything to do with my problem.
So I'm getting a set of data from a table (id, value) which is serialized. </p>
<p>I want to put the serialized data into arrays, according to the function. The algorithm doing everything fine f... | 3 | 1,194 |
Why are buttons making my canvas drawing like hexagon shape in Android? | <p><a href="https://i.stack.imgur.com/omp5C.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/omp5C.jpg" alt="Smooth circle"></a> <a href="https://i.stack.imgur.com/gNtnZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gNtnZ.jpg" alt="enter image description here"></a>I have a stran... | 3 | 3,698 |
Need help writing a function for summary_table(dplyr::group_by | <p>I am trying to create a function that will minimize the number of times I will have to calculate all of the stats individually (Min, Median, Max, Mean, SD, and NAs). I have included the first two pieces of this large list, and how the list is being used. </p>
<pre><code> list("Child Age" =
list("Min" = ~ mi... | 3 | 1,414 |
android : Unable to instantiate activity ComponentInfo java.lang.NullPointerException | <p>I have the error as below : </p>
<pre><code> FATAL EXCEPTION: main
Process: com.example.jsontest, PID: 9486
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.jsontest/com.example.jsontest.ClosetMainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.perfor... | 3 | 1,508 |
how to retrieve XML data using XPath which has a default namespace in Java? | <p>I've come across and problem that I've looked up on stack overflow but none of the solutions seems to solve the problem for me.</p>
<p>I'm retrieving XML data from Yahoo and it comes back as below (truncated for brevity's sake).</p>
<pre><code><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fantas... | 3 | 1,105 |
SQL Server : Group By records not on the same day | <p>I have a set of tables where we used to maintain transaction histories of bank account.</p>
<p>We have applied grouping on the transaction and get the grouped transactions. This worked fine for normal accounts. I used this query to analyze the users regular transactions which happens on pattern like every week or f... | 3 | 1,390 |
Azure API - How do I setup CORS | <p>I have REST API, that is hosted in Azure. If I make request in interactive console with GET method ('/api/pets'), request goes through just fine. But when I make POST request (POST '/api/pets'), CORS error appears.</p>
<p>Response in interacive console throws this error:
<a href="https://i.stack.imgur.com/IxlOz.png... | 3 | 1,396 |
Cuda error out of memory while running a python code | <p>I am trying to run this following code.
I am getting an error. The code is from <a href="https://dmitryulyanov.github.io/deep_image_prior" rel="nofollow noreferrer">Deep Image Prior</a> downloaded from Github. Can anyone tell me why I am getting this error and where I am wrong?
I read something about this and it sa... | 3 | 2,013 |
How to add fields in bootstrap model dynamically in angular | <p>I am new to <code>webDevelopment</code>. Now, Here I have a list of buttons , but the <code>data-target</code> is a same model for every button click. So, My model is like -</p>
<pre><code><div class="modal fade" id="myModalHorizontal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"... | 3 | 2,330 |
Getting "The network connection was lost." error when calling API using Alamofire library in MAC OS App | <p>I have integrated <a href="https://github.com/Alamofire/Alamofire" rel="nofollow noreferrer">Alamofire</a> Library for API calling, and getting following error :</p>
<blockquote>
<p>Error Domain=NSURLErrorDomain Code=-1005 "The network connection was
lost." UserInfo={_kCFStreamErrorCodeKey=57,
NSUnderlyingErr... | 3 | 1,141 |
Scope 'session' is not active for the current thread while accessing Spring session bean inside RxJava thread | <p>I'm getting an exception while trying to access a Spring session scoped bean inside a thread of rxjava Schedulers.io()</p>
<pre><code>Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside o... | 3 | 1,208 |
ConnectionResetError when trying to send PUT request | <p>I'm trying to upload a file using a PUT REST Api, but I get a <code>ConnectionResetError</code>. I've tried using <code>urllib.request.Request()</code> with <code>urllib.request.urlopen()</code>, as well as <code>requests.put()</code>.</p>
<p>It works correctly when I'm using cURL:</p>
<pre><code>$ curl -X PUT htt... | 3 | 2,580 |
JQuery Mobile: After changePage navbar is not working on target page until I manually refresh the browser | <p>I have the problem that the navbar is not working on the target page (login.php), after changePage has been invoked from the login page (index.php).</p>
<p>I have 3 files</p>
<ol>
<li>index.php - Login Mask</li>
<li>login.js - Contains the changePage</li>
<li>login.php - Contains the navbar that is not working</li... | 3 | 4,113 |
having issues calling a method in java | <p>a simple question but i litterally can not remember, basically i want to run java methods in an certain order, i did have it working perfectly, but i have had to add something to the start and now it will not run in order </p>
<p>Basically before was this code, </p>
<pre><code>@PostConstruct
public void init()... | 3 | 1,467 |
stuck at reading credentials from txt file correctly | <p>I am stuck at reading credentials from txt file. what am I doing wrong?</p>
<p>I can successfully create new file each time and open it but don't know in what format should I save so I can read it correctly. like should I make separate file for username/email and passcode or one file. should I save username and pass... | 3 | 1,821 |
Spring form validate : Whitelabel Error Page | <pre><code> @RequestMapping(method = RequestMethod.GET, value = "/add")
public ModelAndView add() throws ConferenceNotFoundException {
LOGGER.debug("Getting adding page");
return new ModelAndView("conference/add", "form", new ConferenceForm());
}
@RequestMapping(method = RequestMethod.PO... | 3 | 1,206 |
Why in bootstrap 4.1 left aside menu icon to dropdown items is not on valid place? | <p>I have a left aside menu with submenus in laravel 5.7 / blade/ Bootstrap 4.1 app and if some element of submenu is opened
I want to keep open parent menu item. I tried to keep it ny current control name as :</p>
<pre><code><?php $manage_storage= ($current_controller_name == 'ClientsController'); ?>
<div c... | 3 | 1,796 |
Twitter4J Failed request token | <p>Hi i'm using <a href="http://www.londatiga.net/it/how-to-post-twitter-status-from-android/comment-page-2/" rel="nofollow">this tutorial</a></p>
<p>for my twitter test project and i already change :</p>
<p>from</p>
<blockquote>
<p>mHttpOauthprovider = new DefaultOAuthProvider("<a href="http://twitter.com/oauth/r... | 3 | 1,146 |
How can I limit interstitial ad opening? | <p>I am a newbie in the developing section, recently I'm trying to edit the source code of the web view application. But the problem is every time of "backpress" interstitial ad appears. Which is huge disturbing. Tried to change back press code but after doing that ads totally diseapred. Now I'm confused that... | 3 | 9,997 |
Emit variable not passing array from child to parent? | <p>I am trying to pass an array of tags from the child component to the parent component using emit. The emit is registering and firing the method in the parent component, but when I log the argument that I passed via emit it returns undefined. I am not sure what I am doing wrong because I have passed objects via emit ... | 3 | 1,114 |
RecyclerView showing actually deleted items | <h3>Problem</h3>
<p>I am writing an android application that has to handle a variable amount of elements in a RecyclerView. When I add an element, some data gets saved into a configuration file along with an UUID.</p>
<p>Either when the application starts or when the element gets created or removed by the user during... | 3 | 1,065 |
Combine two select statments to fetch data from DB | <p>I am little bit confuse about the problem and I dont know how to respolve this.
So the problem is following. I have two <code>Models</code>(<strong>ReportElement, ReportDefinition</strong>) and one <code>ViewModel</code> (<strong>ReportElementDefinitionVM</strong>) </p>
<p><strong>ReportDefinition Model</strong></... | 3 | 4,752 |
How to merge REST call results in Angular app more efficiently | <p>I have an Angular SPA running on a SharePoint 2013 page. In the code, I'm using $q to pull data from 10 different SharePoint lists using REST and then merging them into one JSON object for use in a grid. The code runs and outputs the intended merged data but it's leaky and crashes the browser after a while. </p>
<p... | 3 | 1,908 |
outer join two anonymous types and reference a single property in the join query? | <p>Given:</p>
<pre><code>var memberships = context.Memberships.OrderBy("it.CreateDate").ToList();
var monthlyCounts = from m in memberships
where m.CreateDate >= today.AddDays(-365) && m.CreateDate <= today
group m by ... | 3 | 1,075 |
python Tkinter script written by class acts abnormally, but using function style works fine | <p>The script written by class style can't update listbox as expectation
I expect this code updates listbox content from " " to "2 2 2" after pressing start button</p>
<p>code floor:
1.function <em><strong>empty_listbox</strong></em> in class <em><strong>Leftframe</strong></em> generates empty listb... | 3 | 2,688 |
Wrong routing or wamp error ? | <p>I just started a new symfony project, but I got something wrong with my wamp, and I don't know if this is coming from Wamp, vhost or Symfony.</p>
<p>I hope you can help me.</p>
<p>When I'm wanted to test my vhost, with the url <code>kingdom/</code>
I got this error 403:</p>
<p>You don't have permission to access ... | 3 | 1,081 |
MongoDB data aggregation assistance | <p>I have 'customers' collection with the following document:</p>
<pre><code>{
id: 1,
name: 'Customer Name',
projects: [
{
id: 1000,
name: 'Project 1',
description: 'Project description',
instances: [10, 20],
},
{
id: 2000,
name: 'Project 2',
description: 'Pro... | 3 | 2,110 |
Scala IntelliJ library import errors | <p>I am new to scala and I am trying to import the following libraries in my build.sbt. When IntelliJ does an auto-update I get the following error:</p>
<pre><code>Error while importing sbt project:
List([info] welcome to sbt 1.3.13 (Oracle Corporation Java 1.8.0_251)
[info] loading global plugins from C:\Users\diego\... | 3 | 1,446 |
This Activity already has an action bar supplied by the window decor. after updating android studio | <p>I tried all solutions from this <a href="https://stackoverflow.com/questions/26515058/this-activity-already-has-an-action-bar-supplied-by-the-window-decor">link</a> but none of them works for me</p>
<pre><code>Process: org.dmfs.tasks, PID: 12137 java.lang.RuntimeException: Unable
to start activity
ComponentInfo{org... | 3 | 2,297 |
why am I getting segmentation fault on the code below? | <p>I have a txt file where I just want to get lines bigger than 12 characters. Than these lines are inserted in a variable called graph of type graph_node.</p>
<p>txt file:</p>
<pre><code>1,"execCode(workStation,root)","OR",0
2,"RULE 4 (Trojan horse installation)","AND",0
3,"accessFile(workStation,write,'/usr/local/s... | 3 | 2,093 |
Unclickable context menu inside content editable | <p>I have a little issue with my context menu inside a content editable. I think it's a style issue but i can't figure out what it's causing it. Here is the thing, my context menu is showing where he is suposed to, with the value he is suposed to have. But it seems like it is only a block for him and not a list of P el... | 3 | 1,262 |
Error when consuming a web service with JavaScript | <p>I am trying to consume a web service ( <a href="http://www.webservicex.net/CurrencyConvertor.asmx?wsdl" rel="nofollow">http://www.webservicex.net/CurrencyConvertor.asmx?wsdl</a> ) using JavaScript:</p>
<pre><code><script type="text/javascript">
function soap() {
var xmlhttp = new XMLHttpRequest();... | 3 | 1,237 |
AltBeacon ignores pdu type of my beacon packages | <p>I'm using AltBeacon library to work with my beacons (provided by Shenzhen Minew Technologies Co., Ltd.).
I use following</p>
<pre><code>beaconManager.getBeaconParsers().add(new BeaconParser().
setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));
</code></pre>
<p>to set layout. In my logcat I ... | 3 | 2,010 |
Im trying to create a space dodge game and I'm having a few issues | <p>Basically I'm trying to have it so that when the ship touches the meteor it plays an explode animation. I'm using colour detection for this as when i used <code>player.colliderect(name)</code> it was really inaccurate and began the animation when it was far away from the asteroid. So im using colour detection now in... | 3 | 1,673 |
REST api returning json but configured as XML? | <p>I'm trying to get an XML response from my server but for some reason it still returns JSON. Maybe I'm misunderstanding what setAccept and setContentType are? At the moment I'm thinking that the get request is in XML but the client is only accepting / expecting json? </p>
<p>I've tried setting headers.setAccept(Arra... | 3 | 4,249 |
Run-time error '1004' in a If else statement program | <p>I am trying to use two cells to determine which value to return back. The goal is to read in cell Z3 to determine which height to use, then cell AA3 to determine which Class to use based off the value the height provided. Once the class is found i would like it to print to cell AB3 then repeat for the next row and s... | 3 | 4,722 |
Spring: JUnit tests with session scope: Unsatisfied dependency expressed through field 'sessionTestBean' | <p>I tried to follow the guidelines at <a href="https://tarunsapra.wordpress.com/2011/06/28/junit-spring-session-and-request-scope-beans/" rel="nofollow noreferrer">https://tarunsapra.wordpress.com/2011/06/28/junit-spring-session-and-request-scope-beans/</a>
or <a href="https://touk.pl/blog/2011/04/15/how-to-test-spri... | 3 | 1,356 |
I am using Interop.TDAPIOLELib.dll for QC ALM Integration But taking too much time for getting All Test Plan Tree Structure | <p>I am using <strong>Interop.TDAPIOLELib.dll</strong> for <strong>QC ALM 12</strong> Integration and installed QcConnector.exe from tool link from QC ALM 12 on my 32 bit window machine.</p>
<p>I want to fetch all TestPlan with parent folder hierarchy . But its take too much time around <strong>75 artifact of QC ALM</... | 3 | 1,184 |
Issue - AngularJS Uncaught Error: [$injector:modulerr] | <p>Am completely new to AngularJS. So am trying the flow of sample application before I start the development of a new app in my project. Below is what I have tried.</p>
<p><strong>index.html</strong></p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dt... | 3 | 1,035 |
How to get checked event of Listview in ListFragment | <p>I have a JSONArray which adds data to <code>list = new ArrayList<HashMap<String, String>>();</code></p>
<p>The list display is working fine. Data is received and displayed perfectly.</p>
<p>But when I add a checkbox for it, the checkbox wont work. I checked some tutorials all have used ListFragment but... | 3 | 4,154 |
Calculate Dice Roll from Text Field | <p>QUESTION:
How can I read the string "d6+2-d4" so that each d# will randomly generate a number within the parameter of the dice roll?</p>
<p>CLARIFIER:
I want to read a string and have it so when a d# appears, it will randomly generate a number such as to simulate a dice roll. Then, add up all the rolls and numbers ... | 3 | 1,264 |
12 month moving average from Java array | <p>i have tried to use this code to calculate 12 month moving average. i have the data below the third column is the value i would like to calculate the average on .<br>
the problem with this code is that it outputs the moving average as the values converted to double</p>
<pre><code>//a is an object of the larger clas... | 3 | 1,138 |
My XXE payload get no response about the file I want to exploit | <p>I am a hacker and now I am hunting for securty holes(bugs) to get the bounty. Yesterday, when I am bug hunting on a website, I saw a request like this:</p>
<pre><code>POST /accounts/28605113/followers HTTP/1.1
Host: example.com
Connection: close
Content-Length: 19
Accept: */*
Origin: https://example.com
X-CSRF-Toke... | 3 | 2,005 |
API Gateway error (ValidationException: ExpressionAttributeValues must not be empty) when trying to update DynamoDB entry | <p>I am new to AWS and am trying to set up the back end for my buddy's website. I am able to 'get' entries from my database (called 'isThrowingTable') but am unable to 'put' updates into it. I run a Request Body as seen in the picture/code below and I get a response body (error) as seen in the pic/code (see the lambd... | 3 | 1,091 |
HtmlUnit form submit since button does not have a direct hyperlink | <p>I have a button on a page but there is no hyperlink in the button. So I need to submit the form to go to the next page.</p>
<p>HtmlUnit is not waiting till the next page loads. So the <code>nextPage</code> variable is having the current page instead of the next page (intermittently it works if page loads quick enou... | 3 | 1,034 |
Update one Pmw control using value from another within the same class | <p>I am writing a Pmw (<a href="http://pmw.sourceforge.net" rel="nofollow">http://pmw.sourceforge.net</a>) plugin for PyMOL (<a href="http://sourceforge.net/projects/pymol/" rel="nofollow">http://sourceforge.net/projects/pymol/</a>), but I just cannot update the value of a <code>Pmw.ComboBox</code> using changes made t... | 3 | 2,247 |
Android Room either does not compile or throws error during runtime | <p>I wanted to use <em>Room</em> for storing data. For this I have my <code>AppDatabase.kt</code>:</p>
<pre><code>@Database(entities = [SensorEntry::class], version = 1, exportSchema = false)
@TypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase() {
abstract fun sensorDao(): SensorDao
co... | 3 | 1,466 |
componentWillUnmount works after switching to another page | <p>I have two pages and two components LibraryPageFilters.tsx (url: /courses) and UserVideoCreatePage.tsx (url: /ugc/courses/${course.id}).
In component LibraryPageFilters.tsx</p>
<pre><code>useEffect(() => {
console.log(course.id)
if (course.id) {
console.log(544)
dispatch(push(`/ugc/courses/${c... | 3 | 9,038 |
Uncaught Error: [$injector:modulerr] Angular, Angular-ui-router with Webpack | <p>I've been having this problem for awhile, but I can't seem to crack it. I'm using angular 1.5, angular-ui-router 0.2.18 (from bower components) with webpack 1.13.1 and I provided the code on the bottom. I'm getting the error messages with a <a href="https://docs.angularjs.org/error/$injector/modulerr?p0=flyHawaii&a... | 3 | 1,995 |
react-select doesn't re-render when updating the state | <p>I'm trying to set a multi filter that includes react-select.
it works properly only when another part of the filter is activated (typing in the input for example).</p>
<p>Tried console.logging inside the service, nothing happens when adding to the multi select, but only when i use the other types of filters.</p>
<p>... | 3 | 1,535 |
CABasicAnimation only works with layers created in the same method | <p>I need to animate different CATextLayers depending on some conditions. This is why I wrote a method that accepts the layer and animates it. Here it is:</p>
<pre><code>- (void) animateText:(CATextLayer*) text withColor: (CGColorRef) color andDuration: (NSTimeInterval) duration
{
CABasicAnimation *colorAnimation ... | 3 | 1,227 |
React Typescript and Jest | <p>I'm trying to set up Jest in an React app using Typescript.</p>
<p>My set up is like this</p>
<p>My package.json</p>
<pre><code>{
"name": "react-tdd-ts",
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/jest": "24.0.23",
"@types/node": "12.12.9",
"@types/react": "16.9.11",
"@... | 3 | 1,540 |
move the x and y of multiple div's on mouse x, y in js | <p>my goal is to make a webpage where multiple div's with text etc. within, moves on mouse x and y. It should looks like a parallax effect on mouse x and y. All the parallax plugins that i came across are image based so they don't work with the div's.
I wrote a little js myself but the div's are jumping all over the pa... | 3 | 1,420 |
R Find time lapsed in minutes from pairs of "Enter Store" to following "Leave Store" for every Group (Cart.Serial) | <p>Here is my first post! Following some requirements I am adding my data:</p>
<pre><code>> dput(head(ctms3))
structure(list(Date = structure(c(1444136735, 1444136703, 1444136698,
1444136670, 1444136645, 1444136644), class = c("POSIXct", "POSIXt"
), tzone = "CST"), Cart.Serial = structure(c(114L, 118L, 8L,
4L, 35... | 3 | 1,568 |
Scala XML processing is skipping a value | <p>I am trying to develop a rest api in scala that grabs the xml of a couple of rss feeds and then displays them in json. So far I can display them as text, which is fine, but I can't get the author to show up. I am creating a list of the articles (where Article is a case class), and searching the xml to provide the va... | 3 | 1,070 |
Recursive PHP function writing to external array | <p>Two questions here really; why is this happening? And what can be done about it?</p>
<p>Sorry the question's so long but most of it is just <code>print_r</code> output!</p>
<p>Basically, I start with a flat array of tags (<code>$tags</code>) each with an <code>id</code> (array index), <code>name</code> and <code>p... | 3 | 2,443 |
Javascript 2d for loop doesn't iterate through the final value of the outer loop | <p>I have a for loop that behaves differently depending on what type of input it has. The logic that changes its behavior can't effect the problem that I am having. Here is my code, then I will explain the problem.</p>
<pre><code>propagateForward(input)
{
for(let i = 0; i < input.length; i++)
{
... | 3 | 1,558 |
R Interp functions returns 0s/one value for z variable | <p>I am trying to replicate Cesar's solution from here in order to create an interpolation of two CTD transects:
<a href="https://stackoverflow.com/questions/54726853/how-to-interpolate-data-between-sparse-points-to-make-a-contour-plot-in-r-plot">How to interpolate data between sparse points to make a contour plot in R... | 3 | 1,694 |
Ajax call twice cause duplicate message | <p>I am trying to figure out the problem ajax called twice so duplicated message. I click sendPLR button the first time, the message won't appear. Then it shows up message twice when clicking button again. I check the network tab on Chrome, it also does not show the first ajax call. It show a duplicate call when hittin... | 3 | 18,259 |
java.lang.SecurityException: Permission Denial: opening provider com.quickblox.q_municate_core.db.DatabaseProvider | <p>I am developing an app using q-municate as base. As given in readme document I copied credentials (App ID, Authorization key, Authorization secret) into my Q-municate project code in Consts.java</p>
<p>I refracted the package name from <code>com.quickblox.qmunicate</code> to <code>com.quickblox.TestingApp</code>
I ... | 3 | 3,753 |
php and sql server stored procedure executing | <p>I have a stored procedure that do a login proccess and in different conditions return different value in same structure.</p>
<p>this is my code:</p>
<pre><code>create PROCEDURE [dbo].[I_SPCheckUserLogin]
@username nvarchar(50),
@password varchar(max)
AS
Begin
declare @incorrect_pass_msg nvarchar(MAX) = N'کا... | 3 | 4,196 |
TypeError: cannot read property of length undefined? - React Carousel | <p>Following this tutorial <a href="https://www.youtube.com/watch?v=l1MYfu5YWHc&list=PLVwSdwIkTF50m5Fnd-_vSIrT8mvtfeZxe&index=8" rel="nofollow noreferrer">here</a> exactly because I want to use this carousel on my website.</p>
<p>However I get the error "TypeError: cannot read property of undefined", ... | 3 | 1,273 |
No light as to how to trace this error on a migration to Rails 5 | <p>I've been migrating a legacy app into newer versions of rails. The issue I have now is that I come up with this error when I try to bring the console up:</p>
<pre><code>$ rails c
/home/user/.rvm/gems/ruby-2.3.3/gems/actionpack-5.2.5/lib/action_dispatch/middleware/stack.rb:108:in `assert_index': No such middleware to... | 3 | 2,936 |
How I fix erro in gunicorn when I deploy django app in Heroku? | <p>When I run <code>git push heroku master</code>the build works with success, but, the app doen't works... Looking for some problems I open logs <code>heroku logs</code>and have it:</p>
<pre><code>> heroku logs
2016-11-17T16:53:48.005794+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.5/site-packages/gun... | 3 | 5,531 |
Connection of android app with a website database | <p>I'm very new in android and I'm developing an application that passes data from android to MySQL through PHP. I'm in registering users part now. I got some codes from searching but while i'm implementing it, I'm getting run-time errors. This is my code. The <code>logcat</code> is also at the bottom.</p>
<pre><code>... | 3 | 5,111 |
"Http 401 Unauthorized" when login through webdriver running browser | <p>In the concern website, (<a href="https://zoom.us/signin" rel="nofollow noreferrer">https://zoom.us/signin</a>) when I login in manually through browser, opened with geckodriver webdriver :</p>
<pre><code>browser = webdriver.Firefox() #(Just an example, real code at the end of the answer)
</code></pre>
<p>It first p... | 3 | 1,195 |
get latest date for each day in an array of object? | <p>i have array of object which are sorted based on date/time, I have to form an array of object with latest data from each date?. I'm getting the solution with for loop but I need to use es6 and above, please help me with a better and advanced solution.</p>
<pre><code>var array = [
{
"id": 1,
"... | 3 | 1,234 |
Trying to take EmployeeID & EName from dropdown to be used in a query to display table | <p>I have a training matrix/Tracking website I am working on. I have the drop-down populated from the database from a different table. I was able to display table data from another two tables referencing the user id displaying the name of the user at the top and then a table with all training completed underneath.</p>
... | 3 | 2,646 |
Adding data to table on registration | <p>Ok so im in the middle of making a pokemon browser based game, and im having trouble making it so when a user registers to my site, they gain a starter pokemon that they choose. I have it all working except for the part where it gives the user the pokemon, right now it enters the pokemon into the database but it doe... | 3 | 2,681 |
Inject / Navigate RibbonTabItems depending on selected / loaded module | <p>I have got following problem:</p>
<p>There is a Ribbon-region in the Shell, let´s call it the "ShellRibbonRegion". There is also a task button region "ShellTaskButtonRegion" (<a href="http://www.codeproject.com/Articles/165370/Creating-View-Switching-Applications-with-Prism-4" rel="nofollow">similar to Creating Vie... | 3 | 2,219 |
Creating javascript objects using jQuery's each() method | <p>Im curious about what might be a larger question than I think. </p>
<p>I am using the following code to listen for 'keyup' on a group of text input fields. If the user stops typing for a given amount of time, I send the data to a controller using AJAX. </p>
<p>I decided to try my hand at OOP in javascript to accom... | 3 | 1,324 |
Grails: Hibernate and Data migrations | <p>I have a domain class that is for a customer. I have had to change to domain class recently because we were gathering a billing address and a shipping address, but were only recording one zip code value. So I thought what a simple fix. Change zipcode to billzipcode and then create a new field for shipzipcode. I ... | 3 | 1,622 |
how to make a axe throw and return sistem in unity | <p>guys,</p>
<p>so, i'm trying to make a game similar to the god of war in the unit, but i don't know how to make the ax return dynamically, eustou trying to make it come back without problems, but i still couldn't get a satisfactory result, i'm using an Animation to make the ax rotates and when it gets close enough to... | 3 | 2,915 |
DHCP Issue on home network | <p>I have an issue on my home office network - I'm not a networking expert in any way but I have a home network with a Samba NAS and an internal webserver for testing websites (my main role).
The PlusNet router is putting out DHCP in the range 192.168.1.100-199. Servers are fixed IP.
Client machines are picking up DH... | 3 | 1,114 |
Encoding does not switch when trying to read json file | <p>I have a json file <code>file.json</code> encoded KOI8-R.</p>
<p>Boost Json only works in UTF-8 encoding, so I'm converting the file from KOI8-R to UTF-8:</p>
<pre><code>boost::property_tree::ptree tree;
std::locale loc = boost::locale::generator().generate(ru_RU.UTF-8);
std::ifstream ifs("file.json", std... | 3 | 1,035 |
How to use LabelBinarizer to one hot encode both train and test correctly | <p>Suppose I have a train set like this:</p>
<pre><code>Name | day
------------
First | 0
Second | 1
Third | 1
Forth | 2
</code></pre>
<p>And a test set that does not contain all these names or days. Like so:</p>
<pre><code>Name | day
------------
First | 2
Second | 1
Forth | 0
</code></pre>
<p>I ha... | 3 | 1,094 |
Missing on data with Group by and Sum | <p>I'm trying to make sense of the group by clause in a specific case: I joined two tables that are supposed to have the same dollar amount for each invoice, so I'm trying to make a Query to confirm there is no discrepancy. Here is the tables, query and result:</p>
<pre><code>Table A:
Order_Number | Order_Number_Line ... | 3 | 3,677 |
Get trouble when want to store image path into MySQL | <p>In my Activity A, it has a listView where the image and text were get from Activity B.</p>
<p><strong>Activtiy A listView with image and text</strong></p>
<p><a href="https://i.stack.imgur.com/ImO0z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ImO0z.png" alt="enter image description here"></a... | 3 | 2,937 |
Flutter error in Android Studio (Windows): Unrecognized option: --add-opens | <p>I have been working on a Flutter application that I've successfully run on both an Android emulator and a physical device during the past couple of weeks. Somehow and all of a sudden, I'm unable to run it in debug mode.
I tried several answers found in SO but they all seem to be hacks that don't really fix the issue... | 3 | 1,726 |
Activity doesn't save info into MySQL Database | <p>I have one reservation form which must save information to <code>MySQL</code> database. On first Axtivity user fill the form then whit intent I save the information and passit to second activity where is the button save. When I click button save nothing goes to database.
This is activity 1</p>
<pre><code>static Str... | 3 | 4,817 |
javascript get value of Mongo field already rendered - Meteor | <p><em>Hey everyone, thank you very much for your help. Question is edited per suggestions in the comments.</em></p>
<p>I'm new to Mongo and Meteor.</p>
<p>I have a collection "posts" with a field "slug".</p>
<p>The "post" template is populating correctly with each post's values. Slug value is always something like ... | 3 | 1,466 |
How to dispatch Redux action without "onClick"? | <p>For the below line of code, how can I dispatch <code>notificationsStateUpdate</code> without <code>onClick</code>? I want this action to be dispatched if <code>notificationClicked</code> is true, so I currently have a ternary expression set up.</p>
<p>However, I can't seem to get the syntax to work. Is it possible t... | 3 | 1,840 |
How to write an aspect to cater to different objects and method arguments | <p>I am looking to write an Aspect which can be used to mock data depending on some value passed in the method. This mock will replace the actual REST call. If the value doesn't match, go back to the actual method and make the call to the REST endpoint.</p>
<p>I already have an aspect written that works in production ... | 3 | 3,659 |
Group books and get count for each of their ratings | <p>I have a Rating model with a book and rating value to it. I would like to get all the ratings count (ratings vary from 1 to 5) for each book in the database.</p>
<p>My schema simply looks like - </p>
<pre><code> {
"_id": ObjectId("57e112312a52fe257e5d1d5c"),
"book": ObjectId("57e111142a52fe257e5d1d4... | 3 | 1,358 |
UIView.animate not executed in PHPhotoLibrary.shared().performChanges | <p>I have been working on the following code for the entire day now and simply cannot find the problem. I would like to save a video and upon completion make certain buttons or spinners (dis-)appear. All the buttons are setup in the <code>viewDidLoad</code> and so to say exist (they're optionals, therefore also the opt... | 3 | 1,450 |
In multiset , the code does not enter into compare function and throws error | <p>I have used breakpoints to check if my compare function is being called while inserting element into Multi-set but it never reaches the breakpoint.</p>
<p>The error <code>Unhandled exception at 0x003c5a71 in Regular_Calibration_d.exe: 0xC0000005: Access violation reading location 0x00000014.</code></p>
<p>I past... | 3 | 1,340 |
Bound checking for empty arrays --- behavior of various compilers | <p><strong>Update</strong> 20210914: Absoft support confirms that the behavior of <code>af95</code> / <code>af90</code> described below is unintended and indeed a bug. Absoft developers will work to resolve it. The other compilers act correctly in this regard. Thank @Vladimir F for the answer, comments, and suggestions... | 3 | 2,012 |
Uploading text file dictionary to python dictionary is not working | <p>I created a dictionary with data in this format in python. This is what my product.txt file contains</p>
<blockquote>
<p>{"6TII7N11RJ0J": {"productName": "Hisense 58" Class 4K UHD LED Roku Smart TV HDR 58R6E3", "productDescription": "58 Hisense 4k Roku Tv W/ Hdr"... | 3 | 1,536 |
Duplicate navigation property cannot be used due to single relationship error | <p>I am trying to solve a relatively simple setup but am wondering if there is a better way to set this relation one. </p>
<p>I have a User class that is the starting point for all other relationships. Every other class unless specific conditions are met has a 1-to-many relationship to the User class (e.g. MenuItems i... | 3 | 1,092 |
Ruby on rails : "couldn't find file 'selectize'" | <p>When I run my rails server in development mode, I get this error message :</p>
<pre><code>Sprockets::FileNotFound at /
couldn't find file 'selectize' (in /XXX/app/assets/stylesheets/application.scss:3)
</code></pre>
<p>I don't understand the problem because I have installed the gem : <strong>selectize-rails (0.12... | 3 | 2,292 |
Error in creating a virtual machine in using vagrant | <p>I want to create a virtual machine in Azure using Vagrant. I follow this link <a href="https://www.linkedin.com/pulse/azure-devops-vagrant-jo%C3%A3o-pedro-soares/" rel="nofollow noreferrer">link</a>
I have obtained successfully the credentials of azure and here is my vagrantFile:</p>
<p><div class="snippet" data-la... | 3 | 3,909 |
App freezes when a tableViewController is opened | <p>First want to know how can I debug where the issue is, what is stalling the main thread indefinitely. I read somewhere that as soon as my app freezes, i should pause it and see the threads and i'll able to see what is taking up so long. I did that but I cant identify the cause.
<a href="https://i.stack.imgur.com/J0Y... | 3 | 2,448 |
Remove a node from the following XML. | <p>This is the xml I got as an output from the <code>WriteXmlString()</code> of <code>Infragistics ultrawebtree</code>. I am using this to create another <code>Infragistics ultrawebtree</code> with the same structure. But here I don't want the <code><Url>something.aspx..</Url></code>. I want that to be like... | 3 | 3,010 |
Menu bar breaks to the next line / fluctuates in size depending on zoom level | <p>This is my menu bar at 100% on my browser:
<img src="https://i.imgur.com/KdGWB2Q.png"></p>
<p>And this is what happens at certain zoom levels and some other browsers:
<img src="https://i.imgur.com/tqgPM57.png"></p>
<p>Here's a simplified version on fiddle: <a href="http://jsfiddle.net/heetertc/ARGm8/6/" rel="nofol... | 3 | 1,261 |
Python - write to CSV from multiple JSON files | <p>I have been trying and failing all day to write multiple JSON files I am pulling from the nys.gov website on COVID data to one (or more) CSV files.</p>
<p>I can successfully concatenate the JSON files but have not been able to but them together in a format I can utilize to make graphs. I know the issue is somewhere ... | 3 | 1,735 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.