iOS Charles抓包
在iOS应用开发过程中,通过抓包调试服务接口的场景时常出现。Charles和Wireshark是开发过程中最常用的两款抓包软件。 在日常开发中,我们无法看到应用程序与服务器之间发送和接收的内容,没有这种可见性,我们在确定故障的确切位置时会非常困难且耗时。而Charles是一个运行在PC上的Web代理,我们将应用程序配置为 ...
It’s not what you know, it’s how you think
在iOS应用开发过程中,通过抓包调试服务接口的场景时常出现。Charles和Wireshark是开发过程中最常用的两款抓包软件。 在日常开发中,我们无法看到应用程序与服务器之间发送和接收的内容,没有这种可见性,我们在确定故障的确切位置时会非常困难且耗时。而Charles是一个运行在PC上的Web代理,我们将应用程序配置为 ...
SM角色 SM是教练的角色 SM的贡献表现在对团队效能的提升 SM的组织目标是:引导团队自组织,SM管理的时间投入越来越少 SM的成长关键:迭代优化总结,每个迭代的精进总结成长 异步协同:异步有利于提高每个成员的效率,尽量做异步协同,参考《为什么精英都是时间控》 同步协同:利用早会时间,做好同步协同,技术风险点做好同步和评估 向上反 ...
最近做了一次核心技术Review,评委们给了很多的建议,其中“方法论”一词出现的概率很高。想想自己平时也做了非常多的技术项目和技术方案,但是回过头来还是缺少总结思考,没有形成自己系统化,并且处理问题行之有效的方法论。 那什么是方法论?为什么要方法论?怎么总结自己的方法论呢?今天特意来学习整理一下。 方法论是什么 维基百科上方 ...
安装docker brew install bash-completion brew cask install docker 初始化docker 安装完成之后,应用会增加一个Docker app,启动后需要输入密码来初始化,然后就可以使用命令行docker命令了。 构建docker镜像 准备Dockerfile 比如: FROM centos:7 LABEL maintainer="suninf <sunjiangwei@yeah.net>" # RUN yum update && yum clean all RUN yum update -y RUN yum install -y sudo vim RUN yum install -y git wget rsync # for coturn building RUN yum install -y gcc make redhat-rpm-config doxygen rpm-build RUN yum install -y sqlite RUN yum install -y mysql-devel ...
Optional对象支持值可空的抽象,特别是针对Java中的NPE问题,Optional可以很好的显式的来应对。 比如: user.getAddress().getProvince(); 这种写法,在user为null时,是有可能报NullPointerException异常的。为了解决这个问题,于是采用下面的写法 if (user != null) { Address address = user.getAddress(); if (address != null) { String province = address.getProvince(); } } 接下来介绍Optional的使用 ...
拉取镜像 比如:安装centos镜像,https://hub.docker.com/ 中搜索centos,有tag为7.9.2009的镜像 docker pull centos:7.9.2009 构建docker镜像 也可以自己定义Dockerfile来创建镜像 准备Dockerfile 比如: FROM centos:7 LABEL maintainer="suninf <sunjiangwei@yeah.net>" # RUN yum update && yum clean all RUN yum update -y RUN yum install -y sudo vim RUN yum install -y git wget rsync # for coturn building RUN yum install -y gcc make redhat-rpm-config doxygen rpm-build ...
For the most part, employees expect to take direction from their managers. But anyone who’s ever worked for a boss who is disorganized, scatterbrained, or simply overworked knows how difficult it can be to figure out exactly what’s expected of them. When your manager is spectacularly swamped — or, like a significant majority of other bosses, simply disengaged — tackling your job responsibilities can be a bit tricky if for no other reason than you might not know precisely what they are. If you find yourself in such a situation, you generally have two options. You could either grit your teeth and try to endure the uncertainty or you can try your hand at “managing up,” a concept that’s generated increasing attention over the last several years. Quite simply, managing up refers to doing whatever ...
大家好!各位都非常年轻,我今天来的时候挺有压力。看到你们,真是觉得“长江后浪推前浪”。 我昨天就在想,今天应该跟大家分享什么。想了想,先把题目拟出来,把乔布斯的“Stay hungry, Stay foolish”,改成“Stay hungry, Stay young”。 我想跟大家分享一下我自己毕业后的工作经历和体会。另外,我作为面试官,过去10年里,可能面试过小20 ...
switch在Java编译器处理的底层实现是使用 int 型 来进行判断的,即使是枚举、String类型,最终也是转变成 int 型。由于 long 型表示范围大于 int 型,因此不支持 long 类型。 例如: public static int stringSwitch(String ss) { switch (ss) { case "ABCDEa123abc": return 1; case "ABCDFB123abc": return 2; case "helloWorld": return 3; default: return Integer.MAX_VALUE; } } 反编译的结果: public static int stringSwitch(String ss) { byte var2 = -1; switch(ss.hashCode()) { case -1554135584: if (ss.equals("helloWorld")) { var2 = 2; } break; case 165374702: if (ss.equals("ABCDFB123abc")) { var2 = 1; } else if (ss.equals("ABCDEa123abc")) { var2 = 0; } } switch(var2) { case 0: ...
一句话总结: isAssignableFrom()方法是从类继承的角度去判断,instanceof()方法是从实例继承的角度去判断。 isAssignableFrom()方法是判断是否为某个类的父类,instanceof()方法是判断是否某个类的子类。 Class.isAssignableFrom()方法 Class.isAs ...
本文整理Java数组和集合操作的惯用法。 数组填充与复制 填充数组元素 byte[] a = new byte[3]; Arrays.fill(a, (byte)123); 复制一个范围内的数组元素 // Copy 8 elements from array 'a' starting at offset 3 // to array 'b' starting at offset 6, // assuming 'a' and 'b' are distinct arrays byte[] a = (...); byte[] b = (...); System.arraycopy(a, 3, b, 6, 8); 调整数组大小 a = Arrays.copyOf(a, newLen); 可变参数列表转范型数组 public class Test { public static void main(String[] args) { Integer[] a = of(1, 2, 3); String[] b = of("hello", "world"); } private static <T> T[] of(T... values) { return values; } } 数组与ArrayList互转 ...
本文介绍树莓派的基本装机配置,所用设备是树莓派3B+。 装机准备 下载系统 https://www.raspberrypi.org/downloads/raspbian/ mac写系统工具 https://www.balena.io/etcher/ 开机配置 配置ssh /boot 目录下建立ssh空文件 默认wifi /boot 目录下新建 wpa_supplicant.conf 文件 country=CN ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="WiFi-A" psk="12345678" key_mgmt=WPA-PSK priority=1 } 参考: http://shumeipai.nxez.com/2017/09/13/raspberry-pi-network-configuration-before-boot.html 配置静态ip 配置静态ip有利于树莓派的管理,编辑/etc/dhcpcd.conf文件,在尾部加上: interface wlan0 static ip_address=192.168.1.66/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 配置内网穿透 树莓 ...
本文分析下x264做视频编码时的低延时配置 低延时配置与参数说明 x264的zerolatency配置代码: else if( !strncasecmp( s, "zerolatency", 11 ) ) { param->rc.i_lookahead = 0; param->i_sync_lookahead = 0; param->i_bframe = 0; param->b_sliced_threads = 1; param->b_vfr_input = 0; param->rc.b_mb_tree = 0; } i_lookahead 该参数为mb-tree码率控制和vbv-lookahead设置可用的帧数量,最大值为250。对于mbi-tree来说,rc_lookahead值越大,会得到更 ...
前面两篇程序员的成长路线文章比较受欢迎,决定再重新整合写一篇,希望自己和大家能够一起在这条路上成长的更好,这篇文章主要讲程序员的硬实力的能力成长,软实力那些就不多讲了。 从业余程序员到职业程序员 程序员刚入行时,我觉得最重要的是把自己培养成职业的程序员,我的程序员起步比同龄人都晚了很多,更不用说现在的年轻人了,我大学读的是 ...
FLV(Flash Video)是现在非常流行的流媒体格式,由于其视频文件体积轻巧、封装播放简单等特点,使其很适合在网络上进行应用。目前流行的rtmp推流直播,格式都是flv,而且基于http-flv形式来拉流,直播的实时性也很高。 格式 FLV是流媒体封装格式,我们可以将其数据看为二进制字节流。总体上看,FLV包括文件头( ...