DJ Blog

如果我是DJ你会爱我吗?

leetcode刷题(三)

小算法大智慧

前言 最近在leetcode上做算法题,记录一下心得 (我的答案是用js写的) 由易至难 第一题:104 Maximum Depth of Binary Tree Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest...

OC中的变量位置

前言 const/static/extern/typedef/typeof/define的释义和用法 1、const(常量—readonly) ### 作用: const (去掉类型)修饰谁,谁不能改变。 用于修饰 右边 的基本变量或指针变量; 被修饰的变量只读,不能被修改(readonly); 2、static (静态的) 作用:修饰不同的变量作用不尽相同。 ...

OC中的static define const extern

前言 最近在leetcode上做算法题,记录一下心得 (我的答案是用js写的) 由易至难 第一题:669. Trim a Binary Search Tree Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elemen...

leetcode刷题(二)

小算法大智慧

前言 最近在leetcode上做算法题,记录一下心得 (我的答案是用js写的) 由易至难 第一题:669. Trim a Binary Search Tree Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elemen...

授权管理安装问题

前言 授权管理系统遇到的问题记录如下 1. npm 安装遇到的问题 no such files “../node_modules/.stash….” 通过 npm set registry https://registry.npm.taobao.org # 注册模块镜像 npm set disturl https://npm.taobao.org/dist # node-...

leetcode刷题(一)

小算法大智慧

前言 最近在leetcode上做算法题,记录一下心得 (我的答案是用js写的) 由易至难 第一题: 1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each ...

鸟巢实施说明书

鸟巢实施说明书 北京鑫丰南格科技有限责任公司 目录 前言 4 1.安装Ubuntu-Server 5 1.1准备工做 5 1.2开始安装 5 1.3安装系统及应用所需的基本内容 5 安装JDK 7 2.1 下载安装 7 2.2 上传安装 7 2.3 验证 7 3.安装NEO4J 8 3.1下载或上传 8 3.2 解压 8 3...

copy 和 mutableCopy

前言 一直不太懂copy 和mutable的区别,自从看了下面的文章,瞬间明悟了 OC中的copy 总结 使用copy的必须遵守NSCopy或NSMutableCopy协议,(view 使用copy 会报错) copy 的不可变对象和strong一样 引用计数+1,可变对象返回一个新对象,引用计数不变,且返回的是一个不可变对象,所以不能使用可变对象的属性方法,会crash ...

何为SafeArea

iOS safeArea

参考地址 科学上网 safeArea指南 前言 iOS 更新了11.0之后对于view引入了safeArea的概念,那么到底什么是safeArea呢? 总结(我喜欢把总结放前面) 在适配 iPhone X 的时候首先是要理解 safeArea 是怎么回事。 盲目的 if iPhoneX{} 只会给之后的工作代码更多的麻烦。 如果只需要适配到 iOS9 之前的 sto...

iOS11.0&&iPhoneX适配

Xcode build

前言 iOS 更新了11.0以及iPhone X发布之后,各种蛋疼的适配让人无所适从,在此记录一下 适配当中遇到的坑以及解决方法。 参考1 参考2 准备 // 判断是否是iPhone X #define kDevice_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CG...