- 博客(40)
- 收藏
- 关注
原创 Spring源码解析之@Autowired注解实现原理
Spring @Autowired注解实现原理目录Spring @Autowired注解实现原理前言Demo演示依赖注入bean定义创建Bean的配置类容器启动类输出结果Autowired实现原理(AutowiredAnnotationBeanPostProcessor)AutowiredAnnotationBeanPostProcessor 类结构图References前言IOC是Spring的核心功能之一,在日常开发中,我们经常用到@Autowired注解来完成自动装配工作,但它的原理是怎样的呢
2021-11-30 00:43:29
771
原创 Java常用机制 - SPI机制详解
Spring官网文章目录Spring官网前言一、pandas是什么?二、使用步骤1.引入库2.读入数据References前言提示:这里可以添加本文要记录的大概内容:例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。一、pandas是什么?示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。二、使用步骤1.引入库代码如下(示例):import numpy as npimpor
2021-09-29 01:42:09
293
原创 VTK Example代码编译运行
在VTK源码包的Example中,每个模块的例子都有一个CMakeList文件,可之间编译运行。 但VTK版本更新快,模块经常小改,而对于VTK6.x的Example的CMakeLists却没有改动,所以会造成编译错误,如CMake Error at C:/VTK/CMake/vtkModuleAPI.cmake:120 (message):Requested modules not avail
2017-02-15 22:05:06
3311
原创 Error: no override found for 'vtkRayCastImageDisplayHelper'
vtk6中使用vtkVolumeRayCastMapper出现错误“Error: no override found for ‘vtkRayCastImageDisplayHelper’”,需要在main()开始位置添加如下代码#include <vtkAutoInit.h>VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);References:http://
2017-02-12 09:30:04
1797
原创 PriorityQueue<> JAVA
这里简单对其重复的方法做点简单的区分。 offer,add区别: 一些队列有大小限制,因此如果想在一个满的队列中加入一个新项,多出的项就会被拒绝。 这时新的 offer 方法就可以起作用了。它不是对调用 add() 方法抛出一个 unchecked 异常,而只是得到由 offer() 返回的 false。 poll,remove区别: remove() 和 poll() 方法都是从队列中删除
2017-02-09 22:46:59
521
转载 程序员的基础生存技能:高效用Google
来源: GavinZhang( @GavinBuildSomething ) 链接:http://guoze.me/2016/06/26/how-to-google/如果票选近二十年最伟大的发明,我相信搜索引擎肯定会占据一个不容小觑的位置,它不单是一项发明,更是一项成就,最大程度消灭了信息的不平等。既然人人都可以接触到海量的信息,那么衡量信息财富多寡就只剩下技巧这惟一的标准了:善用搜索引擎的
2016-10-18 15:57:28
500
原创 最长回文串
https://www.patest.cn/contests/pat-a-practise/1040#include <iostream>#include <string>#include <algorithm>#include <vector>#include <map>#include <unordered_map>#include <string>#include <queue
2016-10-16 16:32:05
489
原创 C++ priority_queue用法(大顶堆,小顶堆)
cplusplus.com template <class T, class Container = vector<T>, class Compare = less<typename Container::value_type> > class priority_queue; 例子#include <iostream>#include <string>#include <algori
2016-10-03 11:59:04
44044
3
原创 Mac tree 命令
tree -d -L 2 -d 只输出目录 -L level 输出level层tree -N 原输出文件名,解决tree结构文件目录中文乱码问题
2016-09-29 17:09:41
877
原创 经典排序方法实现
冒泡排序选择排序插入排序快速排序堆排序希尔排序归并排序#include <iostream>#include <string>#include <algorithm>#include <vector>#include <map>#include <unordered_map>#include <string>using namespace std;vector<int> a
2016-09-21 00:50:44
623
原创 C++ STL map容器的排序(按key或value)
template < class Key, // map::key_type class T, // map::mapped_type class Compare = less<Key>,
2016-09-19 22:01:33
3641
原创 素数 筛选获取
https://leetcode.com/problems/count-primes/class Solution {public: int countPrimes(int n) { if(n < 2) return 0; vector<bool> flag(n, true); //flag primes flag[0
2016-09-16 21:20:43
527
原创 Matlab for Mac 中文路径乱码解决
matlabrootmatlabroot/bin下有支持语言的编码文件(language code) lcdata.xml和lcdata_utf8.xml. lcdata.xml支持windows下的编码GB..,默认是使用此文件,在mac下中文乱码。解决方法备份源lcdata.xml,用lcdata_utf8.xml覆盖lcdata.xml,具体操作如下(Matlab command模式):ml
2016-09-12 14:55:31
4315
原创 Sublime Text 3 配置
Sublime Text 3 设置Sublime Text 3 设置Sublime插件安装PackageColorSublimeConvertToUTF8 Bracket Highlighter SideBar Enhancements Setting-User 个性化配置终端命令设置sublime text 3 - 3114 注册码References 记录自己的Sub
2016-09-04 10:02:53
886
转载 Python2 之 print函数示例
吐槽下,python2 官方文档的print资料好少啊,看的别人博客才知道咋用╮(╯_╰)╭#!/usr/bin/env python# -*- coding: utf-8 -*-import sysprint(sys.version)#输入与输出#str()与repr()for x in range(1, 11): print repr(x).rjust(2), repr(x*x).r
2016-07-09 20:44:09
6874
原创 LeetCode - Binary Tree Level Order Traversal
这题算是树遍历的基础,写这篇博客主要是为了记录两种代码风格的层序遍历。Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree [3,9,20,null,null
2016-07-08 22:08:16
375
原创 Mac OSX 下PyCharm 工程中 pyenv 和 virtualenv的使用
本文主要讲解如何在pycharm中使用pyenv和virtualenv创建的多版本python环境pyenv和virtualenv的安装请戳 -> http://blog.youkuaiyun.com/lijiang1991/article/details/51830978首先,创建python虚拟环境终端中使用pyenv创建新环境☁ ~ pyenv virtualenv new-env-3.5.1p
2016-07-05 15:33:46
11055
原创 Mac OSX python多版本管理工具:pyenv 和 virtualenv搭建
Installation pyenv方法1使用Mac OSX的Homebrew安装方法2通过github工程安装Installation pyenv-virtualenvUsing pyenv-virtualenv特定python版本的某个环境下pip安装包Install issuesERROR pyenv install -v 351 failed to download Pytho
2016-07-05 13:57:42
13122
原创 PyCharm 中文注释报错 SyntaxError: Non-ASCII character
Python菜鸟今天写程序时加了中文注释,竟然就报错了,头一回碰到注释报错,活久见。平时看别人代码时,或多或少会碰到中文注释乱码问题,原因是不同文件编码格式,有些文件编码并不能显示中文,如ASCII。而PyCharm对于中文不仅仅是显示乱码问题,而是编译报错。如下SyntaxError: Non-ASCII character '\xe6' in file TestPy3/t.py on line
2016-06-28 20:00:18
17612
原创 pip install Error - ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read
pip install ErrorOSX 终端更新pip出错 sudo pip install --upgrade pip : 1.ReadTimeoutError: HTTPSConnectionPool(host=’pypi.python.org’, port=443): Read解决办法: 加大超时时间,如 pip --default-timeout=100 install -U pip
2016-06-28 14:44:12
50221
4
转载 LeetCode - Linked List Cycle I &II
转载:http://www.cnblogs.com/hiddenfox/p/3408931.html题目要求Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?如何判断一个单链表中有环?
2016-05-09 00:24:32
516
原创 LeetCode - Permutations II
题目链接:https://leetcode.com/problems/permutations-ii/Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique pe
2016-04-27 12:42:19
506
原创 PAT 大数运算
PAT中关于大数的有B1017,A1023,A1024 (A-Advance,B-Basic)B10171017. A除以B (20)本题要求计算A/B,其中A是不超过1000位的正整数,B是1位正整数。你需要输出商数Q和余数R,使得A = B * Q + R成立。输入格式:输入在1行中依次给出A和B,中间以1空格分隔。输出格式:在1行中依次输出Q和R,中间以1空格
2016-04-26 16:33:38
599
原创 PAT 1059. Prime Factors (25) 质因子分解
题目链接 http://www.patest.cn/contests/pat-a-practise/1059Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km.Input
2016-04-26 16:33:36
385
原创 分数(有理数)的四则运算PAT1088
2015-02-05PAT- B1088. Rational Arithmetic (20)http://www.patest.cn/contests/pat-a-practise/1088 1 #include 2 #include 3 using namespace std; 4 typedef long long LL; 5 typedef st
2016-04-26 16:32:18
526
原创 HDU ACM 题目分类
模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1119 1128 1129 114
2016-04-26 16:32:16
927
原创 整数v,从高位到低位,取c位数,得到最大数 (其中:v>=10^c)
题目如上,例子v=22312324,c=3,求得最大数为334。 用自己的想法实现了一遍,如果你有更好的方法的话,欢迎不吝赐教。我的思路是,先将整数v按位存入一个数组,数组低位为整数高位,如num[]={2,2,3,1,2,3,2,4}。求得最大数有c位数,v_max[]={……}。每次从数组num[]取得一位最大数,存入v_max[]相应位。如求v_max[0],因为v_max有c
2016-04-26 16:31:56
822
原创 笔试题 相对位置不变的正负数排序
笔试题目:假设一整型数组存在若干正数和负数,现在通过某种算法使得该数组的所有负数在正数的左边,且保证负数件和正数间元素相对位置不变。时空复杂度要求分别为:o(n),o(1)。例如 -3 4 2 -1 7 3 -5 排序后 -3 -1 -5 4 2 7 3 /*1.0版本思想*/ 考虑复杂度,我的实现方法是找到第一个postive,再找到第一个negative after the
2016-04-26 16:31:48
1968
1
原创 浮点数转化为字符串
(1)在不调用库函数的情况下,把浮点数转化为字符串的难点就在,把小数转化为字符串。因为浮点数的精度问题,当我们对浮点数进行乘10操作的时候,浮点数尾数数值可能就会发生变化,如float a=12.1047; a*=10;输出a=121.046997。所以在把浮点数的小数转化为字符串时要对精度进行限制。 1 #include 2 #include 3 #include 4
2016-04-26 16:31:46
26108
原创 LeetCode - Palindrome Partitioning
题目链接:https://leetcode.com/problems/palindrome-partitioning/Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For
2016-04-26 16:21:39
442
原创 OS X Qt Creator: Undefined symbols for architecture x86_64
http://stackoverflow.com/questions/28119189/qt-creator-undefined-symbols-for-architecture-x86-64
2016-04-25 21:54:52
3843
原创 ITK & VTK 测试例子
Cmake新手,刚开始学习CmakeLists.txt编写,多看demo学习效率会高些,所以这里收集一些简单的CmakeLists.txt例子,有空再整理。CMake1是个开源的跨平台自动化建构系统,它用配置文件控制建构过程(build process)的方式和Unix的Make相似,只是CMake的配置文件取名为CMakeLists.txt。Cmake并不直接建构出最终的软件,而是产生标准的建构
2016-04-24 12:14:23
1759
原创 Leetcode 59. Spiral Matrix II
题目描述 Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ]
2016-04-23 09:07:30
620
原创 Mac下安装VTK6.2,并在Qt上使用VTK
VTK的安装打开Qt Creator创建新工程对新建工程配置OpenCV路径链接编译运行例子References最近要在mac运行一个Qt工程,需要使用OpenCV+ITK+VTK,搞了好久才搞定。我只想说,vtk+itk在mac上的资料真心少,虽然osx和linux的安装配置大体一样,但是就是那些许差异埋得坑真是磨人(特别是对于身为新手而言,泪奔啊´╮(╯﹏╰)╭ 。所以搞定之后打算
2016-04-22 11:34:05
5870
2
原创 Mac 安装Qt5,QtCreator3.5 并使用OpenCV
最近要在mac运行一个Qt工程,需要使用OpenCV+ITK+VTK,搞了好久才搞定。我只想说,vtk+itk在mac上的资料真心少,虽然osx和linux的安装配置大体一样,但是就是那些许差异埋得坑真是磨人(特别是对于身为新手而言,泪奔啊´╮(╯﹏╰)╭ 。所以搞定之后打算好好写个博客记录自己踩过的坑,也供给他人提供经验少踩坑。 这篇博客主要记录Qt的安装,和如何在Qt上使用OpenCV
2016-04-21 22:46:47
7073
原创 SIFT论文整理
Distinctive Image Featuresfrom Scale-Invariant KeypointsDistinctive Image Featuresfrom Scale-Invariant KeypointsIntroductionRelated researchDetection of scale-space extrema1 Local extrema detection
2016-03-11 15:11:22
13142
1
原创 OpenCV3.1 xfeatures2d::SIFT 使用
本文主要记录如何安装opencv_contrib,配置Xcode,sift使用
2016-03-11 13:12:13
33997
2
原创 OpenCV3 install tutorial for Mac
OpenCV3 install tutorial for Mac引用链接 http://docs.opencv.org/3.1.0/d7/d9f/tutorial_linux_install.html#gsc.tab=0 http://blog.sciencenet.cn/blog-702148-657754.html https://www.youtube.com/watch?v=XJeP1
2016-02-27 17:15:00
3267
原创 Django学习之路
Django Website Collectdjango packages http://djangopackages.com/ django project http://code.djangoproject.com/wiki/DjangoResources django资源大全 http://www.iteye.com/topic/405150
2016-01-25 15:31:22
487
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人