Archives

Archives / 2015
  • Enterprise Service Bus

    Hello everybody,

    I continue to publish damp of my understnading of the Universe.

    Now it will be about Enterprise Service Bus as part of building distributed systems.

    ESB can be considered as tool for organizing code. 

    There are two kinds of ESB:

    1. Brokered

    2. Decentralized.

    Features of brokered:

    a. Configuration in one point

    b. One configuration team.

    c. Mediator makes decision.

    Samples of brokers: TIBCO, BizTalk, Web Sphere.

    Features of Decentralized:

    a. configured indepenently

    b. coworking between teams

    c. services makes decisions independently

    Samples of decentralized: NServiceBus, MassTransit, Rhino Service Bus. 

    If to continue comparison between Brokered/ … more

  • Domain driven design in one schema

    Hello everybody,

    today I want to share with you DDD in one schema. 

    So, when I first time tried to grasp what is DDD, I heard Bounded context, domain model, Entity objects, Value objects, etc. 

    Then I started to read "Domain-Driven Design: Tackling Complexity in the Heart of Software" of Eric Evans and initially was lost in his terms.

    After a while I was lost what goes in what. After re-reading I've got the point. 

    Enterprise application can have some vocabulary. It can be one, or more. But if it has more then one vocabulary, it can be useful to separate those vocabularis by the definition bounded context.

    Each bounded context can have it's own Domain model. 

    Each domain model can … more

  • Normalization in human brain and artificial neural network

    Hello everybody,

    today I want to write few words about normalization in neural networks and why it is needed or can be needed, but not only from mathematical prospective. Here I mentioned some mathematical reasons why normalization and scaling can be needed.

    First of all, you can be surprised, but your brain also does normalization quite often. As way of example give answers at the following questions:

    1.     What is color of tree?

    2.     What is color of banana?

    3.     What is color of logo of Coca-Cola?

    4.     In which quantities GDP is measured?

    5.     What is color of skin of people in Africa?

    I can’t give 100% guarantee, but most probably you answered that tree is green, banana … more

  • Impedance mismatch

    Hello everybody,

    today I want to boast about one new phrase in my vocabulary: 

    impedance mismatch.

    It means the following: difference between what you have in your C# code ( as example ) and have that is persisted in db.

    For example if you have client, which has orders, and each order thas items, but in C# you'll have clinet, which has list of orders and each order will have list of items, than you can really understand what is impedance mismatch. more

  • CQRS in .Net

    Hello everybody,

    for now I want to make snapshot or dump of my brain about CQRS, so beware from reading of it, because it can be confusing.

    Very simple explanation of CQRS

    As usually if you see some kind of application, you can expect that what you see on the screen, you'll see it in db. It means if you see on screen Order, and order details, you can expect to see in database tables order and OrderDetails, or “one to one” relation between screen and DB.

    Like this:

    But with CQRS following changes can be applied:

    Instead of two tables ( order and order details ), you will see three tables. Now make a pause and tell your assumption what can be their names? As one of the ways it … more

  • DDD or Domain Driven Design

    Hello everybody,

    today I want to share some glimplses of what is Domain Driven Design. 

    One of the main ideas of DDD is to make the problems to guide software design, and not make software to affect problems of client. There is a popular joke, that computers help to solve problems, which didn't appear before inventing computers. 

    So, the same with design of system. Design system in order to solve problem, not just use system to create another problems for business owner.

    How this can be achieved in order to avoid displayed situation:

    First of all, you should apply the following:

    Ubiquitous Language

    Bounded Contexts

    Aggregate Root

    I hope that the first bullet item is easiest … more

  • CAP theorem

    Hello everybody,

    today I started new course at pluralsight.com, which is entitled "Patterns for Building Distributed Systems for The Enterprise". 

    Andd I started watching CAP theorem. CAP theorem is actually abbreviation of four words: 

    Consistensy

    Availabilty

    Partition tollerance.

    I don't know how about you, but I'm pretty happy that it is called CAP theorem, not CAPT theorem, because CAP sounds more pleasant. Sometime it is also named Brewer's theorem. Now lets go to theorem by itself. 

    It claims that among three ( C A or P ) your system always will be able to provide only two. And looks like you'll not be able to always affect which of three your clients will get.

    And reasons why … more

  • AngularJS inheritance in JS

    Hello everybody,

    today  I want to write short notice about another useful feature of AngularJS particularly about extend function.

    So, according to comment in angular.js file function extend does the following:

    /**

     * Extends the destination object `dst` by copying all of the properties from the `src` object(s)

     * to `dst`. You can specify multiple `src` objects.

     *

     * @param {Object} dst Destination object.

     * @param {...Object} src Source object(s).

     * @returns {Object} Reference to `dst`.

     */

    function extend(dst) {

      //herer goes implementation

      return dst;

    }

    You may wonder, why do I need this? 

    Well, one of the reasons, is imitiating inheritance in some way, additional … more

  • AngularJS clean code advices

    Hello everybody,

    today I want to share with you fragment of knowledge from John Papa and his course at pluralsight entitled AngularJS Patterns: Clean Code.

    Inside of course one of the videos he have following structure advice: Function, Inject, Register ( I will name it FIR  ).

    function DashBoardController(service1, service2) {//function

        //here goes code of controller.

    }

    DashBoardController.$inject = ['service1', 'service2'];//inject

    angular

        .module('app')

        .controller('DashBoardController', DashBoardController);//register

    or in the form of image:

    And as John Papa mentioned, Todd Motto also likes that approach:

    "I prefer this sequence: write my function, inject the … more

  • Types of questions in Data Science

    Hello everybody,

    today I want to share with you some notes about Data Science.

    In Data Science everything starts from giving questions, or as to say to giving right questions. Here it goes list of question which data scientists ask in order of rising complexity:

    Descriptive

    Exploratory

    Inferential

    Predictive

    Causal

    Mechanistic

    So, the first goes descriptive analysis. You just describe what you see, and assume what that may be but not necessary is.

    Exploratory analysis goes for searching relationship which you want to discover, but not necessary confirm them. EA is not final conclusion and shouldn't be use for generalizing/predicting. … more

  • Mathematical notes about Neural networks

    Hello everybody,

    today I want to write few words about topic why mathematician believe that neural networks can be taught of something. Recently I've read book Fundamentasl of Artifical Neural Networks of Mohamad Hassoun and want to share some thoughts in more digestible manner with omitting some theoretical material.

    As you heard, when first attempt of neural networks was invented ( aka Perceptron), society was very admired by them, until Marvin Minsky and Seymour Papert showed that Perceptrons can't implement XOR function or in generally speaking any non linear function.

    It lead to big disappointment in area of neural networks.

    But why? Because sometime one line is not enough in … more

  • .Net AngularJS Treeview lazy loading implementation

    Hello everybody,

    who follows my blog.

    Today I want to share with you hierarchical tree view example which displays data as name implies in hierarchical way. There are plenty of tools that display data in hierarchical way with help of AngularJS, but not so many which has implemented lazy loading. Another part which is not common with implementation is joing AngularJS with server side API.

    So if you ever find need to display some hierarchic information with lazy loading, you can consider my code as some kind of base, which you can extend.

    Some details

    As backend I have the following:

    MS SQL

    C# with Entity framework

    Web api

    As frontend I have the following: … more

  • Simple math behind neuron

    Hello everybody,

    today I want to share with you some ideas about activation functions in neural networks. 

    But before I'll do this let's see simplified edition of neuron:

    As usually many books describe following schema of working neuron:

    ignals go into dendrites into neuron body. Neuron body does some kind of converting signal into another signal and sends output through axon to another neuron.

    What is origin of signals, or where they come from? It can be any place of your body. It can be your eyes, it can be your nose, it can be touching of your hand, etc. Anything 

    that your body signals is processed in the brain. 

    So now, imagine, that you are mathematician and want to provide … more

  • Hierarchical storage of data in databases

    Hello everybody,

    today I want to write about hierarchical storage of information in databases.

    As usually for storing hierarchy you'll have a choice: fast reading or fast writing. Fast reading as usually related with nested sets, and fast writing is related with adjacency. Also you can consider some kind of combination of both methods.

    Following urls give good generalization of what you can have as good generalization

    One more Nested Intervals vs. Adjacency List comparison: really cool comparison

    Models for hierarchical data with SQL and PHP: Bill Karwin gives good comparison as well in slides

    Representing hierarchies in MySQL: nice watching of Nested Set … more

  • Jenkins and CI

    Hello everybody,

    few days ago I had chance of configuring Jenkins. 

    I will ommit purpose and value of CI, just want to mention one error message, which you can find if install MSBuild plugin for building .sln file.

    If you point to MSBuild file, I mean msbuild.exe file, you'll see interesting warning message:

    d:\msbuildsln.bat is not a directory on the Jenkins master (but perhaps it exists on some slaves)

    For  me purpose and value of this message is puzzle till know, but just want to write that you can ignore this message without any side-effects more

  • Spies and secret agents in javascript

    Hello everybody,

    Have you ever had a desire to become chief of secreat agent or spy? To be honest I never had such desire, but unwilignly I become chief of spies  and secret agents which I created in javascript. 

    To put simply during unit testing of javascript sometime is needed to mock calling to some functions with replacement of that function, and sometime there is a need to mock that function without it's replacement. 

    The first scenario is much easier to implement, while the second one required usage of apply function. 

    Take a look at the following picture:

    There are many js libraries which support both options ( with and without original function ). For example jasmine, … more

  • AngularJS ng-options

    Hello everybody,

    today I want to make some post about how to work with AngularJS select directive from viewpoint of complicated objects. 

    <select id="type"

                  class="form-control" name="type" aria-readonly="true"

                   ng-model="course.courseId">

                     <option ng-selected="{{ course.courseId== et.id }}"

                       ng-repeat="et in courseTypes" value="{{et.id}}">{{et.name}}

                     </option>

    </select>

    In controller I have some code which populates data from controller for course types, and in order to display complicated parts I applied mentioned before select. more

  • What the difference between programmer and software developer?

    Hello everybody,

    today just short glimpse about difference between programmer and software developer.

    So, try to picture following scenario, you ask for program.

    As result programmer will give you a code. 

    But Software developer will give you "some questions" ( and this list is not complete )

    How does it fit in the business process. Are the requirements thought out?

    Are you sure you understand what it will cost?

    What kind of documentation will it need?

    How might it interact with other code?

    What platform will it run on. Are the scalability issues?

    How might it impact future development? How might it be enhanced in the future?

    Can you find/buy/reuse other software instead? … more

  • ZenCoding in Web Essentials

    Hello everybody,

    today I want to point to some useful features of ZenCoding in web essentials.

    Quick reference of ZenCoding shortcuts:

        # use it for creating id    . use it for creating a class attribute    [ ] use it for creating a custom attribute    > use it for creating a child element    + use it for creating a sibling element    ^ use it for creating climbing up    * is element multiplication. This creates the same thing n number of times    $ is replaced with an incremental number    $$ is used for numbers with padding    { } creates text in an element

    So, if you decide to install in your Visual Studio Web essentials, then among options which you'll get will be ZenCoding. What … more

  • Notes about AngularJS webinar

    Hello everybody,

    few notes about some details of AngularJS.

    1. What is $scope?

    $scope is something where we can store information which is needed for page. Also data for changes of which we need to track.

    2. How can we react on some changes in $scope? In other words if something at page modified something in model, how can we react on it? Or in another words, how to track changes in some member? 

    Imagine following scenario. Inside of your scope there is a member message like this:

    $scope.message = "Your message";

    You can track it like this:

    $scope.$watch("message", function(newValue, oldValue) {

        //here you can do something

    });

    newValue as you probaly guessed is new value, … more

  • $http Service and promises

    Hello everybody,

    today another glimpse from the AngularJS world which I can name of how to get something from server.

    So, imagine that you see following code in your controller:

    var OrderController = function($scope, $http) {

        $scope.order = $http.get("/orders/1563");

    }

    and now is question, what's wrong with this? Just one very important issue, $http.get returns a promise, not the response itself. So in order to make it work correctly another approach will be more correct:

    var OrderController = function($scope, $http) {

        var promise = $http.get("/orders/1563");

        promise.then(function(response){

          $scope.order = response.data;

              });

    }

    Why second approach … more

  • 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;

        Object.defineProperty(this, "Alias", {

                get: function() {

                    return alias;

                },

                set: function(value) {

                    alias = value;

                }

            }

        });

    }

    Later in code you can write the following:

    var rex = new Dog("Rex");

    var name = rex.Name;   // name will be equal to "Rex"

    Also you can set name of the dog to other name. 

    more

  • 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   |     some additional fields

    1                |            1          |      ----

    2                |            1          |      ----

    3                |            2          |      ----

    4                |            2          |      ----

    5                |            2          |      ----

    and image that you need to get info like who is below 1. 

    for this purpose following sql can be useful:

    -- wrap up tree selection into tvf

    create function HierarchyFunction(@ … more

  • 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.cacheobjtype,

    cp.objtype, cp.size_in_bytes,

    qp.query_plan

     from

     sys.dm_exec_sql_text(@handle) as sql cross join

     sys.dm_exec_query_plan(@handle) as qp

     join sys.dm_exec_cached_plans as cp

     on cp.plan_handle = @handle;

    then you can use it in the following way:

     select * from SqlAndPlan(0x06650D007852A00B40613C82000000000000000000000032)

    And in order to see sql and plan simultanously you can use … more

  • Query plan in MS SQL

    Hello everybody,

    some MS SQL internals.

    Imagine, you want to see what MS SQL cached. How you can do it? One of the ways is to look into sys.dm_exec_cached_plans. 

    For example like this:

    select * from sys.dm_exec_cached_plans

    this code will return to you all what is cached in your MS-SQL database. Most probably result will puzzle you. What to do with all of it?

    Take look at the screenshot :

    the area of interest for us is column plan_handle. 

    You can use it for another sql request. Like this:

    select * from sys.dm_exec_query_plan(0x06000C002D51D1304021F8AE000000000000000000000000);

    if you click at column with xml you'll see the following picture:

    How to interpret those … more

  • 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. As usually those simple implementation are relatively simple so somebody ( as Moq team ) can organize code generation for your simple interface implementations.

    So, unit test is something that should follow 3 A:

    Arrange

    Act

    Assert

    General schema of Unit test implementation can be like this:

    [Test]

    public void SomeTest()

    {

    //Arrange

    var … more

  • Some bootstrap fundamentals

    Hello everybody,

    today I want to write some moments about bootstrap.

    If to speak in general bootstrap is beast which has some javascript and css code. 

    One of the ways to modify behaviour of bootstrap is to add reference to bootstrap style, and then add reference to your customization of css in which you can change boostrap settings with overriding basic bootstrap code. For example you can achieve it in the following way:

    <link rel="stylesheet" href="css/bootstrap.min.css">

    <link rel="stylesheet" href="css/yourCustomized.css">One more interested features of bootstrap is grid layout of something. If in your html you'll write something like this:

    <section id="body" class="container"> … more

  • 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)

    //{

    // var ct = (StructTest)obj;

    // return ct.TestString == this.TestString;

    //}

    }

    class ClassTest

    {

    public string TestString { get; set; }

    public override bool Equals(object obj)

    {

    var ct = obj as ClassTest;

    if (ct == null) … more

  • 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<>

    For example it can be like this:

    public PXSelectOrderBy<SalesOrder, OrderBy<Asc<SalesOrder.orderNbr>>> Orders;

    ...

    graph.Orders.Current = graph.Orders.Search<SalesOrder.orderNbr>(order.OrderNbr); more

  • 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 entire class inheritance hierarchy. Table includes discriminator column which distinguishes between inheritance classes. This is a default inheritance mapping strategy in Entity Framework.

    Table per Type (TPT): This approach suggests a separate table for each domain class.

    Table per Concrete class (TPC): one table for one concrete class, but not for the abstract class. So, if you inherit the abstract … more

  • 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 soon as I finished usage of it. 3. In my dispose method I iterate over all IDisposable members of class and call Dispose.4. In my Dispose method call GC.SuppressFinalize(this) in order to notify garbage collector that my object was already cleaned up. I do it because calling of GC is expensive operation.5. As additional precaution I try to make possible calling of Dispose() multiple times.6. Sometime I … more

  • Search for duplicates

    Hello everybody,

    Here is just shorp version of application which searches for duplicates in folder.

    In  downloadable archive you can find my implementation of searcher with Task, ContinueWith and some other new features of C# 4.5 more

  • How to filter add some info to filter

    Hello everybody.

    Today I want to share notice of how to work with processing screens.

    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 

    results in part two, and see some totals in part three. 

    As you understand it's not easy to ahcieve this goal only with help of selectors. It is possible with usage of delegates in Acumatica and with usage of it's cache.

    Initial initialization of page was the following:

    [Serializable]

    public class RRCashRequestProcessor : PXGraph<RRCashRequestProcessor>

    {

    public PXCancel<CreatePaymentFilter> Cancel; … more

  • 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 and following categories:

    In order to make good estimate it's good to clarify with potential stakeholder following categories:

    Purpose

    Goals/Objectives

    Success Criteria

    What's in/out of scope

    Assumptions

    Recommended Approach

    Business Drivers

    Budget

    Schedule

    Return on Investment

    Constraints

    Risks

    Stakeholders

    Preliminary Schedule

    Preliminary Estimates

    Policies and Standards … more

  • Some new features of .Net 4.5

    Hello everybody,

    today I want to write some notice about PCL, aka portable class library. It's possible to make library which will be possible to make library for Windows Phone 7, Xbox 360, .Net for Windows Store apps. 

    more

  • How to work with selector

    Hello everybody,

    today I want to write few words how to work with selectors in Acumatica.

    So, imagine, you have the following selector in Acumatica:

    <px:PXSelector ID="NmbUsrBillPMTask" runat="server" DataField="UsrBillPMTask"/>

    In order to make it work as selector, you need to do the following:

    [PXSelector(typeof(Search<PMTask.taskID>))]

    if you'll do it, you'll receive following selector:

    And if you choose there some value, you'll be able to see id represented as number. In my case it was 727.

    But what if you want to make it more readable?

    Then you can add following part:

    [PXSelector(typeof(Search<PMTask.taskID>), SubstituteKey = typeof(PMTask.taskCD))]

    Then instead of … more

  • jForex non standard time frame ema value

    Hello everybody,

    Few days ago I had an order for automating forex strategy for 3 minutes time frame in jForex platform.

    I faced issue that by default jForex doesn't work with 3 minutes. In order to do this, the following parts were needed for addition:

    @Override

    public void onStart(IContext context) throws JFException {

    period3Min = Period.createCustomPeriod(Unit.Minute, 3);

    edDescriptor myFeed = new TimePeriodAggregationFeedDescriptor(Instrument.EURUSD, period3Min, OfferSide.ASK);

    ontext.subscribeToFeed(myFeed, new IFeedListener() {@Override

    pan style="color: #008800; font-weight: bold;">public void onFeedData(IFeedDescriptor feedDescriptor, ITimedData feedData) {

    try {

    nsole. … more

  • Current2 vs Current in Acumatica

    Hello everybody,

    today I want to share note about Current2 and Current in Acumatica.

    Current2 inserts really current value of record, while Current inserts curretly selected value or default. I was surprised, that Current2 inserts exactly the value of record. more

  • Speech recognition with Neural Networks

    Hello everybody,

    today I want to share how to deal with the Speech Recognition with Neural Networks.

    So, the speech recognition task has following stages:

    Pre-processing: convert the sound wave into a vector of acoustic coefficients. Extract a new vector about every 10 milliseconds

    Acoustic model: Use a few adjacent vectors of acoustic coefficients to place bets on which par of which phoeneme is being spoken.

    Decoding: Find the sequence of bets that does the best job of fitting the acoustic data and also fitting a model of the kinds of thinks people say.

    more

  • Some simple models of neurons

    Hello everybody,

    today I want to describe some simple models of neurons. Bet before I'll continue, just few words why to worry at all about simplification of neurons. The answer on question why is simple: simplification helps to understand bigger picture ( well not always ) and also allows to apply mathematics and make analogies to other familiar systems.

    Now let's see models of "Idealized" neurons:

    1. Linear neurons.  Output is sum of bias plus multiplication of multiplication of inputs with weights.

    Here is how it's chart look like:

    2. Binary threshold neurons. It has following stages of calculation:

    Compute a weighted sum of the inputs (1)

    Send out fixed size spike of … more

  • Send post/get/delete to Jira

    Hello everybody,

    today I want to share, how I make rest requests to jira. Here I found class RequestsExtensions. 

    It works fine for cases if authentication and authoritation is not needed. Bug for cases if authentication and authoritation in jira is needed that class doesn't work properly. In order to fix it I've added function which imitates log in.

    Below goes code which I use:

    public static class WebRequester

    {

    /// <summary>

    /// Sending POST request.

    /// </summary>

    /// <param name="url">Request Url.</param>

    /// <param name="data">Data for request.</param>

    /// <param name="userName">user name for log in</param>

    /// < … more

  • Send curl request to Jira from command prompt

    Hello everybody,

    Few days ago I had a task to send delete link request to jira. For this pupose I found curl utility, and here is how delete request can be submitted from command prompt:

    curl --user jiraUserName:jiraUserPassword  -X DELETE -H "Content-Type: application/json" http://yourJiraInstance/rest/tempo-accounts/1/link/267.

    Despite fact that jira claims that in response we will get true or false, in reality I received {"id":267,"scopeType":"PROJECT","scope":10452,"accountId":5,"key":"QASSURANCE","name":"Quality Assurance","linkType":"MANUAL"}. I have no idea why response was like this, but the fact is fact. Response is another then simply true/false. more

  • How to provide data for the grid in Acumatica without persiting it to db.

    Hello everybody,

    today I discovered for myself new member of Acumcatica. Welcome PXProcessing with it's relatives.

    • PXProcessing: allows you to work with data records for processing without filtering. You can use the Where<> and OrderBy<>clauses in this data view type.

    • PXProcessingJoin: allows you to work with data records for processing without filtering. You can also use Join<>clauses in this data view type.

    • PXFilteredProcessing: allows you to work with data records for processing with filtering. This data type takes two DACs as type parameters, where the second DAC specifies the filter DAC. You can use the Where<>and OrderBy<>clauses in this data view type.

    • … more

  • Updating Acumatica to newer version of Acumatica

    Hello everybody,

    toda I want to share some small notice about what options do you have during updating of Acumatica.

    So. Imagine you make update from version 4.2 to version 5.1 and suddenly you have this error message:

    Text of error message says, that you have some problems at your db. And you have three options:

    1. Abort

    2. Retry

    3. Ignore.

    Initially when I made update I was very scared of that error message and as usually selected Abort, but prior to it copy/pasted error message. It's not very wrong idea, but to execute updater after each error message is little bit slover process. Then I put my attention at another button. Retry. I know it sounds funny, that after some numbers … more

  • Types of redirects in Acumatica

    Hello everybody,

    today I want to note about redirects. In Acumatica you can redirect user to another webpage. Acumatica provides option of redirecting to following scenarios:

    To another page in Acumatica

    To another report

    To any destination url

    Try to gues, how redirections are implemented? As exception. If you consider it as wrong approach, I can partially agree with you. But only partially, because redirecting to antoher page is really some kind of exceptional situation. 

    Below goes code of redirecting to page PM302000 at some TaskID and some projectid selected, which will be opened in new window:

    UsrPMTaskReplace taskRepl = JiraAccountTasks.Current;

    ProjectTaskEntry graph = … more

  • DependOnGrid in Acumatica or how to get currently selected record in grid

    Hello everybody,

    today I want to share one important note, for search of which I've spent for two hours. 

    In grid I've added button in the following way:

    <ActionBar ActionsText="True">

    <CustomItems>

    <px:PXToolBarButton>

    <AutoCallBack Command="RemovePMTask" Target="ds" >

    </AutoCallBack>

    </px:PXToolBarButton>

    </CustomItems>

    </ActionBar>

    Initially described it in the following way:

    <px:PXDSCallbackCommand Name="RemovePMTask" Visible="False"

    </px:PXDSCallbackCommand>

    Then added code for button in graph, and noticed terrible behaviour. In my action I wasn't able to get currently selected record in grid. After wondering for two … more

  • Hos to add list values to drop down in Acumatica

    Hello everybody,

    today I want to make quick notice of how to make drop down values in Acumatica avalable. 

    Let's imagine, that you need following drow down list:

    In order to get this kind of list, you can use the following code:

    public static class JiraAccountStatusEnum

    {

    public const string Open = "O";

    public const string Closed = "C";

    public const string Archived = "A";

    }

    public class JiraAccountListAttribute : PXStringListAttribute

    {

    public JiraAccountListAttribute() : base(

    new string[] {JiraAccountStatusEnum.Open, JiraAccountStatusEnum.Closed, JiraAccountStatusEnum.Archived},

    new string[] {" … more

  • Machine learning certificate from coursera

    Hello everybody,

    I want to boast that I receved certificate from Standfor Univercity about my level of knowledge in Machine Learning.

    Here is the link:

    https://www.coursera.org/maestro/api/certificate/get_certificate?course_id=973756

    and here is screenshot:

    more

  • How to get top 1 record from db in Acumatica

    Hello everybody,

    today I want to share with you one trick that sometime can be useful. Imagine, that you constructed some BQL query and want to get only one record from db with ommiting others or in other words if you need TOP 1. For this purpose you can use SelectSingle method that generates SQL statement with TOP 1 records to return and executes faster. more

  • Unit test abbreviations

    Hello everybody,

    some abbreaviations:

    SUT - system under test. AKA as AUT, MUT, CUT.

    DUT - device under test

    DOC - depend on component more

  • What makes a good Unit test

    Hello everybody,

    today some notices of what is considered to be a good unit test.

    1. Tests should be independent and isolated.  

    For example if you have functions a, b, c tested, then sequence of test shouldn't affect the result. 

    2. Each test should test single behaviour or logical staff. 

    If to speak about phone example, calling and sending sms shouldn't be in one functoin

    3. Clear purpose understood.

    4. Don't test the compiler ( like writing/reading to db )

    5. Reliable and repetable ( give the same result ).

    6. Quality the same as other parts of solution.

    7. Valuable for developers more

  • What are Asserts in NUnit

    Hello everybody,

    just short notice of NUnit function Assert.That

    [Test]

    public void CheckAddition()

    {

    Assert.That(CalculatorClass.Minus (5, 2), Is.EqualTo(3));

    }

    public void CheckAddition()

    {

    //old styel Assert.AreEqual(3, CalculatorClass.Minus (5, 2));

    }

    more

  • Email control in Acumatica

    Hello everybody,

    just short glimpse of how to make mail control in Acumatica. It's very simple task. Make dac class with string and bind it to page in the following way:

    <px:PXMailEdit ID="edUsrPersonalMail" runat="server" DataField="UsrPersonalMail" CommitChanges="True" ></px:PXMailEdit>

    That's it, you'll get email control more

  • Encog propogation training algorithms

    Hello everybody,

    today I want to describe in simple words some training algos of Encog.

    Before I'll continue, I want to show general block schema of training algorithms:

    Init NN can look like this:

    public BasicNetwork CreateNetwork()

    {

    var network = new BasicNetwork();

    network.AddLayer(new BasicLayer(WindowSize));

    network.AddLayer(new BasicLayer(10));

    network.AddLayer(new BasicLayer(1));

    network.Structure.FinalizeStructure();

    network.Reset();

    return network;

    }

    Steps "NN error < acceptable error" -> "Update weights according to learning algorithim" can look like this:

    public void Train(BasicNetwork network, IMLDataSet training)

    {

    ITrain train = … more

  • Transfer to new Acumatica version

    Hello,

    today I had task of switching to new version of Acumatica. From 4.2 to 5.1. 

    The first surprise which I faced was lack of .Net framework 4.5.1. This shocked me especially from viewpoint that I had Visual Studio 2012 installed with service pack 4. Then I found that I need "Microsoft .NET Framework 4.5.1 Developer Pack for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP2 Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2" . more

  • T200 Acumatica certificate

    Hello everybody,

    I want to boast that I finally received T200 Acumatica certificate!!!!!! And now I can proudly say that I'm certified Acumatica developer,

    which gained

    T100

    T101

    T200

    T300

    T900 certificates.

    more

  • How to get tstamp in Acumatica

    Hello everybody,

    today I want to shre small note of how to generate timestamp for Acumatica objects ( in case if you use for some reason PXDataBase.Insert or  PXDataBase.Update)

    PXDataBase has public method SelectTimeStamp.

    public static byte[] SelectTimeStamp()

    {

    return Provider.SelectTimeStamp();

    }

    So, in case if you need to put in variable t TimeStamp you can do the following:

    var t = PXDatabase.SelectTimeStamp();

    And variable t will have timestamp more

  • Indiegogo

    I want to start campaign for making machine for my neural networks investigations. 

    Here is the link if you want to participate

    http://igg.me/p/neural-network-time-series-forecaster/x/10380153 more

  • PXAccumulatorAttribute in Acumatica

    Few notes about PXAccumulatorAttribute

    If to inherit from PXAccumulatorAttribute, you'll have access to member _SingleRecord. If to set in constructor to true, you'll configure single record update mode.

    There is PrepareInsert method. This method intended for updating policy for the data fields.

    PrepareInsert is invoked within Persist method, before Acumatica framework generates SQL commands for inserted data records.

    Among paramethers of PrepareInsert method there is PXAccumulatorCollection, which has method Update. In this method it's possible to configure fields which will be updated during PrepareInsert

    Method Update has following policies: PXDataFieldAssign.AssignBehavior. … more

  • Sources of trading ideas

    Hello everybody,

    For now I read book "Quantitative Trading: How to Build Your Own Algorithmic Trading Business"

    and would like to note sources of trading ideas, which mentioned there:

    Type

    URL

    Business schools’ finance professors’ web sites

    www.hbs.edu/research/research.html

     Social Science Research Network

    www.ssrn.com

     National Bureau of Economic Research

    www.nber.org

    Business schools’ quantitative finance seminars

    www.ieor.columbia.edu/seminars/ financialengineering

    Mark Hulbert’s column in theNew York Times’ Sunday business section

    www.nytimes.com

    Buttonwood column in the Economist magazine’s finance section

    www.economist.com

     Yahoo! … more

  • How to disable callback from Checkboxes in Acumatica.

    Hello everybody.

    Today I want to share some details about inner kitchen of Checkboxes in grid of Acumatica.

    If to look inside of generated grid of Acumatica with FireFox Dom and style inspector, you can see following structure:

    Item with checkbox is implemented as td, which has div, and has another div. The first level div has data for internal ( Acumatica presentation ),

    and second div, or internal div has data for user display.

    Once I had task to disable callback from checkbox. You may wonder why somebody can have such task. The reason each tick at checkbox made 

    roundtrip to server, called number of delegates, which significantly slowed down perfomance. By the way,  CommitChanges=" … more

  • How to enable disable menu item in Acumatica

    Hello everybody,

    Today I want to share short glimps how to Enable/Disable menu item. Let's some menu. For example it looks like this:

    Suppose, we added menu action Activate in the following way:

    public PXAction<EPEmployee> Activate;

    [PXButton]

    [PXUIField(DisplayName = "Activate")]

    protected virtual IEnumerable activate(PXAdapter adapter)

    {

    }

    // menu action was added like this:

    public override void Initialize()

    {

    Actions.AddMenuAction(Activate);

    }

    Let's say we want to disable menu item Activate. It can be achieved with usage of RowSelected event and SetEnabled function.  In my case I used the following construction:

    protected virtual void EPEmployee_ … more

  • Make PXDefault as not required for input

    Hello everybody,

    Imagine following situation, you added to your DAC field some default value. For example like this:

    [PXDBDate]

    [PXDefault(typeof(AccessInfo.businessDate))]

    public virtual DateTime? FromDate

    And now you have default value as current date. But what, if you don't like to make it required for input. How to achieve this goal? The answer is quite simple, you just need to add PersistingCheck = PXPersistingCheck.Nothing into pxdefault attribute. Like this:

    [PXDBDate]

    [PXDefault(typeof(AccessInfo.businessDate), PersistingCheck = PXPersistingCheck.Nothing)]

    public virtual DateTime? FromDate

    With such changes you can init your values at form, and make it not required … more

  • Select all rows in Acumatica

    Hello everybody,

    today I want to share one simple trick. Sometime in grid you have chekcboxes, and you can have a need to make all of them selected. Here is sample of code which helps with this task:

    <px:PXGridColumn AllowCheckAll="True" AllowNull="False" DataField="Selected" TextAlign="Center" Type="CheckBox" Width="30px" /> more

  • PXFilteredProcessing in Acumatica

    Hello everybody,

    few day ago I was digging in code of CT502000, and found interesting part of code:

    public PXFilteredProcessing<ContractsList, ExpiringContractFilter> Items;

    As usually in my code I use PXFilter, and discovery of PXFilteredProcessing was confusting for me. 

    The first think that I as usually do, if I see something new, it is watching with reflector in declaration of new type. Here it what reflector shows:

    public class PXFilteredProcessing<Table, FilterTable> : PXProcessing<Table> where Table: class, IBqlTable, new() where FilterTable: class, IBqlTable, new()

    This means, that we can pass into PXFilteredProcessing two tables. T200 manual gives an answer why: Provides … more

  • Save DAC class in acumatica to DB

    Hello everybody,

    today I want to note interesting gotcha. Let's say you want to save object to db in Acumatica. You in your code created some DAC item and want to save it to db. And you call Actions.PressSave() method. And you get error. You can get suspection, that maybe you put some wrong data in your DAC class or something like this. 

    But the real reason is different, According to T200 Acumatica manual: " You should not invoke the Persist()method on the current graph instance. You can do it only for a graph instance created in a background operation."  It means that you should create instance of Graph, and in that instance call method Persist. 

    Here is fragment, which I extracted with … more

  • PXSmartPanel in Acumatica

    Hello everybody,

    today I want to write few words how to work with PXSmartPanel.

    One of my clients asked following:

    1. Press at button.

    2. Pop up should appear with two buttons ( "OK" , "Cancel")

    3. At pop up should be also selector of contracts and datetime.

    4. Existing screen should be modified.

    In order to do this, following actions were implemented:

    1. Existing screen was CT301000.

    2. If to look in screen source code, following line says about graph:

    <px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" TypeName="PX.Objects.CT.ContractMaint"

    PrimaryView="Contracts" BorderStyle="NotSet">

    3. It means, that we need to create extension class for  … more

  • Principal Component Analysis in Machine Learning

    Hello everybody,

    today I want to note important for me details of Machine Learning. 

    So, the first and very important usage of PCA is visualizing data. If you have 10 dimensions, can you visualize those data? If you can I'm happy about you, but I can't. I can imagine only 1, 2, 3 D :). But with principal componenet analysis it's possible to visualize data. 

    Second application is reducing memory/disk need to store data. That's quite self-explanatory, to train on 10 000 dimensions and 100 dimensions is different.

    Third is speeding up learning algorithm. It's actually related with second.

    Another important detail, it's bad idea to use PCA in order to avoid overfitting. Actually everybody … more

  • How to override base event in Acumatica

    Hello everybody,

    Imagine following scenario. You have some code in base class, which you need to change. How to do it. For this purpose you can use PXOverride attribute.

    See the following code:

    public class YourExtension : PXGraphExtension<SomeBasicGraph>

    {

    [PXOverride]

    public void MethodForOverriding(string viewName, IEnumerable items)

    {

      // Method body

    }

    }

    In case which is presented MethodForOverriding of base class will be called. If you want to avoid it, you can add additional argument to the code, and then manipulate how to call it or even omit calling of method from base logic. Look at the following code:

    public class YourExtension : PXGraphExtension< … more

  • Event handlers in Acumatica

    Hello everybody,

    today I want to share with you how order of event handlers in Acumatica is organized.

    Each graph has list of event handlers for each type of manipultaion. Also new declarations of methods can be added to the start or then end of collection, and there are events which are added in the beginning of collection.

    According to T300 event handlers which are added to the end of collection:

        • FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)

        • RowSelecting(PXCache sender, PXRowSelectingEventArgs e)

        • RowSelected(PXCache sender, PXRowSelectedEventArgs e)

        • RowInserted(PXCache sender, PXRowInsertedEventArgs e)

        • RowUpdated(PXCache sender, … more

  • Usage of base views in Acumatica

    Hello everybody.

    Today I want to write interesting detail, which was strange for me. 

    Imagine situation, that you in Extention class want to change some behaviour and want to ask something from view in base graph. You can try to do it with Base.BaseViewName.Cache.Current. And according to my observations it works. But as mentioned in T300 manual To query a data view declared within the base BLC or lower-level extension from the data view delegate, you should redeclare the data view within the BLC extension.

    If you want to ask why this copy/paste needed I honestly will tell you: I don't know :) more

  • Extentsion table in Acumatica with IsOptional

    Hello everybody,

    today I want to notice few words about attribute IsOptional. DAC extension can be mapped by inner join, or by left join statement. 

    [PXTable(IsOptional = value)] // default is false, or Inner join

    public class DACTableExtension : PXCacheExtension<BaseDACTable>

    {

    ...

    }

    As far as I understand idea behind name, IsOptional means are there additional items from left join. And if set to true, means yes, there are, and if set to false ( default way ) there are not.

    The left join way ( IsOptional = true ) can be used for

    not synched tables

    creates extension record when record in base table created or updated

    calculates default field values if no extension table … more

  • DeletedDatabaseRecord in Acumatica

    Hello everybody,

    today I want to share notice about DeletedDatabaseRecord database field. Sometime in db you can notice DeletedDatabaseRecord field. For example there is DAC Sub. You can even wonder what is this if it is not visible for users? It is purposed Acumatica for monitoring is record deleted, and presented. 

    Another area of usage DeletedDatabaseRecord is extension tables. If you want to use extension table, and basic table has DeletedDatabaseRecord, then you should add it to extension table as well. more

  • Auto discovery mechanism of Acumatica Extensibility Framework

    Hello everybody,

    another interesting notice today. 

    Imagine following situation.

    1. You have base class. Let it is called GraphX. 

    2. In your library you created extentions of this grap: GraphXExt1, GraphXExt2 at the same level. For example like this:

    public class GraphXExt1 : PXGraphExtension<GraphX>

    {

    protected virtual void ARTran_USRProjectID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)

    {

    }

    }

    public class GraphXExt2 : PXGraphExtension<GraphX>

    {

    protected virtual void ARTran_USRProjectID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)

    {

    }

    }

    3. Then question, if page will be loaded, which ARTran_ … more

  • What is companyid in Acumatica

    Hello everybody,

    today I want to notice few words about companyid field. What is it's purpose. Initially Acumatica provides two !!!! companyid. 1 and 2. Why two? The first is for some Acumatica internal usage, and then your company will get id 2. Even if you believe that your company deserve to be 1, you'll get 2 or more. It means that first active company will have id 2 or bigger. So, if you have some DAC which should be used by few companies, then you just add companyid field, make it as key, and that's it, Acumatica will track to which company your entity should belong. more

  • Debugging learning algorithm

    Few notes of how to debug machine learning algorithm:

    Get more training examples

    Try smaller sets of features

    Try getting additional features

    Try adding polinomial features

    Try increasing lambda

    Try decreasing lambda

    What those trys can achieve:

    fixes high variance

    fixes high variance

    fixes high bias

    fixes high bias

    fixes high bias

    fixes high variance

    more

  • Grid toolbar buttons in Acumatica

    Hello everybody,

    have you ever wondered, that SkinID property may regulate grid toolbar set of buttons? For me it was unknown untill today. Here it is list of id's and buttons according to T200:

    Primary: Adds the Add, Delete, Fit to Screen, and Exportbuttons to the toolbar. This value is typically used for a grid on a simple edit page that consists of the single grid.

    Details or DetailsInTab: Adds the Refresh, Add, Delete, Fit to Screen, and Export buttons to the toolbar. This value is typically used for a grid that displays the detail data on a master-detail page

    Inquire: Adds the Refresh, Fit to Screen, and Export buttons to the toolbar. This value is typically used for grids on … more

  • Why ColumnWidth can be ignored or another gotcha

    I discovered recently another gotcha in Acumatica.

    The ColumnWidthproperty value is never applied to the UI controls if the Merge property is set to True for the same PSLayoutRule component. more

  • Merged and read-only modes in Acumatica

    Hello everybody,

    today another notice. Acumatica can provide values in two modes: merged and read-only.

    So, what is merged? Imagine that user worked about the form, and made some changes at grid. Will changes apper in DB? Untill will be executed Persist, not. Data will be only in cache. Some time it is useful to compare data in cache with data in db. In order to get merged data you can use PXSelectReadOnly type or PXSelectGroupBy. For merged results you can use PXSelect or PXSelectJoin. more

  • Redirection types in Acumatica

    Hello everybody,

    today I want to notice what kind of redirections are available in Acumatica:

    PXRedirectRequiredException opens the specified application page in the same window or a new one. By default, the user is redirected in the same window.

    PXPopupRedirectException opens the specified application page in a pop-up window.

    PXReportRequiredException opens the specified report in the same window or a new one. By default, the report opens in the same window.

    PXRedirectWithReportException opens two pages: the specified report in a new window, and the specified application page in the same window.

    PXRedirectToUrlExceptionopens the webpage with the specified external URL in a new … more

  • Order of views in Graph in Acumatica

    Hello everybody,

    note of today is value of orders. In the word of C# if you work with your class, you as usually don't care what you declare in your code. But in Acumatica graph order of data viewes is important, because they define order of saving data to the database. If you think that surprises are completed then here it is another one: order of viewes doesn't define order of data viewes execution. And the third one, view that is binded to PrimaryView should be defined first in the graph.  more

  • Enabling Reusable Grid Filters

    Hello everybody,

    today I want to note reusable grid filters. Acumatica has interesting dialog window, wich is named Filter Settings in which user can define and save custom fitlers and then use them every time this user opens the page. They are recommended for usage at inquiry and processing pages, so users can customize these pages to show specific data that is most relevant to their needes and responsibilities. If you wonder how to convert ordinary view to filterable view here is the way: PXFilterable attribute.

    [PXFilterable]

    public PXSelectReadonly<AnticipatedPayrollDetail> AnticipatedPayrollDetails;

    I applied it to my page, and here is example of what I got:

    So, in case if … more

  • Order columns in Grid in Acumatica

    Hello everybody,

    Today I want to share with you interesting trick of how to order data in grid by default. The simplest way is to organize IsKey = true value. If you do this, then Acumatica will add Order by clause for each key field of the DAC. more

  • Restore original condition of Acumatica

    I want to note how to restore original condition of Acumatica if Unpublish project failed:

    1. Restore the content of the App_Data\RollbackFilesfolder to the root folder of the website.

    2. Clear the content of the CstPublishedfolder.

    3. Delete the files placed in the Cachessubfolder of the App_Codewebsite folder.

    4. Remove all external files deployed on the website more

  • Acumatica can have two views with main DAC

    Hello everybody,

    today I want to share option, which was shocking for me. I discovered that graph can have more then one dataview for the same main DAC. Here is sample of code form T200 manual:

    public PXSelect<Product> Products;

    public PXSelect<Product, 

    Where<Product.productID, Equal<Current<Product.productID>>>>

    ProductDetails;

    Here also continaution of the manual why on Earth you can need this:

    These two data views can only be used as data members for UI containers that display the same data record at a time. In such definition of data views, the first one is used to display brief information of a product on a form, and the second one is used to display the detail information of … more

  • Encog Training

    Hello everybody,

    suppose you have read two of my previous notes about network creating and basic input into neural network and now you have huge desire to make training on neural network with Encog. You are on the right way. One of the options which you have to try is the following:

    var train = new Backpropagation(_network, trainSet);double error;

    do

    {

    train.Iteration(); error = train.Error; } while (error > 0.01);

    Backpropogation is one of the trainings algorithms. Other training algorithms of Encog are: LMA, Similated annealing, quick propogation, Mahatan update rule, scaled conjugate rule and other, which I didn't yet tried. 

    In mentioned code train is Backpropogation … more

  • Encog create simple network

    Hello everybody,

    today I want to share how to create simple neural network in Encog. It's very simple process:

    var network = BasicNetwork();

    Each neural network have layer. 

    Example of layer creating: 

    network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 5));

    The first paramether of BasicLayer is activation function, which is in our case ActivationSigmoid,

    The second paramether is Bias neuron. True means that layer will have bias layer also. 

    The third paramether represents number of neurons in layer. 

    If you think that creating network is enough for training, you are wrong. As a lot of staff in our world, in Encog you need to call FinalizeStructure. It looks like … more

  • Backpropogation Encog

    Here is Backpropogation algorithm declaration of Encog:

    var train = new Backpropogation(network, trainingSet, learningRate, momentum);

    Today I discovered for myself purpose of momentum paramether. 

      

    Here we have error function with global minimum and three local minimums. In order to jump out of local minima and run into global minima, neural network can take into account previous modification of weights. Momentum is coeficient, which manages which part of previous iteration take into account. If it is 1, then previous result will be taken into account completely. If it is 0, then previous update will be ignored. more

  • Encog compute

    Hello.

    Some other generalizations of how to use Encog.

    For getting result of network you can use Compute method:

    var output = network.Compute(input);

    If we want to get result of bigger number of items, we can use following construction

    foreach(var item in trainingSet)

    {

    var output = network.Compute(item.Input);

    } more

  • How to add menu to button in Acumatica

    Hello everybody,

    today I want to share trick which I call convert Acumatica button into menu.

    Lets say in graph APBillManager created button in the following way:

    public PXAction<APBill> Report;

    If you want to convert it to menu with one item you can do the following:

    public APBillManager()

    {

    this.Report.AddMenuAction(bankStatementReport);

    }

    public PXAction<PRPayroll> bankStatementReport;

    [PXButton]

    [PXUIField(DisplayName = "Bank Statement")]

    protected void BankStatementReport()

    {

    } more

  • Encog BasicMLDataSet

    Hello everybody,

    today I want to share few words about my learning of Encog.

    Let's say you have array of 15 doubles:

    double []s = new double[15];

    Then for simple case you can use BasciMLData class:

    IMLData data = new BasicMLData(s); 

    Now data can be used to feed data to any neural network. 

    Next point to consider is inputting bigger values.

    Suppose you want to have input as xor:

     

    double [][] xorInput =

    {

    new []{0.0, 0.0},

    new []{1.0, 0.0},

    new []{0.0, 1.0},

    new []{1.0, 1.0}

    };

    // output

    double [][] xorIdeal =

    {

    new []{0.0},

    new []{1.0},

    new []{1.0},

    new []{0.0}

    };

    var trainSet = new BasicMLDataSet(xorInput, xorIdeal);

    Now you can use … more

  • Normalization and scaling in neural networks

    Hello everybody.

    I'm passing coursera course about neural networks.

    Today I discovered for myself reason why normalization and scaling in neural networks provides faster learning. Everything is related with error surface and optimization. If to put simply 

    the task of neural network is to find a global minimub at error surface. Algorithms of study of neural networks gradually move at error surface in order to finally find global minima of error

    surface. Going to global minima in the circle will go faster then going to global minima in some ellipse or other kind of error surface.

    Suppose we have training for neural network with two samples:

    101,101 - > 2

    101, 99 - > 0

    Then error … more

  • Enable disable button of grid or PXToolBarButton, which depends from value of column in Acumatica

    Hello everybody.

    My next notice is about following case. 

    Suppose you have from PR301000, which has grid with id "grid" with button calculate. Also grid has column, which is bounded to column caculated, and you need the following:

    If in selected row field "Calculated" is true, then disable button Calculate. If in selected row field "Calculated" is unchecked, then enable button calculate. 

    In order to implement this following should be implemented:

    1. In grid at page pr301000:

            <ActionBar ActionsText="True">

       <CustomItems>

                    <px:PXToolBarButton Text="Calculate" DependOnGrid="grid" StateColumn="Calculated">

       <AutoCallBack Command="Calculate" Target="ds" > … more

  • Maintenance pages in Acumatica

    Hello everybody.

    Here goes some my notes of Maintenance pages. 

    First convention is that maintenance pages has number start of 20. For example pr203000.aspx means that it is maintenance page for pr, and I make this conclusion on basis that numbers start from 20.

    As usually they are placed under manage group at sitemap and used for input of helper data, not the main. more

  • Create graph instance

    Hello everybody,

    today I want to notice how to create graph. There are two ways:

    PXGraph.CreateInstance<BaseBLC>();

    PXGraph.CreateInstance(typeof(BaseBLC));

    If you want to get extention class, from base class, you can use following function:

    GraphInstance.GetExtension<ExtentionClass>(); more