runtime

VC 多文档用户界面设计

拟墨画扇 提交于 2020-01-31 06:06:51
用习惯了 Delphi 、 VB 、 Windows Form ( Visual C# )等称之为 RAD ( Rapid Application Development )的开发工具进行项目开发的都会很满足这些工具和平台提供的快速界面开发的功效:你可以很容易就可以实现一个 MIS 系统的管理界面,提供一个主框架,点击主框架上的某一个菜单项就打开一个处理事务的窗口,这些窗口可以重叠,可以最大 / 小化,一切看起来都像那么回事。但是当你在 VC 中进行开发的时候,发现整个世界都变了,虽然 VC 提供了 MDI 支持多文档视图的框架,但是每次你点击“打开” / “新建”菜单项的时候,你会发现新打开的窗口千孔一面,都是同一个样式,根本就不能满足项目的开发。这就需要你能够为不同的业务逻辑提供不同的显示 / 操作界面。这里给出一个模版,供大家参考: Step 1 :使用 VC 6.0 新建一个 Project ,命名为: MIS 。除选择单文档属性外,一切使用“默认”方式。于是你可以获得五个类: CMainFrame , CMISApp , CMISDoc , CMISView ,和 CAboutDlg ; Step 2 :新建一套新的 Doc/View/Frame :添加新类 CNewDoc ,基类为 CDocument (方法: Insert —— >New Class ( Class

runtime源码阅读笔记

别说谁变了你拦得住时间么 提交于 2020-01-30 23:19:22
malloc_size 函数是返回操作系统实际分配的内存大小,传入参数为指针。 void *p = xxxmalloc_size(p) NSObject.h NSObject的接口函数,这个可以做位阅读的入口 NSObject的实现在 NSObject.mm这个文件中。底层的方法调用,如 object_getMethodImplementation 等,是在 objc-class.mm , objc-runtime-new.mm文件中 接口的官方文档 https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc 来源: https://www.cnblogs.com/huangzizhu/p/12244145.html

babel 7 简单指北

柔情痞子 提交于 2020-01-30 08:51:44
babel 7 对于 babel 7, babel 的官网 已经介绍得非常详细了,但有时感觉文档和实际使用总是差那么一点东西。 主要包 先来看一下主要的包,babel 7 对于包进行了一些简化。 @babel/cli : 用于执行相应命令 @babel/core : 核心包,将 js 代码分析成 AST @babel/preset-env : 包含 es6+ 的语法转换规则,如箭头函数、const 等 @babel/polyfill : es6 内置对象和函数的垫片,如 Promise、Array.from 等 @babel/plugin-transform-runtime : 防止 polyfill 污染全局变量 @babel/runtime : 与 @babel/plugin-transform-runtime 配套使用 安装 babel 7 npm init -y npm i -S @babel/cli @babel/core 安装完之后,可以看见 package.json 下有 babel 的信息。 { "name": "babel_7", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" &&

Does casting change the declared/reference type at run-time?

大兔子大兔子 提交于 2020-01-30 07:43:47
问题 First, let me be clear about what I mean by the declared type. Assume SuperBoss is a superclass of the class Boss. SuperBoss mrBond = new Boss(); SuperBoss is the declared type, and Boss is the actual type. Personally, I think the declared type is changed at run-time due to the following run-time exception: SuperBoss mrWayne = new SuperBoss(); ((Boss)mrWayne).randomMethod(); //Exception: java.lang.ClassCastException: SuperBoss cannot be cast to Boss I know this may seem trivial, but I'm going

Does casting change the declared/reference type at run-time?

坚强是说给别人听的谎言 提交于 2020-01-30 07:42:34
问题 First, let me be clear about what I mean by the declared type. Assume SuperBoss is a superclass of the class Boss. SuperBoss mrBond = new Boss(); SuperBoss is the declared type, and Boss is the actual type. Personally, I think the declared type is changed at run-time due to the following run-time exception: SuperBoss mrWayne = new SuperBoss(); ((Boss)mrWayne).randomMethod(); //Exception: java.lang.ClassCastException: SuperBoss cannot be cast to Boss I know this may seem trivial, but I'm going

Memory Violation Dynamically Appending to Methods at runtime

爷,独闯天下 提交于 2020-01-30 05:44:26
问题 Disclaimer: I'm doing this for learning purposes. This is not going to be used in code. I'm trying to understand how method table are structure for generics, I want to dynamically appending to methods at runtime. I found a very useful stack overflow question reference for getting me started. I have a simple controller which I'm using as a test to verify my methods are swapping: public class ValuesController : ControllerBase { static ValuesController() { var methodToReplace = typeof

How to detect whether Java runtime is installed or not

那年仲夏 提交于 2020-01-29 04:48:52
问题 I program windows applications using Java and this builds a ".jar" file not an ".exe" file. When a client computer with no java runtime installed opens the ".jar" file, it runs as an archive with winrar. All I want to know is how to detect whether java runtime is installed or not on a computer using c# code in order to show a MessageBox telling user to install java runtime, or launches the ".jar" file using the java runtime if it's installed. 回答1: You can check the registry RegistryKey rk =

ClrFromCSharp_2_2_生成部署打包应用程序

亡梦爱人 提交于 2020-01-28 21:38:40
1,在\reps\CSharpFromCSarp\CSharpFromCSarp_2_2,建立新解决方案和解决项目 并且输入以下代码 namespace ClrFromCSharp_2_2 { class Program { static void Main(string[] args) { System.Console.WriteLine("hi"); } } } 2,然后,在工具-命令行-Powshell,打开Powshell并且输入指令 PS C:\reps\ClrFromCSharp\ClrFromCSharp_2_2> csc.exe Program.cs Microsoft(R) Visual C# 编译器 版本 3.4.1-beta4-19610-02 (c4e5d138) 版权所有(C) Microsoft Corporation。保留所有权利。 3,响应文件,响应文件就是包含了/r:…/t…类似的文件。以rsp结尾。默认的文件安装位置为: C:\Windows\Microsoft.NET\Framework\v4.0.30319 # This file contains command-line options that the C# # command line compiler (CSC) will process as part # of every

Is there a way to compile / load fxml files faster and only one time, and not at every restart of an application?

时光毁灭记忆、已成空白 提交于 2020-01-27 18:43:33
问题 I have a program which loads many fxml files when executed. The application will be finished in a short time, and loading the application just takes too long. There are many fxml files (20+) and all these fxml files are loaded with Java code. There will be a point that the application is finished and ready for use, but all files will be loaded with every execution of the program. Can the fxml files only be compiled once, because they won't be changed when finished? The java code will of

Is there a way to compile / load fxml files faster and only one time, and not at every restart of an application?

时光毁灭记忆、已成空白 提交于 2020-01-27 18:35:38
问题 I have a program which loads many fxml files when executed. The application will be finished in a short time, and loading the application just takes too long. There are many fxml files (20+) and all these fxml files are loaded with Java code. There will be a point that the application is finished and ready for use, but all files will be loaded with every execution of the program. Can the fxml files only be compiled once, because they won't be changed when finished? The java code will of