当前位置: 首页 > news >正文

ARTS 打卡第一周

ARTS

  • Algorithm
  • Review
  • Tip
  • Share

Algorithm

题目

class Solution {
    func mergeAlternately(_ word1: String, _ word2: String) -> String {
        var ans = ""
        var idx1 = word1.startIndex
        var inx2 = word2.startIndex
        while idx1 < word1.endIndex || idx2 < word2.endIndex {
            if idx1 != word1.endIndex {
                ans.appdend(word1[idx1])
                idx1 = word1.index(after: idx1)
            }
            if idx2 != word2.endIndex {
                aps.appdend(word2[idx2])
                idx2 = word2.index(after: idx2)
            }
        }
        return ans
    }
}


Review

RN Integration with Existing Apps

  1. Set up directory structure
    To ensure a smooth experience, create a new folder for your integrated React Native project, then copy your existing iOS project to a /ios subfolder.

新建一个RN项目目录, 把iOS项目放到 RN目录中的 /iOS 子目录中

  1. Install JavaScript dependencies
    Go to the root directory for your project and create a new package.json file with the following contents:
    安装javascript依赖, 新建package.json 文件
{
  "name": "MyReactNativeApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "yarn react-native start"
  }
}

运行命令: npm install react-native
安装 react-native 依赖包

Tip

分享一些好用的工具 utools, 以及iOS项目集成RN步骤

Share

最近在读代码整洁之道,有个建议,所有的代码都要写测试用例,覆盖尽量100%, 我呆过的几家公司里, 很少有做到这样的, 大家不愿意写测试用例的原因,时间不够, 都交给专业的测试人员去做测试覆盖, 如果是每次发版本之前都跑一边测试用例最好。

相关文章:

  • QT小记:警告Use multi-arg instead
  • vue3 + ts项目(无vite)报错记录
  • ASUS华硕ROG幻13笔记本电脑GV301QE原厂Windows10系统
  • list.toArray
  • 工程化实战 - 前端AST(进阶)
  • 【使用vscode在线web搭建开发环境--code-server搭建】
  • C++ Qt 学习(十):Qt 其他技巧
  • SpringMvc请求原理流程
  • 文件转换,简简单单,pdf转word,不要去找收费的了,自己学了之后免费转,之后就复制粘贴就ok了
  • 关于缓存和数据库一致性问题的深入研究
  • 2023.11.19 hadoop之MapReduce
  • 网络层——IP协议
  • 【C++】【Opencv】霍夫直线检测即cv::HoughLinesP()函数详解和示例
  • 云计算(Docker)
  • 此芯科技加入绿色计算产业联盟,参编绿色计算产业发展白皮书
  • Python大数据之linux学习总结——day10_hive调优
  • 系列六、GC垃圾回收【四大垃圾算法-标记清除算法】
  • git使用及常用命令
  • 【Go入门】并发
  • 【Proteus仿真】【51单片机】锂电池管理系统
  • 首个偏头痛急性治疗药物可缓解前期症状
  • 王毅谈中拉论坛第四届部长级会议重要共识
  • 刘永明|在从普及到提高中发展新大众文艺
  • 第四届长三角国际应急博览会开幕,超3000件前沿装备技术亮相
  • 被取消总统候选人资格,金文洙:将采取政治法律措施讨回公道
  • 韩德洙成为韩国执政党总统大选候选人