在Github中提交PR之后,它会获得批准,然后合并为主人.此时我应该删除我的分支以保持整洁.我不是天使,经常忘记这样做!
Github有一个方便的Pull请求页面来跟踪所有打开/关闭的PR.我想知道的是,可以通过以下方式过滤我的PR:
is:pr author:myusername is:closed is:merged 然后像 is:branchAliveYouFool
这将向我显示我创建的所有PR,这些PR已关闭,已合并,并且至关重要的是,尚未删除分支.
我搜索了可以使用但无法找到我要找的内容的术语:https: //help.github.com/articles/searching-issues-and-pull-requests/
任何想法将不胜感激.谢谢 :)
以下代码在iOS 8上运行正常,但在iOS 9.0.2上运行时,我得到一些奇怪的结果:
NSString * input = @"Hi there";
NSData * data = [input dataUsingEncoding:NSASCIIStringEncoding];
Byte *byteData = (Byte*)malloc(data.length);
memcpy(byteData, [data bytes], data.length);
NSString * result = [NSString stringWithCString:(const char*)byteData encoding:NSASCIIStringEncoding];
NSLog(@"Result: %@", result);
Run Code Online (Sandbox Code Playgroud)
iOS 8.4(iPhone 6 Plus)byteData是Hi there
iOS 9.0.2(iPhone 6S)byteData是Hi there\xb6<M\x13
在iOS 9上,我最终在字符串的末尾加载了一堆垃圾.
这感觉就像32位vs 64位问题,因为在iOS 9上看起来像byteData长度是两倍长?
Apple在这里有32到64位的更改表:https: //developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/Major64-BitChanges/Major64-BitChanges.html
data.length是一个unsigned long long.在malloc调用时,这会返回不同的长度吗?上面的代码返回8的data.length时候在iOS上的每个版本上运行.
这感觉很奇怪,我已经没有角度来攻击它了.希望那里的某人可能能够对这一点有所了解.
谢谢!
更新
我可以使用它修复它
NSString * result = [[NSString alloc] …Run Code Online (Sandbox Code Playgroud) 我已经开始看到我的一些团队编写了以下代码,这让我怀疑我们是否以正确的方式做事,因为我以前从未见过这样编写的代码。
import * as React from "react";
import "./styles.css";
function UsualExample() {
return <h1>This is the standard example…</h1>
}
export default function App() {
const CustomComponent = (): JSX.Element => <h1>But can I do this?</h1>
return (
<div className="App">
<UsualExample />
<CustomComponent />
</div>
);
}
Run Code Online (Sandbox Code Playgroud)
它似乎渲染得很好,我看不到任何直接的不利影响,但是否有一些根本原因为什么我们不应该CustomComponent从另一个组件中定义功能组件?
CodeSandbox 示例:https ://codesandbox.io/s/dreamy-mestorf-6lvtd ? file =/ src/App.tsx:0-342
byte ×1
filter ×1
github ×1
ios ×1
ios9 ×1
javascript ×1
jsx ×1
malloc ×1
objective-c ×1
pull-request ×1
reactjs ×1