runtime-error

java.lang.IndexOutOfBoundsException

﹥>﹥吖頭↗ 提交于 2019-12-02 05:32:45
I use ArrayList to store the 'shadows' for every rectangle in the level but when I iterate through the like this: for(int n = 0; n < shadows.size(); ++n){ g2d.fillPolygon(shadows.get(n)[0]); g2d.fillPolygon(shadows.get(n)[1]); g2d.fillPolygon(shadows.get(n)[2]); g2d.fillPolygon(shadows.get(n)[3]); g2d.fillPolygon(shadows.get(n)[4]); g2d.fillPolygon(shadows.get(n)[5]); } I get a java.lang.IndexOutOfBoundsException error that looks like this: Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 42, Size: 79 Why do I get the error even through the index number isn't

Windows(ThisWorkbook.Name).Visible = True causes error on Excel's auto-recovered files

依然范特西╮ 提交于 2019-12-02 05:24:53
问题 2 months ago I've asked this question: Autosaved file error on Macro Enabled Excel file Thanks to @YowE3K he referred me to Workbook_Open event as the problem was occurring when I try to recover(re-open) the file. Today I deeply focused on it and found that the reason I was getting: Run-time error '9' Subscript out of range error is: Windows(ThisWorkbook.Name).Visible = True I don't know how it became False but, when I try to open auto-recover file, I realize that file is opening normally, my

Detecting uninitialized arrays

空扰寡人 提交于 2019-12-02 05:17:11
问题 In the following program, the two routines set_int_array and set_real_array define some values to dummy arrays, but suppose that the initialization of a(:) and r(:) (Lines 1 and 2) is missing inadvertently (i.e., both lines should be uncommented in the correct program). My question is how to detect these errors automatically with some compiler option(s). module mymod implicit none contains subroutine set_int_array ( a ) integer, intent(out) :: a(:) integer k ! a(:) = 10 !! (1) do k = 1, size

Error with Beautifulsoup 'ResultSet' object has no attribute 'findAll'

会有一股神秘感。 提交于 2019-12-02 05:15:20
I was dealing with some error in my code, here is it: #!/usr/bin/env python2 # -*- coding: utf-8 -*- from BeautifulSoup import BeautifulSoup as beatsop from BeautifulSoup import SoupStrainer as sopstrain import urllib2 def html_parser(html_data): html_proc = beatsop(html_data) onlyforms = sopstrain("form") forms1 = html_proc.findAll(onlyforms) txtinput = forms1.findAll('input', {'type': 'text'}) #We take the forms that aren't text listform = ["radio", "checkbox", "password", "file", "image", "hidden"] otrimput = forms1.findAll('input', {'type': listform}) # we seach for names in text forms for

Store location of cell address to variable in VBA

我怕爱的太早我们不能终老 提交于 2019-12-02 04:28:54
问题 I'm using VBA in Excel and I'm using a function to find the first empty row then adding some values, after that I need to pass the address of the cell to another function but using the code below I get a runtime error. firstEmptyRow is a function that returns a range,e.g. $A$280 . Dim addCell as Range 'Find first empty row in the table With firstEmptyRow 'Enter Values .Value = taskID .Offset(0, 1).Value = jobID .Offset(0, 2).Value = jobName .Offset(0, 6).Value = taskTypeID .Offset(0, 8).Value

Runtime error 438 while importing data in excel from secured website using VBA

守給你的承諾、 提交于 2019-12-02 04:17:32
问题 I am trying to import some data in MS excel from a website (login ID & password have been provided to me) using following VBA code (downloaded from other website) Sub GetTable() Dim ieApp As InternetExplorer Dim ieDoc As Object Dim ieTable As Object Dim clip As DataObject 'create a new instance of ie Set ieApp = New InternetExplorer 'you don’t need this, but it’s good for debugging ieApp.Visible = True 'assume we’re not logged in and just go directly to the login page ieApp.Navigate "http:/

why std::unique_ptr vector gets invalid pointer exception

坚强是说给别人听的谎言 提交于 2019-12-02 04:14:22
I wrote simple code to help me understand smart pointers: string s = "str"; vector <unique_ptr<string>> pv ; pv.push_back(unique_ptr<string>(&s)); cout<<*(pv[0])<<endl; This code compiles fine, but gets me a runtime error: str * Error in `...': munmap_chunk(): invalid pointer: 0x00007ffd956e57e0 * Aborted (core dumped) What happened and what have I done wrong? In the std::unique_ptr 's destructor it will call delete on the &s pointer which was not allocated via new . Just use: std::vector<std::string> vector; vector.emplace_back("str"); std::cout << pv[0] << std::endl; There's no need for std:

Python can't parse JSON with extra trailing comma

不羁的心 提交于 2019-12-02 04:12:32
问题 This code: import json s = '{ "key1": "value1", "key2": "value2", }' json.loads(s) produces this error in Python 2: ValueError: Expecting property name: line 1 column 16 (char 15) Similar result in Python 3: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 16 (char 15) If I remove that trailing comma (after "value2" ), I get no error. But my code will process many different JSONs, so I can't do it manually. Is it possible to setup the parser to

Runtime error using python basemap and pyproj?

时光毁灭记忆、已成空白 提交于 2019-12-02 04:07:32
问题 I wrote a script using Spyder IDE with mpl_toolkits basemap to plot a GPS track as arrows for direction colored by speed. Everything worked fine until I upgraded pandas to 0.13. The data is like this: lon lat bearing speed m/s 2014-01-20 16:26:00 -170.681264 -14.290060 NaN NaN 2014-01-20 16:27:00 -170.681259 -14.290074 163.753636 0.026727 2014-01-20 16:28:00 -170.681259 -14.290074 180.000000 0.001172 2014-01-20 16:29:00 -170.681259 -14.290077 180.000000 0.004981 ll = [-14.294238,-170.683732]

mpiexec checkpointing error (RPi)

試著忘記壹切 提交于 2019-12-02 04:01:59
问题 When I try to run an application (just a simple hello_world.c doesn't work) I receive this error every time: mpiexec -ckpointlib blcr -ckpoint-prefix /tmp/ -ckpoint-interval 10 -machinefile /tmp/machinefile -n 1 ./app_name [proxy:0:0@masterpi] requesting checkpoint [proxy:0:0@masterpi] checkpoint completed [proxy:0:0@masterpi] requesting checkpoint [proxy:0:0@masterpi] HYDT_ckpoint_checkpoint (./tools/ckpoint/ckpoint.c:111): Previous checkpoint has not completed.[proxy:0:0@masterpi] HYD_pmcd