闲暇之余,写了一个React Native的demo,可以作为大家的入门学习参考。

  GitHub:https://github.com/xujianfu/ElmApp.git

  GitHub:https://github.com/xujianfu/React-Native-CarProject.git

  项目截图如下:

 一、项目界面设计

  1、React Navigation的应用

   React Navigation 源于 React Native 社区对一个可扩展且易于使用的导航解决方案的需求,它完全使用 JavaScript 编写(因此你可以阅读并理解所有源码)。支持iOS/Android.

  1、如何在项目进行使用?

  1. yarn add react-navigation
  2. # or with npm
  3. # npm install --save react-navigation

  然后,安装 react-native-gesture-handler。 如果你正在使用 Expo managed workflow,那么你什么都不需要做, SDK 中已经包含了这些. 否则:  

  1. yarn add react-native-gesture-handler
  2. # or with npm
  3. # npm install --save react-native-gesture-handler

  最后进行Link 所有的原生依赖

  1. react-native link react-native-gesture-handler

  2、路由配置

  为某个模块创建StackNavigator导航

  1. const HomeStack = createStackNavigator(
  2. {
  3. Home:{
  4. screen:HomeScreen,
  5. navigationOptions:()=>({
  6. headerBackTitle: null,
  7. })
  8. },
  9. //添加多个路由
  10. CarLoans:CarLoansScreen,
  11. CheckRules:CheckRulesScreen,
  12. },
  13. )
  14.  
  15. ......

  将多个模块添加到TabNavigator上

  1. const TabNavigator = createBottomTabNavigator(
  2. {
  3. Home:{
  4. screen:HomeStack,
  5. navigationOptions:({navigation}) => ({
  6. tabBarLabel:'首页',
  7. tabBarIcon:({focused}) => (
  8. <Image source={{uri:focused ? 'ic_tab_home_h':'ic_tab_home_n.png'}} style={styles.iconStyle}/>
  9. ),
  10. }),
  11. },
  12. Mall:{
  13. screen:MallStack,
  14. navigationOptions:({navigation}) => ({
  15. tabBarLabel:'商城',
  16. tabBarIcon:({focused}) => (
  17. <Image source={{uri:focused ? 'ic_tab_mall_h':'ic_tab_mall_n.png'}} style={styles.iconStyle}/>
  18. )
  19. }),
  20. },
  21. Publish:{
  22. screen:PublishStack,
  23. navigationOptions:({navigation}) => ({
  24. tabBarLabel:'发布',
  25. tabBarIcon:({focused}) => (
  26. <Image source={{uri:focused ? 'ic_tab_release_h':'ic_tab_release_n.png'}} style={styles.iconStyle}/>
  27. )
  28. }),
  29. },
  30. Discover:{
  31. screen:DiscoverStack,
  32. navigationOptions:({navigation}) => ({
  33. tabBarLabel:'发现',
  34. tabBarIcon:({focused}) => (
  35. <Image source={{uri:focused ? 'ic_tab_find_h':'ic_tab_find_n.png'}} style={styles.iconStyle}/>
  36. )
  37. }),
  38. },
  39. Mine:{
  40. screen:MineStack,
  41. navigationOptions:({navigation}) => ({
  42. tabBarLabel:'我的',
  43. tabBarIcon:({focused}) => (
  44. <Image source={{uri:focused ? 'ic_tab_my_h':'ic_tab_my_n.png'}} style={styles.iconStyle}/>
  45. )
  46. }),
  47. },
  48. },
  49. {
  50. defaultNavigationOptions: ({ navigation }) => {
  51. let tabBarVisible = true;
  52. if (navigation.state.index > 0) {
  53. tabBarVisible = false;
  54. }
  55. return {
  56. tabBarVisible,
  57. };
  58. },
  59. tabBarPosition:'bottom',
  60. tabBarOptions: {
  61. activeTintColor: 'blue', //选中tabbar的文字颜色
  62. inactiveTintColor: 'gray',
  63. showIcon:true,
  64.  
  65. },
  66.  
  67. }
  68. );
  69.  
  70. export default createAppContainer(TabNavigator);

  2、选择相册照片或视频,或进行拍照

  (1)引入react-native-image-picker

  1. yarn add react-native-image-picker
  2. react-native link react-native-image-picker

  (2)在项目中使用react-native-image-picker

  1. import ImagePicker from 'react-native-image-picker';
  2.  
  3. //选择图片
  4. selectPhotoTapped() {
  5. const options = {
  6. // 弹窗标题
  7. title: '选择图片',
  8. cancelButtonTitle: '取消',
  9. takePhotoButtonTitle: '拍照',
  10. chooseFromLibraryButtonTitle: '选择照片',
  11. // 自定义按钮
  12. customButtons: [
  13. {name: 'fb', title: 'Choose Photo from Facebook'},
  14. ],
  15. // 相机类型'front' 或者 'back'
  16. cameraType: 'back',
  17. // 图片或视频:'photo','video'
  18. mediaType: 'photo',
  19. // 视频质量
  20. videoQuality: 'high',
  21. //最大视频录制时间
  22. durationLimit: 10,
  23. //最长宽
  24. maxWidth: 300,
  25. //最长高,
  26. maxHeight: 300,
  27. //图片质量
  28. quality: 0.8,
  29. angle: 0,
  30. //是否可以编辑
  31. allowsEditing: false,
  32. //如果为真,则禁用data生成的base64字段
  33. noData: false,
  34. // 如果提供此密钥,该图像将被保存在Documents iOS 应用程序的目录中,或者保存在PicturesAndroid上的应用程序目录(而不是临时目录)
  35. storageOptions: {
  36. skipBackup: true
  37. }
  38. };
  39.  
  40. ImagePicker.showImagePicker(options, (response) => {
  41. console.log('Response = ', response);
  42.  
  43. if (response.didCancel) {
  44. console.log('User cancelled photo picker');
  45. }
  46. else if (response.error) {
  47. console.log('ImagePicker Error: ', response.error);
  48. }
  49. else if (response.customButton) {
  50. console.log('User tapped custom button: ', response.customButton);
  51. }
  52. else {
  53. let source = { uri: response.uri };
  54.  
  55. // You can also display the image using data:
  56. // let source = { uri: 'data:image/jpeg;base64,' + response.data };
  57.  
  58. this.setState({
  59. avatarSource: source
  60. });
  61. }
  62. });
  63. }
  64.  
  65. //选择视频
  66. selectVideoTapped() {
  67. const options = {
  68.  
  69. title: '选择视频',
  70. cancelButtonTitle: '取消',
  71. takePhotoButtonTitle: '录制视频',
  72. chooseFromLibraryButtonTitle: '选择视频',
  73. mediaType: 'video',
  74. videoQuality: 'medium'
  75. };
  76.  
  77. ImagePicker.showImagePicker(options, (response) => {
  78. console.log('Response = ', response);
  79.  
  80. if (response.didCancel) {
  81. console.log('User cancelled video picker');
  82. }
  83. else if (response.error) {
  84. console.log('ImagePicker Error: ', response.error);
  85. }
  86. else if (response.customButton) {
  87. console.log('User tapped custom button: ', response.customButton);
  88. }
  89. else {
  90. this.setState({
  91. videoSource: response.uri
  92. });
  93. }
  94. });
  95. }

 3、创建切换选项卡

  导入react-native-scrollable-tab-view

  1. npm install react-native-scrollable-tab-view --save

  项目中引入

  1. //引用插件
  2. import ScrollableTabView, { ScrollableTabBar, DefaultTabBar } from 'react-native-scrollable-tab-view';
  3.  
  4. <ScrollableTabView
  5. initialPage={0}
  6. renderTabBar={() => <ScrollableTabBar style={{borderBottomWidth: 0,height: 44}}/>}
  7. tabBarTextStyle={{fontSize:16}}
  8. tabBarActiveTextColor={'#fdd000'}
  9. tabBarInactiveTextColor={'#999999'}
  10. tabBarUnderlineStyle={{backgroundColor:'#fdd000'}}
  11. >
  12. {
  13. label.map((item,index) =>{
  14. if (index === 0) {
  15. return <AllBusinessScreen tabLabel={item} key={index}/>
  16. } else {
  17. return <NearByBusinessScreen tabLabel={item} key={index}/>
  18. }
  19. })
  20. }
  21. </ScrollableTabView>

  4、使用Modal组件

  Modal组件可以用来覆盖包含React Native根视图的原生视图(如UIViewController,Activity)。在嵌入React Native的混合应用中可以使用Modal。Modal可以使你应用中RN编写的那部分内容覆盖在原生视图上显示。  

  1. <Modal
  2. animationType={"slide"}
  3. transparent={true}
  4. visible={this.state.modalVisible}
  5. onRequestClose={()=>{alert('modal has been closed')}}
  6. >
  7. <View style={styles.modalStyle}>
  8. <View style={styles.coverStyle}>
  9. {this.renderItem()}
  10. </View>
  11. </View>
  12.  
  13. </Modal>
  14.  
  15. ......
  16.  
  17. renderItem(){
  18. let itemTitleArr = ['京','沪','浙','苏','粤','鲁','晋','冀',
  19. '豫','川','渝','辽','吉','黑','皖','鄂',
  20. '湘','赣','闽','陕','甘','宁','蒙','津',
  21. '贵','云','桂','琼','青','新','藏'];;
  22. var itemArr = [];
  23. for (var i = 0; i < itemTitleArr.length; i++) {
  24. itemArr.push(
  25. <TouchableHighlight onPress={this.callBack.bind(this,itemTitleArr[i])} key={i}>
  26. <View style={styles.chooseItemStyle} >
  27. <Text style={styles.chooseTitleStyle}>{itemTitleArr[i]}</Text>
  28. </View>
  29. </TouchableHighlight>
  30.  
  31. )
  32. }
  33. return itemArr;
  34. }

  5、下拉列表实现

  1. import React, {Component} from 'react';
  2. import {View, Text, Image, TouchableOpacity, ScrollView, Animated, Easing, StyleSheet} from 'react-native';
  3. import PropTypes from 'prop-types';
  4.  
  5. class DropdownMenu extends Component {
  6.  
  7. constructor(props, context) {
  8. super(props, context);
  9.  
  10. var selectIndex = new Array(this.props.data.length);
  11. for (var i = 0; i < selectIndex.length; i++) {
  12. selectIndex[i] = 0;
  13. }
  14. this.state = {
  15. activityIndex: -1,
  16. selectIndex: selectIndex,
  17. rotationAnims: props.data.map(() => new Animated.Value(0))
  18. };
  19.  
  20. this.defaultConfig = {
  21. bgColor: '#f5f5f5',
  22. tintColor: '#fdd000',
  23. activityTintColor: "red",
  24. arrowImg: 'ic_nav_down',
  25. checkImage: 'ic_nav_down'
  26. };
  27.  
  28. }
  29.  
  30. renderChcek(index, title) {
  31. var activityIndex = this.state.activityIndex;
  32. if (this.state.selectIndex[activityIndex] === index) {
  33. var checkImage = this.props.checkImage ? this.props.checkImage : this.defaultConfig.checkImage;
  34. return (
  35. <View style={{flex: 1, justifyContent: 'space-between', alignItems: "center", paddingHorizontal: 15, flexDirection: 'row'}} >
  36. <Text
  37. style={[
  38. styles.item_text_style,
  39. this.props.optionTextStyle,
  40. {color: this.props.activityTintColor ? this.props.activityTintColor : this.defaultConfig.activityTintColor}
  41. ]} >
  42. {title}
  43. </Text>
  44. <Image
  45. source={checkImage}
  46. style={{tintColor: this.props.activityTintColor ? this.props.activityTintColor : this.defaultConfig.activityTintColor}} />
  47. </View>
  48. );
  49. } else {
  50. return (
  51. <View style={{flex: 1, justifyContent: 'space-between', alignItems: "center", paddingHorizontal: 15, flexDirection: 'row'}} >
  52. <Text style={[
  53. styles.item_text_style,
  54. this.props.optionTextStyle,
  55. {color: this.props.tintColor ? this.props.tintColor : this.defaultConfig.tintColor}
  56. ]} >{title}</Text>
  57. </View>
  58. );
  59. }
  60. }
  61.  
  62. renderActivityPanel() {
  63. if (this.state.activityIndex >= 0) {
  64.  
  65. var currentTitles = this.props.data[this.state.activityIndex];
  66.  
  67. var heightStyle = {};
  68. if (this.props.maxHeight && this.props.maxHeight < currentTitles.length * 44) {
  69. heightStyle.height = this.props.maxHeight;
  70. }
  71.  
  72. return (
  73. <View style={{position: 'absolute', left: 0, right: 0, top: 40, bottom: 0}}>
  74. <TouchableOpacity onPress={() => this.openOrClosePanel(this.state.activityIndex)} activeOpacity={1} style={{position: 'absolute', left: 0, right: 0, top: 0, bottom: 0}}>
  75. <View style={{opacity: 0.4, backgroundColor: 'black', flex: 1 }} />
  76. </TouchableOpacity>
  77.  
  78. <ScrollView style={[{position: 'absolute', top: 0, left: 0, right: 0, backgroundColor: 'white'}, heightStyle]} >
  79. {
  80. currentTitles.map((title, index) =>
  81. <TouchableOpacity key={index} activeOpacity={1} style={{flex: 1, height: 44}} onPress={this.itemOnPress.bind(this, index)} >
  82. {this.renderChcek(index, title)}
  83. <View style={{backgroundColor: '#F6F6F6', height: 1, marginLeft: 15}} />
  84. </TouchableOpacity>
  85. )
  86. }
  87. </ScrollView>
  88. </View>
  89. );
  90. } else {
  91. return (null);
  92. }
  93. }
  94.  
  95. openOrClosePanel(index) {
  96.  
  97. this.props.bannerAction ? this.props.bannerAction() : null;
  98.  
  99. // var toValue = 0.5;
  100. if (this.state.activityIndex == index) {
  101. this.closePanel(index);
  102. this.setState({
  103. activityIndex: -1,
  104. });
  105. // toValue = 0;
  106. } else {
  107. if (this.state.activityIndex > -1) {
  108. this.closePanel(this.state.activityIndex);
  109. }
  110. this.openPanel(index);
  111. this.setState({
  112. activityIndex: index,
  113. });
  114. // toValue = 0.5;
  115. }
  116. // Animated.timing(
  117. // this.state.rotationAnims[index],
  118. // {
  119. // toValue: toValue,
  120. // duration: 300,
  121. // easing: Easing.linear
  122. // }
  123. // ).start();
  124. }
  125.  
  126. openPanel(index) {
  127. Animated.timing(
  128. this.state.rotationAnims[index],
  129. {
  130. toValue: 0.5,
  131. duration: 300,
  132. easing: Easing.linear
  133. }
  134. ).start();
  135. }
  136.  
  137. closePanel(index) {
  138. Animated.timing(
  139. this.state.rotationAnims[index],
  140. {
  141. toValue: 0,
  142. duration: 300,
  143. easing: Easing.linear
  144. }
  145. ).start();
  146. }
  147.  
  148. itemOnPress(index) {
  149. if (this.state.activityIndex > -1) {
  150. var selectIndex = this.state.selectIndex;
  151. selectIndex[this.state.activityIndex] = index;
  152. this.setState({
  153. selectIndex: selectIndex
  154. });
  155. if (this.props.handler) {
  156. this.props.handler(this.state.activityIndex, index);
  157. }
  158. }
  159. this.openOrClosePanel(this.state.activityIndex);
  160. }
  161.  
  162. renderDropDownArrow(index) {
  163. var icon = this.props.arrowImg ? this.props.arrowImg : this.defaultConfig.arrowImg;
  164. return (
  165. <Animated.Image
  166. source={{uri:icon}}
  167. style={{
  168. width:6,
  169. height:4,
  170. marginLeft: 8,
  171. tintColor: (index === this.state.activityIndex) ? (this.props.activityTintColor ? this.props.activityTintColor : this.defaultConfig.activityTintColor) : (this.props.tintColor ? this.props.tintColor : this.defaultConfig.tintColor),
  172. transform: [{
  173. rotateZ: this.state.rotationAnims[index].interpolate({
  174. inputRange: [0, 1],
  175. outputRange: ['0deg', '360deg']
  176. })
  177. }]
  178. }} />
  179. );
  180. }
  181.  
  182. render() {
  183.  
  184. return (
  185. <View style={{flexDirection: 'column', flex: 1}} >
  186. <View style={{
  187. flexDirection: 'row',
  188. backgroundColor: this.props.bgColor ? this.props.bgColor : this.defaultConfig.bgColor}} >
  189. {
  190. this.props.data.map((rows, index) =>
  191. <TouchableOpacity
  192. activeOpacity={1}
  193. onPress={this.openOrClosePanel.bind(this, index)}
  194. key={index}
  195. style={{flex: 1, height: 48, alignItems: "center", justifyContent: "center"}} >
  196. <View style={{flexDirection: 'row', alignItems: "center", justifyContent: "center"}} >
  197. <Text
  198. style={[
  199. styles.title_style,
  200. this.props.titleStyle,
  201. {color: (index === this.state.activityIndex) ?
  202. (this.props.activityTintColor ? this.props.activityTintColor : this.defaultConfig.activityTintColor)
  203. :
  204. (this.props.tintColor ? this.props.tintColor : this.defaultConfig.tintColor)}
  205. ]} >
  206. {rows[this.state.selectIndex[index]]}
  207. </Text>
  208. {this.renderDropDownArrow(index)}
  209. </View>
  210. </TouchableOpacity>
  211. )
  212. }
  213. </View>
  214. {this.props.children}
  215.  
  216. {this.renderActivityPanel()}
  217.  
  218. </View>
  219. );
  220. }
  221.  
  222. }
  223.  
  224. DropdownMenu.propTypes = {
  225. bgColor: PropTypes.string,
  226. tintColor: PropTypes.string,
  227. activityTintColor: PropTypes.string,
  228. arrowImg: PropTypes.number,
  229. checkImage: PropTypes.number,
  230. data: PropTypes.array,
  231. bannerAction: PropTypes.func,
  232. optionTextStyle: PropTypes.object,
  233. titleStyle: PropTypes.object,
  234. maxHeight: PropTypes.number
  235. }
  236.  
  237. const styles = StyleSheet.create({
  238. title_style: {
  239. fontSize: 16
  240. },
  241. item_text_style: {
  242. color: '#fdd000',
  243. fontSize: 16
  244. }
  245. });
  246.  
  247. export default DropdownMenu;

下拉列表封装

  如何使用?

  1. render() {
  2. var data = [["分类", "分类", "分类", "分类"], ["价格", "价格"], ["筛选", "筛选"]];
  3. return (
  4. <View style={{flex: 1}}>
  5. <View style={styles.dropMenu}/>
  6. <DropMenu
  7. style={{flex:1}}
  8. bgColor={'white'}
  9. tintColor={'#666666'}
  10. activityTintColor={'#fdd000'}
  11. // arrowImg={}
  12. // checkImage={}
  13. // optionTextStyle={{color: '#333333'}}
  14. // titleStyle={{color: '#333333'}}
  15. // maxHeight={300}
  16. handler={(selection, row) => this.setState({text: data[selection][row]})}
  17. data={data}
  18. >
  19.  
  20. <ListView
  21. style={styles.listViewStyle}
  22. dataSource={this.state.dataSource}
  23. renderRow={this.renderRow}
  24. />
  25.  
  26. </DropMenu>
  27. </View>
  28. );
  29. }

下拉列表的使用

  6、React Native项目中“A+ListView”或“ListView + B”的界面搭建

  项目中ScrollView嵌套ListView会造成手势滑动冲突,可以使用“A+ListView”或“ListView + B”的样式进行搭建,

  通过:ListView的header或footer来实现。

  7、地图展示  

  项目中使用的通过jsp API接入到高德地图。

二、技术难点

  1、组件化思想

  React Native是React在移动端的跨平台方案。如果想更快地理解和掌握React Native开发,就必须先了解React。

  React是FaceBook开源的一个前端框架,它起源于 Facebook 的内部项目,并于 2013 年 5 月开源。因为React 拥有较高的性能,代码逻辑非常简单,所以越来越多的人已开始关注和使用它,目前该框架在Github上已经有7万+star。

  React采用组件化的方式开发,通过将view构建成组件,使得代码更加容易得到复用,能够很好的应用在大项目的开发中。有一句话说的很形象:在React中,构建应用就像搭积木一样。

  React认为一个组件应该具有以下特征:

  •  可组合:一个组件易于和其他组件一起使用,或者嵌套在另一个组件内部。如果一个组件内部创建了另外一个组件,那么父组件拥有它创建的子组件,通过这个特性,一个复杂的UI可以拆分成多个简单的UI组件;
  • 可重用:每个组件都是具有独立功能的,它可以被使用在多个UI场景;
  • 可维护:每个小的组件仅仅包含自身的逻辑,更容易被理解和维护。

  2、组件的属性与状态

  在React Native里,组件所持有的数据分为两种:

  1、属性(props):组件的props是不可变的,它只能从其他的组件(例如父组件)传递过来。

  2、状态(state):组建的state是可变的,它负责处理与用户的交互。在通过用户点击事件等操作以后,如果使得当前组件的某个state发生了改变,那么当前组件就会触发render()方法刷新自己。

  props:

  由于props是从其父组件传递过来的,那么可想而知,props的声明应该是当前组件的父组件来做。

  3、组件的生命周期

  请参考组件的生命周期

  4、搭建APP的框架:Tab Navigator 和 Stack Navigator  

  请参考学习:React Navigation的应用

  5、组件间通信

  组件间通信分为两大类;

  1、有直接关系或间接关系的组件之间通信

  2、无直接关系或间接关系的组件之间通信

【React Native】React Native项目设计与知识点分享的更多相关文章

  1. 《React Native 精解与实战》书籍连载「React 与 React Native 简介」

    此文是我的出版书籍<React Native 精解与实战>连载分享,此书由机械工业出版社出版,书中详解了 React Native 框架底层原理.React Native 组件布局.组件与 ...

  2. React 与 React Native 底层共识:React 是什么

    此系列文章将整合我的 React 视频教程与 React Native 书籍中的精华部分,给大家介绍 React 与 React Native 结合学习的方法,此小节主要介绍 React 的底层原理与 ...

  3. 一次掌握 React 与 React Native 两个框架

    此系列文章将整合我的 React 视频教程与 React Native 书籍中的精华部分,给大家介绍 React 与 React Native 结合学习的方法. 1. 软件开发语言与框架的学习本质 我 ...

  4. Flutter vs React Native vs Native:深度性能比较

    老孟导读:这是老孟翻译的付费文章,文章所有权归原作者所有. 欢迎加入老孟Flutter交流群,每周翻译2-3篇付费文章,精彩不容错过. 原文地址:https://medium.com/swlh/flu ...

  5. 小谈React、React Native、React Web

    React有三个东西,React JS 前端Web框架,React Native 移动终端Hybrid框架,React Web是一个源码转换工具(React Native 转 Web,并之所以特别提出 ...

  6. React的React Native

    React的React Native React无疑是今年最火的前端框架,github上的star直逼30,000,基于React的React Native的star也直逼20,000.有了React ...

  7. H5、React Native、Native应用对比分析

    每日更新关注:http://weibo.com/hanjunqiang  新浪微博!iOS开发者交流QQ群: 446310206 "存在即合理".凡是存在的,都是合乎规律的.任何新 ...

  8. React Navigation & React Native & React Native Navigation

    React Navigation & React Native & React Native Navigation React Navigation https://facebook. ...

  9. H5、React Native、Native性能区别选择

    “存在即合理”.凡是存在的,都是合乎规律的.任何新事物的产生总要的它的道理:任何新事物的发展总是有着取代旧事物的能力.React Native来的正是时候,一则是因为H5发展到一定程度的受限:二则是移 ...

随机推荐

  1. 详解js变量声明提升

    之前一直觉会认为javascript代码执行是由上到下一行行执行的.自从看了<你不知道的JS>后发现这个观点并不完全正确.先来给大家举一个书本上的的例子: var a='hello wor ...

  2. 【ZJOI2017 Round1练习&BZOJ4773】D3T1 cycle(最小负环,倍增)

    题意:给定一个带权有向图,求点数最小的负环. 2 ⩽ n ⩽ 3000 ⩽ m ⩽ n(n - 1)1 ⩽ ui,vi ⩽ nabs(w[j])<= 10^4 思路:倍增思想 设d[i,j,k] ...

  3. vim fulerformat的设置

    在vim中设置选项,有注释很容易明白: set laststatus=1 "2总显示最后一个窗口的状态行,1窗口多于一个时显示最后一个窗口的状态行,0不显示最后一个窗口的状态行 fulerf ...

  4. readdir() 获取文件类型

    readdir()获取文件类型 //// 字符设备文件 type =2, filename207=tty0 crw-rw----  1 root root     4,  0 04-10 16:28 ...

  5. web文件管理系统和日志实时监控工具

    https://blog.csdn.net/xuesong123/article/details/52752384

  6. Being a Good Boy in Spring Festival 博弈论 Nim博弈

    易游戏雷火盘古校园招聘开始! kiki's game Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 40000/10000 K (Ja ...

  7. Ubuntu 16.04安装录屏软件SimpleScreenRecorder

    安装: sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder sudo apt-get update sudo apt-get ...

  8. 【SQL Server 学习系列】-- 收缩数据库文件大小

    USE WebExam; GO ALTER DATABASE WebExam SET RECOVERY SIMPLE; GO -- 收缩文件到 1 MB. ); GO ALTER DATABASE W ...

  9. js 计算获取鼠标相对某个点的移动旋转角度

    // 旋转角度 function getAngle(cen, first, second) { // cen : 中心点 [0,0] // first : 开始点 [1,3] // second : ...

  10. Check ini style config tool

    INI style config is like below [section] # comment key = value Sometimes we want to check the config ...