Skip to content

Instantly share code, notes, and snippets.

@hashmaparraylist
hashmaparraylist / label.m
Created January 11, 2015 13:00
UILabel设置border
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 35)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 15, 320, 20)];
CALayer *bottomBorder = [CALayer layer];
bottomBorder.frame = CGRectMake(0, 40, 320, .5);
CALayer *rightBorder = [CALayer layer];
rightBorder.frame = CGRectMake(320, 0, 40, .5);
CALayer *topBorder = [CALayer layer];
@hashmaparraylist
hashmaparraylist / init_empty_git.sh
Created September 7, 2014 08:48
新建一个空的GIT仓库
cd /opt/git
mkdir project.git
cd project.git
git --bare init
@hashmaparraylist
hashmaparraylist / format_curency.js
Created August 25, 2014 07:59
逗号分隔数字
// 输出结果: 12,345
String(12345).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
sudo butterfly.server.py --host="0.0.0.0" --unsecure &
@hashmaparraylist
hashmaparraylist / getiinfo.sql
Created July 3, 2014 06:35
SQLServer 获取数据库表,字段的信息
SELECT
b.name as "Table",
a.name as "COLUMN",
c.name as "Datatype",
a.max_length as "Size",
a.precision,
a.scale ,
case when a.is_nullable =0 then 'NOT Null' else 'NUll' end as "NULL",
case when a.is_identity =0 then '×' else '○' end as "IDENTITY",
case when a.default_object_id = 0 then '×' else d.definition end as 'DEFAULT',
nohup ssserver > log &
@hashmaparraylist
hashmaparraylist / gen_deploy
Created January 12, 2014 15:16
Octopress 部署博文
rake generate
rake deploy
@hashmaparraylist
hashmaparraylist / update_default_format
Last active December 30, 2015 05:19
Oracle日期型的默认格式修改
update props$ set value$ = 'YYYY-MM-DD' where name='NLS_DATE_FORMAT'
@hashmaparraylist
hashmaparraylist / gist:7442379
Created November 13, 2013 02:05
PL/SQL 返回一个数据集
CREATE OR REPLACE PROCEDURE sp_Test
(
Param1 IN OUT DATE,
RetCursor OUT SYS_REFCURSOR
)
IS
BEGIN
OPEN Export_Fx_Mid FOR
SELECT