自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

wojiushimogui的博客

正在路上的编程学习者

  • 博客(47)
  • 资源 (18)
  • 收藏
  • 关注

原创 《Java中Lock和synchronized的比较和应用》

《Java中Lock和synchronized的比较和应用》尽管synchronized在语法上已经足够简单了,在JDK 5之前只能借助此实现,但是由于是独占锁,性能却不高,因此JDK 5以后就开始借助于JNI来完成更高级的锁实现。JDK 5中的锁是接口java.util.concurrent.locks.Lock。另外java.util.concurrent.locks.ReadWriteLock

2016-07-30 20:07:46 4290 1

原创 《Java中AtomicIntegerFieldUpdater的应用》

《Java中AtomicIntegerFieldUpdater的应用》在J.U.C下的atomic包下有一些用于并发进行原子更新的类。例如:1、AtomicInteger/AtomicLong/AtomicBoolean/AtomicReference是关于对变量的原子更新,2、AtomicIntegerArray/AtomicLongArray/AtomicReferenceArray是关于对数组

2016-07-29 21:47:43 4617

原创 《Java反射的应用》

《Java反射的应用》最近在研究Java并发相关的类库,看到了AtomicIntegerFieldUpdater,这个类就是利用反射来完成原子更新字段的值。由于自己对反射相关的操作都忘记了,今天刚好借此机会就看了下API文档温习了一下。也写了一个小例子。例子中基本上涵盖了我们利用反射来获取类的属性、方法、构造函数等应用。例子完成的功能:首先有一个Student类,然后我们利用反射机制获取类相关的属性

2016-07-29 21:40:08 900

原创 《Java多线程之CAS》

《Java多线程之CAS》我们都知道线程安全的实现有两种方法:1、互斥同步2、非阻塞同步一般,互斥同步在编程上采用synchronized关键字来进行同步。但是由于互斥同步在多线程并发的情况下存在线程阻塞、唤醒以及用户态和内核态之间的切换所引起的性能问题。从处理方式上来说,互斥同步属于一种悲观的并发策略,总是认为只要不去做正确的同步措施(例如:加锁),那就肯定会出现问题,无论共享数据是否真的会出现竞

2016-07-28 11:10:36 2029

原创 《Java困惑》:多并发情况下HashMap是否还会产生死循环

《Java困惑》:多并发情况下HashMap是否还会产生死循环今天本来想看下了ConcurrentHashMap的源码,ConcurrentHashMap是Java 5中支持高并发、高吞吐量的线程安全HashMap实现,在看很多博客在介绍ConcurrentHashMap之前,都说HashMap适用于单线程访问,这是因为HashMap的所有方法都没有进行锁同步,当多线程访问的时候容易找出死循环。虽然

2016-07-27 20:52:23 5691 2

原创 Eclipse调试进入JDK源码

Eclipse调试进入JDK源码都说HashMap在多线程并发情况下容易导致死循环,今天在eclipse中写一个多线程并发的demo,准备跟踪下HashMap的源码,具体来看下造成死循环的全过程。于是就遇到了这个问题:在Eclipse中不能跟踪JDK源码。这是因为还需要配置才可以。参考了网上这篇博文:http://blog.csdn.net/xuefeng0707/article/details/8

2016-07-27 16:37:41 2091 2

原创 Java中synchronized关键字的使用

Java中synchronized关键字的使用对于关键字synchronized,研究起来,发现还是有许多让自己模糊的地方,网上也有很多篇博客对synchronized关键字的使用讲解的相当好,自己也受益匪浅。自己之所以还写一篇博客来介绍synchronized的目的只有一个:加深自己对synchronized的理解。写博客有时候确实是一个好的东西,往往研究某个知识点的时候,自己觉得弄懂了,但是过几

2016-07-26 21:54:59 990 4

原创 《Java源码分析》:ReferenceQueue、Reference及其子类

《Java源码分析》:ReferenceQueue、Reference及其子类在看完WeakHashMap源码之后,看了有关于讲解WeakHashMap的些许博客,发现了几个比较有意思的类:Reference、Reference子类(SoftReference、WeakReference、PhantomReference)以及ReferenceQueue。以前自己只是知道这些类的存在,在看WeakH

2016-07-26 14:57:53 4861 5

原创 WeakHashMap和HashMap的区别

WeakHashMap和HashMap的区别前面对HashMap的源码和WeakHashMap的源码分别进行了分析。在WeakHashMap源码分析博文中有对与HashMap区别的比较,但是不够具体系统。加上本人看了一些相关的博文,发现了一些好的例子来说明这两者的区别,因此,就有了这篇博文。WeakHashMap和HashMap一样,WeakHashMap也是一个散列表,它存储的内容也是键值对(ke

2016-07-26 14:52:12 6669 2

原创 《Java源码分析》:WeakHashMap

《Java源码分析》:WeakHashMap这篇博文就来看下WeakHashMap这个类的源码。博文的思路也是从继承结构、构造方法、常见的方法这些方面来分析WeakHashMap这个类的源码。说明:WeakHashMap也是一个“数组和链表”的结合体1、WeakHashMap的继承结构 public class WeakHashMap<K,V> extends Abstract

2016-07-26 11:24:11 1046

原创 《Java源码分析》:LinkedHashSet

《Java源码分析》:LinkedHashSet上篇博文对HashSet的源码进行了分析,这篇博文就是对LinkedHashSet进行一个分析。HashSet是借助于HashMap来进行实现的,而LinkedHashSet是基于LinkedHashMap进行实现的。1、LinkedHashSet的继承体系LinkedHashSet是继承HashSet类,并实现了Set接口。因此具有HashSet类的

2016-07-22 21:39:14 574 1

原创 《leetcode》:Additive Number

题目Additive number is a string whose digits can form additive sequence.A valid additive sequence should contain at least three numbers. Except for the first two numbers, each subsequent number in the se

2016-07-22 19:36:37 518

原创 《Java源码分析》:HashSet

《Java源码分析》:HashSet前面几篇把Map、List相关的的几个类看了下,当然Set接口相关的类也相当的重要,我们也用的比较多,因此,我们也需要了解下Set接口的两个实现类HashSet、TreeSet的源码。这篇博文是记录HashSet的源码分析。下篇博文就来记录TreeSet的源码分析。如果想了解其他的源码分析,可点击下面相对应的连接哈。HashMap类的源码分析在这里:http://

2016-07-22 16:20:11 1043

原创 《Java源码分析》:Stack

《Java源码分析》:StackHashMap类的源码分析,博客在这里:http://blog.csdn.net/u010412719/article/details/51980632Hashtable类的源码分析,博客在这里:http://blog.csdn.net/u010412719/article/details/51972602LinkedHashMap类的源码分析,博客在这里:http:

2016-07-22 15:14:06 701

原创 《Java源码分析》:Vector

《Java源码分析》:Vector虽然,Vector集合在我们的编程中,使用的比较少,至少我使用的比较少,一般情况下,我都是倾向于使用List来存储一些同类型的元素。其实,Vector的内部实现和ArrayList的内部实现基本一致,内部都是借助于数组来实现的。下面就一起来分析下。HashMap类的源码分析,博客在这里:http://blog.csdn.net/u010412719/article/

2016-07-22 11:02:41 2218

原创 《Java源码分析》:LinkedHashMap

《Java源码分析》:LinkedHashMap最近也即将要参加校招,因此,就准备花几天的时间专门来将我们用的比较多的集合类的源码都看下,并以写博客的形式来记录相关思路。便于以后复习。前面刚看了下HashMap类的源码,博客在这里:http://blog.csdn.net/u010412719/article/details/51980632Hashtable类的源码分析,博客在这里:http://

2016-07-21 16:51:58 2015

原创 《Java源码分析》:HashMap

《Java源码分析》:HashMap看过很多次HashMap的源码了,但是,每次都没有做记录,因此,每次记忆都不太深,今天在看别人博客时提到Hashtable是线程安全的,Hashtable中的方法都用了synchronized进行了同步,于是就看了下Hashtable的源码,在看的过程中,写了篇博客,现在2016年7月20日22:03:53,还在教研室,感觉回寝室还早,因此,决定再看下HashMa

2016-07-21 10:59:03 6391 4

原创 《Java源码分析》:Hashtable

《Java源码分析》:HashtableHashtable类的实现也是基于“数组和链表”来实现的。Hashtable的继承关系为: public class Hashtable<K,V> extends Dictionary<K,V> implements Map<K,V>, Cloneable, java.io.Serializable 继承的是Diction

2016-07-20 21:53:55 1494

原创 《leetcode》: LRU Cache

题目Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if the

2016-07-20 17:23:50 554

原创 《leetcode》:Serialize and Deserialize Binary Tree

题目Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to b

2016-07-19 20:08:28 536

原创 《leetcode》:Find Median from Data Stream

题目Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.Examples: [2,3,4] , the median is

2016-07-19 18:41:13 455

原创 《leetcode》:Perfect Squares

题目Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n = 13, retu

2016-07-18 20:09:38 569

原创 《leetcode》:Expression Add Operators

题目Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Ex

2016-07-18 20:08:52 458

原创 《leetcode》:First Bad Version

题目You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on th

2016-07-18 20:07:46 324

原创 《leetcode》:Move Zeroes

题目Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling your fun

2016-07-18 20:07:17 359

原创 《leetCode》:HIndex II

题目Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?Hint:Expected runtime complexity is in O(log n) and the input is sorted.思路由于数组是已经排序的

2016-07-18 10:51:30 372

原创 《leetcode》:H-Index

题目Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher’s h-index.According to the definition of h-index on Wikipedia: “A sci

2016-07-17 22:17:47 538

原创 《leetCode》:Sliding Window Maximum

题目Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window

2016-07-17 20:40:23 517

原创 《leetCode》: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.For example

2016-07-16 22:27:22 509

原创 《leetCode》:Longest Palindromic Substring

题目Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.思路一:暴力搜索法暴力搜索法:利用两层for循环来

2016-07-16 21:12:15 405

原创 《leetCode》:Different Ways to Add Parentheses

题目Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Example 1Inp

2016-07-16 20:17:47 427

原创 《leetCode》:Product of Array Except Self

题目Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O(n).Fo

2016-07-16 16:54:36 337

原创 《leetCode》:Valid Anagram

题目Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may assume the st

2016-07-16 16:44:40 347

原创 《leetCode》:Lowest Common Ancestor of a Binary Tree

题目Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes v

2016-07-16 15:41:53 376

原创 《leetCode》:Lowest Common Ancestor of a Binary Search Tree

题目Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between t

2016-07-16 14:46:34 332

原创 《leetCode》:Summary Ranges

题目Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return [“0->2”,”4->5”,”7”].思路假设连续数的起点start=nums[0],遍历一次数组,判断nums[i-1]是否与nums[i]相等来找

2016-07-14 22:39:11 409

原创 《leetCode》:Contains Duplicate III

题目Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j i

2016-07-10 22:02:34 548

原创 《leetCode》:Binary Tree Paths

题目Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]思路利用递归即可解决。求当前节点的左子树和右子树的路径,然后

2016-07-10 21:23:51 290

原创 Integer对象和 ==、equals分析

《Java》:Integer对象和 ==、equals分析今天看到Integer的一个小知识点,比较有意思。我们都知道 Integer i = 3;等价于Integer i = Integer.valueOf(3);问题:下面这段代码应该输出什么呢? Integer i =3; Integer j =3; System.out.println(i==j);答案是:

2016-07-08 20:44:24 1046

原创 《leetCode》:Add and Search Word - Data structure design

题目Design a data structure that supports the following two operations:void addWord(word) bool search(word) search(word) can search a literal word or a regular expression string containing only letters

2016-07-08 14:45:20 406

系统仿真学报排版格式

系统仿真学报排版格式

2017-05-08

google三大论文中文版

google三大论文中文版,欢迎下载

2016-12-01

分布式Java应用基础与实践

分布式Java应用基础与实践的pdf版,这本书只有淘宝有盗版,这里提供电子档

2016-11-20

guava-18.0.jar

guava-18.0.jar

2016-10-23

坦克大战的某一个版本

这是本人写坦克大战时完成过程中的一个版本,这个版本完成到了可以随机产生多个敌方坦克了

2016-06-22

坦克大战(发射多颗子弹的版本)

这是本人在写坦克大战中实现了坦克可以发送多颗子弹的版本,如果你需要,可以下载。

2016-06-21

python图像处理库PIL

python图像处理库PIL,可能有的人需要

2015-12-17

python识别验证码的库pytesser

可能有的人需要,特此提供,用法说明:直接将其解压缩后将将文件夹放在你即将要运行的程序相同的目录下。

2015-12-17

Java并发编程实战

Java并发编程实战完整版 高清噢 带标签噢 欢迎下载

2015-10-25

matlab2012b与vs2010交叉调用时的编译环境设置

matlab2012b与vs2010交叉调用时的编译环境设置,是别人的一篇论文,感觉可能有人需要,特上传供大家下载使用

2015-08-25

电子科技大学研究生算法课的作业的答案

这是电子科技大学研究生算法课程的几次作业的答案,供大家下载参考

2015-05-15

Java设计模式详解总结和例子

这是java设计模式的23中的详解,供大家下载学习

2015-05-15

DSP学习的一些例子程序

这是与我的关于DSP的课程资料相对应的一些例子程序,可以便于我们对其进行进一步的学习

2015-05-15

Qt入门教程

这是关于Qt开发从0开始的一些讲义,由浅入深

2015-05-15

读取心电图txt格式文件数据并且显示的app

这个一个读取心电图数据的app,大家可以在手机的存储txt文件的数据,并修改代码中的文件地址,即可运行app看到心电图就在我们的手机上面刷新显示出来了

2015-05-15

MIT-BIH的心电图数据将V5导联的数据提取出来的txt的数据文件

最近在做一个关于心电图处理的App,需要MIT-BIH一个导联的并且以分号“;”将数据分开的的全部数据,因此也就写了一个小程序将原有的按时间和幅度存放的txt文件变成了我所需要的,现在上传上来供大家下载

2015-05-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除