<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[JHandYY的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/JHandYY</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; JHandYY]]></copyright><item><title><![CDATA[java中的各种锁详细介绍]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/109817576</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/109817576</guid><author>JHandYY</author><pubDate>Thu, 19 Nov 2020 17:01:56 +0800</pubDate><description><![CDATA[java中的各种锁详细介绍

        
            
            

    转自：https://blog.youkuaiyun.com/axiaoboge/article/details/84335452

Java提供了种类丰富的锁，每种锁因其特性的不同，在适当的场景下能够展现出非常高的效率。本文旨在对锁相关源码（本文中的源码来自JDK 8）、使用场景进行举例，为读者介绍主流锁的知识点，以及不同的锁的适用场景。
Java中往往...]]></description><category></category></item><item><title><![CDATA[读取URL链接下载文件到本地]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/103510464</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/103510464</guid><author>JHandYY</author><pubDate>Thu, 12 Dec 2019 15:51:47 +0800</pubDate><description><![CDATA[代码较为简单，那就直接上代码了：


public static void download(String urlString, String imgName) throws Exception {
    // 构造URL
    URL url = new URL(urlString);
    // 打开连接
    URLConnection con = url.openConnectio...]]></description><category></category></item><item><title><![CDATA[GET请求和POST请求带json参数]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/102754404</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/102754404</guid><author>JHandYY</author><pubDate>Sat, 26 Oct 2019 11:15:08 +0800</pubDate><description><![CDATA[此代码也是平时自己工作需要时从网上找到并修改成自己所需要的，希望能帮到更多的人。

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;

public class CallUrl {
    /**
...]]></description><category></category></item><item><title><![CDATA[WebService的作用和用法]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/77842344</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/77842344</guid><author>JHandYY</author><pubDate>Mon, 04 Sep 2017 21:54:41 +0800</pubDate><description><![CDATA[一、WebService的简介
Web Service（WEB服务）能够快捷和方便地综合并结合各种系统、商务和任何应用平台。
新出现的 Web Services 标准：
SOAP、WSDL 和 UDDI 能够使任何系统和系统之间的应用
变为更加方便和廉价。


















Web Service（WEB服务）能够快捷和方便地综合并结]]></description><category></category></item><item><title><![CDATA[Hibernate5_05查询]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/77524644</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/77524644</guid><author>JHandYY</author><pubDate>Thu, 24 Aug 2017 10:11:35 +0800</pubDate><description><![CDATA[HQL： session.createQuery(" ")


1、口诀：见表写对象，见列写属性
2、基本查询
 查询表中所有的数据
 查询某一列：返回值为：List
 带条件查询
直接设值
session.createQuery("
select  * from tbName where cid=1").list();
命名参数
session.createQuery(s]]></description><category></category></item><item><title><![CDATA[Hibernate里如何增删查改？]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/77461521</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/77461521</guid><author>JHandYY</author><pubDate>Mon, 21 Aug 2017 22:52:54 +0800</pubDate><description><![CDATA[第一个我们首先看看增，增在SQL里面就是insert，也就是插入，在hibernate中，我们只需要，操纵一个对象进行sava，然后再commit事务，就能实现插入功能，下面给大家具体看看代码，持久类我就不再写了，里面也就是与数据库中的字段要一一对应的东西，要有set,get方法，我直接就写的怎么调用save方法。

//导入所需的包 
import org.hibernate.Hibern]]></description><category></category></item><item><title><![CDATA[Maven的下载和环境配置]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/77431724</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/77431724</guid><author>JHandYY</author><pubDate>Sun, 20 Aug 2017 19:45:30 +0800</pubDate><description><![CDATA[今天我写的是Maven的下载和环境配置

首先，我们先在任意一个浏览器内搜索阿帕奇官网www.apache.org。





往下滑，再找到Maven。

  


点进去后，web端的选择 .zip格式的，Linux的下载 .gz格式的。






下载好后点击进去是这样的一些文件。



  
点进bin之后复制其路径]]></description><category></category></item><item><title><![CDATA[SQL Servler、Oralce、My sql等数据库的分页]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/77248896</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/77248896</guid><author>JHandYY</author><pubDate>Wed, 16 Aug 2017 15:53:53 +0800</pubDate><description><![CDATA[SQL Server SQL语句查询分页数据的解决方案:


要求选取 tbllendlist 中 第3000页的记录，每一页100条记录
方法1：



[sql] view
 plain copy






select top 100 * from tbllendlist   
where fldserialNo not in  
(  
select]]></description><category></category></item><item><title><![CDATA[Android （向服务器提交数据Get-Post）]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/76222150</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/76222150</guid><author>JHandYY</author><pubDate>Thu, 27 Jul 2017 21:49:23 +0800</pubDate><description><![CDATA[这次的内容非常的重要，属于网络编程，向服务器提交数据
主要讲到两种方式Get 和 Poset
Get:
Web端的代码：
	
			登录
			用户名：
			密码：
			
	


Android端代码：]]></description><category></category></item><item><title><![CDATA[ParseXML 和 parseJson]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/76165480</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/76165480</guid><author>JHandYY</author><pubDate>Wed, 26 Jul 2017 20:58:38 +0800</pubDate><description><![CDATA[1.解析网络数据：在tomcat的root下，分别写xml文件，json文件。注意编码格式，改为UTF-8；





[html] view
 plain copy


 print?



xml version="1.0" encoding="UTF-8"?>  
student>  
    stu sid="1">  
        sname>1sn]]></description><category></category></item><item><title><![CDATA[Android (闹钟和通知栏的设置)]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75738668</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75738668</guid><author>JHandYY</author><pubDate>Sat, 22 Jul 2017 16:00:13 +0800</pubDate><description><![CDATA[在界面上得有三个按钮，一个为 设置闹钟的开始时间 setAlarmWeek，一个为取消闹钟的按钮 cancelAlarmWeek， 一个发送通知的按钮 sendNotification。



<LinearLayout 

xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width=]]></description><category></category></item><item><title><![CDATA[Android (拍照功能)]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75670571</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75670571</guid><author>JHandYY</author><pubDate>Fri, 21 Jul 2017 19:46:50 +0800</pubDate><description><![CDATA[拍照功能和视频播放用到了一个共同的控件SurfaceView


这一次我们要在XML中配置的东西稍微有点多
    
    
    
    
然后是布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" andr]]></description><category></category></item><item><title><![CDATA[Android  （视频播放器）]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75670471</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75670471</guid><author>JHandYY</author><pubDate>Fri, 21 Jul 2017 19:40:22 +0800</pubDate><description><![CDATA[Android 里的视频播放一般分为两种


1. 使用SurfaceView+MediaPlayer播放视频
因为我们是播放手机内存卡内的视频，所以我们得先在XML中配置

接下来是写好布局文件

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layo]]></description><category></category></item><item><title><![CDATA[Android 多媒体(读取网络中的音乐文件)]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75577420</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75577420</guid><author>JHandYY</author><pubDate>Thu, 20 Jul 2017 20:29:03 +0800</pubDate><description><![CDATA[既然我们是要播放网络音乐，那就要先检测网络环境搭建好了没有。

步骤是：

1、找到Tomcat的位置中bin目录中的startup.bat，之后在网址上输入地址：localhost:7788，（我的是7788，官方默认是8080，出现网页不对的可以试一下8080）



2、找到Tomcat的位置中的webapps-》ROOT，在ROOT中放入音频
3、打开cmd，打出ipco]]></description><category></category></item><item><title><![CDATA[Adroid 多媒体（读取手机内存卡内的音乐文件）]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75577389</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75577389</guid><author>JHandYY</author><pubDate>Thu, 20 Jul 2017 20:27:40 +0800</pubDate><description><![CDATA[现在给大家实现的是利用手机内存卡里的音频文件去播放的，至于xml布局文件大家可以去看我上一篇博客的，因为这两篇博客是相关联的。现在就开始吧！

xml配置文件权限：（一定要加上）





[html] view
 plain copy






uses-permission android:name="android.permission.READ_EXTER]]></description><category></category></item><item><title><![CDATA[Android 多媒体（播放应用内的音乐）]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75577325</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75577325</guid><author>JHandYY</author><pubDate>Thu, 20 Jul 2017 20:24:32 +0800</pubDate><description><![CDATA[音乐播放器实现一是放在应用程序里面的，在后面的博客我会说到在手机内存和网络中的播放器，所以，有需要的话，可以去看看我后面的那些博客！由于思路比较清晰，代码量也不是很多而且挺简单的，所以在这里我就直接放代码了。

xml布局文件：






[html] view
 plain copy






xml version="1.0" encoding="utf-]]></description><category></category></item><item><title><![CDATA[Android ContentResolver 获取手机联系人]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75434715</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75434715</guid><author>JHandYY</author><pubDate>Wed, 19 Jul 2017 18:41:28 +0800</pubDate><description><![CDATA[这次教大家的是如何从获取到自己手机里的联系人
东西比较简单，我们就通过一个dome来学习一下吧
首先，我们在XML中先写一个按钮，并给它设置点击事件：

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/a]]></description><category></category></item><item><title><![CDATA[ContentProvider和ContentResolver]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75287106</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75287106</guid><author>JHandYY</author><pubDate>Tue, 18 Jul 2017 11:38:01 +0800</pubDate><description><![CDATA[今天我们主要讲的是 ContentProvider  内容提供者，ContentResolver 内容访问者
一般先由内容提供者提供内容，然后内容访问者去获取内容。


 
        <provider
            android:authorities="com.zking.administrator.g160618_android16_sqlite.LOGIN"]]></description><category></category></item><item><title><![CDATA[Android  Broadcas 广播]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/75086334</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/75086334</guid><author>JHandYY</author><pubDate>Thu, 13 Jul 2017 18:24:27 +0800</pubDate><description><![CDATA[一、广播简介
1. Android四大组件之一
2. 一种全局的监听器，用于监听系统全局的广播消息
3. 系统大部分消息都以广播的形式发布，比如开机启动完成的消息，收到短信的消息，打进打出电话的消息。
ex：
Android系统每次启动完成会向外广播一条信息，告诉所有人启动完成了，只有继承自Broadcast 的类能捕捉到这些系统信息，捕捉到信息该干嘛就干嘛


二、广播实现（自定]]></description><category></category></item><item><title><![CDATA[系统广播大全]]></title><link>https://blog.youkuaiyun.com/JHandYY/article/details/74985414</link><guid>https://blog.youkuaiyun.com/JHandYY/article/details/74985414</guid><author>JHandYY</author><pubDate>Tue, 11 Jul 2017 16:43:50 +0800</pubDate><description><![CDATA[正文








Intent.ACTION_AIRPLANE_MODE_CHANGED;

//关闭或打开飞行模式时的广播






Intent.ACTION_BATTERY_CHANGED;

//充电状态，或者电池的电量发生变化

//电池的充电状态、电荷级别改变，不能通过组建声明接收这个广播，只有通过Context.registerRec]]></description><category></category></item></channel></rss>