codeproject.com

Pck/Cfg: Context Free Grammars in PCK

Download pck.zip - 6.8 MB https://github.com/codewitch-honey-crisis/pck>Download from GitHub Introduction This is one of a series of articles on https://www.codeproject.com/Articles/5163943/Pck-The-Parser-Construction-Kit>The Parser Construction Kit (PCK). I just call it "Puck"   Disclaimer: As always, please use https://github.com/codewitch-honey-crisis/Pck>GitHub for the code bits, as I'm building on this daily. I always provide the latest-at-the-time build of PCK with every article, but I make significant...

codeproject.com

Seeding Data MVC 6 .NET Core Application

Download source code - 928 KB Table of Contents Goal Introduction Components Used Create Project DbInitializer Class Conclusion History Goal Just like MVC 5, I was trying to enable automatic migrations and Seeding default data, but it seems the behaviour has been changed in MVC 6, so I thought I'll share the tip. Introduction Here, we'll try to learn Seeding data in MVC 6 ASP.NET Core 2.2 application. Here, mainly Seeding data only is part of our scope. Using Visual Studio 2019, I created a .NET Core 2.2 web...

codeproject.com

Faded/Dimmed Button Images

Introduction I noticed that the images on my buttons aren't faded/dimmed when they're disabled. Text/back color goes darker....but not the image. Of course, I Googled a solution....and it appears that many people have the problem and there were many suggestions....but all far too complex. Using the Code The code is very simple. //Define a general paint event //This can be in a static class, a form, anywhere. private void Ctrl_Paint(object sender, PaintEventArgs e) { Control b = (Control)sender; //Paint a...

codeproject.com

Introduction to Rest.API.Translator

Introduction When you work with REST API, the biggest issue is the unstructured URLs and HttpClient calls. Rest.API.Translator make things much easier for you to communicate with the REST API. Background Back in the old days before REST API, we used WCF. Some still prefer WCF because of the structor and the auto generated classes. REST API made things much easier and more flexible but with every + there is a -. With REST API, there are no auto generated classes. So with the help of the URLs and HttpClient, you could...

codeproject.com

JavaScript Closures for C and Pascal Programmers

Programming for the Masses, not the Classes "In programming languages, a closure, also lexical closure or function closure, is a technique for implementing lexically scoped name binding in a language with first-class functions." - Wikipedia "A closure is the combination of a function and the lexical environment within which that function was declared." - MDN web docs If you can understand what is a JavaScript closure from the above definitions, don't waste your time with this article. For the rest of us, a comfort quote taken from...