Posts

ng-controller dynamic load

Image
Basically, We use the ng-controller will declare as below. Now, We have an issue is that the ng-controller need to be injected dynamically, So that we can use different controllers, e.g. ng-controller="vm.GetConroller() as vm" ps: This code snippet cannot be run.

SQL Wave Char

Today, My colleague asked me a question that Entity Framework will generate SQL and has ESCAPE '~' at the end of the SQL. SELECT * FROM T WHERE Title LIKE 'foo%'  ESCAPE '~' After the survey, some of the article that the only things we knew it is ESCAPE are used to query the data has  Universal characters.There are no articles about "~".Through some of the testing, we found it represented all of the Universal characters.Which means you may be used ESCAPE '%_[^' to query has the data include it then you can just use ESCAPE '~' to replace it. SELECT * FROM T WHERE Title LIKE 'foo%'  ESCAPE '%_[]^' equal SELECT * FROM T WHERE Title LIKE 'foo%'  ESCAPE '~'

Jenkins-Parameterized Build Sub-flow

Image
Our CI Server has a set of jobs as below: In the daily build job, Once "01-Web" being finished then will trigger "02-Database" and "03-WebTest" Requirement After "01-Web", we want to control the other two jobs whether to be built. 01-Web --> 02-Database -->03-WebTest (default) 01-Web --> 02-Database 01-Web --> 03-WebTest 01-Web

Jenkins - Passing parameter to downstream job

Image
Preface There is a testing job which if being triggered by upstream job then will delay about 30 seconds but manually is not need. Workground 1.The upstream job use plugin "Trigger parameterized build on other projects" In this example, I naming a boolean parameter which is "WAITING"

RAM Disk 2017 My memo

Image
How to and Download This link can download the 4g RAM Version.Currently, official site just offer 1G version. https://pcrookie.com/?p=891 My personal use settings 1.Accelerating the speed of Visual Studio compiler - Changing temp folder path VisualStudio and IIS machine.config location as below: C:\Windows\ Microsoft.NET \Framework64\v4.0.30319\Config If your used IIS express C:\Windows\ Microsoft.NET \Framework\v4.0.30319\Config Opening the machine.config find<System.Web> scope then add as below    <compilation   tempDirectory="R:\Temporary   ASP.NET   Files\"/> ps: The difference is the first executed web page after compiled.

Stopping TypeScript Compile to accelerate debugging

Image
    Due to our project architecture that consists of much of typescript file. Every model or service or controller even a dto that there is an individual file each of them.Total files are 1000 files.     There are too many files in the project so that every time compiler needs waste much time to compile typescript.Today, I count the time is about 30 seconds.   Basically, It will output js file when press saves button but when you execute compiled it will output again and along with all typescript.I don't want to compile all of the typescripts at this situation.Therefore, I found a way to disabled typescript compiled

Host file and IIS binding not working

Image
Problem   Today, I'd like to simulate a DNS at my local site but I got some weird error. ERR_CONNECTION_REFUSED