Saturday, February 27, 2016
mathematical parser
one good plan to is to use GOLD to generate parser, then use language template to generate a skeleton application to handle all aspects of these small and useful parsers.
- Grammars: theory vs. practice
- LALR Parse Table Generation in C#
- Production Grammar Framework for .NET with Applications to Testing
- Generate SLR Parse Table From CFG Grammar
- Create Your Own Programming Language
- Write your own Code Generator or Template Engine in .NET
- Spart, a parser generator framework 100% C#
- Cat - A Statically Typed Programming Language Interpreter in C#
- Smart Code Generator (Asp.Net)
- Smart Code Generator-How to create Templates
- Math Equation Parsing using Call Stacks
- Implementing Programming Languages Using C# 4.0
- Parsing - It Is Easy. Base CSharp Classes and Expressions Calculator
- Parsing - it is easy.
- Mini Algebaraic Calculator 1
- Expression Evaluator
- Math Parther Engine
- Fast Mathematical Expressions Parser
-
Feature List
the original website for this parser. it can be done in GOLD parser with decent structure and clean code.
- LL Mathematical Parser
- Fast Polymorphic Math Parser
- Math Parser .NET C#
- Math Parser .NET
- Math Parser
- An extensible math expression parser with plug-ins
- Parsing Mathematical Expressions with muParser
- Simple Guide to Mathematical Expression Parsing
- Mathematical Expression Parser Using Recursive Descent Parsing
- Inside the Mathematical Expressions Evaluator
- Basic mathematical expression evaluator
- A Tiny Expression Evaluator
- a Tiny Parser Generator v1.2
- A Math Expression Evaluator
- Evaluation Engine
- Evaluation Engine 1.3
- Math Expression Evaluator
- math / function / boolean /string expression evaluator
- A powerful function parser
- CSV Parser (C#)
- Spart, a parser generator framework 100% C#
- Easily Create Your Own Parser
- Simple(x) Numerical Formula Parser
- MathParser - Math Formula Parser
- Building a General Purpose Interpreter, Math Engine and Parser in C#
- Mathematical Expression Parser Using Coco/R
- EBNF Visualizer
- C# - Light and Fast CSV Parser
- A Generic enum Parser in C#
- Generating a High-Speed Parser, Part 1: re2c
- Irony - .NET Compiler Construction Kit
- LALR Parse Table Generation in C#
-
Crafting an interpreter Part 1 - Parsing and Grammars
this gives very good grammar notation system. good to read. the first reference is good from MIT course slide. good to browse.
- Crafting an interpreter Part 2 - The Calc0 Toy Language
- Crafting an interpreter Part 3 - Parse Trees and Syntax Trees
- Lua Interpreter
- Parsing Expression Grammar Support for C# 3.0 Part 1 - PEG Lib and Parser Generator
- Visual Calc v3.0 - A new dimension for the desktop calculator
- Equation Calculator with Graphing
- A multipurpose scientific calculator
- iberg's muParser modified to support pointer data types
- A Calculation Engine for .NET
- C# RPN Expression
- Creating Your Own Freaking Awesome Programming Language
- Implementing an Excel-like formula engine
- C#-like Expression Evaluator and Type Converter
- The Designing of a Logic Reasoning Methodology
- C# Eval Function
- One dimensional root finding algorithms
Friday, February 26, 2016
threading
threading technique and concepts
-
Background Worker in .NET 2.0
a good starting point with demo
- BackgroundWorker helper
- Use a BackgroundWorker in C#
- How to: Use a Background Worker
- BackgroundWorker Class
- BackgroundWorker Class Sample for Beginners
- Working with BackgroundWorker & Creating Your Own Loading Class
- AsyncWorker - A Typesafe BackgroundWorker (and about Threading in General)
- BackgroundWorker Threads and Supporting Cancel
Thursday, February 25, 2016
user settings vs. app settings
user settings vs. app settings
- Application Settings Overview
- Application Settings Architecture
- Windows Forms User Settings in C#
- Fancy Windows Forms
- Windows Forms - Creating and Persisting Custom User Settings in C# -Part 1
- Windows Forms - Creating and Persisting Custom User Settings in C# - Part 2
- Cool Vista-style Menu
Wednesday, February 17, 2016
compiler design topics
compiler design topics
- GOLD Parsing System
- GOLD Parser ::Instructions for the Builder and Engine
- Source Code and Documentation
- Let Your Parser Go for the GOLD
- GOLD Parse, how do you actually implement your code?
- Calitha C# GOLD Parser Engine
- compiler,gold parser,DFA,LALR
- The LLVM Project
-
Introduction to GOLD Parser
this is very good introduction. It mentions some tips for life cycle management for generated abstract class file and your own implementation class in separate file. so that it will not be wiped out after you add new features into your language and you need to regenerate your parse file.
-
A Simple Compiler for the Common Language Runtime
it generates a simple language with integer, float and array type. a very good demo on how to create our own language using GOLD parser.
-
A Money type for the CLR
a basic data type and it can be used in new language.
-
Money pattern
good article to start with in order to have basic introduction and concepts.
-
Money DataType
a good application and demo to look at money type.
-
.NET Type Internals - From a Microsoft CLR Perspective
worthy to browse it and see its perspective for primitive data type.
- Generating Code at Run Time With Reflection.Emit
- Dynamic Type Using Reflection.Emit
- Introduction to Creating Dynamic Types with Reflection.Emit
- Introduction to Creating Dynamic Types with Reflection.Emit: Part 2
- Using Reflection.Emit to Precompile Expressions to MSIL
- RunSharp - Reflection.Emit Has Never Been Easier
- Debugging Dynamically Generated Code (Reflection.Emit)
- Why you can’t do Edit-and-Continue on Dynamically generated code
- Runtime code generation for types
-
Reflection, performance and runtime code generation
Most applications don’t need runtime code generation — either they know everything they need to know at compile time, or the performance considerations are such that Reflection is good enough. However, if you’re running a lot of Reflection code, then replacing it with type-specific code generated at runtime can give you a big performance boost.
- RunSharp – IL Generation for Dummies
- Reflection and Reflection.Emit in C#
- A comparison of dynamic code generation methods in .NET
-
Creating Code at Runtime / System.Reflection.Emit
Here an example how we can create code at runtime. In this sample, I try to create the following class at runtime:
-
Creating Code at Runtime (Part 2)
If we need to handle events and delegates, here is the following sample:
-
Creating Code at Runtime (Part 3)
to change our previous delegate for one more standard, like EventHandler. we update this new class to looks like:
-
Reflection Part 2: Emit
In this article we will examine reflection emit - the ability to dynamically generate code at run-time.
-
Reflection Part 1: Discovery and Execution
we explain reflection in the .NET Framework and demonstrate where and how you can use this new tool in your applications.
- Get Drunk on the Power of Reflection.Emit
- CIL Instruction Set
- CIL Instructions Set Quick Reference
- MSIL Programming Part 1
- MSIL Programming Part 2
- Writings on Computer Science -- Dick Grune
Monday, February 15, 2016
Nlog configuration and tutorials
Nlog configuration and tutorials
- Welcome to NLog
- NLogTutorial
- NLog GitHub site
- ReflectInsight Live/Log Viewer:: a good log viewer- commercial product
-
A Façade for Simple and Framework-Independent Logging in .NET
a good façade framework to remove the logging dependency.
-
Simple Logging Façade
need to know how to use it. find more details on this framework and save more time in future.
-
Visual Studio Support
NLog integrates with Visual Studio® 2005/2008 and 2010 (including Visual C# and Visual Basic.NET Express Editions). Integration with Visual Studio.NET 2002 and 2003 is also supported, but not all features are available.
- NLog Web resources
- Introduction to NLog
- Logging Setup in 5 Minutes with NLog
-
How to NLog (4.2) with VisualStudio 2015
very good steps to follow. it is easy.
- How to NLog (2.1 & 3.1) with VisualStudio 2013
- ReflectInsight Overview
- Comparison of logging frameworks
- Sentinel - Log Viewer
- How to use NLog together with Sentinel
- Log Viewers/Analyzers
- Logging to SQLite with NLog
-
Nlog configuration
target configuration of NLog is good reference.
-
Logging with NLog
target configuration of NLog is good reference.
- NLog configuration Targets
-
Trace Activities with NLog
this article gives very realistic configuration and worthy a look.
-
Logging Setup in 5 Minutes with NLog
the xsd file path setup is good.
- Easy Log Viewer. Yet another log viewer tool, but Easier.
Saturday, February 13, 2016
HOWTO:: connect sql server 2012 express in C#
HOW to connect sql server 2012 express in C#
-
Data Binding with Windows Forms 2.0
Programming Smart Client Data Applications with .NET 2.0
by Brian Noyes
classical data binding book. details descriptions on data binding.
-
Supporting Non-Standard Development Configurations
I need to download this PDf file to set up SQL server express 2005 database to read the book "Data Binding Windows Forms 2.0".
-
Connecting to a SQL Server Express Database with C# .NET
this is the best article to demo how C# connection SQL server Express::
-
C# Connection to SQL Server 2012 Express is Fail
it shares a good connection string I can use it in my application as a template string:
using System.Data.SqlClient;
public static string cnString=@"Database=MyDatabaseName;Server=MyServerName\SQLEXPRESS;Connect timeout=15;Integrated security=True;Net=dbmssocn;Application name=MyAppName;";
public static SqlConnection srvConn= new SqlConnection(cnString); srvConn.Open(); -
Connection Strings for SQL Server 2008
good collections of all types of connection cases:
Using SQL Server Express instance::
Syntax:
Server=.\SQLExpress;AttachDbFilename=c:\database\testproject\urdbfile.mdf;Database=urdbname;Trusted_Connection=Yes; -
Fixing Instance Failure when connecting to SQL Server 2005 Express
another good tip to share on asp.net connection string to SQL server express.
-
SQL Server Express 2012 & Visual Studio 2010
this article also includes installation steps. easy to follow set-up. good reference.
- Linking DropDownList to GridView
- Connect to SQL Server 2012 Database with C# (Visual Studio 2012)
- How to: Connect to Data in a SQL Server Express Database
- Walkthrough: Creating a SQL Server Express Database
- How to: Connect to Data in a SQL Server Express Database
- Walkthrough: Connecting to Data in a SQL Server Express Database
- Connecting to Data in Visual Studio
- Preparing Your Application to Receive Data
- Fetching Data into Your Application
- Displaying Data on Forms in Windows Applications
- Interfaces Related to Data Binding
- How to: Create a Simple-Bound Control on a Windows Form
- How to: Navigate Data in Windows Forms
- Binding Class
- BindingSource Class
- BindingSource Component
- DataGridView Control (Windows Forms)
- Data Binding and Windows Forms === outdated
- Windows Forms Data Binding
implement my own data binding custom control
Microsoft overview on major components and fundamentals.
SQL server express 2012 installation
SQL server express 2012 installation and use it in C# to test databinding and datagridview etc.
- Adventure Works for SQL Server 2012
- Adventure Works 2014 Sample Databases
- AdventureWorks and Samples for SQL Server 2016 CTP
- Querying SQL Server 2012: Part I
- Querying SQL Server 2012: Part II
-
SQL 2012 express installation guide
this installation guide detailed the steps to follow, also it gave details how to configure it:
For 32-Bit machines, download the file: SQLEXPRWT_x86_ENU.exe For 64-Bit machines, download the file: SQLEXPRWT_x64_ENU.exe
-
Microsoft® SQL Server® 2012 Service Pack 1 (SP1) Express
download SQL 2012 Express from this link by following the information on BillQuick guide.
- BillQuick Getting Started Guid
- How to Install SQL Server 2012 Express Edition
- Microsoft SQL Server Express: Version Comparison Matrix and Free Downloads
- SQL Server Express Forum
- Free eBooks from Microsoft Press for SQL Server and other Microsoft Products
- SQL Server 2016 Preview
- Editions and Components of SQL Server 2016
- Is there a difference between SQL Server Express (2012) and LocalDB?
- confusion about SQL Server Express and localdb
- SQL Express v LocalDB v SQL Compact Edition
- Introducing LocalDB, an improved SQL Express
-
SQL Server 2012 connection strings
a good connection string site to reference:
-
Database Connectionstrings
another good connection string site to reference:
- LocalDB Manager
- SQL Server Express LocalDB
- Getting Started with SQL Server 2012 Express LocalDB
- SQL Server 2012 Express LocalDB – How to get started
- How to Install SQL Server 2012 Express and SQL Server Management Studio 2012 Express :: youtube video
installation process needs following steps:
You can: Download SQL Server 2014 Express. Click the big red button that says "Download SQL Server 2012 Express" and choose the version you want. I am not certain what the differences are (after all I am only learning this myself), but I chose "Sql Server Express with Advanced Services" because it looked like it has everything one might need. So download it, install it and read on when you are done.
Next thing you need to do is install a sample database for you to work with. It is probably best if you install the same database I am using, which is the AdventureWorks2012 sample database.
Getting this was actually harder than installing SQL Server 2012. You can get it on the SQL Server Sample Database CodePlex website. At the time of this writing you can choose 14(!) downloads. What the...!? So I picked a few and got successful with the AdventureWorks2012-Full Database Backup.zip (near the bottom of list of downloads).
after download the zip file and unzip the .bak file inside. Luckily here are the steps to get this into SQL Server. Place the .bak file in your SQL Server backup folder. If you have not changed anything during installation it should be in C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012EXPRESS\MSSQL\Backup. Now go to your SQL Server 2012 instance, open up the Object Explorer (if it is not opened already) and right click on the Database folder. In the context menu go to Restore Database.
Click on "Device" and then click on the button behind it. You should now see the Select backup devices window. Click "Add" and browse to the .bak file you just unzipped (if you don't see it immediately). Select the .bak file and click "OK". Make sure you have no other files selected in the Select backup devices window. Click "OK" and you should be back in the Restore database window. You can review your options and click "OK" again. The AdventureWorks database should now be restored and ready for use.
here are my statement: from Restore database page: select device option, then click Add button. From pop-up window, browse to backup folder and select .bak file.
it tells how to set up under different enviornments and how to set up database instances. good reference.
SQL 2016 server preview are coming..
Compare SQL server express vs. LocalDB version. with good user guide on LocalDB.
Monday, February 8, 2016
C# lectures
C# lectures
- C# Lectures - Lecture 5:Events, Delegates, Delegates Chain by C# example
- C# Lectures - Lecture 4: OOP basics: Abstraction, Encapsulation, Inheritance, Polymorphism by C# example
- C# Lectures - Lecture 3 Designing Types in C#. Basics You Need to Know About Classes
- C# Lectures - Lecture 2: Work with text in C#: char, string, StringBuilder, SecureString
- C# Lectures - Lecture 4: OOP basics: Abstraction, Encapsulation, Inheritance, Polymorphism by C# example
- Objects Equality in C#
- Comparing Values for Equality in .NET: Identity and Equivalence
- Testing Equality of Two Objects
- A Study In Equality
- Partial DateTime Object Equality
- Partial DateTime Object Equality
- Partial DateTime Object Equality
- Partial DateTime Object Equality
- An advanced introduction to C# - Lecture Notes Part 1 of 4
- Mastering C# - Lecture Notes Part 2 of 4
- Digging into .NET Object Allocation Fundamentals
- C# BAD PRACTICES: Learn how to make a good code by bad example – Part 2
- Professional techniques for C# - Lecture Notes Part 4 of 4
another guy's series on C#. they are pretty good too.
.NET data binding details
here is the summary for data binding:
- The Control.DataBindings collection holds Binding objects, each of which has a DataSource property of type Object.
- The DataSource property of ListBox, DataGridView etc. is of type Object.
- The BindingSource class also has a DataSource of type Object
- A Detailed Data Binding Tutorial
- Understanding Simple Data Binding
- Data binding concepts in .NET windows forms
- TableDataSource - Binding DataTable to Rich Data Controls
- ObjectDataSource In Depth
- Data binding a ListView
- Data Binding an Enum with Descriptions
- Tackle Complex Data Binding with Windows Forms 2.0
-
Data Binding for Windows Forms
good article with examples and summary. comparison is good too.
-
Link a Windows Forms Control to an Object: Data Binding
good comparison between simple binding and complex binding. worthy quick browsing.
- Windows Forms Data Binding
- Data Binding and Windows Forms
- 101 Ways to Manipulate the DataGridView Control
- Data Binding in .NET / C# Windows Forms
- Complex Data Binding a collection implementing IBindingList and ITypedList
- C# .Net – DataBinding using BindingList
- C# .Net – Using INotifyPropertyChanged with databound classes
- Binding List to DataGridView C# WinForm
- Programming in C# Data Binding to Controls
- Bind Better with INotifyPropertyChanged
- .NET WinForms INotifyPropertyChanged updates all bindings when one is changed. Better way?
- How Binding watches control properties (i.e. how does DataSourceUpdateMode.OnPropertyChanged work) :: good comments to think over
- Data Binding With INotifyPropertyChanged Interface
- INotifyPropertyChanged Is Obsolete
- INotifyPropertyChanged Interface
- INotifyPropertyChanged, The .NET 4.5 Way - Revisited====> this contains 5 links. all good articles
- Implementing INotifyPropertyChanged - does a better way exist?
the following links are basics. many good examples to play around..
note: INotifyPropertyChyanged implementation. tips and tricks are showed here:
it seems like XMAL uses this interface.
Saturday, February 6, 2016
folder browser code snippet
folder browser code snippet
- Example for FolderBrowserDialog in C#
- Choosing Folders with the Windows Forms FolderBrowserDialog Component
- FolderBrowserDialog Class
- FolderBrowserDialog
- How do I open a FolderBrowserDialog at the selected folder?
- Set folder browser dialog start location
- FolderBrowserDialog in C#
- C#.Net How To: Use FolderBrowserDialog in C#
ListView and ListBox examples
ListView and ListBox examples
- C# ListView Control
- ListView Class
- ListView in C#
- The List View
- Creating columns in listView and add items
- C#: How to add subitems in ListView
- Use ListView groups in C# :::: this is a good example to build my own eReader
- ListView.CheckBoxes Property
- C# List View v1.3
- listview checkbox
- ListView WinForms Control
- Maintaining the state of checkboxes in ListView
check box needs to be added to ListView control
Wednesday, February 3, 2016
refactoring in c#
refactoring in c#
- Refactoring (C#)
- 5 Things You Should Know About Refactoring in C#
- Features of Visual Smarter
- Refactoring your code C# visual studio
- Practical Refactoring
- Essential developer skills: Refactoring C# in Visual Studio 2010
- Refactoring in C#
- Factoring in refactoring: The what, when and how