- 博客(13)
- 收藏
- 关注
原创 Copy file before build in .net core
scenario: before build a C# .net core project, copy the appsetting.development.json.sample toappsetting.development.json if the latter doesn't exist. In Visual Studio, we can easily add a Build Event: IF $(ConfigurationName) == Debug ( IF NOT EXIST ...
2021-09-15 08:19:39 89
原创 Git Merge, Squash or not
on github, there are 3 options when branches are merged. the difference is hereWhat's the Difference Between the 3 Github Merge Methods? some good practices: (image the branch structure is feature->development->master->release) Rebase and m...
2021-09-15 06:48:57 124
原创 tricks on handling cookies on chrome devTools
I'm currently working with chrome Version 67, the cookie management view changes a lot. pls refer to the following article for some basic operation https://developers.google.com/web/tools/chrom...
2018-08-08 09:47:44 123
转载 turn on/off statistics in SQL Server
SET STATISTICS IO,TIME ON;SET STATISTICS TIME,IO OFF;Table 'TBL_SAMPLE_WITH_NULL'. Scan count 1, logical reads 2982, physical reads 0, read-ahead reads 16, lob logical reads 0, lob physical reads 0, l...
2018-04-25 05:01:08 170
转载 Select first row in each GROUP BY group?
On Oracle 8i+, SQL Server 2005+, PostgreSQL 8.4+, DB2, Firebird 3.0+, Teradata, Sybase, Vertica: WITH summary AS ( SELECT p.id, p.customer, p.total, ROW_NUMBER
2017-05-23 16:28:33 465
原创 timeout in a C# WCF services
There are a lot of timeouts in WCF. let us summarize it here. Timeouts on binding These are the most well known timeouts. SendTimeout, ReceiveTimeout, OpenTimeout and CloseTimeout. They can be
2017-03-07 16:11:20 936
原创 use Network Service account to access DB
It’s impressive that a DB access issue was encountered whenwe deployed DW on mikplatform. A web app adopts an Application Pool with Identity ApplicationPoolIdentity A windows service uses NetworkS
2017-01-22 17:32:16 584
原创 manipulate array of data in SQL
As we know, SQL server lacks of concept of array. a workaround is to store the data in a table variable and then iterate it. one way to do iterate is using cursor, but it's slow another way is add
2017-01-11 10:40:17 247
原创 Recover sql when Management Studio crashes
UseMaster SELECTexecquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROMsys.dm_exec_query_stats AS execquery CROSS APPLYsys.dm_exec_sql_text(execquery.sql_handle) AS execsql
2017-01-11 10:27:15 200
原创 Config windows Service Name in App.config
In your integration service project, 1. Edit ProjectInstaller.Designer.cs, check if the Service Installer has been well configured // // serviceInstaller // this.serviceInstaller.ServiceN
2016-12-02 15:40:00 466
原创 Open Win32 App in C#, with extern keyword
Process _winMergeProc = Process.Start("WinMerge", args); BringProcessToFront(_winMergeProc); ---- const int SW_RESTORE = 9; private static void BringProcessToFront(Proces
2016-09-13 11:37:50 174
原创 Get program files folder in C#
1. via Environment variables static string ProgramFilesx86() { if( 8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432")))) {
2016-08-30 15:27:23 455
原创 Tricks to use Case-when in where clause
Tricks to useCase-when in where clause 1. Problem: Given: DECLARE @PeopleTABLE( Namenvarchar(100), Gradenvarchar(30)) DECLARE @Levelnvarchar(30) Write a query to
2016-07-29 17:22:04 247
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人