error-code

Cannot run Android application on emulator/device - activity doesn't exist?

半世苍凉 提交于 2019-12-23 11:49:09
问题 When trying to run my application on the emulator I get an error from the activitymanager: ActivityManager: Error type 3 My activity exists, is listed in the manifest (in fact, its the MAIN launcher activity). Anyone know what this error means? 回答1: If you are running Eclipse try Projects-->Clean.. . and clean the project before running again. 回答2: i faced the same issue. I cleaned the project and removed the android:enabled=false in android manifest. This solved the issue. 回答3: Check

Java: Is it ok to set Integer = null?

纵饮孤独 提交于 2019-12-23 07:27:45
问题 I have a function that returns an id number if the argument exists in the database. If not, it returns null. Is this begging for a null pointer exception? Negative id numbers are not permitted, but I thought it would be clearer to have non-existent arguments returning null instead of an error code like -1. What do you think? private Integer tidOfTerm(String name) throws SQLException { String sql = "SELECT tid FROM term_data WHERE name = ?"; PreparedStatement prep = conn.prepareStatement(sql);

error c++ visual studio c2227 Left of '->Init' must point to class/struct/union/generic type

[亡魂溺海] 提交于 2019-12-23 04:47:37
问题 I have made a simple game window that loads 2 sprites but i changed my way of loading it so it would be better then creating for every Sprite a other variable. I'm getting the following error: c2227 left of '->Init' must point to class/struct/union/generic type c2227 left of '->Init' must point to class/struct/union/generic type And this is my code: MainGame.h #pragma once #include <SDL/SDL.h> #include <GL/glew.h> #include <vector> #include "GLTexture.h" #include "GLSLProgram.h" #include

The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

和自甴很熟 提交于 2019-12-22 11:24:14
问题 although I know there's various questions looking for solutions to this error message, I've yet to find an answer that helps me solve my code to get the comparison working, I have the code def f(x,d,h,L): ans=0. if ((0.<=x) & (x<d)): ans=h*(x/d) elif ((d<=x) & (x<=L)): ans=((L-x)/(L-d)) return ans x=np.linspace(0,10,1000) h=5*10**(-3) d=16*10**(-2) L=64.52*10**(-2) func=f(x,d,h,L) But when I try running it I get an error pointing to the if line with the error code in the title, I've tried the

Gruntfile getting error codes from programs serially

可紊 提交于 2019-12-22 07:04:10
问题 I want to create a grunt file that runs 3 grunt tasks serially one after another regardless of whether they fail or pass. If one of the grunts task fails, I want to return the last error code. I tried: grunt.task.run('task1', 'task2', 'task3'); with the --force option when running. The problem with this is that when --force is specified it returns errorcode 0 regardless of errors. Thanks 回答1: Use grunt.util.spawn : http://gruntjs.com/api/grunt.util#grunt.util.spawn grunt.registerTask('serial'

Python SMTP error code handling

江枫思渺然 提交于 2019-12-21 23:24:02
问题 I've searched a fair bit on this and couldn't come up with anything satisfactory. I've been trying to write a python program to listen for email bounce reports and depending on the reason for the bounce resend them at different intervals. import smtplib from smtplib import * sender = 'foo@bar.com' receivers = ['42@life.com'] message = """From: From Arthur <foo@bar.com> To: To Deep Thought <42@life.com> Subject: SMTP e-mail test This is a test e-mail message. """ try: smtpObj = smtplib.SMTP(

The development server returned response error code: 500 in react-native

偶尔善良 提交于 2019-12-21 10:24:58
问题 I'm making react-native app with my frd. So I got the code my frd first made and I wanted to open my computer. I think I set everything and did tcp:8081 setting in dev menu. but I got error message after started react-native packager. I use real phone device. Please help me. [2016-11-25 17:13:55] <START> Initializing Packager [2016-11-25 17:13:55] <START> Building in-memory fs for JavaScript [2016-11-25 17:13:56] <END> Building in-memory fs for JavaScript (1172ms) [2016-11-25 17:14:00] <START

The development server returned response error code: 500 in react-native

巧了我就是萌 提交于 2019-12-21 10:24:11
问题 I'm making react-native app with my frd. So I got the code my frd first made and I wanted to open my computer. I think I set everything and did tcp:8081 setting in dev menu. but I got error message after started react-native packager. I use real phone device. Please help me. [2016-11-25 17:13:55] <START> Initializing Packager [2016-11-25 17:13:55] <START> Building in-memory fs for JavaScript [2016-11-25 17:13:56] <END> Building in-memory fs for JavaScript (1172ms) [2016-11-25 17:14:00] <START

Error C2491: Function declared in header and defined in C++

久未见 提交于 2019-12-20 04:20:07
问题 I have been trying to build a device adapter for a open-source software called Micro-manager to control a microscope and there are some problems that I am facing, there are these two files (one header and the other CPP) that are already present in the open source package of Micro-Manager. //MoudluleInterface.h #ifndef _MODULE_INTERFACE_H_ #define _MODULE_INTERFACE_H_ #ifdef WIN32 #ifdef MODULE_EXPORTS #define MODULE_API __declspec(dllexport) #else #define MODULE_API __declspec(dllimport)

How do I make Liferay 6.1.0 always redirect to a 404 page when a resource isn't found?

ⅰ亾dé卋堺 提交于 2019-12-19 04:24:07
问题 I have created a simple hook for a Liferay site I have. It contains a 404.jsp that overrides the default Liferay 404. It works fine if I type in a specific page. For example: Going to http://localhost:8080/jooky.jsp throws SEVERE: PWC6117: File "C%3A%5Cbundles%5Cliferay-portal-6.1.0-ce-ga1%5Cglassfish-3.1.1%5Cdomains%5Cdomain1%5Capplications%5Cliferay-portal%5Cjooky.jsp" not found in my Glassfish server log and redirects me to my custom /errors/404.jsp without a problem. However, going to