Giter Site home page Giter Site logo

ariawase's Issues

About ArrUnZip ( ArrUnZipがあると助かります)

screen shot 2015-02-19 at 2 33 36

要望

AriawaseArrUnZip(仮称)があると助かります。
ArrUnZipはArrZipの反対の機能になります。

ArrUnZipの機能

配列の偶数、奇数の項をペアとみなし、そのペアを別の配列にします。

Array(Array("Coffee", "Beer", "Water"), Array(350, 500, 120))

 ↓

Array("Beer", 500%, "Coffee", 350%, "Water", 120%)

 ↓   ArrUnZip

Array(Array("Beer", "Coffee", "Water"), Array(500%, 350%, 120%))

機能のイメージ

Private Function TempArrUnZip(ByVal arr As Variant) As Variant
    Dim i As Long, arrxA As New ArrayEx, arrxB As New ArrayEx
    For i = 0 To UBound(arr) Step 2
        arrxA.AddVal arr(i)
        arrxB.AddVal arr(i + 1)
    Next i
    TempArrUnZip = Array(arrxA.ToArray, arrxB.ToArray)
End Function

Sub Sample20150219()

    Dim arr As Variant: arr = Array("Beer", 500, "Coffee", 350, "Water", 120)
    Debug.Print Dump(TempArrUnZip(arr))

End Sub

結果
Array(Array("Beer", "Coffee", "Water"), Array(500%, 350%, 120%))

背景

上のような帳票を作る際、ArrUnZipがあるとはかどります。

ぜひ、ご検討のほど宜しくお願いします。

When you test the Log function will fail to test only 8 and 16.

Log関数をテストすると8と16だけテストにひっかかります

Result

----------------------------------------------------------------------------
KoffeeTwoTest
----------------------------------------------------------------------------
- Log_Test
  [8] :
    Expected: <8#>
    But was:  <8#>
  [16] :
    Expected: <16#>
    But was:  <16#>
============================================================================
0 succeeded, 1 failed, took 0.02 seconds.

standard Module

Private Sub KoffeeTestRun()
    Assert.RunTestOf New KoffeeTwoTest
End Sub

Class Module( named KoffeeTwoTest)

Public Sub Log_Test()

    Dim v
    For Each v In ArrRange(1, 500)
        Assert.AreEqual CDbl(v), log(exp(1) ^ v)
    Next v

End Sub

error when compile from VB code

When compile cls file which contains long string, such as a sql query string with above 30 rows,
there will be raise an error and then compile fail
reproduce in excel 2010 and windows 7

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.