自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(165)
  • 资源 (1)
  • 收藏
  • 关注

原创 JAVA EE开发环境准备

Java EE开发环境开发环境IDEAMySQLNavicatPostman其它notepad++EverythingGithub占空,想到再补充这是一个系列博客,从这篇开始,我将和大家一起学习和探讨Java EE开发。开发环境所谓工欲善其事,必先利其器,在正式进入学习之前,我们首先要把开发环境准备妥当,所以在这里我给大家准备好了我们接下来学习需要用到的开发工具,简单介绍一下。IDEA作为一名Java程序猿,想必大家对IDEA都不陌生吧,它作为JetBrain的拳头产品,已经在事实上替代了Ecl

2022-02-21 00:00:16 8708

转载 eletron安装卡在 node install.js

eletron安装卡在 node install.js$ node install.js这句命令的install.js是electron这个包里的,里面的下载是依赖于electron-download这个模块。在github上面,electron-download这个包里有如下标注:You can set the ELECTRON_MIRROR or NPM_CONFIG_ELECTRON...

2019-06-08 16:48:00 5905 1

原创 itchat4j -- 用Java扩展个人微信号的能力

itchat4j – 用Java扩展个人微信号的能力项目地址:itchat4j,该项目长期维护更新,欢迎star、fork、 pull requests、 issue。来源itchat是一个非常优秀的开源微信个人号接口,使用Python语言开发,提供了简单易用的API,可以很方便地对个人微信号进行扩展,实现自动回复,微信挂机机器人等,一直在关注这个项目,基于itchat开发过一个小项目,用来控制我的

2017-05-14 22:13:10 5758 3

原创 itchat4j -- 用Java扩展个人微信号的能力

itchat4j – 用Java扩展个人微信号的能力项目地址:itchat4j,该项目长期维护更新,欢迎star、fork、 pull requests、 issue。来源itchat是一个非常优秀的开源微信个人号接口,使用Python语言开发,提供了简单易用的API,可以很方便地对个人微信号进行扩展,实现自动回复,微信挂机机器人等,一直在关注这个项目,基于itchat开发过一个小项目,用来控制我的

2017-05-14 22:08:08 4220 1

原创 itchat4j -- 用Java扩展个人微信号的能力

### 项目地址:itchat4j,该项目长期维护更新,欢迎star、fork、 pull requests、 issue。来源itchat是一个非常优秀的开源微信个人号接口,使用Python语言开发,提供了简单易用的API,可以很方便地对个人微信号进行扩展,实现自动回复,微信挂机机器人等,一直在关注这个项目,基于itchat开发过一个小项目,用来控制我的树莓派来播放音乐,效果还不错。一直想实现一个

2017-04-30 02:02:29 14354 20

原创 树莓派网易云音乐播放器

来源之前毕业的时候实在闲的无聊,正好手头上有个树莓派,就写了个简单的网易云音乐播放器,代码很简单,写的也很乱,功能更简单–只能搜索歌曲,然后播放之,放在了github上,没想到竟然收到三十多颗星,实在惭愧,然后放年假,就想着把功能稍微完善一下,于是就有了WxNeteaseMusic,其实做的工作也不多,基于itchat和网易云音乐的python API,废话不多说,容我简单介绍一下吧。安装项目源码都

2017-02-19 15:38:21 27854 8

原创 那些年遇到的那些坑

配环境、写代码的时候经常遇到各种各样的坑,在这里记录一下,以免以后犯同样的错误。Github: 1.Github .gitignore文件必须以utf-8编码格式,否则无效

2016-10-17 00:02:38 499

原创 Hello Iphthon Notebook

Just write here.win10 + django1.10 + mysql python manage.py migrate 报错 no module named mysqldb解决方案: pip install mysqlclient

2016-10-10 23:53:12 675

原创 LintCode:背包问题

LintCode:背包问题动态规划,同样的算法,Python超时,JAVA通过,真是搞不明白,难道Python的效率真的如此之低吗。。。Pythonclass Solution: # @param m: An integer m denotes the size of a backpack # @param A: Given n items with size A[i] #

2016-09-17 00:31:53 829

原创 LintCode: 房屋染色 II

LintCode: 房屋染色 II先用朴素的动态规划,状态转移方程 ans[i][j] = min(ans[i-1][j]+cost[i][k], ans[i][j]) 89%时提示超时。class Solution: # @param {int[][]} costs n x k cost matrix # @return {int} an integer, the minimu

2016-09-15 00:44:52 1101 1

原创 LintCode:最长连续序列

LintCode:最长连续序列题目要求O(n)复杂度,我这个算法虽然通过了,但是排序操作至少就是O(nlgn)的复杂度了,额,还得再想想。class Solution: """ @param num, a list of integer @return an integer """ def longestConsecutive(self, num):

2016-09-14 00:27:41 543

原创 LintCode:最接近的三数之和

LintCode:最接近的三数之和class Solution: """ @param numbers: Give an array numbers of n integer @param target : An integer @return : return the sum of the three integers, the sum closest target

2016-09-14 00:08:41 616

原创 LintCode:买卖股票的最佳时机 III

LintCode:买卖股票的最佳时机 III直接暴力拆分成一前一后两个数组,分别求解,可惜超时,暂时还没想到更好的解法,容我再想想。class Solution: """ @param prices: Given an integer array @return: Maximum profit """ def maxProfit(self, prices):

2016-09-12 23:55:59 922

原创 LintCode:排列序号

LintCode:排列序号参考一个很巧妙的想法,源地址在这里class Solution: # @param {int[]} A an integer array # @return {long} a long integer def permutationIndex(self, A): # Write your code here n = l

2016-09-11 12:57:58 385

原创 LintCode: 连续子数组求和

LintCode: 连续子数组求和需要考虑很多种情况,也是看了数据才知道逻辑哪里不对,感觉自己考虑问题很不全面。import copyclass Solution: # @param {int[]} A an integer array # @return {int[]} A list of integers includes the index of the #

2016-09-11 00:44:16 524

原创 LintCode: 最小子数组

LintCode: 最小子数组class Solution: """ @param nums: a list of integers @return: A integer denote the sum of minimum subarray """ def minSubArray(self, nums): # write your code h

2016-09-08 00:28:38 441

原创 LintCode:删除二叉查找树的节点

LintCode:删除二叉查找树的节点"""Definition of TreeNode:class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None"""class Solution: """ @param root

2016-09-08 00:07:38 615

原创 LintCode:不同的二叉查找树

LintCode:不同的二叉查找树思路见这篇博客class Solution: # @paramn n: An integer # @return: An integer def numTrees(self, n): # write your code here dp = [1 for i in range(n+1)] for

2016-09-07 00:29:32 328

原创 LintCode:完美平方

LintCode:完美平方public class Solution { /** * @param n a positive integer * @return an integer */ public int numSquares(int n) { // Write your code here int[] dp = n

2016-09-06 00:21:55 912 1

原创 LintCode:重排链表

LintCode:重排链表思路比较简单,就是先把链表分成两段,然后把后半段反转,然后依次插入前半段的链表中。import copy"""Definition of ListNodeclass ListNode(object): def __init__(self, val, next=None): self.val = val self.next = ne

2016-09-04 22:54:43 563

原创 LintCode: 和大于S的最小子数组

LintCode: 和大于S的最小子数组一前一后两根指针,当当前数组的和大于s时,移动前面的指针直到和小于s为止,比较当前数组长度与ans的大小。class Solution: # @param nums: a list of integers # @param s: an integer # @return: an integer representing the m

2016-09-04 20:01:58 750 1

原创 LintCode:数字组合

LintCode:数字组合回溯算法,注意在最后要清除上一次的状态。import copyclass Solution: # @param candidates, a list of integers # @param target, integer # @return a list of lists of integers def combinationSum(se

2016-09-03 16:47:17 324

原创 LintCode:搜索二维矩阵 II

LintCode:搜索二维矩阵 IIclass Solution: """ @param matrix: An list of lists of integers @param target: An integer you want to search in matrix @return: An integer indicates the total occurren

2016-09-03 00:35:28 270

原创 LintCode:滑动窗口的最大值

LintCode:滑动窗口的最大值class Solution: """ @param nums: A list of integers. @return: The maximum number inside the window at each moving. """ def maxSlidingWindow(self, nums, k):

2016-09-02 00:34:24 291

原创 LintCode:最近公共祖先

LintCode:最近公共祖先"""Definition of TreeNode:class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None"""import copyclass Solution: """ @pa

2016-09-01 00:21:06 568

原创 LintCode:克隆二叉树

LintCode:克隆二叉树"""Definition of TreeNode:class TreeNode: def __init__(self, val): this.val = val this.left, this.right = None, None"""class Solution: """ @param {TreeNode

2016-08-30 23:59:57 1100

原创 LintCode:平面列表

LintCode:平面列表递归方式class Solution(object): # @param nestedList a list, each element in the list # can be a list or integer, for example [1,2,[1,2]] # @return {int[]} a list of integer def

2016-08-30 23:33:39 933

原创 LintCode: 电话号码的字母组合

LintCode: 电话号码的字母组合class Solution: # @param {string} digits A digital string # @return {string[]} all posible letter combinations def letterCombinations(self, digits): # Write your

2016-08-24 00:33:51 892

原创 LintCode: 数字组合 II

LintCode: 数字组合 IIimport copyclass Solution: """ @param candidates: Given the candidate numbers @param target: Given the target number @return: All the combinations that sum to targ

2016-08-23 00:53:56 386

原创 LintCode:子集

LintCode:子集递归回溯import copyclass Solution: """ @param S: The set of numbers. @return: A list of lists. See example. """ def subsets(self, S): # write your code here

2016-08-22 23:43:11 432

原创 LintCode:摆动排序 II

LintCode:摆动排序 II对原数组排序,得到排序后的辅助数组tmp对原数组的偶数位下标填充tmp的末尾元素对原数组的奇数位下标填充tmp的末尾元素算法复杂度是快速排序的复杂度O(NlogN)。class Solution(object): """ @param {int[]} nums a list of integer @return nothing, modify

2016-08-22 00:39:42 886

原创 LintCode:组合

LintCode:组合回溯算法,注意python的话要用到一个深拷贝。import copyclass Solution: """ @param n: Given the range of numbers @param k: Given the numbers of combinations @return: All the combinations of

2016-08-21 18:22:29 459

原创 LintCode:判断数独是否合法

LintCode:判断数独是否合法数独合法并不一定有解,只需要依次判断每行、每列、每个九宫格是否存在重复数字即可。class Solution: # @param board, a 9x9 2D array # @return a boolean def isValidSudoku(self, board): for i in range(9):

2016-08-21 00:46:21 1091

原创 LintCode:最小差

LintCode:最小差class Solution: # @param A, B: Two lists of integer # @return: An integer def smallestDifference(self, A, B): # write your code here B = sorted(B) len_b

2016-08-20 23:58:53 516

原创 Python: Socket编程之多线程聊天室

额,好吧,这标题有点大了,就是一个Socket,两个线程,一个是服务器,一个是客户端。 最近公司培训,要写个大富翁的小程序,准备做个服务器版的,先练练手。#coding = utf-8import socketimport threadingclass UdpServer(threading.Thread): def __init__(self): threading.T

2016-08-20 13:01:50 3734

原创 LintCode:加油站

LintCode:加油站贪心算法class Solution: # @param gas, a list of integers # @param cost, a list of integers # @return an integer def canCompleteCircuit(self, gas, cost): # write your cod

2016-08-19 00:20:21 354

原创 Java:JDBC连接数据库

package tk.bigfeng.www;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;import java.sql.*;import com.mysql.jdbc.PreparedStatement;public class SqlDemo { sta

2016-08-15 23:35:03 264

原创 LintCode:统计比给定整数小的数的个数

LintCode:统计比给定整数小的数的个数尝试用线段树,超时。public class Solution { /** * @param A: An integer array * @return: The number of element in the array that * are smaller that the given inte

2016-08-14 01:04:59 675

原创 LintCode:区间求和 II

LintCode:区间求和 II class SegmentTreeNode { public int start, end; long max; public SegmentTreeNode left, right; public SegmentTreeNode(int start, int end, long max) { t

2016-08-13 17:44:35 528

原创 LintCode:复制带随机指针的链表

LintCode:复制带随机指针的链表尝试先顺序拷贝原来的链表,不加随机指针,然后再遍历一次,加上随机指针,超时。。。# Definition for singly-linked list with a random pointer.# class RandomListNode:# def __init__(self, x):# self.label = x#

2016-08-13 00:36:01 669

易语言编程助手V3.1

易语言编程助手V3.1版,18年3月20号发布,非常好用,学习易语言必备。

2018-03-21

空空如也

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

TA关注的人

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