Questions tagged [runtime]

Runtime is the time during which a program is running (executing)

In computer science, run time, run-time, runtime, or execution time is the time during which a program is running (executing), in contrast to other phases of a program's lifecycle such as compile time, link time, load time, etc.

A run-time error is detected after or during the execution of a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, storage allocation, code generation, and code optimization are typically done at compile time, but may be done at run time depending on the particular language and compiler.

Related

7799 questions
125
votes
10 answers

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. What I'm choking on is this: how can a program…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
124
votes
6 answers

Rails: convert UTC DateTime to another time zone

In Ruby/Rails, how do I convert a UTC DateTime to another time zone?
Drew Johnson
  • 18,973
  • 9
  • 32
  • 35
106
votes
10 answers

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 something } else if(typeof obj === "B") { //do…
Eden1971
  • 1,099
  • 2
  • 7
  • 8
102
votes
11 answers

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 is mounted and accessible... boolean…
Emmanuel Devaux
  • 3,327
  • 4
  • 25
  • 30
100
votes
3 answers

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 ctor =…
Amir Arad
  • 6,724
  • 9
  • 42
  • 49
96
votes
3 answers

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.%ArrayPrototype%.@@unscopables.toSorted I really have no…
Kvz
  • 1,141
  • 1
  • 3
  • 9
94
votes
23 answers

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: Monitor, DDMS, Eclipse Restart ADB integration…
Zidane
  • 1,696
  • 3
  • 21
  • 35
92
votes
6 answers

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 user's specified values at runtime. Updating the…
javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
88
votes
7 answers

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:
jerbersoft
  • 4,344
  • 9
  • 42
  • 48
86
votes
1 answer

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?
Peter
  • 5,138
  • 5
  • 29
  • 38
86
votes
8 answers

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' tablelayoutpanel, which has 10 columns defined, then at…
Ash
  • 5,057
  • 7
  • 35
  • 49
85
votes
8 answers

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.
Migol
  • 8,161
  • 8
  • 47
  • 69
84
votes
5 answers

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)
ogzylz
  • 1,345
  • 2
  • 12
  • 13
83
votes
4 answers

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, which doesn't depend upon anything. (modA is my…
Clayton
  • 1,967
  • 4
  • 18
  • 26
80
votes
6 answers

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 castTest(myEnum val) { //Call a native function that…
Odrade
  • 7,409
  • 11
  • 42
  • 65