- Unity MonoBehaviour 生成dll
牙膏上的小苏打2333
Unityunitydll
dllllllllllllllvs创建类库项目添加UnityEngine、UnityEditor引用添加MonoBehaviour类设置dll生成路径生成dll使用dll中的Mono类vs创建类库项目添加UnityEngine、UnityEditor引用右键引用,添加引用找到unity安装目录下的:\Editor\Data\Managed添加MonoBehaviour类usingUnityEngi
- 2024-02-11 Unity 编辑器开发之编辑器拓展2 —— 自定义窗口
蔗理苦
Unity学习unity编辑器游戏引擎c#
文章目录1创建窗口类2显示窗口3窗口事件回调函数4窗口中常用的生命周期函数5编辑器窗口类中的常用成员6小结1创建窗口类当想为Unity拓展一个自定义窗口时,只需实现继承EditorWindow的类即可,并在该类的OnGUI函数中编写面板控件相关的逻辑。命名空间:UnityEditor类名:EditorWindow2显示窗口调用EditorWindow.GetWindow()添加自定义页签,用于开启
- unity editor 编辑器 GUID localID LocalFileId 查找问题
Summer鹏
unity开发刨坑小计unity3d前端
//传入对象实例化ID可以获取到guidlocalidguid=预设的IDlocalid=预设内的ID//这个方法有个问题如果在预设编辑器状态下可能出现查不到guidlocalid原因可能传入对象是是编辑状态下instanceid并不是保存状态下的UnityEditor.AssetDatabase.TryGetGUIDAndLocalFileIdentifier//如果在预设编辑状态下可以使用Gl
- Unity - Baking System - 烘焙失效的问题
Jave.Lin
unityunity游戏引擎
文章目录环境问题解决方法环境unity:2020.2.5f1,2020.3.37f1pipeline:BRP问题我之前有去搜索过场景烘焙失效的问题,都是unity发包后和unityEditor下运行不同:发包后丢失烘焙效果,一般都是说:shader中的LightmapMode的变体没有勾上对应的关键字开关但是我们项目的情况不同,是:A场景美术提交了烘焙效果,B场景美术更新下来后,B的unityed
- UnityEditor 常用组件
Charles陽
文本voidOnGUI(){GUILayout.Label("文本",EditorStyles.boldLabel);}3267959-f263769fc0a25409.png文本框stringmyString="文本框123";voidOnGUI(){myString=EditorGUILayout.TextField("文本框:",myString);}3267959-a823242cc4e2
- C#代码添加脚本头
Bug敲起来
c#开发语言
前言创建脚本的时候添加脚本的介绍代码展示usingSystem.IO;//////创建脚本自动添加头注///publicclassCommentFirst:UnityEditor.AssetModificationProcessor{//////在资源创建生成.meta时调用//////自动传入资源路径publicstaticvoidOnWillCreateAsset(stringpath){pa
- Unity WebView 中文输入支持
bosins
C#Unitywebview
使用版本:Vuplex3DWebViewforWindowsv4.4;测试环境:unityeditor2020.3.40f1c1、Windows;1、打开脚本CanvasWebVie!wPrefab2、找到_initCanvasPrefab方法,约略在459行附近3、添加一行代码:Input.imeCompositionMode=IMECompositionMode.On;4、保存,搞定!参考资料
- Unity 调用DLL
极客柒
Unityunityplugindll
第一步将生成的DLL丢到UnityPlugins目录下没有的Plugins文件就自己创建一下Unity会对Plugin文件夹下的文件识别为插件处理UnityEditor文件夹和Plugin文件夹的区别二者都会被当作插件或者扩展处理区别在于Editor下的插件在打包后会被过滤,所以:如果你有一些插件需要在打包后也要调用如Json插件就需要放入Plugin下,如果你只是一些读表的插件资源优化插件只是在
- unityEditor 打开文件
cwl72
c#unity
usingSystem;usingSystem.Diagnostics;usingUnityEditor;usingUnityEngine;//////打开文件夹相关的实用函数。///publicstaticclassOpenFolder{//////打开DataPath文件夹。///[MenuItem("Tools/OpenFolder/DataPath",false,10)]publicsta
- Unity AssetDatabase.FindAssets
cwl72
unity游戏引擎
Unity里的AssetDataBase简单介绍UnityEditor:提示:AssetDatabase.FindAssetsusingUnityEngine;usingUnityEditor;usingSystem.IO;/*1.编译器代码:继承自Editor,只适用于Unity编辑器中执行代码2.[MenuItem("......")]用于修饰在编译器产生菜单3.AssetDatabase:只
- 【Unity3D之日常BUG】Unity3D中出现WakeUp为空的时候时候解决方案
恬静的小魔龙
#Unity3D之日常BUGbug
推荐阅读CSDN主页GitHub开源地址Unity3D插件分享简书地址我的个人博客大家好,我是佛系工程师☆恬静的小魔龙☆,不定时更新Unity开发技巧,觉得有用记得一键三连哦。一、前言今天在开发中遇到一个问题(以前也遇到过,没想起来记下来),也就是WakeUp为空,具体错误提示是这样的:UnityEditor.Graphs.Edge.WakeUp()NullReferenceException:O
- UnityEditor Tabs 分页表签
BirthFat
不确定大家是否需要讲解,还是说只要有代码就够了,也没什么人给我留言,所以我就按自己的想法来说了。首先Tabs表签的需求是普遍的。做表签的方式也有很多,我只说一个我习惯用的吧。如果有大神有更好的方法希望也能留言交流,相互学习。万分感谢。1Tabs标签页的实现首先定义一个枚举,作为状态切换基础逻辑表签enumETAB{State_Config,//状态配置GUI_Style,//系统GUIUnity_
- 在 Unity 中获取 Object 对象的编辑器对象
rrtt_2323
Unity编辑器Unity扩展c#
有这个需求的原因是,在编辑器的Inspector逻辑中,写了许多生成逻辑。现在不想挨个在Inspector上都点一遍按钮,所以就需要能获取到它们的编辑器对象。发现可以借助官方的UnityEditor.Editor.CreateEditor方法达到目的,如下:publicstaticTEditorGetEditorObjByRuntimeObj(UnityEngine.ObjectruntimeOb
- 基于Unity Editor开发一个技能编辑器可能涉及到的内容
风流侍郎中
unity编辑器游戏引擎
基于UnityEditor开发一个技能编辑器,涉及到的方面较多,涵盖了Unity自身的GUI框架、序列化系统、自定义编辑器、脚本调用与数据存储等。下面是几个关键点和你可能会用到的类以及API:自定义Inspector:使用Editor类来重写组件的Inspector界面。使用SerializedObject和SerializedProperty来操作Inspector界面与数据的序列化。自定义Ed
- unity 发布WebGL 读取streamingAssets文件夹内的TXT 遇到的问题
AD_喵了个咪
UnityC#unitywebgl
读取的文件路径上代码stringpath=Path.Combine(Application.streamingAssetsPath,"data.txt");//unityEditor,webgl端都可以读取stringpath=Application.streamingAssetsPath+"/data.txt";//unityEditor,webgl端都可以读取//stringpath="fil
- UnityEditor 布局(window layout)
TrudgeCarrot
在unity开发界面右上角有个layout点击下拉保存一般在这个目录C:\Users\Administrator\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts拷贝到项目中EditorUtility.LoadWindowLayout("Assets/********");EditorApplication.OpenScene("Assets
- 2023 Unite 大会关于“Muse“ AI 大模型训练
Kaitiren
Unity3D技术专栏人工智能unity游戏引擎muse
UnityMuse借助强大的AI能力帮助你探索、构思和迭代,其中包括纹理和精灵两项功能,可将自然语言和视觉输入转化为可用资产。将AI引入UnityEditor中的Muse提供了更快将想法转化为实物的选项。您可以调整并使用文本提示、图案、颜色和草图,将其转化为真实且项目准备就绪的输出。为了提供有用、负责任和尊重其他创作者版权的输出,我们挑战自己在Muse的精灵和纹理生成AI模型训练方法上进行创新。在
- VSCode 用 Emmylua 同时调试 Unity + Lua
A_Ankh
unityluavscode
1.下载Emmylua2.创建文件luanch.json{ "version":"0.2.0", "configurations":[ { "name":"UnityEditor", "type":"unity", "path":"D:/FourthProj/NewClient/clientnew/Library/EditorInstance.json",
- Unity3D Attributes用法小结(二)
午夜支枕听河流
U3DUnityEditorAttributes
本文的Attribute总结,是在Unity3DAttributes用法小结(一)基础上继续完成的,UnityEditor属性位于UnityEditor命名空间下面,主要在Unity引擎想Editors情况下使用的。本文参考的API版本为2018.3,它的UnityEditor的Attributes如下:1.CallbackOrderAttribute2.CanEditMultipleObject
- unity创建一个VR项目(一)
脑瘫仙子
unity3dvroculus
创建一个可以基本互动的场景预备引入VRTK设置Camera和Track设置双手将对象设置成可互动对象可能的问题预备unityEditor我使用的版本是2019.4LTS,建议使用这一个版本的编辑器,2020版的似乎不再内置openVR了。另外需要准备一个VRheadset,我使用的是Oculusquest2,通过OculusLink连接的电脑在unity编辑器中,Edit->ProjectSett
- Unity修改创建的脚本模板,Unity脚本模板路径
先生沉默先
UnityUnity
Unity脚本路径将脚本放到Editor文件夹下,Editor文件夹位置不限。usingUnityEditor;usingUnityEngine;usingSystem.IO;publicclassAddFileHeadComment:UnityEditor.AssetModificationProcessor{//////此函数在asset被创建完,文件已经生成到磁盘上,但是没有生成.meta文
- An item with the same key has already been added. Key: UnityEditor.Scripting.ScriptCompilation报错
YZW*威
笔记
1、unity3D导入新的插件会出现以下报错:ArgumentException:Anitemwiththesamekeyhasalreadybeenadded.Key:UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySystem.Collections.Generic.Dictionary`2[TKey,TValue].TryInser
- UnityEditor扩展开发_右键菜单很详细说明,以及优先参数的一张图
avi9111
每天一点u3dhtml
游戏制作到一定阶段后,一定会出现一些GameObject的“模板”。比如一个敌人一定会有一个“EnemyBehaviour”、“BoxCollider”等。虽然Prefab可以用来作为“预制件”,但是Prefab产生的物体和Prefab自身有关联,同时还要从Project菜单里去找到Prefab再拖出来。一个解决方案是扩展编辑器菜单,就像右键Hierachry时出现的3DObject、2DObje
- C# 文件夹递归拷贝操作
炉石不传说
在Unity游戏开发中,有时候做编辑器开发,或者做一些小工具的时候经常用到文件操作。文件夹内容的复制是最常用的,这里做个Mark,方便以后翻阅,同时也能分享给那些需要同样接口的筒靴们(别问我为什么不用Unity自带的文件操作(UnityEditor.FileUtil))上菜(code):usingSystem.Collections;usingSystem.Collections.Generic;
- Unity C# 关于Attribute的使用(超实用)
雄关漫道从头越
UnityC#关于Attribute的使用非常实用,转发自以上链接。以下是Unity官网文档中找到的所有Attribute,下面将按照顺序,逐个对这些Attribute进行说明和小的测试。部分例子使用了Unity官方的示例。UnityEngineAddComponentMenu可以在UnityEditor的Component的Menu中增加自定义的项目。菜单可以设置多级,使用斜线/分隔即可。在Hi
- Unity 基础 之 实现简单的Android移动端本地数据读取与写入封装(简单加密写入,解密读取 json 数据)
仙魁XAN
Unity基础UnityAndroid数据读取写入数据加密json解析
Unity基础之实现简单的Android移动端本地数据读取与写入封装(简单加密写入,解密读取json数据)目录Unity基础之实现简单的Android移动端本地数据读取与写入封装(简单加密写入,解密读取json数据)一、简单介绍二、相关知识说明三、注意实现四、效果预览(演示为UnityEditor,测试过移动端同理可行)五、实现步骤六、关键代码一、简单介绍Unity中的一些基础知识点。本节介绍,在
- 【Unity笔记】编辑器扩展基础篇
“愚者先生”
Unity功能unity编辑器
文章目录扩展特殊目录检视器扩展1不属于Editor的扩展2显示开发顶部菜单顶部菜单窗口场景视窗扩展扩展检视器扩展开发inspector顶部菜单栏弹窗场景编辑器,编辑器主场景页面特殊目录多目录会自动合并,都是特殊目录重名会被覆盖游戏逻辑中不能带有UnityEditor中,否则会打包错误检视器扩展1不属于Editor的/*****************************************
- 扩展Unity Inspector
码上
UnityEditor下,可以在不改变原有布局的情况下扩展Inspect的界面。在继承了Editor的类中,有两种实现方式:usingUnityEditor;[CustomEditor(typeof(CustomClass))]publicclassCustomClassEditor:Editor{publicoverridevoidOnInspectorGUI(){//自定义代码base.OnI
- Roslyn 去除多余using
小鱼游戏开发
unity3droslynunityusing语法树分析
原因当你添加新代码的时候VS会自动帮你添加对应的using,但是它只会帮你加不会帮你减由于运行时并不能使用UnityEditor命名空间里面的东西。你就算加了也会在打包的时候给你报错,除非使用宏包裹起来因为我们打包都是在打包机上操作的。一般情况下自己本地是不会打包也就不会知道在代码里面有多余using经常出现打包到一半因为有多余的using导致的打包失败。然后再通知程序修改上传重新打包解决方案VS
- 【UnityEditor编辑器扩展】遍历子节点,带中断实现
avi9111
每天一点u3d程序员瞎折腾
项目内,全局搜索预制体vartitle="";varprogress=0;varfiles=SearchFiles(Application.dataPath,new[]{"*.prefab"});EditorUtility.DisplayProgressBar(title,assetPath,++progress/filesCount);EditorUtility.ClearProgressBar
- Java序列化进阶篇
g21121
java序列化
1.transient
类一旦实现了Serializable 接口即被声明为可序列化,然而某些情况下并不是所有的属性都需要序列化,想要人为的去阻止这些属性被序列化,就需要用到transient 关键字。
- escape()、encodeURI()、encodeURIComponent()区别详解
aigo
JavaScriptWeb
原文:http://blog.sina.com.cn/s/blog_4586764e0101khi0.html
JavaScript中有三个可以对字符串编码的函数,分别是: escape,encodeURI,encodeURIComponent,相应3个解码函数:,decodeURI,decodeURIComponent 。
下面简单介绍一下它们的区别
1 escape()函
- ArcgisEngine实现对地图的放大、缩小和平移
Cb123456
添加矢量数据对地图的放大、缩小和平移Engine
ArcgisEngine实现对地图的放大、缩小和平移:
个人觉得是平移,不过网上的都是漫游,通俗的说就是把一个地图对象从一边拉到另一边而已。就看人说话吧.
具体实现:
一、引入命名空间
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Controls;
二、代码实现.
- Java集合框架概述
天子之骄
Java集合框架概述
集合框架
集合框架可以理解为一个容器,该容器主要指映射(map)、集合(set)、数组(array)和列表(list)等抽象数据结构。
从本质上来说,Java集合框架的主要组成是用来操作对象的接口。不同接口描述不同的数据类型。
简单介绍:
Collection接口是最基本的接口,它定义了List和Set,List又定义了LinkLi
- 旗正4.0页面跳转传值问题
何必如此
javajsp
跳转和成功提示
a) 成功字段非空forward
成功字段非空forward,不会弹出成功字段,为jsp转发,页面能超链接传值,传输变量时需要拼接。接拼接方式list.jsp?test="+strweightUnit+"或list.jsp?test="+weightUnit+&qu
- 全网唯一:移动互联网服务器端开发课程
cocos2d-x小菜
web开发移动开发移动端开发移动互联程序员
移动互联网时代来了! App市场爆发式增长为Web开发程序员带来新一轮机遇,近两年新增创业者,几乎全部选择了移动互联网项目!传统互联网企业中超过98%的门户网站已经或者正在从单一的网站入口转向PC、手机、Pad、智能电视等多端全平台兼容体系。据统计,AppStore中超过85%的App项目都选择了PHP作为后端程
- Log4J通用配置|注意问题 笔记
7454103
DAOapachetomcatlog4jWeb
关于日志的等级 那些去 百度就知道了!
这几天 要搭个新框架 配置了 日志 记下来 !做个备忘!
#这里定义能显示到的最低级别,若定义到INFO级别,则看不到DEBUG级别的信息了~!
log4j.rootLogger=INFO,allLog
# DAO层 log记录到dao.log 控制台 和 总日志文件
log4j.logger.DAO=INFO,dao,C
- SQLServer TCP/IP 连接失败问题 ---SQL Server Configuration Manager
darkranger
sqlcwindowsSQL ServerXP
当你安装完之后,连接数据库的时候可能会发现你的TCP/IP 没有启动..
发现需要启动客户端协议 : TCP/IP
需要打开 SQL Server Configuration Manager...
却发现无法打开 SQL Server Configuration Manager..??
解决方法: C:\WINDOWS\system32目录搜索framedyn.
- [置顶] 做有中国特色的程序员
aijuans
程序员
从出版业说起 网络作品排到靠前的,都不会太难看,一般人不爱看某部作品也是因为不喜欢这个类型,而此人也不会全不喜欢这些网络作品。究其原因,是因为网络作品都是让人先白看的,看的好了才出了头。而纸质作品就不一定了,排行榜靠前的,有好作品,也有垃圾。 许多大牛都是写了博客,后来出了书。这些书也都不次,可能有人让为不好,是因为技术书不像小说,小说在读故事,技术书是在学知识或温习知识,有些技术书读得可
- document.domain 跨域问题
avords
document
document.domain用来得到当前网页的域名。比如在地址栏里输入:javascript:alert(document.domain); //www.315ta.com我们也可以给document.domain属性赋值,不过是有限制的,你只能赋成当前的域名或者基础域名。比如:javascript:alert(document.domain = "315ta.com");
- 关于管理软件的一些思考
houxinyou
管理
工作好多看年了,一直在做管理软件,不知道是我最开始做的时候产生了一些惯性的思维,还是现在接触的管理软件水平有所下降.换过好多年公司,越来越感觉现在的管理软件做的越来越乱.
在我看来,管理软件不论是以前的结构化编程,还是现在的面向对象编程,不管是CS模式,还是BS模式.模块的划分是很重要的.当然,模块的划分有很多种方式.我只是以我自己的划分方式来说一下.
做为管理软件,就像现在讲究MVC这
- NoSQL数据库之Redis数据库管理(String类型和hash类型)
bijian1013
redis数据库NoSQL
一.Redis的数据类型
1.String类型及操作
String是最简单的类型,一个key对应一个value,string类型是二进制安全的。Redis的string可以包含任何数据,比如jpg图片或者序列化的对象。
Set方法:设置key对应的值为string类型的value
- Tomcat 一些技巧
征客丶
javatomcatdos
以下操作都是在windows 环境下
一、Tomcat 启动时配置 JAVA_HOME
在 tomcat 安装目录,bin 文件夹下的 catalina.bat 或 setclasspath.bat 中添加
set JAVA_HOME=JAVA 安装目录
set JRE_HOME=JAVA 安装目录/jre
即可;
二、查看Tomcat 版本
在 tomcat 安装目
- 【Spark七十二】Spark的日志配置
bit1129
spark
在测试Spark Streaming时,大量的日志显示到控制台,影响了Spark Streaming程序代码的输出结果的查看(代码中通过println将输出打印到控制台上),可以通过修改Spark的日志配置的方式,不让Spark Streaming把它的日志显示在console
在Spark的conf目录下,把log4j.properties.template修改为log4j.p
- Haskell版冒泡排序
bookjovi
冒泡排序haskell
面试的时候问的比较多的算法题要么是binary search,要么是冒泡排序,真的不想用写C写冒泡排序了,贴上个Haskell版的,思维简单,代码简单,下次谁要是再要我用C写冒泡排序,直接上个haskell版的,让他自己去理解吧。
sort [] = []
sort [x] = [x]
sort (x:x1:xs)
| x>x1 = x1:so
- java 路径 配置文件读取
bro_feng
java
这几天做一个项目,关于路径做如下笔记,有需要供参考。
取工程内的文件,一般都要用相对路径,这个自然不用多说。
在src统计目录建配置文件目录res,在res中放入配置文件。
读取文件使用方式:
1. MyTest.class.getResourceAsStream("/res/xx.properties")
2. properties.load(MyTest.
- 读《研磨设计模式》-代码笔记-简单工厂模式
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
package design.pattern;
/*
* 个人理解:简单工厂模式就是IOC;
* 客户端要用到某一对象,本来是由客户创建的,现在改成由工厂创建,客户直接取就好了
*/
interface IProduct {
- SVN与JIRA的关联
chenyu19891124
SVN
SVN与JIRA的关联一直都没能装成功,今天凝聚心思花了一天时间整合好了。下面是自己整理的步骤:
一、搭建好SVN环境,尤其是要把SVN的服务注册成系统服务
二、装好JIRA,自己用是jira-4.3.4破解版
三、下载SVN与JIRA的插件并解压,然后拷贝插件包下lib包里的三个jar,放到Atlassian\JIRA 4.3.4\atlassian-jira\WEB-INF\lib下,再
- JWFDv0.96 最新设计思路
comsci
数据结构算法工作企业应用公告
随着工作流技术的发展,工作流产品的应用范围也不断的在扩展,开始进入了像金融行业(我已经看到国有四大商业银行的工作流产品招标公告了),实时生产控制和其它比较重要的工程领域,而
- vi 保存复制内容格式粘贴
daizj
vi粘贴复制保存原格式不变形
vi是linux中非常好用的文本编辑工具,功能强大无比,但对于复制带有缩进格式的内容时,粘贴的时候内容错位很严重,不会按照复制时的格式排版,vi能不能在粘贴时,按复制进的格式进行粘贴呢? 答案是肯定的,vi有一个很强大的命令可以实现此功能 。
在命令模式输入:set paste,则进入paste模式,这样再进行粘贴时
- shell脚本运行时报错误:/bin/bash^M: bad interpreter 的解决办法
dongwei_6688
shell脚本
出现原因:windows上写的脚本,直接拷贝到linux系统上运行由于格式不兼容导致
解决办法:
1. 比如文件名为myshell.sh,vim myshell.sh
2. 执行vim中的命令 : set ff?查看文件格式,如果显示fileformat=dos,证明文件格式有问题
3. 执行vim中的命令 :set fileformat=unix 将文件格式改过来就可以了,然后:w
- 高一上学期难记忆单词
dcj3sjt126com
wordenglish
honest 诚实的;正直的
argue 争论
classical 古典的
hammer 锤子
share 分享;共有
sorrow 悲哀;悲痛
adventure 冒险
error 错误;差错
closet 壁橱;储藏室
pronounce 发音;宣告
repeat 重做;重复
majority 大多数;大半
native 本国的,本地的,本国
- hibernate查询返回DTO对象,DTO封装了多个pojo对象的属性
frankco
POJOhibernate查询DTO
DTO-数据传输对象;pojo-最纯粹的java对象与数据库中的表一一对应。
简单讲:DTO起到业务数据的传递作用,pojo则与持久层数据库打交道。
有时候我们需要查询返回DTO对象,因为DTO
- Partition List
hcx2013
partition
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of th
- Spring MVC测试框架详解——客户端测试
jinnianshilongnian
上一篇《Spring MVC测试框架详解——服务端测试》已经介绍了服务端测试,接下来再看看如果测试Rest客户端,对于客户端测试以前经常使用的方法是启动一个内嵌的jetty/tomcat容器,然后发送真实的请求到相应的控制器;这种方式的缺点就是速度慢;自Spring 3.2开始提供了对RestTemplate的模拟服务器测试方式,也就是说使用RestTemplate测试时无须启动服务器,而是模拟一
- 关于推荐个人观点
liyonghui160com
推荐系统关于推荐个人观点
回想起来,我也做推荐了3年多了,最近公司做了调整招聘了很多算法工程师,以为需要多么高大上的算法才能搭建起来的,从实践中走过来,我只想说【不是这样的】
第一次接触推荐系统是在四年前入职的时候,那时候,机器学习和大数据都是没有的概念,什么大数据处理开源软件根本不存在,我们用多台计算机web程序记录用户行为,用.net的w
- 不间断旋转的动画
pangyulei
动画
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat: M
- 自定义annotation
sha1064616837
javaenumannotationreflect
对象有的属性在页面上可编辑,有的属性在页面只可读,以前都是我们在页面上写死的,时间一久有时候会混乱,此处通过自定义annotation在类属性中定义。越来越发现Java的Annotation真心很强大,可以帮我们省去很多代码,让代码看上去简洁。
下面这个例子 主要用到了
1.自定义annotation:@interface,以及几个配合着自定义注解使用的几个注解
2.简单的反射
3.枚举
- Spring 源码
up2pu
spring
1.Spring源代码
https://github.com/SpringSource/spring-framework/branches/3.2.x
注:兼容svn检出
2.运行脚本
import-into-eclipse.bat
注:需要设置JAVA_HOME为jdk 1.7
build.gradle
compileJava {
sourceCompatibilit
- 利用word分词来计算文本相似度
yangshangchuan
wordword分词文本相似度余弦相似度简单共有词
word分词提供了多种文本相似度计算方式:
方式一:余弦相似度,通过计算两个向量的夹角余弦值来评估他们的相似度
实现类:org.apdplat.word.analysis.CosineTextSimilarity
用法如下:
String text1 = "我爱购物";
String text2 = "我爱读书";
String text3 =