runtime

What are the most commonly used runtime exceptions in java? [closed]

本小妞迷上赌 提交于 2019-12-03 03:29:05
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . As a java programmer who wishes to perfect his programming skills, I often come across the situations that I have to create a runtime exception. I know it's a good practice if one use wisely. Personally, NullPointerException and IllegalStateException are the most commonly used

FFTW vs. OpenCV cvDFT

本小妞迷上赌 提交于 2019-12-03 03:22:57
Can I expect a speedup when using FFTW (http://www.fftw.org/) instead of OpenCV's cvDFT (http://goo.gl/YCHj0)? My program's runtime is heavily determined by the application of inverse and forward DFT and I am thinking about using FFTW instead of OpenCV cvDFT. IIRC FFTW does some kind of "runtime compilation" whereas cvDFT is a simple FFT implementation, so I guess it could speed up my processing a bit. So before I am trying it out by myself, I thought to ask in here in case anyone stumbled over the same question and solved it before. Thanks in advance I have used both (OpenCV and FFTW) and you

Creating a “spell check” that checks against a database with a reasonable runtime

≯℡__Kan透↙ 提交于 2019-12-03 03:15:28
问题 I'm not asking about implementing the spell check algorithm itself. I have a database that contains hundreds of thousands of records. What I am looking to do is checking a user input against a certain column in a table for all these records and return any matches with a certain hamming distance (again, this question's not about determining hamming distance, etc.). The purpose, of course, is to create a "did you mean" feature, where a user searches a name, and if no direct matches are found in

Create Tables on runtime in EF Core

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know I can use the following command to add a new migration and create the database : dotnet ef migrations add MigrationName -c DbContextName dotnet ef database update -c DbContextName but I need to create my database/tables on runtime. First I tried to do that by overriding OnModelCreating but I failed. It returned me an error pointing out that the tables have not been created Here is my dbcontext class public class AimeLoggerContext : DbContext { public AimeLoggerContext(DbContextOptions<AimeLoggerContext> options) : base(options) {

How to find boost runtime version

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am writing a C++ library that uses boost. In this library I want to include information about the boost version that was used to compile the binary version of my library. I can use the macro BOOST_VERSION and this is fine. I also wanted to determine which is the runtime version of boost so I could compare with the boost version that was used to compile my library. Obviously I cannot use the macro because it will give me the hard coded version at compile time, not at runtime. What I needed is a function in boost (like boost::get_version() )

Correct way to distribute VC++ runtime files

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an MFC application which I am trying to package for deployment. It seems to depend on the files 'msvcr90.dll', 'msvcp90.dll' and 'mfc90.dll'. What is the correct way to distribute these files? I can't use merge modules as my installer doesn't support them. I know I can run VCRedist_x86.exe, but I don't want to do this for various reasons. As far as I can see my only alternative is to install the files as Private Side-by-Side assemblies. Is this correct? According to http://msdn.microsoft.com/en-us/library/ms235317(VS.80).aspx the

Exclude Gradle classpath runtime when launching JettyRun

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have your basic run of the mill Gradle web application project and it works ok but I noticed that Gradle's runtime classpath is being included in the jetty one which has the potential to conflict with the web applications. Notice below that gradle is using a slightly older version of logback and that SL4J is warning that it found multiple bindings in the classpath. :jettyRun SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/dev/java/tools/gradle-1.0-milestone-5/lib/logback-classic-0.9.29.jar!/org

OpenCV 2.1: Runtime error

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a program which uses OpenCV. I have a webcam and it captures color frames and I want to convert the color frames to gray-scale frames. So, I used the cvCvtColor(color_frame, gray_frame, CV_BGR2GRAY); to convert the color frames to BW frames. Upon using this color->Grayscale conversion function, I get a runtime error as: OpenCV Error: Null pointer (NULL array pointer is passed) in unknown function, file ..\..\..\..\ocv\opencv\src\cxcore\cxarray.cpp, line 2376 Anyone experienced this problem before? Any solutions how to fix this? Thanks

Runtime Warning in django

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a Django project with MySQL as the back-end, this warning keeps troubling me, can anyone please suggest a fix for this. Thanks in advance!! /usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2013-04-22 10:34:44) while time zone support is active. 回答1: You have to make the following changes: In settings.py, you need to add following line: USE_TZ = True Also, in your code you should create aware datetime objects: eg: Instead of import datetime

Java specification

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Java JDK or JRE or both are specifications? Can anyone quote some relevant implementations? 回答1: The JDK (Java Developer Kit) and JRE (Java Runtime Environment) are (in part) both implementations of the Java Language Specification and The Java Virtual Machine Specification . JRE and JDK may or may not refer to the Sun JRE and Sun JDK depending on context. You can see this list of JVMs (Java Virtual Machines). There are also third-party java compilers, the most popular being ecj and gcj. 回答2: JDK means Java Development Kit. it provides you a