<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Kp_2000的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/Kp_2000</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Kp_2000]]></copyright><item><title><![CDATA[【JAVA】debug模式下source not found解决方法，无需add project或者jar包（亲测）]]></title><link>https://blog.csdn.net/Kp_2000/article/details/106132512</link><guid>https://blog.csdn.net/Kp_2000/article/details/106132512</guid><author>Kp_2000</author><pubDate>Fri, 15 May 2020 00:38:36 +0800</pubDate><description><![CDATA[**搜了半天都没有解决问题，终于在一篇博客中找到了解决办法
解决方法：将debug视图下的右上方ArrayIndexOutOfBoundsException: caught and uncaught  前的对钩去掉。
**
转自
https://blog.csdn.net/crave_shy/article/details/15499635

...]]></description><category></category></item><item><title><![CDATA[【C++】如何得到unique()去重后的数组长度]]></title><link>https://blog.csdn.net/Kp_2000/article/details/104957330</link><guid>https://blog.csdn.net/Kp_2000/article/details/104957330</guid><author>Kp_2000</author><pubDate>Thu, 19 Mar 2020 00:01:14 +0800</pubDate><description><![CDATA[获取方式：int length = unique(a,a+x)-a;

具体解释这个公式之前我们需要先了解unique()方法

由图可知 unique()返回值指向第一个重复元素的地址，而数组名指向数组的首地址
#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;algorithm&gt;
using namespace ...]]></description><category></category></item><item><title><![CDATA[【Spring】详述spring对象生命周期]]></title><link>https://blog.csdn.net/Kp_2000/article/details/104872103</link><guid>https://blog.csdn.net/Kp_2000/article/details/104872103</guid><author>Kp_2000</author><pubDate>Sun, 15 Mar 2020 01:01:08 +0800</pubDate><description><![CDATA[&lt;bean id = "userInfo" class="com.jd.vo.UserInfo" lazy-init="true" scope="singleton" init-method="init" destroy-method="destroy"&gt;

Spring对象（bean）的生命周期：
静态代码块——非静态代码块——构造方法——setter方法——init方法——dest...]]></description><category></category></item><item><title><![CDATA[【Spring】详述scope的作用]]></title><link>https://blog.csdn.net/Kp_2000/article/details/104871947</link><guid>https://blog.csdn.net/Kp_2000/article/details/104871947</guid><author>Kp_2000</author><pubDate>Sun, 15 Mar 2020 00:48:53 +0800</pubDate><description><![CDATA[&lt;bean id = "userInfo" class="com.jd.vo.UserInfo" scope="singleton"&gt;

scope有四个值：prototype、request、session、singleton
1、prototype（多例）
每次调用getBean（）方法，都会获取一个新的对象

2、request
常用于java web中，不同的请求，创建不同的对...]]></description><category></category></item><item><title><![CDATA[【Spring】lazy-init（懒加载）的作用]]></title><link>https://blog.csdn.net/Kp_2000/article/details/104871809</link><guid>https://blog.csdn.net/Kp_2000/article/details/104871809</guid><author>Kp_2000</author><pubDate>Sun, 15 Mar 2020 00:36:31 +0800</pubDate><description><![CDATA[&lt;bean id = "userInfo" class="com.jd.vo.UserInfo" lazy-init="true"&gt;

1、lazy-init 默认是false，即非懒加载，意味着当IoC容器创建时，直接创建对象。
2、lazy-init 为true时，即懒加载，意味着IoC容器创建时，不会直接创建对象，只有在调用getBean()方法时，才会创建对象 (并调用其构造方...]]></description><category></category></item><item><title><![CDATA[【C】int、float、double之间的强转导致精度损失的问题]]></title><link>https://blog.csdn.net/Kp_2000/article/details/104781174</link><guid>https://blog.csdn.net/Kp_2000/article/details/104781174</guid><author>Kp_2000</author><pubDate>Tue, 10 Mar 2020 20:05:28 +0800</pubDate><description><![CDATA[对这个问题的探讨来源于一道机组的原题
假定变量i，f，d数据类型分别为int，float和double(int用补码表示，float和double分别用IEEE754单精度和双精度浮点数据格式表示)，已知i=785，f=1.5678，d=1.5。若在32位机器中执行下列关系表达式，则结果为真是( )
(Ⅰ)i==(int)(float)i
(Ⅱ)f==(float)(int)f
(Ⅲ)f==(fl...]]></description><category></category></item><item><title><![CDATA[【C】long long 和 double输入输出格式问题！]]></title><link>https://blog.csdn.net/Kp_2000/article/details/104399640</link><guid>https://blog.csdn.net/Kp_2000/article/details/104399640</guid><author>Kp_2000</author><pubDate>Wed, 19 Feb 2020 20:21:10 +0800</pubDate><description><![CDATA[int main()
{
	long long a; //令a=202024200123测试
	scanf("%lld",&amp;a);       //long long输入输出格式都必须用lld，否则结果有误！
	printf("%lld",a);
	return 0;
}


若使用%d、%ld、%l64d，实测都无法显示正确答案。
只有使用%lld能显示正确答案。

...]]></description><category></category></item><item><title><![CDATA[【C】HDU - 1425：给你n个整数，请按从大到小的顺序输出其中前m大的数。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/95240411</link><guid>https://blog.csdn.net/Kp_2000/article/details/95240411</guid><author>Kp_2000</author><pubDate>Tue, 09 Jul 2019 21:21:58 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include &lt;algorithm&gt;

using namespace std;
//修改默认排序方式
bool comp(const int &amp;aa,const int &amp;bb){
        return aa&gt;bb;
    }

int main()...]]></description><category></category></item><item><title><![CDATA[【C】HDU - 1004：有多种颜色的气球，统计它们的个数，并找出数量最多的那种颜色。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/95239130</link><guid>https://blog.csdn.net/Kp_2000/article/details/95239130</guid><author>Kp_2000</author><pubDate>Tue, 09 Jul 2019 21:13:48 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
#include&lt;string.h&gt;

int main(){
    //初始化变量
    int n,i,j;
    char str[1001][20];     
    int ct[1001];
    //多组测试数据，遇0停止
    while(scanf("%d",&amp;n) &amp;&amp; n != ...]]></description><category></category></item><item><title><![CDATA[【C】求一个子串在一个字符串中出现的次数，如果不出现则返回0]]></title><link>https://blog.csdn.net/Kp_2000/article/details/92822890</link><guid>https://blog.csdn.net/Kp_2000/article/details/92822890</guid><author>Kp_2000</author><pubDate>Wed, 19 Jun 2019 12:44:59 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
#include&lt;string.h&gt;

int judge(char *str, char *sonStr){

    int length_str,length_sonStr;
    char *p,i,j;
    p = str;
    int count = 0;
    length_sonStr = strlen(son...]]></description><category></category></item><item><title><![CDATA[【C】已知1980年1月1日为星期二，求1980年1月1日之后任意一个日期是星期几。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/91801268</link><guid>https://blog.csdn.net/Kp_2000/article/details/91801268</guid><author>Kp_2000</author><pubDate>Thu, 13 Jun 2019 10:13:37 +0800</pubDate><description><![CDATA[#include &lt;stdio.h&gt;
// 判断是否是闰年
int is_leap_year(int year)
{
    return (year % 4 == 0 &amp;&amp; year % 100 != 0) || year % 400 == 0;
}
// 给定年份和月份，获得这个月有多少天
int get_days (int year, int month)
{
 ...]]></description><category></category></item><item><title><![CDATA[【C】输入一个数，判断其逆序数是不是素数]]></title><link>https://blog.csdn.net/Kp_2000/article/details/91620384</link><guid>https://blog.csdn.net/Kp_2000/article/details/91620384</guid><author>Kp_2000</author><pubDate>Wed, 12 Jun 2019 20:56:19 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
#include&lt;math.h&gt;

//输入一个数，判断其逆序数是不是素数

int main(){
    int prime(int x);
    int turn(int x);
    int x;
    printf("please input x:\n");
    scanf("%d", &amp;x);
    x =...]]></description><category></category></item><item><title><![CDATA[【C】用 sizeof 与 strlen() 函数计算字符串长度的重要区别 。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89857777</link><guid>https://blog.csdn.net/Kp_2000/article/details/89857777</guid><author>Kp_2000</author><pubDate>Sun, 05 May 2019 23:49:08 +0800</pubDate><description><![CDATA[先看例子：
#include&lt;stdio.h&gt;
#define GET_LEN(array, len) len = sizeof(array) / sizeof(array[0])
#include&lt;string.h&gt;

int main(){

    char str[] = "abc";
    char sonStr[] = "abc";
    int lengt...]]></description><category></category></item><item><title><![CDATA[【C】编写函数统计子字符串在另一个字符串中出现的次数(区分大小写)，字符串和子字符串都由键盘输入。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89857524</link><guid>https://blog.csdn.net/Kp_2000/article/details/89857524</guid><author>Kp_2000</author><pubDate>Sun, 05 May 2019 23:23:11 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
#include&lt;string.h&gt;

int judge(char *str, char *sonStr){

    int length_str,length_sonStr;
    char *p,i,j;
    p = str;
    int count = 0;
    length_sonStr = strlen(son...]]></description><category></category></item><item><title><![CDATA[【JAVA】输出所有水仙花数（如果一个3位正整数的各个位数立方和等于这个数本身，称为水仙花数）。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89410258</link><guid>https://blog.csdn.net/Kp_2000/article/details/89410258</guid><author>Kp_2000</author><pubDate>Sat, 20 Apr 2019 00:10:03 +0800</pubDate><description><![CDATA[class Daffodil{
	
	public static void main(String args[]){
		int s = 0;
		int t,c;
		for(int i=100; i&lt;=999; i++){
			c = i;
			for(int j=0; j&lt;3; j++){
				t = c % 10;
				c = c / 10;
				s += t...]]></description><category></category></item><item><title><![CDATA[【JAVA】找出1000以内的所有完数。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89410190</link><guid>https://blog.csdn.net/Kp_2000/article/details/89410190</guid><author>Kp_2000</author><pubDate>Sat, 20 Apr 2019 00:07:34 +0800</pubDate><description><![CDATA[class perfectNum{
	
	
	public static void main(String args[]){
		
		int i,j;
		int s = 0;
		for(i=6; i&lt;=1000; i++){
			for(j=1; j&lt;i; j++){
				if(i % j == 0){
					s += j;
				}	
			}
			if(s ==...]]></description><category></category></item><item><title><![CDATA[【JAVA】用while循环来实现下三角 * 的打印]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89410134</link><guid>https://blog.csdn.net/Kp_2000/article/details/89410134</guid><author>Kp_2000</author><pubDate>Sat, 20 Apr 2019 00:00:33 +0800</pubDate><description><![CDATA[class test{

	public static void main(String args[]){
		
		int i,j;
		i = 1;
		j = 0;
		while(i&lt;10){
			j=0;
			while(j&lt;i){		
				System.out.print("*");
				j++;			
			}
			System.out.println();...]]></description><category></category></item><item><title><![CDATA[【C】杨辉三角]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89367902</link><guid>https://blog.csdn.net/Kp_2000/article/details/89367902</guid><author>Kp_2000</author><pubDate>Thu, 18 Apr 2019 00:04:37 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;

int main(){
	
	int a[10][10],i,j;
	
	for(i=0; i&lt;10; i++){
		for(j=0; j&lt;=i; j++){
			if(j == 0 | i == j){		 //关键算法，寻找规律。
				a[i][j] = 1;
			}else{
				a[i][j] = a[i-1][j...]]></description><category></category></item><item><title><![CDATA[【C】有一个已经排好序的数组，要求输入一个数后，按原来的排序规律将它插入数组中。]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89367605</link><guid>https://blog.csdn.net/Kp_2000/article/details/89367605</guid><author>Kp_2000</author><pubDate>Wed, 17 Apr 2019 23:36:28 +0800</pubDate><description><![CDATA[#include&lt;stdio.h&gt;
int main(){
int x,i;
int a[7] = {1,5,7,11,23,56,99};
//打印数组
for(i = 0; i &lt; 7; i++){
	printf("%d ", a[i]);
}	 
printf("\n请输入一个值，将按原来排序规则插入数组中\n"); 
scanf("%d", &amp;x);

for(...]]></description><category></category></item><item><title><![CDATA[【JAVA】equals函数判断字符串是否相等]]></title><link>https://blog.csdn.net/Kp_2000/article/details/89367046</link><guid>https://blog.csdn.net/Kp_2000/article/details/89367046</guid><author>Kp_2000</author><pubDate>Wed, 17 Apr 2019 22:57:21 +0800</pubDate><description><![CDATA[class test{
public static void main(String args[]){
	
	String str1 = "2019";
	String str2 = "20192";
	String str3 = "20192";
	
	boolean boo1 = str1.equals(str2);
	boolean boo2 = str2.equals(str3);
	
	...]]></description><category></category></item></channel></rss>