![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习
怎么这么胖了
码农也是有尊严的,转载请注明。。。
展开
-
旋转数组的最小数字
旋转数组的最小数字public class Solution { public int MinArray(int[] numbers) { for (int i = 0; i < numbers.Length-1; i++) { for (int j = 0; j < numbers.Length-1-i; j++) { if (num原创 2020-07-24 15:14:58 · 97 阅读 · 0 评论 -
给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有满足条件且不重复的三元组
public class Solution { public IList<IList<int>> ThreeSum(int[] nums) { var res = new List<IList<int>>(); int len = nums.Length; Array.Sort(nums); for (int i = 0; i < len-2; i++)原创 2020-07-24 15:25:17 · 1462 阅读 · 0 评论 -
给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标
给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]public class Solution { public int[] TwoSum(int[] nums, int target) { for (int i = 0; i < nums.Length; i++) { for (原创 2020-07-24 15:20:57 · 334 阅读 · 0 评论 -
给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。
public class Solution { public int Reverse(int x) { try { if (x < 0)//-123 { x = -x;//123 string strX = x.ToString(); StringBuilder sb = n原创 2020-07-24 15:16:51 · 473 阅读 · 0 评论 -
文字识别
class Program{ static void Main(string[] args) { var ApiKey = "MwMm*******bY4jQM43";//百度AI开放平台中应用的API Key var SecretKey = "x1rX1oEyur*******vU22vb133I6lN";//百度AI开放平台中应用的Secre...原创 2019-08-16 09:46:45 · 178 阅读 · 0 评论 -
Aes加解密帮助类
/// <summary> /// 获取Aes32位密钥 /// </summary> /// <param name="key">Aes密钥字符串</param> /// <returns>Aes32位密钥</returns> public static byte[] GetAesK...原创 2019-08-15 09:53:20 · 204 阅读 · 0 评论 -
本地时间转时间戳
/// <summary> /// 本地时间转换成时间戳 /// </summary> /// <param name="localTime"></param> /// <returns></returns> public static long ToUnixTime(DateTime...原创 2019-08-15 08:53:48 · 234 阅读 · 0 评论 -
将long转成DateTime
/// <summary> /// 将long型时间转换为Datetime /// </summary> /// <param name="time"></param> /// <returns></returns> public static DateTime ToDateTime(...原创 2019-08-15 08:52:28 · 3210 阅读 · 0 评论 -
创建随机码
/// <summary> /// 验证码生成的取值范围 /// </summary> private static string[] verifycodeRange = { "3", "4", "5", "6", "7", "8", "9", "a",...原创 2019-08-15 08:49:54 · 139 阅读 · 0 评论 -
VS2017 通过模块文件添加自定义注释
修改类创建模板位置 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ItemTemplates\CSharp\Code\2052\Class修改内容增加自定义代码段修改位置 C:\Users\Administrator\Documents\Visual Studio 2017\Code ...原创 2019-08-14 09:59:24 · 679 阅读 · 0 评论 -
查找相同字母组成的单词,排除相同的单词
//查找相同字母组成的单词,排除相同的单词 string source = "opt,max,tpo,hi,tpo,hide,ih,pot"; string[] array1 = source.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); List<string...原创 2019-08-09 16:49:46 · 1758 阅读 · 0 评论 -
图片灰度处理
public static Bitmap MakeGrayscale3(Bitmap original){#region 原文//创建一个与原始大小相同的空白位图Bitmap newBitmap = new Bitmap(original.Width, original.Height);//从新图像中获取图形对象Graphics g = Graphics.FromImage(newBi...原创 2019-05-21 08:43:15 · 268 阅读 · 0 评论 -
SQL分页存储过程
create procedure Emp_fy(@rows int,@page int,@tabName varchar(20))asdeclare @str varchar(2000)set @str=‘select top ‘+STR(@rows)+’ * from(select ROW_NUMBER() over(order by Emp_Id)as rownum,* fr...原创 2019-03-29 08:14:35 · 180 阅读 · 0 评论