runtime-error

Android Device Monitor doesn't open - error on log file

微笑、不失礼 提交于 2019-12-17 10:52:56
问题 In Android Studio when I try running Android Device Monitor, I get the following error on log file: >!SESSION 2014-12-17 09:57:30.625 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_25 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.366 !MESSAGE Bundle reference:file:org.apache.ant_1

Unable to run Java GUI programs with Ubuntu

隐身守侯 提交于 2019-12-17 10:52:21
问题 I am learning GUI in Java, and for that I have created a demo program: import java.awt.*; public class FrameDemo extends Frame { public FrameDemo(){ super("Frame Demo"); setSize(200, 200); setVisible(true); } public static void main(String args[]){ new FrameDemo(); } } It was compiled successfully. But when I tried to execute the program, I found the following error: Exception in thread "main" java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java

ValueError: math domain error

半世苍凉 提交于 2019-12-17 10:24:36
问题 I was just testing an example from Numerical Methods in Engineering with Python . from numpy import zeros, array from math import sin, log from newtonRaphson2 import * def f(x): f = zeros(len(x)) f[0] = sin(x[0]) + x[1]**2 + log(x[2]) - 7.0 f[1] = 3.0*x[0] + 2.0**x[1] - x[2]**3 + 1.0 f[2] = x[0] + x[1] + x[2] -5.0 return f x = array([1.0, 1.0, 1.0]) print newtonRaphson2(f,x) When I run it, it shows the following error: File "example NR2method.py", line 8, in f f[0] = sin(x[0]) + x[1]**2 + log

Python: RuntimeError: super-class __init__() of %S was never called

醉酒当歌 提交于 2019-12-17 09:58:18
问题 I tried to do some operation ( setParent ) on an object in Python (an instance of a class which inherits from a different class - to be specific, QtGui.QLabel ), but during runtime the above error was raised. The object itself has had some fields with actual content (verified on debug), but from some reason I couldn't "use" it. What does the error mean and how can I fix it? For some additional information, I shall say that the object was returned from a static method before I tried to do this

Python: RuntimeError: super-class __init__() of %S was never called

Deadly 提交于 2019-12-17 09:58:07
问题 I tried to do some operation ( setParent ) on an object in Python (an instance of a class which inherits from a different class - to be specific, QtGui.QLabel ), but during runtime the above error was raised. The object itself has had some fields with actual content (verified on debug), but from some reason I couldn't "use" it. What does the error mean and how can I fix it? For some additional information, I shall say that the object was returned from a static method before I tried to do this

“query function not defined for Select2 undefined error”

穿精又带淫゛_ 提交于 2019-12-17 05:41:11
问题 Trying to use Select2 and getting this error on multiple item input/text field: "query function not defined for Select2 undefined error" 回答1: Covered in this google group thread The problem was because of the extra div that was being added by the select2. Select2 had added new div with class "select2-container form-select" to wrap the select created. So the next time i loaded the function, the error was being thrown as select2 was being attached to the div element. I changed my selector...

Double free or corruption after queue::push

那年仲夏 提交于 2019-12-17 04:22:45
问题 #include <queue> using namespace std; class Test{ int *myArray; public: Test(){ myArray = new int[10]; } ~Test(){ delete[] myArray; } }; int main(){ queue<Test> q Test t; q.push(t); } After I run this, I get a runtime error "double free or corruption". If I get rid of the destructor content (the delete ) it works fine. What's wrong? 回答1: Let's talk about copying objects in C++. Test t; , calls the default constructor, which allocates a new array of integers. This is fine, and your expected

Double free or corruption after queue::push

不打扰是莪最后的温柔 提交于 2019-12-17 04:22:43
问题 #include <queue> using namespace std; class Test{ int *myArray; public: Test(){ myArray = new int[10]; } ~Test(){ delete[] myArray; } }; int main(){ queue<Test> q Test t; q.push(t); } After I run this, I get a runtime error "double free or corruption". If I get rid of the destructor content (the delete ) it works fine. What's wrong? 回答1: Let's talk about copying objects in C++. Test t; , calls the default constructor, which allocates a new array of integers. This is fine, and your expected

Android System services not available to Activities before onCreate() [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-14 03:38:12
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . .... @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... done = true; } ... public class addcontacts extends ListActivity { protected void onCreate() { }

Why am I getting an error!?(Null pointer Exception) [closed]

ⅰ亾dé卋堺 提交于 2019-12-14 03:35:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am trying to create a program where a car dealership can pick what kind of customer and then enter in the info. It works fine up to where it prints the results. Then it gives me the error at the bottom. PLEASE HELP!! **I also need a way to add up the service objects and print them as well. Any help is