runtime-error

Why am I getting 'Floating point exception: 8'

六月ゝ 毕业季﹏ 提交于 2019-11-29 15:41:42
I'm trying to calculate all the prime numbers from 0 - 100 and I'm getting a floating point exception, could anyone tell me why? (If it helps I'm using gcc) #include <stdio.h> int main(void) { int nums[100], i; for(i=0;i<100;i++) nums[i] = i; int j,k,l,z; for(i=1;i<100;i++) for(j=2;j<100;j++) if((nums[i] % nums[j]) == 0) { nums[j] = 0; } for(i=0;i<100;i++) if(nums[i] != 0) break; for(z=0;z<100;z++) { for(k=i;k<100;k++) for(l = (k+2);l < 100;l++) if((nums[k] % nums[l]) == 0) nums[k] = 0; } for(i=0;i<100;i++) if(nums[i] != 0) printf("%d,",nums[i]); printf("\n"); return 0; } Well, it's really

java.lang.NoClassDefFoundError: org/apache/commons/collections/Transformer

二次信任 提交于 2019-11-29 14:38:24
I am receiving the following error java.lang.NoClassDefFoundError: org/apache/commons/collections/Transformer trying to use BeanMap from the Apache Commons BeanUtils library. It is generated from the following code: BeanMap studentBeanMap = new BeanMap(cohortStudentData.get(row)); where cohortStudentData is a list of beans. I am using BeanListHandler from Apache DBUtils to form the list of beans from a database. I understand from this and this bug report that BeanMap is dependant on the Apache Collections framework. However, I have imported all relevant libraries into my project and into my

Can't find the cause “you must specify a way to create the tab indicator”

主宰稳场 提交于 2019-11-29 14:22:31
I am getting "you must specify a way to create the tab indicator" error(as per logcat). Can't find the reason. Main class: package org.tatvamoksh.tml; import android.app.TabActivity; import android.content.Intent; import android.os.Bundle; import android.view.Window; import android.widget.TabHost; import android.widget.TabHost.TabSpec; @SuppressWarnings({ "deprecation" }) public class MainActivity extends TabActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Remove title bar this.requestWindowFeature(Window.FEATURE_NO_TITLE);

DistributionNotFound error after upgrading pip

萝らか妹 提交于 2019-11-29 13:56:52
问题 In reading about virtualenv here I realized I didn't have pip 1.3+, so I ran pip install --upgrade pip and now when I run pip --version i get the following: Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in <module> from pkg_resources import load_entry_point File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line 2807, in <module> parse_requirements(__requires__),

Catch completely unexpected error

被刻印的时光 ゝ 提交于 2019-11-29 12:14:13
I have a ErrorRecorder App, which prints the error report out and asks if the user wants to send that report to me. Then, I have the main app. If an error occurs, It writes the error report to a file and asks ErrorRecorder to open that file to show user the error report. So I am catching most of my errors using Try/Catch. However, what if an error occurs that was completely unexpected and it shuts down my program. Is there like an Global/Override method or something of that kind, that tells the program "Before shutting down if an unexpected error occurs, call the "ErrorRecorderView()" Method"

WindowsError: [Error 193] %1 is not a valid Win32 application in Python

让人想犯罪 __ 提交于 2019-11-29 08:00:21
I wish to import liblas module in Python 2.7 on window 64bit. If I import the module with IDLE (Python GUI) I have no problem. If I use PyScripter "PyScripter-v2.5.3-x64-Setup.exe" I get this error message. >>> import liblas Traceback (most recent call last): File "<interactive input>", line 1, in <module> File "C:\Python27\lib\site-packages\liblas\__init__.py", line 2, in <module> from core import get_version File "C:\Python27\lib\site-packages\liblas\core.py", line 138, in <module> las = ctypes.CDLL(os.path.join(local_dlls, lib_name)) File "C:\Python27\Lib\ctypes\__init__.py", line 365, in _

What causes this error? “Runtime error 380: Invalid property value”

限于喜欢 提交于 2019-11-29 07:08:20
we had developed an application using vb6.0 and SQL server 2000 a few years ago. recently, some of our customers tell us that while running the application, on some of computers which use Winxp sp2 as their O/S, they get the following error when they want to show the search form: "Runtime error 380: Invalid property value" What causes this error? I presume your application uses a masked edit box? This is a relatively well known problem, documented by Microsoft here: http://support.microsoft.com/kb/177088 The article refers to VB4 and 5, but I am pretty sure the same is true for VB6. EDIT On

Python bottle module causes “Error: 413 Request Entity Too Large”

↘锁芯ラ 提交于 2019-11-29 06:07:56
问题 Using Python's module bottle , I'm getting HTTP 413 error when posting requests of body size > bottle 's internal MEMFILE_MAX constant. Minimal working example is shown below. Server part ( server.py ): from bottle import * @post('/test') def test(): return str(len(request.forms['foo'])); def main(): run(port=8008); if __name__ == '__main__': main(); Client part ( client.py ): import requests def main(): url = 'http://127.0.0.1:8008/test'; r = requests.post(url, data={ 'foo' : 100000 * 'a' })

Fatal signal 7 (SIGBUS) at 0x00000000 (code=2)

╄→尐↘猪︶ㄣ 提交于 2019-11-29 06:06:52
While using a OSGi Platform on Android i got this errormsg: Fatal signal 7 (SIGBUS) at 0x595302e0 (code=2) I don't think that my app needs that much space in memory or need a lot of computation power. Its just the OSGi Platform with 20 Bundles. My app is always restarting after that. Any ideas ? Even I too found a similar problem and happens to be (code=128) with about fault. Seems to be a data alignment error. To solve this issue, I tried putting a code something like this: *Data = (*Data)(Temp+i) becomes Temp1 = *(Temp+i); *Data = Temp1; Before and into the function call and passed back the

Git error: Malformed input or input contains unmappable chacraters

孤者浪人 提交于 2019-11-29 04:53:41
My Eclipse workspace has two projects, one using CVS, the other Git. When modifying a file in the CVS project and save, a pop-up window appear saying An internal error occurred during: "Computing Git status for repository repo23". Malformed input or input contains unmappable chacraters: /Users/pb/repo23/对照表/feng11.htm Any idea how to fix this? EDIT: Eclipse Platform Version: 4.3.1.v20130911-1000 Build id: M20130911-1000 Eclipse EGit 3.2.0.201312181205-r VonC You can see the exact call stack in this issue : java.nio.file.InvalidPathException: Malformed input or input contains unmappable