Questions tagged [runtime]
Runtime is the time during which a program is running (executing)
                                	
	runtime
    
                            
                        
                    
            7,844
            questions
        
        
            486
            votes
        
        
            26
            answers
        
        
            357k
            views
        
    Runtime vs. Compile time
                What is the difference between run-time and compile-time?
            
        
       
    
            355
            votes
        
        
            11
            answers
        
        
            99k
            views
        
    How to find where a method is defined at runtime?
                We recently had a problem where, after a series of commits had occurred, a backend process failed to run. Now, we were good little boys and girls and ran rake test after every check-in but, due to ...
            
        
       
    
            318
            votes
        
        
            26
            answers
        
        
            393k
            views
        
    How to add property to a class dynamically?
                The goal is to create a mock class which behaves like a db resultset.
So for example, if a database query returns, using a dict expression, {'ab':100, 'cd':200}, then I would like to see: 
>>&...
            
        
       
    
            231
            votes
        
        
            10
            answers
        
        
            635k
            views
        
    java.lang.NoClassDefFoundError: Could not initialize class XXX
                public class PropHolder {
  public static Properties prop;
  static {
    //code for loading properties from file
  }
}
// Referencing the class somewhere else:
Properties prop = PropHolder.prop;
...
            
        
       
    
            216
            votes
        
        
            8
            answers
        
        
            103k
            views
        
    What is the C runtime library?
                What actually is a C runtime library and what is it used for? I was searching, Googling like a devil, but I couldn't find anything better than Microsoft's: "The Microsoft run-time library provides ...
            
        
       
    
            210
            votes
        
        
            13
            answers
        
        
            369k
            views
        
    Java Runtime.getRuntime(): getting output from executing a command line program
                I'm using the runtime to run command prompt commands from my Java program. However, I'm not aware of how I can get the output the command returns.
Here is my code:
Runtime rt = Runtime.getRuntime();
...
            
        
       
    
            180
            votes
        
        
            6
            answers
        
        
            95k
            views
        
    Is there a "vim runtime log"?
                Sometimes I try a customization/command in my vimrc. Everything seens to be correct, but it just doesn't work.
It's difficult to know what's happening when vim starts, and know which command failed ...
            
        
       
    
            175
            votes
        
        
            3
            answers
        
        
            69k
            views
        
    Objective-C Runtime: best way to check if class conforms to protocol?
                I have a Class (but no instance) and need to know if it conforms to a certain protocol. However, Class can be subclassed several times and class_conformsToProtocol() ignores protocols declared on ...
            
        
       
    
            166
            votes
        
        
            5
            answers
        
        
            467k
            views
        
    How do you calculate program run time in python? [duplicate]
                How do you calculate program run time in python?
            
        
       
    
            164
            votes
        
        
            12
            answers
        
        
            103k
            views
        
    What's the difference between SDK and Runtime in .NET Core?
                I've read many articles, including this one, yet I can't still figure out what's the difference, and they have not explained it either in simple terms or at all.
Can someone please clarify what's the ...
            
        
       
    
            144
            votes
        
        
            10
            answers
        
        
            199k
            views
        
    Dynamically Changing log4j log level
                What are the different approaches for changing the log4j log level dynamically, so that I will not have to redeploy the application. Will the changes be permanent in those cases?
            
        
       
    
            140
            votes
        
        
            8
            answers
        
        
            43k
            views
        
    How fast is D compared to C++?
                I like some features of D, but would be interested if they come with a
runtime penalty?
To compare, I implemented a simple program that computes scalar products of many short vectors both in C++ and ...
            
        
       
    
            137
            votes
        
        
            16
            answers
        
        
            266k
            views
        
    Java Error opening registry key
                I get this error when I try to do anything with Java in command prompt:
Error opening registry key 'Software\JavaSoft\Java Runtime Environment.3'
Error: could not find Java.dll
Error: could not find ...
            
        
       
    
            137
            votes
        
        
            5
            answers
        
        
            103k
            views
        
    how to "reimport" module to python then code be changed after import
                I have a foo.py
def foo():
    print "test"
In IPython I use:
In [6]:  import foo
In [7]:  foo.foo()
test
Then I changed the foo() to:
def foo():
    print "test changed"
In IPython, the result ...
            
        
       
    
            127
            votes
        
        
            6
            answers
        
        
            102k
            views
        
    Rails: convert UTC DateTime to another time zone
                In Ruby/Rails, how do I convert a UTC DateTime to another time zone?
            
        
       
    
            127
            votes
        
        
            7
            answers
        
        
            80k
            views
        
    Compile time vs Run time Dependency - Java
                What is the difference between compile time and run time dependencies in Java?
It is related to class path, but how do they differ?
            
        
       
    
            127
            votes
        
        
            10
            answers
        
        
            61k
            views
        
    Can a program depend on a library during compilation but not runtime?
                I understand the difference between runtime and compile-time and how to differentiate between the two, but I just don't see the need to make a distinction between compile-time and runtime dependencies....
            
        
       
    
            113
            votes
        
        
            10
            answers
        
        
            171k
            views
        
    How to check the object type on runtime in TypeScript?
                I'm trying to find a way to pass an object to function in and check it type in a runtime. This is a pseudo code:
function func (obj:any) {
    if(typeof obj === "A") {
        // do ...
            
        
       
    
            103
            votes
        
        
            11
            answers
        
        
            149k
            views
        
    How permission can be checked at runtime without throwing SecurityException?
                I design a function that may get/set a resource from SD and if not found from sd then take it from Asset and if possible write the asset back to SD
This function may check by method invocation if SD ...
            
        
       
    
            101
            votes
        
        
            24
            answers
        
        
            50k
            views
        
    How to resolve "Warning: debug info can be unavailable. Please close other application using ADB: Restart ADB integration and try again"
                I am having a slight issue when trying to debug and android app via usb to external device. I keep getting the error "Warning: debug info can be unavailable. Please close other application using ADB: ...
            
        
       
    
            101
            votes
        
        
            2
            answers
        
        
            31k
            views
        
    What is causing the warning 'Removing intrinsics.%ArrayPrototype%.toReversed' in React?
                I am getting following warning on first load of my App.
lockdown-install.js:1 Removing intrinsics.%ArrayPrototype%.toReversed
intrinsics.%ArrayPrototype%.@@unscopables.toSpliced
intrinsics.%...
            
        
       
    
            100
            votes
        
        
            3
            answers
        
        
            80k
            views
        
    Why is Class.newInstance() "evil"?
                Ryan Delucchi asked here in comment #3 to Tom Hawtin's answer:
  why is Class.newInstance() "evil"?
this in response to the code sample:
// Avoid Class.newInstance, for it is evil.
Constructor<? ...
            
        
       
    
            91
            votes
        
        
            6
            answers
        
        
            130k
            views
        
    Create JPA EntityManager without persistence.xml configuration file
                Is there a way to initialize the EntityManager without a persistence unit defined? Can you give all the required properties to create an entity manager? I need to create the EntityManager from the ...
            
        
       
    
            88
            votes
        
        
            8
            answers
        
        
            72k
            views
        
    Python: changing methods and attributes at runtime
                I wish to create a class in Python that I can add and remove attributes and methods. How can I acomplish that?
Oh, and please don't ask why.
            
        
       
    
            88
            votes
        
        
            7
            answers
        
        
            126k
            views
        
    How do you modify the web.config appSettings at runtime?
                I am confused on how to modify the web.config appSettings values at runtime. For example, I have this appSettings section:
<appSettings>
  <add key="productspagedesc" value="TODO: Edit this ...
            
        
       
    
            87
            votes
        
        
            1
            answer
        
        
            30k
            views
        
    Get the node.js version at runtime
                I'm having some compatibility issues with old versions of node.js.
Is there any way to get the node.js version at runtime?
            
        
       
    
            86
            votes
        
        
            8
            answers
        
        
            155k
            views
        
    Winforms TableLayoutPanel adding rows programmatically
                I've been fighting with this for a while, and have found that a number of other people struggle with the TableLayoutPanel (.net 2.0 Winforms) as well.
Problem
I am attempting to take a 'blank' ...
            
        
       
    
            85
            votes
        
        
            4
            answers
        
        
            79k
            views
        
    Adding Java Annotations at Runtime
                Is it possible to add an annotation to an object (in my case in particular, a Method) at runtime?
For a bit more explanation: I have two modules, moduleA and moduleB.  moduleB depends upon moduleA, ...
            
        
       
    
            84
            votes
        
        
            5
            answers
        
        
            38k
            views
        
    Is sizeof in C++ evaluated at compilation time or run time?
                For example result of this code snippet depends on which machine: the compiler machine or the machine executable file works?
sizeof(short int)
            
        
       
    
            82
            votes
        
        
            6
            answers
        
        
            109k
            views
        
    Instantiate an object with a runtime-determined type
                I'm in a situation where I'd like to instantiate an object of a type that will be determined at runtime.  I also need to perform an explicit cast to that type.
Something like this:
static void ...
            
        
       
    
            81
            votes
        
        
            9
            answers
        
        
            98k
            views
        
    Python: dynamically create function at runtime
                How to dynamically create a function in Python?
I saw a few answers here but I couldn't find one which would describe the most general case.
Consider:
def a(x):
    return x + 1
How to create such ...
            
        
       
    
            79
            votes
        
        
            17
            answers
        
        
            105k
            views
        
    How to add a timeout value when using Java's Runtime.exec()?
                I have a method I am using to execute a command on the local host.  I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time ...
            
        
       
    
            78
            votes
        
        
            8
            answers
        
        
            81k
            views
        
    What is run time environment?
                Can some one explain what it means in simple terms. Does it mean the environment (DOS, Windows, Linux, etc) where the application codes are run?
            
        
       
    
            77
            votes
        
        
            5
            answers
        
        
            162k
            views
        
    How to load a jar file at runtime [duplicate]
                I was asked to build a java system that will have the ability to load new code (expansions) while running. 
How do I re-load a jar file while my code is running? or how do I load a new jar?
Obviously,...
            
        
       
    
            74
            votes
        
        
            7
            answers
        
        
            119k
            views
        
    Adding files to java classpath at runtime [duplicate]
                Is it possible to add a file (not necessarily a jar file) to java classpath at runtime.
Specifically, the file already is present in the classpath, what I want is whether I can add a modified copy of ...
            
        
       
    
            73
            votes
        
        
            3
            answers
        
        
            21k
            views
        
    When does a constexpr function get evaluated at compile time?
                Since it is possible that a function declared as constexpr can be called during run-time, under which criteria does the compiler decide whether to compute it at compile-time or during runtime? 
...
            
        
       
    
            72
            votes
        
        
            9
            answers
        
        
            68k
            views
        
    Changing Django settings at runtime
                I'd like to expose some (app-specific) settings to the admin interface, so users can change them comfortably and also not have to restart Django.
How should I go about this?
I checked out the ...
            
        
       
    
            67
            votes
        
        
            4
            answers
        
        
            81k
            views
        
    How to get memory size of variable?
                Does anybody know how to get memory size of the variable (int, string, []struct, etc) and print it? Is it possible?
var i int = 1
//I want to get something like this:
fmt.Println("Size of i is: %?", ...
            
        
       
    
            67
            votes
        
        
            6
            answers
        
        
            138k
            views
        
    How can I get the memory that my Java program uses via Java's Runtime API?
                There are similar questions out there, but they seem to avoid answering this specific question.  How can I get the memory that my Java program uses via Java's Runtime API?
The answer here indicates ...
            
        
       
    
            66
            votes
        
        
            4
            answers
        
        
            89k
            views
        
    What is the GOMAXPROCS default value?
                Is it guaranteed that GOMAXPROCS is set to 1 when the environment variable of the same name is not set?
This code shows the value:
package main
import (
    "runtime"
    "fmt"
)
func ...
            
        
       
    
            66
            votes
        
        
            2
            answers
        
        
            18k
            views
        
    What does `__import__('pkg_resources').declare_namespace(__name__)` do?
                In some __init__.py files of modules I saw such single line:
__import__('pkg_resources').declare_namespace(__name__)
What does it do and why people use it? Suppose it's related to dynamic importing ...
            
        
       
    
            64
            votes
        
        
            7
            answers
        
        
            59k
            views
        
    Setting JVM heap size at runtime
                Is there a way to set heap size from a running Java program?
            
        
       
    
            63
            votes
        
        
            13
            answers
        
        
            54k
            views
        
    Is it possible to create a function dynamically, during runtime in C++?
                C++ is a static, compiled language, templates are resolved during compile time and so on...
But is it possible to create a function during runtime, that is not described in the source code and has ...
            
        
       
    
            61
            votes
        
        
            8
            answers
        
        
            107k
            views
        
    How to use "cd" command using Java runtime?
                I've created a standalone java application in which I'm trying to change the directory using the "cd" command in Ubuntu 10.04 terminal. I've used the following code.
String[] command = new String[]{"...
            
        
       
    
            61
            votes
        
        
            7
            answers
        
        
            42k
            views
        
    Change a method at runtime via a hot swap mechanism
                Assume we have a trivial Java program that consists of just one class:
public class HelloWorld {
   private static void replacable(int i) {
      System.out.println("Today is a nice day with a ...
            
        
       
    
            58
            votes
        
        
            4
            answers
        
        
            24k
            views
        
    How to configure independent sets of runtime settings in Xcode
                My iPhone application connects to three different servers, say: production, staging and testing. There is a bunch of configuration values that the application uses depending on to which server it ...
            
        
       
    
            58
            votes
        
        
            8
            answers
        
        
            77k
            views
        
    Capturing stdout when calling Runtime.exec
                When experiencing networking problems on client machines, I'd like to be able to run a few command lines and email the results of them to myself.
I've found Runtime.exec will allow me to execute ...
            
        
       
    
            57
            votes
        
        
            2
            answers
        
        
            24k
            views
        
    What is the difference between devel and runtime tag for a Docker container?
                For Pytorch and Tensorflow, there are tags which differentiate devel and runtime, I am not quite sure what are the difference between these two, can someone help me understand that better?
            
        
       
    
            57
            votes
        
        
            1
            answer
        
        
            23k
            views
        
    What is the difference between Version and 'Runtime Version' in .Net?
                When I open the properties window of one of the referenced dlls in my project in Visual Studio I see a Version and also a runtime version .
Actually it is Rhino.Mocks library I am checking. And I see ...
            
        
       
    
            57
            votes
        
        
            1
            answer
        
        
            21k
            views
        
    How JVM stack, heap and threads are mapped to physical memory or operation system
                The compiler book(The dragon book) explains that value types are created on the stack, and reference types are created on the heap. 
For Java, JVM also contains heap and stack in runtime data area.  ...