This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // StirngUtil.js , helper method for Javascript String , -v 1.0.0 | |
| // | |
| (function(opt_ns , opt_win){ | |
| //---------------- Helper function -------------- | |
| function forEach(array,fn,ctx){ | |
| if(array == null){ | |
| return ; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function () { | |
| var top = 100 , | |
| speed = 600 ; | |
| $(window).scroll(function () { | |
| $(this).scrollTop() > top) ? $('#back-top').fadeIn() : $('#back-top').fadeOut(); | |
| }); | |
| // scroll to top on click | |
| $('#back-top a').click(function () { | |
| $('body,html').animate({scrollTop: 0}, speed); | |
| return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| response.setContentType("application/force-download"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 查找占用8080端口的进程,加入被563进程占用 | |
| sudo lsof -i :8080 | |
| // 结束pid为563的进程 | |
| kill 563 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(exports){ | |
| function isWindow(el){ | |
| return el && el.window = el ; | |
| } | |
| function getWindow(el){ | |
| if(isWindow(el)){ | |
| return el ; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ------------------------------------------------ 1 ------------------------------------------------ | |
| // | |
| // 取消高亮 | |
| // | |
| - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| [tableView deselectRowAtIndexPath:indexPath animated:YES]; | |
| } | |
| ------------------------------------------------ 2 ------------------------------------------------ | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 禁用长按(图片,链接地址)弹出菜单,等价与document.documentElement.style.webkitTouchCallout='none' | |
| */ | |
| .disable-callout | |
| { | |
| -webkit-touch-callout:none;/*1.auto,2.none*/ | |
| } | |
| /* | |
| * 改变用户点击链接或一个可点击触发javascript的元素产生的文字颜色 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define SysDeviceVersion [[UIDevice currentDevice] systemVersion] | |
| #define SYS_VERSION_EQUAL_TO(v) ([SysDeviceVersion compare:v options:NSNumericSearch] == NSOrderedSame) | |
| #define SYS_VERSION_GREATER_THAN(v) ([SysDeviceVersion compare:v options:NSNumericSearch] == NSOrderedDescending) | |
| #define SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([SysDeviceVersion compare:v options:NSNumericSearch] != NSOrderedAscending) | |
| #define SYS_VERSION_LESS_THAN(v) ([SysDeviceVersion compare:v options:NSNumericSearch] == NSOrderedAscending) | |
| #define SYS_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([SysDeviceVersion compare:v options:NSNumericSearch] != NSOrderedDescending) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // YBMTextView.h | |
| // YBMPro | |
| // | |
| // Created by manjun.han on 02/07/2013. | |
| // Copyright (c) 2013 molamola. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> |