runtime-error

Retrieving a double from a JTextArea while solving for X

对着背影说爱祢 提交于 2019-12-24 03:29:10
问题 Ok, I'm kinda new to java. I'm making a program that solves for one step equations. I'm having some difficulties running it though. Here is the code for my main file, Main.java : import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Main extends JFrame implements ActionListener { private static final long serialVersionUID = 1L; Solve solve = new Solve(); JButton add = new JButton("Add"); JButton sub = new JButton("Subtract"); JButton mult = new JButton("Multiply");

LINQ to Entities does not recognize the method 'Int64 Max(Int64, Int64)' method, and this method cannot be translated into a store expression

故事扮演 提交于 2019-12-24 02:47:49
问题 I'm getting this error message during runtime LINQ to Entities does not recognize the method 'Int64 Max(Int64, Int64)' method, and this method cannot be translated into a store expression. when I try to do this: return _dbContext.Appointment.Where(x => Math.Max(x.Appointment.StartTime.Ticks, startTime.Ticks) <= Math.Min(x.Appointment.EndTime.Ticks, endTime.Ticks)); The idea behind this query is that "if the latest start time is before the earliest end time, then you have some overlap/touching

BCP Error: columns may be skipped only when copying into the Server

让人想犯罪 __ 提交于 2019-12-24 01:09:50
问题 When I issue this command (It looks silly but it works): BCP "declare @colnames varchar(max); select @colnames=coalesce (@colnames+char(9), '') + Column_Name from db.information_Schema.columns where table_name='table1' order by ordinal_position; select @colnames" queryout Table1_Columns.tsv -S?? -U?? -P?? -f** -e** I get this error: [Microsoft][SQL Native Client]Host-file columns may be skipped only when copying into the Server The format file is: 9.0 1 1 SQLCHAR 0 100 "\r\n" 1 Column_Names

ValueError when trying to apply lambda expression to elements of an array

橙三吉。 提交于 2019-12-23 12:34:47
问题 Currently I faced an error while processing a numpy.array - 4x1 - i.e [[-1.96113883] [-3.46144244] [ 5.075857 ] [ 1.77550086]] with the lambda function f = lambda x: x if (x > 0) else (x * 0.01) . The error is ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() . I searched through the different topics here on stackoverflow.com but I have not find any satisfactory explanation of the problem and a case that suited mine (many unclear

C++ Exception Handling

走远了吗. 提交于 2019-12-23 10:03:21
问题 So I was writing some code and I noticed that apart from syntactical, type, and other compile-time errors, C++ does not throw any other exceptions. So I decided to test this out with a very trivial program: #include<iostream> int main() { std::count<<5/0<<std::endl; return 1 } When I compiled it using g++, g++ gave me a warning saying I was dividing by 0. But it still compiled the code. Then when I ran it, it printed some really large arbitrary number. When I want to know is, how does C++

Javascript: debug stack trace with source maps

佐手、 提交于 2019-12-23 07:13:41
问题 This may be a bit of an odd question, I can't seem to search the right phrase to pull up any relevant answers. We have an app that runs on clients machines and is minified. We generate source maps, but they are not exposed to production versions. I have a window.onerror that I use a catch all for sloppy code that finds it's way in unbeknownst to me. Thankfully, this is almost never utilized. Recently, I've been getting an undefined error popping up occasionally so someone has found a way to

Getting NZEC in Java Code

不打扰是莪最后的温柔 提交于 2019-12-23 06:41:57
问题 I'm trying to solve the problem http://www.codechef.com/APRIL12/problems/DUMPLING/ I'm getting runtime error NZEC on codechef. I searched on the Internet but did not manage to make my code succeed. This is my code : import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; public class Main { public BigInteger gcd(BigInteger a,BigInteger b){ if(b.compareTo(BigInteger.valueOf(0)) == 0) return a; return gcd(b,a.mod(b)); } public

Error with Python sleep() command on http://rept.it

◇◆丶佛笑我妖孽 提交于 2019-12-23 05:10:30
问题 I'm working on a project involving the sleep() command, (running 2.7.2) and it's throwing errors that I've never seen before. Here's a test script I wrote: from time import sleep print '1' sleep(2) print '2' It returns: >> 1 >> Internal error: ReferenceError: _select is not defined Any help is appreciated 回答1: time.sleep() uses select if it is available. For some reason HAVE_SELECT was defined when your Python was built, but now the library can't be found. From the docs ... On the other hand,

Inserting in a binary search tree access violation error

风格不统一 提交于 2019-12-23 04:35:36
问题 I am trying to insert node in a binary search tree, I am getting an access voilation error at line if(ptr->data== item) in searchNode() function. How can I remove it. I am new to debugging. I am first trying to insert few nodes and then display them using display function. During insertion the program searches for the appropriate position of the node to be inserted and then inserts it. Program simply returns if node already exists. #include<stdio.h> #include<conio.h> #include<stdlib.h> struct

Access Violation With Pointers? - C++

岁酱吖の 提交于 2019-12-23 04:26:53
问题 I've written a simple string tokenizing program using pointers for a recent school project. However, I'm having trouble with my StringTokenizer::Next() method, which, when called, is supposed to return a pointer to the first letter of the next word in the char array. I get no compile-time errors, but I get a runtime error which states: Unhandled exception at 0x012c240f in Project 5.exe: 0xC0000005: Access violation reading location 0x002b0000. The program currently tokenizes the char array,