Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

Alex Shtof

@Alex Shtof
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Good way to detect a useful portion of equivalent expressions
    A Alex Shtof

    Well, I suppose that you know that for polynomials of degree n, you need to check for equality at (n+1) points. If all are equal, the polynomials are the same. Anyway, detecting polynomials is NOT easy. They can be computed in many ways, with for loops, while loops and other kinds of computations. It's not always visible by analyzing an expression that it is a polynomial. Alex.

    Algorithms testing beta-testing help learning

  • Good way to detect a useful portion of equivalent expressions
    A Alex Shtof

    Can you define or characterize this "good portion"? For example, if you want to detect equivalence between bounded-degree polynomials (two computer programs or expressions such that their result is eventually a polynomial in the input), and you know the degree bound, it can be easily done by checking a small and finite number of inputs.

    Algorithms testing beta-testing help learning

  • Asynchronous composition using LINQ/Extension methods
    A Alex Shtof

    Hi all developers. Lately I started working on a library that allows to compose complex asynchronous operations from simple ones using LINQ syntax and extension methods. It can be found here. The idea itself was taken from F# asynchronous workflows, so I don't take any credit for the idea, just for the implementation. The need occurred when I was working for a company that had an existing server that provided a known set of operations and we needed to write a UI client that the operations it wanted to perform were composition (sequential or parallel) of the server's operations. So instead of writing the ugly code with callbacks and exception handling we came up with this idea. Here is a simple example for the library's usage:

    // compose an operation that runs two async operations sequentially. Note that the parameters of
    // the second operation depend on the result from the first operation, and so does the final result.
    Async operation =
    from dataItems1 in provider1.AsyncGetDataItems("data items id")
    from dataItems2 in provider2.AsyncGetDataItems(dataItems1)
    select dataItems1.Concat(dataItems2).ToArray();

    // execute the above composed operation. The callback will receive the result.
    operation.Execute(CompletionCallback);

    I would like you to try and and send me any feedback about the design/implementation and of course bug reports. Thanks! Alex. P.S. I Googled it and found out that something already blogged about it. So other people came up with this idea too. I just didn't find a ready-to-use library that people can download and start using, so I decided to write one.

    C# design csharp linq com sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups