Skip to content

Instantly share code, notes, and snippets.

View j717273419's full-sized avatar

Jackdon Wang j717273419

View GitHub Profile
@j717273419
j717273419 / sql
Created April 11, 2017 07:10
sql server 查询 区分大小写 Case-Sensitive
--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%'
@j717273419
j717273419 / sql
Created April 11, 2017 09:14
sql server 事务示例
--如果出错,全回滚整个事务
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
@j717273419
j717273419 / re.py
Created April 16, 2017 15:29 — forked from dervn/re.py
Python中过滤HTML标签的函数
#用正则简单过滤html的<>标签
import re
str = "<img /><a>srcd</a>hello</br><br/>"
str = re.sub(r'</?\w+[^>]*>','',str)
print str
@j717273419
j717273419 / EnumHelper.cs
Created August 28, 2018 03:56 — forked from jpoehls/EnumHelper.cs
Enum Helper
using System;
namespace Samples
{
public static class EnumHelper
{
public static string GetDescription(this Enum value)
{
if (value == null)
{
using System.Collections.Generic;
namespace FibonacciTest
{
public static class FibonacciGenerator
{
public static IEnumerable<int> Fibonacci()
{
int current = 1, next = 1;
while (true)
@j717273419
j717273419 / csharp_in_try_dot_net.cs
Created April 18, 2019 02:49
test c# code run in try.dot.net
using System;
using System.Linq;
namespace FibonacciTest
{
public class Program
{
public static void Main()
{
Console.WriteLine("Welcome to Try.dot.net");
@j717273419
j717273419 / Program.cs
Last active April 18, 2019 02:57
csharp_in_try_dot_net
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
public class Program
{
@j717273419
j717273419 / Program.cs
Last active April 18, 2019 03:00
c# use named tuple
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class Program
{
public static void Main()
using System;
namespace RsaKeyConverter.Converter
{
public static class BytesExtensions
{
public static string ToBase64(this byte[] bytes)
{
return Convert.ToBase64String(bytes);
}
@j717273419
j717273419 / git-proxy-description
Created March 23, 2021 13:36
中国大陆无法使用git正常下载提交代码到github的解决方案--代理Proxy
中国大陆无法使用git正常下载提交代码到github的解决方案--代理Proxy
1。查看当前git设置的代理
git config --global --get-regexp http.*
如果无结果返回,说明没有设置。请参考3.
如果返回了结果,类似如下所示
http.proxy socks5://127.0.0.1:8087