Giter VIP home page Giter VIP logo

toolgood / toolgood.algorithm Goto Github PK

View Code? Open in Web Editor NEW
104.0 15.0 35.0 48.51 MB

ToolGood.Algorithm is a powerful, lightweight, Excel formula compatible algorithm library aimed at improving developers’ productivity in different business scenes. ToolGood.Algorithm是一个功能强大、轻量级、兼容Excel公式的算法类库,旨在提高开发人员在不同业务场景中的生产力。

License: Apache License 2.0

C# 42.81% Batchfile 0.01% ANTLR 0.79% Java 42.00% JavaScript 13.70% HTML 0.37% CSS 0.32%
algorithm excel excel-expressions script formula-grammar formula expression arithmetic dotnet java

toolgood.algorithm's People

Contributors

dependabot[bot] avatar toolgood avatar zhangbohan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toolgood.algorithm's Issues

日期操作

支持对指定日期的时分秒进行增加或减少操作吗?

=00005.5*10 not work

Hi,

it seems formula =00005.5*10 not work.
=value(00005.5) doesn't work either.
only =value("00005,5")*10 or "00005.5"*10 works.

could you support =00005.5*10 and =value(00005.5)?

thanks,
lyk

提议:ToolGood.Algorithm 合并ToolGood.FlowVision 中的ToolGood.Algorithm2

ToolGood.Algorithm2 与 ToolGood.Algorithm 工程上的扩展,包括了长度、重量、体积换算
Extension of ToolGood.Algorithm2 and ToolGood.Algorithm engineering, including length, weight, and volume conversions

当默认 “长度单位”为米
When the default 'length unit' is meters
当默认 “面积单位”为平方米
When the default 'area unit' is square meters
当默认 “体积单位”为立方米
When the default 'volume unit' is cubic meters
当默认 “重量单位”为千克
When the default 'weight unit' is kilogram

可以设置以下公式 The following formula can be set

if(length > 50cm,1,0)

if(area <=25m2,1,0)

if(weight >50kg,1,0)

if(weight >5t,1,0)

主要原因还是我懒,不想同时维护两套代码。
The main reason is that I am lazy and do not want to maintain two sets of code at the same time.

Year/Month/Day function not working for number

Hi,

I met problems when using year/month/day functions.
In excel Year(44406)=2021,Month(44406)=7, Day(44406)=29.
however, toolgood will give out strange values.

btw, I want to say the toolgood is excellent, really good.

thanks,
lyk

days360 not correct

Hi,

days360(date(2020,5,31),date(2023,12,15)) not working.
in the projection, code "new DateTime(startMyDate.Year, startMyDate.Month + 1, 1).AddDays(-1).Day)" should change to "new DateTime(startMyDate.Year, startMyDate.Month, 1).AddMonths(1).AddDays(-1).Day"

thanks,
lyk

下个版本构思

当前问题:
1、当前语言为法语时,数字识别会出错。
2、运行速度比较慢。

下个版本构思
1、使用Antlr4版本重构
2、JAVA版本

公式返回数字类型都是Double,能否返回实际类型

例如

AlgorithmEngine engine = new AlgorithmEngine();
Operand operand = engine.Evaluate("year(now())");

Object result;
switch (operand.Type()) {
      case BOOLEAN: result = operand.BooleanValue();
      case ARRARY: result = operand.ArrayValue();
      case DATE: result = operand.DateValue();
      case JSON: result = operand.JsonValue();
      case TEXT: result = operand.TextValue();
      case NUMBER: result = operand.NumberValue();
      default: result = null;
  }
assertEquals(2023, result);

未能加载文件或程序集“Antlr4.Runtime.Standard”或它的某一个依赖项

我使用.NET FRAMEWORK 4.7 的 MVC默认项目,添加NUGET包,后运行就报错,应该是版本问题,我换成 4.11的版本后,运行不报错,可是解析报错,似乎是版本里方法不对了,请求支援,非常感谢。以下是报错信息:

未能加载文件或程序集“Antlr4.Runtime.Standard”或它的某一个依赖项。未能验证强名称签名。此程序集可能已被篡改,或者已被延迟签名,但没有用正确的私钥进行完全签名。 (异常来自 HRESULT:0x80131045)
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“Antlr4.Runtime.Standard”或它的某一个依赖项。未能验证强名称签名。此程序集可能已被篡改,或者已被延迟签名,但没有用正确的私钥进行完全签名。 (异常来自 HRESULT:0x80131045)

if(1,123,int("")) return empty

Hi guys,

The formula =if(1,123,int("")) doesn't work. it should return 123, but it return empty. Could you fix it please?

thanks,
lyk

大神,帮我看一下

我这边有一个excel公式,但是没有达到预期的结果,能帮我看一下吗

    
     var express= "IF(ISNUMBER(FIND(\"**\",\"内蒙古,宁夏\")),CEILING(0.4600,1)*10,IF(ISNUMBER(FIND(\"**\",\"青海,甘肃\")),CEILING(0.4600,1)*13,IF(ISNUMBER(FIND(\"**\",\"**,西藏\")),CEILING(0.4600,1)*15,5+(CEILING(0.4600-1,1)*2))))";
        
           AlgorithmEngine engine = new AlgorithmEngine();
              var c = engine.TryEvaluate(express, -1.00);

实际结果应该是15,而不是10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.