This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--sql server like 查询 不区分大小写 | |
select * from [dbo].[Sso_Authtication] | |
where Sa_App_Name like '%System_a%' | |
--sql server like 查询 区分大小写 | |
select * from [dbo].[Sso_Authtication] | |
where Sa_App_Name | |
collate Chinese_PRC_CS_AS_WS like '%System_a%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--如果出错,全回滚整个事务 | |
SET XACT_ABORT off | |
begin tran | |
INSERT INTO [dbo].[SsoLog] (Sl_Login_Time) VALUES (GETDATE()) | |
INSERT INTO [dbo].[SsoLog] (Sl_Login_Time) VALUES (222) | |
INSERT INTO [dbo].[SsoLog] (Sl_Login_Time) VALUES ('key04') | |
commit tran | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#用正则简单过滤html的<>标签 | |
import re | |
str = "<img /><a>srcd</a>hello</br><br/>" | |
str = re.sub(r'</?\w+[^>]*>','',str) | |
print str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Samples | |
{ | |
public static class EnumHelper | |
{ | |
public static string GetDescription(this Enum value) | |
{ | |
if (value == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace FibonacciTest | |
{ | |
public static class FibonacciGenerator | |
{ | |
public static IEnumerable<int> Fibonacci() | |
{ | |
int current = 1, next = 1; | |
while (true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace FibonacciTest | |
{ | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Welcome to Try.dot.net"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class Program | |
{ | |
public static void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace RsaKeyConverter.Converter | |
{ | |
public static class BytesExtensions | |
{ | |
public static string ToBase64(this byte[] bytes) | |
{ | |
return Convert.ToBase64String(bytes); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
中国大陆无法使用git正常下载提交代码到github的解决方案--代理Proxy | |
1。查看当前git设置的代理 | |
git config --global --get-regexp http.* | |
如果无结果返回,说明没有设置。请参考3. | |
如果返回了结果,类似如下所示 | |
http.proxy socks5://127.0.0.1:8087 |
OlderNewer