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
| -(UIImage *)screenShot | |
| { | |
| CGRect originalFrame = self.frame; | |
| CGPoint originalOffset = self.scrollView.contentOffset; | |
| CGSize entireSize = [self sizeThatFits:CGSizeZero]; | |
| [self setFrame: CGRectMake(0, 0, entireSize.width, entireSize.height)]; | |
| CGRect rect = [self positionOfElementWithId:@"post1"]; | |
| //如果没有找到这个元素,就取整个页面 | |
| if (rect.origin.y != 0) { |
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
| // 初始化autocomplete dialog的各项功能 | |
| // items参数就是complete框默认可见多少项 | |
| // editor参数是ACE的实例化对象 | |
| var autocomplete = new AceAutoComplete(editor,{ | |
| items : 10 | |
| }); |
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
| .ace-autocomplete-dialog{ | |
| position:absolute; | |
| top:0;left:0; | |
| min-width:200px; | |
| max-height:196px; | |
| overflow:hidden; | |
| font-size:12px; | |
| display:none; | |
| box-shadow:0 0 5px 1px rgba(0, 0, 0, 0.3); | |
| background:#E8E8E8; |
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([],function() { | |
| var iframe=document.createElement("iframe"); | |
| iframe.src="about:blank"; | |
| iframe.setAttribute("style","display:none;visibility:hidden;"); | |
| document.body.appendChild(iframe); | |
| var d=iframe.contentWindow.document; | |
| d.charset=d.characterSet="GBK"; | |
| function getGBKEscape(s) { | |
| d.write("<body><a href='?"+s+"'>X</a></body>"); | |
| d.close(); |
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
| // Boring | |
| if (isThisAwesome) { | |
| alert('yes'); // it's not | |
| } | |
| // Awesome | |
| isThisAwesome && alert('yes'); | |
| // Also cool for guarding your code | |
| var aCoolFunction = undefined; |
OlderNewer