title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Keep app running in background on Android all the time
<p>I have to get people's trajectory (from home to job, for example), so my app gets latitude and longitude (I have two buttons: 1. Start to get lat and lon 2. Stop to get lat and lon). However, I want that android does not kill the app, I want to keep my application running while the user use facebook, twitter (for e...
1
2,787
TypeError: __array__() takes 1 positional argument but 2 were given
<p>I've been doing the pytorch tutorial (<a href="https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html" rel="nofollow noreferrer">https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html</a>) and have been getting this error that I don't know how to fix. The full error is below:</p> <pre><co...
1
1,205
jQuery Flexslider — can't see navigational images (manualControl)
<p>I've spent a lot of time looking at the post on 3/13/12 re: manual controls, but isn't getting me all the way there...probably because I don't know jquery. Sorry, newbie on board.</p> <p>I'm trying to get the right/left arrows to show, as well as the 1, 2, 3...at the bottom. They are there, I see the lists on Fireb...
1
3,213
tabHost.setup() gives null pointer exception (Android studio)
<p>I have a very simple app which is just an activity with a tab view on it.</p> <p>I have initialised and casted everything to as it should be but am continually getting a null pointer error which always links back to </p> <p>tabHost.setup();</p> <p>I am using android studio and am new to java. This question has be...
1
1,955
VirtualBox to be used with Genymotion to be used with Android Studio : Fatal: no bootable medium found
<p>I’m have some trouble with VirtualBox. I put VirtualBox on my PC (Toshiba Satellite, 64 bit os, 8GB RAM, 455GB disk space, Windows 8.1) because I’m attempting to use Genymotion with Android Studio. However, after creating the VM and attempting to run it, I receive this message in the VirtualBox command, <code>Fata...
1
1,414
How to select a row in datagrid from ViewModel in MVVM?
<p>I'm trying to validate user input in a datagrid, the way i'm doing it is like:</p> <p>I) allow user to add a row</p> <p>II) allow user to fill some cells</p> <p>III)when EndEdit() event happens, I would update my Model</p> <p>IV) if Model could not be updated (for example when user didn't supply NotNull va...
1
1,096
How do I troubleshoot boost library/header inclusion via autoconf/automake?
<p>I'm new to autom4te, and I'm trying to use autoconf/automake to build and link a C++ program on multiple architectures. Complicating the linking is the fact that the project requires boost (filesystem, system, program_options).</p> <p>I'm using boost.m4 (from <a href="http://github.com/tsuna/boost.m4/tree/" rel="no...
1
1,398
Mapping Object to Multiple Attributes (Java)
<p>learning about lambdas and streams in my java class and trying to get this one specific part figured out. </p> <p><strong>Here is our assignment:</strong> Use the class, Invoice, provided to create an array of Invoice objects. Class Invoice includes four instance variables; partNumber (type String), partDescriptio...
1
2,817
set ggplot plots to have same x-axis width and same space between dot plot rows
<p><strong>Updated question to incorporate a partial solution already answered on SO</strong></p> <p>I am using <code>ggplot2</code> to create several plots and <code>gridExtra</code> to combine the plots into one figure with several panels, all in one column. My problem is that I can't get the space between the dot p...
1
1,045
How to integrate Darknet Yolo inside Unity/Hololens?
<p>I am currently trying to integrate the Darknet YOLO (<a href="https://pjreddie.com/darknet/yolo/" rel="nofollow noreferrer">https://pjreddie.com/darknet/yolo/</a>) computer vision package into Unity in order to investigate for a research project how fast real-time object detection on it performs in a Hololens device...
1
1,572
How to add and remove class of one element while hovering over another element via Angular?
<p>I'd like to add a class to an <code>&lt;li&gt;</code> when it's child <code>&lt;a&gt;</code> gets hovered over but I can't seem to get it to work. What is happening is that no matter what <code>&lt;a&gt;</code> element is hovered over, only the first <code>&lt;li&gt;</code> gets affected so I need to be able to targ...
1
1,071
React Native Boilerplate failing on iOS
<p>Why won't this work?? I'd appreciate any help...</p> <p>I started my React Native project by using the commands</p> <pre><code>npx react-native init ProjectName npx react-native start npx react-native run-ios </code></pre> <p>I would think this should work out of the box since I haven't changed anything in the boile...
1
3,709
Type 'AnyObject' does not conform protocol 'sequenceType'
<p>So this is my code, I get an error in the following line, saying "Type 'AnyObject' does not conform protocol 'sequenceType'":</p> <pre><code>for bar in allBars { </code></pre> <p>I tried the solution proposed here (<a href="https://stackoverflow.com/questions/25563655/type-anyobject-does-not-conform-to-protocol-se...
1
1,178
Custom column filter kendo ui grid
<p>i've implemented a custom ui filter on the column labourmeansstatusenum. But the function doesn't get called and so the filter doesn't have custom values. any ideas what i'm doing wrong?</p> <pre><code> @(Html.Kendo().Grid&lt;Presentation.Mvc.Models.LabourMeans.LabourMeansViewModel&gt;() .Name("grid") .Column...
1
1,666
*ngIf doesn't delete the element when False, creates new one when True
<p>I am just starting with Angular and have a problem with <code>*ngIf</code></p> <p>When the app starts, <code>*ngIf="item.done"</code> correctly displays (or not displays) the element based on whether the ToDo <code>item</code> is <code>done</code>. However, when I click on the element, the <code>done</code> state <...
1
1,194
Unable to debug a program that uses concurrent async / await
<p><strong>Observations <a href="http://code.msdn.microsoft.com/Async-Sample-Example-from-9b9f505c" rel="nofollow noreferrer">on this program</a>:</strong></p> <ul> <li><p>Pressing F11 slowly through this program doesn't show every execution of <code>ProcessURL()</code></p></li> <li><p>Pressing F11 quickly through thi...
1
2,176
PHP Socket accept_connection hanging
<p>I recently found out that PHP not only has the fsock* functions, but also functions to create a server itself. I decided to experiment a little bit, and came up with this. Now, the problem is that it hangs on <code>accept_connection()</code> (due to the fact that it's waiting for a connection.) I found out that the ...
1
2,959
Validation Failed: 1: source is missing;2: content type is missing; In ElasticSearch?
<p>Hi I am trying to start an embedded elastic search server , then using a java high level rest client to insert a document in to an index. However i am getting the following error . </p> <pre><code>com.openmind.primecast.web.rest.PerformanceReportingIntTest Time elapsed: 68.723 sec &lt;&lt;&lt; ERROR! org.elastics...
1
1,949
force radio buttons to show inline
<p>I am using bootstrap to style a form with radio buttons.</p> <p>Unfortunately display:inline is not making the radio buttons on the form inline. Neither is moving display:inline into css.</p> <pre><code>&lt;div class="row"&gt; &lt;div class="span6 offset3"&gt; &lt;div style="display:inline"&gt; &lt;...
1
1,041
How to set wallpaper to whole screen of device in android
<p>I am using set as wallpaper in my android app. But when I set image as wallpaper its zoom upto some extent on device. I want when I set image as wallpaper. This fit on every screen device. I am using DisplayMetrices but its not working perfect.</p> <p>Code-</p> <pre><code> public class FullImageActivity extends ...
1
1,931
Move text up with CSS
<p>I know this can be off topic but i can't align test in center (vertical align). This is my menu code:</p> <pre><code>&lt;nav class="menu"&gt; &lt;ul class="active"&gt; &lt;li class="current-item"&gt;&lt;a href="#"&gt; &lt;i class="fa fa-home fa-3x" aria-hidden="true"&gt;&lt;/i&gt;&lt;strong...
1
2,052
How To set a profile picture functionality in ionic3
<p>In my Project, I need to save and show profile picture to user in <code>profile.html</code>page.</p> <p>And also allow user to change their profile picture like whatsapp</p> <p>Here I share my codes</p> <p><b><code>profile.html</code></b></p> <pre><code> &lt;ion-content&gt; &lt;img src="{{pathForImage(last...
1
2,214
How to add a builtin function in a GCC plugin?
<p>It is possible for a GCC plugin to add a new builtin function? If so, how to do it properly?</p> <p>GCC version is 5.3 (or newer). The code is compiled and processed by the plugin written in C.</p> <p>It is mentioned in the <a href="http://starynkevitch.net/Basile/gcc-melt/" rel="noreferrer">rationale for GCC plugin...
1
1,076
PL/SQL (INSERT/UPDATE) unique constraint violated error in trigger due to sequencel.nextval
<p>I want insert/update records to another table (MICL_SUPERVISORS) using Trigger (pl/sql oracle 10g). </p> <p>When trigger fired it is giving an error as </p> <blockquote> <p>ORA-00001: unique constraint violated.</p> </blockquote> <p>I know it happens because I want to add <code>SUPID</code> from sequence</p> ...
1
1,956
Cant get SharedPreferences for a widget
<p>I want to develop a widget... But i have a problem when passing strings to the widget from AppWidgetProvider...I am doing this through shared preferences</p> <p>The problem comes when I store a variable in SharedPreferences, when I try to obtain its value, it returns not a null value but something like this: "" </p...
1
2,357
Couchbase error: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value
<p>I have a <code>Spring-boot</code> app that saves data to a <code>Couchbase</code> server.</p> <p>I like to save about 500k Students using this code:</p> <pre><code>for (String student: students) { ... bucket.upsert(JsonDocument.create(&lt;unique key here&gt;, TTL, JsonObject.fromJson(studentAsJson))); ...
1
1,451
nginx to expose internal http service as https subdomain
<p>I have found several partial answers on this site and similar ones, but I couldn't figure out how to put them together, or maybe the answer is there and I cannot recognise it :-/</p> <p>What I'm trying to achieve:</p> <p>I have an http service running in the LAN (I have setup dnsmasq appropriately) as:</p> <p><a ...
1
1,336
Detecting GSM Call States in IOS 10 (Swift 3, Xcode 8) and Notification from Background state
<p>TLDR: Detect call end event from background <strong>Please see update to the question below:</strong></p> <p>Is it possible to detect/get an event for call state in IOS 10 using Swift from <strong>background state</strong>. In the earlier versions there was a <a href="https://developer.apple.com/reference/coretelep...
1
1,287
Passing custom object between Android activities in C#
<p>I am creating an android app in VS2012 using Xamarin.Android. I am displaying a custom list in Main screen. I need to pass a custom object(with ID,String,String,String properties) from this Main activity to another when user clicks on list item.</p> <p>Can anyone please help me with some example?</p> <p>edit:</p> ...
1
2,342
Android - "thread exiting with uncaught exception (group=0x40015560)"
<p>This problem seemingly appeared from nowhere, and it's been turning me insane for the past two and half hours. I've been all around the internet, looking for a solution, but my quest was in vain.</p> <p>I've therefore decided to ask for help.</p> <p>My Android game compiles fine, and it used to run fine, but now i...
1
3,712
ASP.Net MVC - "Cannot Create Instance of an Interface"
<p>I've been trying to solve this problem for a while now, and I'm at a dead end, so maybe you guys can help. Note that this is not related to this question.</p> <p>I am using Entity-Code First within MVC3. I must have done something dodgy to one of my objects, because when it first tries to create the database and ...
1
2,642
com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.datastax.driver.core.Cluster
<p>I am getting the below error while trying to insert some data into a Cassandra table from Spark.</p> <pre><code>com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.datastax.driver.core.Cluster at com.google.common.cache.LocalCache$Segment.get(Loca...
1
1,366
Javascript memory leaks: why would assigning object to null work?
<p>Can someone scratch an itch for me in regards to the nature of assignment-to-null fix used to prevent memory leaks?</p> <p>We are all familiar with the following technique to stop the circular reference between the DOM object and the JS object, in order to prevent memory leaks:</p> <pre><code> function foo() { ...
1
1,396
How can I render an entity (choice <select>) field as a <ul> field in Twig?
<blockquote> <p>Symfony renders an <a href="http://symfony.com/doc/current/reference/forms/types/entity.html" rel="nofollow noreferrer"><code>entity</code> field type</a> like a <code>choice</code> dropdown - a <code>select</code>, basically. However, the CSS framework that I'm using defines a sort of 'select' as a <...
1
1,201
Deleting files with special characters
<p>I want to purge log files from a build server, keeping the last few days. I have no trouble with the log files my process creates. This works fine:</p> <pre><code>$logFolders = Get-ChildItem $buildBase -Recurse -include logs -Attributes D $logFolders | ForEach-Object { Get-ChildItem $_.fullname -filter *.log | wher...
1
1,373
Passing parameter from function to another function in Django
<p>I have these two functions in <code>views.py</code> namely: <code>create_excel</code> and <code>section_landpins</code>.</p> <p><code>section_landpins</code>:</p> <pre><code>def section_landpins(request): if request.method == "GET": get_id = request.user.id pnt = ButuanMaps.objects.get(clandpin...
1
1,204
Why cursorLoader didn't notify changes in source data?
<p>I have a simple contentProvider, a layout with a ListView and a button for adding Items in content Provider and a CursorLoader. The <a href="http://developer.android.com/reference/android/app/LoaderManager.LoaderCallbacks.html#onLoadFinished" rel="nofollow noreferrer">android.content.Loader, D</a> reference states t...
1
1,319
No matching service worker detected
<p>I added a service worker to my application using the command:</p> <pre><code>ng add @angular/pwa --project ng-zero </code></pre> <p>It responded with this in the terminal:</p> <pre><code>Installed packages for tooling via npm. CREATE ngsw-config.json (441 bytes) CREATE src/manifest.json (1071 bytes) CREATE src/as...
1
2,375
Angular 2 *ngFor causing bootstrap 4 column content to be too skinny
<p>I have a results div that displays search results. The results are in bootstrap columns. However, the columns appear to have a heap of padding or margin, causing my results to be super skinny. If I take out the <code>*ngFor</code> and instead hardcode each result, it displays correctly. </p> <p>Here is the div that...
1
6,246
postgres container throws "forward host lookup failed: Unknown host"
<p>I'm working with docker image that uses Python3.6 as its base. All of the sudden it started crashing (exiting right after start up). So I bashed into the container and found out that it crashes because connection to containerized postgres database fails all of the sudden. The only error output I managed to get is <c...
1
1,511
Adding try/catch block in bytecode through ASM
<p>I am new to ASM and I want some help related to bytecode transformation.</p> <p>Question: I would like to add try/catch block for the entire method in bytecode through ASM and want to run the method with out using java -noverify option. I can able to add try/catch block for the entire method but when I tried to exe...
1
3,035
TypeScript connect React-Redux decorator with stateful component
<p>I have create an illustrative component <code>Hello</code> where I attempt to use proper types for <code>props</code> and <code>state</code> while using the <code>connect</code> decorator from React-Redux.</p> <p>You can play along in the <a href="https://github.com/TomasHubelbauer/react-redux-typescript-connect-de...
1
1,746
maven release:prepare skips test-jar
<p>I`m using maven ver. 3 with following plugin to generate separated *.jar file with tests.</p> <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt; &lt;version&gt;2.4&lt;/version&gt; ...
1
1,479
aws CloudFormation AWS::EC2::Instance BlockDeviceMappings and Volumes
<p>I am sort of confused about two AWS::EC2::Instance properties: <code>BlockDeviceMappings</code> and <code>Volumes</code>.</p> <p>I have read documentation a number of times but still don't really understand the difference.</p> <p>Here is my template:</p> <pre><code> { "AWSTemplateFormatVersion" : "2010-09-09", ...
1
1,371
Soft keyboard's POPUP layout
<p>I'm developing a soft keyboard and doing well, but I don't know how to customize the popup layout for a long keypress.</p> <h3>My KeyboardView: </h3> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;android.inputmethodservice.KeyboardView xmlns:android="http://schemas.android.com/apk/res/android" androi...
1
2,451
How to "addTiles" on top of "addPolygons" in R's Leaflet?
<p>How do you set the layer order in R's leaflet package so that tiles show up on top of polygons filled with color?</p> <p>Here's what I've got so far:</p> <pre><code>require(leaflet) require(acs) require(tigris) require(rgdal) census.income.end.year = 2015 county = 17 nd.counties=acs.fetch(geography=geo.make(state=...
1
1,104
Improving performance with Three.js
<p>I am currently writing my first Three.js / WebGL application and it runs very well on my PC (Chrome). Sadly, on many other PCs, the framerate often drops bellow 30 frames per second.</p> <p>Since the application actually isn't to complex, I wanted to ask for some tips related to the application to improve the perfo...
1
1,869
Streaming videos from firebase storage in flutter
<p>To play a video in Flutter, you have to instantiate its Url in the init() method. So How to get a list of video Url's from Firestore? If I retrieve the Url from Firestore in the form of Future then the Video player is not accepting it because it accepts only String and and not Future objects.</p> <pre><code>import ...
1
1,278
resize SWT text field dynamically
<p>I have an SWT text field, whose content length will vary dynamically. I need to make the complete text visible. I am using the below code to do that. </p> <pre><code>public class MyDynamicDialog extends TrayDialog { Text errorMessageText; ScrolledComposite scrolledComposite; Shell shell; Dyna...
1
1,406
Checking if user already logged in, cookie check
<p>I am having an issue with something I have already posted but I thought I would ask the problem again as I have more code with it now.</p> <p>The ORIGINAL code that I have used for the tutorial</p> <pre><code>function checkLoggedIn($page) { $loginDiv = ''; $action = ''; if (isset($_POST['action'])) { ...
1
5,018
Java servlet redirect between two different jersey REST services
<p>We have an existing Jersey REST service in our application(URL: /rest/*). A sample URL looks like: <code>http://xxx:8080/app/rest/company/getdata</code></p> <p>Based on a <strong>property</strong> we need to redirect the REST call to another context(URL: /newrest/*): A sample URL would look like: <code>http://xxx:...
1
1,284
Compare two strings and highlight the mismatch wherever found
<p>I want to compare two strings and highlight the word(s) wherever there is a mismatch.</p> <p>The code I have written has the following 2 issues : </p> <p>1 . Wherever there is a mismatch, the word gets stored in a 'token' but as soon as the highlight function gets called, it highlights all the words in that string...
1
2,269
Unit test MockHttpServletRequest not returning content type
<p>I would like the application to return JSON object from my Java Classes (both success and fail cases). </p> <p>I had defined a <code>@RestControllerAdvice</code> to handle the errors from controller. My program also shows the error message correctly in json, but the problem is in the <strong>unit test</strong>.</p>...
1
1,275
npm install didn't update the dependencies
<p>I run <code>npm install</code> to update dependencies in <code>package.json</code> of my react-native cli app but this did not work for me I also run <code>npm aduit fix</code> or <code>npm audit fix --force</code></p> <p>I also try to remove the <code>node_modules</code> folder and run the <code>npm install</code> ...
1
8,473
Bootstrap Modal does not load
<p>Modal will not auto load when page is loading. I am wondering what I am doing wrong or if I am missing something. Another issue I am having is I am not able to center the button, is there a way to do that with Bootstrap. Other then that, I was able to make it work with a button. Thank you for all your help, I am lea...
1
1,857
Sending data to php from windows phone
<p>I need to send some data from windows phone 7 to php page through POST method, I have the following code at wp7 side</p> <pre><code> public void SendPost() { var url = "http://localhost/HelpFello/profile.php"; // Create the web request object HttpWebRequest webRequest = (HttpWebReque...
1
1,134
Controller on Spring Boot 415 Unsupported Media Type
<p>Hello I have the following configuration on the Spring Boot on my Controller:</p> <pre><code>@RequestMapping(value = "/test/setgamesets", method = RequestMethod.POST,consumes="application/json") public @ResponseBody Collection&lt;GameSet&gt; setGameSets(@RequestBody ArrayList&lt;GameSet&gt; gmsets) { fo...
1
2,808
Slow Celery Task Times
<p>I'm using <a href="https://www.djangoproject.com/" rel="nofollow">Django</a>, <a href="http://www.celeryproject.org/" rel="nofollow">Celery</a> and <a href="http://www.rabbitmq.com/" rel="nofollow">RabbitMQ</a>. I have a simple task that sends emails. This task works, but its very slow. </p> <p>For example, I send ...
1
1,447
React button not responding to click
<p>My React button's click is not responding to onClick. I am just doing a simple console.log(), and that is not even working. </p> <p>The weird thing is that when I also place the button in App.js, the button will click in my other component but not without it. This makes me think it has something to do with how it i...
1
1,181
Plurality - how to print up multiple winner if number of votes are equal?
<p>Plurality program - The program takes input from user and prints the candidate with the most number of votes. I got two problems and I want that print_winner prints multiple winners in case of tie and it prints all the winners when everyone is tied? How do you suggest I do that? </p> <p>If there are multiple winner...
1
1,289
String ArrayList using Collections
<p>My main <code>activity</code> has multiple <code>ArrayLists</code> and <code>Arrays</code>. When you click the Smoked Cigarette button, the application logs certain information in the <code>ArrayList</code>. One of the <code>ArrayLists</code> locationsSmoked holds all the locations you've smoked at. My task is to ma...
1
2,782
why i am getting Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError?
<p>i found a java file on the web that allows me to read a pdf in a url and save it to my local machine, i have sucsesfully compiled it and customized as a javabean so i can useit in my app, but when i test it i am getting the next error message. i have added the library (PDFOne.jar file) to my project in netbean and ...
1
2,003
Animating a circular UIBezierPath
<p>I've got a project where I'm animating a UIBezierPath based on a set progress. The BezierPath is in the shape of a circle and lies in a UIView and animation is done in drawRect using CADisplayLink right now. Simply put, based on a set progress <code>x</code> the path should radially extend (if <code>x</code>is large...
1
1,178
Splitting string by delimiter in R
<p>I have the following string</p> <pre><code>x &lt;- "b|all|the|experts|admit|that|we|should|legalise|drugs|b|war|in|south|osetia|pictures|made|by|a|russian|soldier|b|swedish|wrestler|ara|abrahamian|throws|away|medal|in|olympic|hissy|fit|b|russia|exaggerated|the|death|toll|in|south|ossetia|now|only|were|originally|ki...
1
1,148
Airflow DockerOperator: connect sock.connect(self.unix_socket) FileNotFoundError: [Errno 2] No such file or directory
<p>I am trying to get <code>DockerOperator</code> work with Airflow on my Mac. I am running Airflow based on <a href="https://github.com/puckel/docker-airflow" rel="noreferrer">Puckel</a> with small modifications.</p> <p>Dockerfile build as puckel-airflow-with-docker-inside:</p> <pre><code>FROM puckel/docker-airflow:...
1
4,288
What is other alternative to use spring bean without wiring
<p>I am using this in my UserDAO and hibernate</p> <pre><code>@Resource(name="sessionFactory"); public SessionFactory sessionFactory; </code></pre> <p>For some reason i am not able to link spring beans in my userDAO from 2 different classes.</p> <p>What is the other alternative of above code i mean something like</p...
1
3,079
handshake failed; returned -1, ssl error code 1, net_error -202
<p>I am trying to add an auth proxy on each browser window that i open up using user input but i get these errors...</p> <pre><code>[20792:21516:1222/011708.284:ERROR:ssl_client_socket_impl.cc(935)] handshake failed; returned -1, SSL error code 1, net_error -202 DEBUG:seleniumwire.proxy.handler:accounts.google.com:443...
1
1,745
org.hibernate.ObjectNotFoundException: No row with the given identifier exists
<p>I'm learning javaEE. Before I put the annotation <code>OneToMany</code> and <code>ManyToOne</code> is everything working well. But then I see this error: </p> <blockquote> <p>INFO: HHH000327: Error performing load command : org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [app.w...
1
2,636
How to rearrange subplots so that one is underneath the other?
<p>I am trying to code two plots such that one plot is underneath the other. However, my code keeps aligning my two plots next to one another. This is my code:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html ...
1
1,325
Flutter Undefined name 'context'. Try correcting the name to one that is defined, or defining the name
<p>Any help please how do i pass the context in this class error says: Undefined name 'context'. Try correcting the name to one that is defined, or defining the name.</p> <p>when i pass the categories name as a string it works fine like the class below works great</p> <pre><code>import 'package:flutter/material.da...
1
1,268
Change fonts in notepad application
<p>A friend and myself are making a NotePad. We are trying to get fonts to change when you click the appropriate button. For example if I press the Italic Button the text I write after that will be Italic until I press the Normal button which will turn it back to the normal font. As far as I can tell the code looks pre...
1
2,236
Send MTOM encoded request from Postman to WCF service
<p>I am trying to create WCF service that can receive MTOM encoded messages. I do not have client that sends MTOM encoded messages, however I do have message example (that's why I am trying to use Postman).</p> <p><strong>Request example:</strong></p> <blockquote> <p>Content-Type: multipart/related; type="applicati...
1
1,477
Nextjs production build problem (Links do not work)
<p>I have built a website in next.js and expressjs and it works great in development. But when I run <code>next build</code> I get thing that does not occur in development.</p> <p>I want to write few points that does happen in production only.</p> <ul> <li>Few links do not work</li> </ul> <pre><code>&lt;li style={{m...
1
1,295
Trying to create a scheduled task to run once using C++ , Task Scheduler 1.0 on win7
<p>I'm trying to create a very simple program which will run Notepad after two minutes (these are all simplified to make a clearer question). I tried to merge some of <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa383579%28v=vs.85%29.aspx" rel="noreferrer">MSDN's examples </a> and to my surprise eve...
1
2,913
JPQL query with CURRENT_DATE - 1 does not work
<p>I am new to <code>JPA2.0</code> and <code>Spring Data JPA</code> where in I am trying to get the details <code>where createdDt &gt; Sysdate and createdDt &gt; sysdate-1</code>. I am not sure if sysdate-1 can be achieved using CURRENT_DATE-1 function, its not working.</p> <p>Any help as below options doesn't works w...
1
2,063
Stack creation is hanging on CREATE_IN_PROGRESS
<p>I have been experimenting with lambda backed custom resources.Iam trying to trigger the Lambda function with Custom Resource. On Stack creation, Custom resource is hanging on CREATE_IN_PROGRESS, but Iam able to get the email and also when trying to delete the Stack, it stucking on DELETE_IN_PROGRESS.</p> <p>Now I h...
1
1,547
Why does the Heroku Rails App crash after upgrading Rails to 6.0.0?
<p>I have an application that I successfully uploaded to Heroku and everything worked fine. After updating with the <code>rails app:update</code> command from version 6.0.0rc1 to 6.0.0, I deployed the application to heroku and after that the Heroku is crashed when the server launch.</p> <pre><code>2019-08-20T12:45:56....
1
1,310
Batchfile: read last lines from logfiles and copy them to a new file
<p>This is my first posting so if the format is not as it supposed to be please excuse me for this. (Suggestions for </p> <p>improvement are welcome.)</p> <p>I am trying to create a batchfile that will read last lines from logfiles and copy them to a new file. </p> <p>Until now I have found <a href="https://stackove...
1
1,320
TransactionScope error in ambient transaction does not rollback the transaction
<p>I use an ambient transaction like this :</p> <hr> <pre><code>using(TransactionScope tran = new TransactionScope()) { CallAMethod1();//INSERT CallAMethod2();//INSERT tran.Complete(); } </code></pre> <p>The method <code>CallAMethod2();</code> returns <code>affected rows =-264</code> So it fails to inser...
1
1,085
Remove item from database in recyclerview
<p>I would like to add a feature that would allow me to remove a row from my recyclerview/database.</p> <p>This feature is integrate to each item of my recyclerview as show in the following picture : </p> <p><a href="https://i.stack.imgur.com/Hwm04.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H...
1
2,463
*** web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
<p>I running ganache on my local and deployed my contract to it using <code>brownie console</code></p> <pre class="lang-sh prettyprint-override"><code>❯ brownie console Brownie v1.17.1 - Python development framework for Ethereum BeautyEthereumProject is the active project. Brownie environment is ready. &gt;&gt;&gt; ER...
1
4,292
How to write a Jest Test for Login Screen page
<p>I had a login screen which use TWJ ( user token) by call auth API, when user click submit it will store user token and fetch the right data in screens, I'm tried to write the first jest unit test which allow to test the login class to pass with the right email login address, follow are code:</p> <p>LogIN screen:</p...
1
3,760
Using Q promises in HTTP requests with NodeJs
<p>I'm trying to make a chain of promises functions which use HTTP requests in NodeJS with Kraken framework.</p> <p>My code could work in 90% of cases, but if the distant requested server takes time to respond, the code will return an error with undefined values. So I think Q is a good solution to prevent that.</p> <...
1
1,330
jQuery search filter show the list item header
<p>I have following list</p> <pre><code>&lt;ul id="fromList"&gt; &lt;li class="header"&gt;-ABC-&lt;/li&gt; &lt;li class="item"&gt;123&lt;/li&gt; &lt;li class="item"&gt;258&lt;/li&gt; &lt;li class="item"&gt;189&lt;/li&gt; &lt;li class="item"&gt;545&lt;/li&gt; &lt;li class="header"&gt;-CDE-&lt;/...
1
1,141
Xamarin: The name 'x' does not exist in the current context
<p>I'm new to Xamarin development and I'm hopeful there's a quick fix for this seemingly easy issue. </p> <p><strong>My Environment</strong></p> <ul> <li>Xamarin Studio Community on Mac 6.1.3 (build 19) </li> <li>Xamarin.Android 7.0.2.42 </li> <li>Xamarin.Ios 10.3.1.7 </li> <li>Xcode 8.2.1 </li> <li>Mac OSX 10.1...
1
9,041
Installed beignet to use OpenCL on Intel, but OpenCL programs only work when run as root
<p>I have an Intel HD graphics 4000 3rd Gen Processor, and my OS is Linux Mint 17.1 64 bit. I installed <code>beignet</code> to be able to use <code>OpenCL</code> and thus run programs on the GPU. I had been having lots of problems using the <code>pyOpenCL</code> bindings, so I just decided to uninstall my current <cod...
1
8,943
Spring boot hibernate 5 integration error
<p>I am trying to integrate spring Boot with Hibernate 5 using Java configs. It has been some time since I have used Hibernate. I am getting the below mentioned exception. Can someone please suggest how to resolve this ?</p> <p>Following is my java config file followed by the exception stack trace.</p> <pre><code>pac...
1
2,840
How to handle multiple remote-notification click in IOS
<p>I am trying to open different view controllers based on <code>notification</code> click but when <code>push notification</code> is received it automatically runs the controller code in background so when I open the app through app icon/notification from <code>notification centre</code> it loads the <code>view contro...
1
2,590
How do I get user details in controller of Spring Boot OIDC app?
<p>I have adapted the code from <a href="https://www.baeldung.com/spring-security-openid-connect" rel="nofollow noreferrer">here</a> to call a MitreID OIDC server.</p> <p>My controller:</p> <pre><code> public final String home(Principal p) { final String username = SecurityContextHolder.getContext().getAuthent...
1
2,327
Error inflating class fragment | fragment did not create a view
<p>I'm having this problem:</p> <p><strong>android.view.InflateException: Binary XML file line #31: Error inflating class fragment Fragment com.myapp.mgm.QueryFragment did not create a view.</strong></p> <p>This problem is only happening when in tablet mode. If app runs on phone, it works ok.</p> <p>I have this <cod...
1
5,592
Rails 4 - Allow password change only if current password is correct
<p>In my app, users can edit their profile information. On the edit profile form, the user can make changes to all fields (name, title, and more). On this same form are three fields: <code>current_password</code>, <code>password</code>, and <code>password_confirmation</code>. I am using <code>bcrypt</code>'s <code>has_...
1
1,210
Serializing cyclic object references using DataContractSerializer not working
<p>I'm building an XNA game and I'm trying to save game/map etc. state completely, and then be able to load and resume from exactly the same state.</p> <p>My game logic consists of fairly complex elements (for serializing) such as references, delegates etc. I've done hours of research and decided that it's the best to...
1
1,182
Android Studio: product flavor combination with more than two flavor dimensions (flavor groups)
<p>I am developing an Android application using Android Studio (v 2.1, gradle plugin v 2.1.0). My application has various versions which share a lot of common code so I decided to use flavor dimensions and product flavors to customize code and resources when and where it is requested. This worked fined as long as I onl...
1
1,300
HWIOAuthBundle : No resource owner with name 'check-google'
<p>I installed HWIOAuthBundle.</p> <p>But I have this error when I try to login with Google Account :</p> <blockquote> <p>No ressource owner with name 'check-google'.</p> </blockquote> <p>And I have the same kind of errror with the others API (Facebook, twitter...)</p> <p>This is my security.yml :</p> <pre><code...
1
1,936
Adding image files into JSON object and displaying it in HTML?
<p>I am a total beginner at coding, and I signed up here just to ask this question. I'm wondering if any of you can point me to the right direction or help me out with this code. First off, my goal is to create an art portfolio that shows my art in a 3x3 format, basically the same format look as Instagram. </p> <p>So ...
1
3,003
JQuery function submit() not submitting form
<p>I can't get the form to submit, the <code>alert ($('#submit').val());</code> in the <code>else</code> with the submit comes up so the code is getting into the right place, but the form is not submitting.</p> <p>Form has an id of othernames, submit button was called name and id of save at one point, currently both a...
1
1,619
Changing material-ui theme on the fly --> Doesn't affect children
<p>I'm working on a react/redux-application where I'm using material-ui.</p> <p>I am setting the theme in my <strong>CoreLayout-component</strong> (my top layer component) using context (in accordance to the documentation). This works as expected on initial load. </p> <p>I want to be able to switch themes during runt...
1
1,056
Laravel 5.5 FormRequest custom error messages validation not working
<p>I'm using the following standard code to validate a form which makes use of various arrays. The rules are correctly implemented, but when using the standard 'messages()' method override, Laravel does not pick up the messages, but simply returns the standard built in messages.</p> <p><strong>Output</strong></p> <pr...
1
1,219
Unable to see Apache POI updated data value in BarChart in pptx without editing
<p>I have a pptx template, it has just 1 slide for testing purpose. The slide has a simple bar chart. I am able to edit the bar chart by double clicking it on pptx file and I could change the values in Sheet1 (Data sheet for Barchart), and, I able to see the changes immediately in BarChart.</p> <p>Now, I am trying to ...
1
2,080
Open Primefaces dialog and Process Full JSF Lifecycle
<p>I'm doing a <code>&lt;p:commandLink value="#{bundle['registered.home.search.TEXT']}" onclick="webSearchDlg.show();"&gt;&lt;/p:commandLink&gt;</code> in order to show the below dialog. The p:outputPanel id="searchPnl" always renders after its initially rendered. It never disappears even though the dialogs <code>clo...
1
2,523