[RFC] Moved session management code to helper VIs

[x] This contribution adheres to CONTRIBUTING.md.

What does this Pull Request accomplish?
Move the session management related code to separate helper VIs.

Create DCPower session.vi - Handles the reservation and creation of DC power sessions.
Destroy DCPower session.vi - Handles the closure and detaching of DC power sessions.

Why should this Pull Request be merged?
These changes are intended as a starting point to come up with generic session management helper VIs that can be added to the measurement template.
What testing has been done?
Manually tested the measurement functionality.

@rfriedma Please give your comments on the updated example. The next step is to remove the dependency of the helper VIs on the instrument specific VIs. Once that is accomplished, we will have generic helper VIs that can be added to the measurement template.

@rfriedma Please give your comments on the updated example. The next step is to remove the dependency of the helper VIs on the instrument specific VIs. Once that is accomplished, we will have generic helper VIs that can be added to the measurement template.

While I agree that this has the potential to make writing measurements easier, I also think it propagates (and then promotes in the template) some bad habits. @jasonmreding was doing some benchmarking and I think caching off the Discovery Client and Session Client made some significant performance improvements. I would rather move toward a model where the framework creates these clients and passes them to the Measurement Logic.vi, where the measurement author can optionally consume them. That way, we can hide a lot of the complexity and gain performance advantages too. Admittedly, I haven't prototyped this so I don't know the pitfalls or drawbacks.
I did prototype a proper Discovery Client and Session Management Client API a few months ago (see here and here). I think my API is better than a handful of helper VIs, but I also don't know how much time and effort we want to put into this feature.

Measurement Logic.vi

Create DCPower session.vi

Destroy DCPower session.vi

DCPower Specific Logic.vi

For reference, when doing performance analysis, here is the original shipping example I started with:

and here is the final version that incorporated caching of clients:

In the case of DCPower, what I end up caching is the service address rather than the client (gRPC ID) since the LV driver API wrappers don't allow us to pass the equivalent of a gRPC channel into the create/attach session. I also adopted the convention of referring to the blue gRPC ID wire as the client (e.g. discovery client rather than discovery gRPC ID) since I found that was easier to read and generally made more sense.
The caching VIs (Create/Get/Delete) generally look like:
Get or Create Discovery Client.vi

Destroy Discovery Client.vi

Discovery Cache.vi

Basically, I cache the client in a functional global and only clear the cache if the measure call produced an error for any reason. This could of course be tuned to only clear the cache for certain types of gRPC errors. While this solution was sufficient for my benchmarking needs, it doesn't properly handle potential problems with clearing the cache while the current client is being used by two or more measure calls being executed in parallel. We would need a more sophisticated cache with reference counting to handle that properly. However, as Paul and I were discussing previously, this might be something we could punt on since I think the current event structure mechanism used to signal the start of the call is effectively serialized anyway which means we can only process one Measure RPC at a time anyway. To add to Ryan's comment earlier, if you had caching of the client, it would trivial to add Get/Create Session Manager Client inside Reserve/Unreserve Session if that cleans things up further.
With all that said, if the client feedback is that they prefer we provide proper APIs we own/maintain to do this sort of thing rather than template/example code the user owns, then I think we could create fairly small client libraries/wrappers for discovery service, session manager service, pin map service, and grpc-device service. The latter would contain as many driver specific wrappers as we think it makes sense to include. The client wrappers I'm envisioning here would either be wrappers around the grpc-labview generated client libraries (I know confusing) or we could merge in hand maintained APIs to that library and deal with the maintenance consequences when the proto file changes and we need to regenerate code. If we don't like the sprawl of all of these smallish client libraries, we could include them all in a MeasurementLink Client library wrapper that provides APIs for all of the various services we think will most commonly be used by the measurement service author. This would effectively be the equivalent of an API gateway but in library form rather than as a service. I forget what deployment size or performance tradeoffs there are to a mega library if any, but I think we have some options here.

This is better, but I would like to see the VIs be instrument agnostic so they could be reused and ideally not 'owned' by the customer like Ryan mentioned earlier in this thread.
Some specific feedback.

I thought is was strange that there is an input for instrument type id, but then in the block diagram it is hard-coded to find only the DCPower device. Either hard-code it to only work for DCPower or make it generic.

LabVIEW style

Add context help documentation to all of the VIs.
Use the connector pane to dictate which terminals are required, recommended, optional
The capitalization of the controls and indicators does not seem to be consistent. My preference is to use all lower case unless it's an acronym.

Another reusable VI that is very useful is something that takes in a pin and sessions and returns the session associated with that pin. Here's a similar proposal on the Python side of things:
https://github.com/ni/measurementlink-python/pull/263#issuecomment-1555198204
Use case is that you have multiple pin inputs each associated with a different instrument and you need to find the sessions assigned to each one....this is very common.

I thought is was strange that there is an input for instrument type id, but then in the block diagram it is hard-coded to find only the DCPower device. Either hard-code it to only work for DCPower or make it generic.

I think we can resolve a service just by the service class. So when resolving the grpc device server, I would leave the interface blank (since that is going to be device specific) and just use the service class instead, which is device agnostic.

I think we'll get pushback on this design. Since the helpers strategy is to ship them with the examples they become pieces of code that are owned by the test architects. That would probably be fine to a degree (hardware specific initialization makes some sense to own), it doesn't really address the feedback that there are details of calling sessions that the developer didn't want to see. For instance, they didn't want to mess with discovery service at all and there it is sitting in the helper that they now own. If a subVI was sufficient then the test architects we're talking to would have selected the VIs, clicked "create SubVI" and moved on. Instead they gave us feedback that we should hide more details.
Is there a hybrid of this where we add to the Measurement Context (maybe?) that follows the pattern of the UI Updates? That was nice where we added just a single VI call to measurements. For sessions I would imagine that we could reduce it all the way down to "Reserve" and "Unreserve" session that takes in the pin or relay names, an instrument type id and a timeout. We're already partially there with the MeasurementContext object since it already has a Pin Map Context held there and this just builds on top of that information.
Also if we focus on just Reserve and Unreserve I feel like we'll be in a good position for the long term. Even in a scenario where sessions came pre-registered due to some sort of session automation, we'd likely still need the ability to signal that the session was in use. We can ignore Register and Unregister for now as that's not currently common in most measurements and ideally the registration that happens currently in TestStand is replaced by a custom step which would move the registration out of all of our LV examples.

@rfriedma I have now updated the VIs as per suggestions, Currently there are 4 VIs

Reserve Sessions

Unreserve Sessions

Create DC Power Session

Destroy DC Power Session

Due to these changes the measurement logic now looks like,  Essentially doing the following operations,

Reserving the sessions
Creating sessions
Performing measurement
Destroying sessions
Unregister sessions

The gRPC ids for the discovery and the service manager client has been cached in the measurement context.

Consider removing the accessors for the ID properties. I see no reason to make those writable or even readable outside of the class.

@jarnoldNI, are you suggesting that we should have methods on the MeasurementContext class to create and destroy instrument sessions? I think that is code that the measurement author should own, rather than pollute MeasurementContext with a bunch of instrument specific methods for creating sessions.

Overall I think this is fine. It's not quite how I would have done it, but after talking to Ryan, we want to do something quick and easy for now. Since this is still an RFC, I'm not going to give it a thorough review. Once it graduates from being an RFC I'll review it further.

are you suggesting that we should have methods on the MeasurementContext class to create and destroy instrument sessions? I think that is code that the measurement author should own, rather than pollute MeasurementContext with a bunch of instrument specific methods for creating sessions

@pbirkhol-ni No, driver specific stuff should not be in there.
I'm not exactly which comment of mine caused the confusion, but when I mentioned the strange mix of generic and hard-coded, I was referring to this:

The only valid option for the instrument id type is dcpower since dcpower is hard-coded as the service to find. I'd prefer this to be instrument agnostic.....if not, then just hard-code the instrument type id to not cause confusion.

are you suggesting that we should have methods on the MeasurementContext class to create and destroy instrument sessions? I think that is code that the measurement author should own, rather than pollute MeasurementContext with a bunch of instrument specific methods for creating sessions

@pbirkhol-ni No, driver specific stuff should not be in there.
I'm not exactly which comment of mine caused the confusion, but when I mentioned the strange mix of generic and hard-coded, I was referring to this:  The only valid option for the instrument id type is dcpower since dcpower is hard-coded as the service to find. I'd prefer this to be instrument agnostic.....if not, then just hard-code the instrument type id to not cause confusion.

Thanks for the clarification. I understand now. I had made a suggestion above as follows:

I think we can resolve a service just by the service class. So when resolving the grpc device server, I would leave the interface blank (since that is going to be device specific) and just use the service class instead, which is device agnostic.

However, I looked at the code and you do have to provide an interface (this wasn't always true). In theory, though, you could provide any interface that is supported by grpc device, even if it's not the one you want to use. So we could just leave it hardcoded at DCPower since we know that grpc device provides support for DCPower. That is a little dirty, but it would work. The other option is to have a lookup based on instrument type, but that will quickly go stale. We could also require the customer to specify the interface, but how would they know what value to use?

It would be nice if the instrument_type_id wasn't actually different than the grpc-device interface string

The hard coded interface name for DCPower definitely jumps out as weird/wrong.

After this discussion, it's clearer why it's there and why it's not a mistake. It definitely deserves a code comment to avoid confusion. This is probably a reasonable hack and should work unless we decide to break grpc-device up into smaller pieces that aren't deployed as a single monolithic server which contains all of the drivers. However, I think that's unlikely to happen in the near future if at all. However, it is a risk of making this assumption.
We could consider updating the Instrument Type Id control to typedef combo box.

This would allow for easy selection for the built in driver types, and users could still manually enter instrument ids for custom instruments and third party instruments. The down side is that LV doesn't support auto update of combo box controls from typedef. It's documented as expected behavior which is lame since this is one of the things I helped implement in NXG. If we really wanted to, we could probably make this an X control, and I think we could update the auto update semantics we want.
We could consider caching the session information from Reserve Session in the measurement context as well. This means you wouldn't need to wire it into Unreserve Session which would eliminate a somewhat awkward wire branch/bend. The down side is you wouldn't have as much freedom to mix/match multiple reserve calls together. However, I can't really think of a reason why somebody would want to do that. You might want to make break reserve into multiple calls for each instrument type you're dealing with. However, we could simply just append to the cached array with each reserve call and then unreserve everything in one call. I don't know if that asymmetry would be annoying/confusing or not. Perhaps it's not worth it to save a wire branch?
The Reserve/Unreserve Session VIs are still part of the example library and their icon template has slightly different shade from the other example VIs. Was the intent to make these part of the Measurement Context class? If not, then we have to leave the accessors for the gRPC IDs of the discovery service and session management service public.
We should also consider how the MeasurementContext Update Results.vi would be used with an example that performs incremental updates. My initial thought was we would want to pass the measurement context into the Core measurement VI. However, that becomes awkward when there are multiple sessions that you have to loop over since you have to stitch the results from each session together before writing the result back to the context. However, if that is where the looping for the incremental updates takes place, then maybe the loop to index the sessions would have to get pushed down as well. It might also create a bit of wire leap frogging in regards to what is traditionally wired to the ref in/out position on the con pane. I prefer straight railroad tracks whenever possible, but I'm not sure if that's achievable in this case.

It would be nice if the instrument_type_id wasn't actually different than the grpc-device interface string

I thought the gRPC driver APIs actually provided constants for these interface strings. Assuming my recollection is correct, customers generally wouldn't have to hard code this string. They would just have to know that a constant exists and how to find it. We have to hard code the constant here because we don't want to take on a runtime dependency to one or all of the drivers if we want to make this generic. Changing those interface strings to match the instrument type ids used by the pin map probably isn't feasible now that we've released the drivers. I'm not sure it would be a good idea even if we could. We're kind of penned in by backward compatibility here.

I thought the gRPC driver APIs actually provided constants for these interface strings.

@jasonmreding The Python APIs provide constants:

https://github.com/ni/nimi-python/blob/master/generated/nidcpower/nidcpower/grpc_session_options.py#L9
https://github.com/ni/nidaqmx-python/blob/master/generated/nidaqmx/grpc_session_options.py#L11

I don't think the LV APIs do.
The server provides a JSON file listing all of the interfaces:
PS C:\Program Files\National Instruments\Shared\NI gRPC Device Server> type .\server_capabilities.json
{
    "provided_service_interfaces": [
        "nidaqmx_grpc.NiDAQmx",
        "nidcpower_grpc.NiDCPower",
        "nidigitalpattern_grpc.NiDigital",
        "nidmm_grpc.NiDmm",
        "nifgen_grpc.NiFgen",
        "nirfmxbluetooth_grpc.NiRFmxBluetooth",
        "nirfmxgsm_grpc.NiRFmxGSM",
        "nirfmxinstr_grpc.NiRFmxInstr",
        "nirfmxlte_grpc.NiRFmxLTE",
        "nirfmxnr_grpc.NiRFmxNR",
        "nirfmxspecan_grpc.NiRFmxSpecAn",
        "nirfmxwcdma_grpc.NiRFmxWCDMA",
        "nirfmxwlan_grpc.NiRFmxWLAN",
        "nirfsa_grpc.NiRFSA",
        "nirfsg_grpc.NiRFSG",
        "niscope_grpc.NiScope",
        "niswitch_grpc.NiSwitch",
        "nisync_grpc.NiSync",
        "nitclk_grpc.NiTClk",
        "nixnet_grpc.NiXnet",
        "nixnetsocket_grpc.NiXnetSocket"
    ]
}

I have updated the logic based on the comments given,
The changes are as follows,

Moved the reservation and unreservation logic to separate VIs under the measurement context class. The gRPC clients are cached in the measurement context, which can be used to reserve and unreserve sessions. Since the measurement logic is part of the measurement server library, this code is completely managed by us.
Reserve sessions VI

Unreserve sessions VI

The updated measurement context

Added VIs in the nidcpower example to create the nidcpower session with the session information returned from the reserve session api call. Similarly an API has been added to destroy the created sessions.
Create DC Power Session VI

Destroy DC Power Session VI

The measurement logic has been updated to work in the following order,
reserve sessions -> create sessions -> measure -> destroy sessions -> unreserve sessions

A new helper VI has been added to the dc power helpers to allow users to filter sessions for a specific pin as per @jarnoldNI's request.

Does the logic still work if NIDCPower driver isn't installed on the system? Are the provided interfaces for gRPC-device server determined by driver installations, or no?

As long as the device server is installed the machine, it is fine give any supported interface name when trying to resolve the device server. So to answer your question, it does not depend on the driver installation..

I am closing this PR, as this prototype uncovered enough details to move forward with the actual implementation.

@dixonjoel , @pbirkhol-ni
Could you please provide your reviews, I have removed the RFC tag.

@dixonjoel , @pbirkhol-ni Could you please provide your reviews, I have removed the RFC tag.

@subash-suresh FYI @pbirkhol-ni is out of the office until Monday.

Thanks for the comments, i will work on it
I would also like to hear your thoughts on this comment.
@pbirkhol-ni , @dixonjoel.

Thanks for the comments, i will work on it I would also like to hear your thoughts on this comment. @pbirkhol-ni , @dixonjoel.

I agree that having the reserve/unreserve methods on the MeausurementContext class isn't ideal. My preference (as I stated above) is to make proper APIs for the session manager, pin map client, and discovery client. That way we could reuse the APIs in the measurement and in the TestStand code modules. However, it was deemed too much work. Also, @rfriedma has said that he would like to abstract the session management into a custom TestStand step so that we don't have to write code modules to do the work.
I think @jasonmreding has some strong opinions here as well so I will give him a chance to weigh in.

we're trying to embrace "done enough" and allow further changes to come in the future through additional requests. Much of this design is about striking a balance between utility and sustaining activities. For instance, we can change out the implementation of "Reserve Session" in the future if we have a nicer wrapping API around session management (for instance in a class that handles a lot of the caching concerns the context class is currently handling). For better palettes and code around gRPC interfaces we might want to actually improve our generation scripts to create them to begin with.
I think most of what you noted is good to add over time and not required all up front. In that vein, I think enough uncertainty exists on the sustaining on "what libraries and which palettes" that we can proceed without it for now.

Make sure all VIs are saved in the upper left of the left most screen (this includes both block diagram and front panel).
These changes may fix NIDCPowerSourceDCVoltage example silently ignores multiple channel groups #199. Can you confirm? Specifically, I want to make sure that it works as expected when using multiple pins with multiple channel groups. I also wonder if the measurements should run in parallel.

I have moved the vis to the upper left corner
I tried to replicate the bug, but the latest updates seem to handle the issues for the most part.

Initially I tried with two pins in two channels which are on different channel groups. Hence, I expected two sessions to be created when I selected both the pins in the UI. This use case worked perfectly, and I was able to get the readings for both the sessions.
I tried the same with one pin on multiple sites and each site mapped to a different channel group and here I always obtained only one session when reserving for pin. The expectation here is to get two sessions, right?

I don't approve of adding this to vi.lib with out further discussion as we talked about in the water cooler on June 12th.

I discussed with Jack. He is okay with making the two new VIs (Reserve Sessions and Unreserve Sessions) part of the example and not part of the MeasurementContext. The VIs should remain instrument agnostic as much as possible so that they can easily be copied to another measurement.

I don't approve of adding this to vi.lib with out further discussion as we talked about in the water cooler on June 12th.

I discussed with Jack. He is okay with making the two new VIs (Reserve Sessions and Unreserve Sessions) part of the example and not part of the MeasurementContext. The VIs should remain instrument agnostic as much as possible so that they can easily be copied to another measurement.

Let's actually hold off on taking any more actions. We're discussing this more offline. I'll post back when we come to a conclusion.

@brad, @pbirkhol-ni , @dixonjoel
Based on the discussions I have created #222, Which try's to maintain the changes with in the example itself.

@subash-suresh @Tharun-Sundar does this PR replace this one? Should we just close this PR?
https://github.com/ni/measurementlink-labview/pull/222/files

I am closing this PR as there is another PR #222 , which has the implementation discussed in this PR.


Tests are unstable

They are failing intermittently. See #195 for details.

Should have been fixed by https://github.com/hashicorp/terraform-aws-vault/pull/195.


Convert strings to numbers in KPIs

BirthTrendByDecade: "6,7,6,15,24,13,16,25,3" --->
BirthTrendByDecade: [6,7,6,15,24,13,16,25,3]
https://pie-chart-bug.demo.community.intersystems.com/dsw/index.html#/user/Widget Examples/Scorecard with Trend Lines.dashboard

keep the convertation on FE


Update modin dependency to 0.30.1

Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

Fixes SNOW-1552497

Fill out the following pre-review checklist:

[ ] I am adding a new automated test(s) to verify correctness of my new code

[ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing

[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency
[ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes.

Please describe how your code solves the related issue.

This PR updates modin to 0.30.1, which unpins the pandas patch version and fixes bugs related to the extensions/docstring modules.
This PR is blocked on the availability of modin 0.30.1 in Snowflake anaconda.

When modin 0.30.1 will be available in Snowflake anaconda?

@sfc-gh-azhan should be very soon. Do you know why all the tests would pass even though it is in Anaconda yet?

@sfc-gh-azhan should be very soon. Do you know why all the tests would pass even though it is in Anaconda yet?

Those tests here are using pypi. Only the Sproc tests or Snowflake streamlit or notebook tests relies on Anaconda.

Once I done with https://snowflakecomputing.atlassian.net/browse/SNOW-1563225, I could run your PR for those sproc tests and I believe they will fail before modin is upgraded in Anaconda.

I started https://ci-dev-142.int.snowflakecomputing.com/job/SnowparkPandasStoredProcPrecommitTest/158/. Let's see how it goes. @sfc-gh-joshi

The precommit test failed https://ci-dev-142.int.snowflakecomputing.com/job/RT-Snowfort-Test-Custom/159/console

The precommit test failed https://ci-dev-142.int.snowflakecomputing.com/job/RT-Snowfort-Test-Custom/159/console

It looks like the failing test (TestSnowparkPandasInSpPrecommit::test_modin_integ_precommit) is still specifying modin==0.28.1. Should I open a PR to update the tests in Snowfort so it can be merged after this one?

The precommit test failed https://ci-dev-142.int.snowflakecomputing.com/job/RT-Snowfort-Test-Custom/159/console

It looks like the failing test (TestSnowparkPandasInSpPrecommit::test_modin_integ_precommit) is still specifying modin==0.28.1. Should I open a PR to update the tests in Snowfort so it can be merged after this one?

All tests under https://github.com/snowflakedb/snowflake/tree/main/Snowfort/tests/t_snowpark_pandas/src are using 0.28.1 right now. How to update them without blocking precommit and this PR?

@sfc-gh-azhan @sfc-gh-joshi what is the snowpark version used in TestSnowparkPandasInSpPrecommit, is it the most recent available version on snowflake anaconda or the master? if it is master, can we read the modin dependency and use that version for testing?

and @sfc-gh-joshi have we tested this with our stored sproc jenkins job  https://ci-dev-142.int.snowflakecomputing.com/job/SnowparkPandasStoredProcPrecommitTest/

(from discussion on slack) Holding this PR until after 1.24 is cut.


Improve design of the footer

The design of the footer currently looks dull. Improve it to look more visually pleasing.
I'm not assigning someone specific for this issue as I would like to see different people's implementations and ideas to this. The best looking one will be picked.

Hi, I want to do this for hacktoberfest can you please assign it to me? Thanks in advance 😃

Hi @alabo-excel you can work on this issue but as I said in the description I'm not assigning it into anyone in particular to see different results.

Hey so how exactly do we contribute to this project? Where can we see the current footer? I am new to this, It would be great if you could help

Hello @DevanshD3 please check out the website of this repository, that's where you'll see the footer. If you want to contribute, follow the contributing guidelines. If you need any further assistance please let me know

Hey saw your website its super awesome! Do you just want the design or the implementation as well ?

The main target is changing the design but if you have any additional ideas that you would think will make it look better then I'd love to see it as well.

@icoderharshit if you have any input on this as well let me know

Alright, will be seeing to it soon.

I have made a pull request after slightly improving footer design. I have just changed the colors to those matching the website.


Unable to sign credentials due to schema conflicts

It seems like there's been some upstream schema changes that are occasionally causing our requests to break, for example a recent error:
Error: The property "educationalCredentialAwarded" in the input was not defined in the context.

This is based on our template we were planning on using for https://github.com/mitodl/mitxpro/issues/1969

@rhysyngsun -- thanks for finding this, and sorry it took a while to fix/test. I believe everything is addressed now:

Key changes are described in https://github.com/digitalcredentials/sign-and-verify-core/pull/1
Updated this service and other upstream callers
Updated https://github.com/mitodl/mitxpro/issues/1969; note that both samples changed (as well as the diagram and description)

Let me know if you run into any issues or have questions

@rhysyngsun -- thanks for finding this, and sorry it took a while to fix/test. I believe everything is addressed now:

Key changes are described in https://github.com/digitalcredentials/sign-and-verify-core/pull/1
Updated this service and other upstream callers
Updated https://github.com/mitodl/mitxpro/issues/1969; note that both samples changed (as well as the diagram and description)

Let me know if you run into any issues or have questions

Working for xPro now


response.raise_for_status()

Hi, thanks for making the wrapper for the API.
I'd like to discuss this code block:
        try:
            response.raise_for_status()
            return json.loads(response.content.decode('utf-8'))
        except Exception as err:
            try:
                content = json.loads(response.content.decode('utf-8'))
                raise ValueError(content)
            except json.decoder.JSONDecodeError:
                pass
            raise

When response.raise_for_status() raises HTTPError, the error gets caught by the except block, then you try to parse the content and raise a ValueError. Why is this better than simply let raise_for_status() raise the exception it wants to raise?
IMHO, HTTPError is the correct type of error to raise here. It makes more sense for your API users to catch HTTPError than ValueError. I assume you want to show the response from the server, but response.content has already been passed to HTTPError which can then be decoded by the API user as needed.
In addition, I think
                content = json.loads(response.content.decode('utf-8'))
                raise ValueError(content)

can be simplified to
                raise ValueError(response.content.decode('utf-8'))

, because it converts dict back to str to print content anyways.

Also, I completely lack experience in this but do you need __exit__ when you don't define __enter__?

Hi, thank you for your PR which simplifies the exception handling in that code block.
As for __enter__ and __exit__, these are context manager methods which are not really applicable given the way the wrapper is currently used. The only reason that the __exit__ method is used is to ensure that any HTTP session opened to the PS API endpoint is closed immediately after the request. I thought about using the __del__ destructor here which would fit better with __init__, but that would only be executed if the user deleted the class object that they previously initialized... for example:
ps = PancakeSwapAPI()
ps.summary()
del ps

Hi, thanks for your reply. It's my pleasure to help and I'm glad I helped.
I do not consider myself a good Python programmer nor being unfamiliar with magic methods in Python, and it is very possible that I completely missed something that you have in knowledge. However, I would like to put forward my arguments below.
I cannot find anywhere that documents the use of __exit__ without __enter__. I have searched google and Python 3.9.6 documentation. According to my readings, __exit__ is only used and effective with context manager as it is only called when __enter__ finishes. A simple test you can do is to add a line in __exit__:
def __exit__():
    print('__exit__ called.')
    self.session.close()

I cannot see __exit__ getting called.
It may be reasonable to implement context manager here. Aly Sivji's guide suggests that it is a good idea to use context manager when you need to call close(). If you check Requests.Session documentation, it also has its context manager.

Thank you for pointing this mistake out - you are correct. I must have misinterpreted something when I quickly put this wrapper together. I'll just blame it on Python not being my primary language :)
Anyway, in order to not introduce breaking changes, I have simplified the __init__, reworked _get() to use the requests wrapper as a context manager and have eliminated __exit__. If you want to pull down the 'develop' branch, and re-submit another PR with your exception simplifications, I will make sure those are added in so you are attributed accordingly.

@scottburlovich
I agree we should be more careful with adding the context manager. Also, there is room to improve the code (the updated __get()), but we should deal with it later after the exception handling improvement.

Thank you for your help. PR merged and new release tagged!


Prepare for release 2.4.3

Signed-off-by: Isaac Hier<EMAIL_ADDRESS>

Coverage remained the same at 73.533% when pulling c8643c1c14fc2589982ed2043dda79f447307041 on isaachier:release-2.4.3 into a461abc9c36408c87174fe07e65a73f11e36d175 on uber-common:master.


add support for chia installed via macOS dmg installer

The official macOS dmg installation makes chia available as a standalone binary. That means the cmdline does not include python in the first position. This commit updates the cmdline parsing logic to allow for chia binaries like this.

Sorry, thought this was a quick catch up merge and then I'd merge it.  But I overlooked that it was targeting main instead of development so...  dealing with that again.


Allow internal artifact feed configuration in pip detector

Today, the Pip detector automatically pulls from PyPI for latest version + dependency tree.
https://github.com/microsoft/component-detection/blob/cf622c795006400d2644fc176e5e524032f043c1/docs/detectors/pip.md?plain=1#L25
We should use users' internal feeds, if configured, rather than making HTTP calls to PyPI by default.

#1129 now has support in experimental detection to handle this using the PIP_INDEX_URL environment variable.


mopidy-gmusic: init at 1.0.0

This should work in theory, but it seems like mopidy extensions in general aren't working (tested on unstable):
mopidy[2776]: INFO     Disabled extension gmusic: Dependency The 'gmusicapi>=6.0' distribution was not found and is required by the application not found
mopidy[2776]: INFO     Disabled extension spotify: Dependency The 'pyspotify<1.999,>=1.9' distribution was not found and is required by the application not found

Can anyone look into this? I don't really know where to start.

@domenkozar Fixed, also updated mopidy, but I'm still getting the above error.

Rebased on master, which fixed the travis build. I think this can be merged. Mopidy extensions with additional dependencies don't work, but that's a separate issue.

Opened #11706

LGTM!
I've recently made additional mopidy related improvements, which I'll create a PR for soon. This may solve some of the remaining issues.


checked if tokens belong to vocabulary before estimate probabilities 🦎

During categorization, I added a test on each token to check if it belongs to the vocabulary or not. If it is not the case, we should not return a marginal P(w | c) for it.
This is the behaviour of MultinomialNB class of the SciKitLearn library

We'll directly integrate this PR in another one, combined with a fix from Cozy Cloud


部署后打开网址只有提示{"message":"Hello, world!"}

部署后打开网址只有提示{"message":"Hello, world!"}，在vps上用curl输出结果如下：

curl --location 'http://<IP_ADDRESS>:8080/v1/chat/completions'
--header 'Content-Type: application/json'
--data '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"stream": true
}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"This"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" is"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" a"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" test"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"!"},"index":0,"finish_reason":null}]}
data: {"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion.chunk","created":0,"model":"gpt-3.5-turbo-0125","choices":[{"delta":{},"index":0,"finish_reason":"stop"}]}
data: [DONE]

这不就是正常的吗


Update getting-started.md

Please ensure that your pull request adheres to our contribution guidelines. Thank you!
The folder name "ort" fits with the other commands.

Thanks @joshovi for your contribution! While it seems that you have (cryptographically) signed your commit, the Signed-off-by footer is missing, which we require for the DCO check. Please amend your commit message accordingly.

@sschuberth  I did the edit in the browser, I have not checked out the repository. To me it was a simple typo fix. I understand if you decline the PR (and fix the typo later).

Sorry to hear that you're not willing to sign-off your commit, but thanks anyway for making the initial effort to contribute. Superseded by https://github.com/oss-review-toolkit/ort/pull/3450.


Explorer demo cleanup

Removes code left over from special-casing things for March's milestone.

handling properties with name in them as the title
handling the number[] encodings of bytes

this should complete #1950

@666lcz The explorer looks exactly the same after the changes so i don't feel screenshots are necessary

The explorer looks exactly the same after the changes so i don't feel screenshots are necessary

Yes I know. I was suggesting that we should try to describe what kind of testing have been done in the summary, and for this change, a screenshot is the easiest way to demonstrate the testing(some UI bug might be subtle that the PR author might overlook). We have seen several bugs on production in the past due to insufficient testing. Including the test plan in the PR will relieve the reviewer's burden to test it locally and expedite the review cycle!


[Feature Request] Support GP3 and custom volume size on Master node boot volume

With GP3 out, we would like to take advantage of GP3 on the head node. By allowing GP3 we can get the full 3000 IOPS from the EBS volume, lower cost, and lower the size of the volume if a deployment warrants a smaller volume. It appears that GP3 and Custom sizes are already supported on the additional EBS volumes as shared NFS.
Version: 2.10.4
Workaround: No workaround available
Proposed Fix: Create a parameter in the config file for size and type and associated parameters in the Cloudformation. GP3 could reasonably become the default type.

It appears you can only use this currently if the volume_type is defined in the EBS section. I attempted to setup gp3 in my cluster configuration area and got the following errors:
ERROR: The configuration parameter 'volume_type' is not allowed in the [compute_resource default] section
ERROR: The configuration parameters 'volume_type' are not allowed in the [cluster slurmworker] section
It would be a nice feature to a future release. Currently, the OS drives all mount as gp2 by default on the compute and controller nodes. AWS customers could benefit from the a 20% savings on OS drive storage in addition to the performance increase.

Hi @MikeKroell and @zeekus,
thank you for your interest.
Your request make sense, I'm marking this as feature enh.
For the volume size, you can already choose size for both root volume of head node and compute node, using
master-root-volume-size and compute-root-volume-size.
Thanks,
Luca

Hi Mike and Teddy,
Starting with ParallelCluster 3.x, specifying root volume type is supported on head node and Slurm compute nodes
Thank you,
Hanwen


Engine iterations

📝 Changed routes:

/dashboard/engine

(view full size)

Commit 09504fa1301284eb3686350b52956ae428aee9b1 (https://thirdweb-9yzxsll5r.thirdweb-preview.com).

🙌


Support GHC 9.4.

Please read through https://github.com/haskellari/splitmix/blob/master/CONTRIBUTING.md


Please support the vela config ini file for bigger size model in flash

Hi, all,
I purchased a Seeed Grove vision AI module V2 EVK, and I wanted to upload a customer AI model from the SensorCraftAI web, but failed. the log reported: Failed to resize buffer. Requested: 11373728, available 1135736, missing: 10237992. I know it may be the SRAM size is limited, but how can we use the flash for AI model?

We tried to train a yolov8n model for 0-9 digits detection, yolov8n_digits.tflite attached, about 2.9MB.
We used the example vela config ini file as following to optimize the model, and generated the file yolov8n_digits_vela.tflite, the size is about 2.6MB, it is also attached.
use the vela tool to show the --verbose-allocation
it shows:
Total SRAM used                              11107.03 KiB
Total Off-chip Flash used                     2663.14 KiB

Is our AI model issue or using the incorrect vela config ini file?

And I also tried to upload this model from SensorCraftAI: Seeed_Grove_Vision_AI_Module_V2-main\model_zoo\tflm_yolov8_pose\yolov8n_pose_256_vela_3_9_0x3BB000.tflite, it works well. but any allocation info can't be seen
by vela yolov8n_pose_256_vela_3_9_0x3BB000.tflite --verbose-allocation

Please support us, thanks.
yolov8n model.zip

; file: my_vela_cfg.ini ; -----------------------------------------------------------------------------
; Vela configuration file ; -----------------------------------------------------------------------------
; System Configuration
; My_Sys_Cfg
[System_Config.My_Sys_Cfg]
core_clock=400e6
axi0_port=Sram
axi1_port=OffChipFlash
Sram_clock_scale=1.0
Sram_burst_length=32
Sram_read_latency=16
Sram_write_latency=16
Dram_clock_scale=0.75
Dram_burst_length=128
Dram_read_latency=500
Dram_write_latency=250
OnChipFlash_clock_scale=0.25
OffChipFlash_clock_scale=0.015625
OffChipFlash_burst_length=32
OffChipFlash_read_latency=64
OffChipFlash_write_latency=64
; -----------------------------------------------------------------------------
; Memory Mode
; My_Mem_Mode_Parent
[Memory_Mode.My_Mem_Mode_Parent]
const_mem_area=Axi1
arena_mem_area=Axi0
cache_mem_area=Axi0

Hi @yzhang-github88,
Grove Vision AI module V2 runs SSCMA (Seeed SenseCraft Model Assistant) firmware by default. The main problem with your model is that the sram size requirement is too large, the sram size of the model tensor arena in this device should be less than 900KB. If you want to use Seeed "No code" environment, you can ask Seeed for help.
https://sensecraft.seeed.cc/ai/#/home
If you want to customize the firmware to fit your own model. We recommend that you use Himax SDK to rebuild the firmware.
https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2
You can follow the steps below to create your model and firmware.

Use Himax SDK to build the tflm_fd_fm application to get familiar with Himax SDK and tools.
https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2?tab=readme-ov-file#linux-environment-1

Use Himax SDK to create the tflm_yolov8_pose application to familiarize yourself with the model ternsor area memory configuration and set the model's address in flash.
https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2/tree/main/EPII_CM55M_APP_S/app/scenario_app/tflm_yolov8_pose

Train your own yolov8n model and deploy it to FVP. It was then ported to the Grove Vision AI module V2 device.
https://github.com/HimaxWiseEyePlus/YOLOv8_on_WE2

Thanks, Steve.
I will follow your guide to train my model and create the FW.


[BrokenLinksH2] fixing broken link

Fixed link in line 240

Docs Build status updates of commit 29ea6fa:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/how-to-create-a-spreadsheet-document-by-providing-a-file-name.md
:bulb:Suggestion

Details

docs/how-to-create-a-spreadsheet-document-by-providing-a-file-name.md

Line 54, Column 1: [Suggestion: disallowed-html-attribute - See documentation] HTML attribute 'sdata' on tag 'span' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Global effort to fix broken links
@lindalu-MSFT
The Content & Learning team is fixing broken links on docs.microsoft.com for the rest of H2. This effort will eliminate potential accessibility, security, and usability issues. This PR includes only link fixes and does not change other content. Please review within five business days and merge, or comment in the PR with any changes you'd like to see. Thanks!


Crash in Chronicles of Myrtana

This plugin causes crashes whenever i try to cook, use alchemy table, anything with recipes really. I zeroed it down to FreeAiming.vdf..

Gothic2.rpt.txt
Log.txt


[FLINK-7166][avro] cleanup generated test classes in the cleanup phase

Maven neither cleaned up generated avro classes used by tests nor did it replace
them with new ones after the avro dependency change causing troubles to build
the project. Although the target directory inside src is unusual, we keep it
for now but at least delete these files in the cleanup stage so that a
mvn clean install always works.

I ran into this too. Thanks for the PR!
Shall we also create a ticket to move generated files out of src?

That would make sense and I was going that way at first. It is spread over some of the project files though and there was something about eclipse having problems with it (although the last time, we tried, using eclipse for developing Flink didn't work anymore).
So in the end, changing this may be more beautiful but we don't really gain much by it, do we? Only, potentially, some problems.

Thanks for the fix. I think this LGTM, +1.
@NicoK could you rebase on the latest master to incorproate the new test profiles (just to make sure nothing bad is affected by this change, although I don't really expect it)?
After a green run I'll merge this!

did the rebase and it looks good :)

Merging ..


Update Asia chapter information

This PR updates the information about CHAOSS ASIA chapter under the local chapters on the website.
It includes a short intro about the chapter and various ways to get involved in the community.
Closes #chaoss-asia/issues/3

@ElizabethN Could please review my PR and suggest if any changes are required?

@ElizabethN I shall send you the password when I'm near a laptop tomorrow, so that you can manage it via LastPass. Thank you for seeing this through, both of you!


[Caddy] chown webroot files occurring twice

In the Caddy base image, the webroot files are being chowned https://github.com/dockhippie/caddy/blob/master/rootfs/etc/s6/caddy/setup#L13-L14. Its also happening in the PHP image https://github.com/dockhippie/php/blob/master/caddy/rootfs/etc/s6/php/setup#L45-L46.
It takes FOREVER! I'm looking into ways to speed it up.

By "FOREVER", I mean roughly 6 minutes for a standard Laravel app with composer deps already installed (we aren't using your runtime composer install feature, rather doing it during CI).

This is already the fastest option to chown the files properly. You can speed it up if you chown the files within your Dockerfile before runtime

Will something like this work?
USER caddy
ADD . /srv/www
RUN composer install
USER root

Maybe, that's something I have not tried. I have always chowned after ADD

Ok, so new plan.
ADD composer.json composer.lock /srv/www
RUN su-exec caddy composer install--no-interaction --no-dev --prefer-dist --no-scripts --no-autoloader
ADD . /srv/www
RUN chown -R caddy:caddy /srv/www
RUN su-exec caddy composer install --no-interaction --no-dev --prefer-dist

Not the most beautiful solution but it should work.

The php-caddy image is not using this image anymore.


Feat: Add Affine Cipher implementation in python

✅ Fixes: #42
This PR includes the addition of a new component for the Affine Cipher in the application. The most important changes include importing the AffineCipher component, adding a new route for it, and updating the dashboard to include a card for the Affine Cipher.
Affine Cipher Component Addition:

src/App.tsx: Imported AffineCipher from the snippets/Python directory and added a new route for it. [1] [2]
src/dashboard.tsx: Added a new card for the Affine Cipher in the dashboard.
src/snippets/Python/Affine-cipher.tsx: Created a new AffineCipher component that includes the implementation of the Affine Cipher encryption and decryption in Python, along with a detailed explanation and a code snippet.

@shrinidhihegde3 Review this PR & hacktoberfest labels to it.

Add screenshotsof the output, replace this file inside src/Ciphers folder, implement input and output field for experimenting this cipher(refer caser cipher for example located in src/Cipher)

Add screenshotsof the output, replace this file inside src/Snippets/Ciphers folder, implement input and output field for experimenting this cipher(refer hillman or blowfish cipher for example located in src/Snippets/Ciphers)

@shrinidhihegde3 Completed the requested changes, check the PR & add the labels also assign me on this PR.

@Hemu21 @shrinidhihegde3 can you add gssoc & level labels


How to send video files in response?

My issue is that I want to take a video as an input perform object detection on it and return the resulting video in the response.
I am using UploadFile for taking the input video file but I don't know how to send back a video as a response.

I assume you solved it, thanks for closing the issue :+1:

@robsteneha How did you handle it?

Hi @ tiangolo My issue is that I want to take a video as an input perform object detection on it and return the resulting video in the response.
I am using UploadFile for taking the input video file but I don't know how to send back a video as a response

This is a copy paste of the above issue. What have you tried, where are you stuck?


Add constructor with reducePresentationLatency to ComposePanel

Fixes https://github.com/JetBrains/compose-multiplatform/issues/4870
Release Notes
Features - Desktop

Add constructor with reducePresentationLatency to ComposePanel. Setting this flag to true gives a hint to renderer implementation to reduce the latency between the input and visual changes in exchange for possible screen tearing.

I'd much rather we solved the underlying issue; if Swing/AWT can do it, why not us?

I would too, but as we discussed, it is much harder, and I am not sure we are able to solve it in the foreseeble future. In the meantime, we can provide a property, that even makes sense outside of this issue.

if Swing/AWT can do it, why not us?

If we just disable vsync, we will have:

tearing (depends on the system, the system window compositor can add additional synchronization)
animation issues

frame drops
inconsistent animation frame times (animations won't be smooth)
unlimited FPS (consumes CPU)

too early recomposition, that results next frame to drop

Swing can have the same issues.

If we just disable vsync, we will have:
Are there no other solutions?

Swing can have the same issues.
But in practice, it doesn't. Swing has low-latency presentation and no tearing out-of-the-box.

Are there no other solutions?

This is the nature of vsync. If we sync with it, we have 1-frame latency. We sync with it to solve the issues I mentioned.
Animations should always be in sync with v-sync, to avoid them. The solution might be to move input reaction changes out of vsync, but it can be not trivial. We might even need a new API that user should call explicitly, not sure.

We also might have unnecessary frame lags in other places. Most probably it is easier to fix them than the vsync latency. But we need to profile the issue to understand if we have them.

This is the nature of vsync.

But, again, why is this problem not present in Swing, and (I assume) native frameworks?
Can we double buffer ourselves to avoid tearing?

We also might have unnecessary frame lags in other places.

The problem reproduces in pure Skiko, and it appears that most (possibly all) the delay comes from vsync.

But, again, why is this problem not present in Swing, and (I assume) native frameworks?

Besides tearing I mentioned the animation issue, which Swing didn't solve. It doesn't sync it with vsync. I haven't investigated it properly in the past though. I discovered this when I tried to implement smooth animations on Swing, and didn't find a way.
I am not saying that there is no proper way, I am saying that a proper way needs time to investigate/design/implement. And I am all for doing that.

The problem reproduces in pure Skiko

What I meant that we can have issues in Compose, and solving them might also help. Skiko also can have additional lags besides that caused by vsync.

But, again, why is this problem not present in Swing, and (I assume) native frameworks?

I would look at the Android sources (Choreographer). From my experience, it solves the latency and the animation issues

I am not saying that there is no proper way, I am saying that a proper way needs time to investigate/design/implement. And I am all for doing that.

Ok, understood.

What I meant that we can have issues in Compose, and solving them might also help. Skiko also can have additional lags besides that caused by vsync.

The experiments I've done show that this isn't the case. Or at least the contribution of other factors (in Skiko or Compose) to the latency are minimal.

The latency in a pure Skiko reproducer is very similar to the latency of a Compose reproducer.
The latency in pure Skiko with vsync turned off is negligible/acceptable - probably just the remaining, expected 1-frame delay.

Note that merely setting
device.layer.displaySyncEnabled = NO;

while keeping everything else related to vsync (e.g. calling DisplayLinkThrottler.waitVSync) also causes the problem to go away (but causes tearing).

Note that merely setting
device.layer.displaySyncEnabled = NO;

while keeping everything else related to vsync (e.g. calling DisplayLinkThrottler.waitVSync) also causes the problem to go away (but causes tearing).

Yes, that's true. The introduced flag doesn't affect throttler behavior.

Thank you for feedback and discussion, I'll do deeper investigation of other graphics backends and see if I can define a common denominator here.

I noticed that even with vsync disabled, you can get even better results with requesting redraw only 1 time per frame.
I'm on 60 fps so the frame duration is around 16ms. Calling skiaLayer.needRedraw() on each skiko onRender() call results calling onRender() each 8ms (2 times per frame). I did it manually and I called skiaLayer.needRedraw() each 16 ms and the results was better.
I'm not sure if there's a way to prevent calling draw method more than one time on each frame even before reaching the native calls, maybe it can be done on the FrameDispatcher.

I noticed that even with vsync disabled, you can get better results with requesting redraw only 1 time per frame. I'm on 60 fps so the frame duration is around 16ms. Calling skiaLayer.needRedraw() on each skiko onRender() call results calling onRender() each 8ms (2 times per frame). I did it manually and I called skiaLayer.needRedraw() each 16 ms and the results was better. I'm not sure if there's a way to prevent calling draw method more than one time on each frame even before reaching the native calls, maybe it can be done on the FrameDispatcher.

Which platform did you test it on?
It sure doesn't seem a valid behavior on macOS?

Btw the latency issue exists on windows as well (didn't try linux) and disabling vsync reduces the latency significantly there. So it's not only a macos thing.

@elijah-semyonov, please actualise Release Notes


scm: conflict both modified showing in tab when there are no conflicts

Not sure how I got into this state, but I'm pretty sure it's wrong:

git output:
git.log

Looking at the graph I see that the third commit from a top is a merge commit where you merged main into your topic branch. Were there any conflicts when you have done the merge? Did you resolve those merge conflicts using the code lenses or the 3-ways merge editor?

Were there any conflicts when you have done the merge?

There were ~5

Did you resolve those merge conflicts using the code lenses or the 3-ways merge editor?

I resolved them like I always do by searching for >>> and manually resolving it; I disable code lens and rarely use the merge editor.


rearrange R3,4 and R9,10 so that one single part can be used too

Two resistors can be bridged if they are placed in a way that all of their four pads are in a regular square pattern. That way one can either use two in series or just one part, with half the resistance.

I think I understand. I'll give it a try, and you can let me know if I did it correctly.

Okay, I gave this a try in the branch issue11 https://github.com/cwjpalmer/Awesome-Shield-PCB-0.5/tree/issue11
@aShure Is this what you had in mind? If so, let me know and I'll merge this back into master, and make similar changes in the other two working variants.
Some things that I noticed that might be problematic:

the spacing of the 0603 resistors (R9,10) now violates the DRC (in order to put the pads in the square arrangement)
the pads for the resistors aren't square. So although they're arranged in a square, if you tried to solder a single resistor between the two sets of pads (to avoid using 2 in series) I think that part of the resistor would land on solder mask. You can see what I mean by copying a resistor, rotating it 90 degrees, and holding over the two pads, where you would solder it.

I am sure that the 1206 resistors will fit either way even if the pad is designed for reflow and not square. I guess you're onto something with the 0603 pads being not square. Does the DRC complain about the tRestrict layer with the 0603 parts or is it something else?
On 20/05/2015 12:56 pm, Chris Palmer<EMAIL_ADDRESS>wrote:Okay, I gave this a try in the branch issue11 https://github.com/cwjpalmer/Awesome-Shield-PCB-0.5/tree/issue11
@aShure Is this what you had in mind? If so, let me know and I'll merge this back into master, and make similar changes in the other two working variants.
Some things that I noticed that might be problematic:

the spacing of the 0603 resistors (R9,10) now violates the DRC (in order to put the pads in the square arrangement)
the pads for the resistors aren't square. So although they're arranged in a square, if you tried to solder a single resistor between the two sets of pads (to avoid using 2 in series) I think that part of the resistor would land on solder mask. You can see what I mean by copying a resistor, rotating it 90 degrees, and holding over the two pads, where you would solder it.

—Reply to this email directly or view it on GitHub.

That's great to know about the 1206 resistors. About the 0603 ones: the DRC complains about the tKeepout layer (39). Here's a screenshot:

That's enough space for my taste, I did closer than that with Avoccado°.
The 0603 wouldn't be assembled manually anyways. One might push R9 away
with the tweezers while setting R10 with manual placement.
On 5/20/2015 5:32 PM, Chris Palmer wrote:

That's great to know about the 1206 resistors. About the 0603 ones:
the DRC complains about the tKeepout layer (39). Here's a screenshot:
keepout drc resistors
https://cloud.githubusercontent.com/assets/6217632/7729633/22f9f75e-ff16-11e4-826b-b09d6d5244c9.png
—
Reply to this email directly or view it on GitHub
https://github.com/cwjpalmer/Awesome-Shield-PCB-0.5/issues/11#issuecomment-103927331.

Fantastic! So then it seems like I should incorporate what you see above (the resistor layout changes made in branch issue11 into the 3 working variants. Does that makes sense to you? Currently, the square resistor layout is only present on branch issue11.

Sure.
When I had a look at the branches it was not clear to me what the
differences are. Mind you I only took a quick glance at the
repositories, the branch names or READMEs where not explanatory to me. I
think you might be doing redundant work if you alter all branches
separately and might be faster off with sticking to one or two.
On 5/20/2015 5:44 PM, Chris Palmer wrote:

Fantastic! So then it seems like I should incorporate what you see
above (the resistor layout changes made in branch |issue11| into the 3
working variants. Does that makes sense to you? Currently, the square
resistor layout is only present on branch |issue11|.
—
Reply to this email directly or view it on GitHub
https://github.com/cwjpalmer/Awesome-Shield-PCB-0.5/issues/11#issuecomment-103932897.

Ya, I don't think I'm in a very efficient workflow. The three branches (master, CPver2, CPvar6) are three different layouts so that we can try different possibilities for UX with components in different places. I should have done one version, got you to check it, fixed all this stuff we're working through now, and then created the variants, I think. Now I know for next time :-)

okay, all three variants now have the right resistor layouts for the R3,4,9,10


Error after upload

After creating a new post as publisher the list of post yields this error:
[Error] Warning: setState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props
[Error] TypeError: null is not an object (evaluating 'props.viewer.post.title')

Thanks for your interest. I can reproduce the issue. I'll probably have a look at it tomorrow.

Please check again. I realized that my error message was a bit different and the error occurred on the posts detail page.

The second error is gone and that was the showstopper. It now works though I still get the first warning. For example right after login (on that note I have to press twice on the login button for it to work - safari latest)

Great. That first warning is react related. I will have to clean up the project anyway at some point. Some things are still quite dirty. For now I just don't have the time


Execution hangs on sleep_us(1) on Pico W

On my Raspberry Pi Pico W using the latest SDK, trying to use the library leads to crashing the CPU – execution just hangs, and the chip doesn't do anything else. Here's my project that reproduces the bug: pico-st7789-bug. (This is happening regardless of whether there's any display connected to the Pico.)
I found out that it's caused by the sleep_us(1) calls at various places in the code (lines: 28, 33, 38, 40, 45, 50, 159, 164, 170, 175). It seems that there is a race condition in the SDK that leads to missing the interrupt for the short timer and hanging indefinitely – potentially only on Pico W devices. Related issues: https://github.com/raspberrypi/pico-sdk/issues/1552, https://github.com/raspberrypi/pico-sdk/issues/1500, https://github.com/micropython/micropython/issues/12873
If I remove all these sleep_us calls, the library starts working as expected, and I'm able to run the blink example on a 240x240 display. If there isn't sufficient rationale for the sleep_us(1) calls, I advise to remove them altogether – at least for me the library works perfectly without them. However, if they are necessary for correct timing, we can replace them with something like busy_wait_at_least_cycles, and if they're a walkaround for spi_write_blocking not blocking enough, they can be replaced with a busywait until SPI is done:
while (((spi_hw_t *)st7789_cfg.spi)->sr & SPI_SSPSR_BSY_BITS)
{
  tight_loop_contents();
}

I can make a PR with any of the proposed solutions.

I will cross-test this with my screen aswell during the weekend, would be interesting if this works for me too.

Soo.. it wasnt exactly uh.. "that weekend", sorry for that. BUT! i can confirm, that with a sleep_us(10), my display functions. It also functions without the sleep_us(1)or sleep_us(10) waits. This is very nice for me, and huge thanks to @m93a for figuring this out. Now my old Rapsberry Pi 1 A Screens have a new nice usecase as a screen for my Pico's, amazing!

As far as I know, this is still an issue.

Issues usually don't get fixed by ignoring them.

Indeed, this fix is essentially free (it takes less than 3 minutes to implement). Although this library is painfully slow anyway. Iirc, the screen/driver supports to dump the whole framebuffer into it at once, which would be lots faster (but consume more RAM ofc)


Added 371-Sum-Of-Two-Integers.kt

File(s) Modified: 371-Sum-Of-Two-Integers.kt
Language(s) Used: kotlin
Submission URL: _https://leetcode.com/submissions/detail/774318310/_

Thanks, @Raven1233!


Hobby website: end of training session 3

Hey team, we are getting a few emails about participants not being able to move past session 3. What I know: people try to do this on their phone are having problems, and they encounter a warning "Sorry! We encountered an unexpected error". Both of the errors below were encountered WHILE doing day 3.
Here are some comments:
"I went to complete the study part for today, which was an introductory piece. After completing the 'wait 20 seconds' part near the beginning, I received this stop error twice." "Please disregard my last--it worked perfectly on my third attempt." (participant eventually finished all sessions)
"Hey Claudia, Sorry about not keeping up with the online sessions. It’s just that the app crashes halfway during the session and when I start it over it crashes again - it works on my laptop but I sometimes I don’t have my laptop available to me/by the time I have my laptop in front me I forget to do the session."  (participant 6072)
If you need any additional info, let me know!
Alex

I now have more information about RECENT issues and have reason to believe that this is no longer the problem.


navbar update

navbar added

@GyanPrakashRaj You were not supposed to remove the wireframe code of the HTML file so I added it back. Everything else looks good. 👍

Ooh I see.
Can I request you to shift the complete repo to nextjs ?

@GyanPrakashRaj We'll eventually do it when the app gets more complex, but for the time being, we have to stay on the vanilla course because most of the contributors are beginners from our community. Thanks tho, we'll let you know 👍

@GyanPrakashRaj We'll eventually do it when the app gets more complex, but for the time being, we have to stay on the vanilla course because most of the contributors are beginners from our community. Thanks tho, we'll let you know 👍

Okay
And i have completed 404 page will send a pr soon

can you do another PR filling your name and email in CONTRIBUTORS?

can you do another PR filling your name and email in CONTRIBUTORS? @GyanPrakashRaj

Done 💫


[7.6] Looter and wrong stackPos

Ok, so there's a huge problem with opening bodies on all 7.6 servers that I was playing on.
It's counting wrong stackPos. OldLootMode is True on default because bproxy is using OpenCorpse function when looter is enabled. Besides I was checking SmartLootCorpse Function and I've fund big problem there.
For lSS = 1 To 10
    SS = CByte(lSS)
    tileID = GetTheLong(Matrix(ydif, xdif, myZ(idConnection), idConnection).s(SS).t1, Matrix(ydif, xdif, myZ(idConnection), idConnection).s(SS).t2)
    If DatTiles(tileID).alwaysOnTop = True Then
      SOPT = &HFF
    ElseIf DatTiles(tileID).iscontainer = True Then
      SOPT = SS
      Exit For
    Else
      Exit For
    End If
  Next lSS

ok this thing is wrong. If DatTile(tileID).isContainer = True Then
stackPos = current iteration and it's escaping from For - that's good.
but when it's not a container then it exits for loop either when it is supposed to keep looping throught lSS(stackPos) to find container. So basicly loops ends anyways right after first iteration and it doesn't matter if container is found or not
Old Loot Mode is using stackpos received from the packet and it's wrong because it should loop through stackPos just like here to find the container!
I've made few changes and my looter is opening every dead body. Gonna pull commit after testing it on higher tibia versions ; p

yup, it fails a lot (but not always) for me too

Yeah it can be easily fixed by adding For which loops through stackPos in OpenCorpse function.
I've fixed this thing for myself but I'm playing only tibia 7.6 and I'm too lazy to check higher versions so I don't know if its wise to pull commits without testing it
I'm gonna put my code here in comments so everyone interested can apply this thing for themselves when I'll get back to home

Quoting Dainiel, Cipsoft changed the stackPos system several times throughout the versions, and at some point, blackd probably fucked up the 7.6 stackpos to fix a newer version of tibia;
related issue: https://github.com/blackdtools/Blackd-Proxy-CLASSIC/issues/20
as for 7.6 specific fixes, simply wrap it in a
if(tibiaVersionLong = 760) Then
//fix here
End If

Well, that's my OpenCorpse Function:

Public Function OpenCorpse(idConnection As Integer) As Long
  Dim aRes As Long
  Dim bpID As Byte
  Dim sCheat As String
  Dim cPacket() As Byte
  Dim topStack As Long
  Dim sPos As Long
  Dim tileID As Long
  Dim xdif As Long
  Dim ydif As Long
  'aRes = SendLogSystemMessageToClient(idConnection, "Detected new corpse at " & _
   myLastCorpseX(idConnection) & " , " & myLastCorpseY(idConnection) & " , " & _
   myLastCorpseZ(idConnection) & " , " & myLastCorpseS(idConnection) & " : " & _
   FiveChrLon(myLastCorpseTileID(idConnection)))
 ' DoEvents
  '0A 00 82 37 7D A7 7D 09 59 0F 02 00
  xdif = myLastCorpseX(idConnection) - myX(idConnection)
  ydif = myLastCorpseY(idConnection) - myY(idConnection)
  bpID = frmBackpacks.GetFirstFreeBpID(idConnection)
  If (myLastCorpseZ(idConnection) <> myZ(idConnection)) Then
    If publicDebugMode = True Then
      aRes = SendLogSystemMessageToClient(idConnection, "[Debug] Ignored looting corpse order because different floor :" & _
       CStr(myLastCorpseX(idConnection)) & "," & CStr(myLastCorpseY(idConnection)) & "," & CStr(myLastCorpseZ(idConnection)) & _
       " at bpID " & GoodHex(bpID))
      DoEvents
    End If
    OpenCorpse = 0
    Exit Function
  End If
  If Not (bpID = &HFF) Then
    requestLootBp(idConnection) = bpID
    If publicDebugMode = True Then
      aRes = SendLogSystemMessageToClient(idConnection, "[Debug] Looting corpse at :" & _
       CStr(myLastCorpseX(idConnection)) & "," & CStr(myLastCorpseY(idConnection)) & "," & CStr(myLastCorpseZ(idConnection)) & _
       " at bpID " & GoodHex(bpID))
      DoEvents
    End If
    If (TibiaVersionLong = 760) Then
    'fix for tibia 7.6.
        For sPos = 1 To 10
            tileID = GetTheLong(Matrix(ydif, xdif, myZ(idConnection), idConnection).s(sPos).t1, Matrix(ydif, xdif, myZ(idConnection), idConnection).s(sPos).t2)
            'Debug.Print DatTiles(tileID).iscontainer
            If DatTiles(tileID).iscontainer = True Then
            'first stacks are reserved for grounds or permament items
            'topStack is 02 in most of cases and then are the items that lies beneath topItem
                topStack = sPos
                Exit For
            End If
        Next sPos
        sCheat = "0A 00 82 " & FiveChrLon(myLastCorpseX(idConnection)) & " " & _
        FiveChrLon(myLastCorpseY(idConnection)) & " " & GoodHex(CByte(myLastCorpseZ(idConnection))) & _
        FiveChrLon(tileID) & " " & GoodHex(CByte(topStack)) & " " & GoodHex(bpID) & " "
    Else
        sCheat = "0A 00 82 " & FiveChrLon(myLastCorpseX(idConnection)) & " " & _
        FiveChrLon(myLastCorpseY(idConnection)) & " " & GoodHex(CByte(myLastCorpseZ(idConnection))) & _
        FiveChrLon(myLastCorpseTileID(idConnection)) & " " & GoodHex(CByte(myLastCorpseS(idConnection))) & " " & GoodHex(bpID) & " "
    End If
    GetCheatPacket cPacket, sCheat
    frmMain.UnifiedSendToServerGame idConnection, cPacket, True
    DoEvents
    ' give 5 seconds max to loot
    lootTimeExpire(idConnection) = GetTickCount() + 5000
  Else
    If publicDebugMode = True Then
      aRes = SendLogSystemMessageToClient(idConnection, "[Debug] Can't loot it. Please open new containers!")
      DoEvents
    End If
  End If
  OpenCorpse = 0
End Function

We should make looter based on Loot-Channel ; p who's in? : P

the current looter is detectable, super fast, with no delays, etc, so yes the looter code needs a lot of work, but.. meh

Yeah I'm also too lazy for this xD

I know it's pretty late, but i'm playing a 7.4 server that has problems with looting (some bodies blackd doesn't open), so where do I have to put this function code Nrated said? In conditions?

@michelallan do you mean 7.4 client or "7.72 client with server pretending to be 7.4" ?

@divinity76 yes, must be something like this (i'm playing Tibians.org), can u help me on it?

I noticed the bot doesn't open bodies when they are under me, what can I do? Do you have the same problem?

@michelallan the fist thing you must do is to identify the real tibia version it's using, not the 1 it claims it's using. for example, a couple of years back, many OT servers claimed to be 7.4 but was actually a modded 7.72. if you have a linux system, run cat tibia.exe | strings | pastebinit  - if you're on windows, download https://docs.microsoft.com/en-us/sysinternals/downloads/strings and run strings.exe tibia.exe > strings.txt and then upload strings.txt ...

@divinity76 via command line?

yes

strings.exe should be in the same directory of my tibia.exe (otserv)? im getting 'no matching files were found'

@divinity76 and when I try to put all in the same directory and execute the command u said, strings.txt is created with the following message "!This program cannot be run in DOS mode."

@divinity76 about tibia version, I can check it on details and it says is 7.72. By knowing that, is there a way I can fix this problem with looting?

you should get over 100 strings, if that is the ONLY string you got, then tibia.exe is packed or encrypted.
download Process Explorer ( https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer ) , double click on Tibia.exe in the list, then press Strings -> Memory -> Save -> foo.txt , and upload the foo.txt file

@michelallan oh, you think it's 7.72? nice, i think the fix is the same as @Nrated 's fix for 7.6,
    'fix for tibia 7.6.
        For sPos = 1 To 10
            tileID = GetTheLong(Matrix(ydif, xdif, myZ(idConnection), idConnection).s(sPos).t1, Matrix(ydif, xdif, myZ(idConnection), idConnection).s(sPos).t2)
            'Debug.Print DatTiles(tileID).iscontainer
            If DatTiles(tileID).iscontainer = True Then
            'first stacks are reserved for grounds or permament items
            'topStack is 02 in most of cases and then are the items that lies beneath topItem
                topStack = sPos
                Exit For
            End If
        Next sPos

just replace if ( TibiaVersionLong = 760 )  with if( TibiaVersionLong = 772 )
and see if that works

@divinity76 i should copy and paste all this code on a .txt file and load on conditions? I'm not a pro user of BlackD :P

@divinity76  there it is the file using Process Explorer
Tibia.exe.txt

@michelallan
i should copy and paste all this code on a .txt file and load on conditions?

no, not at all. this is a source-code fix, first you need to compile BlackD Proxy from source code (learn how to do that here: https://www.blackdtools.net/showthread.php?62649-(Tutorial)-How-to-compile-BlackD-Proxy-from-source-(incl-Win-7-x64) )

then you must open modCavebot.bas and find the Function OpenCorpse (it's near line 5506), and replace the entire function with @Nrated 's OpenCorpse, but replace     If (TibiaVersionLong = 760) Then with     If (TibiaVersionLong = 772) Then
then re-compile BlackD Proxy, and see if the cavebot can open corpses now.. good luck

@divinity76 it was hard as f*** to make it work, but still I got it. Now I'm checking how the bot is working and I can say that it got better, but still misses sometimes when my char goes up the body. With @Nrated function it should be perfect now? :/

@michelallan i don't know, try it lel

@divinity76 ye I tried already, but as I said, sometimes the bot still misses some corpses

@michelallan In theory it should work fine, since it is looking for a container on a specific position. You can always run it in debug mode and analize what's wrong with it.
Debug.Print all the items on exact position before looting and they print sPos that was picked up by a bot and then you'll know how their stackPos is working.
Also I think that your problem might be caused by different looting type. I'm not sure though :D It's been really long since I was playing with blackd's source.


Russian translation

I wrote Russian translation. You can link to this page from your official page:
Bootstrap – CSS Framework от Twitter.  [ http://jkeks.ru/jkeks.ru/archives/1853 ]

page is full of ads and viruses

I disabled WizardBanner banner ads. But I dont know what viruses you talking about. Can you tell me please what tools do you use to check for viruses ?
Are they there now ?

funny, i was just talking about this with some people from twitter. We're going to try to get the docs translated for 2.0


Set last exception in sys module. Fixes #216

Hi @cenkalti,
Thanks a lot for this fix! I've merged it here: https://github.com/jonathanslenders/ptpython/commit/c2a58d39d632773b7bb3997fa22cc87c7d683964


Document Submariner's role in the ecosystem

Fixes https://github.com/submariner-io/submariner-website/issues/792

In case you haven't tried it locally, here is how it looks like on the left side menu:


Uncaught TypeError: Cannot read property  slice  of undefined

Steps To Reproduce:

Create an __ init __.py in a python package
Try to add a few new lines by typing enter (I can't have more than two lines)

Error
Uncaught TypeError: Cannot read property  slice  of undefined Atom Version: 0.158.0 System: linux 3.13.0-43-generic Thrown From: Atom Core
Stack Trace
At /usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:557

TypeError: Cannot read property 'slice' of undefined
  at TextBuffer.module.exports.TextBuffer.applyPatch (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:557:39)
  at BufferPatch.module.exports.BufferPatch.applyTo (/usr/share/atom/resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
  at Transaction.module.exports.Transaction.applyTo (/usr/share/atom/resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
  at History.module.exports.History.abortTransaction (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:162:24)
  at History.module.exports.History.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:119:16)
  at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:683:27)
  at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app/src/text-editor.js:1146:26)
  at atom-text-editor.newCommandListeners.(anonymous function) (/usr/share/atom/resources/app/src/text-editor-element.js:290:22)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:243:29)
  at /usr/share/atom/resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:167:20)

#4749 and #5912 have both referenced undoing.

I just had this issue when trying to redo, here's the stack trace:
At /opt/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:682

TypeError: Cannot read property 'slice' of undefined
    at TextBuffer.module.exports.TextBuffer.applyChange (/opt/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:682:41)
    at TextBuffer.module.exports.TextBuffer.redo (/opt/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:848:16)
    at /opt/atom/resources/app.asar/src/text-editor.js:1395:31
    at TextEditor.module.exports.TextEditor.mergeSelections (/opt/atom/resources/app.asar/src/text-editor.js:2381:18)
    at TextEditor.module.exports.TextEditor.avoidMergingSelections (/opt/atom/resources/app.asar/src/text-editor.js:2363:35)
    at TextEditor.module.exports.TextEditor.redo (/opt/atom/resources/app.asar/src/text-editor.js:1393:12)
    at TextEditor.commandRegistry.add.stopEventPropagation.core:redo (/opt/atom/resources/app.asar/src/register-default-commands.js:305:21)
    at atom-text-editor.newCommandListeners.(anonymous function) (/opt/atom/resources/app.asar/src/register-default-commands.js:642:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/opt/atom/resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/opt/atom/resources/app.asar/src/window-event-handler.js:3:61)

Same for me here. very similar (if not same) stack trace as above:
Uncaught TypeError: Cannot read property 'slice' of undefined
C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:633
Hide Stack Trace
TypeError: Cannot read property 'slice' of undefined
    at TextBuffer.module.exports.TextBuffer.applyChange (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:633:39)
    at TextBuffer.module.exports.TextBuffer.undo (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:782:16)
    at C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\text-editor.js:1532:31
    at TextEditor.module.exports.TextEditor.mergeSelections (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\text-editor.js:2522:43)
    at TextEditor.module.exports.TextEditor.avoidMergingSelections (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\text-editor.js:2508:35)
    at TextEditor.module.exports.TextEditor.undo (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\text-editor.js:1530:12)
    at TextEditor.core:undo (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\register-default-commands.js:307:21)
    at atom-text-editor.newCommandListeners.(anonymous function) (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\register-default-commands.js:647:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\command-registry.js:259:29)
    at C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\window-event-handler.js:106:36)
    at HTMLDocument.<anonymous> (C:\Users\Myself\AppData\Local\atom\app-1.14.0-beta1\resources\app.asar\src\window-event-handler.js:3:59)

Atom 1.14.0-beta1 ia32, Windows 7.
Steps to re-produce it (consistently!):

Open a file (.scss in my case),
Paste some new text over its contents
Move a line up or down
Save it
Ctrl-Z a couple times.

@entozoon Can you reproduce it when you start Atom in safe mode atom --safe? It would also be great if you could share the files and text you are pasting that reproduces this consistently, thanks.

Yep, reproduced in atom --safe, sometimes, although it is intermittent.
_footer.scss ::
.footer {
	position: relative;
	background: red;
	color: red;
}

Create and open that file in atom --safe
Ctrl-A and Ctrl-V to paste the following over the top:

.footer {
	@include foo;
	.bar {
		margin-left: 10px;
	}
}

Move the line margin-left: 10px; up above @include (Ctrl-Up twice)
Ctrl-S save
Ctrl-Z undo a few times

Here is a simpler situation where a similar problem occurs, and it feels like the same issue:

Create and open that file again in atom --safe
Move the color: red; line two lines up (ctrl-up twice)
Ctrl-S save
Ctrl-Z undo

And the line disappears!
So I get the impression it's something to do with lines containing @import, although I can't imagine why :)

@entozoon Thank you for the additional information! With this information I was able to reproduce the issue.
Here is what I did to consistently reproduce in safe mode:

Copy the contents of this file into a new untitled tab.

.footer {
	position: relative;
	background: red;
	color: red;
}

Place the cursor on the 4th line
Quicky press Ctrl-Up twice to move the line up
Quickly press Ctrl-z the line disappears
Press Ctrl-z again
:boom: that links to this issue

Gif of Reproduction:

Reproduced with Atom 1.15.0-dev-1592b1e x64  on Windows 7.

@Ben3eeE Is this a regression in 1.14?

Investigating this today. It seems like the exception is due to referencing a non-existent row when applying the change during the undo operation. Probably a downstream effect of that line disappearing. Stay tuned.

I've found the root cause and have a PR open on the native Patch component to fix an oversight in the implementation. We should have a hotfix out soon for this issue.

This should be resolved via 1.14.0-beta2 which was just published.


New page has always forced default language

Issue summary
Using WAGTAILTRANS_SYNC_TREE = False, but any new page has forced language to be default language.
Non default language pages can be created only by using 'translate' menu.
How to create page which doesn't exists in default language?

You're right this is because we've added the default language as default value for the language field. When WAGTAILTRANS_SYNC_TREE = True we're always forcing the parent language as language. Maybe it's good to do that in all cases..

This was merged in 04c5cc5 and is now available in the 0.1.2 release.


Test the code

Write unit tests for every class and method.
There should be at least 80% test coverage, for starters.

There are currently 29 tests, that assure a 96% code coverage.


Mobile causing issues and mobile issues

Issue with mobile, affecting mobile: When looking at the mobile map sometimes nothing will load for an exceptionally long time. Longer than 30 seconds. Sometimes retarting it works or not (the browser on phone).
2nd issue with mobile, but affecting scanner: Enabling mobile eventually causes the scanner to stop working. Can't say if it's a specific time but appears to be around 30 minutes on average, though ive had it go longer.
Let me know if you guys have any ideas. This is only been happening the past 3 days or so of use.

So i reinstalled the app and got these fixed, but now they have started happening again, which to me is a pretty short time to have it working. Does anyone have any ideas of some cache files that are filling up or something of that nature?


feat: run external commands on a file under the cursor

By doing "g:" on a file a prompt asks us which command to run on the current file under the cursor. This is helpful when we want to run a quick command like file or ldd.

Seems like there is no need to merge this pr the same thing can be accomplished by putting this in your config:
vim.keymap.set("n", "g:", function()
  vim.ui.input({ prompt = 'command: ', completion = "shellcmd" }, function(input)
    if input == "" then
      return
    end
    local file_path = oil.get_current_dir() .. oil.get_cursor_entry().name
    if file_path == "" then
      return
    end
    vim.api.nvim_command(":! " .. input .. " \"" .. file_path .. "\"")
  end)
end, { desc = "Run custom commands on the entry under cursor" })

I was looking for a way to do this and found this PR, this is actually super useful. I vote for
this to be added upstream. It's true that with a very simple function you can add the functionality, however
this just plays nicely with the kind of workflow that oil gives you, and I think it would make sense to add it.
If someone comes across this, add this to also handle when you abort the ui.input. In those cases it returns nil and it would crash. And wrapped it in a autocmd to only add the keymap in an oil buffer
vim.api.nvim_create_autocmd({ "FileType" }, {
    pattern = { "oil" },
    callback = function()
        vim.keymap.set("n", "g:", function()
            vim.ui.input({ prompt = "command: ", completion = "shellcmd" }, function(input)
                if input == "" or input == nil then return end
                local file_path = oil.get_current_dir() .. oil.get_cursor_entry().name
                if file_path == "" or file_path == nil then return end
                vim.api.nvim_command(":! " .. input .. ' "' .. file_path .. '"')
            end)
        end, { buffer = 0, desc = "Run custom commands on the entry under cursor" })
    end,
})


add getTradesForAccount and its test cases

it will add getTradesForAccount and its test cases.
API reference: https://www.stellar.org/developers/horizon/reference/endpoints/trades-for-account.html
Thank you :)

Merged


Invalid code for implicitly Notnull Primary Keys with SQlite

What version of Go are you using (go version)?
go 1.9
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
darwin/amd64
What did you do?
Generate code with XO for a productive Sqlite3 database.
An integer Primary Key column which is implicitly, but not explicitly declared as "not null", causes invalid code.
CREATE TABLE revinfo (
  rev INTEGER primary key
);

XO generates this revinfo.xo.go which does not compile:

// Revinfo represents a row from 'revinfo'.
type Revinfo struct {
	Rev sql.NullInt64 `json:"rev"` // rev

	// xo fields
	_exists, _deleted bool
}

// ...

// Insert inserts the Revinfo to the database.
func (r *Revinfo) Insert(db XODB) error {
	var err error

	// if already exist, bail
	if r._exists {
		return errors.New("insert failed: already exists")
	}

	// sql insert query, primary key provided by autoincrement
	const sqlstr = `INSERT INTO revinfo (` +
		`` +
		`) VALUES (` +
		`` +
		`)`

	// run query
	XOLog(sqlstr)
	res, err := db.Exec(sqlstr)
	if err != nil {
		return err
	}

	// retrieve id
	id, err := res.LastInsertId()
	if err != nil {
		return err
	}

	// set primary key and existence
	r.Rev = sql.NullInt64(id) // <<<<< Compile Error because invalid conversion
	r._exists = true

	return nil
}

Analogously, all Foreign Key references to the "rev" column generate the same invalid conversion in their files.
Note 1: Such "revinfo" tables are generated by Hibernate Envers.
Note 2: There is a historical bug in SQlite so that Primary Keys indeed can be Nullable, which does not conform to the SQL standard.
I'd find it acceptable that XO creates invalid code where SQlite allows invalid DDL :-)
But this does not apply here. The "rev" column is of type "integer" and in this special case, SQlite conforms to the SQL standard and implicitly defines the Primary Key as "Not Null".
Suggestion: XO could implicitly assume Primary Keys to be "Not Null".  This should fit the SQL standard.
personal limitation#1  I'm aware that implicit behaviour needs to fit in any case, and I expect to miss some implications.
personal limitation#2  I'm unsure whom to blame. Eventually, the SQlite driver should already report the Primary Key as "Not Null".

This doesn't seem related to any feature of the Go programming language. I think you probably want to close this and open an issue in https://github.com/xo/xo (I'm assuming this is the package that you're referring to here).

Yeah, like @gbbr says, it seems that you have the wrong issue tracker. I've never heard of xo.

Absolutely. I see it was posted here by accident. I'm very sorry!!
Could you purge the whole posting, please ?


[Docs]: Cache page

Type
New content idea
What do you want to report?
We need a dedicated cache page under optimizations to explain the feature in more depth and show examples/use cases
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Review link: https://storage.googleapis.com/sem-docs/main/index.html#/docs/using-semaphore/optimization/cache


this is a test PR for testbot

Changelog-entry: this is a test PR for testbot
Signed-off-by: Alexandru Costache<EMAIL_ADDRESS>

@resin-jenkins retest this please

@balena-ci rebase


How to get the script running in the online mode?

As we know, the script example "NativeTrainer.asi" provided by Alexander Blade (the author of Script Hook V) can not run in the online mode. I'd like to if I use the GTALua engine; then can the script run in the online mode? Or how can I get the script to work in the online mode? I don't know the method. Can you share some?Need some specific methods.

I'm not the developer of GTALua. The Script Hook V doesn't work online on purpose because you'll get banned.


Move default CNI bin directory from SNAP to SNAP_DATA

This PR changes the default location of the CNI bin directory from "${SNAP}/opt/cni/bin" which is read-only to "${SNAP_DATA}/opt/cni/bin" which is writable.  This simplifies the installation of any add-ons or additions that need to add or manipulate CNI such as cilium, calico, or potentially multus.  Currently when any of those are enabled or disabled they need to switch the CNI bin directory and then switch it back which creates complications as well cross compatibility concerns (two are enabled, then one is disabled breaking the other).

Hi @apnar, sorry for the late reply, I have good news. @sergiomanso will pair with you in this task. This will speed up the implementation and review phases and will also help in the future maintenance of the feature.
@apnar, @sergiomanso it is up to you to find the best way to coordinate your efforts.
Welcome to the task @sergiomanso

Hi @apnar and thanks @ktsakalozos!
First of all, congrats on the multus PR!
As suggested, I already started to have a look at deploying multus as a DaemonSet.
Let me know what's the best way for coordinating this task. :)
Regards

Thanks @ktsakalozos! I look forward to working with you @sergiomanso.
I just rebased this PR to remove the merge conflicts.  I think the first step to getting multus running well as a DaemonSet (potentially in a clustered setup) is deciding if you are ok with this PR moving the default cni bin dir to somewhere writable.  Today anything that wants to do something different with CNI has to change it and then change it back on removal which creates a good number of potential cross-conflicts.  Most of this PR is removing that code to simplify things.  Let me know your thoughts.

I couldn't find a way to contact you so I will leave here my launchpad where you can find my email (or irc): https://launchpad.net/~sergiomanso

There is also the #microk8s channel on the upstream k8s slack.

closing this PR as we'll incorporate this change into the multus add-on


brackets mess with UnRen

The brackets in the version naming system [ ] messes with unren.bat all versions.
can't Decompile rpyc files without removing the brackets first. took me a while to figure out that is was the brackets. tried everything else first.
I don't know if the brackets mess with RenPy games when you play them. but unren doesn't work with brackets.
could we use ( ) instead? that works fine.

I'll replace square brackets with rounded ones in the next version.


Add "Remote character set" in SFTP Configuration Options

Hi!
Is it possible to add to the SFTP Configuration Options the "Remote character set" feature?
All my files on remote server has Windows-1251, but downloaded as UTF

As I can see, stats command on server does not return encoding attribute. I can not verify it automatically :(
I use the https://github.com/mscdex/ssh2 package and depend https://github.com/mscdex/ssh2-streams.
But it can't be guaranteed that there is always one encoding on the server.

There is no need to check the encoding on the server. It's enough to make the configuration on the client side possible.


Allow initializer access?

Currently i'm trying to add an extension but I can't since I can't initialize the struct. Async(block)
static func safeMain(block: dispatch_block_t) -> Async {
    if NSThread.isMainThread() {
        block()
        return Async(block)
    }
    return main(block: block)
}

Related to #67

I dont' think exposing the struct is the solution. Try and make a pull request that integrates this into Async instead.
Also, I personally don't see value in this at all though. If an API don't document whether they return on same thread or on main, you should have that fixed instead. Enlighten me :)

Your right, this shouldn't be added to the library. This is an edge case.


EL-1440 - prove FALA tests run correctly

What does this pull request do?
Check that FALA tests run correctly
Any other changes that would benefit highlighting?
Not to be merged
Checklist

[ ] Provided JIRA ticket number in the title, e.g. "LGA-152: Sample title"

No longer needed after merge of EL-1440