首页 文章 精选 留言 我的

精选列表

搜索[MIME类型],共10000篇文章
优秀的个人博客,低调大师

jQuery EasyUI 重写datagrid的datetimebox编辑类型

datagrid的编辑框可以为datatimebox或者为datebox如下: 示例如下: { field: 'makeDate', title: '编制日期', width: 45, editor:{ type:'datebox' , options:{ editable:false } } } $.extend($.fn.datagrid.defaults.editors, { datebox : { init : function(container, options) { var box = $('<input />').appendTo(container); options.onSelect=function(){ var val = box.datebox('getValue'); //执行相关操作 } box.datebox(options); return box; }, getValue : function(target) { return $(target).datebox('getValue'); }, setValue : function(target, value) { $(target).datebox('setValue', value); }, resize : function(target, width) { var box = $(target); box.datebox('resize', width); }, destroy : function(target) { $(target).datebox('destroy'); }, } }); $.extend($.fn.datagrid.defaults.editors, { datetimebox : { init : function(container, options) { var box = $('<input />').appendTo(container); box.datetimebox(options); return box; }, getValue : function(target) { return $(target).datetimebox('getValue'); }, setValue : function(target, value) { $(target).datetimebox('setValue', value); }, resize : function(target, width) { var box = $(target); box.datetimebox('resize', width); }, destroy : function(target) { $(target).datetimebox('destroy'); }, } });

优秀的个人博客,低调大师

Objective-C 处理动态类型的方法

方法 问题或行为 -(BOOL) isKindOfClass : class-object 对象是不是class-object或其子类的成员 -(BOOL) isMemberOfClass:class-object 对象是不是class-object的成员 -(BOOL) respondsToSelector:Selector 对象是否能够响应selector所指定的方法 -(BOOL) instancesRespondToSelector 指定的类实例是否能响应selector -(BOOL) isSubclassOfClass:class-object 对象是否是指定类的子类 -(id) performSelector:selector 应用selector指定的方法 -(id) performSelector:selector withObject:object 应用selector指定的方法 -(id) performSelector:selector withObject:object1 withObject : object2 应用selector指定的方法 测试实验设计 继承关系图: Rectangle.h Square.h 在main.h中的测试如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 // //main.m //Square // //CreatedbyAppleon2017/9/9. //Copyright2017年Apple.Allrightsreserved. // #import<Foundation/Foundation.h> #import"Square.h" int main( int argc, const char *argv[]){ @autoreleasepool{ Square*mySquare=[[Squarealloc]init]; //isMemberof if ([mySquareisMemberOfClass:[Square class ]]==YES) { NSLog(@ "mySquareisamemberofSquareclass" ); // } if ([mySquareisMemberOfClass:[Rectangle class ]]==YES) { NSLog(@ "mySquareissmemberofRectamgleclass" ); } if ([mySquareisMemberOfClass:[NSObject class ]]==YES) { NSLog(@ "mySquareisamemberofNSObjectclass" ); } //isKindOf if ([mySquareisKindOfClass:[Square class ]]==YES) { NSLog(@ "mySquareisakindofSquareclass" ); // } if ([mySquareisKindOfClass:[Rectangle class ]]==YES) { NSLog(@ "mySquareisskindofRectamgleclass" ); } if ([mySquareisKindOfClass:[NSObject class ]]==YES) { NSLog(@ "mySquareisakindofNSObjectclass" ); // } //respondsTo: if ([mySquarerespondsToSelector:@selector(setSide:)]==YES) { NSLog(@ "mySquarerespondstosetSide:method" ); } if ([mySquarerespondsToSelector:@selector(setWidth:addHeight:)]==YES) { NSLog(@ "mySquarerespondstosetWidth:addHeight:method" ); } if ([SquarerespondsToSelector:@selector(alloc)]==YES) { NSLog(@ "Squareclassrespondstoallocmethod" ); } //instancesRespondTo: if ([RectangleinstancesRespondToSelector:@selector(setSide:)]==YES) { NSLog(@ "InstancesofrespondtosetSide:method" ); } if ([SquareinstancesRespondToSelector:@selector(setWidth:addHeight:)]==YES) { NSLog(@ "InstancesofSquarerespondtosetWidth:addHeight::method" ); } if ([SquareisSubclassOfClass:[Rectangle class ]]==YES) { NSLog(@ "Squareisasubclassofarectangle" ); } return 0; } } 本文转自Aonaufly51CTO博客,原文链接:http://blog.51cto.com/aonaufly/1963970,如需转载请自行联系原作者

优秀的个人博客,低调大师

crm2011i创建nt类型字段

using System; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Messages; using Microsoft.Xrm.Sdk.Metadata; /// <summary> /// Int /// </summary> public class CreateIntAttribute { private string entityName = "new_class"; public void Create(IOrganizationService service) { CreateAttributeRequest request = new CreateAttributeRequest(); //关联的实体名称 request.EntityName = entityName; IntegerAttributeMetadata intAttr = new IntegerAttributeMetadata(); //字段名称 intAttr.LogicalName = "new_intvalue"; //架构名称 intAttr.SchemaName = "new_intvalue"; //显示中文名称 intAttr.DisplayName = new Label("Int字段", 2052); //描写叙述 intAttr.Description = new Label("Int字段", 2052); //需求级别 intAttr.RequiredLevel = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None); //字段安全性 intAttr.IsSecured = false; //审核 intAttr.IsAuditEnabled = new BooleanManagedProperty(false); //格式 intAttr.Format = IntegerFormat.None; //最大值 intAttr.MaxValue = 1000; //最小值 intAttr.MinValue = 0; request.Attribute = intAttr; service.Execute(request); } } 版权声明:本文博客原创文章,博客,未经同意,不得转载。 本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/4729604.html,如需转载请自行联系原作者

资源下载

更多资源
Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册