
C#
deywós
长风破浪会有时,直挂云帆济沧海。
展开
-
如何根据CSV格式的第一列作为key,将后几列作为字符串放入map集合并写入文件的操作
文件格式: a,v1 a,v2 b,v3 a,v4 c,v3 c,v5输出结果: a,v1|v2|v4 b,v3 c,v3|v5代码如下:import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileNot原创 2017-04-08 18:22:59 · 3487 阅读 · 0 评论 -
C# 真彩图转灰度图几种的方法
C# BitmapData使用说明C#专门为图像处理提供了BitmapData,这个是真正的对位图的处理,首先将位图锁定到内存中,然后对位图的每一个像素进行处理。最后再释放位图锁。方法一1:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;usi...转载 2018-05-11 12:00:16 · 3496 阅读 · 0 评论 -
819. Most Common Word(leetcode)
Given a paragraph and 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, and that the answer...原创 2018-04-25 16:24:45 · 802 阅读 · 0 评论 -
C#如何在控制台中嵌如winform窗体
用C#编写一些后台小工具时,我们往往希望既能使用winform界面组件,又能有一个控制台窗口用于显示日志信息,可以用如下方法来实现:创建win32控制台项目,并在工程中引入System.Windows.Forms.dll 2.改写Program.cs文件代码using System;using System.Collections.Generic;using Sy...转载 2018-04-20 17:39:44 · 2367 阅读 · 0 评论 -
87. Scramble String(leetcode)
原题网址:https://leetcode-cn.com/problems/scramble-string/description/Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possib...转载 2018-05-02 16:31:00 · 197 阅读 · 0 评论 -
(剑指offer)输入一个链表,从尾到头打印链表每个节点的值。
反向输出链表import java.util.*;import java.util.ArrayList;import java.util.Collections; class ListNode { public int val; public ListNode next = null; public ListNode(int val) {...原创 2018-03-22 14:31:07 · 285 阅读 · 0 评论 -
如何快速消除快捷方式的小箭头
如图所示: 1、按下键盘的win+R,然后输入 cmd,回车 ;2、然后输入 “ reg delete "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /f & taskkill /f /im explorer.exe & start explorer.exe”,回车;之后: ...原创 2018-03-05 16:56:28 · 331 阅读 · 0 评论 -
how to install python to vs2013
如何在vs2013上安装python1.首先需要安装anaconda2,下载地址 https://www.anaconda.com/download/,找到大大的download,如下图所示: 点击下载python22.安装PTVS 2.2.2 注意:如果你使用的是VS2013,只能使用PTVS2.2.2这个版本,下载地址现在转移到github上面了,网址如下:https://git...原创 2018-03-09 11:11:33 · 225 阅读 · 0 评论 -
5种排序算法的c#代码(1)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 插入排序{ class Program { /// <summary> /// 选择排序原创 2017-07-28 00:46:54 · 344 阅读 · 0 评论 -
使用c#的正则表达式验证中文字符
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;using System.Threading.Tasks;namespace 正则表达01{ /// <summary> /// 表达是原创 2017-07-24 08:58:42 · 3973 阅读 · 0 评论 -
6.ZigZag(leetcode)
原题地址: https://leetcode-cn.com/problems/zigzag-conversion/description/ 将字符串 “PAYPALISHIRING” 以Z字形排列成给定的行数:P A H N A P L S I I G Y I R 之后从左往右,逐行读取字符:”PAHNAPLSIIGYIR”实现一个将字符串进行指定行数变换的函...原创 2018-05-28 14:47:55 · 570 阅读 · 0 评论