我有6个View组件(如图所示),我想在所有6个View组件之间留出空间.
我的代码:
<View style={{flexDirection:'column',flex:6}}>
<View style={{flex:2,flexDirection:"row",justifyContent:'space-between'}}>
<View style={{backgroundColor:'red',flex:1}}>
</View>
<View style={{backgroundColor:'blue',flex:1}}>
</View>
</View>
<View style={{flex:2,flexDirection:"row",justifyContent:'space-between'}}>
<View style={{backgroundColor:'white',flex:1}}>
</View>
<View style={{backgroundColor:'black',flex:1}}>
</View>
</View>
<View style={{flex:2,flexDirection:"row",justifyContent:'space-between'}}>
<View style={{backgroundColor:'gray',flex:1}}>
</View>
<View style={{backgroundColor:'yellow',flex:1}}>
</View>
</View>
</View>
Run Code Online (Sandbox Code Playgroud) 我想通过Swift中的iPhone上的Touch ID制作唯一的字符串或哈希。我对此进行了很多搜索,但没有找到解决方案。
我想要一些应用程序在我的 OS X 上运行。但它们无法运行,因为它们仅适用于 Linux。如何在我的 OS X 上拥有 Linux shell?我的意思是如何在 OS X 上拥有单独的 Linux shell 和 OS X 终端?
我想共享一个在应用程序中创建的URL文件和一个文本.但它似乎只能共享文本,而不是URL或UIImage.我正在使用的代码:
let sharedVideo = Video(Title: _data[1], VideoID: _data[0], Duration: _data[3], ViewCount: _data[2])
let sharedURL = VideoManager.exportData(video: sharedVideo)
let shareItems:Array = [sharedURL,"check this out baby!"] as [Any]
let activityViewController = UIActivityViewController(activityItems: shareItems, applicationActivities: nil)
self.present(activityViewController, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)
此外,我使用UIImage对象而不是sharedURL来查看它是否有URL问题.
即使使用图像文件也不起作用.当我点击内部的分享按钮时UIActivityViewController,它只适用于文本,没有URL或图像.我在Xcode 8中使用Swift 3.
谢谢.
PS:我确信sharedURL对象不是nil也不是undefined.
我有一个股票数据框:
Open High Low Close Volume rb us \
0 1.20821 1.20821 1.20793 1.20794 138.96 0.022347 100.000000
1 1.20794 1.20795 1.20787 1.20788 119.61 0.004967 85.714286
2 1.20788 1.20793 1.20770 1.20779 210.42 0.007451 64.285714
3 1.20779 1.20791 1.20779 1.20789 77.51 0.008280 83.333333
4 1.20789 1.20795 1.20789 1.20792 56.97 0.002484 50.000000
ls color
0 96.428571 black
1 85.714286 black
2 50.000000 black
3 100.000000 white
4 100.000000 white
Run Code Online (Sandbox Code Playgroud)
我想将当前行数据与前一行数据进行比较,如下所示:
if(df['color'] == df['color'].shift(-1)):
if((df['Close'] >= df['Open'].shift(-1) and df['Open']>=df['Close'].shift(-1)):
df['Position'] = UP
if((df['Close'] < …Run Code Online (Sandbox Code Playgroud) 我有网络:
Tensor("input_1:0", shape=(?, 5, 1), dtype=float32)
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_1 (InputLayer) (None, 5, 1) 0
_________________________________________________________________
bidirectional_1 (Bidirection (None, 5, 64) 2176
_________________________________________________________________
activation_1 (Activation) (None, 5, 64) 0
_________________________________________________________________
bidirectional_2 (Bidirection (None, 5, 128) 16512
_________________________________________________________________
activation_2 (Activation) (None, 5, 128) 0
_________________________________________________________________
bidirectional_3 (Bidirection (None, 1024) 656384
_________________________________________________________________
activation_3 (Activation) (None, 1024) 0
_________________________________________________________________
dense_1 (Dense) (None, 1) 1025
_________________________________________________________________
p_re_lu_1 (PReLU) (None, 1) 1
=================================================================
Total params: 676,098
Trainable params: 676,098
Non-trainable …Run Code Online (Sandbox Code Playgroud) python deep-learning keras tensorflow recurrent-neural-network