Loading ...

How To Define Properties In Javascript

Hello everybody, here is short notice of how to define properties in javascript:   So, lets say you want to have class Dog, with "private" field alias and public property Alias. you can achieve it in the following way:   function Dog(nameOfDog) {     var alias = nameOfDog; &nb...

Hierarchy For CTE In MS SQL

Hello everybdoy, today I want to write some notes about hierarchy research in ms sql database.  Imagine you have following structure in your table  TableWithParentChild: id               |           rootID   |    ...

How To Clean Plan Query Cache

Hello everybody, some sql notes: dbcc freeproccache; this one will clean plan of cached of sql.   Another note of how to find Sql code and plan by id from dm_exec_cached_plans create function SqlAndPlan(@handle varbinary(max)) returns table as return select sql.text, cp.usecounts,cp.cac...

MOQ And Unit Test

Hello everybody, today I want to write few words about Moq and unit testing.  First of all you can have a question, why do I need Moq at all? Moq is especially useful for cases if we don't have desire to code interface, then code implementation of interface, and then code fake implementation...

Override Equals Method Of Value Types

Hello everybody. Today I want to give some demo. using System; using System.Diagnostics; namespace StackOverflowQuest { class Program { struct StructTest { public string TestString { get; set; } //public override bool Equals(object obj)...

How To Set Current Record In Acumatica

Hello everybody, today I want to share one trick which can save you few lines of code. Imagine case: you created graph, and want to read something from db, and then set current property of that graph view to some value. How to do it in one line? The anser is simple, with help of Search<> Fo...

Inheritance Strategy In Code First

Hello everybody, today I want to write about reflecting hierarchy of classes in db with help of code-first. There are three types:  Table per Hierarchy Table per Type Table per conreate class. Below goes more detailed description   Table per Hierarchy (TPH): one table for the en...

IDisposable Pattern For C# Objects

Hello everybody, today I want to share my usage if IDisposable interface in C#. Before code presentation some explanations: 1. If created by me class uses some unmanaged resources then it means that I should also implement IDisposable interface in order to clean memory. 2. Clean objects as s...

How To Filter Add Some Info To Filter

Hello everybody. Today I want to share notice of how to work with processing screens.   Processing screen   But of course not in very standard situation. One of my clients requested me the following: he wanted at processing screen to select some items in screen in part 1, then monitor...

How To Make Quick Estimate

Hello everybody, today I want to write a notice about Project estimation. One of the important facetcs of making estimates is to make document, in which to describe definitions of project, which need to be estimated. For this purpose I will create Word document with title page, table of contents...