一、在res/values文件下定义一个attrs.xml文件.代码如下: 二、我们在MyView.java代码编写如下,其中下面的构造方法是重点,我们获取定义的属性R.sytleable.MyView_textColor,获取方法中后面通常设定默认值(float textSize = a.get....
分类:
移动开发 时间:
2014-11-04 19:07:29
阅读次数:
319
DECLARE @TempTable TABLE ( UserID INT , UserName NVARCHAR(50) );INSERT INTO @TempTable ( UserID, UserName )VALUES ( 1, 'a' )I...
分类:
数据库 时间:
2014-11-04 17:12:39
阅读次数:
283
CREATE FUNCTION D_ByteExchangeS_Byte(@str NVARCHAR(4000), --要转换的字符串@flag bit --转换标志,0转换成半角,1转换成全角)RETURNS nvarchar(4000)ASBEGIN DECLARE @pat nvarchar(...
分类:
数据库 时间:
2014-11-04 12:52:58
阅读次数:
173
错误一:在配置完源库和目标数据库后,创建复制管理员。连接上复制管理员后,在源库执行MAINTAIN_TABLE过程:declare v_tables DBMS_UTILITY.UNCL_ARRAY;begin v_tables(1) := 'hr.test01'; v_tables(2) :=...
分类:
数据库 时间:
2014-11-03 19:08:03
阅读次数:
211
declare @i int set @i=1; while @i<50 begin insert [GCSDB].[dbo].[ORGANIZATION_UNIT] ( [ORG_UNIT_ID] ,[ORG_UNTI_NAME] ,[ORG_UNTI_REMARK] ,[UNIT_IS_SIM....
分类:
数据库 时间:
2014-11-02 17:46:56
阅读次数:
211
BEGIN
#遍历占领野地表还原军队
#update armforce set number=num where troopsid=(select id from troops where isfrist=1 and cityid=cityid)
DECLARE tId DECIMAL...
分类:
数据库 时间:
2014-11-01 16:07:58
阅读次数:
172
--方法1【set statistic 】:set statistics time ongo --执行语句 xxxx goset statistics time off--方法2【getDate()】:DECLARE @begin dateTimeDECLARE @end dateTimeSET @...
分类:
数据库 时间:
2014-10-31 18:47:56
阅读次数:
226
一)建立存储过程时报SQL错误( have an error in your SQL syntax;....)
建立PROCEDURE等类型过程前需加上delimiter // ,最后也要以// 结尾,例如
二)变量作用域
存储过程内,使用DECLARE定义的变量,既可以使用@访问,也可以不用@,
区别是:使用@访问的是session 级的变量。 在整个SESSION可见,不仅是在你的存储过程中可见。
因此存储过程内访问DECLARE定义的变量,都不要使用@
另外,使用@@是系统级的变量
三)常用字符串处理...
分类:
数据库 时间:
2014-10-31 15:45:42
阅读次数:
274
--字符串拆分成行 declare@strvarchar(8000) set@str='a1,b1,c2,d1,e3,f5' --,换成 union all select set@str='select name='''+replace(@str,',',''' union all select '...
分类:
其他好文 时间:
2014-10-31 15:35:04
阅读次数:
210
1、dbcc freeproccache;2、dbcc freesystemcache('all') |dbcc freesystemcache('pool_name');3、declare @dbid as int = DB_ID('studio'); dbcc flushprocindb(@db...
分类:
数据库 时间:
2014-10-31 08:48:29
阅读次数:
157