How To Make Quick Estimate

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:

  1. Purpose
  2. Goals/Objectives
  3. Success Criteria
  4. What's in/out of scope
  5. Assumptions
  6. Recommended Approach
  7. Business Drivers
  8. Budget
  9. Schedule
  10. Return on Investment
  11. Constraints
  12. Risks
  13. Stakeholders
  14. Preliminary Schedule
  15. Preliminary Estimates
  16. Policies and Standards
  17. Legal Regulatory
  18. Competitor Drivers

If to clarify those matters with potential product owner then to make estimate will be much easier

No Comments

Add a Comment

Some New Features Of Net 4 5

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. 

No Comments

Add a Comment

How To Work With Selector

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 some strange number Acumatica will display TaskCD field. 

But what if you have desire to add as display one more field displayed after "-" sign, as it is in some Acumatica screens. You can add another element, which is named DescriptionField. 

And final part of advice, you can also customize which fields should go in the selector. Take see at the following code:

[PXSelector(typeof(Search<PMTask.taskID,
            Where<PMTask.projectID, Equal<Current<PMTask.projectID>>>>), new Type[]{typeof (PMTask.taskCD), typeof (PMTask.locationID),
                typeof (PMTask.description), typeof (PMTask.status)}, SubstituteKey = typeof(PMTask.taskCD), DescriptionField = typeof(PMTask.description))]

You can try to figure out details at screenshot:

Hope that can help somebody to create selector.

9 Comments

  • dedi said

    Hello

    I made code like this

    [PXDBString(5)]
    [PXUIField(DisplayName="Case No")]
    [PXSelector(typeof(Search<ShipmentSKR.SOShipLineCaseNoSKR.CaseNbr>))]



    I created this code for custom field in shipment tab packages, ShipmentSKR.SOShipLineCaseNoSKR.CaseNbr Is a custom table, But when publish, there is an error likes this

    IIS APPPOOL\SKRDevTest
    Building directory '\WebSiteValidationDomain\App_RuntimeCode\'.
    \App_RuntimeCode\PX_Objects_SO_SOPackageDetail_extensions.cs(19): error CS0118: 'ShipmentSKR.SOShipLineCaseNoSKR.CaseNbr' is a 'property' but is used like a 'type'
    \App_RuntimeCode\PX_Objects_SO_SOPackageDetail_extensions.cs(19): error CS0118: 'ShipmentSKR.SOShipLineCaseNoSKR.CaseNbr' is a 'property' but is used like a 'type'
    Compiler time, in seconds: 7,510337

    Please Help Me, thank you

  • docotor said

    Hello Dedi. Your problem is not with code, but with MS SQL configuration. Your code is correct. You need to add user SKRDevTest as authorized at your SQL server

  • Dave said

    Hi, I am getting a similar error to the above and wondering if you can help?

    I added a field to the customer master to link a business account as a "reseller". Below is my code:

    [PXUIField(DisplayName="Reseller",Visibility = PXUIVisibility.SelectorVisible)]
    [PXSelector(typeof(Search<BAccountR.bAccountID>),
    DescriptionField = typeof(BAccountR.AcctName),
    SubstituteKey = typeof(BAccountR.bAccountID))]

    I'm getting the below...

    Error:
    IIS APPPOOL\DefaultAppPool
    Building directory '\WebSiteValidationDomain\App_RuntimeCode\'.
    \App_RuntimeCode\PX_Objects_CR_BAccount_extensions.cs(26): error CS0118: 'PX.Objects.CR.BAccount.AcctName' is a 'property' but is used like a 'type'
    \App_RuntimeCode\PX_Objects_CR_BAccount_extensions.cs(26): error CS0118: 'PX.Objects.CR.BAccount.AcctName' is a 'property' but is used like a 'type'
    Compiler time, in seconds: 4.7926131

    But if I change BAccountR.AcctName to BAccount.bAccountID it works but on my screen it just shows the ID twice.

    Thanks!

  • docotor said

    Your questions shows that you need some improvement in code conventions used by Acumatica. Each column is reflected by two lines: capital letter of column name and small of column name. Instead of BAccountR.AcctName try to use BAccountR.acctName and error will go away.

  • Royce Lithgo said

    It looks like inclusion of the SubstituteKey = parameter makes the "Search<>" component redundant because the selected value will be whatever is nominated for the SubstiuteKey. Why is it then in your code and also the Framework training courses Select<> (on the primary key) is still specified even though the value returned will be the natural key (specified by SubstituteKey)?

    Here's an example - these 2 code segments produce exactly the same result:

    [PXSelector(
    typeof(Search<Customer.customerID>),
    typeof(Customer.customerCD),
    typeof(Customer.companyName),
    SubstituteKey = typeof(Customer.customerCD))]

    [PXSelector(
    typeof(Customer.customerID),
    typeof(Customer.customerCD),
    typeof(Customer.companyName),
    SubstituteKey = typeof(Customer.customerCD))]

    This however doesn't work (selector wont launch)
    [PXSelector(
    typeof(<Customer.customerID>,
    typeof(Customer.customerCD),
    typeof(Customer.companyName))]

    This works, but returns primary (numeric) key:
    [PXSelector(
    typeof(Search<Customer.customerID>),
    typeof(Customer.customerCD),
    typeof(Customer.companyName))]

  • docotor said

    I can't say about reasons of Acumatica manuals, but mine reason is that Search allows to add some kind of filtering with Where<> . Without Search add Where condition will be problematic

  • Prat said

    How do we use required<> in place of current<> and pass some string constant for selector?

  • docotor said

    Pratt, I'll create new article that explains this

  • docotor said

    Hi Pratt, please take a look: Hello Pratt, take a look: https://blog.zaletskyy.com/required-instead-of-current-in-acumatica

Add a Comment

Jforex Non Standard Time Frame Ema Value

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.getOut().println("finished bar: " + feedData);
console.getOut().println("current bar: " + history.getBar(feedDescriptor.getInstrument(), feedDescriptor.getPeriod(), feedDescriptor.getOfferSide(), 0));
} catch (JFException ex) {
console.getErr().println(ex.getMessage());
an style="color: #333333;">}
pan style="color: #333333;">}
pan style="color: #333333;">});

also those parts were added as import:

import com.dukascopy.api.Unit;

import com.dukascopy.api.feed.IFeedDescriptor;

import com.dukascopy.api.feed.util.TimePeriodAggregationFeedDescriptor;

import com.dukascopy.api.feed.IFeedListener;

No Comments

Add a Comment

Current2 Vs Current In Acumatica

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.

No Comments

Add a Comment

Some Simple Models Of Neurons

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 activity if the (1) exceeds a threshold

Below goes graphical representation with case if threshold = 1

thre are tow equal ways to write equation for binary threshold neuron:

3. Rectified Linear Neurons

it has features of linear and non-linear neurons. Sometime such model is useful.

4. Sigmoid neurons. That one uses some kind of function ( typically logistic ). Another important detail kind of function should be easily derivative.

Below goes example of logistic neuron:

5. Stochastic binary neurons. For me it is puzzling. The use the same equation as logistic but they will output zero or one. And you never know for sure, what it will be. You just know, that the higher is output, the more chances of one, the lower is output, the more chances of zero. 

No Comments

Add a Comment

Speech Recognition With Neural Networks

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:

  1. Pre-processing: convert the sound wave into a vector of acoustic coefficients. Extract a new vector about every 10 milliseconds
  2. Acoustic model: Use a few adjacent vectors of acoustic coefficients to place bets on which par of which phoeneme is being spoken.
  3. 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.

No Comments

Add a Comment

Send Curl Request To Jira From Command Prompt

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.

No Comments

Add a Comment

Send Post Get Delete To Jira

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>
        /// <param name="password">password for log in</param>
        /// <returns>Response body.</returns>
        public static string HttpPost(string url, string data, string userName = "", string password = "", int timeout = 100000)
        {
            
            string Out = String.Empty;
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
            try
            {
                req.ContentType = "application/json";
                req.Method = "POST";
                req.ProtocolVersion = HttpVersion.Version11;
                req.Accept = "*/*";

                AddAuthentication(userName, password, req);
               
                req.Timeout = timeout;
                //req.ContentType = "application/x-www-form-urlencoded";
                byte[] sentData = Encoding.UTF8.GetBytes(data);
                req.ContentLength = sentData.Length;
                using (System.IO.Stream sendStream = req.GetRequestStream())
                {
                    sendStream.Write(sentData, 0, sentData.Length);
                    sendStream.Flush();
                    sendStream.Close();
                }
                HttpWebResponse res = (HttpWebResponse)req.GetResponse();
                System.IO.Stream ReceiveStream = res.GetResponseStream();
                using (System.IO.StreamReader sr = new System.IO.StreamReader(ReceiveStream, Encoding.UTF8))
                {
                    Char[] read = new Char[256];
                    int count = sr.Read(read, 0, 256);

                    while (count > 0)
                    {
                        String str = new String(read, 0, count);
                        Out += str;
                        count = sr.Read(read, 0, 256);
                    }
                }
            }
            catch (ArgumentException ex)
            {
                Out = string.Format("HTTP_ERROR :: The second HttpWebRequest object has raised an Argument Exception as 'Connection' Property is set to 'Close' :: {0}", ex.Message);
            }
            catch (WebException ex)
            {
                Out = string.Format("HTTP_ERROR :: WebException raised! :: {0}", ex.Message);
            }
            catch (Exception ex)
            {
                Out = string.Format("HTTP_ERROR :: Exception raised! :: {0}", ex.Message);
            }

            return Out;
        }

        /// <summary>
        /// Sending GET request.
        /// </summary>
        /// <param name="url">Request Url.</param>
        /// <param name="data">Data for request.</param>
        /// <param name="userName">user name for log in</param>
        /// <param name="password">password for log in</param>
        /// <returns>Response body.</returns>
        public static string HttpGet(string url, string data, string userName, string password)
        {
            string Out = String.Empty;
            Uri uri = new Uri(url);

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url + (string.IsNullOrEmpty(data) ? "" : "?" + data));
            req.ContentType = "application/json";
            req.Method = "GET";

            AddAuthentication(userName, password, req);
            try
            {
                System.Net.WebResponse resp = req.GetResponse();
                using (System.IO.Stream stream = resp.GetResponseStream())
                {
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(stream))
                    {
                        Out = sr.ReadToEnd();
                        sr.Close();
                    }
                }
            }
            catch (ArgumentException ex)
            {
                Out = string.Format("HTTP_ERROR :: The second HttpWebRequest object has raised an Argument Exception as 'Connection' Property is set to 'Close' :: {0}", ex.Message);
            }
            catch (WebException ex)
            {
                Out = string.Format("HTTP_ERROR :: WebException raised! :: {0}", ex.Message);
            }
            catch (Exception ex)
            {
                Out = string.Format("HTTP_ERROR :: Exception raised! :: {0}", ex.Message);
            }

            return Out;
        }

        private static void AddAuthentication(string userName, string password, HttpWebRequest req)
        {
            if (userName != null && password != null)
            {
                string base64Credentials = GetEncodedCredentials(userName, password);
                req.Headers.Add("Authorization", "Basic " + base64Credentials);
            }
        }

        /// <summary>
        /// Sending Delete request.
        /// </summary>
        /// <param name="url">Request Url.</param>
        /// <param name="data">Data for delete.</param>
        /// <param name="userName">user name for log in</param>
        /// <param name="password">password for log in</param>
        /// <returns>Response body.</returns>
        public static string HttpDelete(string url, string data, string userName, string password)
        {
            string Out = String.Empty;
            Uri uri = new Uri(url);

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url + (string.IsNullOrEmpty(data) ? "" : "?" + data));
            req.ContentType = "application/json";
            req.Method = "DELETE";

            AddAuthentication(userName, password, req);

            try
            {
                System.Net.WebResponse resp = req.GetResponse();
                using (System.IO.Stream stream = resp.GetResponseStream())
                {
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(stream))
                    {
                        Out = sr.ReadToEnd();
                        sr.Close();
                    }
                }
            }
            catch (ArgumentException ex)
            {
                Out = string.Format("HTTP_ERROR :: The second HttpWebRequest object has raised an Argument Exception as 'Connection' Property is set to 'Close' :: {0}", ex.Message);
            }
            catch (WebException ex)
            {
                Out = string.Format("HTTP_ERROR :: WebException raised! :: {0}", ex.Message);
            }
            catch (Exception ex)
            {
                Out = string.Format("HTTP_ERROR :: Exception raised! :: {0}", ex.Message);
            }

            return Out;
        }

        private static string GetEncodedCredentials(string userName, string password)
        {
            string mergedCredentials = string.Format("{0}:{1}", userName, password);
            byte[] byteCredentials = UTF8Encoding.UTF8.GetBytes(mergedCredentials);
            return Convert.ToBase64String(byteCredentials);
        }
    }

No Comments

Add a Comment

How To Provide Data For The Grid In Acumatica Without Persiting It To Db

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.

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

As you can see the simplest is PXProcessing with which you can work with one DAC.  Other have features as Join, two classes, OrderBy, etc. But if you wish, you can substitute them completely with something that you consider as needed.

No Comments

Add a Comment