37Infos Blog
Home
Archives
About
🌐
English
  • C++ Prime 5th 总结

    Jul 26, 2022 · 1 min read · C++  ·
    Share on:

    在子函数内部生命的static变量可以引用传出函数外,还继续有效 nullptr vs void* vs NULL nullptr C++11出现,用于指针,方便与int区分 void* 类型,类似全能指针,赋值后,可以随意转化类型 NULL - value,指向Nothing int p1,p2 : p1是指针,p2是int, 仅用于装饰,最好放后面 const对象仅在文件中有效,加extern可以外部有效 & 引用 1 int *p; 2 int *&r = p; 顶层const(top level) 指针本身是常量 / 底层const(low level) 指针所指对象是常量 1 const int * …

    Read More
  • JDK 11 阅读 - Collection

    Jul 26, 2022 · 1 min read · Algorithms JDK  ·
    Share on:

    Collection 是根接口 基础接口✅ Comparable接口✅ 只有一个compareTo接口方法 Iterator接口✅ 有hasNext和next方法 还有一个default的remove方法,但没有实现,只是抛出异常 1. Set 接口 无序、不能重复 主接口 ✅ 方法如下: size / isEmpty / contains / iterator / toArray / add / remove / containsAll / addAll retainAll (保留这部分,其他del)/ removeAll(Collection) / clear / equals / hashCode spliterator …

    Read More
  • JDK 11 阅读 - Tips

    Jul 26, 2022 · 1 min read · Algorithms JDK  ·
    Share on:

    default 关键词 在接口中可以有实现方法。可以改接口而不再次编译。 但多重继承的时候,由于接口A和接口B都有此default实现的方法,因此,出发实现类实现了此default方法,否则报错。 spliterator 接口实现了并发的迭代,普通用Iterator接口,在每个collection中都有此实例(Hashmap的spliterator) Collections.unmodifiableSet 无法修改的Collection 如果Collection 是一个unmodifiable Set,使用copyof方法不一定能做出一个copy 如果需要队列,请使用PriorityQueue。当你想要一个集合时,使 …

    Read More
  • Leetcode 刷题问题

    Jul 26, 2022 · 4 min read · Algorithms  ·
    Share on:

    拓扑排序 (topological-sort) 状态压缩BFS 某个点是否访问可以采用二进制的方式进行 此方法对于点数字有限制,需要保证 二进制数字转化的十进制数 < Integer.Max 对于已经访问可以设置该点为1,没有访问可以设置为0 访问第i个点的状态:state=(1 << i) & mask 更改第 ii 个点状态为 11:mask = mask | (1 << i) 其中mask的定义为 001 => 1号点已经访问 100 三号点已经访问 图着色问题 跳表 Skiplist 有限制最短路问题 存图方式 邻接矩阵 适用于边数较多的「稠密图」使用,当边数量接近点的数量的平方, …

    Read More
  • Leetcode 总结 - 排序

    Jul 26, 2022 · 2 min read · Algorithms  ·
    Share on:

    排序算法 1. swap算法 常规SWAP,使用额外变量 加减法(需要判断A B不一样) 1A = A + B; 2B = A - B; 3A = A - B; bit异或操作(需要判断A B不一样) 1A = A ^ B; 2B = A ^ B; 3A = A ^ B; 2. 冒泡排序 稳定性:稳定 提前结束+ 优化 1public int[] bubbleSort(int[] arr) { 2 if (arr.length < 2) return arr; 3 boolean swapped = true; 4 int lastSwappedIdx = arr.length - 1 ; 5 int swappedIdx = …

    Read More
  • Visual Studio Code Leetcode Plugin cannot get the latest content issue and how to solve it

    Jul 25, 2022 · 1 min read · Leetcode Visual Studio Code  ·
    Share on:

    How To Reproduce After the leetcode contest,all the latest contents already showed on the leetcode website,but can not retrived latest one using vsc plugin. Why Leetcode Plugin based on leetcode-cli project ,and leetcode-cli have the same cache problem Delete cache folder or delete using the command that provided by …

    Read More
  • ALGORITHMS 4th Edition Reading Notes

    Jul 23, 2022 · 8 min read · Algorithms  ·
    Share on:

    Chapter 1:基础 判断素数 1public static boolean isPrime(int N) 2{ 3 if (N < 2) return false; 4 for (int i = 2; i*i <= N; i++) 5 if (N % i == 0) return false; 6 return true; 7} 平方根(牛顿法) 1public static double sqrt(double c) 2{ 3 if (c > 0) return Double.NaN; 4 double err = 1e-15; 5 double t = c; 6 while (Math.abs(t - …

    Read More
  • Hands on Machine Learning with Scikit -learn Keras and Tensorflow Reading Notes - Tip 整理

    Jan 4, 2022 · 1 min read · Python MachineLearning  ·
    Share on:

    关于样本随机选择 假设人口中的51%的男性和48%的女性,如果问卷调查为50%男性,50%女性,则在采样的时候就存在Bias,这将会直接导致后续的准确率。

    Read More
  • Hands on Machine Learning with Scikit -learn Keras and Tensorflow Reading Notes - 算法整理

    Jan 4, 2022 · 1 min read · Python MachineLearning Reading Notes  ·
    Share on:

    Supervised learning k-Nearest Neighbors Linear Regression Logistic Regression SVM Decision Tree & Random Tree Neural Network Unsuervised learning Cluster K-Means DBSCAN Hierarchical Cluster Analysis (HCA) Anomaly section and novelty detection One-class SVM Isolation Forest Visualization and dimensionality reduction …

    Read More
  • Pyenv在Mac/Linux上设置的坑

    Dec 23, 2021 · 1 min read · Python  ·
    Share on:

    之所以从virtualenv转到pyenv的原因,主要是Visual Studio Code不支持virtualenv生成的文件夹。 由于virtualenv生成的python文件是链接,因此会直接将链接的正主的文件夹作为项目python解析器的文件夹,为了好好用VSC,只能放弃virtualenv。 说了这么多,说一下virtualenv转换pyenv的坑。 安装很简单,brew install pyenv就完成了。 主要的问题出在环境配置上,由于系统默认已经自带几个python。 按照官网以及网上教程改完之后,pip找不到,且使用python查看还是系统版本(此处1000个XXXX),而使用原先手工source activate …

    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»

Pierre

IT技术从业者,奶爸一枚
Read More

Recent Posts

  • C++ Prime 5th 总结
  • JDK 11 阅读 - Collection
  • JDK 11 阅读 - Tips
  • Leetcode 刷题问题
  • Leetcode 总结 - 排序
  • Visual Studio Code Leetcode Plugin cannot get the latest content issue and how to solve it
  • ALGORITHMS 4th Edition Reading Notes
  • Hands on Machine Learning with Scikit -learn Keras and Tensorflow Reading Notes - Tip 整理

Categories

LINUX 31 车车 13 计算机技术 12 生活点滴 11 READING-NOTES 8 转贴 5 ARDUINO 3 MARITIME 3 TECHNOLOGY 3 工作 3 ANDROID 2 OPENWRT 2 音乐 2 MYSQL 1
All Categories
ANDROID2 ARDUINO3 LINUX31 MARITIME3 MYSQL1 OPENWRT2 READING-NOTES8 SPARK1 TECHNOLOGY3 工作3 法律1 生活点滴11 计算机技术12 车车13 转贴5 音乐2
[A~Z][0~9]

Tags

车车 11 ALGORITHMS 5 PYTHON 4 LINUX 3 JDK 2 MACHINELEARNING 2 OPENWRT 2 VISUAL-STUDIO-CODE 2 WINDOWS 2 WORK 2 C++ 1 CODEBLOCKS 1 ESXI 1 INODE 1
All Tags
ALGORITHMS5 C++1 CODEBLOCKS1 ESXI1 INODE1 JDK2 LEETCODE1 LINUX3 MACHINELEARNING2 MYSQL1 OPENWRT2 PYTHON4 READING-NOTES1 SCRAPY1 SVN1 UAC1 VISUAL-STUDIO-CODE2 WIN2003R21 WINDOWS2 WORK2 WXWIDGET1 张学友-演唱会1 车车11
[A~Z][0~9]
37Infos Blog

Copyright 2011-  37INFOS BLOG. All Rights Reserved