runtime

Failure delivering result ResultInfo{who_null,request=1,result=-1, data =Intent{( has extras )}} to activity;NullPointerException

谁说我不能喝 提交于 2019-12-04 05:23:43
I have two classes these names are Courses and MainActivity .MainActivity has LAUNCHER activity and it has Gridlayout. Courses has DEFAULT activity.When GridLayout clicked Courses Interface is openning and user is filling the views according to his or her course program so Courses object is created.I would like to send this object to MainActivity class.When I sending this object I'm getting NullPointerException.I tried to solve this problem but I can not.I need a proffesional help. here is the Courses.java package com.example.classprogram; public class Courses extends Activity implements

Correct way to distribute VC++ runtime files

≯℡__Kan透↙ 提交于 2019-12-04 05:11:54
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 correct way to install a private assembly is to copy the

分析Runtime的属性Property

£可爱£侵袭症+ 提交于 2019-12-04 04:47:10
一、介绍 在OC中我们可以给任意的一个类以@property的格式声明属性,当然对于这个属性也会采用某一些属性关键字进行修饰,那么属性的真正的面目是啥样子的呢?其实,runtime源码中可以看到,property是一个结构,如下所示,只不过苹果为这个结构体另外定义了一个结构体指针。 //属性结构体指针 typedef struct objc_property *objc_property_t; 二、函数 正如我们所知,MJExtension是一个非常流行的json解析框架,其内部对对象的每一个属性进行解析的方式其实就是通过runtime来实现的。runtime源码中提供了属性的相关API函数。通过这些函数,我们可以轻松的得到每一个属性名和类型以及特性,相关函数如下: //获取一个属性 objc_property_t _Nullable class_getProperty(Class _Nullable cls, const char * _Nonnull name); //添加一个属性 class_addProperty(Class _Nullable cls, const char * _Nonnull name, const objc_property_attribute_t * _Nullable attributes,unsigned int attributeCount)

boost::property_tree::info_parser breaks on spaces in value

点点圈 提交于 2019-12-04 04:42:52
问题 I am facing an issue where I have a configuration file and I parse it with boost::property_tree:info_parser. I use this code to do the work: struct _Config { std::string info[2]; boost::property_tree::ptree pt; _Config() { //check if config file exists, if not create it, etc, do other stuff not related to the issue //this code reproduces the issue //DEFAULT VALUE, can be changed by configuration later info[0] = "If updating this file make sure to update all settings accordingly."; info[1] =

我眼中的.NET Core

◇◆丶佛笑我妖孽 提交于 2019-12-04 04:19:59
一、什么是.NET Core .NET Core是一个开源通用的开发框架,支持跨平台,即支持在Window,macOS,Linux等系统上的开发和部署,并且可以在硬件设备,云服务,和嵌入式/物联网方案中进行使用。.NET Core的源码放在 GitHub 上,由微软官方和社区共同支持。它和传统的.NET Framework,属于“子集—超集”的关系,或者你也可以简单地认为它就是.NET Framework的跨平台版本(基于 BCL 的层面上看)。NET Core中的大部分核心代码都是从.NET Framework中继承重写的,包括Runtime和Libraries(如GC, JIT, 部分类型)。 怎么理解呢,因为.NET framework是只能够运行在windows上面的,而.NET Core是可以跨平台的。 二、.NET Core的核心组成 .NET Core主要是由两部分组成 1、.NET Runtime 即 CoreCLR 。如之前所说,CoreCLR与.NET Framework的CLR并没有什么区别,进程管理,GC,JIT(RyuJIT 编译器)这些部分也都是一样的,只是针对服务器系统做了相应优化。现在CLR和CoreCLR也在进行同步更新,只是可以肯定的是,CoreCLR才是.NET的未来,CLR将作为兼容手段而存在 .NET Core包含了两种不同的运行时

Forking a process in Java

你离开我真会死。 提交于 2019-12-04 04:15:37
问题 Is it possible to create a complete fork of a 'PROGRAM' in execution into two sub-programs from a single execution sequence ? The sub-programs produced are completely identical. They have the same execution sequences and values but now they are two different programs. It is like creating a clone of an Object, thus giving us two different objects of the same type to work on. But instead of just an object and some values, here we want to create a completely parallel execution sequence of a

How to detect the OS from a silverlight application?

白昼怎懂夜的黑 提交于 2019-12-04 04:13:26
I have a Silverlight3 application that is meant to run on both Windows and Mac OS environments. I would like to know in runtime if my application is running on a Windows or Mac so I can tweak a few things to the way users are accustomed to in their operating system of choice. For example, in Windows it is the norm to use "OK" "Cancel" buttons, while in Mac OS the norm is "Cancel" "OK" buttons (reverse order). Any ideas? NewAgeSolution There are two ways. From Silverlight: string os = Environment.OSVersion.Platform.ToString(); string version = Environment.OSVersion.Version.ToString(); From ASP

Go netpoll I/O 多路复用构建原生网络模型之源码深度解析

ε祈祈猫儿з 提交于 2019-12-04 03:58:53
导言 Go 基于 I/O multiplexing 和 goroutine 构建了一个简洁而高性能的原生网络模型(基于 Go 的I/O 多路复用 netpoll ),提供了 goroutine-per-connection 这样简单的网络编程模式。在这种模式下,开发者使用的是同步的模式去编写异步的逻辑,极大地降低了开发者编写网络应用时的心智负担,且借助于 Go runtime scheduler 对 goroutines 的高效调度,这个原生网络模型不论从适用性还是性能上都足以满足绝大部分的应用场景。 然而,在工程性上能做到如此高的普适性和兼容性,最终暴露给开发者提供接口/模式如此简洁,其底层必然是基于非常复杂的封装,做了很多取舍,也有可能放弃了一些『极致』的设计和理念。事实上 netpoll 底层就是基于 epoll/kqueue/iocp 这些系统调用来做封装的,最终暴露出 goroutine-per-connection 这样的极简的开发模式给使用者。 Go netpoll 在不同的操作系统,其底层使用的 I/O 多路复用技术也不一样,可以从 Go 源码目录结构和对应代码文件了解 Go 在不同平台下的网络 I/O 模式的实现。比如,在 Linux 系统下基于 epoll,freeBSD 系统下基于 kqueue,以及 Windows 系统下基于 iocp。 本文将基于

VC++: KB971090 and selecting Visual C Runtime DLL dependencies

梦想与她 提交于 2019-12-04 03:45:46
As you might know, Microsoft recently deployed a security update for Visual Studio: KB971090 . Among other things, this updated the Visual C Runtime DLL from version 8.0.50727.762 to 8.0.50727.4053. So after this update, everything I compile that uses the runtime dynamically linked, gets their dependencies updated to the new runtime. Of course, for new applications it is fine to update to the new, presumably more secure, version. But I would also like to be able to retain the old dependency - for example, I might like to build a fixpack that only require a single DLL to be replaced (if I try

Setting Clojure “constants” at runtime

百般思念 提交于 2019-12-04 02:52:02
I have a Clojure program that I build as a JAR file using Maven. Embedded in the JAR Manifest is a build-version number, including the build timestamp. I can easily read this at runtime from the JAR Manifest using the following code: (defn set-version "Set the version variable to the build number." [] (def version (-> (str "jar:" (-> my.ns.name (.getProtectionDomain) (.getCodeSource) (.getLocation)) "!/META-INF/MANIFEST.MF") (URL.) (.openStream) (Manifest.) (.. getMainAttributes) (.getValue "Build-number")))) but I've been told that it is bad karma to use def inside defn . What is the Clojure