Some suggestion for the 1.4 release

Hello
I have a 3D project that i plan to port to Ultraviolet once the 1.4 version will be released
It looks like you are working on the 3D api, and i'm pretty excited about it :p, can't wait ^^
That project is written in java using libGDX, and all i can say is i LOVE their 3D api!
It works just like the SpriteBatch ( batch.render(myModelInstance) ) https://xoppa.github.io/blog/basic-3d-using-libgdx/
It would be cool to see a similar feature, it makes working with 3D a lot easier
Thanks

It's probably going to be a while before the 3D API reaches a usable state, but I'll definitely take a look at libGDX (and any other similar libraries) during the design process.
Thanks for the feedback!

I was testing the 3D api today, and i was happily surprised to see that it is similar to MonoGame, so i took my old project (another one :p) and i tried to port it to UV, but problem, my mesh is not rendered
MonoGame - Code works fine, i just tested it
    public class Chunk
    {
        public int X;
        public int Y;

        public int WorldX;
        public int WorldY;

        private VertexBuffer mVertexBuffer;
        protected int VertexSize = 6;

        private BasicEffect Effect;

        private VertexPositionTexture[] mTmp;

        private bool mDirty = false;

        private Texture2D mTileSet;

        public Chunk(int x, int y)
        {
            X = x;
            Y = y;

            // -4 because origin of tiles is top left corner TODO: use TileMap.TileSize
            WorldX = (int) (-4.0f + x*TileMap.ChunkSize*TileMap.TileSize);
            WorldY = (int) (-4.0f + y*TileMap.ChunkSize*TileMap.TileSize);

            Log.Info(GetType(), $"Chunk[{x},{y}] Pos: {WorldX}:{WorldY}");

            var vertCount = (TileMap.ChunkSize*TileMap.ChunkSize)*VertexSize;
            mTmp = new VertexPositionTexture[vertCount];
            mVertexBuffer = new DynamicVertexBuffer(TheRoguer.Instance.GraphicsDevice, typeof(VertexPositionTexture), vertCount, BufferUsage.None);

            Effect = new BasicEffect(TheRoguer.Instance.GraphicsDevice);
            mTileSet = DataManager.Instance.TileSet;
        }

        public void Paint(int x, int y, Tile tile)
        {
            var index = (x + y * TileMap.ChunkSize) * VertexSize;

            int wx = x * TileMap.TileSize;
            int wy = y * TileMap.TileSize;

            // convert uv to 0 - 1 range
            var uv = new Vector2(tile.Data.UV_X / (float)mTileSet.Width, tile.Data.UV_Y / (float)mTileSet.Height);
            var w = TileMap.TileSize / (float)mTileSet.Width;
            var h = TileMap.TileSize / (float)mTileSet.Height;

            mTmp[index] =       new VertexPositionTexture(new Vector3(wx,                       0, wy),                     new Vector2(uv.X,       uv.Y));
            mTmp[index + 1] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy),                     new Vector2(uv.X + w,   uv.Y));
            mTmp[index + 2] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),  new Vector2(uv.X + w,   uv.Y + h));
            mTmp[index + 3] =   new VertexPositionTexture(new Vector3(wx,                       0, wy),                     new Vector2(uv.X,       uv.Y));
            mTmp[index + 4] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),  new Vector2(uv.X + w,   uv.Y + h));
            mTmp[index + 5] =   new VertexPositionTexture(new Vector3(wx,                       0, wy + TileMap.TileSize),  new Vector2(uv.X,       uv.Y + h));

            mDirty = true;
        }

        public void Update()
        {
            if (mDirty)
            {
                mVertexBuffer.SetData(mTmp);
                mDirty = false;
            }

        }

        public void Draw(ModelBatch batch)
        {
            Effect.Projection = batch.Camera.Projection;
            Effect.View = batch.Camera.View;
            Effect.World = Matrix.CreateTranslation(WorldX,0, WorldY);
            Effect.Texture = mTileSet;
            Effect.TextureEnabled = true;

            foreach (EffectPass pass in Effect.CurrentTechnique.Passes)
            {
                pass.Apply();
                batch.Device.SamplerStates[0] = SamplerState.PointClamp;
                batch.Device.SetVertexBuffer(mVertexBuffer);
                // Draw Primitives seems to be cheaper than DrawUserPrimitives, i hae no idea why
                //batch.Device.DrawUserPrimitives(PrimitiveType.TriangleList, mTmp, 0, (TileMap.ChunkSize * TileMap.ChunkSize) * 2); // because each tile == 2 triangle
                batch.Device.DrawPrimitives(PrimitiveType.TriangleList, 0, mVertexBuffer.VertexCount);
            }

        }
    }

Ultraviolet code, code works, but nothing is rendered
    public class Chunk
    {
        public int X;
        public int Y;

        public int WorldX;
        public int WorldY;

        private VertexBuffer mVertexBuffer;
        protected int VertexSize = 6;

        private BasicEffect mEffect;

        private VertexPositionTexture[] mTmp;

        private bool mDirty = false;

        private Texture2D mTileSet;

        private GeometryStream mGeometryStream;

        public Chunk(int x, int y)
        {
            X = x;
            Y = y;

            // -4 because origin of tiles is top left corner TODO: use TileMap.TileSize
            WorldX = (int)(-4.0f + x * TileMap.ChunkSize * TileMap.TileSize);
            WorldY = (int)(-4.0f + y * TileMap.ChunkSize * TileMap.TileSize);

            Log.Info(GetType(), $"Chunk[{x},{y}] Pos: {WorldX}:{WorldY}");

            var vertCount = (TileMap.ChunkSize * TileMap.ChunkSize) * VertexSize;
            mTmp = new VertexPositionTexture[vertCount];
            mVertexBuffer = DynamicVertexBuffer.Create<VertexPositionTexture>(vertCount);

            mEffect = BasicEffect.Create();
            mTileSet = DataManager.Instance.TileSet;

            mGeometryStream = GeometryStream.Create();
            mGeometryStream.Attach(mVertexBuffer);
        }

        public void Paint(int x, int y, Tile tile)
        {
            var index = (x + y * TileMap.ChunkSize) * VertexSize;

            int wx = x * TileMap.TileSize;
            int wy = y * TileMap.TileSize;

            // convert uv to 0f - 1f range
            var uv = new Vector2(tile.Data.UV_X / (float)mTileSet.Width, tile.Data.UV_Y / (float)mTileSet.Height);
            var w = TileMap.TileSize / (float)mTileSet.Width;
            var h = TileMap.TileSize / (float)mTileSet.Height;

            mTmp[index] =       new VertexPositionTexture(new Vector3(wx,                       0, wy),                         new Vector2(uv.X,       uv.Y));
            mTmp[index + 1] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy),                         new Vector2(uv.X + w,   uv.Y));
            mTmp[index + 2] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),      new Vector2(uv.X + w,   uv.Y + h));
            mTmp[index + 3] =   new VertexPositionTexture(new Vector3(wx,                       0, wy),                         new Vector2(uv.X,       uv.Y));
            mTmp[index + 4] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),      new Vector2(uv.X + w,   uv.Y + h));
            mTmp[index + 5] =   new VertexPositionTexture(new Vector3(wx,                       0, wy + TileMap.TileSize),      new Vector2(uv.X,       uv.Y + h));

            mDirty = true;
        }

        public void Update()
        {
            if (mDirty)
            {
                Log.Info(GetType(), "Chunk dirty, updating..");

                mVertexBuffer.SetData(mTmp);

                Log.Info(GetType(), "Chunk updated");
                mDirty = false;
            }

        }
        public void Draw(ModelBatch batch)
        {
            mEffect.Projection =        batch.Camera.Projection;
            mEffect.View =              batch.Camera.View;
            mEffect.World =             Matrix.CreateTranslation(WorldX, 0, WorldY);
            mEffect.Texture =           mTileSet;
            mEffect.TextureEnabled =    true;

            foreach (var pass in mEffect.CurrentTechnique.Passes)
            {
                pass.Apply();
                batch.Device.SetSamplerState(0, SamplerState.PointClamp);

                batch.Device.SetGeometryStream(mGeometryStream);
                batch.Device.DrawPrimitives(PrimitiveType.TriangleList, 0, mVertexBuffer.VertexCount);
            }
        }
    }

I'm not sure if i'm used the API correctly, or if i'm missing something, what do you think ?

And my ModelBatch class, it is really basic atm, and does nothing special in that case (drawing dynamic mesh)
    public class ModelBatch
    {
        public PerspectiveCamera Camera;
        public RenderTarget2D Target;
        public IUltravioletGraphics Device;

        public ModelBatch(IUltravioletGraphics device, PerspectiveCamera camera)
        {
            Device = device;
            Camera = camera;
        }

        public void Begin()
        {
        }

        public void Render(ModelInstance modelInstance)
        {
            Device.SetDepthStencilState(DepthStencilState.Default);

            foreach (var mesh in modelInstance.Model.Meshes)
            {
                foreach (BasicEffect effect in mesh.Effects)
                {
                    effect.World = modelInstance.Transform;
                    effect.View = Camera.View;
                    effect.Projection = Camera.Projection;
                    foreach (var pass in effect.CurrentTechnique.Passes)
                    {
                        pass.Apply();
                        mesh.Draw();
                    }

                }
            }
        }

        public void End()
        {
        }
    }

One obvious thing which I see is that the last argument to DrawPrimitives() should be the primitive count, not the vertex count. I'm pretty sure this is also the case in MonoGame.
What values are you using for your camera matrices?

Oh you are right! i wonder why it still worked with MonoGame, anyways, i tried with the primitive count (2 per tile) but still nothing, for the camera:

            mProjection = Matrix.CreatePerspectiveFieldOfView(mFovAngle * (float)(Math.PI / 180), Aspect, mNear, mFar);

            var rotation = MatrixUtils.CreateFromYawPitchRoll(YawAngle * (float)(Math.PI / 180), PitchAngle * (float)(Math.PI / 180), 0); // Math rad to deg

            mDirection = Vector3.Transform(new Vector3(0, 0, -1), rotation);
            mUp = Vector3.Transform(Vector3.Up, rotation);
            mRight = Vector3.Cross(mDirection, mUp);
            mRight = Vector3.Normalize(mRight);

            mView = Matrix.CreateLookAt(Position, Position + mDirection, mUp);

values:

Position: 416, 150, 466
Pitch: -70
Yaw: 0
Fov: 60
(top down view)

The size of the mesh should be : 1024x1024   0,0 is top left

Here is how it is rendered in MonoGame with the code i posted
http://i.imgur.com/gt3uf7G.png

Please post a complete project which reproduces this issue and I'll see if I can figure out what's going on.

There you go https://github.com/Scellow/TileMapTest/

Ohhh i feel so stupid: http://i.imgur.com/ny7mJ0G.png
I got it working, i changed the pitch angle from -90 to 90 and the mesh is now visible xD

But that means something, it's not 100% similar to MonoGame one

Yeap, works fine on my project too after changing the pitch angle to positive value http://i.imgur.com/OtOWtt8.png
Sorry for the trouble, i'm so stupid, i tested everything but i forgot to play with the pitch angle value!

OK, I see where the problem with your camera is, now. The matrices that you're building are the wrong way around - see this article on the wiki for details. This is a deliberate difference from XNA and therefore MonoGame.

By the way, which MonoGame backend are you using? DirectX or OpenGL?

Oh i didn't know about the matrices, thanks for the info!
And i'm using the OpenGL one (DesktopGL package)

As for your sampling issue, two things:

Ultraviolet's texture coordinate system is based off of OpenGL's texture coordinate system, which is upside down compared to XNA! You need to subtract the v-coordinate from 1f, otherwise your texture will be upside down.
Your artifacts are probably being caused by the fact that you're sampling the edges of your texels, rather than their centers. Offsetting your texture coordinates by (0.5f / textureSize) should prevent OpenGL from bleeding your textures together.

In other words, this:
var uv = new Vector2(0,0);
var w = TileMap.TileSize / (float)mTileSet.Width;
var h = TileMap.TileSize / (float)mTileSet.Height;

mTmp[index] =       new VertexPositionTexture(new Vector3(wx,                       0, wy),                         new Vector2(uv.X,       uv.Y));
mTmp[index + 1] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy),                         new Vector2(uv.X + w,   uv.Y));
mTmp[index + 2] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),      new Vector2(uv.X + w,   uv.Y + h));
mTmp[index + 3] =   new VertexPositionTexture(new Vector3(wx,                       0, wy),                         new Vector2(uv.X,       uv.Y));
mTmp[index + 4] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),      new Vector2(uv.X + w,   uv.Y + h));
mTmp[index + 5] =   new VertexPositionTexture(new Vector3(wx,                       0, wy + TileMap.TileSize),      new Vector2(uv.X,       uv.Y + h));

Should look more like this:
var uv = new Vector2(0.5f / mTileSet.Width, 0.5f / mTileSet.Height);
var w = (TileMap.TileSize - 1) / (float)mTileSet.Width;
var h = (TileMap.TileSize - 1) / (float)mTileSet.Height;

mTmp[index] =       new VertexPositionTexture(new Vector3(wx,                       0, wy),                         new Vector2(uv.X,       1f - uv.Y));
mTmp[index + 1] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy),                         new Vector2(uv.X + w,   1f - uv.Y));
mTmp[index + 2] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),      new Vector2(uv.X + w,   1f - (uv.Y + h)));
mTmp[index + 3] =   new VertexPositionTexture(new Vector3(wx,                       0, wy),                         new Vector2(uv.X,       1f - uv.Y));
mTmp[index + 4] =   new VertexPositionTexture(new Vector3(wx + TileMap.TileSize,    0, wy + TileMap.TileSize),      new Vector2(uv.X + w,   1f - (uv.Y + h)));
mTmp[index + 5] =   new VertexPositionTexture(new Vector3(wx,                       0, wy + TileMap.TileSize),      new Vector2(uv.X,       1f - (uv.Y + h)));

Basically, MonoGame does a lot of stuff behind the scenes to make OpenGL behave more like XNA, because MonoGame is intended to be a drop-in replacement for XNA. Ultraviolet has no such ambitions, so there are a number of places where it throws out XNA compatibility in favor of OpenGL compatibility. These are a few examples. :smile:

I deleted my previous comment because I realized later that it was completely wrong. If you saw it, please disregard what I said about offsetting texels! I was incorrectly remembering something from XNA that doesn't apply to OpenGL.

This much is still true: Ultraviolet's texture coordinate system is based off of OpenGL's texture coordinate system, which is upside down compared to XNA! You need to subtract the v-coordinate from 1f, otherwise your texture will be upside down.
Your artifacts seem to be caused by MSAA, which Ultraviolet enables by default. There's a good chance I'll end up changing that in the next release, but until then, you can turn it off in the context configuration:

protected override UltravioletContext OnCreatingUltravioletContext()
{
    var configuration = new OpenGLUltravioletConfiguration();
    configuration.MultiSampleBuffers = 0;
    configuration.MultiSampleSamples = 0;
    // etc...
}

I've disabled MSAA by default in 1.3.14.


Best Practice on Client vs new Consumer/Producer

Hello,
I am trying to figure what is good practice for creating consumers or producers.
Is it better to create a Client once and then re-use it to create multiple consumers/producers thru the life of the application?
Alternatively, is the cost of creating a consumer/producer for every message expensive? I have noticed that every instance of consumer/producer creates a new connection with the broker, registers the client & sets up other things.
In my application, I have 1 consumer & 3 different producers. 2 of the producers function as ad-hoc emitters (emit when necessary). Creating a new producer for every send message send  doesn't seem like a good pattern.
Thanks in advance.

Alternatively, is the cost of creating a consumer/producer for every message expensive?

Yes, you don't want to do that in general case, you create a consumer or producer and use it to consume and publish messages to kafka. Once you are done, you close both consumer and producer.
Same thing with client, you create it once and the use to create consumer and producer. client reuse is highly recommended.
https://godoc.org/github.com/Shopify/sarama#Client

Sorry to reopen this issue again, what if i have multiple clients say 10000 should i create a producer for all or is there any best approach?


http-server 0.12.0: index.html as default file is not working

Do you want to request a feature or report a bug?
BUG
If the issue is a bug report, please provide the steps to reproduce it. Please include the actual command causing the issue if applicable.

just in the windows CMD interface, type:
http-server -p 8080
What did you expect to happen?
If there is a file named index.html in the current directory, it will be served as the default file when we access  http://localhost:8080, but it is not working on<EMAIL_ADDRESS>Otherwise, if we rollback to<EMAIL_ADDRESS>it works!
I thought this feature is removed from @0.12.0, but when I come to the README.md, it still says that

index.html will be served as the default file to any directory requests.

Which is right? Update docs or add the feature?

What does http-server output to the cmd prompt, and what do you see in the browser when this happens? Do you see a listing of files or get a 404 error?

Amazing, yesterday it's not working, but today it works on version#0.12.0.
@thornjad  thank you for reply


Random crash

Description
I was just playing a show "Blacklist" s10-e03, and then pressed back and back to homepage, and left the tv for a min, and it randomly closed the app, I wasn't even touching the remote.
Not sure how to get a log for you, maybe a debug version can be made?
Reproduction steps

play Blacklist s10e03 from latest tv shows on homepage
press back to homepage
wait for crash? not sure if this had anything to do with it

App version
v1.3.1 (Latest)
Operating system
shield android tv
Logs
No response
Please confirm the following

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
[X] If related to a provider, I have checked the site and it works, but not the app.

Okay thank you for all those informations, I'll look into it.

I'm gonna close this issue, I haven't noticed any crashing with the new update and i've been testing it a lot


Can we have WsiAnnotations.get_scaled_view(scaling) and WsiAnnotations.get_scaling(target_mpp) ?

Since the annotations for our images can be generated at arbitrary resolutions (ex: from the outputs of a deep learning model), it might be a useful to have:

A feature that generates a scaled view of the annotations for a given scaling parameter.
A feature that generates the necessary scaling for a given target_mpp.

That's a great idea. Can you propose a design?

That's true. Since it's unknown at what mpp the annotations were generated, we can at least think about get_scaled_view()
Something like the following:
slide_image = SlideImage.from_file_path(image)
scaling = slide_image.get_scaling(target_mpp) # target_mpp should be user defined.
slide_annotations = WsiAnnotations.from_geojson(mask_path) # Assuming that the masks are stored as geojson files.
scaled_slide_annotations = slide_annotations.get_scaled_view(scaling=scaling, region_size=slide_image.size)

And, the function can look like this:
def get_scaled_view(self, scaling, region_size) -> list[Polygon | Point]:
    return self.read_region((0,0), scaling=scaling, region_size=region_size)

Let me know what you think.

Changed the issue requesting one feature instead of two. get_scaling() can be done with the properties of SlideImage and hence, it's redundant to implement in WsiAnnotations()

@AjeyPaiK Can you implement the same as it's implemented with _image.py?


As Portal User, I need to access Help and FAQ session so that I can see if my question about the portal has already been addressed.

From @czdiana2321 on May 21, 2018 19:36
USER->UI
Acceptance Criteria:
1.Portal User is taken to the Help and FAQ Page
2. Portal User is able to view and browse the list of questions and answers.
Copied from original issue: Microsoft/Access2Justice#79

@grawdon and @breeglej Is this "complete"?  Are these features to be further developed over time?

@KellyeDC @grawdon  - I don't see what else we could do with this right now.  We will have to add to the FAQs over time.

Agreed.  Should we add a placeholder to continue Q&A development?
Kellye Bennett
Legal Navigator Project Manager
Legal Services Corporation
<EMAIL_ADDRESS>Office of Information Technology
3333 K Street, NW
Washington, DC 20007
P:<PHONE_NUMBER>
E: bennettk<EMAIL_ADDRESS>From: Jada Breegle<EMAIL_ADDRESS>Sent: Thursday, April 25, 2019 8:22 AM
To: LSCOIT/LegalNavigator<EMAIL_ADDRESS>Cc: Kellye Bennett<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [LSCOIT/LegalNavigator] As Portal User, I need to access Help and FAQ session so that I can see if my question about the portal has already been addressed. (#62)
@KellyeDChttps://github.com/KellyeDC @grawdonhttps://github.com/grawdon - I don't see what else we could do with this right now. We will have to add to the FAQs over time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/LSCOIT/LegalNavigator/issues/62#issuecomment-486649731, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK5GT5GHJMUUNVQRH7PQ72LPSGPAJANCNFSM4GQIV5PQ.
Caution External Email Alert!
This message was sent from someone outside of LSC. Please do not click on links or open attachments unless you recognize the source of this email and know that the content is safe. If you believe that this email is a phishing attempt or contains malicious files or offensive content please contact the OIT HelpDesk.
OITHELPDESK mailto:oithelpdesk.lsc.gov

@KellyeDC - It might be more of a task in our Smartsheet as it is not development.

Thanks! I’ll add it
Get Outlook for iOShttps://aka.ms/o0ukef

From: Jada Breegle<EMAIL_ADDRESS>Sent: Thursday, April 25, 2019 2:57 PM
To: LSCOIT/LegalNavigator
Cc: Kellye Bennett; Mention
Subject: Re: [LSCOIT/LegalNavigator] As Portal User, I need to access Help and FAQ session so that I can see if my question about the portal has already been addressed. (#62)
@KellyeDChttps://github.com/KellyeDC - It might be more of a task in our Smartsheet as it is not development.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/LSCOIT/LegalNavigator/issues/62#issuecomment-486797099, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK5GT5HCKP6EGO3GOSGRCR3PSH5KLANCNFSM4GQIV5PQ.
[X]
Caution External Email Alert!
This message was sent from someone outside of LSC. Please do not click on links or open attachments unless you recognize the source of this email and know that the content is safe. If you believe that this email is a phishing attempt or contains malicious files or offensive content please contact the OIT HelpDesk.
OITHELPDESK mailto:oithelpdesk.lsc.gov

These items will be updated through the admin portal for static content.


How to access chargingProfiles writeable?

 Therefore I need to switch the target soc state depending on time of day. During the day the car can get 80% SOC by solar power, during night times SOC should be limited to 50% from grid.
When you have configured a charging profile the settings there overrule the normal soc settings.
I understand that by now domains/chargingProfiles/chargingProfilesStatus/profiles/1/targetSOC_pct is not a writeable topic.
Any ideas? Maybe there is a special reason for this not beeing a writeable topic?
Thanks

Just start and stop the charging depending of the time of the day & SOC. Leave the general SOC setting to 80%. Write a simple code that checks that if the local time is more than 20:00 and SOC is more than 50%, then send a MQTT command to stop charging. I would also check that if the car is near this stupid charger (coordinates can be found from the parking topic) and if it's charging or not, so you don't send the stop command unneccesarly. And have a 10 minute timer since some times it takes a long time to see a change in the charging topic.

I understand that by now domains/chargingProfiles/chargingProfilesStatus/profiles/1/targetSOC_pct is not a writeable topic.
Any ideas? Maybe there is a special reason for this not beeing a writeable topic?

No specific reason, it is just not implemented yet. Easiest solution is to not use the profile at the chargers location but to set the general target soc topics.


Type hints

This PR adds:

Type hints
Masking of zero-values from arrays where dimension > 1

Needs more work

Needs more work


Error message wrong when putting a wrong User ID

Flintrock version: 0.5.0
Python version:  3.5
OS: Amazon Linux

When I put a wrong user name for an AMI (the correct user name was "root", but I put my AWS user name) and I got this error.
Launching 6 instances...
There was a problem with the launch. Cleaning up...
Do you want to terminate the 6 instances created by this operation? [Y/n]: y
Terminating instances...
Traceback (most recent call last):
  File "/Users/myeong/anaconda/bin/flintrock", line 11, in <module>
    sys.exit(main())
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/flintrock.py", line 871, in main
    cli(obj={})
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/flintrock.py", line 322, in launch
    instance_initiated_shutdown_behavior=ec2_instance_initiated_shutdown_behavior)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/ec2.py", line 46, in wrapper
    res = func(*args, **kwargs)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/ec2.py", line 629, in launch
    identity_file=identity_file)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/core.py", line 399, in provision_cluster
    _run_asynchronously(partial_func=partial_func, hosts=hosts)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/core.py", line 365, in _run_asynchronously
    loop.run_until_complete(asyncio.gather(*tasks))
  File "/Users/myeong/anaconda/lib/python3.5/asyncio/base_events.py", line 337, in run_until_complete
    return future.result()
  File "/Users/myeong/anaconda/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/Users/myeong/anaconda/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/core.py", line 452, in provision_node
    wait=True)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/flintrock/ssh.py", line 71, in get_ssh_client
    timeout=3)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/client.py", line 307, in connect
    look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/client.py", line 519, in _auth
    raise saved_exception
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/client.py", line 444, in _auth
    key = pkey_class.from_private_key_file(key_filename, password)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/pkey.py", line 184, in from_private_key_file
    key = cls(filename=filename, password=password)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/ecdsakey.py", line 49, in __init__
    self._from_private_key_file(filename, password)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/ecdsakey.py", line 145, in _from_private_key_file
    data = self._read_private_key_file('EC', filename, password)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/pkey.py", line 256, in _read_private_key_file
    data = self._read_private_key(tag, f, password)
  File "/Users/myeong/anaconda/lib/python3.5/site-packages/paramiko/pkey.py", line 265, in _read_private_key
    raise SSHException('not a valid ' + tag + ' private key file')
paramiko.ssh_exception.SSHException: not a valid EC private key file

Just reporting that this error message needs to be fixed -- since it's not a key problem.
Thanks!

Hi @myeong, and thank you for using Flintrock.
Unfortunately, detecting when the provided username is incorrect is surprisingly difficult.
If you have any suggestions on how better to handle this situation I'm all ears!

Thanks for the quick response. For a quick and dirty solution, how about changing the error message something like "your AWS key or username has a problem"? I will keep exploring for the issue meanwhile :)

When I put in an incorrect username, I get this error:
paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 54] Connection reset by peer

So it's different from the error you see, which goes to my earlier comment about this being difficult to catch and report on properly without potentially confusing the user if the problem is actually something else.
I'm going to close this for now, but I am still interested in nudging the user in the right direction if it can be done without risking further confusion.
Maybe catching certain SSH exceptions and offering a hint of what might be wrong is the right thing to do. I'm not sure, but I would consider a PR that added this.


fix: update to @dabh/colors for security vuln

A Security Vuln was identified in the Colors package for >1.4.0, offending packages being 1.4.1, 1.4.44-liberty

source1
source2
source3

This PR updates the color package to using @dabh/colors as stated on this colors issue #317 which is a safe alternative.

Hello Manny,
This project has not had a significant commit in 3 years?
NPM has already removed the offending version ( https://www.npmjs.com/package/colors )
There is no need for this change 👍
This project is not compromised


Adding KB article to address bucket LIST issue

This article will help provide some ways to mitigate an issue seen when
using the LIST command on a bucket.

Our preference is for new articles to be in markdown format. Would you mind converting this?


Add view with nested admin boundaries

Idea and original proof of concept SQL queries from @verfriemelt-dot-org
More details coming soon pending ongoing conversation.

I think the core requirements identified here are addressed.  There are probably improvements to be made RE how this works, and edge cases, those are best suited as new issues.

I think the core requirements identified here are addressed.  There are probably improvements to be made RE how this works, and edge cases, those are best suited as new issues.


Option to disable SSL certificate verification

Hello,
First of all, congrats for this great Kibana proxy, it helps a lot!
When trying to use aws-es-kibana on a laptop connecting to AWS Kibana through an SSH tunnel, we get an [ERR_TLS_CERT_ALTNAME_INVALID] error due to http-proxy.
However there is an option on line 129 of index.js that is hardcoded to secure: true that would allow the use case to work.
Would it be possible to have a command-line argument to put this option as false?

PR #63 to add the -U (unsecure, to disable SSL certificate validation) option


DWT support

Hello, is there interest for a PR with DWT support? Multiplying polynomials mod x^n+1 is very important for lattice cryptography. Is this lib suitable for it? Since this lib uses floating point I don't know if it will work

I've looked into DWT before and I find it interesting. I suspect it would be sort of mission creep for this crate to implement it though. I'm going to say no for now, in the interest of keeping this crate tightly focused on its initial goals.


Check for invalid thread argument

Coverage increased (+1.7%) to 62.393% when pulling d772f32dc96fbe166cd33aa2b3e242f870509e11 on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.

Coverage increased (+1.7%) to 62.393% when pulling d772f32dc96fbe166cd33aa2b3e242f870509e11 on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.

Coverage increased (+1.7%) to 62.393% when pulling d772f32dc96fbe166cd33aa2b3e242f870509e11 on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.

Coverage increased (+1.7%) to 62.393% when pulling 2e00fb71545b1798797e6ba2b247d666f4d93dee on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.

Coverage increased (+1.7%) to 62.393% when pulling 2e00fb71545b1798797e6ba2b247d666f4d93dee on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.

Coverage increased (+1.7%) to 62.393% when pulling 2e00fb71545b1798797e6ba2b247d666f4d93dee on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.

Coverage increased (+1.7%) to 62.393% when pulling 3cb8f17bf03c33dec1bcca0e25585287110445bc on argument_check into 43f567264b3c109ed87deecd14980b594c898baa on master.


Image Zooming

Implementation of the same using opencv.

Implementation of the same using opencv.

I am GSSoC'21 participant and I want to work on this issue.
Kindly assign this to me. @geekquad

Go ahead @ainy-123.
The folder should be inside ImageResize.


homebrew support

seems like someone opened this PR. https://github.com/Homebrew/homebrew-core/pull/15912
Is there any way to get this merged?
I cannot comment on the thread.

I'd like to see this supported as well.


Add doi

Many thanks to contributing to nf-core/chipseq!
Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs).
PR checklist

[ ] This comment contains a description of changes (with reason)
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If necessary, also make a PR on the nf-core/chipseq branch on the nf-core/test-datasets repo
[ ] Ensure the test suite passes (nextflow run . -profile test,docker).
[ ] Make sure your code lints (nf-core lint .).
[ ] Documentation in docs is updated
[ ] CHANGELOG.md is updated
[x] README.md is updated

Learn more about contributing: https://github.com/nf-core/chipseq/tree/master/.github/CONTRIBUTING.md

Grrrrrr. I dont think Ive done this right.
Done exactly the same as the atacseq pipeline. Maybe Im missing something...


Should hot loading work for reducers?

When trying to perform a trivial change to a reducer, I got the following:

Is hot loading supported for reducers in your boilerplate? It's broken in my personal setup as well (webpack-dev-server) and I'm trying to understand why both fail.

quote from Dan Abramov
So instead of
const nextRootReducer = require('./reducers/index');
you probably want
const nextRootReducer = require('./reducers/index').default;
which matches the Babel 6 output for ES6 default exports.
Have to work on this :)
2016-01-09 15:25 GMT+02:00 Juho Vepsäläinen<EMAIL_ADDRESS>
When trying to perform a trivial change to a reducer, I got the following:
[image: screenshot 2016-01-09 15 24 07]
https://cloud.githubusercontent.com/assets/166921/12216292/194dea6c-b6e5-11e5-8f9c-eb83f4fe8951.png
Is hot loading supported for reducers in your boilerplate? It's broken in
my personal setup as well (webpack-dev-server) and I'm trying to understand
why both fail.
—
Reply to this email directly or view it on GitHub
https://github.com/anorudes/redux-easy-boilerplate/issues/40.

@inertum Works great. Thanks.

very nice!

this is fixed in our package aswell


Add content about accessibility of Frontend docs

Context
We're doing an overall accessibility audit of our Tech Docs Template technical documentation across GDS.
Changes proposed in this pull request
Following the audit and improvements to the Frontend docs July, we now need to publish accessibility content as part of the Design System accessibility statement.
I've made clarifications in the statement so it's clear when we're talking about the Design System website and when we're talking about the Frontend docs.
Before we merge

[ ] General TDT accessibility statement has been published
[ ] Add missing date

You can preview this change here:
Built with commit 2b07997ad3fa287b3cbc6727811441bf78a486b1
https://deploy-preview-1342--govuk-design-system-preview.netlify.app

You can preview this change here:
Built with commit 46d62b8c484a4140ad12950e7177ffaf5eeaddc7
https://deploy-preview-1342--govuk-design-system-preview.netlify.app


Cannot adopt access point with 4.8.x - Unifi local copy of snappy missing FreeBSD native library

Unifi software 4.8.14 seems to start and work fine after upgrade. However; it cannot adopt my access point.
Turns out that the following error is preventing adoption:
server.log.1:[2016-04-04 16:05:36,869]  WARN  system - cannot load native lib - ubnt_webrtc_jni
server.log.1:org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=FreeBSD and os.arch=amd64
I resolved this by symlinking the FreeBSD snappy package jar into the Unifi directory. Not sure if something is unique about my setup causing this issue (it worked fine for older releases including if I revert now) or if others are facing the same problem.

I have the same problem with 4.8.14.

What version of pfSense?

It was present under 2.2.6;
I'm currently in the process of trying to fix it 2.3 but it is taking some time due to the changes to the package manager.

Actually I'm getting a slightly different error but I believe that they are related (see full error log below), The error has remained the same between 2.2.6 and 2.3, but I've upgraded UniFi to V4.9.2 of the controller software in an attempt to fix the adoption fixed, so your mileage may vary with the below.
The fix is to install snappyjava, "pkg install snappyjava"
Backup the old package snappy file /usr/local/UniFi/lib/snappy-java-1.0.5.jar
Simlink or copy the package to from  /usr/local/share/java/classes/snappy-java.jar to /usr/local/UniFi/lib/snappy-java-1.0.5.jar
Then re-start / start Unifi
Others experiencing the issue can be found here.
https://community.ubnt.com/t5/UniFi-Routing-Switching/Unifi-4-6-3-controller-under-freebsd/td-p/1229394
Error
[2016-04-16 00:33:09,819]  INFO  system - housekeeper[stat-daily] exception caught
com.mongodb.MongoException: '$set' is empty. You must specify a field like so: {$mod: {: ...}}
at com.mongodb.CommandResult.getException(CommandResult.java:100)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:134)
at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155)
at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:349)
at com.mongodb.DBCollection.update(DBCollection.java:177)
at com.mongodb.DBCollection.update(DBCollection.java:208)
at com.ubnt.service.OoOO.K.o00000(Unknown Source)
at com.ubnt.service.OoOO.K.?00000(Unknown Source)
at com.ubnt.service.OoOO.H.o00000(Unknown Source)
at com.ubnt.service.OoOO.H.o00000(Unknown Source)
at com.ubnt.service.OoOO.H$12.run(Unknown Source)
at com.ubnt.ace.E$_Oo.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Thanks @NorfAlrin! That fixed my issues!

I'm running the newest version of pfsense 2.3.1-RELEASE-p1 I've modified the install script to have the newest unifi package  4.8.18. For the most part it runs great I had to fix this issue though but it could very easily be fixed by changing the install script and adding this fetch http://pkg.freebsd.org/freebsd:10:x86:64/release_1/All/snappyjava-<IP_ADDRESS>_1.txz tar vfx snappyjava-<IP_ADDRESS>_1.txz cp ./usr/local/share/java/classes/snappy-java.jar /usr/local/UniFi/lib/snappy-java-1.0.5.jar
When this was all done i was able to upgrade both of my APs to the newest firmware and they adopted just fine. So just running those 3 lines of code fixes this issue.

Sounds great! I wasn't sure how best to proceed. Can you prepare a patch?
On Sat, May 28, 2016 at 9:53 PM, 74kumi<EMAIL_ADDRESS>wrote:

I'm running the newest version of pfsense 2.3.1-RELEASE-p1 I've modified
the install script to have the newest unifi package 4.8.18. For the most
part it runs great I had to fix this issue though but it could very easily
be fixed by changing the install script and adding this fetch
http://pkg.freebsd.org/freebsd:10:x86:64/release_1/All/snappyjava-<IP_ADDRESS>_1.txz
tar vfx snappyjava-<IP_ADDRESS>_1.txz
cp ./usr/local/share/java/classes/snappy-java.jar
/usr/local/UniFi/lib/snappy-java-1.0.5.jar
When this was all done i was able to upgrade both of my APs to the newest
firmware and they adopted just fine. So just running those 3 lines of code
fixes this issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/gozoinks/unifi-pfsense/issues/29#issuecomment-222339787,
or mute the thread
https://github.com/notifications/unsubscribe/ABn_sO_oWaU-f-xvzrgJi-4wqKxIGaNjks5qGP-tgaJpZM4IAN69
.

--
j

Should be resolved in latest pull request.

Resolved in earlier merge.


Nav hover and browse all category position Fixed

Nav hover and browse all category position Fixed
Description
Remove the hover effect of navbar and fix the position of browse all category Fixed.
Issue
Issue Link resolve #247
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

@MAVRICK-1  When you get a free time please check and merge it.

@Hemu21 remove the hover effect from navbar

@MAVRICK-1 done updated.

@Hemu21 great work


Run program with user input

If i want to give some user input, how can i do this by your package. Please help on it.
Attached Screenshot.
Thanks

Interactive user Input/Output is not supported currently. It gives all of the input at once and collects all the output and gives you back.
Feels like a good idea to work upon. I will work upon it soon.


[wip] Add full scans feature

Exposing the following functions:

getOrgFullScanList
getOrgFullScan
getOrgFullScanMetadata
deleteOrgFullScan

@bcomnes For creating a full scan, I tested the implementation locally in the CLI with this demo code sample:
  const result = await handleApiCall(socketSdk.createOrgFullScan('SocketDev', {
    repo: 'socket-cli-js',
    branch: 'master',
    make_default_branch: true,
    set_as_pending_head: false,
    tmp: true
  }, ['package.json']), 'Creating full scan')

and it worked.
Let me know if you think there is something I missed.


added pytest fixture factory for s3

Title for squash and merge:
added pytest fixture factory for s3 (GDEV-385)

Description for squash and merge:
Implemented a factory function that generates pre-configured
pytest fixture for testing S3-dependent code.

Codecov Report

Merging #39 (71a7fc0) into dev (f20882f) will increase coverage by 1.10%.
The diff coverage is 97.95%.

@@            Coverage Diff             @@
##              dev      #39      +/-   ##
==========================================
+ Coverage   82.57%   83.68%   +1.10%
==========================================
  Files          14       14
  Lines         574      619      +45
==========================================
+ Hits          474      518      +44
- Misses        100      101       +1

Impacted Files
Coverage Δ

..._service_chassis_lib/object_storage_dao_testing.py
97.82% <90.00%> (-2.18%)
:arrow_down:

ghga_service_chassis_lib/s3_testing.py
100.00% <100.00%> (ø)

ghga_service_chassis_lib/utils.py
72.22% <100.00%> (+3.47%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f20882f...71a7fc0. Read the comment docs.


Write non-output to stderr when there is output

This allows one to redirect checkstyle and diff output directly to a file.
:;  cargo fmt -- --write-mode checkstyle > xml.xml
Using rustfmt config file /Users/solidsnack/sandbox/jsoncdc/rustfmt.toml for /Users/solidsnack/sandbox/jsoncdc/src/lib.rs

r+ with the test passing

Not formatting my patch to rustfmt...  ¬_¬

An update to syntex_syntax led to a panic! when parsing the macro in src/bin/rustfmt.rs. Apparently the new version does not like the macro syntax with parens. This could lead to a regression.

Thanks!


java.lang.RuntimeException: Unknown exception code: 1 msg null

Getting the following crash reported in an app I'm working on
Caused by java.lang.RuntimeException: Unknown exception code: 1 msg null
       at android.os.Parcel.readException(Parcel.java:1484)
       at android.os.Parcel.readException(Parcel.java:1426)
       at android.app.ActivityManagerProxy.checkPermission(ActivityManagerNative.java:3450)
       at android.app.ContextImpl.checkPermission(ContextImpl.java:1703)
       at android.content.ContextWrapper.checkPermission(ContextWrapper.java:570)
       at android.content.ContextWrapper.checkPermission(ContextWrapper.java:570)
       at android.support.v4.content.PermissionChecker.checkPermission(PermissionChecker.java:89)
       at android.support.v4.content.PermissionChecker.checkSelfPermission(PermissionChecker.java:125)
       at permissions.dispatcher.PermissionUtils.hasSelfPermissions(PermissionUtils.java:40)

I'm not sure what the cause is but looking at this issue reported in the Appboy SDK https://github.com/Appboy/appboy-android-sdk/issues/42 their solution was to wrap the call in a try/catch
Do you know what may be the cause?

Could you give us a minimum project that reproduces this issue?

Are you experiencing this consistently on a particular device? What's the OS version on it? This issue is most definitely related to the support library's PermissionChecker class. We'll have to check the Android source in order to find the root of this. As you said, both Appboy and PayPal wrap their checkSelfPermission invocation in a try/catch and that's it, which seems to be fine, however I'd like to find out what's causing this first.

I can't reproduce it locally unfortunately.
Lenovo A816 on 4.4.4 is the main device we're seeing it reported on, when retrieving Contacts permissions in my case.

This is the offending implementation of Parcel#readException:
/**
 * Use this function for customized exception handling.
 * customized method call this method for all unknown case
 * @param code exception code
 * @param msg exception message
 */
public final void readException(int code, String msg) {
    switch (code) {
        case EX_SECURITY:
            throw new SecurityException(msg);
        case EX_BAD_PARCELABLE:
            throw new BadParcelableException(msg);
        case EX_ILLEGAL_ARGUMENT:
            throw new IllegalArgumentException(msg);
        case EX_NULL_POINTER:
            throw new NullPointerException(msg);
        case EX_ILLEGAL_STATE:
            throw new IllegalStateException(msg);
        case EX_NETWORK_MAIN_THREAD:
            throw new NetworkOnMainThreadException();
    }
    throw new RuntimeException("Unknown exception code: " + code
            + " msg " + msg);
}

Since the default EX_ constants are all negative and no suitable case exists for code 1, the RuntimeException is raised. I haven't found the meaning of this status code yet. For now I think that we should simply adjust to what everybody else does, assume the non-zero result to be an error trying to obtain the Permission state, and return false in PermissionUtils.

Closed by #108 .
@kassim Do you need new version soon?

@kassim Just released 2.0.8 to jcenter.

Cheers guys, much appreciated.


⚠ Anthelion has degraded performance

In 6f297ba, Anthelion ($ATH) experienced degraded performance:

HTTP code: 200
Response time: 4791 ms

Resolved: Anthelion performance has improved in 1bb4559 after 412 days, 9 hours, 3 minutes.


Add a google colab ipynb to demonstrate how to use aopy in google colab

the relevant line of code: !pip install git+https://github.com/aolabNeuro/analyze.git

Update: Sept 21 2021 - working on "first draft" of google colab:

adding installation of aopy git
add how to mount google drive to access data
add test function (https://analyze.readthedocs.io/en/latest/preproc.html?highlight=detect edges#aopy.preproc.detect_edges)
download as a python notebook and put it into the examples

Sample Google Colab Notebook: https://colab.research.google.com/drive/1ivOTa0YPRVQ-HB5cuTwnhgJEvULNxmKJ?usp=sharing


AL extension in macOS: can't publish web services

If you try to publish an AL app to Business Central that includes one or more xml files that publish objects as web services, publishing fails with an "Object reference not set":
[2020-01-27 10:39:27.10] The request for path /navserverdev/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code 422. Reason: Could not install the extension Test on tenant default due to the following error: Object reference not set to an instance of an object.

In order to reproduce it, you just have to create a new project with a simple codeunit:
codeunit 50100 Test
{
    procedure Test()
    begin
    end;
}

And add an xml file that publishes it as a web service:
<?xml version="1.0" encoding="utf-8"?>
<ExportedData>
    <TenantWebServiceCollection>
        <TenantWebService>
            <ObjectType>5</ObjectType>
            <ServiceName>Test</ServiceName>
            <ObjectID>50100</ObjectID>
            <Published>true</Published>
        </TenantWebService>
    </TenantWebServiceCollection>
</ExportedData>

The app publishes without problems if using the AL Extensions in VS Code for Windows, but fails with the specified error if published from VS Code for macOS.
AL Language Extension: 4.0.218468
Business Central version: 15.1.37285.0 (es)

Can you try with the latest preview release? This should have been fixed.

Hi @atoader , I've just checked with AL extension 5.0.236243 and I can confirm that it is indeed fixed! 😄


Add a lifetime calculator module

This issue proposes the addition of a phasorpy.lifetime module for fluorescence lifetime and energy transfer (FRET) calculations with the following features:

calculate phasor coordinates from time- and frequency-domain signals
convert between

phasor coordinates
phase and modulation
apparent single lifetimes
lifetime mixtures with fractional intensities or pre-exponential amplitudes

reference phasor coordinates
generate synthetic signals, time domain decay and frequency domain wave
calculate FRET as a function of

donor and acceptor lifetime
FRET efficiency
donors with FRET
donor in acceptor channel
direct acceptor excitation
donor and acceptor channel background
frequency

n-dimensional aware

Implementations of exponential or global fitting are not planned.
Some of the implementation can be taken from the vLFD Lifetime Demo (written in ~2007). That requires the following steps:

port code from Python 2 to 3
replace C extension module with numpy or Cython
make n-dimensional aware
add tests
add documentation
convert interactive app to tutorial or console script

Hello everyone,
I'd like to share a set of Python functions in this code snippet for the proposed phasorpy.lifetime  module, with the hope that they can be of assistance in addressing some of the features described in the project request.
The code relies on a few external libraries:

NumPy: Used for various mathematical operations, including array handling and calculations.

Shapely: Required for working with polygons and geometric operations. Install it using  pip install shapely.

Matplotlib: Utilized for generating plots and visualizing data. Install it using pip install matplotlib.

Here's an overview of the key functions and their roles in the context of your project:

phasor_coordinates_FD(phi, mod):

Purpose: Converts phase and modulation data into phasor coordinates in the frequency domain.

ph_coordinates2phmd(g, s):

Purpose: Converts phasor coordinates back into phase and module.

polished_hist(g, s, hist_bins):

Purpose: Generates a polished 2D histogram from provided phasor data.

contour_plot(histogram, levels, limits):

Purpose: Creates a contour plot from a histogram with specified contour levels and limits.

analyze_contourplot(contour_segments):

Purpose: Analyzes contour segments of the phasor plot histogram and identifies both phasors and regions of interest.

simple_lt(g, s, flim_frequency):

Purpose: Calculates lifetime values from phasor coordinates and FLIM frequency, as τm and τ φ

lifetime_computation(g, s, flim_frequency):

Purpose: Computes lifetime values and standard deviations from phasor coordinates and FLIM frequency with error propagation

refplot(names, lifetimes, flim_frequency):

Purpose: Generates reference phasor coordinates based on sample lifetimes and FLIM frequency.

Segment_IntensityFractions(RefA, RefB, target, labels):

Purpose: Calculates intensity fractions between two reference points and a target phasor.

I've left the FRET-related functionalities as they are, as I'm not experienced in that domain. If you have any specific guidance or if you'd like to explore an object-oriented approach, please let me know.
Warm regards,
Mario

import numpy as np
from shapely.geometry import Polygon
import matplotlib.pyplot as plt

def phasor_coordinates_FD(phi, mod):
# Convert phase and module information into phasor coordinates in the frequency domain.
# Parameters:
# - phi: Phase angle in radians.
# - mod: Module.
# Returns:
# - g: Real part of the phasor coordinates.
# - s: Imaginary part of the phasor coordinates.
#
# This function takes phase and moduleinformation (phi and mod) and computes the corresponding phasor
# coordinates (g, s) in the phasor plot. It is valuable for converting phase and modulation data
# into phasor representations.
  g = mod * np.cos(phi)
  s = mod * np.sin(phi)
  return g, s

def ph_coordinates2phmd(g, s):
# Convert phasor coordinates into phase and module
# Parameters:
# - g: Real part of the phasor coordinates.
# - s: Imaginary part of the phasor coordinates.
# Returns:
# - phi: Phase angle in radians.
# - mod: Module.
#
# This function takes phasor coordinates (g, s) and computes the corresponding phase angle (phi) in radians
# and module (mod). It is useful for transforming phasor data into more interpretable phase and
# module information for further analysis or visualization.
  phi = np.arctan2(s, g)
  mod = np.sqrt(g**2 + s**2)
  return phi, mod

def polished_hist(g,s,hist_bins):
# Generate a 2D histogram from provided phasor data.
# Parameters:
# - g: Real part of data points.
# - s: Imaginary part of data points.
# - hist_bins: Number of bins for histogram generation.
# Returns:
# - hist: The 2D histogram data.
# - filtered_array: A binary mask indicating valid data points.
# - limits: Extent limits defining the data range.
# - hist_color: Histogram values at specific data points.

# This function creates a polished 2D histogram using provided data points, with a specified number of bins.
# It returns the histogram data, a binary mask indicating valid data points, extent limits defining the data range,
# and histogram values at specific data points. This polished histogram is useful for visualizing data distribution
# and further analysis.
  hist, xedges, yedges = np.histogram2d(g, s, bins=hist_bins, range=[[-0.1, 1.1], [-0.1, 0.5]])
  xidx = np.clip(np.digitize(g, xedges), 0, hist.shape[0] - 1)
  yidx = np.clip(np.digitize(s, yedges), 0, hist.shape[1] - 1)
  hist_color = hist[xidx, yidx]
  hist=hist.T
  histmask = np.where(hist > 0, 1, 0)
  filtered_array = np.copy(histmask)
  limits =	[xedges[0],xedges[-1],yedges[0],yedges[-1]]
  return hist,filtered_array,limits, hist_color

def contour_plot(histogram, levels,limits):
# Create a contour plot from a histogram with specified contour levels and limits.
# Parameters:
# - histogram: The input histogram for contour plotting.
# - levels: Contour levels to be displayed/analyzed.
# - limits: Extent limits defining the data range.
# Returns:
# - contour_segments: List of contour segments extracted from the contour plot.

# This function generates a contour plot from the phasor plot histogram using specified contour levels
# and extent limits. It returns a list of contour segments extracted from the generated contour plot,
# allowing further analysis or visualization of the data.
  cs=plt.contour(histogram,levels,extent=limits,linewidths=1,zorder=1)
  contour_segments=cs.allsegs
  return contour_segments

def analyze_contourplot(contour_segments):
# Analyze contour segments of phasor plot histofram and identify regions of interest.
# Parameters:
# - contour_segments: List of contour segments.
# Returns:
# - perimeters: List of identified ROIs segments.
# - phasors: List of identified phasor segments within the ROIs.
#The result is two lists: `phasors` (regions within existing ROIs) and `perimeters` (regions considered to be ROIs).
#- It checks if each contour is part of an existing perimeter (ROI) or a new region of interest.
#- If a contour is within a perimeter and has a valid shape, it's marked as part of an ROI.
#- If the ROI already contains a phasor (distinct subregion), the function updates the phasor with the new contour or creates a new phasor if none exists.
#- If the contour is not part of any ROI, and it's a valid shape, it's added to the list of perimeters.
  perimeters = []
  phasors = []

  for level, contours in enumerate(contour_segments):
      for contour in contours:
          polygon = Polygon(contour)
          roi_found = False
          phasor_found = False

          for idx, perimeter in enumerate(perimeters):
              perimeter_polygon = Polygon(perimeter)
              if perimeter_polygon.contains(polygon) and len(contour)>2:
                  roi_found = True
                  if phasors:
                    for idxp,phasor in enumerate(phasors):
                      phasor_polygon = Polygon(phasor)
                      if phasor_polygon.contains(polygon):
                          phasor_polygon = Polygon(phasor)
                          phasors[idxp]=contour
                          phasor_found = True
                    if phasor_found == False:
                      phasors.append(contour)
                  else:
                    phasors.append(contour)
          if not roi_found:
              if len(contour) > 2:
                  perimeters.append(contour)
  return phasors, perimeters

def simple_lt(g, s, flim_frequency):
# Calculate lifetime values from phasor coordinates and FLIM frequency.
# Parameters:
# - g: Real part of the phasor coordinates.
# - s: Imaginary part of the phasor coordinates.
# - flim_frequency: FLIM (Fluorescence Lifetime Imaging Microscopy) frequency.
# Returns:
# - tau_m: Lifetime modulation.
# - tau_phi: Lifetime phase.
#
# This function computes lifetime values (tau_m and tau_phi) based on the provided phasor coordinates (g, s)
# and the FLIM frequency. It calculates lifetime modulation and phase components using the given formulas.
# In the case of input as a NumPy array, the function handles array-specific calculations and ensures
# that any potential NaN values are set to zero to prevent errors.
  omega = flim_frequency * np.pi * 2
  if isinstance(g, np.ndarray):
    tau_m = np.zeros(np.size(g))
    tau_phi = np.zeros(np.size(g))
  tau_m = np.sqrt((1 - (g**2 + s**2)) / (omega**2 * (g**2 + s**2))) * 10e2
  tau_phi = 1 / omega * s / g * 10e2
  if isinstance(g, np.ndarray):
    tau_m[np.isnan(tau_m) > 0] = 0
    tau_phi[np.isnan(tau_phi) > 0] = 0
  return tau_m, tau_phi

def lifetime_computation(g, s, flim_frequency):
# Compute lifetime values and standard deviations from phasor coordinates and FLIM frequency.
# Parameters:
# - g: Real part of the phasor coordinates.
# - s: Imaginary part of the phasor coordinates.
# - flim_frequency: FLIM (Fluorescence Lifetime Imaging Microscopy) frequency.
# Returns:
# - lt: List containing lifetime values, [lt_m, lt_phi].
# - lt_std: List containing standard deviations for lifetime values, [lt_m_std, lt_phi_std].
# - phasor_position: List with the average phasor coordinates, [g_av, s_av].
# - phasor_std: List with standard deviations for phasor coordinates, [g_std, s_std].
#
# This function calculates lifetime values and their standard deviations based on phasor coordinates (g, s)
# and the FLIM frequency. It computes average phasor coordinates and their standard deviations,
# as well as lifetime values and their associated standard deviations. The function also checks
# for cases where the phasor position may prevent the determination of a finite lifetime value.
  omega = flim_frequency * 2 * np.pi
  lt = [0, 0]
  lt_std = [0, 0]
  lt_m = []
  lt_phi = []

  g_av = np.average(g)
  s_av = np.average(s)
  phasor_position = [g_av, s_av]
  g_var = np.average((g - g_av)**2)
  s_var = np.average((s - s_av)**2)
  g_std = np.sqrt(g_var)
  s_std = np.sqrt(s_var)
  phasor_position = [g_av, s_av]
  phasor_std = [g_std, s_std]
  lt_m, lt_phi = simple_lt(g_av, s_av, omega)
  lt_phi_std = np.sqrt((g_std / g_av)**2 + (s_std / s_av)**2)
  lt_m_std = 2*g_std/np.sqrt(g_av**2)+ 2*s_std/np.sqrt(s_av**2)
  lt = [lt_m, lt_phi]
  lt_std = [lt_m_std, lt_phi_std]
  if not lt_m:
      print('Due to the phasor position it was not possible to determine a lifetime finite value')
  return lt, lt_std, phasor_position, phasor_std

def refplot(names, lifetimes, flim_frequency):
# Generates reference phasor coordinates based on sample lifetimes and FLIM frequency.
# Parameters:
# - names: List of sample names.
# - lifetimes: List of lifetime values corresponding to the samples.
# - flim_frequency: FLIM (Fluorescence Lifetime Imaging Microscopy) frequency.
# Returns:
# - g_ref: Real part of the reference phasor coordinates.
# - s_ref: Imaginary part of the reference phasor coordinates.
#
# This function computes reference phasor coordinates for each sample based on their respective
# lifetime values and the FLIM frequency. The phasor coordinates are computed as (g_ref, s_ref)
# and represent the real and imaginary parts of the phasor, respectively. These coordinates can
# be used for comparative analysis, work with lifetime mixtures and visualization of the samples in the context of FLIM data.

  g_ref = []
  s_ref = []
  omega = flim_frequency * np.pi * 10e-3
  for tau in lifetimes:
    M = 1 / np.sqrt(1 + (omega * tau)**2)
    phi = np.arctan(omega * tau)
    g_ref.append(M * np.cos(phi))
    s_ref.append(M * np.sin(phi))
  return g_ref, s_ref

def Segment_IntensityFractions(RefA, RefB, target, labels):
    # Calculate intensity fractions between two reference points and a target point.
    # Parameters:
    # - RefA: Coordinates of the first reference point.
    # - RefB: Coordinates of the second reference point.
    # - target: Coordinates of the target phasor.
    # - labels: A dictionary for labeling categories.
    # Returns a list of intensity fractions.

    Tot_distance = ((RefA[0] - RefB[0])**2 + (RefA[1] - RefB[1])**2)**0.5
    distanceA = ((RefA[0] - target[0])**2 + (RefA[1] - target[1])**2)**0.5
    distanceB = ((RefB[0] - target[0])**2 + (RefB[1] - target[1])**2)**0.5

    fractionA = distanceB / (distanceA + distanceB)
    fractionB = distanceA / (distanceA + distanceB)

    ratios = [fractionA, fractionB]
    return ratios

Thanks for the input and code. That functionality will certainly be integrated in this library. Histogramming, analysis of histograms/distributions, and plotting will be separated into modules.
Numpy and matplotlib are already core requirements. Rather than working directly with shapes, we might want to work via masks.
I'm currently focusing on I/O, #10, #11, and other formats. It will take a while before I can start working on this issue.

Thank you for the update! I appreciate your consideration of the input and code.
Regarding the use of masks, it sounds like a useful approach, especially for handling images. In this case I try to handle segments of the contour plot on the phasor cloud. I know it's customary to go with normal distribution approaches, but I had in mind a fully non-parametric contour plot in 2D. In case you suggest to mask the phasor plot that actually sounds interesting!
Separating the histogramming, analysis of histograms/distributions, and plotting into modules sounds like a great idea for better organization and modularity.
Please take your time to address these priorities, and I'll be available to eventually discuss when the time is right.

All proposed features have been implemented.

I'd like to share a set of Python functions in this code snippet

Reformatted with black for better readability:
import matplotlib.pyplot as plt
import numpy as np
from shapely.geometry import Polygon

def phasor_coordinates_FD(phi, mod):
    """
    Convert phase and module information into phasor coordinates in the
    frequency domain.
    Parameters:
    - phi: Phase angle in radians.
    - mod: Module.
    Returns:
    - g: Real part of the phasor coordinates.
    - s: Imaginary part of the phasor coordinates.

    This function takes phase and moduleinformation (phi and mod) and
    computes the corresponding phasor
    coordinates (g, s) in the phasor plot. It is valuable for converting
    phase and modulation data
    into phasor representations.

    """
    g = mod * np.cos(phi)
    s = mod * np.sin(phi)
    return g, s

def ph_coordinates2phmd(g, s):
    """
    Convert phasor coordinates into phase and module
    Parameters:
    - g: Real part of the phasor coordinates.
    - s: Imaginary part of the phasor coordinates.
    Returns:
    - phi: Phase angle in radians.
    - mod: Module.

    This function takes phasor coordinates (g, s) and computes the
    corresponding phase angle (phi) in radians
    and module (mod). It is useful for transforming phasor data into
    more interpretable phase and
    module information for further analysis or visualization.

    """
    phi = np.arctan2(s, g)
    mod = np.sqrt(g**2 + s**2)
    return phi, mod

def polished_hist(g, s, hist_bins):
    """
    Generate a 2D histogram from provided phasor data.
    Parameters:
    - g: Real part of data points.
    - s: Imaginary part of data points.
    - hist_bins: Number of bins for histogram generation.
    Returns:
    - hist: The 2D histogram data.
    - filtered_array: A binary mask indicating valid data points.
    - limits: Extent limits defining the data range.
    - hist_color: Histogram values at specific data points.

    This function creates a polished 2D histogram using provided data
    points, with a specified number of bins.
    It returns the histogram data, a binary mask indicating valid data
    points, extent limits defining the data range, and histogram values
    at specific data points. This polished histogram is useful for
    visualizing data distribution and further analysis.

    """
    hist, xedges, yedges = np.histogram2d(
        g, s, bins=hist_bins, range=[[-0.1, 1.1], [-0.1, 0.5]]
    )
    xidx = np.clip(np.digitize(g, xedges), 0, hist.shape[0] - 1)
    yidx = np.clip(np.digitize(s, yedges), 0, hist.shape[1] - 1)
    hist_color = hist[xidx, yidx]
    hist = hist.T
    histmask = np.where(hist > 0, 1, 0)
    filtered_array = np.copy(histmask)
    limits = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
    return hist, filtered_array, limits, hist_color

def contour_plot(histogram, levels, limits):
    """
    Create a contour plot from a histogram with specified contour
    levels and limits.
    Parameters:
    - histogram: The input histogram for contour plotting.
    - levels: Contour levels to be displayed/analyzed.
    - limits: Extent limits defining the data range.
    Returns:
    - contour_segments: List of contour segments extracted from the
      contour plot.

    This function generates a contour plot from the phasor plot histogram
    using specified contour levels and extent limits. It returns a list
    of contour segments extracted from the generated contour plot,
    allowing further analysis or visualization of the data.

    """
    cs = plt.contour(histogram, levels, extent=limits, linewidths=1, zorder=1)
    contour_segments = cs.allsegs
    return contour_segments

def analyze_contourplot(contour_segments):
    """
    Analyze contour segments of phasor plot histofram and identify
    regions of interest.
    Parameters:
    - contour_segments: List of contour segments.
    Returns:
    - perimeters: List of identified ROIs segments.
    - phasors: List of identified phasor segments within the ROIs.

    The result is two lists: `phasors` (regions within existing ROIs)
    and `perimeters` (regions considered to be ROIs).
    - It checks if each contour is part of an existing perimeter (ROI)
      or a new region of interest.
    - If a contour is within a perimeter and has a valid shape,
      it's marked as part of an ROI.
    - If the ROI already contains a phasor (distinct subregion),
      the function updates the phasor with the new contour or creates
      a new phasor if none exists.
    - If the contour is not part of any ROI, and it's a valid shape,
      it's added to the list of perimeters.

    """
    perimeters = []
    phasors = []

    for level, contours in enumerate(contour_segments):
        for contour in contours:
            polygon = Polygon(contour)
            roi_found = False
            phasor_found = False

            for idx, perimeter in enumerate(perimeters):
                perimeter_polygon = Polygon(perimeter)
                if perimeter_polygon.contains(polygon) and len(contour) > 2:
                    roi_found = True
                    if phasors:
                        for idxp, phasor in enumerate(phasors):
                            phasor_polygon = Polygon(phasor)
                            if phasor_polygon.contains(polygon):
                                phasor_polygon = Polygon(phasor)
                                phasors[idxp] = contour
                                phasor_found = True
                        if phasor_found == False:
                            phasors.append(contour)
                    else:
                        phasors.append(contour)
            if not roi_found:
                if len(contour) > 2:
                    perimeters.append(contour)
    return phasors, perimeters

def simple_lt(g, s, flim_frequency):
    """
    Calculate lifetime values from phasor coordinates and FLIM frequency.
    Parameters:
    - g: Real part of the phasor coordinates.
    - s: Imaginary part of the phasor coordinates.
    - flim_frequency: FLIM (Fluorescence Lifetime Imaging Microscopy)
      frequency.
    Returns:
    - tau_m: Lifetime modulation.
    - tau_phi: Lifetime phase.

    This function computes lifetime values (tau_m and tau_phi) based on
    the provided phasor coordinates (g, s) and the FLIM frequency.
    It calculates lifetime modulation and phase components using the
    given formulas. In the case of input as a NumPy array, the function
    handles array-specific calculations and ensures
    that any potential NaN values are set to zero to prevent errors.

    """
    omega = flim_frequency * np.pi * 2
    if isinstance(g, np.ndarray):
        tau_m = np.zeros(np.size(g))
        tau_phi = np.zeros(np.size(g))
    tau_m = np.sqrt((1 - (g**2 + s**2)) / (omega**2 * (g**2 + s**2))) * 10e2
    tau_phi = 1 / omega * s / g * 10e2
    if isinstance(g, np.ndarray):
        tau_m[np.isnan(tau_m) > 0] = 0
        tau_phi[np.isnan(tau_phi) > 0] = 0
    return tau_m, tau_phi

def lifetime_computation(g, s, flim_frequency):
    """
    Compute lifetime values and standard deviations from phasor coordinates
    and FLIM frequency.
    Parameters:
    - g: Real part of the phasor coordinates.
    - s: Imaginary part of the phasor coordinates.
    - flim_frequency: FLIM (Fluorescence Lifetime Imaging Microscopy)
      frequency.
    Returns:
    - lt: List containing lifetime values, [lt_m, lt_phi].
    - lt_std: List containing standard deviations for lifetime values,
      [lt_m_std, lt_phi_std].
    - phasor_position: List with the average phasor coordinates,
      [g_av, s_av].
    - phasor_std: List with standard deviations for phasor coordinates,
      [g_std, s_std].

    This function calculates lifetime values and their standard deviations
    based on phasor coordinates (g, s) and the FLIM frequency.
    It computes average phasor coordinates and their standard deviations,
    as well as lifetime values and their associated standard deviations.
    The function also checks for cases where the phasor position may
    prevent the determination of a finite lifetime value.

    """
    omega = flim_frequency * 2 * np.pi
    lt = [0, 0]
    lt_std = [0, 0]
    lt_m = []
    lt_phi = []

    g_av = np.average(g)
    s_av = np.average(s)
    phasor_position = [g_av, s_av]
    g_var = np.average((g - g_av) ** 2)
    s_var = np.average((s - s_av) ** 2)
    g_std = np.sqrt(g_var)
    s_std = np.sqrt(s_var)
    phasor_position = [g_av, s_av]
    phasor_std = [g_std, s_std]
    lt_m, lt_phi = simple_lt(g_av, s_av, flim_frequency)
    lt_phi_std = np.sqrt((g_std / g_av) ** 2 + (s_std / s_av) ** 2)
    lt_m_std = 2 * g_std / np.sqrt(g_av**2) + 2 * s_std / np.sqrt(s_av**2)
    lt = [lt_m, lt_phi]
    lt_std = [lt_m_std, lt_phi_std]
    if not lt_m:
        print(
            'Due to the phasor position it was not possible to '
            'determine a lifetime finite value'
        )
    return lt, lt_std, phasor_position, phasor_std

def refplot(names, lifetimes, flim_frequency):
    """
    Generates reference phasor coordinates based on sample lifetimes
    and FLIM frequency.
    Parameters:
    - names: List of sample names.
    - lifetimes: List of lifetime values corresponding to the samples.
    - flim_frequency: FLIM (Fluorescence Lifetime Imaging Microscopy)
      frequency.
    Returns:
    - g_ref: Real part of the reference phasor coordinates.
    - s_ref: Imaginary part of the reference phasor coordinates.

    This function computes reference phasor coordinates for each sample
    based on their respective lifetime values and the FLIM frequency.
    The phasor coordinates are computed as (g_ref, s_ref) and represent
    the real and imaginary parts of the phasor, respectively.
    These coordinates can be used for comparative analysis, work with
    lifetime mixtures and visualization of the samples in the context of
    FLIM data.

    """
    g_ref = []
    s_ref = []
    omega = flim_frequency * np.pi * 10e-3
    for tau in lifetimes:
        M = 1 / np.sqrt(1 + (omega * tau) ** 2)
        phi = np.arctan(omega * tau)
        g_ref.append(M * np.cos(phi))
        s_ref.append(M * np.sin(phi))
    return g_ref, s_ref

def Segment_IntensityFractions(RefA, RefB, target, labels):
    """
    Calculate intensity fractions between two reference points and a
    target point.
    Parameters:
    - RefA: Coordinates of the first reference point.
    - RefB: Coordinates of the second reference point.
    - target: Coordinates of the target phasor.
    - labels: A dictionary for labeling categories.
    Returns a list of intensity fractions.

    """
    Tot_distance = ((RefA[0] - RefB[0]) ** 2 + (RefA[1] - RefB[1]) ** 2) ** 0.5
    distanceA = (
        (RefA[0] - target[0]) ** 2 + (RefA[1] - target[1]) ** 2
    ) ** 0.5
    distanceB = (
        (RefB[0] - target[0]) ** 2 + (RefB[1] - target[1]) ** 2
    ) ** 0.5

    fractionA = distanceB / (distanceA + distanceB)
    fractionB = distanceA / (distanceA + distanceB)

    ratios = [fractionA, fractionB]
    return ratios

Hi Mariochem92,
thanks again for sharing your code. We have now implemented much of your proposed functionality. If I understood your code correctly, these are the direct replacements of your functions in the PhasorPy library:

phasor_coordinates_FD: phasor_from_polar
ph_coordinates2phmd: phasor_to_polar
simple_lt: phasor_to_apparent_lifetime
lifetime_computation: use phasor_to_apparent_lifetime, then numpy/scipy for the statistics
refplot -> phasor_from_lifetime
Segment_IntensityFractions: two_fractions_from_phasor

We do not yet have replacements for polished_hist, contour_plot, analyze_contourplot.
@bruno-pannunzio : do you have any additional comments?

I agree @cgohlke that the listed functions already implemented replace the proposed functionality in @Mariochem92 code.

We do not yet have replacements for polished_hist, contour_plot, analyze_contourplot.

I agree that I don't think we have this features available. It would be very interesting to have though. I would like to see the use cases of those functions as they can be good additions.
Also, I think #13 is already covered in the library and can be closed, as the  functions implemented there are a subset of the ones proposed here.


Upstream #728 (Fix suggest-override warnings)

Can you also delete other temporary branches that exist in the vdb repo that have been made from this workflow

I just updated our branch protection rules so that this is possible (see email).


Is it possible to disable attraction between anchors?

I'd like to disable the attraction between .tip and .full and allow the user to place the panel wherever they like. I read through #434, which looks like it was the question as this, but that went a bit off topic and then was closed.
If this is possible without changing the code of FloatingPanel I'd love to know how, otherwise I can fork it and take a poke around.

@WillBishop
I'm sorry for my late reply. The answer is no now, but I'm considering to add an delegate method to make it possible.


[XRI3] [BUG] Rigged hand mesh visualizer gets stuck "on" when using a hand interaction profile

Describe the bug
When using a hand interaction profile, the rigged hand mesh visualizer's select action reader logic causes the selection outline highlighting to be stuck on after an initial pinch.
To reproduce
Steps to reproduce the behavior:

Enable the Hand Interaction Profile in the OpenXR settings (may also repro with the Microsoft Hand Interaction Profile)
Ensure pointerActivateValue is present in your select action mappings

Run an MRTK examples with the rigged hand mesh (like HandInteractionExamples)
Pinch!

Expected behavior
On unpinch, the outline highlighting will return to the default, unhighlighted state
Screenshots

Fixed with #891


WPF: Plot does not update when inside Material Design Card

This was emailed-in from Ryan and copied here (with permission):
I'm not a WPF export and haven't used Material Design before, so perhaps someone with more experience would be better at addressing this issue.
If I don't hear anything after a few days I'll give it a go and see if I can figure it out.

I'm writing this email to inform you that there's an issue with the plots when trying to .Render() or .Refresh() when the WPF plot is within a Material Design XAML Card.
The plot's initial render works, but any modification to the plot, and calls to render or refresh are basically ignored, and the plot does not update.
Breakpointing through the code I use to update the chart, everything works fine, the plottables are filled, and render/refresh is called without any exceptions.
Is there a debug mode I can enable to see more information maybe?
To quickly reproduce this bug, I have a WPFPlot in a usercontrol like so:

And in the code behind, I have this code:

When you click on the grid, mouse down, it clears, only if the UserControl is outside of a Material Design Card. If it is inside the card, even through the clear function and render function is ran, the visual of the chart never clears/changes.
The following doesn't work:

The following does work!

The above isn't my end-game implementation of ScottPlot, it's just a way to quickly reproduce the bug. My actual implementation involves instantiating a WPFPlot in a Viewmodel, and setting the content of a  to the WPFPlot property of the viewmodel. The result is the same, it renders fine the first time, but doesn't render anything new after that. My program is mostly Cards so since it exists in just one card, it doesn't work.

When WpfPlot.Refresh() is called, here's the relevant code that is called:
https://github.com/ScottPlot/ScottPlot/blob/3581f8c5aaad0b0c46c4dcc87e15013ea71abb59/src/ScottPlot4/ScottPlot.WPF/WpfPlot.xaml.cs#L142-L150
https://github.com/ScottPlot/ScottPlot/blob/3581f8c5aaad0b0c46c4dcc87e15013ea71abb59/src/ScottPlot4/ScottPlot/Control/Backend.cs#L313-L365

Related: #1731
Similar behavior was reported by the person who originally e-mailed me. They've been made aware of this issue thread and have begun trying to diagnose the issue. I'll follow-up here with findings if/when I hear back 👍

Hi @swharden,
I got a test computer yesterday, showing the behavior I wrote in #1731. Updating the graphic driver fixed it. Maybe Ryan's issue has a similar root cause.
Best Regards,
Chris

Thanks for following-up @ChrisCC6! That's such a surprising behavior/cause, I might never would have figured it out 😅 Thanks for sharing your findings here!
I reached back to Ryan (who recently emailed me indicating no progress) to make them aware of that potential solution.
Since this ended-up about as far as we can advance it for now, I'll close this issue now 👍

I received this email Tue, Apr 12, 3:49 PM

Hey Scott, writing this email to update you:
I updated to the most recent Intel Graphics Drivers, and still no dice.
I tried out my application on my Desktop , which is a CPU 5950x/ GPU 3090 build, and it still doesn't update when rendering a new graph. But what is different, is that I'm able to actually use my mouse to move the graph on my desktop, causing it to render the new graph after moving the graph around.
On my dev laptop, with intel integrated graphics, and a touchpad, I can't even use my mouse to move the graph around, and this happens in the example cookbook application as well.
The part that is weird, is that in the cookbook, there's a mouse tracking example, which clearly shows where my mouse is in relation to being on the graph, but left MB down and holding and dragging cannot move the graph.
In this video, I launch some new data on the graph, and then use the WpfPlotViewer to show a new window with the new plot data, which has the new updated graph on it. But the main graph doesn't change until I use my mouse to change it, this is on my desktop machine with a Nvidia 3090 GPU. On my laptop, I can't even use the mouse to move any plots.

The PlotControl doesn't update, and a window shows with the new correct data.
Moving the plot with my mouse causes it to update.
Resizing the window causes it to update.
Cannot move plot at all using a laptop touchpad.
https://streamable.com/7xnk8k

I received this email Apr 14, 2022, 3:35 PM

Hey Scott,
I know you're probably tired of hearing from me, but I found a way to get around this issue.
I just new the plot object when I get new data.
Whenever I have new data come in (Not real time of course because that would be horrendous), I just fire up a dispatcher thread, and do the following:

Within that foreach, I add my data to the plot using this.PlotControl.Plot.AddSignal,
Then call :
this.PlotControl.Refresh();
this.PlotControl.Plot.AxisAuto();
this.PlotControl.Plot.Render();

And since I have the plot rendering through a  that is set to update on UpdateSourceTrigger=PropertyChanged, and this.PlotControl is registered as a property that fires OnPropertyChanged, the graph renders as desired.
I've tried setting the program to software rendering only and that didn't work.
I tried just calling OnPropertyChanged for the PlotControl, and that didn't work either.
The only thing that has worked, is just newing the object entirely, resetting it up, refilling it, and refreshing and rendering.
The plot still doesn't work with a touchpad on any laptop, but that's fine, not that important. Plugging in a mouse works.


[Feature] : Add Mute Button to Simulation Page

Description:
This feature involves adding a mute button to the simulation page. The mute button will allow users to mute and unmute the background music during the simulation. Initially hidden, the button will become visible when the user starts the simulation. This enhancement will provide users with greater control over their simulation experience by allowing them to easily toggle the background music on and off.
Details:
Introduce a mute button element in the HTML code.
Initially, the mute button will be hidden using inline CSS styling (style="display:none;"). The button will be displayed dynamically using JavaScript when the user clicks the submit button to start the simulation.
Implement functionality to mute and unmute the background music when the button is clicked. This will ensure users can control the audio without needing to reload the page.
Ensure the mute button will work for all songs in the dropdown, allowing users to mute and unmute any selected background track seamlessly.
The mute button provides an additional layer of user control, enhancing the overall user experience by allowing them to manage the audio according to their preferences.
Ensure the mute button integrates seamlessly with the existing music selection dropdown and other simulation features, maintaining a clean and intuitive user interface.
Implementation Steps:
Add a mute button element in the HTML.
Use CSS to hide the button initially.
Utilize JavaScript to make the button visible when the simulation starts.
Implement JavaScript functions to handle muting and unmuting of the background music.
Ensure the mute button's functionality works smoothly with the existing music dropdown.
Verify the mute button works for all music tracks available in the dropdown, providing consistent audio control across all selections.

@sk66641 Assign this task to me.

@thevijayshankersharma
Issues are assigned on the basis of “first come, first served.” Others get a chance if the issue gets stale and the assignee is inactive for 5+ days.

@aditya-bhaumik
Would you like to work on this issue as it has been pending for over two weeks?

@sk66641 if he is not then i will like to do it.

@sk66641 Adding this feature has been a little challenging as before it was working but when the other feature was added the youtube url one then the mute button started causing problem and because i have my exams now i cant give proper time. Thats why i have been making simpler for the last couple of days and adding them
I was about to do it after the exams but you can assign to @thevijayshankersharma as there is still time for my exams to get over
i will work on the other issue till that time

@aditya-bhaumik
Ok


Publish error "Publish condition not met: "

I have an error after upload an extension: {"error":{"errors":[{"domain":"global","reason":"badRequest","message":"Publish condition not met: "}],"code":400,"message":"Publish condition not met: "}}

This isn't due to the module, sadly the error doesn't specify what the issue is exactly. Probably your extension isn't public or not accepted or wrong.
You can only google it: https://www.google.com/search?q="Publish+condition+not+met

Searching for the error message got me here ;)
@enertom: got the same empty explanation -- it is indeed not a problem with chrome-webstore-upload. A proper explanation showed up trying to manually publish the extension from the chrome web store developer dashboard. I have a paid extension, and it turns out not all Google Payments Merchant Center account setup steps had been performed -- needed to add and verify a payment method first.

Also: https://github.com/DrewML/chrome-webstore-upload/issues/25


ftb: Wrong version selected

picomc mod pack ftb install 91 installs OceanBlock 1.0.0 instead of (as of writing) the lastest 1.9.0

Fixed in edc6cc756b480bcc62dba11de1a18a19acecb935 hopefully


firefly macos balance indicator issue

often balance shows incorrect. when I turn it off and on sometimes shows correct.

This should be fixed in the latest build. Please reopen this issue if you face it again.


Don't support async void as page handlers in razor pages

And an exception should be thrown. So says @DamianEdwards.

I like the idea, but we'll need to consider the breaking change ramifications of this.

This is a breaking change so we'll consider for 3.0.0.

I think we should add this to the growing list of potential analyzers we should build and ship in the meantime.

We're considering writing a Roslyn analyzer in the meantime that would tell a developer immediately (!!!!!!!!) that they are doing something bad. We're tracking it on an internal issue here: https://github.com/aspnet/specs/issues/110 - and we'll post a public issue once we're closer to committing to it.

Added the analyzer here https://github.com/madskristensen/WebEssentials.AspNetCore.Analyzers


A parameter cannot be found that matches parameter name 'interactionTimeout'

Problem
Today i had the following error message when i tried to execute my tests in a container that i have created a few weeks ago.
A parameter cannot be found that matches parameter name 'interactionTimeout'.
at <ScriptBlock>, <No file>: line 35
A parameter cannot be found that matches parameter name 'interactionTimeout'.
In C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\<IP_ADDRESS>\ContainerHandling\Invoke-ScriptInNavContainer.ps1:30 Zeichen:13
+             Invoke-Command -Session $session -ScriptBlock $scriptbloc ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-ClientContext], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,New-ClientContext
    + PSComputerName        : c212b1773a5b70a707a9b7218d28727209cccdaec746cce92221ac1c19124f63

It seems to me that with the newest update of navcontainerhelper, old containers do not work anymore with Run-TestsInNavContainer.
Workaround
I was able to recover from this state by simply deleting the PSTestTool Folder for that container:
C:\ProgramData\NavContainerHelper\Extensions\<ContainerName>\PsTestTool

Catching that situation would be nice, since we update to the lastest navcontainerhelper very often, but would like to keep containers if possible.
Otherwise this the workaround is here for reference.

Good point - I will check that the PsTestTool folder exists and has the latest files in the next version.

<IP_ADDRESS> is out - and it uses a different foldername, meaning that if a test has already run - the new version will still be downloaded and used.


Region aggregation if region missing

Please confirm that this PR has done the following:

[x] Tests Added
[x] Documentation Added
[x] Description in RELEASE_NOTES.md Added

Adding to RELEASE_NOTES.md (remove section after adding to RELEASE_NOTES.md)
Please add a single line in the release notes similar to the following:
- (#XX)[http://link-to-pr.com] Added feature which does something

Description of PR
Updates pyam so behaviour of check_aggregate_region is sensible even if the region your checking is missing.

@danielhuppmann @gidden thoughts would be great here. The new tests currently fail in a cryptic way. The question is, if you call check_aggregate_region and the region you're checking isn't there, should an error be raised, a warning or just nothing and None is returned (cause a region can't be wrong if it's not there...)?

From a quick look, it seems that the command tries to return the object as a pivoted pd.DataFrame (via timeseries()), which doesn't work if the dataframe is empty.
On the question "how do we expect this to behave", I would follow the behaviour in aggregate_region() (log message and empty return): https://github.com/IAMconsortium/pyam/blob/127680a8f412659c440655c4238c33cb45b528da/pyam/core.py#L831

Coverage decreased (-0.2%) to 87.86% when pulling 2f335a6e7fc578607c757e1c48818c66caf3400e on znicholls:region-aggregation-bug into 127680a8f412659c440655c4238c33cb45b528da on IAMconsortium:master.

Coverage decreased (-0.2%) to 87.86% when pulling 2f335a6e7fc578607c757e1c48818c66caf3400e on znicholls:region-aggregation-bug into 127680a8f412659c440655c4238c33cb45b528da on IAMconsortium:master.

@danielhuppmann this should be good to go


Lazyload breaks the website on Safari for Windows

Hello everybody,
Lazyload works very-well on all browsers! However, only on Safari for Windows I noticed, this error and my page doens't load at all!
SyntaxError: Unexpected token 'const'
jquery.min.js:2
jQuery.Deferred exception: 'undefined' is not a function (evaluating '$(".lazyload").lazyload()') undefined undefined
custom.js:4TypeError: 'undefined' is not a function (evaluating '$(".lazyload").lazyload()')
Why this happens?

Version 2.0.0-beta.2
I've replaced 3 occurencies of const by var. Works now on Safari 10.09 to 10.11 and still working on Firefox, Chrome and IE Edge and 10.

I tried that change, but it broke the plugin on Chrome v69


link to WDL spec v 1 rather than development version?

in this section you provide a link to the spec page for the development version of WDL:
"Also, there is some useful, though very detailed, information in the openWDL GitHub repo for the specification itself where you can learn more."
but perhaps for this purpose it's better to link to the version 1 spec, not the development version (here - https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md)

actually, it's kind of weird that these two sentences:
There is emerging documentation about the WDL specification itself being generated by the openWDL community here. Also, there is some useful, though very detailed, information in the openWDL GitHub repo for the specification itself where you can learn more.
are even in the 'Get Test Workflows' section at all. They belong more in the Summary and Next Steps section. If you were to say anything at all here about syntax perhaps it's simply 'don't worry about it right now, it's explained later'  or the readthedocs only - the spec is definitely beyond what's needed here

same link comment does apply to section "6.2.1 openWDL specification" - it currently links to the devel spec, and version 1 seems more appropriate


New linter: XO

https://github.com/sindresorhus/SublimeLinter-contrib-xo

:+1:

:+1:

https://github.com/SublimeLinter/package_control_channel/commit/196d0331a6e8e434b77a091a4d9b1a9b76505830
Thanks for your patiences and contribution!


Update onboarding process

Rebuild the onboarding process for new users such that it only allows geography form 2.

Also, @fredygerman  take a look at how WhatsApp user settings are usually updated with chatbots. (specifically what subject and what form the teachers teach)

@all-contributors please add @fredygerman for code

@jurmy24 We will be utilizing the new WhatsApp Flows feature for this.
Here is a document showing my suggested onboarding flow plan  : Doc

I think this is a great solution. Glad you liked the WhatsApp flows idea. I added a comment regarding the languages but other than that I think its what we need for now. If possible make the WhatsApp flow interface look nice (could even try to add the cover photo from this github page).
Also, the first view of the flow could maybe be a short description of what Twiga is and does.

@jurmy24 Just Updated the document with new flow and also added screenshots from the flow creator playground

Great!

@fredygerman Is it necessary that whatsapp_client.handle_event_request is async?
Also, in handle_request in messaging_service.py ``is_event is quite ambiguous, maybe clarify it?
# Handle different types of events
if is_event(body):
    return await whatsapp_client.handle_event_request(body)