title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Move-Item causes "File Already Exists" error, despite folder having been deleted | <p>I have some code which deletes a folder, then copies files from a temporary directory to where that folder had been.</p>
<pre><code>Remove-Item -Path '.\index.html' -Force
Remove-Item -Path '.\generated' -Force -Recurse #folder containing generated files
#Start-Sleep -Seconds 10 #uncommenting this line fixes the ... | 0 | 1,070 |
Error in Python: name 'df' is not defined | <p>Im new in python, many hours googled and search here in stackoverflow. But still have problem with my code. I need run <em>foo</em> function in time interval, and fill dataframe (eg every second add timestamp to df). I'm still coming across a error message: <strong>NameError:</strong> <em>name 'df' is not defined</... | 0 | 1,055 |
A second operation started on this context before a previous asynchronous operation completed | <p><strong>Message:</strong></p>
<pre><code>"System.NotSupportedException was unhandled
Message: An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll
Additional information: A second operation started on this context before a previous asynchronous operation completed. Use 'await' to e... | 0 | 1,941 |
Python file not closing | <p>I wrote a program to do some processing to a little bit big amount of data. Three steps are involved there:</p>
<ol>
<li>Read data</li>
<li>Do Processing</li>
<li>Write Data to a file.</li>
</ol>
<p>While running the code first two steps done successfully.(As data is huge for my laptop configuration, I am using swap... | 0 | 2,201 |
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path | <p>I'm building the basic Slick game example explained here: <a href="http://slick.cokeandcode.com/wiki/doku.php?id=01_-_a_basic_slick_game" rel="noreferrer">http://slick.cokeandcode.com/wiki/doku.php?id=01_-_a_basic_slick_game</a>, and I'm running into some problems. Specifically, the game compiles just fine, but when... | 0 | 1,799 |
Can I get Memcached running on a Windows (x64) 64bit environment? | <p>Does anyone know <strong>IF</strong>, <strong>WHEN</strong> or <strong>HOW</strong> I can get <a href="https://memcached.org/" rel="noreferrer">Memcached</a> running on a Windows 64bit environment? </p>
<p>I'm setting up a new hosting solution and would much prefer to run a 64bit OS, and since it's an ASP.Net MVC s... | 0 | 1,106 |
Encoder (codec none) not found for output stream #0:1 | <p>Hi i built ffmpeg executable on Redhat5. I want to mix two Audio using the command multiple
"ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT.mp3". </p>
<p>I enabled libflamemp3 library without any error. </p>
<pre><code>[root@localhost ~]# ffmpeg -i /ro... | 0 | 1,658 |
Forms Authentication and authentication cookie not persisting | <p>aware that there are a lot of questions relating to Forms Authentication and the persistence of cookies, but having spent most of a day delving around, I'm still having difficulties.</p>
<p><strong>My Problem</strong></p>
<p>I am working on a web app (VS2010 but webapp is f/w 3.5) which restricts access to certain... | 0 | 3,111 |
jboss-deployment-structure.xml does not loads the dependencies in My EAR project | <p>this is my jboss-deployment-structure.xml of EAR project.</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure >
<deployment>
<dependencies>
<module name="org.javassist" export="true" />
<module name="org.apache" export="true"/>... | 0 | 2,167 |
How to pass data through a redirect to a view in laravel | <p>How can I pass data from a controller after it performs certain action to a view through a <code>redirect()</code> if I have a get route for it?</p>
<p>The logic of the app is to redirect with an <code>user_id</code> to a view where the user will select its username after successfully verified its email.</p>
<pre>... | 0 | 1,220 |
How to call a REST end point using Airflow DAG | <p>I'm new to Apache Airflow. I want to call a REST end point using DAG.
REST end point for example </p>
<pre><code>@PostMapping(path = "/api/employees", consumes = "application/json")
</code></pre>
<p>Now I want to call this rest end point using Airflow DAG, and schedule it. What I'm doing is using SimpleHttpOperato... | 0 | 1,771 |
Problem with binding Nullable value to WPF ComboBox | <p>I am binding a WPF ComboBox to a nullable property of type MyEnum? (where MyEnum is an enumerated type)</p>
<p>I am programmatically populating the ComboBox items like this:</p>
<pre><code>// The enum type being bound to
enum MyEnum { Yes, No }
// Helper class for representing combobox listitems
// (a combinatio... | 0 | 1,213 |
How to get the country code from mobile number using php | <p>i am getting mobile number from database in database i am haveing more the 1000 mobile numbers,my database look like this</p>
<pre><code> mobilenumber
971525478965
919844005522
45712345678
</code></pre>
<p>i want to go through each number in the database and find the <code>countrycode</code> from the mo... | 0 | 1,059 |
How to specify column names in Hibernate/JPA when inheritance is involved? | <p>I think I'm trying to have my cake and eat it too here, but we'll see if there's a plausible solution to what I'm looking for. I have a Spring Boot/JPA/Hibernate app that will be talking to MySQL as its backing store. I have several cases where my entity classes form, from an OOP perspective, a parent/child hierarch... | 0 | 1,144 |
Union of two columns in the same table | <p>Say I have the following two columns in the same table</p>
<pre><code>Column 1
--------
1
2
3
Column 2
--------
4
5
6
</code></pre>
<p>How do I get a result which gives me:</p>
<pre><code>Columns
--------
1
2
3
4
5
6
</code></pre>
<p><strong>Edit</strong></p>
<p>What I'm really looking for is to make sure ther... | 0 | 1,132 |
DRF auth_token: "non_field_errors": [ "Unable to log in with provided credentials." | <p>Both JWT packages written for Django gave me issues with poor documentation, so I try DRF-auth_token package. This is a good example I followed, <a href="https://stackoverflow.com/questions/14838128/django-rest-framework-token-authentication">Django Rest Framework Token Authentication</a>. You should in theory be ab... | 0 | 1,319 |
Log4net SmtpAppender not working | <p>I tried to use this configuration :</p>
<pre><code><log4net>
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender,log4net">
<to value="myaccount@supinfo.com" />
<from value="support@company.com" />
<subject value="TimeZone Crash log" />
... | 0 | 3,182 |
Saving form data to local storage and show it on refresh | <p>I am making a form where users can input their data. I'd like for this date to be saved by use of local storage. But when i refresh the page only height and weight are still remembered. And i have been quite stuck on trying to make gender , sportivity and birthdate be remembered as well.</p>
<pre><code><!DOCTYPE... | 0 | 1,583 |
Failed to load all resources - error 500 | <p>I have a problem where i get this error in the developer console, for all css, image and js files:</p>
<pre><code>Failed to load resource: the server responded with a status of 500 (Internal Server Error)
</code></pre>
<p>The file name and path looks fine and it's happening for ALL resources. The project is an ASP... | 0 | 1,700 |
OpenCV 3.0.0 SurfFeatureDetector and SurfDescriptorExtractor Errors | <p>I am attempting to implement the OpenCV 3.0.0 SURF Feature Description and Detection but after running the sample code on the OpenCV site, I receive a load of errors all related to SURF. Any idea of what could be going wrong? Thanks!</p>
<pre><code>#include <stdio.h>
#include <iostream>
#include "opencv... | 0 | 4,039 |
Parse error: syntax error, unexpected ' ' (T_STRING) | <p>I get this error:</p>
<blockquote>
<p>Parse error: syntax error, unexpected ' ' (T_STRING) in >/home/bijouven/public_html/app/design/frontend/default/magikjewellery/template/checkout/success.phtml >on line 30</p>
</blockquote>
<p>This is line 30 of success.phtml :</p>
<blockquote>
<p>$orderObj = Mage::getMo... | 0 | 6,093 |
How to fix - "This version of the application is not configured for Market Billing"? | <p>I keep getting this error when I try to make an in-app purchase. I have uploaded a previous version of this app where I was able to make in-app purchases successfully! I have looked at the manifest file and it is identical (except for the version code) - but I cannot shake off this error :(</p>
<p>Is there a docume... | 0 | 1,715 |
PHP Mime type checking alternative way of doing it? | <p>I noticed that get_mime() is now depreciated so what would be an alternative way of creating the following function? This function is used through a cms that I work with so need a reliable alternative.</p>
<pre><code>// Mime Type Checker
function get_mime ($filename,$mode=0) {
// mode 0 = full check
// mod... | 0 | 1,462 |
MVC Net Core Sidebar Navigation Menu Placing in _Layout.cshtml | <p>I created a simple MVC Net Core Default Project. I made some adjustments so it looks picture. Right now _Layout.cshtml only has top Navigation bar.</p>
<p><a href="https://i.stack.imgur.com/9Rstp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Rstp.png" alt="enter image description here"></a></p... | 0 | 3,611 |
root finding in python | <p>Edit: A big issue here is that <code>scipy.optimize.brentq</code> requires that the limits of the search interval have opposite sign. If you slice up your search interval into arbitrary sections and run <code>brentq</code> on each section as I do below and as Dan does in the comments, you wind up throwing a lot of u... | 0 | 1,154 |
Django, rendering a view from another view (call a specific URL) | <p>I have a little form:</p>
<pre><code><form action="#" method="post">
{% csrf_token %}
<label>Company Number:</label>
<input type="text" name="company" placeholder=""/><br>
<input type="submit" id="regist... | 0 | 2,204 |
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_14f7ee5/Offline | <p>I'm seeing the following error in my Android project after updating to Gradle Build Tools 2.1.3 and Gradle 2.14.1. It happens immediately when I run the application. How do I fix this?</p>
<pre><code>java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_14f7ee5/Offline;
at com.ourapp.n... | 0 | 1,220 |
How to change the navbar position? CSS & HTML | <p>I hope I can explain all what I need of you guys here :)</p>
<p>I want to get some like this:
<a href="http://i.imgur.com/OzyQlHC.png" rel="nofollow">http://i.imgur.com/OzyQlHC.png</a></p>
<p>But on my code, I tried a few things, but I can't get that end :S I don't know to do it and I dont found exactly what I wan... | 0 | 1,030 |
Testing Log Output Java Spring | <p>I have a spring boot 2 application running on java 10 using SLF4J and logback as the underlying logger.</p>
<p>Given the following spring component:</p>
<pre><code>import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@Service
public class MyClass {
private s... | 0 | 1,098 |
WPF Border element background animation | <p>I want to animate the background of a border when the mouse is enters and leaves.</p>
<p>Here is my code</p>
<pre class="lang-xaml prettyprint-override"><code> <Style TargetType="{x:Type Border}">
<Style.Triggers>
<EventTrigger RoutedEvent="Border.MouseEnter">
... | 0 | 1,476 |
Connection Error: A connection attempt failed because the connected party did not properly respond after a period of time | <p>I'm developing some software in python that utilizes Steam APIs. I'm using Flask to run and test the python code. Everything was going swell, but now I'm getting this error (I haven't changed any code):</p>
<blockquote>
<p>('Connection aborted.', error(10060, 'A connection attempt failed
because the connected p... | 0 | 2,053 |
How to reference a theme attribute in a style? | <p>I've got a following problem. I want to customize appearance of row in a list, but exception is thrown during inflating.</p>
<p>piece of code in style.xml</p>
<pre><code><style name="AppTheme.Main">
<item name="item_shadowColor">#000000</item>
</style>
<style name="item_... | 0 | 1,849 |
golang , How to count elements in struct type interface{}? | <p>I'm rather new in Go, but trying hard..</p>
<p>I'm trying to write some logick, that need to check if an attribute of struct consists only of one element, or the first element has only one child. </p>
<p>Main struct is this : </p>
<pre><code>type ChartOptins struct {
Filters Filter `json:"filters"`
Charts... | 0 | 1,243 |
Bundle update & install fail after OS X lion upgrade - Rails 3 | <p>I Just updated to OS X Lion, and now when I run <code>bundle update</code> and <code>bundle install</code>, they both fail for different reasons.</p>
<p>Bundle Install gives me this error:</p>
<pre><code>Using friendly_id (3.2.1.1)
Installing json (1.5.3) with native extensions /.rvm/rubies/ruby-1.9.2-p0/lib/ruby... | 0 | 4,968 |
VueJS, ReferenceError: google is not defined | <p>I have the following source code and I got also the following error when I try to instantiate a new var with <code>google.maps ...</code>:</p>
<blockquote>
<p>google' is not defined</p>
</blockquote>
<p>Many of the answers talked about loading the API script asyncronously before everything else, and the order of... | 0 | 1,054 |
Method not found: 'System.Type System.Runtime.InteropServices.Marshal.GetTypeFromCLSID(System.Guid)' | <p>I spent a good deal of time writing this program on my dev box, after moving it to our production boxes I get the error below. Just an FYI I don't have any control over what is installed and what can be installed, how can I make this work? Under both framework on both computers we have v1.0.3705, v1.1.4322, v2.0.507... | 0 | 4,021 |
RelativeLayout not handling "toLeftOf" and/or toRightOf correctly | <p>I have been looking for a solution to the issue with "toLeftOf" and "toRightOf" when using RelativeLayout, but haven't found a real solution or good answer to this behaviour:</p>
<p>Basically, "toLeftOf" isn't working too well.</p>
<p>I have two EditText, and I want an image to be displ... | 0 | 2,941 |
Jquery Click Event Not Firing On First Click, but does on second click, why? | <p>I've got a jQuery code, which</p>
<pre><code>$("a.reply").click(function() {
//code
});
</code></pre>
<p>When I click the link with <code>.reply</code> class the first time, nothing happens. The second time I click, the code inside the click function works.</p>
<p>The link is being inserted on the page u... | 0 | 1,464 |
Authenticating using LDAP with spring LDAP API and without using spring security | <p>I am using spring-ldap-core plugin in my Sprint boot application.
Basically, the LDAPTemplate - <a href="http://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/core/LdapTemplate.html" rel="nofollow">http://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/core/LdapTem... | 0 | 1,262 |
Node.js - Resource interpreted as Script but transferred with MIME type text/plain | <p>First off: I'm not using Express. </p>
<p>With that out of the way, when I load my <code>index.html</code> file it recursively <code>readFile</code> every attached file such as my CSS and JS pages. But it always returns this error in my inspector (Chrome):</p>
<blockquote>
<p>Resource interpreted as Script but t... | 0 | 1,062 |
org.springframework.beans.factory.BeanCreationException Error creating bean with name 'sessionFactory' defined in ServletContext | <p>I try to deploy the application, but the console show me this error, I'm not familiar with Spring MVC and Hibernate 3 this is my first project </p>
<pre><code> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applica... | 0 | 7,224 |
JPA With Hibernate Error: [PersistenceUnit: JPA] Unable to build EntityManagerFactory | <p>I have a problem with Java Persistence API and Hibernate.
My situation of project is:</p>
<p><img src="https://i.stack.imgur.com/Z3vgG.png" alt="enter image description here" /></p>
<p>My persistence.xml file is:</p>
<pre><code><persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:x... | 0 | 3,157 |
State being reset | <p>Newbie to React & React hooks. I'm trying to understand why my state is being overwritten by initialState.</p>
<p>When I input a value, things work as expected. However when I resize the window it resets it to the initialState and I'm not sure why.
After inserting values into the inputs <code>updateBox</code> d... | 0 | 1,746 |
Realm crashes with RLMException: object has been deleted or invalidated | <p>I have a realm model that stores time line (i am making video editing app) and quite frequently it crushes on accessing it's RMArray property. The app is already shipped and I haven't experienced it myself but my crushlytics notifies me about this crash quite oftenly. Here is the crash log:</p>
<pre><code>Fatal Exc... | 0 | 2,245 |
How to center GridView correctly? | <p>I have been trying and trying and no such luck. I have lucked at all other answers on here as well related to centering <code>GridView</code> and also no luck. This is my <code>GridView</code> xml:</p>
<pre><code><GridView
android:id="@+id/calendar_grid"
android:layout_width="match_parent"
... | 0 | 1,247 |
wpf scrollviewer mousewheel not working with stackpanel | <p>I have a stackpanel wrapped with a scrollviewer. inside the stackpanel I've some grids and inside the grids there're stackpanels again and some tiles control by MahApps Metro.</p>
<p>the scrollviewer is working fine if I drag the scrollbar. but mousewheel not working. may be some control is stealing the mousewheel ... | 0 | 1,406 |
How to pass multiple values through command argument in Asp.net? | <p>I have ImageButton with CommandArgument attribute which is having multiple Eval value. When I click one of them I want to pass values to ImageButton2_Click event but it does not work because Command arguments is null.</p>
<pre><code><div class="sag-re-icerik" id="icerik2" runat="server">Lorem ipsum dolor sit ... | 0 | 1,160 |
How do I save an Excel file without getting a format warning when opening, using C# and Excel 2010 | <p>I'm using Excel 2010.
I'm trying so save my excel file, with this code.
It does save a .xls file, but when I open the file I get this message: </p>
<blockquote>
<p>The file you are trying to open, 'tre.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and ... | 0 | 1,100 |
How do I get jboss to display log.debug messages? | <p><strong>myController.java</strong></p>
<pre><code> private static final Logger log = Logger.getLogger(myController.class
.getName());
@GET
@Path("/testDebug")
public String testDebug(@Context final ServletContext context)
{
log.error("This is an error message");
log.debug("This is a debug message");... | 0 | 2,118 |
docker login in custom gitlab-runner: No such host (http://docker:2375/v1.39/auth: dial tcp: lookup docker on 172.31.0.2:53: no such host) | <p>I have a private repo on gitlab.com. I have already setup a CI/CD pipeline using gitlab shared runners. On code push, a docker image is built, login to gitlab private docker registry and push the image. It works fine with the shared runners. Now I'm trying to create custom runners for the pipeline.</p>
<p>I've crea... | 0 | 1,488 |
Speeding up writing images into hard disk in OpenCV | <p>I am working with a 50 fps camera (in Ubuntu environment and Qt framework) and every 20 ms I get a frame to process.</p>
<p>I wrote a code to read images from camera and then store them in hard drive.</p>
<pre><code>while(3.14)
{
cv::Mat Camera_Image = Capture_Image();
double T1 = (double)cv::getTickCount();
cv... | 0 | 1,500 |
getting Ant build error: Cannot run program "python" | <p>This is the build file:</p>
<pre><code><exec executable="python" failonerror="true">
<arg line="${installer.izpack.dir}/utils/wrappers/izpack2exe/izpack2exe.py"/>
<arg line="--file=${basedir}/installer/EasyIT-installer.jar"/>
<arg line="--output=${basedir}/installer/EasyIT-installer.exe"/... | 0 | 1,171 |
"'Credentials' object has no attribute 'access_token'" when using google-auth with gspread | <p>I'd like to use <a href="http://gspread.readthedocs.io/en/latest/" rel="noreferrer"><code>gspread</code></a> module to edit Google sheets from Python. The <a href="http://gspread.readthedocs.io/en/latest/oauth2.html" rel="noreferrer">setup instructions</a> contain the following example:</p>
<pre><code>import gsprea... | 0 | 1,353 |
Generating a new ASP.NET session in the current HTTPContext | <p>As a result of a penetration test against some of our products in the pipeline, what looked to be at the time an 'easy' problem to fix is turning out to be a toughy. </p>
<p>Not that it should of course, I mean why would just <strong>generating a brand new session for the current <code>HTTPContext</code></strong> b... | 0 | 1,058 |
ASSERTION ERROR: Type passed in is not ComponentType, it does not have 'ɵcmp' property | <p>I get this error whenever the app is running, though is not causing me problems in current development (i think) I would like to understand this error and know where it comes, because I'm completely lost, I can't even post relevant code. But i'll try..</p>
<p>So these are the main routes (appModule):</p>
<pre><cod... | 0 | 1,335 |
What does axis=[1,2,3] mean in K.sum in keras backend? | <p>I'm trying to implement a custom loss function for my CNN model. I found an <a href="https://github.com/rekon/Smoke-semantic-segmentation/blob/linknet-implementation/LinkNet.ipynb" rel="noreferrer">IPython notebook</a> that has implemented a custom loss function named Dice, just as follows:</p>
<pre><code>from kera... | 0 | 1,075 |
Error "An object reference is required for the non-static field, method or property 'QuickSharp.CokeMachine.TotalInsertedCoins'" | <p>I get the following error when compiling:</p>
<blockquote>
<p>CS0120: An object reference is required for the non-static field, method or property 'QuickSharp.CokeMachine.TotalInsertedCoins'</p>
</blockquote>
<p>This is because I'm trying to use the TotalInsertedCoins variable from another class (CokeForm). How ... | 0 | 3,980 |
Spring Security Java configuration for authenticated users with a role | <p>I am trying to configure Spring Security using Java configuration with Spring Boot.</p>
<p>My WebSecurityConfig class has a configure method like this</p>
<pre><code>@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/", "/login"... | 0 | 1,604 |
How to use shared preferences to keep user logged in flutter? | <p>I want to keep the user logged in after the user successfully logsin in flutter.
I am using a REST API to retrieve the user name and password of the user. But I want to save those details so that the user can stay logged in. My current situation is i can successfully log the user in but when i restart the app i have... | 0 | 1,714 |
Custom Plotly Markers based on variable value | <p>I am using the following code to create a simple plotly line chart in Python. I have two variables (at the bottom of the code):</p>
<pre><code>ctime
amount
</code></pre>
<p>ctime just using the current time for each element in amount; there are 10 times
amount is a contained of amounts ranging from 0-1000; the are... | 0 | 1,732 |
Spring Specification and Pageable | <p>How can I use <code>Specification</code> and <code>Pageable</code> together?</p>
<p><strong>personelRepository.java</strong></p>
<pre><code>@Query("SELECT e FROM PersonelEntity e ")
List<PersonelEntity> findData(Specification<PersonelEntity> test, Pageable pageable);
</code></pre>
<p><strong>personel... | 0 | 1,264 |
PagedList loses search filter on second page | <p>I'm implementing a simple paged list Index using the example at <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application">http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-pa... | 0 | 1,380 |
Android connection to localhost | <p>I'm trying to connect my android application to a local host url thanks to wamp server but it doesn't work. My goal here, is to fetch json data and parse these data. For my test, i'm using a device not the emulator and i use permission in AndroidManifest.xml : </p>
<pre><code><uses-permission android:name="andro... | 0 | 1,752 |
How to create a function in Powershell script? | <p>How to write a function to avoid Repeated code for my powershell script, which basically display list of application installed on my machine from Add and Remove window present in control panel.</p>
<p>Below is the powershell script </p>
<p>Stack.ps1</p>
<pre><code>Clear-Host
#$scriptPath = split-path -parent $My... | 0 | 1,655 |
rxjs/Subscription has no exported member 'Subscription' | <p>I updated my angular project and all my dependencies to latest version. Without to much trouble I solved most of the dependency issues, but I'm still stuck on RxJS. Here is my package.json: </p>
<pre><code> "dependencies": {
"@angular-devkit/build-angular": "^0.6.0",
"@angular/animations": "^6.0.0",
"@... | 0 | 1,103 |
Get integer value from edittext | <p>When I try to run the code below, my program has stops. I want this code to get the value from <code>edittext</code> but it´s not working as I expected it. What am I doing wrong?</p>
<pre><code>public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCrea... | 0 | 1,567 |
SearchView filter with RecyclerView | <p>I have tried to implement a SearchView with suggestions (filter) in Fragment, but I have not managed it. I tried almost every tutorial but nothing worked for me. I would appreciate any help. Thank you</p>
<p>XML
...</p>
<pre><code> <!--appBar layout-->
<android.support.design.widget.AppBarLayout
... | 0 | 1,674 |
Ruby/Rails: How do you customize the mailer templates of Devise? | <p>I've installed Devise for my Rails app (3.0.1) and it's mostly working. I just <em>can't seem customize the mailer views</em>.</p>
<ul>
<li>My user model is "User".</li>
<li>The devise controllers (which I needed to override so I could tell the controllers what layout file to use) are in <code>app/controllers/users... | 0 | 3,567 |
Navigating between pages with JQuery Mobile | <p>I am working on an application that uses <a href="http://jquerymobile.com" rel="nofollow">JQuery Mobile</a>. My application has 3 screens, that are separated into two separate ASP.NET files. These screens are "Page 1", Page 2 - A", and "Page 2 - B". These screens are placed in the following files:</p>
<p><strong>pa... | 0 | 1,737 |
pandas.core.indexing.IndexingError: Too many indexers | <p>I want to extract electricity consumption for Site 2</p>
<pre><code>>>> df4 = pd.read_excel(xls, 'Elec Monthly Cons')
>>> df4
Site Unnamed: 1 2014-01-01 00:00:00 2014-02-01 00:00:00 2014-03-01 00:00:00 ... 2017-08-01 00:00:00 2017-09-01 00:00:00 2017-10-01 00:00:00 2017-11-01 ... | 0 | 1,097 |
How to use REUSE_ALV_FIELDCATALOG_MERGE function module? | <p>I'm trying to use the function module <code>REUSE_ALV_FIELDCATALOG_MERGE</code> to pass the field label in ddic to display in the column header of the alv report.
But, that didn't work.</p>
<p>If I comment the <code>I_STRUCTURE_NAME = 'TY_YNAH_CUS_OBJ_REQ'</code> line, it give me runtime error state </p>
<blockquo... | 0 | 1,576 |
NullPointerException that doesn't point to any line in my code | <p>I am working on a game where the player can drag and drop things around the screen. I've got a private method which allows me to simulate a drag/drop event for any of the items that the player can move around. For the dragging I am actually leaving the view that they touched where it is and creating a new ImageView ... | 0 | 2,090 |
How can I prevent tons of apache processes spawning when I start apache and proceeding to kill my machine? | <p>I have a highly trafficked application on one debian machine and apache has started acting strange. </p>
<p>Every time I start apache, tons of apache processes are spawned, the app doesn't load at all, and very quickly the whole machine freezes and must be powercycled to reboot.</p>
<p>Here is what I get for top i... | 0 | 1,204 |
Different CUDA versions shown by nvcc and NVIDIA-smi | <p>I am very confused by the different CUDA versions shown by running <code>which nvcc</code> and <code>nvidia-smi</code>. I have both cuda9.2 and cuda10 installed on my ubuntu 16.04. Now I set the PATH to point to cuda9.2. So when I run</p>
<pre class="lang-sh prettyprint-override"><code>$ which nvcc
/usr/local/cuda-9... | 0 | 1,051 |
Posting to controller with jquery ajax in CakePHP | <p>I want to post data to a controller in CakePHP, but posting with JQuery always results in an error and I can't figure out why.</p>
<p>In my view I have the following method, that posts the data to the controller page</p>
<pre><code>function RenameNode(name, id)
{
$.ajax({
type: "POST",
url: '&l... | 0 | 1,243 |
Ant : Compile failed; see the compiler error output for details | <p>I want to run "ant build-project" a project build.xml.</p>
<pre><code> <javac deprecation="true"
includeantruntime="false"
debug="true"
debuglevel="${debuglevel}"
destdir="${project.build.outputpath}"
verbose="true"
encoding="UTF-8">
... | 0 | 1,482 |
error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused)"} | <p>ELK with salesforce</p>
<pre><code>URL:http://localhost:9200/>,
:error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError,
:error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
</code></pre>
<p>docker... | 0 | 3,770 |
Nested BeginCollectionItem | <p>I'm using Steve Sanderson's BeginCollectionItem approach to add dynamic content. Everything works fine when I'm doing it on the first level. However, when try to implement a nested collection meaning a BeginCollectionItem in another BeginCollectionItem, it doesn't seem to work.</p>
<p>My models are as follows:</p>
... | 0 | 1,916 |
Route::controllers - Method [index] does not exist on [App\Http\Controllers | <p>I am running <code>PHP 7.0.25</code> and <code>Laravel Framework 5.5.25</code>.</p>
<p>I would like to use the <a href="https://yajrabox.com/docs/laravel-datatables/master" rel="nofollow noreferrer">laravel datatables package</a> and followed the <a href="https://datatables.yajrabox.com/" rel="nofollow noreferrer">... | 0 | 4,149 |
Circular Layout | <p>I want to develop following screen in Android.<img src="https://i.stack.imgur.com/oWxDH.jpg" alt="enter image description here"></p>
<p>I used <a href="https://github.com/dmitry-zaitsev/CircleLayout" rel="noreferrer">CircleLayout</a> but I am still not able to achieve desired output. See following code and screensh... | 0 | 1,941 |
How do I pass data between pages in PHP? | <p>In a nutshell on "page1.php" I have a calculator that consists of an HTML form, and then the PHP code totals the input and displays the total price. Below the price, it also displays a link to "page2.php" which contains an HTML form where they can enter their contact information. Upon submitting the form the selecti... | 0 | 1,049 |
Get Images and Videos from Android Phone into Custom Gallery | <p>I'm trying to create a custom gallery that allows users to pick from all the photos and videos contained on their Android device. I know how to create a gallery of just photos and just videos, but if I want to combine both, how can I do this? </p>
<p>I think the issue comes down to how I create my cursor. To sele... | 0 | 3,461 |
Getting selected items in Fluent UI DetailsList | <p>I am using <a href="https://developer.microsoft.com/en-us/fluentui#/controls/web/detailslist/basic" rel="noreferrer">Fluent UI DetailsList</a>. In the example the component is implemented as a class component but I am using a functional component.</p>
<p>I am having difficulties in getting the selected items, I ass... | 0 | 1,231 |
Databinding of RadioButtonList using SelectedValue...possible? | <p>I am databinding a GridView to an object datasource. The gridview contains a TemplateField which contains a RadioButtonList with ListItems defined inline.<br>
I want to be able to databind the SelectedValue of the RadioButtonList to the same underlying table as the other grid columns, but it doesn't work! </p>
<p... | 0 | 1,185 |
How to center image vertically in this RelativeLayout | <p>I have below layout which basically show "messages" as bubble slimier to built-in "Messages".
I just need to show also an arrow image on the right, th eimage is shown, but I need it to be centered vertically.
I tried to add " <code>android:gravity="center_vertical"</code> to image, but it had no effect.</p>
<p>any... | 0 | 1,290 |
How to fix babel react "Uncaught SyntaxError: Unexpected token <" | <p>I am having problem with react setup via CDN.</p>
<p>Her is my html:</p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<script src="https://cdn... | 0 | 1,199 |
Localhost refused to connect for Spring Boot Application Using Eclipse | <pre><code> pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.... | 0 | 1,398 |
Highcharts -- Can't apply style to x axis labels | <p>I'm working with Highcharts and am having trouble applying x axis label styles through my theme... it works correctly if I apply it when I create a chart.. but the theme options seem to be ignored only for the x axis. The same styles work correctly for the y axis.</p>
<p>Code below. Thanks!</p>
<p><strong>Theme</s... | 0 | 2,149 |
Convert simple ascii table to CSV | <p>I have gprof output shown below and I want to convert it to CSV format. What's the easiest way to do this from the cmd line? (I have many of these types of files, I need to automate this.)</p>
<pre><code> % cumulative self self total
time seconds seconds calls s/call s/call name
3... | 0 | 1,096 |
Simple H2 and Hibernate/JPA | <p>Simple test with H2 as the database, JPA and Hibernate.
Gives no discerning error, but it does not persist the entity.
For sure I am missing something extremely simple</p>
<p>persistence.xml in META-INF/:</p>
<pre><code><?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns... | 0 | 2,078 |
Github: Permission denied (publickey) but I got "You've successfully authenticated" message | <p>Step I had done:
<a href="https://help.github.com/articles/generating-ssh-keys/" rel="noreferrer">https://help.github.com/articles/generating-ssh-keys/</a> follow exactly.</p>
<pre><code>$ eval "$(ssh-agent -s)"
Agent pid 31944
$ ssh-add
Enter passphrase for /home/centos7/.ssh/id_rsa:
Identity added: /home/centos7/... | 0 | 1,866 |
AttributeError: 'unicode' object has no attribute XXX | <p>I'm trying to use <a href="https://pipl.com" rel="nofollow noreferrer">pipl</a>. I want to get the info from a mail and save it into a Excel file.</p>
<pre><code>from piplapis.search import SearchAPIRequest
from piplapis.search import SearchAPIError
from openpyxl import load_workbook
request = SearchAPIRequest(ema... | 0 | 8,315 |
PHPMyAdmin doesn't connect after root password change | <p>I installed Xampp (for Windows). I was happily using it with its all features.</p>
<p>Then I wanted to change MySql password. I set a randomly generated password (rCZ4Xnz78zbLY2Vh). Then PHPMyAdmin stopped logging in. It started to give the following error message, and it is the same ever since:</p>
<pre><code>Err... | 0 | 1,511 |
Synchronize Gradle projects with workspace failed | <p>I've the Spring Tool Suite v3.8.3 and its component Spring IDE v3.8.4.201702201939-CI-B1500. I've also the Gradle Buildship v2.0.</p>
<p>I created a project with JHipster v4.0.5 but is not possible to import it.
(<em>there were not errors before the Gradle Buildship 2</em>).
Below the error:</p>
<p><strong>Synchro... | 0 | 1,085 |
Django CSRF Cookie Not Set | <p>I have some problem for a while now, I'm experiencing CSRF Cookie not set. Please look at the codes below</p>
<h2>Python</h2>
<pre class="lang-py prettyprint-override"><code>def deposit(request, account_num):
if request.method == 'POST':
account = get_object_or_404(account_info, acct_number=account_num)
... | 0 | 1,134 |
MVC: An unhandled exception of type 'System.StackOverflowException' occurred in System.Core.dll | <p>This is my main layout of the application</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Co... | 0 | 2,297 |
How can I get my contour plot superimposed on a basemap | <p>This is a question I asked several months ago and am still struggling to come to a solution. My code gives me a basemap and a contour plot side by side (but printing to file only gives the contour plot), but I want them superimposed. The best solution would the one here <a href="https://gist.github.com/oblakeobjet/7... | 0 | 1,350 |
Back navigation with Fragments / Toolbar | <p>I'm scratching my head with this one now.... I have an <code>ActionBarActivity</code> that loads an initial <code>Fragment</code> - the original menu is inflated within the activity. Now, I have a navigation bar that, when an item is selected, loads a different fragment and adds this to the backstack.</p>
<p>When I... | 0 | 1,109 |
performSegueWithIdentifier from TableViewController to second TVC embedded in NavController not working | <p>I have two TableViewControllers with a segue in-between. When a user clicks on a cell in the first TVC they get presented with the second TVC. The segue is modal, has an identifier called "segueToLocationDetails" and passes an object along with it. You can think of the second TVC as a "details" page more or less. </... | 0 | 1,108 |
Testing Interface methods using Mockito | <p>I am writing a JUnit test case for a method which internally invokes another method through interface. I am using Mockito to mock the interface but for some reason it gives me <code>NPE</code>. I debugged through but wasn't able to get any clue to fix it. getAllVendors() method throws exception which comes through a... | 0 | 1,772 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.