impure.nix, stage.nix activationPackage is a function not a list.

I was reorganizing my overlays between system level configuration.nix and home-manager and have gotten myself into a bad spot. I can't determine if this is just a bug in generating the "news" messages, or if this is actually something catastrophic. This cropped up on one of my machines yesterday, but strangely it was only after several rebuilds that it finally reared it's head on another. I'm not sure if the underlying issue is buried in such a way that it was hiding in a closure, which took a few rebuilds to finally unravel.
The short story of the overlay business was trying to synchronize my user and system level nixpkgs overlays. I used the "overlays-compat" solution that is listed in the NixOS manual; and this bug finally cropped up a bit later when I followed some advice that I found in home-manager's option's manual that suggested making ~/.config/nixpkgs/config.nix a generated file in home-manager's home.nix. This didn't immediately blow up, and this error only occurred around 5 or 6 rebuilds later (adding benign pkgs).
I won't dump my full configs or anything quite yet, but here are my errors:
Short:
λ home-manager switch
error: value is a function while a list was expected, at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:243:8
error: value is a function while a list was expected, at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:243:8
(use '--show-trace' to show detailed location information)
/home/camus/.nix-profile/bin/home-manager: line 99: /tmp/home-manager-build.at75hlxORX/news-info.sh: No such file or directory

Verbose:
λ home-manager -v switch
error: while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/impure.nix:15:1, called from /nix/var/nix/profiles/per-user/root/channels/home-manager/home-manager/home-manager.nix:1:10:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:20:1, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/impure.nix:82:1:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:42:1, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:123:10:
while evaluating 'dfold' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:60:27, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:129:4:
while evaluating 'go' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:63:18, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:72:13:
while evaluating 'folder' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:89:33, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:68:18:
while evaluating 'allPackages' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:113:17, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:101:12:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:12:1, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:113:26:
while evaluating 'fix' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/lib/fixed-points.nix:19:9, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:248:3:
value is a function while a list was expected, at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:243:8
error: while evaluating the attribute 'activationPackage' at /nix/var/nix/profiles/per-user/root/channels/home-manager/modules/default.nix:46:3:
while evaluating 'showWarnings' at /nix/var/nix/profiles/per-user/root/channels/home-manager/modules/default.nix:16:18, called from /nix/var/nix/profiles/per-user/root/channels/home-manager/modules/default.nix:31:12:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/impure.nix:15:1, called from /nix/var/nix/profiles/per-user/root/channels/home-manager/home-manager/home-manager.nix:1:10:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:20:1, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/impure.nix:82:1:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:42:1, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:123:10:
while evaluating 'dfold' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:60:27, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:129:4:
while evaluating 'go' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:63:18, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:72:13:
while evaluating 'folder' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:89:33, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:68:18:
while evaluating 'allPackages' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:113:17, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/stdenv/booter.nix:101:12:
while evaluating anonymous function at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:12:1, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/default.nix:113:26:
while evaluating 'fix' at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/lib/fixed-points.nix:19:9, called from /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:248:3:
value is a function while a list was expected, at /nix/store/7qvd11gb3nvgqdvgs1apv7hjzp5a4laz-nixos-19.09pre174426.acbdaa569f4/nixos/pkgs/top-level/stage.nix:243:8
/home/camus/.nix-profile/bin/home-manager: line 99: /tmp/home-manager-build.AcX7tBiDuE/news-info.sh: No such file or directory

I have determined that this is an issue with NixOS not home-manager. Apologies.


Suggestion/Related Mod Idea: "MCPNP" for servers

(Note: I realize that this may seem dumb, but trust.)
I have noticed, in my time playing minecraft with friends and the alike, that while setting up a server, our main boundary of entry was Port Forwarding.
Im proposing that a variant of MCPNP be made for servers exclusively. Allowing potential server hosts to simply grab a jar, set the settings correctly, and host a full server.
This would allow prevention of the dreaded player on server reliance. And as such, someone could simply have the server open, whilst not having to have their account in the world to host it.
Perhaps the mod would grab the port that the settings.txt wants to go to, or it could also just be set to a specific port.
Either way, that is my proposal.

maybe this could be like a paper plugin


Typo in superscripts (Exchange-Teams-interact.md)

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@dstrome PR has been copyedited and is ready for final review, could you please check and merge? Thanks!


refactor(robot-server): Log stop completions

Since #9169, stopping a protocol over HTTP involves background work that can take several seconds.
We already log when this background work begins. This PR adds logging for when it ends. This can help debug problems with concurrency and with the lifetime of a run.

Closing this without merging for now.
Bckground tasks run this way are, in general, already logged at a debug level:
https://github.com/Opentrons/opentrons/blob/03e3c559b134502bc411e8d97c5b33e16c6d9b2a/robot-server/robot_server/service/task_runner.py#L46
These logs appear after doing:
POST http://{{hostname}}:31950/settings/log_level/local
{
    "log_level": "debug"
}

I think we should revisit a few different things about this in the future, though:

Low-level generic "background task logging" is probably not enough in general. We want to be able to log things semantically and with context. For example, "run abc123 stop completed" is often better than "run.stop() called."
This specific event is more appropriate as an info, not a debug.
If we're logging things as debug, why do those require a config change to see? Why are we filtering them out by default?


Retire legacy preprocessing patterns which are modeled by Linalg fusion.

There were no regressions from the previous reports; the binary sizes are not changed. The regression seems to be noise.


Switch from request to phin!

phin is super lightweight compared to request. Request and its dependencies are way too large for use in this project. Request and its dependencies total to over 50 (production) dependencies. 👎
This PR improves install time and improves performance for NPM data fetching!

This will also fix this vulnerability.


Is it possible to train the DispNet alone?

Hi,
Since the depth net and pose net are trained jointly, they must benefit from each other. Is it possible to only train the DispNet alone as a supervised problem without using pose information? I understand that one of the highlights of your paper is to use unsupervised learning, but I'm curious is it reasonable to train the DispNet alone in a supervised framework? I'm studying different depth estimation network structures, and it will be more fair to compare all structures in a similiar supervised framework. Thank you!

hi sanweiliti,
you can check this paper:
https://arxiv.org/abs/1512.02134
dispNET comes from there and it was a supervised model.
(actually, all the model can be either supervised or unsupervised only depends on your loss fucntion)
and BTW, I'm interesting in  your study. Which network is the best one so far XD?

Hi @bachw433
Thanks! I will try to modify it. My study focuses more on relationships between depth estimation networks and segmentation networks so I can't really say which model is the best.


brush interaction

[x] tests that show the input events
[x] put the brush on top of the svg?
[x] can we make it work if multiple marks are brushed? otherwise, error?
[x] add an option to make viewof the geometric selection (vs. data selection)?
[x] remove the intersection option, unless we have another intersection to offer?
[x] could a brush span multiple facets? (but then, no geometric selection…)
[x] fix aria-label
[x] Using a RAF to append the brushable g elements to the top of the svg seems unpredictable—maybe try to do it like tip.js does, with a postrender function
[x] documentation
[ ] cross-filter example (#1711)
[ ] how to display unselected vs selected

demo: https://observablehq.com/@observablehq/plot-brush-interaction-1653
closes #5
supersedes #71 and (probably?) #721

I exploring the use of render transforms to override the appearance of a mark during interaction in the mbostock/pointer-highlight branch.

This branch now adopts the creator() API. I still have to figure how to type the selected and unselected options, though.

Is this PR dead? I'd really like to be able to use this.

@Fil Would be really nice to be able to have this working alongside tip/pointer in such a way that does not prevent them from emitting data. I.e. if a data point is clicked on via pointer and the plot chart is declared as a viewof, it should emit the data for that point rather than all the data (or at least configure brush to be able to be overridden in this way).

@mishatsvelik ref. your notebook https://observablehq.com/d/6f3b6e6206c3451b.


Update configure-proxy-internet-windows-defender-advanced-threat-prot…

…ection.md
Note added. Resolves https://github.com/MicrosoftDocs/windows-itpro-docs/issues/2784

@mjcaparas - can you please assist to check, approve and merge the content for this PR based on issue #2784?
Thank you.

Please use the full product name Windows Defender ATP and not "WDATP".

Thanks @mjcaparas - have done.

@mjcaparas - can you please assist to check, approve and merge the content for this PR based on issue #2784?
Thank you.

@mjcaparas - I would like to follow up on this. Can you please assist to check, approve and merge the content for this PR based on issue #2784?
Thank you.


Feature request: keep ordering in ClusterView after multiple merges or good/mua/noise classification

Right now, in the version of phy and phy-contrib I'm using (1.0.9 and 1.0.15), regardless of what attribute I sort the clusters by (e.g. channel, depth, n_spikes) whenever a cluster is marked as good/mua/noise all the clusters are resorted by ID. So it's not currently possible to move through the clusters by n_spikes or depth and mark their type.
Also, if more than 2 clusters are merged together the program loses your current position ClusterView, so it is not possible to progress through all the units in any order while performing multiple merges. This makes it difficult to progressively go through the whole list and do all the merges in one pass.

(Just noticed this is a repeated of Issue #762)

should be fixed in the dev branch


Fix sockets closure bug

Setting the docker.StatsOptions.Timeout to 0 in the Stats() function, means that the kernel waits to close the socket connection until it receives an "explicit" signal! However the docker client library we are using for some reasons is not closing the connection when the Stats() function returns (probably this can help: https://github.com/fsouza/go-dockerclient/issues/300). So a solution i found is to set the timeout connection, so the kernel keeps it alive just for this amount of time.

ship it!

Lg2m. Didn't realise go doesn't provide an int Min function.


Disable new job submission via property change

Add ability to disable new job submission by changing property genie.jobs.submission.enabled to false. Will result in server returning 503 status codes for the duration this property is set to false. Response will either contain default error message or the contents of the property genie.jobs.submission.disabledMessage.
This property is dynamic and read from the application environment every job request so it should not require a server restart to take effect.

Coverage increased (+0.05%) to 92.054% when pulling fbaead65fca4540da3bf2e4f8bf11117c8d6194e on tgianos:disableJobSubmission into ab11d0349be60a4d966162990d9f5d9b4b412a3e on Netflix:master.


NIFI-5986 Adding "Stop & Configure" button functionality to Processor…

NIFI-5986 Added "Stop & Configure" button functionality to Processor Details modal.
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[ x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x ] Has your PR been rebased against the latest commit within the target branch (typically master)?

[x ] Is your initial contribution a single, squashed commit?

For code changes:

[ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ ] Have you written or updated unit tests to verify your changes?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@aeaversa I don't think the terminate logic needs to be completely removed but it should only be used when necessary. Generally speaking, when possible the processor threads should be allowed to complete gracefully.
I could see possibly showing some sort of dialog/status if there were long-running threads and showing how many were remaining. Then maybe there provide an option there to cancel or terminate. But this is where I'd like to make sure that @moranr and @andrewmlim (and anyone else for that matter) can chime in if they want to.
Thanks!

I could see possibly showing some sort of dialog/status if there were long-running threads and showing how many were remaining. Then maybe there provide an option there to cancel or terminate.

Agreed @mcgilman -- if there are active threads, it would be nice to display messaging to the user (within the current dialog, new dialog, ...?) explaining that fact, along with some type of timer or indicator to let user know the application is watching/waiting to allow it to end gracefully, at which point it will open the configurable settings. Then, as mentioned, provide the option to force the termination immediately (as it may be the only viable option).
Also thinking it'd be nice if the user chooses to wait it out, to close that dialog and continue to work in the app. After a certain amount of time, reopen the dialog to remind them we're still waiting and again provide the terminate option.
Thanks for your work on this @aeaversa . I will plan on testing this out later and provide more detailed feedback.

@moranr - Yeah I actually like this idea a lot. How about this... we present the processor configuration dialog, with its "Apply" button disabled, as soon as they hit the "Stop & Configure" button on the processor details dialog, thereby allowing the user to begin to view/change properties while the threads continue to closeout normally with a subtle feedback mechanism on the configuration dialog that displays the active thread count to the user as the processor is polled (i.e. "Stopping..3 active threads remain"). From there we can simply present a "Terminate" button to the bottom of the dialog, should the user want to elect to do so. Once the process reaches a zero thread count,  we can simply "enable" the Apply button and remove the "Terminate" button and the form would function as originally intended. Let me know if this design seems like a more natural flow to you guys and my thanks again for all your help with this!

@moranr - Thanks Rob!  Should have a fresh commit out on the PR in a few days and look forward to hearing your suggestions when you can take a test drive.

@aeaversa @moranr I'm definitely not opposed to the idea's here. Just wanted to offer a few thoughts.
Currently, we cannot open the Configure dialog while there are still active threads. This path forward moves away from that. We'd likely want to update the Configure context menu availability as well. The one benefit the current solution offers, however, is that if the processor is reporting any issues they are available via its bulletins. If we already have the Configuration dialog open there would be no way to see these. This is something that I hadn't even considered during my previous comments. We could also make these bulletins available, in addition to the active threads, but I wonder if it starts to get too muddled all in the Configuration dialog.
Not sure, maybe it's not necessary. Thoughts?
Also looking forward to checking it out.

@mcgilman - I definitely see your point. It really would be nice to have the bulletins available for the processor on the dialog. I'll look into it as I refactor.

@mcgilman @moranr - I went ahead and updated the code to allow the Processor Configuration/Details dialog(s) to support the display of threads and bulletins in the same style as is displayed on the processors on the canvas. A terminate prompt is on the Processor Configuration dialog "Apply" button as well, such that should the end user hit "Apply" and threads are still active, it will simply provide them an option to terminate or wait for the threads to finish normally. I believe this is a good solution to allow threads to naturally close out in the background as the user is making their changes. I did not institute an additional polling process to inspect the thread state, but rather simply synced the thread state value off the current canvas value for the component, since that interface already has a polling process active. Additionally, per @mcgilman suggestion, I added the Stop & Configure option to the context menu as well. Please take a test drive and let me know your feedback whenever you guys get a chance. My thanks again for all your help with this.

Saw that some tests were failing the continuous integration checks and re-based to current master.

Attaching screenshots...

@aeaversa, thanks for taking this on; it will be a great addition to NiFi!
I would like to propose a slightly different way of presenting the info and guiding the user. It builds on some established design patterns for showing processor status and interactive conventions when stopping/terminating active threads.
I'm hoping this is straight forward referencing the attached mockup. This single image shows three dialog states, starting with Processor Details (left). This is as if the user double-clicked or selected 'view configuration' from a running processor's context menu. Here in the dialog there's a new section below the header that resembles the canvas's status bar. It's a familiar design, in a familiar location and it uses familiar icons along with the 'Run Status' labeling you'd see in the Summary table. The bulletin icon and styling is replicated as well. The new addition here is the 'stop & configure' action.

Note: I used a processor that has an 'Advanced' configuration button as well, as that is another thing competing for real estate in this space.
The second dialog (center) is as if the user clicked the 'stop & configure' action and is now in the 'Configure Processor' dialog with editable fields. The processor status has changed to 'stopped', but the active thread continues. In this waiting state, the user can make changes, but the 'Apply' button is disabled and will remain so until the active thread completes. However, there is now a 'terminate' action available. This aligns with the current interactive convention seen from a processor's context menu (first you stop the processor, then the action is replaced with terminate if threads are running).
The third dialog (right) would be as if a thread completed on its own, or the user clicked the 'terminate' action. Here you can see the 'Apply' button is available allowing the user to proceed and continue as normal.
Interested in hearing your thoughts, along with @mcgilman 's as well.

@moranr - Hey I really like this proposed change! I am on vacation thru next week, but if @mcgilman concurs, I'll refactor the current design to align with this specification when I get back and push out a fresh commit.Thanks again for the great feedback!

@aeaversa @moranr I also like Rob's suggestions. They do a good job exposing the necessary operational details while limiting the number of places we need to do so. Each offers pretty subtle changes but allows for more streamlined user experience. Nice!

@mcgilman @moranr - sounds good. I'll go ahead and refactor to the approved design when i get back. Thanks again for all the help with this.

@mcgilman @moranr - Refactored all the requested changes in and pushed out an update to the branch. Attached are a few screen shots of how it all looks.  Please take a test drive and let me know your feedback whenever you guys get a chance. My thanks again for all your help with this.

@aeaversa Thanks for the updates. Good work here. A few more comments on the behavior. I haven't had a chance to dig in yet but want to share some initial thoughts.

I think the Stop & Configure menu item should be available when the component is stopped but there are active threads. This is most easily testable using DebugFlow and setting the On Trigger Pause Time. Should this menu item be visible under the same conditions as the View configuration menu item?
Should the status bar be visible when it's unneeded?
Quickly looking at the changes introduced into the jquery dialog component, I'm wondering if we should decouple the status bar content so that there's no dialog instance specific things in there. The fact that we're rendering component status, threads, and bulletins there are very specific to this use case and probably shouldn't be in the generic dialog component. What if we wanted to take this approach with other dialogs and other components that may report status differently (like active transmission for remote ports)? The fact that the button model is configurable is great.

@moranr Any thoughts? Icon for the Stop & Configure menu item look good?

I think the Stop & Configure menu item should be available when the component is stopped but there are active threads. This is most easily testable using DebugFlow and setting the On Trigger Pause Time. Should this menu item be visible under the same conditions as the View configuration menu item?

@mcgilman if I'm understanding correctly, this way you'll only ever see one option (Configure or View Configuration or Stop & Configure), right?
Also, if the above is true, we won't need to introduce another icon (fa-pencil-square). The gear icon can be used for all the options.

Should the status bar be visible when it's unneeded?

You'd have access to bulletin details, so I'd say that is a good reason to keep it.
Other thoughts:
The icon + button text + background color in the status bar feels like a bit too much. I'm leaning more toward the text only option + subtle underline like in the mockups I put together. Thoughts?

@mcgilman - Thanks again for the great feedback!

As far as the "Stop & Configure" being persisted in the context menu, I do see where you are going, but think a clearer approach may be to simply modify the "View Configuration" to prompt as "Configure" when a processor is in a stopped state with active threads. I say this because the processor is already displaying the "Stopped" icon even when it has active threads and seeing a "Stop & Configure" button persisting probably would lead the user to think their prior "Stop & Configure" action was not successful. Thoughts?

As far as the status bar being visible when its not needed, the feedback I've gathered from users has been pretty consistent in that when opened, the configuration dialog window tends to overlay the processor element on the graph and thus prevent the user from knowing the current state [ie- Started/Stopped/Invalid/Validating/Disabled]. The current implementation covers all states the processor could potentially achieve in the status bar and I can't see the harm in continuing to provide that state visualization. Thoughts?

Lastly, I do see your point on not having the status bar as part of the jquery.modal component. I too wasn't a fan of putting it there, but I placed the logic there in order to avoid replicating code across the two dialog windows as it was a common point to both that I could leverage the button model logic already present. I will take a look at it and see if I can decouple that further to be more generic.

@moranr - As far as the button text, the main concern I got from users was that when it was just plain text, users didn't realize it was actually clickable, so I tried to accentuate it. I'll mess with the style  to get it closer to your original vision but still keep the button effect. Thanks again for all your help with this.

@moranr - As far as the button text, the main concern I got from users was that when it was just plain text, users didn't realize it was actually clickable, so I tried to accentuate it. I'll mess with the style to get it closer to your original vision but still keep the button effect. Thanks again for all your help with this.

Overall the entire status bar will be new and I'd think easily noticeable, inviting users to explore more of what's there, but can understand some initial reaction you observed when testing. Things I tried to establish is a style unique to a clickable action (uppercase, same size and color font as a button) and including an underline suggestive of a link. I do think a background change on hover in this case would help/make sense since the bar is of similar (or maybe the same) height as a button and it is in close proximity to another element (the bulletin).

@moranr I think it is flawed logic to rely on the status bar being "new" as an indicator the wording/button is a clickable object. It won't be "new" forever, and it should be just as obvious to a first-time user. I like the look and feel of @aeaversa approach.
The icon on the Stop & Configure in the status bar is the only thing I'm 50/50 on. If the icon stays, it has to remain as the fa-pencil-square to be consistent with the context menu since the gear already exists in this menu.

I think it is flawed logic to rely on the status bar being "new" as an indicator the wording/button is a clickable object. It won't be "new" forever, and it should be just as obvious to a first-time user.

@markobean I agree. I didn't mean to express the idea that something new would indicate something is clickable. My point was that visually the status bar, as a whole, is new. Someone seeing it for the first time would likely be curious about each part of it. Evaluating the appearance of the text alone is what I think indicates it's clickable. It is styled like other links in the app and similar to a button in font size/color/case treatment.

The icon on the Stop & Configure in the status bar is the only thing I'm 50/50 on. If the icon stays, it has to remain as the fa-pencil-square to be consistent with the context menu since the gear already exists in this menu.

If I'm following the discussion by @mcgilman and @aeaversa correctly, we may only see a 'Stop & Configure' labeled action from the dialog with the new status bar. The context menu action will continue to say 'Configure' because it is stopped (even though active threads exist).

@moranr - As far as the button text, the main concern I got from users was that when it was just plain text, users didn't realize it was actually clickable, so I tried to accentuate it. I'll mess with the style to get it closer to your original vision but still keep the button effect. Thanks again for all your help with this.

Overall the entire status bar will be new and I'd think easily noticeable, inviting users to explore more of what's there, but can understand some initial reaction you observed when testing. Things I tried to establish is a style unique to a clickable action (uppercase, same size and color font as a button) and including an underline suggestive of a link. I do think a background change on hover in this case would help/make sense since the bar is of similar (or maybe the same) height as a button and it is in close proximity to another element (the bulletin).
Another issue I have been trying to avoid adding to is introducing more icons. IMO NiFi has an awful lot already ;)

@moranr - Yeah, I agree. I will ensure the style is more subtle but still gets the idea across.

I think it is flawed logic to rely on the status bar being "new" as an indicator the wording/button is a clickable object. It won't be "new" forever, and it should be just as obvious to a first-time user.

@markobean I agree. I didn't mean to express the idea that something new would indicate something is clickable. My point was that visually the status bar, as a whole, is new. Someone seeing it for the first time would likely be curious about each part of it. Evaluating the appearance of the text alone is what I think indicates it's clickable. It is styled like other links in the app and similar to a button in font size/color/case treatment.

The icon on the Stop & Configure in the status bar is the only thing I'm 50/50 on. If the icon stays, it has to remain as the fa-pencil-square to be consistent with the context menu since the gear already exists in this menu.

If I'm following the discussion by @mcgilman and @aeaversa correctly, we may only see a 'Stop & Configure' labeled action from the dialog with the new status bar. The context menu action will continue to say 'Configure' because it is stopped (even though active threads exist).

@moranr - Actually, I think we are still keeping the "Stop & Configure" context menu entry. The main objective of the feature was seeking was to provide a more direct path for the user that allows them to edit a processor's properties, and having that direct option in the context menu i would say is super important. I think @mcgilman was just pointing out the fact that in the change the "View Configuration" menu option needs to be updated to "Configuration" when a processor is in a stopped state with active threads, since now the Processor Configuration modal will simply disable the Apply button and provide the user a Terminate button in the status bar should the user wish to apply their changes quickly. @mcgilman Let me know if I understood you correctly on that. I am not married to the pencil-square icon, but it does seem that all the context menu items all have an icon, so I'm open to suggestions. :-) Thanks to everyone for all the great feedback.

I think the confusion here is stemming from the original JIRA and the comments on the motivation for the change above. The issue as described was that we have a Processor running someplace. Upon viewing the Processor Details, the user realizes they need to update some configuration and the process to do so is extremely cumbersome. I can see why @moranr was surprised by its addition of a new menu item. I was also thrown off by it a little bit which is why I wanted to make sure @moranr could review it.
If we are considering a case where the Processor is running and the user wants to configure it (not from the Processor Details dialog) I would suggest we take a combined approach. The user would still select the Stop menu item from the context menu as they would today. From there we could immediately show the Configure menu item even if there are active threads since we won't activate the Apply button until those threads complete.
@aeaversa I can understand the code duplication concern with extracting the run state, threads, and bulletins out of the dialog. However, I think you should be able to create some utility function that Processors can utilize which can return some general type (maybe a jQuery instance) so we don't need that type of business logic within the dialog widget itself.

Thanks @mcgilman . Yeah, my plan was to move the status bar code into its own jQuery based component that can be extrapolated onto any element. That way the code remains shared between both modals or whatever interface you want to consume the capability. As far as the context menu.... I too wasn't happy with the original icon, so I did redo it (see screen shots attached), I've also cleaned up the status bar button look and feel per @moranr 's feedback. Hopefully I've met the desired look and feel he was going for, but if not let me know.  I know the goal of this feature was attempting to provide an efficient navigational route to get the processor to a state where the user can make configuration changes, hopefully via a single click.  Adding the Stop & Configure option in the context menu does get the user there in one click, so are we sure we want to take that option away? My thanks again for all the great feedback on this.

@aeaversa I like the new icon since it is a combination of the pre-existing ones.

If we are considering a case where the Processor is running and the user wants to configure it (not from the Processor Details dialog) I would suggest we take a combined approach. The user would still select the Stop menu item from the context menu as they would today. From there we could immediately show the Configure menu item even if there are active threads since we won't activate the Apply button until those threads complete.

I agree with @mcgilman 's thoughts here. I think that would be a step in the right direction to alleviate some of the navigation deficiencies around configuration, but I don't think offering additional context menu options combining existing actions is part of the solution.
To further improvement in this area, I think having a separate discussion around changing the native behavior of NiFi could be worthwhile. By that I mean something like making 'configure' always available and if a component is running it is automatically stopped (for config changes to take place), then restarted (if it was previously running) once changes are applied.

@moranr , @mcgilman - Ok, so for now I'll just go ahead and remove the Stop & Configure option in the context menu. As the new menu behavior,  I'll adjust the View Configuration menu option flip to Configure once a processor is in a stopped state with/without active threads. So essentially, the end user will have to click "Stop", then click "Configure" and if there are active threads, the "Apply" button will be unavailable until those thread resolve naturally or via a terminate call. Should have an updated commit for you guys later today.  Thanks again.

@moranr , @mcgilman - Should have an update to the branch for you guys on Monday.

@moranr , @mcgilman - Ok, the status bar has been decoupled into its own component and the context menu has been modified to display "Configure" versus "View Configuration" when a processor that is modifiable is semantically stopped, but retains active threads. Also I cleaned up the synchronization method with the canvas by adding a simple MutationObserver against the target canvas element. Please take a test drive and let me know if this works for you guys.  My thanks again for all your help with this.

@moranr , @mcgilman - Some updated screen shots

@aeaversa looks great based on the screenshot you included! I will try to pull this down soon and give it a go. I imagine @mcgilman will want to dig in a bit more as well.

@aeaversa Sorry, I was away for the past week. I wanted to revisit this today but there appear to be some merge conflicts now. Can you rebase your branch? Thanks!

@moranr , @mcgilman - Sorry for the delay on this. I went ahead and rebased to the latest master and resolved all the conflicts.  Look forward to your feedback.

+1
I reviewed this from a usability point of view, and found no problems. This will help working with a flow enormously!
@moranr, @mcgilman, any additional comments?

Sorry for the delay in getting back to look at this!
+1 -- functionality looks good and it's working as I expected based on past discussion.

@mcgilman -  I will look through these issues in the morning and try to get you out a fresh push tomorrow.  Thanks again for your help with this.

Tested the UI/UX and everything looks good - functionally works and intuitive. Also did some simple tests in a secured environment, making sure user who did not have permissions, did not see "Stop & Configure" and "Terminate".  Thanks for implementing this new feature @aeaversa !

@mcgilman -  All requested changes have been pushed out to the branch. Take a test drive and let me know if there is anything else. Thanks again for all the help with this!

Tested the UI/UX and everything looks good - functionally works and intuitive. Also did some simple tests in a secured environment, making sure user who did not have permissions, did not see "Stop & Configure" and "Terminate". Thanks for implementing this new feature @aeaversa !

@andrewmlim  -  Thanks for the testing help!

Thanks @aeaversa! This has been merged to master.


Add LXC autocompletion

Hi, couldn't find any lxc related topic for completion in existing issues and pull requests.  I hope this can help!

Looking at the upstream lxc sources on github, they include a bash completion in lxc/config/bash. If they're willing to include a bash completion, then I don't see why they couldn't also include a zsh one so you could send a pull request there instead. That has the advantage of potentially reaching all zsh users and not just oh-my-zsh users (e.g. someone such as myself - I have nothing todo with oh-my-zsh but was looking through the PRs).
As far as the function goes, I'd suggest declaring the arrays local and reset them every time. So instead of:
    _lxc_common_opts=( ... )
    _pkg() {
    ...
    }
    _pkg "$@"

Just do:
    local -a common
     common=( ... )
    ...

Also, the zsh convention is not to capitalize descriptions. Try to start descriptions with a verb so instead of [Name of the container], use [specify name of container]. Eliding "the" makes it shorter.
For most commands, --help can't be combined with any other options so intead of:
    '(-h --help)'{-h,--help}'[Help list]'

use
    '(-)'{-h,--help}'[display usage information]'

Just cleaning up some of my old PR. I won't pursue this (I don't really have the time and have no interest anymore). I'm closing it.


Footer Elements not centered

Describe the bug
I made this bug report for mobile footer cause it shows more problems than desktop but, some of the problems are desktop too and should be fixed

The logo is not centred
Social media icons are too far to the right
Titles are not aligned to the content (Circuits, Info, Sponsors)

Screenshots

Desktop (please complete the following information):

Chrome Dev Tools iPhone X Emulation

Are you working on this issue? (Yes/No)
No

Would be happy to work , similar to previous one


fixed some stuff

Closes #
📑 Description

Stuff that happened:

Fixed syntax errors
Fixed requirements.txt
Fixed not being able to detect requirements
Read from requirements.txt explicitly
Added test cases

✅ Checks

[x] My pull request adheres to the code style of this project
[ ] My code requires changes to the documentation
[ ] I have updated the documentation as required
[x] All the tests have passed

ℹ Additional Information

done


Click again on resulted text is not working unless i click somewhere else.

Once I selected duration and it shows on textbox.  Click again is not happening unless I click some where else and comeback.

Could you provide an example of your html/js so I can reproduce it? Also, check out this page https://digaev.github.io/jquery-time-duration-picker/
Expected behavior:

Click on input
The widget will popup
Select duration
Click "OK"
Text will be changed
If you click on input  again, the widget should popup

I am using MVC razor view. Everything in expected behavior is working fine except the last step.
I have click another place and come back then it works
HTML:
  @LocalizedString.Portal_Label_DeleteIfUnusedFor

Script
jQuery(function () {
jQuery('#duration').timeDurationPicker({
hours: false,
minutes: false,
seconds: false,
defaultValue: function () {
return jQuery('#seconds').val();
},
onSelect: function (element, seconds, duration) {
jQuery('#seconds').val(seconds);
jQuery('#duration').val(duration);
}
});
});

Try to add this line(s) to onSelect handler:
onSelect: function (element, seconds, duration) {
  jQuery('#seconds').val(seconds);
  jQuery('#duration').val(duration);

  this._content.button.blur();
  // this._content.div.blur(); // and probably this one
}

This should make widget lost focus. Looks ugly, but could help.

The demo is working fine.
Blur didn't work.  Just moving away doesn't work, I have to click somewhere else and then come back.

adding below worked
jQuery('#duration').blur();


C.jj / CParser failing on GNU inline asm

Describe the bug
When running File->Parse C Source... Ghidra fails to parse:
typedef long size_t;
unsigned char _interlockedbittestandset(long *Base, long Offset) { unsigned char old; __asm__ __volatile__ ("lock bts{l %[Offset],%[Base] | %[Base],%[Offset]} ; setc %[old]" : [old] "=qm" (old), [Base] "+m" (*Base) : [Offset] "I" "r" (Offset) : "memory", "cc"); return old; }

(condensed to a minimal working example)
The problem is the (*Base) changing this to (Base) that is:
typedef long size_t;
unsigned char _interlockedbittestandset(long *Base, long Offset) { unsigned char old; __asm__ __volatile__ ("lock bts{l %[Offset],%[Base] | %[Base],%[Offset]} ; setc %[old]" : [old] "=qm" (old), [Base] "+m" (Base) : [Offset] "I" "r" (Offset) : "memory", "cc"); return old; }

allows the parse to correctly parse it.
Also changing it to a (+Base), (#Base), or even (,Base) allows the parser to parse it.
To Reproduce
Steps to reproduce the behavior:

Go to 'File' -> 'Parse C Source...'
Parse the above example

Expected behavior
The function declaration gets parsed.
Additional context
The problem is in https://github.com/NationalSecurityAgency/ghidra/blob/4ce178c419b0ce070d531951d8c88b690c0b9097/Ghidra/Features/Base/src/main/javacc/ghidra/app/util/cparser/C/C.jj#L2301
I tried to butcher a clutch fix in by changing <IDENTIFIER> to  "*"* <IDENTIFIER> and while that worked, it is not the correct way to fix this.
Unfortunately, it seems from the various commented sections of the ASM parsing grammar that this seems to be a problem area of the parser.
The correct fix would be to completely rewrite the ASM grammar, because e.g. GNU inline asm also allows [*(type_t*)foo] expressions in its operands (and yes that is used e.g. by MinGW: unsigned long __readfsdword(unsigned long Offset) { unsigned long ret; __asm__ ("mov{" "l" " %%" "fs" ":%[offset], %[ret] | %[ret], %%" "fs" ":%[offset]}" : [ret] "=r" (ret) : [offset] "m" ((*(unsigned long *) (size_t) Offset))); return ret; }).
Also the CPP output seems to differ to that of gcc -E which sometimes causes only #defines to get parsed but no functions ... but I couldn't convert that problem into an actionable item. But it seems the C Parser could need some improvement.

The CParser can't handle all cases as you have found.  This includes handling C++.
It is an attempt to extract as much information in as many cases as possible.
The ASM parse is just trying to parse past the assembly, and discard the information.
Here are several possible workarounds:
1 - edit the header file to solve the issues as you did, the information will be lost anyway
2 - use the CPP from gcc if there are issues you can't isolate, then parse the output using the Cparser, however you will lose the #define values as enums
3 - compile a program with debug information and extract the data types from the debug information
4 - fix the grammer as you did, as the ASM parse section could be good enough if you have not encountered other issues
It is possible the ASM section is not context free and could be difficult to handle correctly.  We can take a look at it, but no guarantees.
Parsing header file information can be difficult.  Getting the predefined -D settings correct and handling non-standard capabilities placed in header files that only a particular Preprocessor/Compiler understand can cause issues.  It can be similar to getting code to compile while porting to another platform.
If you can isolate a small test case for the CPP issue, that would be most helpful.

Thanks for taking your time.
Meanwhile I did your suggestions 1. and 2. and got some .gdt's generated: https://github.com/0x6d696368/ghidra-data/blob/master/typeinfo/gdt.md
Regarding the grammar of the asm sections there seem to be different ones. Maybe it would be better to handle them separately. E.g. Microsoft seems to use the following grammar (from https://docs.microsoft.com/en-us/cpp/assembler/inline/asm?view=vs-2019#grammar):
asm-block:
    __asm assembly-instruction ;opt
    __asm { assembly-instruction-list } ;opt

assembly-instruction-list:
    assembly-instruction ;opt
    assembly-instruction ; assembly-instruction-list ;opt

With assembly-instruction being the asm opcodes. There is no surrounding structure.
GNU inline asm on the other hand is more complex. Grammar (from https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Extended-Asm.html):
     asm [volatile] ( AssemblerTemplate
                      : OutputOperands
                      [ : InputOperands
                      [ : Clobbers ] ])

     asm [volatile] goto ( AssemblerTemplate
                           :
                           : InputOperands
                           : Clobbers
                           : GotoLabels)

With:

AssemblerTemplate being string literal (see https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Extended-Asm.html#AssemblerTemplate).

OutputOperands being (see https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Extended-Asm.html#OutputOperands): [ [asmSymbolicName] ] constraint (cvariablename) with each of these expanding further out, e.g. cvariablename: CLvalue, etc.

InputOperands being identical to OutputOperands.

Clobbers being a comma separated list of string literals.

GotoLabels is just a label (IDENTIFIER in the current grammar).

So I guess the best thing to do would be to separate the two syntax. This way the more easier (and probably more widely used) Microsoft syntax could be parsed (i.e. skipped) correctly, while the GNU syntax could be made a best effort.
I could do that eventually if you can't/won't look into this.
As for the CPP issue: I will add information here in case I can track the issue down.

I made a pull request #1082 in which I implemented the GNU extended asm. While doing that I noticed the existing AsmLine() parsing doesn't work correctly for MS style asm (see #1082 for what I tested), hence, I removed it.
For MS style asm comment style line parsing (everything after __asm if there is no '(' or '{' after the __asm) or block parsing from { to } (in case __asm {) would be needed.
I'm wondering if <ASMBLOCK> SKIP: and <ASMBLOCK> TOKEN : in
https://github.com/NationalSecurityAgency/ghidra/blob/4ce178c419b0ce070d531951d8c88b690c0b9097/Ghidra/Features/Base/src/main/javacc/ghidra/app/util/cparser/C/C.jj#L950
were supposed to do that?
It's been a while since I last worked on grammar, hence I'm unsure where to best squeeze the MS asm parsing in without needing to change too much in the grammar.


Run the container in Github workflows to generate an executable build

References User Story #210

See pair programming pull request #347


[doc] Remove connector duplicate declaration but not supported in Readme

Signed-off-by:
Pre-Checklist
Note: Please complete ALL items in the following checklist.

[x] I have read through the CONTRIBUTING.md documentation.
[x] My code has the necessary comments and documentation (if needed).
[x] I have added relevant tests.

Purpose
Remove connector duplicate declaration but not supported in Readme
Doris does not support reading and writing
Approaches

Some description about how this PR achives the purpose.
Related Issues

e.g. Close #796
New Behavior (screenshots if needed)

N/A

thanks for your contribution @laglangyue , merging


Error when pressing an ion-icons with the property tooltips

I have a box that shows information with icons and numbers. When pressing any icon I want to show a legend that indicates that it represents that icon and associated value ... Everything works perfect, when pressing an icon the legend is displayed as expected and it respects the configurations of the established tooltips, but with each click returns an error by console ...
The error is as follows:
"TypeError: undefined is not a function
    at WebAnimationsPlayer.play (file: ///android_asset/www/build/vendor.js: 137345: 24)
    at TransitionAnimationPlayer.play (file: ///android_asset/www/build/vendor.js: 136663: 48)
    at file: ///android_asset/www/build/vendor.js: 136293: 20
    at Array.forEach (native)
    at TransitionAnimationEngine._flushAnimations (file: ///android_asset/www/build/vendor.js: 136286: 21)
    at TransitionAnimationEngine.flush (file: ///android_asset/www/build/vendor.js: 135945: 32)
    at InjectableAnimationEngine.AnimationEngine.flush (file: ///android_asset/www/build/vendor.js: 137150: 32)
    at file: ///android_asset/www/build/vendor.js: 130958: 30
    at t.invoke (file: ///android_asset/www/build/polyfills.js: 3: 14976)
    at r.run (file: ///android_asset/www/build/polyfills.js: 3: 10143) "
A segment of my HTML:

  <div padding class = "board-content" * ngIf = "service! = null">

        </ ion-icon>
      </ p>
       {{service.currentStatus.count}} </ p>
       | </ p>
    </ div>
  </ div>
</ ion-content>
I tried putting the tooltip with [] but I got the same result ...
I have a lazyLoad implemented and I load the TooltipsModule in the same module.
I have the BrowserAnimationsModule in the App.module imported as well.
I guess that since this is working anyway, the TooltipsModule would not be the problem, it might be that I have an error in my html or a problem in loading the BrowserAnimationsModule ...
My dependencies in package.json are:
 "dependencies": {
    "@ angular / animations": "5.0.3",
    "@ angular / common": "^ 5.0.3",
    "@ angular / compiler": "5.0.3",
    "@ angular / compiler-cli": "5.0.3",
    "@ angular / core": "5.0.3",
    "@ angular / forms": "5.0.3",
    "@ angular / http": "5.0.3",
    "@ angular / platform-browser": "5.0.3",
    "@ angular / platform-browser-dynamic": "5.0.3",
    "@ ionic-native / core": "^ 4.5.2",
    "@ ionic-native / native-storage": "^ 4.5.2",
    "@ ionic-native / splash-screen": "^ 4.4.0",
    "@ ionic-native / status-bar": "4.4.0",
    "@ ionic / storage": "^ 2.1.3",
    "@ ngx-translate / core": "^ 9.0.2",
    "@ ngx-translate / http-loader": "^ 2.0.1",
    "chart.js": "^ 2.7.1",
    "cordova-android": "6.3.0",
    "cordova-plugin-device": "^ 1.1.7",
    "cordova-plugin-ionic-webview": "^ 1.1.16",
    "cordova-plugin-nativestorage": "^ 2.2.2",
    "cordova-plugin-splashscreen": "^ 4.1.0",
    "cordova-plugin-statusbar": "^ 2.4.1",
    "cordova-plugin-whitelist": "^ 1.3.3",
    "gradle": "^ 1.0.9",
    "ionic-angular": "3.9.2",
    "ionic-plugin-keyboard": "^ 2.2.1",
    "ionic-tooltips": "^ 2.0.1",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
Thank you very much now and apologies for my English, which is very bad: P

This works fine up ionic4-tooltips. Added an example to the demo in this commit.


Values used as types should always result in an error

function f<T>(x: T): T { return x }
var a: f<number> = f; // no error, but should

For more context on this see (#923)

/cc @bhosmer this is related to your changes in 82deed64d2a90ccdf22bade7895a16ab13ecbdf5. Not sure if it's a regression, though.

This has nothing to do with generics/parameterization, but is a bug. More cases:
/* @flow */
function f() { }
var a: f; // no error

/* @flow */
var f;
var a: f; // no error

Fixed
https://flow.org/try/#0GYVwdgxgLglg9mABMAPAFQHwAoAeAuRNASgLUQG9EAnAUyhCqR0QF8AoANwEMrEuDUYEAFsARjSoZEAXmQBuRAHpFiMHEQSqcKgBpEokFEQBnABZwQAGwAmQA


Add Custom Type for Actions

Create two custom types:

Cells to select: "All" | "None"
Actions: "Complete" | "Incomplete" | "Locked" | ...

Commit: https://github.com/johneastman/todo/commit/7db70f4ad1a19689b896fd8179f05d82edba1737


writeln!(io::stdout()) vs println

As others, I've greatly enjoyed being able to compare your solutions to my own as I (slowly) go through AoC 2018. Thank you!
Is there a reason that you seem to prefer writeln!(io::stdout()) to println!?

Sure. println! panics if it encounters an error, where as
writeln!(io::stdout, "...")? properly propagates the error.
Even programs such as Cargo suffer from this problem. For example:
$ git clone git://github.com/BurntSushi/ripgrep
$ cd ripgrep
$ cargo build

$ cargo run --help | grep
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
thread 'main' panicked at 'Error writing Error to stdout: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

$ ./target/debug/rg --help | grep
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.

ripgrep gets it right, but Cargo doesn't. println! is effectively a footgun in
real command line programs. Cargo is somewhat of an unfair example, since it
isn't often used in pipelines where this matters. But still, there could be
other reasons where writing to stdout fails---and perhaps a panic there is a
good thing. But I don't think panics should be surfaced to end users.
println! is fine in short programs or where this sort of thing doesn't matter,
but I was trying to write idiomatic code, and IMO, idiomatic command line
programs don't panic.

Thanks for a quick response and an excellent explanation, complete with a
summary and concrete example.
You're quite an exemplar of Rust's positive community!


3.0 Voltage for vddio fails on silicon

3.0v for vddio fails all tests on silicon, however 3.1v passes.

@marwaneltoukhy :  Can you be any more specific about the mechanism of failure?

Never mind. . .  This is very easy to reproduce.  My chip under test fails intermittently at 3.00V but reliably at 2.95V.

Problem solved.  It is caused by the component U4 on the development board that is driving the RESETB pin and has a trip point of 2.9V.  This chip should never have been put on the board in the first place (and I said so during board review).  It seems to have been added to the board due to a complete misunderstanding of the reset mechanism of the chip.


Multiple Fatal PHP errors

Environment: Phpcs 3.0.1 and phpcs 3.0.0 on PHP 7.1
WPCS versions: develop and master
Attempting to invoke WordPress coding standards on any file results in numerous fatal errors:
PHP Fatal error:  Class 'WordPress_AbstractArrayAssignmentRestrictionsSniff' not found in .../wpcs/WordPress/Sniffs/Arrays/ArrayAssignmentRestrictionsSniff.php on line 24

Fatal error: Class 'WordPress_AbstractArrayAssignmentRestrictionsSniff' not found in .../wpcs/WordPress/Sniffs/Arrays/ArrayAssignmentRestrictionsSniff.php on line 24

PHP Fatal error:  Interface 'PHP_CodeSniffer_Sniff' not found in .../wpcs/WordPress/Sniffs/Files/FileNameSniff.php on line 25

This seems to just have popped up this morning

Downgrade to PHPCS 2.9 for now.
Closing as duplicate of #944, #938, #872, #718 etc


Crash when adding a cell to an empty table

Not sure if what I wrote in the headline is the cause but this is the symptom.
When the UItableView is empty, and I insertRowsAtIndexPaths I get the following crash:
*** Assertion failure in -[DragAndDropTableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-3347.44/UITableView.m:1623

I switched back to regular UITableView (to see if DragAndDrop is the problem) - it works :( so it's definitely something with DragAndDrop...
The code:
    ChapterDataItem *item = [[ChapterDataItem alloc] init];
    item.type = @"text";
        dispatch_async(dispatch_get_main_queue(), ^{
            [chaptersArray addObject:item]; //add object should be on the same thread for consistency of the data
            NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:[chaptersArray count]-1 inSection:0];
            [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
        });

The number of rows returns the correct number of cells (nothing fishy here)
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if (section == 0)
    {
        return [chaptersArray count];
    }
}

Any help will be appreciated...

you should wrap your inserts in beginUpdates and endUpdates
[self.tableView beginUpdates];

[chaptersArray addObject:item];
NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:[chaptersArray count]-1 inSection:0];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];

[self.tableView endUpdates];

Not sure if that is the solution to your particular problem so if it's still crashing let me know

unfortunately it still crashes. I can verify that it happens on endupdates
Crash is:
**** Assertion failure in -[DragAndDropTableView
_endCellAnimationsWithContext:],
/SourceCache/UIKit_Sim/UIKit-3347.44/UITableView.m:1623*
On Tue, Jun 16, 2015 at 1:40 PM, Erik Johansson<EMAIL_ADDRESS>wrote:

you should wrap your inserts in beginUpdates and endUpdates
[self.tableView beginUpdates];
[chaptersArray addObject:item];
NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:[chaptersArray count]-1 inSection:0];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView endUpdates];
Not sure if that is the solution to your particular problem so if it's
still crashing let me know
—
Reply to this email directly or view it on GitHub
https://github.com/grillbiff/DragAndDropTableView/issues/8#issuecomment-112382437
.

ok, tested it myself and I have verified that it is a bug. I'll try to fix it as soon as possible

Hey @grillbiff - If you have any direction on where you think the bug is and you can direct me to it so I can investigate and assist, I'll be happy to...

Hi, I uploaded a hotfix which you can try out
hotfix/issue-#8
Basically none of insertRow, deleteRow or moveRow was working properly with empty sections. I haven't got around to fix the moveRow function yet either so let me know if this is something you need right away.

Well - now deleteRow is crashing (need to delete one before I can verify an insert is working)
The code:
[chaptersArray removeObjectAtIndex:indexPath.row];
            [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];

(chaptersArray count after remove is 0)
Causes:
/SourceCache/UIKit_Sim/UIKit-3347.44/UITableView.m:1623
2015-06-20 18:49:09.562 Cookila copy[13792:345918] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'

OK. After diving into your code and wrapping it with beginUpdates endUpdates it works. I'd love a more elegant solution, but that will certainly do...
Regarding the MoveRows - I have only 1 section - and when there are 0 or 1 cells - the drag is disabled - so no rush there...
I'll do some more testing and report bugs if I spot them
Thanks for the help!

ok, if you made any changes to DragAndDropTableView would you mind sending me a pull request so I can have a look at it?

On 20 Jun 2015, at 18:11, boazin<EMAIL_ADDRESS>wrote:
OK. After diving into your code and wrapping it with beginUpdates endUpdates it works. I'd love a more elegant solution, but that will certainly do...
Regarding the MoveRows - I have only 1 section - and when there are 0 or 1 cells - the drag is disabled - so no rush there...
I'll do some more testing and report bugs if I spot them
Thanks for the help!
—
Reply to this email directly or view it on GitHub https://github.com/grillbiff/DragAndDropTableView/issues/8#issuecomment-113787046.

I was misunderstood. I wrapped the original call with beginUpdates and endUpdates. No changes were made in your code.
I was wondering if there is a way to not "force" the user to do it (it is un-orthodox to call beginUpdates and endUpdates for a single action)

aha I see :)
my understanding is that you should wrap all changes in begin/endUpdates if you want them animated, otherwise you have to use one of the reload functions

On 20 Jun 2015, at 18:32, boazin<EMAIL_ADDRESS>wrote:
I was misunderstood. I wrapped the original call with beginUpdates and endUpdates. No changes were made in your code.
I was wondering if there is a way to not "force" the user to do it (it is un-orthodox to call beginUpdates and endUpdates for a single action)
—
Reply to this email directly or view it on GitHub https://github.com/grillbiff/DragAndDropTableView/issues/8#issuecomment-113788491.


userwarning: resource_ tracker: There appear to be 11 leaked semaphore objects to clean up at shutdown.

When I was running HTC + swin-l, the following error occurred: userwarning: resource_ tracker: There appear to be 11 leaked semaphore objects to clean up at shutdown.How can I solve it ?

same problems here...do you remember how to solve it?


Image info: support for analyzing ostree commits

See the individual commits for details, here an excerpt from the main one:
Support analyzing ostree repositories or directory that contain an ostree commit as created by osbuild. Will return the mode of the repository along with the references and their commits. For the first references, the commit is resolved and checked-out to a temp directory. This directory in turn is then analyzed via the existing append_filesystem function. The latter has gained some small ostree specific tweaks.
NB: for the ostree checkout /usr/etc/ is bind mounted to /etc in order to make append_filesystem happy. The rpm verification step is NOT run, because that is not really compatible with ostree.

image-info tests all pass.


Added nil guard to REQUEST_URI variable, not set by all web servers.

Added nil guard to @env["REQUEST_URI"] as it is not set by Pow (see https://github.com/37signals/pow/issues/81)

After a shamefully long nearly two years, I've finally merged this in. I'd stopped using the project (and also moved continents) and had no idea how long this had sat. Sorry about that!


stop monkeyPatching fetch API

It's the only way to track network requests as breadcrumbs, since the browser doesn't offer an event for it.
You can switch this off with the networkBreadcrumbsEnabled option if it is having undesirable side-effects.

@bengourley The networkBreadcrumbsEnabled options does not work, network-breadcrumbs.js is still loaded. What can be done about this? 3rd-party libraries really should not alter native objects.
Using v6 of Bugsnag, btw.

@sassomedia, in v6 this option looks slightly different: https://docs.bugsnag.com/platforms/javascript/configuration-options/#enabledbreadcrumbtypes
Use:
Bugsnag.start({
  enabledBreadcrumbTypes: ['error', 'log', 'navigation', 'user']
})

Omitting 'request' from this list.

@xander-jones Thanks for the quick reply, although I don't see this working either. v6 used to have a bugsnagClient setup and that's basically what we have, simplified example here: https://codepen.io/sassomedia/pen/GRZegrB.
That console.log(fetch) in the example should output ƒ fetch() { [native code] } but I'm always getting the monkey-patch. Is there something else I'm missing? Thanks!

@sassomedia, sorry made an error in my comment above, this is for v7 🙈.  I've amended my comment above. For v6, this would be the following option: https://docs.bugsnag.com/platforms/javascript/legacy/configuration-options/#networkbreadcrumbsenabled-browser-only.
I think the issue you're seeing is that you're changing the Bugsnag config after instantiating Bugsnag, so at this point fetch() has already been patched.
If you use the following, you can use Bugsnag, and we won't be patching fetch():
var bugsnagClient = bugsnag({
  apiKey: 'cdd848e5d2da0a26bda6f31a42452428',
  networkBreadcrumbsEnabled: false
});
window.bugsnagClient = bugsnagClient;
console.log(fetch);

Results in:
ƒ fetch() { [native code] }

@xander-jones Ah ok, yes that makes sense. Works for me, thanks a bunch!


ci: Improve github actions

Add code format check & clippy check
Add no_std build
Add MSRV build
Add code coverage (Close #36)
Add more badges

Signed-off-by: koushiro<EMAIL_ADDRESS>

@KokaKiwi PTAL

To be honest, i have a (kinda major) problem with this Pull Request as it sets a MSRV (hex doesn't have one, yet): I would prefer this matter to be handled at another "time" (like, on a separate PR), as it would involve some discussions and reflexions about what would be the "best" version to set as MSRV, especially regarding stuff like const-generic features.

I just decide the MSRV based on the existing code and features of the hex crate. Of course, you could change it later, as long as it will not cause breaking changes when releasing the new version of the crate.

Yeah, the test+badge could be changed later, but i would actually prefer if this PR did only CI-related changes, as so when hex MSRV is set the test+badge would be added at this time, not before :)


New Location Page Header

Implements the new location page header! New additions with this header are:

A claim of 'government verified data' for applicable states (currently only NV)
A risk level thermometer

Still to do:

[x] Adjust the thermometer to include the new 4th color once Pablo's PR is merged in
[x] Implement any feedback that will come from Josh

Oooh yes, fixed the button! Good catch, thanks!


change to css and js

added function to enable user to make recent searches clickable and adjusted size of album image that displays on the right side

LGTM


README: How to report security issues

Thanks, I'm wondering if we need a SECURITY.md file and/or an issue category that redirects to thoughtbot, not sure

Ok I found this https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository


[Suggestion] - Enable Storage of Jira Backups in Amazon S3 Using Helm Charts

Suggestion
I would like to request a feature to enable the storage of Jira backups in Amazon S3 using helm charts, if this functionality is not yet available.
Link for reference.
https://confluence.atlassian.com/adminjiraserver/storing-backups-in-amazon-s3-1402409182.html
Product
Jira
Code of Conduct

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

@bianchi2 Thanks for the link. It's good to have supported Helm values for backups in S3, similar to what’s already provided for Avatars and Attachments.
Suggested like below.
s3Storage:
backups:
bucketName: XXXX
bucketRegion: XXXX
endpointOverride: XXXXX


Update nmdc.yaml with additional file type enum values

closes #72

Per discussion with @dehays closing this PR.


Added option to redirect the output of offline CLI command execution.…

… Also ensure commands run as well as scripts.

@ctomc sorry for the delay on this, would you mind giving it a review to see if it will work for you? If so I'll merge it and release it first thing.
You can get the same result you had by using <stdout>${project.basedir}/target/wildfly-plugin/script-out.log</stdout> or simply just use <stdout>none</stdout> and nothing will be printed unless there was an error.


Response schemas

We need to have a way to define response schemas so docs are more complete

Postman allows you to save example responses maybe the schema can be derived from those ?

Yes probably this is the direction to follow but there are lot of questions as a response don't have description etc... Just a name and a value in the fields

I do not think that it is possible to generate the necessary data from the response. Maybe the information could be generated in a similar way as with the status code.

Perhaps the best interim solution is to just have a scheme with a name and a type for now. Not having a scheme with types is a deal-breaker for me to use this library. Another service reads the swagger doc to determine the data types of incoming data.

Just dropped a project working towards this!
https://github.com/Kinjalrk2k/postman-to-openapi-json-extended
What I've done is:

Used this library to parse the Postman collection and extract the paths in which schemas might be useful.
Use the examples for building the schemas using: https://github.com/Nijikokun/generate-schema
Write all these down on a JSON file for the ~user~ developer to edit the schemas as they wish
Again use this library to build the OpenAPI spec file whilst adding the extracted schemas

My use-case was JSON specific, hence favoured JSON on the OpenAPI side ;)

@kyriakos cool approach the use of external json files is not a bad ideaat all
Best Regards.

Just dropped a project working towards this! https://github.com/Kinjalrk2k/postman-to-openapi-json-extended
What I've done is:

Used this library to parse the Postman collection and extract the paths in which schemas might be useful.
Use the examples for building the schemas using: https://github.com/Nijikokun/generate-schema
Write all these down on a JSON file for the ~user~ developer to edit the schemas as they wish
Again use this library to build the OpenAPI spec file whilst adding the extracted schemas

My use-case was JSON specific, hence favoured JSON on the OpenAPI side ;)

I think that was cool if you create a PR to this repo, however, please create a PR about generate schema from examples.

Hi there, great tool first of all!
I think. this way already discussed in some of the closed issues, but not sure if it's solved. Is it possible to somehow create request body properties in the output openapi file? Currently, I'm adding the properties manually to the output according to my example responses, but it would be great if it's automatically supported.
Best regards.

Why can't the schema be inferred from the example response(s)? The name and literal types are there.

Using $ref to reference files generated/manually crated elsewhere doesn't solve this problem, but makes it easier to workaround. This tool automates much of the work I need to perform. I have no problem manually creating request/response schemas. Will you consider reopening https://github.com/joolfe/postman-to-openapi/issues/243?

close because of archive, read the README for more info about that decision.


Ignoring published ports in an environment where --net=host is primarily used

I have a network of CoreOS machines where IPoIB is used and is not bridgeable so to get docker to talk to that network I'm forced to use --net=host.  Registrator is meant to support registering services with --net=host if you pass the -p options which I am doing.
However, despite this, I still get these errors
2015/04/22 22:03:45 registrator: ignored: 77abe630da22 no published ports
2015/04/22 22:03:45 registrator: ignored: 530c1132c0ac no published ports
2015/04/22 22:03:45 registrator: ignored: 1f0db896871a no published ports
2015/04/22 22:03:45 registrator: Listening for Docker events...
2015/04/22 22:08:38 registrator: ignored: 0e0ac7a5528e no published ports

I thought I'd look at the source code and figure out what makes it ignore the container in this case.  It seems to me that if it doesn't find any published ports provided with -p it will skip the container.  The JSON key that it's looking for is HostConfig.PortBindings
Guess what docker inspect -f "{{ .HostConfig.PortBindings}}" 0e0ac7a5528e produces?
map[11210/tcp:[map[HostIp: HostPort:11210]] 11211/tcp:[map[HostPort:11211 HostIp:]] 8091/tcp:[map[HostIp: HostPort:8091]] 8092/tcp:[map[HostIp: HostPort:8092]]]

Which is a little baffling.  It shouldn't be skipping it should it?

Ahh, found the issue and solution.  It's working great now.
https://github.com/gliderlabs/registrator/issues/140


Multiple nodes failing on ESP32

I have connected multiple nodes to the ESP32 and Lora isn't getting initialized. The interfaces are working fine.

I have connected multiple nodes to the ESP32 and Lora isn't getting initialized. The interfaces are working fine.

Do you mind share you whole script here?

from machine import Pin, SPI
import time, urandom as random
from lora import SX1276
#LoRa Pinout
RST_Pin1  = 26
CS_Pin1   =  5
SCK_Pin1  = 18
MOSI_Pin1 = 23
MISO_Pin1 = 19
DIO0_Pin1 =  2
DIO1_Pin1 = 35
SPI_CH   =   1
#LoRa2 Pinout
RST_Pin2  = 27
CS_Pin2   = 15
SCK_Pin2  = 14
MOSI_Pin2 = 13
MISO_Pin2 = 12
DIO0_Pin2 =  0
DIO1_Pin2 = 34
SPI_CH2   =  2
LoRa_id = 1
random.seed(11)
channels2Hopping = [866_000_000+200_000 * random.randint(0,10) for i in range(128)] # 914~916 MHz
lora = SX1276(RST_Pin1, CS_Pin1, SPI_CH, SCK_Pin1, MOSI_Pin1, MISO_Pin1, DIO0_Pin1, DIO1_Pin1, LoRa_id, channels2Hopping)
payload = str(random.randint(100,65536))+ "I am Sharath 1"
print(payload)
lora.send(dst_id=3, msg=payload, pkt_type=lora.PKT_TYPE['REQ']) # Sender's lora_id is 1 and receiver's is 0
LoRa_id2 = 2
random.seed(11)
channels2Hopping2 = [866_000_000+200_000 * random.randint(0,10) for i in range(128)] # 914~916 MHz
lora2 = SX1276(RST_Pin2, CS_Pin2, SPI_CH2, SCK_Pin2, MOSI_Pin2, MISO_Pin2, DIO0_Pin2, DIO1_Pin2, LoRa_id2, channels2Hopping2)
payload2 = str(random.randint(100,65536))+" I am Sharath 2"
print(payload2)
lora2.send(dst_id=4, msg=payload2, pkt_type=lora2.PKT_TYPE['REQ']) # Sender's lora_id is 1 and receiver's is 0

A simple question, may I have your MCU’s pin out map or the eBay/aliexpress
link you bought the MCU? meanwhile I am going to try your code on my setups
tonight.
On Wed, Feb 1, 2023 at 1:26 AM SharathChandan @.***>
wrote:

from machine import Pin, SPI
import time, urandom as random
from lora import SX1276
#LoRa Pinout
RST_Pin1 = 26
CS_Pin1 = 5
SCK_Pin1 = 18
MOSI_Pin1 = 23
MISO_Pin1 = 19
DIO0_Pin1 = 2
DIO1_Pin1 = 35
SPI_CH = 1
#LoRa2 Pinout
RST_Pin2 = 27
CS_Pin2 = 15
SCK_Pin2 = 14
MOSI_Pin2 = 13
MISO_Pin2 = 12
DIO0_Pin2 = 0
DIO1_Pin2 = 34
SPI_CH2 = 2
LoRa_id = 1
random.seed(11)
channels2Hopping = [866_000_000+200_000 * random.randint(0,10) for i in
range(128)] # 914~916 MHz
lora = SX1276(RST_Pin1, CS_Pin1, SPI_CH, SCK_Pin1, MOSI_Pin1, MISO_Pin1,
DIO0_Pin1, DIO1_Pin1, LoRa_id, channels2Hopping)
payload = str(random.randint(100,65536))+ "I am Sharath 1"
print(payload)
lora.send(dst_id=3, msg=payload, pkt_type=lora.PKT_TYPE['REQ']) # Sender's
lora_id is 1 and receiver's is 0
LoRa_id2 = 2
random.seed(11)
channels2Hopping2 = [866_000_000+200_000 * random.randint(0,10) for i in
range(128)] # 914~916 MHz
lora2 = SX1276(RST_Pin2, CS_Pin2, SPI_CH2, SCK_Pin2, MOSI_Pin2, MISO_Pin2,
DIO0_Pin2, DIO1_Pin2, LoRa_id2, channels2Hopping2)
payload2 = str(random.randint(100,65536))+" I am Sharath 2"
print(payload2)
lora2.send(dst_id=4, msg=payload2, pkt_type=lora2.PKT_TYPE['REQ']) #
Sender's lora_id is 1 and receiver's is 0
—
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_xg590_SX1276_issues_8-23issuecomment-2D1411530912&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=68-jaezqLTx9tGFv4ExwCQ&m=EaPgsd3KkiiqvBdzIrYFChwnpgGuv_dYa_v6Uz88Qe9vnNeFxI22xuCVSwBpe7j3&s=juVUrVJ5MYp_W9r8rc_c62n0DZqvj0e_5WljaaoiLNo&e=,
or unsubscribe
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AKJHY6HMMJLGVX75I6SCUZDWVH6YRANCNFSM6AAAAAAUNJKP5U&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=68-jaezqLTx9tGFv4ExwCQ&m=EaPgsd3KkiiqvBdzIrYFChwnpgGuv_dYa_v6Uz88Qe9vnNeFxI22xuCVSwBpe7j3&s=6Y7rxsBf6FM1tlJ9FKaq9j5zwc9Tp6yAuIEix10_TnM&e=
.
You are receiving this because you commented.Message ID:
@.***>

I have attached the Pin out for reference. It would be of great help if you could let me know the issue with the script.

Hello! have you tried it on your setups?

good evening! have you tried the script on your setups?

good evening! have you tried the script on your setups?

Hi, I got hardware problem to setup my development environment. I ordered a new RAM moments ago. Will try it tomorrow night. Sorry for the delay.

It's fine. do it at your convenience. I have a doubt regarding the library. For class SX1276 can i remove a few arguments such as the DIO0 or DIO1 since i can accommodate more hardware on my MCU? kindly help in this regard.

It's fine. do it at your convenience. I have a doubt regarding the library. For class SX1276 can i remove a few arguments such as the DIO0 or DIO1 since i can accommodate more hardware on my MCU? kindly help in this regard.

TLDR: you should not. Long explain. DIO0 and DIO1 are for interrupt. For example, how do your MCU knows SX1276 has sent out the message so it should start listening for ACK packet? The SX1276 will interrupt MCU via DIO0 and DIO1 so MCU runs “interrupt service routine” to set off the transition.

Thanks. I will look into the library in detail.

Thanks. I will look into the library in detail.

I made many comment about interrupt at section 4 of the library. _irq_handler (interrupt service routine) is also worthy of digging in.

what is the significance of the RST_Pin in the scheme? kindly explain

what is the significance of the RST_Pin in the scheme? kindly explain

For example, during the code development, you may change the SX1276 class and need to re-instantiate this class (kill micropython script and re-run it). You use rst_pin to reset SX1276 chip at every time.
If you can physically change the pin connection, you can repurpose the pin after SX1276 initiation. It is highly unlikely you want to mess with RST_PIN.

what is the significance of the RST_Pin in the scheme? kindly explain

Cannot run the second sx1276 because the software SPI is not working. Will try it later or use another MCU to test.

Sure. kindly let me know once you are able to run it.

is it possible to drive two spi devices simultaneously without multithreading in micropython?

To the best of my knowledge, the short answer is yes. Each device would
interrupt the MCU if something happened (RxDone or TxDone or
FHSSchangeChannel) independently. Then the MCU will try to finish ISR as
soon as possible before the running of the main thread resumes.
I believe it can print out a received message via one SX1276 while it is
sending out a message through another SX1276. You cannot send two messages
via two interfaces simultaneously for obvious reasons.
On Mon, Feb 6, 2023 at 4:05 AM SharathChandan @.***>
wrote:

is it possible to drive two spi devices simultaneously without
multithreading in micropython?
—
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_xg590_SX1276_issues_8-23issuecomment-2D1418738324&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=68-jaezqLTx9tGFv4ExwCQ&m=HmIKCiqt7vxz31MJggzXEJbLEUE3tZ8ZKHBaWEL6LCr0uK86enbdoQjFePQ6b0k1&s=Jp0OwjlQ7nhmqKCE6mgAhwJkVHVeonIQEtlr_PKs71o&e=,
or unsubscribe
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AKJHY6GCC2CACDF2XEMQ46DWWC5GDANCNFSM6AAAAAAUNJKP5U&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=68-jaezqLTx9tGFv4ExwCQ&m=HmIKCiqt7vxz31MJggzXEJbLEUE3tZ8ZKHBaWEL6LCr0uK86enbdoQjFePQ6b0k1&s=eLcekI0auCg9IkSBUGHO_6qFrgrAV68X_b8ryJDd1M4&e=
.
You are receiving this because you commented.Message ID:
@.***>

from machine import Pin, SPI
import time, urandom as random
from lora import SX1276
#LoRa Pinout
RST_Pin1  = 26
CS_Pin1   =  5
SCK_Pin1  = 18
MOSI_Pin1 = 23
MISO_Pin1 = 19
DIO0_Pin1 =  2
DIO1_Pin1 = 35
SPI_CH   =   1
#LoRa2 Pinout
RST_Pin2  = 27
CS_Pin2   = 15
SCK_Pin2  = 14
MOSI_Pin2 = 13
MISO_Pin2 = 12
DIO0_Pin2 =  0
DIO1_Pin2 = 34
SPI_CH2   =  2
LoRa_id = 1
random.seed(11)
channels2Hopping = [866_000_000+200_000 * random.randint(0,10) for i in range(128)] # 914~916 MHz
lora = SX1276(RST_Pin1, CS_Pin1, SPI_CH, SCK_Pin1, MOSI_Pin1, MISO_Pin1, DIO0_Pin1, DIO1_Pin1, LoRa_id, channels2Hopping)
payload = str(random.randint(100,65536))+ "I am Sharath 1"
print(payload)
lora.send(dst_id=3, msg=payload, pkt_type=lora.PKT_TYPE['REQ']) # Sender's lora_id is 1 and receiver's is 0
LoRa_id2 = 2
random.seed(11)
channels2Hopping2 = [866_000_000+200_000 * random.randint(0,10) for i in range(128)] # 914~916 MHz
lora2 = SX1276(RST_Pin2, CS_Pin2, SPI_CH2, SCK_Pin2, MOSI_Pin2, MISO_Pin2, DIO0_Pin2, DIO1_Pin2, LoRa_id2, channels2Hopping2)
payload2 = str(random.randint(100,65536))+" I am Sharath 2"
print(payload2)
lora2.send(dst_id=4, msg=payload2, pkt_type=lora2.PKT_TYPE['REQ']) # Sender's lora_id is 1 and receiver's is 0

then will multi-threading using micropython achieve simultaneous transmission in the context of the above script?

i mean sending without ack simultaneously

i mean sending without ack simultaneously

I finally setup the right testing environment and now can confirm two SX1276 works perfectly on one MCU.
Here is my testing environment.

Sender: I hooked 1st and 2nd SX1276 chips (RFM95W) up to a Raspberry Pi Pico (which has two on-chip SPI controllers)

Receiver: I use the third SX1276 (Heltec WiFi LoRa 32 V2 / ESP32 MCU).

Sender:

from machine import Pin
import time, urandom as random
from lora import SX1276

random.seed(11)
channels2Hopping = [914_000_000+200_000 * random.randint(0,10) for i in range(128)] # 914~916 MHz

# First SX1276
SPI_CH        =  0
LoRa_DIO1_Pin = 26
LoRa_En_Pin   = 21
LoRa_DIO0_Pin = 20
LoRa_SCK_Pin  = 18
LoRa_MISO_Pin = 16
LoRa_MOSI_Pin = 19
LoRa_CS_Pin   = 17
LoRa_RST_Pin  = 22
LoRa_id = 0

lora_0_en = Pin(LoRa_En_Pin, Pin.OUT)    # create output pin on GPIO0
lora_0_en.on()
lora_0 = SX1276(LoRa_RST_Pin, LoRa_CS_Pin, SPI_CH, LoRa_SCK_Pin, LoRa_MOSI_Pin, LoRa_MISO_Pin,
              LoRa_DIO0_Pin, LoRa_DIO1_Pin, LoRa_id, channels2Hopping, debug=False)

# Second SX1276
SPI_CH        =  1
LoRa_DIO1_Pin =  7
LoRa_En_Pin   =  8
LoRa_DIO0_Pin =  9
LoRa_SCK_Pin  = 10
LoRa_MISO_Pin = 12
LoRa_MOSI_Pin = 11
LoRa_CS_Pin   = 13
LoRa_RST_Pin  = 15
LoRa_id = 1

lora_1_en = Pin(LoRa_En_Pin, Pin.OUT)    # create output pin on GPIO0
lora_1_en.on()
lora_1 = SX1276(LoRa_RST_Pin, LoRa_CS_Pin, SPI_CH, LoRa_SCK_Pin, LoRa_MOSI_Pin, LoRa_MISO_Pin,
              LoRa_DIO0_Pin, LoRa_DIO1_Pin, LoRa_id, channels2Hopping, debug=False)

payload = str(random.randint(100,65536))+") [LoRa 0] This long BRD packet will be received" # Broadcast a large packet so many hops are generated~
print('[Sending]', payload)
lora_0.send(dst_id=2, msg=payload, pkt_type=lora_0.PKT_TYPE['BRD']) # A broadcast request. Do not expect respond.

time.sleep(3)
payload = str(random.randint(100,65536))+") [LoRa 1] This long BRD packet will also be received even though a wrong dst_id is specified. It is BRD, dst_id does not matter~"
print('[Sending]', payload)
lora_1.send(dst_id=3, msg=payload, pkt_type=lora_1.PKT_TYPE['BRD']) # A broadcast request. Do not expect respond.

Receiver

from machine import Pin
import time, urandom as random
from lora import SX1276

# Heltec WiFi LoRa 32 V2
LoRa_MISO_Pin = 19
LoRa_MOSI_Pin = 27
LoRa_SCK_Pin  =  5
LoRa_CS_Pin   = 18
LoRa_RST_Pin  = 14
LoRa_DIO0_Pin = 26
LoRa_DIO1_Pin = 35
LoRa_DIO2_Pin = 34
SPI_CH        =  1

random.seed(11)
channels2Hopping = [914_000_000+200_000 * random.randint(0,10) for i in range(128)] # Both sender and receiver need to know the sequence of frequences they are hopping on before the first hopping operation.

LoRa_id = 2
lora = SX1276(LoRa_RST_Pin, LoRa_CS_Pin, SPI_CH, LoRa_SCK_Pin, LoRa_MOSI_Pin, LoRa_MISO_Pin,
              LoRa_DIO0_Pin, LoRa_DIO1_Pin, LoRa_id, channels2Hopping, debug=False)

lora.brd_packet_handler = lambda self, data, SNR, RSSI: print("[BRD]", data)

received_payload = None
lora.mode = 'RXCONTINUOUS'
count = 0
while not lora.is_available:
    count += 3
    print("waiting", count, 'second')
    time.sleep(count)

i mean sending without ack simultaneously

As you can see from my last comment, we can use two SPI interfaces of the same MCU. That is the whole point of your initial question.
Other than this, for example, can you use two threads (two cores of ESP32) to send two messages at the exact same time? Yes if your hardware (MCU) and software allow you to do so. AFAIK, you cannot use the second core use ESP32 in the pre-built micropython. The current MicroPython port does not allow multithreading. FYI, port for Pico allows an additional thread.
Will you succeed to receive two messages on the same receiver at the exact same time? Of course not. How about receiving two messages from different frequency hopping sequences (so that no interference) on two receivers. Yes. All in all, This kind of question depends on your own hardware and you coding. That are unrelated to the library.

then will multi-threading using micropython achieve simultaneous transmission in the context of the above scri

Your coding is not for "simultaneous transmission", it is for sequential Tx. You send out one message via one SX1276 chip and send out another message via another SX1276 chip. I assume two chips working on difference frequencies.

At this point, I suggest you to use Pico as the MCU to operate two SX1276 chips at the same time. You can find that two SPI interfaces are clearly marked on the pinout map of Pico.
Meanwhile, ESP32 is a mess to me. There are many variants. The code might works for me but not works for you. We don't even know which pins are for hardware SPI interfaces.

Great. It has cleared me all of my doubts.  But i don't require frequency hopping can i let go FHSS and set a single frequency say 866.40 for a pair of transceivers and do simultaneous transmission on my SX1276. btw thank you once again for your efforts.

Yeah but it works fine on my esp32s devkit and i will try it on Pico after a while. Please let me  know if its possible to use specific frequencies on my LoRa.

Great. It has cleared me all of my doubts.  But i don't require frequency hopping can i let go FHSS and set a single frequency say 866.40 for a pair of transceivers and do simultaneous transmission on my SX1276. btw thank you once again for your efforts.

OK, I will update the library so that SX1276 will stay on one freq forever.

Yeah but it works fine on my esp32s devkit and i will try it on Pico after a while. Please let me know if its possible to use specific frequencies on my LoRa.

Done. FHSS can be turned off by only specifying one Freq.
channels2Hopping = [915_000_000]

or

channels2Hopping = [914_000_000+200_000 * random.randint(0,10) for i in range(1)]

BTW, can you elaborate on "it works find on my esp32s devkit"? Does two SX1276 chips works on your single esp32s? If so, may I have your pin mapping? I mean this is my pin mapping. What is yours?
# First SX1276
SPI_CH        =  0
LoRa_DIO1_Pin = 26
LoRa_En_Pin   = 21
LoRa_DIO0_Pin = 20
LoRa_SCK_Pin  = 18
LoRa_MISO_Pin = 16
LoRa_MOSI_Pin = 19
LoRa_CS_Pin   = 17
LoRa_RST_Pin  = 22
LoRa_id = 0

# Second SX1276
SPI_CH        =  1
LoRa_DIO1_Pin =  7
LoRa_En_Pin   =  8
LoRa_DIO0_Pin =  9
LoRa_SCK_Pin  = 10
LoRa_MISO_Pin = 12
LoRa_MOSI_Pin = 11
LoRa_CS_Pin   = 13
LoRa_RST_Pin  = 15
LoRa_id = 1

Great. It has cleared me all of my doubts.  But i don't require frequency hopping can i let go FHSS and set a single frequency say 866.40 for a pair of transceivers and do simultaneous transmission on my SX1276. btw thank you once again for your efforts.

OK, I will update the library so that SX1276 will stay on one freq forever.

Thank you for updating the library. I'll let you know after trying it on my setup.

Yeah but it works fine on my esp32s devkit and i will try it on Pico after a while. Please let me know if its possible to use specific frequencies on my LoRa.

Done. FHSS can be turned off by only specifying one Freq.
channels2Hopping = [915_000_000]

or

channels2Hopping = [914_000_000+200_000 * random.randint(0,10) for i in range(1)]

BTW, can you elaborate on "it works fine on my esp32s devkit"? Does two SX1276 chips works on your single esp32s? If so, may I have your pin mapping? I mean this is my pin mapping. What is yours?
# First SX1276
SPI_CH        =  0
LoRa_DIO1_Pin = 26
LoRa_En_Pin   = 21
LoRa_DIO0_Pin = 20
LoRa_SCK_Pin  = 18
LoRa_MISO_Pin = 16
LoRa_MOSI_Pin = 19
LoRa_CS_Pin   = 17
LoRa_RST_Pin  = 22
LoRa_id = 0

# Second SX1276
SPI_CH        =  1
LoRa_DIO1_Pin =  7
LoRa_En_Pin   =  8
LoRa_DIO0_Pin =  9
LoRa_SCK_Pin  = 10
LoRa_MISO_Pin = 12
LoRa_MOSI_Pin = 11
LoRa_CS_Pin   = 13
LoRa_RST_Pin  = 15
LoRa_id = 1

Yeah two SX1276 are working well now. I have figured out the hspi and vspi of my esp32 and it usually differs with different esp32 boards.
It;'s the the code which i previously shared with you. The DI0 pin was the problem i swapped it from GPI0 to a GPI04. There are few GPIOs which are not supposed to be used on the ESP32 i think GPIO0 was related to flash.

,Hello! Can you elaborate on the coding rates you have adopted in the library..is the CR 5,6,7 and 8 correspond to 4/5, 4/6, 4/7 and 4/8 in LoRa or have you used a different way. is it possible to send data with lesser cr.  is it possible to code it in my program or should i modify the library each time.

,Hello! Can you elaborate on the coding rates you have adopted in the library..is the CR 5,6,7 and 8 correspond to 4/5, 4/6, 4/7 and 4/8 in LoRa or have you used a different way. is it possible to send data with lesser cr. is it possible to code it in my program or should i modify the library each time.

Your guess is correct. In addition, you can choose any configuration (CR, SF, Freq) but there are [state] regulation or regional norms you better to follow. For example, you can ask the same chip to run on 433MHz in US or 915MHz in Europe but it is illegal.

Great. I am planning to experiment different modulation on LoRa. while doing that the coding rate can be replaced with that of the respective modulation right. I just want to try out some stuff on LoRa.

Can you let know how can i modify the spreading factor in my code itself?

If you got another new problem, please reopen the issue or open a new one. I just noticed your question.
Yes, it is very easy to choose another value for those radio parameters. Please refer to lines 101 ~ 106. For example, you can change both CR from 4/5 to 4/6 and bandwidth from 125KHz to 500kHz by modifying line 104 of https://github.com/xg590/SX1276/blob/8a0d7c4dda34454a5fadb04330c810e2b1990308/lora.py.
From
            self.spi_write('RegModemConfig1', Bw['125KHz'] << 4 | CodingRate[5] << 1 | ImplicitHeaderModeOn['Explicit'])

to
            self.spi_write('RegModemConfig1', Bw['500kHz'] << 4 | CodingRate[7] << 1 | ImplicitHeaderModeOn['Explicit'])

sure i'll continue this on a new issue.


Only create new users do not update exsiting

To prevent a loop that is causing a significant number of unneccessary events, do not update users only create new ones, we should not expect the customer data to change retroactively since orders are static in time.

Proposed fix for #1


ENH: Adds versions to Asset databases

Adds a 'version' table to the asset database, and adds a version check to the AssetDBWriters and AssetFinders.

@ssanderson I've added a primary key ID to the version table and implemented a constraint as Scott suggested
@richafrank I updated the 'table_version' variable to 'version_from_table' for clarity
@StewartDouglas The initial version is now 0

@ssanderson I split up version checking and version insertion since they are thematically distinct

Changes Unknown when pulling 7a1abc88f8fa96ef0cd34955b10d789e9dddbecf on asset-db-versioning into ** on master**.


Add daemonset to check diskusage on certain directories

/ping @marians @puja108 @w0mbat

LGTM, didn't test

I'd love a natural language explanation of what the command should do.

@marians I added explanation, please see https://github.com/giantswarm/kubernetes-prometheus/pull/32/files#diff-4f4292c825e53a7ddfd29e2112bcd69eR7


bot_FlatterBaker603ye1.py

It uses the gambler's fallacy, even though it is a fallacy.

I'm afraid this code doesn't run.
On line 6:

Error in: FlatterBaker603ye1.py, cannot access local variable 'tim' where it is not associated with a value

But I named the variable?

If the conditional statement on line 4 is false, then the variable isn't created at all, so on line 6 you can't add one to it.

How do I change the file or do I upload a new one?

You can click on the "Files changed" above and then choose "edit" from the "..." menu in the top right to adjust your submission.

I was able to edit the second submission but not the first, do I just submit another one?


Cannot map a mappable array

I am trying to do the following:
let alternatives:[Alternative] = map["alternatives"].valueOrFail()
This fail with error:

error: <EXPR>:2:1: error: ambiguous reference to member 'subscript'
map["alternatives"].value()
^~~
ObjectMapper.Map:7:12: note: found this candidate
    public subscript (key: String) -> ObjectMapper.Map { get }
           ^
ObjectMapper.Map:8:12: note: found this candidate
    public subscript (key: String, nested nested: Bool) -> ObjectMapper.Map { get }
           ^
<EXPR>:10:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to '_' or removing it
    var $__lldb_error_result = __lldb_tmp_error
    ~~~~^~~~~~~~~~~~~~~~~~~~
    _

Mapping the alternatives one by one works!

The reason this issue happens is because subscript has been overloaded.


feat: backport to vue2

#255

Use lastest code base (6c63531)
Remove vue plugin dependency (use render function)
Fix vue2 fragment tag error
Backport to vue2: beforeUnmount to destroyed, install plugin type
Pass unit tests

Wow, thank you, you did a great job!
I'm working less and less with the frontend, so I'm missing some of it. Of the main things I've learned/seen in PR:

Use render instead of template.
Downgrade Vue to "2.7.0"
Change shims-vue.d.ts to make the tests work

Does this allow you to use the lib on both Vue2 and Vue3? I'm just wondering if it makes sense to do this in the main branch, and if suddenly there will be some changes, so at least there's no pain in supporting Vue 2, which I naturally gave up on :)

To merge into main branch will destroy Vue3 support. I have tried to make the compatibility before. To use both Vue2 and Vue3 has some work, for example, change Vue dependency to vue-demi. We need to check the Vue version with vue-demi in the render function, so use render instead of the template.