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
class Frame extends Component { | |
componentDidMount() { | |
this.iframeHead = this.node.contentDocument.head | |
this.iframeRoot = this.node.contentDocument.body | |
this.forceUpdate() | |
} | |
render() { | |
const { children, head, ...rest } = this.props | |
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
create function fn_split(@str nvarchar(max),@separator as nvarchar(max)) | |
returns @splits table(segment nvarchar(max)) | |
as | |
begin | |
declare @anchor int=CHARINDEX(@separator,@str),@gram int=len(@separator) | |
while @anchor>0 and @gram<=len(@str) | |
begin | |
insert into @splits values(SUBSTRING(@str, 1, @anchor-1)) | |
set @str=SUBSTRING(@str,@anchor+@gram,len(@str)-@anchor+@gram+1) | |
set @anchor=CHARINDEX(@separator,@str) |
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
/** | |
* create by Zap Lin | |
* this is a magic function for collecting form data and convert it to object | |
* | |
* ref: https://developer.mozilla.org/zh-TW/docs/Web/API/FormData/FormData | |
*/ | |
/** | |
* collecting data from <form> element and convert to Object (JSON) |
OlderNewer