runtime-error

Excel VBA select method of range class failed

我怕爱的太早我们不能终老 提交于 2019-12-23 04:03:47
问题 I am trying to copy ranges of data from various worksheets into one worksheet. I have written this code: Sub sub1() For i = 1 To 3 Sheets(i).Select Range(Cells(1, 1), Cells(1, 1).End(xlDown)).Select 'line4 Selection.Copy Sheets(6).Select Cells(1, i).Select Selection.PasteSpecial xlPasteValues Next i End sub I get a Run-time error '1004' Select method of Range class failed on the line 4. How can it be fixed? 回答1: You don't Select a sheet you Activate it. But actually you shouldn't do either in

Logger::getInstance causing bad_alloc exception in log4cplus

折月煮酒 提交于 2019-12-23 03:51:34
问题 I'm attempting to implement logging in a c++ application using log4cplus. I'm able to successfully build/link (I added the log4cplus.lib to my additional libs and copied the log4cplus.dll to the build/outdir) When I run my application, I get the following exception when it executes my Logger::getInstance call: Unhandled exception at 0x75cad36f in LogTesterConsole.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0013ed8c.. I've tried placing the call outside my main() routine

Error while using fminsearch

让人想犯罪 __ 提交于 2019-12-23 02:50:06
问题 I am using fminsearch to minimize the error between the covariance at coarse scale and the average of covariance at fine scale by perturbing certain parameters. These are 2 lines of code lines using fminsearch in which I am calling the objective function minimize_me with three arguments which I intend to perturb: opts = optimset('display', 'iter'); [x,fval,exitflag] = fminsearch( @(x) minimize_me(x(1), x(2), x(3)), [2, 5, 90], opts); The function minimize_me is shown following and it uses

VBA Error Code Object Required — Have Triple checked but still not working

痴心易碎 提交于 2019-12-22 18:44:15
问题 The Bold and Italicized lines below continue to return to me the "Run Time Error'424': Object Required. I am working on this as part of a self learn class, and I have tripled checked to make sure I am entering the code properly and am still returning this error. I tried looking at other examples of this error on here, but none were helpful to this instance because I do not know the code well enough yet. Thank you! Sub FirstArray() Dim Fruit(2) As String Fruit(0) = "Apple" Fruit(1) = "Banana"

Matlab - Undefined Error for Input Arguments of Type Double [duplicate]

穿精又带淫゛_ 提交于 2019-12-22 10:27:31
问题 This question already has answers here : “Undefined function 'function_name' for input arguments of type 'double'.” (3 answers) Closed 3 years ago . I'm trying to write a function that does what conv2(h1,h2,A) & conv2(...'shape') does without using the built-in function. (speed is currently not an issue). as defined here: http://www.mathworks.co.uk/help/matlab/ref/conv2.html These are my commands: imgC = imread('camerman.tif'); imgC = double(imgC); sigma = 1; inp = (-1 .*2.5 .*sigma):1:(2.5 .

In regex, mystery Error: assertion 'tree->num_tags == num_tags' failed in executing regexp: file 'tre-compile.c', line 634

余生颓废 提交于 2019-12-22 08:44:00
问题 Assume 900+ company names pasted together to form a regex pattern using the pipe separator -- "firm.pat". firm.pat <- str_c(firms$firm, collapse = "|") With a data frame called "bio" that has a large character variable (250 rows each with 100+ words) named "comment", I would like to replace all the company names with blanks. Both a gsub call and a str_replace_all call return the same mysterious error. bio$comment <- gsub(pattern = firm.pat, x = bio$comment, replacement = "") Error in gsub

How to resolve this Error (GWT)

爱⌒轻易说出口 提交于 2019-12-22 07:07:18
问题 I'm getting this error after running my application. There were no errors during compilation. Also, thr's no other application running. Starting Jetty on port 8888 [WARN] failed SelectChannelConnector@127.0.0.1:8888 java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector

Haskell Parsec combinator 'many' is applied to a parser that accepts an empty string

无人久伴 提交于 2019-12-22 07:06:13
问题 import Text.ParserCombinators.Parsec delimiter :: Parser () delimiter = do char '|' return () <?> "delimiter" eol :: Parser () eol = do oneOf "\n\r" return () <?> "end of line" item :: Parser String item = do entry <- manyTill anyChar (try eol <|> try delimiter <|> eof) return entry items :: Parser [String] items = do result <- many item return result When I run parseTest items "a|b|c" with the code above I get the following error: *** Exception: Text.ParserCombinators.Parsec.Prim.many:

RuntimeWarning: invalid value encountered in maximum

时间秒杀一切 提交于 2019-12-22 04:36:06
问题 Weird behavior (bug??) in numpy. Contrary to the docs, the following code gives a RuntimeWarning: invalid value encountered in fmax a = np.random.uniform(0.1, 0.4, (5, 5)) b = np.random.uniform(0, 3.5, (5, 5)) b[0, 0] = np.nan c = np.fmax(a, b) # Same problem with c = np.maximum(a, b) I'm stuck as I need these NaNs in my arrays and now my functions stop in iPython with this damn warning (ok, they really don't stop but it's rather annoying) EDIT : numpy 1.6.1 ipython 0.13.1 回答1: I get the same

Error when trying to use a service in dynamically created component angular 5.1

不羁的心 提交于 2019-12-21 21:53:59
问题 When trying to use a service in dynamically created component We got this error at run time ERROR Error: Can't resolve all parameters for class_1: (?). at syntaxError (compiler.js:485) at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15664) at CompileMetadataResolver._getTypeMetadata (compiler.js:15499) at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js:15007) at CompileMetadataResolver.loadDirectiveMetadata (compiler.js:14862) at eval (compiler.js:34233