讲解COMP 1043 UO Problem
UO Problem Solving and ProgrammingProgramming Assignment 3IntroductionThis document describes the first assignment for Problem Solving and Programming.The assignment is intended to provide you with the opportunity to put into practice what you have learnt in the course by applying your knowledge ...
2021-06-16
Go 语言的切片
切片的声明 {代码...} 切片的容量增长 {代码...} 切片共享内容 {代码...} 切片的比较 {代码...}
2021-06-15
二分法查找
{代码...}
2016-09-06
php strncmp 源码分析
strncmp函数原型源码分析 版本PHP 5.6.401、Zend/zend_builtin_functions.c (内置函数) {代码...} 2、Zend/zend_operators.c {代码...} 3、memcmp 用法
2023-06-02
Slice capacity 相关的两个场景
s1 和 s2 的值未知,s[0] 可能是 12,也有可能是9。如果在 append 一个元素之后 s 不会扩容,那么 s1[len(s)] 的值将会是12。
2022-09-03
COMP 1043 Problem Solving and Programming
UO Problem Solving and ProgrammingProgramming Assignment 3IntroductionThis document describes the first assignment for Problem Solving and Programming.The assignment is intended to provide you with the opportunity to put into practice what you have learnt in the course by applying your knowledge ...
2021-06-16
Object类的中的 toString + equals 用法
toString方法其实就是返回该对象字符串表示。关键点来了哈toString = 对象类型 + "@" + 地址hashCode(哈希数值)toString 由于是返回的结果是地址,开发中每个对象属性不同,所以我们一般需要重写它。
android ijkplayer c层分析-prepare过程与读取线程(续2-读取输入源)
这章要简单分析下ijkplayer是如何从文件或网络读取数据源的。还是read_thread函数中的关键点avformat_open_input函数:
2017-02-24
手撸golang 仿spring ioc/aop 之7 扫码2
最近阅读 [Spring Boot技术内幕: 架构设计与实现原理] (朱智胜 , 2020.6)本系列笔记拟采用golang练习之Talk is cheap, show me the code.
2021-04-15
【刷算法】用两个栈实现队列
题目描述 用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。 分析 两个栈实现队列,那就是一个进一个出,且题中没说两个栈的长度限制,那么对于两个栈s1和s2来说,有两个注意的点: s1.push时,若s2不为空且s1为空,为了保证正确的顺序,则将s2的元素全返入s1,然后再s1.push s2.pop时,若s2...
2018-07-20
String使用方法记录
知识点1、String s = "";会直接在常量池中创建该字符串2、String s = new String("s");会创建两个对象,1是常量池中s,2是队中的new String("s")对象3、intern()会判断这个字符串在不在字符串池中,如果不在则将当前字符串其加入到字符串池中
2021-03-02
JS - 实现一个简单的响应式系统
在各大前端框架中,响应式系统无疑是核心。今天我们就来实现一个简易版的 Angular Signals。先看结果: {代码...} 下面我们就来实现 signal 和 effect 这两个函数。signal 函数应该接受一个初始值,返回一个 Signal 对象,像这样: {代码...} Signal 对象应该是一个函数,调用它将返回内部值。并且有两个方法 set 和 upd...
[LeetCode] 214. Shortest Palindrome
Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation.
2018-12-05
04python—15种字符串操作
字符串是 字符的序列 。字符串基本上就是一组单词。我几乎可以保证你在每个Python程序中都要用到字符串,所以请特别留心下面这部分的内容。下面告诉你如何在Python中使用字符串。
2020-09-27
LeetCode5.最长回文子串 JavaScript
LeetCode5.最长回文子串 JavaScript 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。示例 1: 输入: "babad" 输出: "bab" 注意: "aba" 也是一个有效答案。 示例 2: 输入: "cbbd"输出: "bb" {代码...}
ubuntu下编译Hadoop
注意 libssl-dev安装换成 libssl1.0-dev版本。 我之前就是默认安转,在编译OpenSSL功能的时候一直卡主编译不通过。具体错误形式如下
2019-05-13
算法-双指针思想
leetcode125. 验证回文串自己写的 {代码...} 正确 {代码...}
2021-02-07