TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http ...
分类:
Web程序 时间:
2018-09-25 14:06:55
阅读次数:
193
使用 Runtime对象的exec()方法可以运行平台上的其它程序,该方法产生一个Process对象,Process对象代表由该Java程序启动的子进程。Process类提供了如下三个方法,用于让程序和其子进程进行通信。 Returns the input stream connected to t ...
分类:
编程语言 时间:
2018-09-24 23:24:15
阅读次数:
262
// Returns maximum sum of a subarray with at-least // k elements. static int maxSumWithK(int a[], int n, int k) { // maxSum[i] is going to store maxim... ...
分类:
其他好文 时间:
2018-09-20 11:07:17
阅读次数:
178
Leetcode: 二叉树的前序遍历 最近在复习数据结构, 感觉很多东西都忘得的差不多了,哪怕是看完书再看视频,还是容易忘,所以干脆想着配合leetcode来刷吧,Python实现起来很简单,但是C语言也不能丢,所以C语言和Python一起吧。 题目: 给定一个二叉树,返回它的前序遍历。 Pytho ...
分类:
其他好文 时间:
2018-09-18 16:11:51
阅读次数:
136
/// /// 调用微吼直播API /// /// /// /// 接口地址 /// Json格式的参数(公共参数+接口参数) /// public string GetLiveList(string appKey,string secrectKey,string url,string paramJ... ...
前言:本文解决的问题 RentrantLock与Synchronized区别 ReentrantLock特征 ReentrantLock类的方法介绍 1.什么是ReentrantLock 1.1ReentrantLock 与Synchronized区别 在面试中询问ReentrantLock与Syn ...
分类:
编程语言 时间:
2018-09-15 20:51:27
阅读次数:
1012
DELIMITER $$ DROP FUNCTION IF EXISTS `value_of_bit_index`$$/*计算数字的某个位的值*/CREATE FUNCTION `value_of_bit_index`(`number` int, `idx` int) RETURNS int(11) ...
分类:
数据库 时间:
2018-09-13 20:02:19
阅读次数:
218
/// <summary> /// 获取Service层的类实例,在没有写配置文件时使用 /// </summary> /// <typeparam name="T">当前传入的类名</typeparam> /// <returns>类实体</returns> public static T Cre ...
题目: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. 我们定义Perfect Number是一个正整数,它 ...
分类:
其他好文 时间:
2018-09-12 21:10:02
阅读次数:
174
/// <summary>/// 字符串简体转繁体/// </summary>/// <param name="strSimple"></param>/// <returns></returns>public static string ToTraditionalChinese(string str ...