runtime

Instrumentation (diagnostic) library for C++

帅比萌擦擦* 提交于 2019-12-04 12:26:03
I'm thinking about adding code to my application that would gather diagnostic information for later examination. Is there any C++ library created for such purpose? What I'm trying to do is similar to profiling, but it's not the same, because gathered data will be used more for debugging than profiling. EDIT: Platform: Linux Diagnostic information to gather: information resulting from application logic, various asserts and statistics. You might also want to check out libcwd : Libcwd is a thread-safe, full-featured debugging support library for C++ developers. It includes ostream-based debug

Java dynamically load plugin

元气小坏坏 提交于 2019-12-04 12:08:43
问题 I want to make an application that can dynamically load plug-ins but I've not found any literature on Internet. The difficult thing is: I don't know the name in advance. For example I've a Plugin interface: public interface Plugin { public static Plugin newPlugin(); public void executePlugin(String args[]); } So that every Class implementing Plugin in the jar file are instantiated in a list: Method method = classToLoad.getMethod ("newPlugin"); mylist.add(method.invoke(null); First problem is,

VSTO 4.0 Runtime Download Missing from MS?

浪尽此生 提交于 2019-12-04 10:48:39
问题 We have code that checks for the presence of the VSTO 4.0 runtime and downloads it, if missing. This has worked fine until today. It seems the VSTO runtime file has gone missing from MS. Does anyone know anything about this? Can we tell our clients it's an MS problem and will be cleared up shortly? Google doesn't find any comments about the file being removed. Thanks. 回答1: Note: the latest update to the VSTO Runtime (from November 2012) has merged the VSTO Runtime packages from two files (x86

Communicating to a C++ program from java

[亡魂溺海] 提交于 2019-12-04 10:24:06
I want to execute a external .exe program from within java. The .exe is a CLI application which takes input in runtime( scanf() ) and outputs depending on the input. I can call the program to execute from java using Process p = Runtime.getRuntime().exec("cmd /c start a.exe"); instead of Process p = Runtime.getRuntime().exec("cmd /c start a.exe"); But I think it is also possible to call a program from within java. I have my whole program written in C++ just need a GUI which is written in java. There are a few things to notice:= 1) The communication with the .exe should be runtime (not through

Tetranacci Numbers in Log(n)

旧城冷巷雨未停 提交于 2019-12-04 10:14:39
I have stumbled upon a problem, which requires me to calculate the nth Tetranacci Number in O(log n). I have seen several solutions for doing this for Fibonacci Numbers I was looking to follow a similar procedure (Matrix Multiplication/Fast Doubling) to achieve this, but I am not sure how to do it exactly (take a 4 by 4 matrix and 1 by 4 in a similar fashion doesn't seem to work). With dynamic programming/general loops/any other basic idea, I am not able to achieve sub-linear runtime. Any help appreciated! From the OEIS , this is the (1,4) entry of the nth power of 1 1 0 0 1 0 1 0 1 0 0 1 1 0

How to programatically set or clear the 32BIT flag?

大憨熊 提交于 2019-12-04 09:53:11
When compiling, I always set it for Any CPU. However there are some customers that do not have a 64 bit version of a required binary, even when running on an x64 system. In these instances I have asked them to modify my binary with the corflags.exe /32BIT+ option: http://msdn.microsoft.com/en-us/library/ms164699(VS.80).aspx I would like to make this transparent and modify the binary myself during installation time if the 64 bit version is not present. I would prefer not to make a call to corflags.exe myself as that would mean I would need to redistribute the application which is not allowed as

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available

一笑奈何 提交于 2019-12-04 09:45:01
原文链接 https://blog.csdn.net/xiaomajia029/article/details/88320233 问题描述: 原因分析: 在项目配置的时候,默认 npm 包导出的是运行时构建,即 runtime 版本,不支持编译 template 模板。 vue 在初始化项目配置的时候,有两个运行环境配置的版本:Compiler 版本、Runtime 版本。 其主要区别在于: Compiler 版本: 可以对 template 模板内容进行编译(包括字符串模板和可以绑定的 html 对象作为模板),例如: new Vue({ el: "#box", template: "<div>{{msg}}</div>", data: { msg: "hello" } }); Runtime 版本: 使用 vue-loader 加载.vue 文件(组件文件)时,webpack 在打包过程中对模板进行了渲染。 解决方法 修改配置文件中的 vue 引用 一、 vue cli 2.x 找到 webpack.base.conf.js 文件,修改以下配置: 在 webpack.base.conf.js 配置文件中多加了一段代码,将 vue/dist/ package.json 配置文件的"main": "dist/vue.runtime.common.js",改为引用代码中的引用 vue

Write a custom syntax interpreter in java?

删除回忆录丶 提交于 2019-12-04 09:32:55
I am about to begin coding a demo program for a lecture I'm about to give. I want to let each student in the class download this application, then be able to create instances of objects (and their graphical representations) interactively via a command line. I decided to write in java, not because it's the language I'm most familiar with, but because it's got easy graphics classes and I can be pretty sure that the jar is going to run on their computers. Intro over. Now the question: What is a good way to implement some custom command line syntax for this program? I want to use a simple,

How to generate an instance of an unknown type at runtime?

半城伤御伤魂 提交于 2019-12-04 09:17:41
问题 i've got the following in C#: string typename = "System.Int32"; string value = "4"; theses two strings should be taken to generate an object of the specified type with the specified value... result should be: object o = CreateUnknownType(typename, value); ... Int32 test = (Int32)o; 回答1: Is this what are you are thinking? object result = Convert.ChangeType("4", Type.GetType("System.Int32")); 回答2: As stated, this is too broad and can not be solved generally. Here are some options: Type type =

Is there real static polymorphism in C++?

眉间皱痕 提交于 2019-12-04 09:13:24
问题 Here is a simple code in C++: #include <iostream> #include <typeinfo> template<typename T> void function() { std::cout << typeid(T).name() << std::endl; } int main() { function<int>(); function<double>(); return 0; } I have read that templates in C++ is a compile-time feature, which is not like generics in C#/Java. So as I understood, the C++ compiler will divide a single defined function into various number (depends on calls count with different type) of functions. Am I right or not? I'm not