Cursor follow not supported

The VSCode feature doesn't seem to be supported as I navigate my source file.

Do you have "Follow Cursor" enabled?

Yeah I do have that turned on.  As a test, I looked at a standard C source file and the follow works as expected there.
Then on another AHK file, same results with cursor not following.
The extensions I have installed and enabled are:
AutoHotkey Plus
Bookmarks
C/C++
Increment Selection
Smart Column Indenter
Todo Tree

Then on another AHK file, same results with cursor not following.

When you go the other way and click on an item where precisely does the cursor end up?

When I click on any item in the Outline, the editor window snaps to that item as you would expect.  It's only from the Editor window that the cursor isn't followed.
I also tried disabling all other extensions.
I closed all editors except for the one AHK (no splits).

This is working for TypeScript, CSS and JSON for which I know that they return non-empty ranges. Please file this issue against the language extension you are using, it seems that its outline items have an empty range so that the cursor is never contained by it


Delete items from the workspace that are not in the repository

In repo, im deleting the few files
eg: out of 4 pbix files, i have deleted 2 files in repo , so those two should be removed from PowerBI workspace as well.
im using the below script to get the diff which files got deleted
Write-Host "Source file '$sourceFile' does not exist. Marked for deletion..."
$destsubfolder = Split-Path $sourceFile
$deletedFolderPath = Join-Path $deletedfolder $destsubfolder
$dummyFileName = Split-Path $sourceFile -Leaf
$dummyFilePath = Join-Path $deletedFolderPath $dummyFileName
if (-not (Test-Path -Path $deletedFolderPath)) {
$null = New-Item -ItemType Directory -Path $deletedFolderPath
}
$null = New-Item -ItemType File -Path $dummyFilePath
}
but if i want to send these in the azure devops pipline, i cannot hardcode thevalues in the repot names, how do i pass dynamically with array or loop..?
task: maikvandergaag.maikvandergaag-power-bi-actions.PowerBIActions.PowerBIActions@5
displayName: 'Power BI Action: DeleteReport'
condition: eq(variables['Demo_deleted'], True)
inputs:
PowerBIServiceEndpoint: 'powerbi-actions'
Action: DeleteReport
WorkspaceName: 'Demo-workspace'
ReportName: 'Demofile-1'
reference : https://github.com/maikvandergaag/msft-extensions/issues/245

You could do this by adding a PowerShell task to your Pipeline that retrieves the values from PowerBi.
These values can then be passed as a variable to the next task

Yes, i have tried using the powershell script which will provide the list of files deleted in ARRAY,
But do i pass this to the below task..?

task: maikvandergaag.maikvandergaag-power-bi-actions.PowerBIActions.PowerBIActions@5
displayName: 'Demo-itworks : Delete Report'
inputs:
PowerBIServiceEndpoint: 'sasa'
Action: DeleteReport
WorkspaceName: "will this accept array"
ReportName: "will this accept array"

because you know there is a limitation in Azure Devops, we can only loop task with parameters (which is defined during compile time, ie during the yml file creation), and the above scenario it creates variable during run time and cannot be used for looping task

It is possible to start multiple tasks based on a dynamic variable. You should look into that.

Sure, I will look for a solution, if i find anything useful, i will update in the comments, so that it may be useful for others,
Thank you for building the wonderful APP.

Great, this it succeed. Is is ok for me to close the issue?


Remove existing bots from github scrapper

Removes snyk-bot and vercel[bot]

It should also include github bot right😅

@bodhish I only tried to add bots that were in /data/github. Adding GitHub bot

@rabilrbl can you fix the merge conflicts

@bodhish merged and fixed


Code of Resampler is not used in Monkey?

You have done a great work. And I have a few questions.
In your figure of Monkey, the embeddings are processed with Resampler before feeding to the Qwen-VL.
But when I run the code, I find no resample code in Monkey.
In modeling_monkey.py, line 80, image features are directly given to the Qwen-VL.
I would be so grateful if you could give me some guidance.

Hello, resampler is defined here.

Thank you!
I noticed that the sequence length is 8192.
Is it possible to shorten the length so that I could enlarge the batch size, boosting the training?

I feel like this isn't working out.


single button for theme

Try this out. Single button for theme change. Great website @waynegakuo

@waynegakuo Thanks. Just checked it I had created two onclick functions one was for the icon and one for button.
That's why on click of icon only icon was toggling . If you click on the edge of the button icon was not Changing just theme was toggling. Its fixed now.
Try it.

Works well now! This is amazing!
Thank you for contributing @Souravdey777
Merging it now


Add ScalaInstance.loaderCompilerOnly

Part of https://github.com/sbt/sbt/issues/6080
Distinguish between the compiler class loader and the full class loader, that contains scala3doc.
Use the full class loader only for compiling the doc.

To validate this pull request against other sbt modules, please visit this link.


[BUG] Azure.Data.Tables.GetEntityAsync randomly failed to send request

Library name and version
Azure.Data.Tables.12.6.1
Describe the bug
Our service runs on linux asp.net 6.0 container. We frequently ran into a connection issue when querying table entity through Azure.Data.Tables.TableClient.GetEntityAsync.
When it worked, GetEntityAsync can finish in milliseconds. When it didn't work, GetEntityAsync was just timed out after 15 seconds (we passed a cancellation token with 15 second timeout).
When the issue occurred, we tried to capture tcpdump to the target table service, but we didn't observe any traffic. We ran curl on the same container and could successfully connect to the target table service and tcpdump was also able to capture the traffic.
It led us to think GetEntityAsync for some reason was stuck somewhere before even attempting to connect to the table service.
Is there any additional diagnostic logs we can collect to troubleshoot the issue?
Here is the call stack.
---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
at Azure.Core.CancellationHelper.ThrowOperationCanceledException(Exception innerException, CancellationToken cancellationToken)
at Azure.Core.Pipeline.ResponseBodyPolicy.ThrowIfCancellationRequestedOrTimeout(CancellationToken originalToken, CancellationToken timeoutToken, Exception inner, TimeSpan timeout)
at Azure.Core.Pipeline.ResponseBodyPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async)    at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async)    at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async)
at Azure.Data.Tables.TableRestClient.QueryEntityWithPartitionAndRowKeyAsync(String table, String partitionKey, String rowKey, Nullable1 timeout, QueryOptions queryOptions, CancellationToken cancellationToken)    at Azure.Data.Tables.TableClient.GetEntitiyInternalAsync[T](Boolean async, String partitionKey, String rowKey, IEnumerable1 select, CancellationToken cancellationToken)
at Azure.Data.Tables.TableClient.GetEntityAsync[T](String partitionKey, String rowKey, IEnumerable`1 select, CancellationToken cancellationToken)
Expected behavior
see above
Actual behavior
see above
Reproduction Steps
see above
Environment
.net 6.0.9
linux container mcr.microsoft.com/dotnet/aspnet:6.0

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

Hi @northtyphoon - Based on the stack, it does appear that we are timing out while trying to buffer the response stream from the service. About the only thing I could recommend is to enable logging and open a ticket with the service team with the given request Id so that they can investigate if there was a service issue.


PHPC-408: Ensure object_to_bson() always creates a BSON document

https://jira.mongodb.org/browse/PHPC-408

I don't think this is a good idea. Silently serializing objects as empty?
Its a clear data loss at least without any indication of the error.
I would rather see an exception thrown.

I don't think this is a good idea. Silently serializing objects as empty? Its a clear data loss at least without any indication of the error. I would rather see an exception thrown.

As @derickr mentioned, https://github.com/mongodb-labs/mongo-php-driver-prototype/pull/103 is my proposed change for that. I just broke these into separate PRs to address the issue Derick raised in PHPC-408 independently.


usb: changes to permit endpoint addr reuse across alternates

Two changes to allow endpoint address reuse across alternate settings of the same interface:

In subsys/usb/device/usb_descriptor.c:
The function usb_fix_descriptor() keeps track of endpoints which have already been used and modifies entries in interface descriptors which use the same endpoints. However, this logic prevents reuse of endpoints across alternate settings of the same interface.
Modify the usb_fix_descriptor() logic to allow reuse of endpoints across alternate settings of the same interface.

In subsys/usb/device/usb_device.c:
The logic in usb_set_interface() iterates over endpoint definitions in all the interfaces and appropriately configures the endpoints it finds. If a particular endpoint address appears twice in the same interface, but in different alternates, then that endpoint address must only be configured when the chosen alternate setting is being acted on.
For example, if OUT endpoint address 1 appears in alternate settings 0 and 1, then it will appear in the endpoint descriptors corresponding to both the interface's alternate settings. Next, suppose that the chosen alternate setting is 1. For this situation, usb_set_interface() must only call usb_eps_reconfigure() when iterating over endpoint 1 as part of the chosen alternate setting 1. When usb_set_interface() encounters endpoint 1 while iterating over alternate setting 0, usb_eps_reconfigure() should not be called on endpoint 1.
This commit accomplishes the above by:

First enumerating all the endpoints used across all alternate settings of the chosen interface

Before calling usb_eps_reconfigure() on an endpoint which isn't in the currently chosen alternate setting's descriptor, ensuring that this endpoint isn't part of the chosen alternate setting. (Note that usb_eps_reconfigure() is called on all endpoints in the chosen alternate setting)

@jfischer-no

tl;dr The issues are known and since there are many of them, it was decided to rework it completely. Device part of the new USB support should come into the tree in the next weeks. I would not like to change anything in this "legacy" code that is not bug-fix.

Sounds good. A big part of my motivation was to share what I had to do get my application to work. I can close this PR if you feel the underlying issue will be addressed with the reworked code. I'll also look at the branch.


System redirects to Brokers after Topic delete from profile

Describe the bug
System redirects to Brokers after Topic delete
Set up
https://www.kafka-ui.provectus.io/
Steps to Reproduce

Steps to reproduce the behavior:

Navigate to Topics
Add a topic
Select "Remove topic" from 3dot menu within topic profile

Actual result: System redirects to Brokers
Expected behavior
System should redirect back to Topics
Screenshots
https://user-images.githubusercontent.com/104780608/206436487-27e48413-828b-4a8d-8c74-b44e36caa687.mov
Additional context
relates to https://app.qase.io/case/KAFKAUI-207

@Haarolean should it be moved to QA 0.6 or will it be done in Release 0.5?


Run Resnet Focal Experiment

Branch to run ResNet Focal Experiment:
Running Exp_Res_Focal with res_focal.yaml (might have to edit slightly to get to run on my machine, likely the device name, pinning, and some print formatting)

For tracing purposes: the run for me was tough-aardvark-101 on wandb


remove system.out.println

Codecov Report

Merging #303 into develop will increase coverage by 0.01%.
The diff coverage is 0%.

@@              Coverage Diff              @@
##             develop     #303      +/-   ##
=============================================
+ Coverage      19.37%   19.38%   +0.01%
  Complexity       289      289
=============================================
  Files             91       91
  Lines           3639     3637       -2
  Branches         566      566
=============================================
  Hits             705      705
+ Misses          2859     2857       -2
  Partials          75       75

Impacted Files
Coverage Δ
Complexity Δ

...e/dubbo/admin/service/impl/GenericServiceImpl.java
58.82% <0%> (+6.19%)
2 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Improve Sem Display Logic

Feature Request: Improve Sem Display Logic
Is your feature request related to a problem? Please describe.
Currently, when a user clicks on any sem (e.g., a semester or section) in the application, it displays not only the selected sem but also all other sems. This can be confusing and overwhelming for users, as they may be looking for specific information. The clutter can detract from the overall user experience and make it difficult to focus on the relevant sem content.
Describe the solution you'd like
I would like to implement a feature that, when a user clicks on a specific sem, only that sem's information is displayed. This would allow users to view relevant details without the distraction of other sems. Additionally, including a way to toggle back to view all sems would enhance usability and flexibility.
Describe alternatives you've considered

Keeping the current setup but adding filters to hide/show specific sems. However, this still involves showing all sems initially and may not be intuitive for users.
Providing a modal or popup with details of the selected sem, but this could lead to navigation issues if users want to compare information across multiple sems.

Additional context
Implementing this feature can improve the user interface by reducing clutter and enhancing focus on the selected sem. This change would not only streamline navigation but also create a more satisfying experience for users seeking specific information.

please assign to me


Upgrade flow; solidify Record and RecordInstance a bit

This pull request aims to help out a bit with issues #1240 and #1172 . It does 3 things:

Exposes RecordInstance for import
Changes the return type of some chainable functions to return this & T instead of just this
Uses the new $ElementType<T, K> for some better type safety

Note that I cannot seem to get $ElementType<T, K> to check set properly, but it works fine for get. I really don't know why it wouldn't work the same, so any assistance would be appreciated.

Can someone please merge this before releasing 4.0? Can confirm that even just exporting RecordInstance alone solves all our project's issues with code like:
type StateT = Record<{
  reportData: Map<string, List<Object>>,
  loadingSummary: boolean,
  loadingReport: boolean
}>;
const State = Record({
  reportData: Map(),
  loadingSummary: false,
  loadingReport: false
});

when changed to:
import type { RecordInstance } from 'immutable';

type StateT = RecordInstance<{
  reportData: Map<string, List<Object>>,
  loadingSummary: boolean,
  loadingReport: boolean
}>;
const State = Record({
  reportData: Map(),
  loadingSummary: false,
  loadingReport: false
});

About set look here https://github.com/facebook/flow/issues/4804?_pjax=%23js-repo-pjax-container

Solid improvements, thanks for the help!


Need a space in the error message for adding subdomain alias

https://github.com/zeit/now-cli/blob/8296de16ef609479ddb40f77b09d520d6067d998/src/providers/sh/commands/domains/add.js#L60
current:
now domain add -esome-domain.com
desired:
now domain add -e some-domain.com

Fixed on https://github.com/zeit/now-cli/pull/1509


cuelang.org: broken CUE syntax highlighting as of Hugo 0.126.1

What page were you looking at?
https://cl-1185745-1--cue-cls.netlify.app/examples/currently-broken-highlighting/
What version of the site were you looking at?
https://github.com/cue-lang/cuelang.org/commit/14a0ec519cf28256c7a2bb7d5ca7ce9f39f6f8bc
What did you do?
I wrote a page and published it via https://cuelang.org/cl/1185745
What did you expect?
All CUE to be highlighted nicely.
What did you see instead?
Some CUE wasn't highlighted nicely.

Most recent rendered page: https://cl-1185745-1--cue-cls.netlify.app/examples/currently-broken-highlighting/

Most recent rendered page: https://cl-1185745-3--cue-cls.netlify.app/examples/currently-broken-highlighting/

Most recent rendered page: : https://cl-1185745-6--cue-cls.netlify.app/examples/currently-broken-highlighting/

Note to self: empty strings appear to mess up a following multi-line string.

Most recently rendered page: https://cl-1185745-7--cue-cls.netlify.app/examples/currently-broken-highlighting/

Most recently rendered page: https://cl-1185745-8--cue-cls.netlify.app/examples/currently-broken-highlighting/


scylla_node: start: set --max-networking-io-control-blocks=100 by default

scylladb/scylla@2cfc517 sets max_networking_aio_io_control_blocks to
50000 by default, causing us to run out of aio iocb slots and fail
starting in setup_aio_context.
Reduce it by default to 100 that is sufficient for testing
if not given a different value via jvm_args.
Fixes #334
Signed-off-by: Benny Halevy<EMAIL_ADDRESS>

@fruch it's unclear why the CI test timed out.
FWIW, the change passed locally for me with nosetests.

@fruch ping


Do not load optimizer states for fp32 if flag set to False

Do not load optimizer states for fp32 if flag set to False.

Hi @Zixxy, great catch! Thanks for the PR.


export text to json

I tried to export some text in AI to json using illustrator CC (v23.0).
But I get nothing of points.
Does the exporter.js support text object？

Hey @zzwch, I don't believe I ever tested text, so I'm not surprised it's not working. It's been a long time since I've worked on this. Let me know if you end up coming up with a way for that to work and we can merge it in.


Value vs Attribute "value"

There is difference between the Html generated by Html.Attributes.attribute "value" "" and Html.Attributes.value "" that leads to some unexpected behaviour.
To illustrate the issue, here is an example select element with 2 options.
https://ellie-app.com/8xvjpZt6NwSa1
select
  [ onInput Pick ]
  [ option [ value "" ] [ text "Empty Value" ]
  , option [ selected True, attribute "value" "" ] [ text "Empty Attribute Value" ]
  ]

Switching options 3 times produces the following inconsistent messages.
Pick "Empty Value"
Pick ""
Pick ""

This seems to be more general than just Html.Attributes.value.
Html.Attributes.selected is broken, too:
For the following code:
main =
    Html.div []
        [ Html.select []
            [ Html.option [ Attr.selected True ] [ Html.text "Value A" ]
            , Html.option [] [ Html.text "Value B" ]
            ]
        ]

No selected value is added to the DOM.
Ellie: https://ellie-app.com/h4rZFfTtWj3a1


Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-'

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in ./sage/decorators/SageDecoratorsPlain.php on line 226

Thanks for the insight! Although the + was first to process in
$traceDisplay .= '        ' . $i + 2 . '. ';

in all versions since 5.2 I think, but I added the parenthesis, thank you! :)

yeah just verified it, the plain-display trace steps are processed correctly since php5.1:


Convert EnrDb into NodeDB

Both discv4 and discv5 need to store more info (i.e. other than what's in the ENR) about nodes they find and as was discussed in #1473 it makes sense to extend the existing EnrDB to include that

Also, I'm not a fan of the node objects because they are mutable and they would be hard to update if we want to add more fields (especially if they are pickled). What's wrong with accessing the db directly, keeping only the node id has representation of the node around?

This would incur in a lot more DB queries as we'd have to lookup node details every time we send/receive a message. Most times only for the node we're dealing with, but for FIND_NODE requests we'd have to lookup info about all the nodes we include in the response. I'm not sure how much of a problem that would be, but ISTM it'd make sense to keep NodeAPI instances in the routing table as it's not prohibitively large so we can easily fit all nodes in it in memory -- that's what we do now anyway.

So my thought is that we should be cognizant of these different classifications because all of the data that needs to be persisted seems to be in the ENR. Please correct me if I'm mistaken about any of this.

That's correct, but we do actually need to persist metadata like last_pong because otherwise after a restart we'd start ignoring requests from nodes for which we have a valid bond, and since they don't know that they'd start treating us as an unresponsive node.

Ok, so I don't think it's a good idea to squeeze extra changes in this PR to use a LevelDB to store the ENR and node metadata as that would make it a lot bigger and it'd be hard to distinguish the mechanical changes from the behaviour-changing ones. Given that, I've decided to morph this so that it simply renames the existing DB classes and updates their APIs to take NodeAPI instances instead of ENR. It no longer pickles the Node instance, nor it stores extra node metadata -- under the hoods we're storing only the ENR just like before. If you guys are ok, I'd like to get this through review first (as it touches a lot of files/APIs and has lots of potential for conflicts) and once it's merged I'll start working on using LevelDB and storing Node metadata apart from the ENR as well

This would incur in a lot more DB queries as we'd have to lookup node details every time we send/receive a message. Most times only for the node we're dealing with, but for FIND_NODE requests we'd have to lookup info about all the nodes we include in the response. I'm not sure how much of a problem that would be, but ISTM it'd make sense to keep NodeAPI instances in the routing table as it's not prohibitively large so we can easily fit all nodes in it in memory -- that's what we do now anyway.

The db queries should be pretty well cachable.
I'm mostly worried about complexity and unnecessary entanglement in the routing table implementation. All the routing table cares about is node identities and insertion order, so I don't really see why it should deal with objects that also contain lots of additional data (public keys, capabilities, reputation, ...).


API Endpoint - Edit Flow to Load Check Data

Create API endpoint for Edit for Flow to Load Check Data
Testing Reference Only:
Test Basis Code (Dropdown)
Bias Adjusted Indicator (Dropdown with values of 1, 2 or Blank)
Average Absolute Percent Difference (Text)
Number of Hours (Text)
Number of Hours Excluded for Fuel (Text)
Number of Hours Excluded for Ramping (Text)
Number of Hours Excluded for Bypass (Text)
Number of Hours Excluded Pre RATA (Text)
Number of Hours Excluded Test (Text)
Number of Hours Excluded for Main and Bypass (Text)
Operating Level Code (Dropdown)

Test Case: TC1015


".edu" substring is not a good signal to identify if a domain is an university

    if not ".edu" in domain:
        continue

This ".edu" is an identifier to classify university domain, but this is not always true in the real world.
The solution:

Write a function to identify if the domain in the email is in the university domain list [1].

[1] https://github.com/Hipo/university-domains-list

I finished the function, and would push a PR today or tomorrow


Major update: M5Button now draws buttons too. Events better and more consistent. Extensive documentation and examples.

We don't use it, but users might expect to be able to create hardware buttons on GPIO.

M5Button: Buttons, Gestures and Events
The M5Button library supports both hardware buttons and touch screen virtual buttons, and is available both on the M5Stack Core2 touch screen device and the M5Stack devices with three buttons below the screen.

Hardware button support that is 100% Arduino Button Library compatible.

Buttons on the screen, either as labels above the original M5Stack's hardware buttons or anywhere on the touch screen of the Core2.

Zone and Point objects to work with screen locations and areas. Functions for distance, direction and more.

Touch gestures that are processed before the buttons, so you can still use gestures when the screen is full of buttons.

Buttons and gestures send events that you can attach handler routines to, or poll in a loop. Events include tap, doubletap, pressed, dragged and more. Support for key repeat.

Extensive screen rotation support, including support for buttons and gestures that stay referenced to the physical screen regardless of rotation.

Intuitive, consistent and well-documented API.

Emulation of the (much less feature-rich) TFT_eSPI_Button class. This goes together well with M5Touch's emulation of the TFT_eSPI resistive touch screen interface to run a lot of existing programs without modification.

This library was written for the M5Stack series of devices, but was made to be general enough to be produce pretty visual buttons with any TFT_eSPI display. Its more advanced features need the M5Touch interface, although other input methods could be implemented.

M5Touch: fully standalone
Touch is now a completely standalone library, the interface to the M5Button part has moved to M5Button.  Code moved from touch to M5Touch files for consistency with M5Display etc. Still fully compatible with old 'touch' interface: factory test sketch runs fine.

PointAndZone: supporting primitives into their own files
The Point and Zone primitives – with support for display rotation, distance and direction finding and more – has now moved to src/utility/PointAndZone files so M5Button and M5Touch (and possibly other files in future) can rely on it.

M5Display: small tweaks
A few small changes:

Like Touch and Buttons, M5Display now has a static member called 'instance' such that M5Display::instance always is a pointer to the first display instance. This way other components of the library can address it without landing in circular reference hell from having to include M5Core2.h.

The M5.Lcd instance now also supports pretending to be an old-style resistive touch screen like the TFT_eSPI touch extension, complete with faking resistive touch calibration. Together with M5Button's TFT_eSPI_Button emulation, one can run a lot of ESP32 existing software. Our native support is much, much more feature-rich though.

M5.Lcd.pushState() saves all the display state, cursor positions, selected fonts, everything. M5.Lcd.popSate() gets it back. Stackable so multiple layers of functionality can be non-invasive on the display.

Examples
There are four examples in examples/Touch that should explain interfacing with the touch sensor as well as buttons, events and gestures.

Documentation
The documentation lives as comments in the respective header files. I have included them here for reference:

src/M5Touch.h

== M5Touch - The M5Stack Core2 Touch Library ==

  This is the library behind the M5.Touch object that you can use to read
  from the touch sensor on the M5Stack Core2. It was made to be an input
  source for the M5Button library that provides higher level buttons,
  gestures and events, but both libraries can be also be used alone.

== About the Touch Sensor in the M5Stack Core2 ==

  Touchpanel interfacing is done by a FocalTech FT6336 chip, which supports
  two simultaneous touches. However, the M5Stack Core2 touch display is only
  multi-touch in one dimension. What that means is that it can detect two
  separate touches only if they occur on different vertical positions. This
  has to do with the way the touch screen is wired, it's not something that
  can be changed in software. So you will only ever see two points if they do
  not occur side-by-side. Touches that do happen side-by-side blend into one
  touch that is detected somewhere between the actual touches.

  While this limits multi-touch somewhat, you can still create multiple
  buttons and see two that are not on the same row simultaneously. You could
  also use one of the buttons below the screen as a modifier for something
  touched on the screen.

  The touch sensor extends to below the screen of the Core2: the sensor maps
  to 320x280 pixels, the screen is 320x240. The missing 40 pixels are placed
  below the screen, where the printed circles are. This is meant to simulate
  the three hardware buttons on the original M5Stack units. Note that on some
  units the touch sensor in this area only operates properly if the USB cable
  is plugged in or if the unit is placed firmly in your hand on a metal
  surface.

  For a quick view of how the sensor sees the world, try this sketch:

    #include <M5Core2.h>

    void setup() {
      M5.begin();
      M5.Lcd.fillScreen(WHITE);
    }

    void loop() {
      M5.update();
      Event& e = M5.Buttons.event;
      if (e & (E_MOVE | E_RELEASE)) circle(e & E_MOVE ? e.from : e.to, WHITE);
      if (e & (E_TOUCH | E_MOVE)) circle(e.to, e.finger ? BLUE : RED);
    }

    void circle(Point p, uint16_t c) {
      M5.Lcd.drawCircle(p.x, p.y, 50, c);
      M5.Lcd.drawCircle(p.x, p.y, 52, c);
    }

  (Don't worry if this all seems abracadabra now, we'll get to all of
  this is due time.)

== Point and Zone: Describing Points and Areas on the Screen ==

  The Point and Zone classes allow you to create variables that hold a point
  or an area on the screen. You can

  Point(x, y)

    Holds a point on the screen. Has members x and y that hold the coordinates
    of a touch. Values INVALID_VALUE for x and y indicate an invalid value,
    and that's what a point starts out with if you declare it without
    parameters. The 'valid()' method tests if a point is valid. If you
    explicitly evaluate a Point as a boolean ("if (p) ..."), you also get
    whether the point is valid, so this is equivalent to writing "if
    (p.valid()) ...".

  Zone(x, y, w, h)

    Holds a rectangular area on the screen. Members x, y, w and h are for the
    x and y coordinate of the top-left corner and the width and height of the
    rectangle.

  The 'set' method allows you to change the properties of an existing Point
  or Zone. Using the 'in' or 'contains' method you can test if a point lies
  in a zone.

  The PointAndZone library also provides the low-level support for direction
  from one point to another and for screen rotation translations.

  The documentation in src/utility/PointAndZone.h provides more details and
  examples.

== Basic Touch API ==

  The basic touch API provides a way to read the data from the touch sensor.

  M5.update()
    In the loop() part of your sketch, call "M5.update()". This will in turn
    call M5.Touch.update(), which is the only part that talks to the touch
    interface. It updates the data used by the rest of the API.

  M5.Touch.changed
    Is true if anything changed on the touchpad since the last time
    M5.update() was called.

  M5.Touch.points
    Contains the number of touches detected: 0, 1 or 2.

  M5.Touch.point[0], M5.Touch.point[1]
    M5.Touch.point[0] and M5.Touch.point[1] are Points that hold the detected
    touches.

  A very simple sketch to print the location where the screen is touched:

    #include <M5Core2.h>

    void setup() {
      M5.begin();
    }

    void loop() {
      M5.update();
      if ( M5.Touch.changed ) Serial.println( M5.Touch.point[0] );
    }

== Buttons, Gestures, Events ==

  Note that you may not want to use any of the above directly. The M5Buttons
  library provides button, gestures and events that allow you to quickly
  create reactive visual buttons on the screen and react differently based on
  whether a button was clicked, tapped, or double-tapped. Have a look at the
  documentation for that, which is in the M5Button.h file in the src/utility
  directory of this repository. The examples under "File / Examples
  / M5Core2 / Touch" in your Arduino environment should give you an
  idea of what's possible.

== Screen Rotation ==

  If you rotate the screen with M5.Lcd.setRotation, the touch coordinates
  will rotate along with it.

  * What that means is that either x or y for the area below the screen may
    go negative. Say you use the screen upside-down with
    M5.Lcd.setRotation(3). In that case the off-screen touch area (Y
    coordinates 240 through 279) that was below the screen now becomes above
    the screen and has Y coordinates -40 through -1.

  * See the M5Button library for a feature that allows you to keep some Zone
    and Button objects in the same place on the physical screen, regardless
    of rotation.

== TFT_eSPI Resistive Touch API emulation ==

  While technically not part of this library itself, we added an emulation
  for the TFT_eSPI touch API to the M5Display object that merely passes
  informaton on to the M5.Touch object. So M5.Lcd can be addressed as if it's
  a touch screen using that older resistive touch interface. Do note that
  this interface is not nearly as powerful as M5.Touch's native API. But
  together with M5Button's TFT_eSPI_Button emulation, this should allow you
  to compile lots of ESP32 software written for touch screens.

== Advanced Uses of the Touch Library ==

  You should never need any of the below features in everyday use. But
  they're there just in case...

  M5.Touch.wasRead
    True if the sensor was actually read. The sensor can only provide updates
    every 13 milliseconds or so. M5.update() can loop as quick as once every
    20 MICROseconds, meaning it would continually read the sensor when there
    was nothing to read. So M5.Touch.read() only really reads when it's time
    to do so, and returns with M5.Touch.wasRead false otherwise.

  M5.point0finger
    The FT6336 chip keeps track of fingers, each touch has a finger ID of 0
    or 1. So when there are two touches in point[0] and point[1] and then one
    goes away, point0finger allows you to see which touch is left in
    point[0].

  M5.Touch.interval()
    Without arguments returns the current interval between sensor updates in
    milliseconds. If you supply a number that's the new interval. The default
    of 13 seems to give the most updates per second.

  M5.Touch.ft6336(reg)
  M5.Touch.ft6336(reg, value)
  M5.Touch.ft6336(reg, size, *data)
    Allows you to read and write registers on the ft6336 touch interface chip
    directly. The first form reads one byte, the second form writes one and
    the third form reads a block of 'size' bytes starting at 'reg' into a
    buffer at '*data'.

  M5.Touch.dump()
    M5.Touch.dump() dumps the entire register space on the FT6336 chip as a
    formatted hexdump to the serial port.

== Legacy API ==

  There was a previous version of this library, and it provided a number of
  functions that were single touch only. The older version did not have
  M5.update(). Instead it used ispressed() and getPressedPoint() functions as
  well as HotZones, which provided something that worked a little bit like
  Buttons. This older API is still supported (the M5Core2 Factory Test sketch
  still works), but you should not use it for new programs. The ispressed()
  function specifically does not mix well with code that uses M5.update().

== Example ==

  It may sound complicated when you read it all in this document, but it's
  all made to be easy to use.

  Under File / Examples / M5Core2 / Touch in your Arduino environment is an
  example sketch called "events_buttons_gestures_rotation" that shows both
  this library and M5Button in action. Please have a look at it to understand
  how this all works and run the sketch to see all the events printed to the
  serial port. It shows buttons, gestures and events and should be pretty
  self-explanatory.

src/utility/M5Button.h

== M5Button: Buttons, Gestures and Events ==

  * Hardware button support that is 100% Arduino Button Library compatible.

  * Buttons on the screen, either as labels above the original M5Stack's
    hardware buttons or anywhere on the touch screen of the Core2.

  * Zone and Point objects to work with screen locations and areas. Functions
    for distance, direction and more.

  * Touch gestures that are processed before the buttons, so you can still
    use gestures when the screen is full of buttons.

  * Buttons and gestures send events that you can attach handler routines to,
    or poll in a loop. Events include tap, doubletap, pressed, dragged and
    more. Support for key repeat.

  * Extensive screen rotation support, including support for buttons and
    gestures that stay referenced to the physical screen regardless of rotation.

  * Intuitive, consistent and well-documented API.

  * Emulation of the (much less feature-rich) TFT_eSPI_Button class. This
    goes together well with M5Touch's emulation of the TFT_eSPI resistive
    touch screen interface to run a lot of existing programs without
    modification.

  This library was written for the M5Stack series of devices, but was made to
  be general enough to be produce pretty visual buttons with any TFT_eSPI
  display. Its more advanced features need the M5Touch interface, although
  other input methods could be implemented.

== Point and Zone: Describing Points and Areas on the Screen ==

  The Point and Zone classes allow you to create variables that hold a point
  or an area on the screen.

  Point(x, y)

    Holds a point on the screen. Has members x and y that hold the
    coordinates of a touch. Values -1 for x and y indicate an invalid value,
    and that's what a point starts out with if you declare it without
    parameters. The 'valid()' method tests if a point is valid. If you
    explicitly evaluate a Point as a boolean ("if (p) ..."), you also get
    whether the point is valid, so this is equivalent to writing "if
    (p.valid()) ...".

  Zone(x, y, w, h)

    Holds a rectangular area on the screen. Members x, y, w and h are for the
    x and y coordinate of the top-left corner and the width and height of the
    rectangle.

  The 'set' method allows you to change the properties of an existing Point
  or Zone. Using the 'in' or 'contains' method you can test if a point lies
  in a zone.

  The PointAndZone library also provides the low-level support for direction
  from one point to another and for screen rotation translations.

  The documentation in src/utility/PointAndZone.h provides more details about
  rotation and examples covering most of the above.

== Buttons ==

  You can create classic Arduino buttons that act on the voltage on a pin of
  the controller. On the M5Stack Core2, you can also create buttons that act
  on touch within a given rectangle on the screen. If you want, that same
  rectangle will also be used for a graphical representation of the button
  that will show a text label in a colored background with a colored outline.
  The colors of background, text, and outline can be configured, both for the
  'off' and the 'on' state of the button.

  Whether on the M5Stack with hardware buttons or on the Core2 with a touch
  screen, buttons are special forms of the 'Zone' object, meaning that all
  functions that apply to 'Zone' objects also work on buttons. On the M5Stack
  with buttons, while this zone cannot be used for touch input, it can still
  be used to display a button that responds to the button state.

== Hardware Buttons ==

  For hardware buttons, use the classic Arduino way of setting up the button,
  by providing the pin, whether the pin is inverted and the debounce time.

    #include <M5Stack.h>

    Button myButton(39, true, 10);

    void setup() {
      M5.begin();
    }

    void loop() {
      M5.update();
      if (myButton.wasPressed()) Serial.print("* ");
    }

  This would set up 'myButton' with the inverse state of pin 39, and a
  debounce time of 10 milliseconds. Because pin 39 is the left button on an
  M5Stack with buttons, this sketch will output a star to the serial port
  every time you release the button. (And because pin 39 is the interrupt
  wire for the touch screen on the Core2, it also happens to output a star on
  that device every time you touch the screen.)

    Note that the sketch uses 'M5.update()' instead of 'myButton.read()'. You
    don't need to read() your buttons explicitly anymore. All buttons created
    with M5Button are automatically read by 'M5.update()'. (Unless you read
    them with 'myButton.read()', in which case 'M5.update()' stops doing that
    to avoid you missing things.)

  The next sections will describe buttons and gestures on the touch screen,
  but if you have an M5Stack device without a touch screen: keep reading
  because many events work on hardware buttons too. Hardware buttons can have
  responsive representation on the screen, we'll get to that also.

== Buttons Using the Touch Screen ==

    Note: It may make sense to also read the documentation in the M5Touch.h
    file, as tells you about the touch sensor and the lower-level touch
    interface that is underneath the M5Button library.

  To have a button that reacts to the touch sensor, all you need to do is
  create a variable for the Button and provide the coordinates (x, y, width
  and height). These buttons can be used in two ways. You can either use them
  the way you would a normal Arduino button, or you can provide handler
  functions to process various events for the button. We'll talk about the
  events later, but here's the same simple sketch from above again but now it
  defines a 100x50 pixel touch button near the top-right of the screen. Note
  that this button does not show anything on the sreen just yet.

    #include <M5Core2.h>

    Button myButton(10, 10, 200, 100);

    void setup() {
      M5.begin();
    }

    void loop() {
      M5.update();
      if (myButton.wasPressed()) Serial.print("* ");
    }

  'wasPressed()' will only be true once when you press the button. You can
  also use the other Arduino button functions such as 'isPressed()' that is
  true as soon and as long as the button is touched. Note that the buttons
  only become pressed if the touch starts within the button, not if you swipe
  over it, and that they will stay pressed as long as the finger touches,
  even if it leaves the button area. You may want read about the events
  further down to distinguish between different kinds of button-presses.

  On the Core2 the three buttons M5.BtnA, M5.BtnB and M5.BtnC from the older
  M5Stack units come already implemented as touch buttons that lie just below
  the screen where the three circles are.

== Buttons with visual appearance ==

  If you want you button to show on the screen, all you need to do is provide
  a set of three colors for the background of the button, the text printed on
  it and the outline of the button. Using yet the same skech again:

    #include <M5Core2.h>

    Button myButton(10, 10, 200, 100, false, "I'm a button !",
                    {BLACK, WHITE, WHITE});

    void setup() {
      M5.begin();
    }

    void loop() {
      M5.update();
      if (myButton.wasPressed()) Serial.print("* ");
    }

  As you can see the colors are provided in {curly braces}, that's because
  they are one variable, of the 'ButtonColors' type. Especialy if you're
  going to define a bunch of buttons, you're better off replacing the button
  line by:

    ButtonColors col = {BLACK, WHITE, WHITE};
    Button myButton(10, 10, 200, 100, false, "I'm a button !", col);

  The order there is background, text, outline. If you do not want any of
  these components drawn, simply put NODRAW in that position. The thing we are
  defining here is what the button draws in its 'off' state. Since we haven
  specified anything to draw in the 'on' state, the button just stays like it
  is, regardless of whether it's pressed. Thus, if we say

    ButtonColors onCol = {BLACK, WHITE, WHITE};
    ButtonColors offCol = {RED, WHITE, WHITE};
    Button myButton(10, 10, 200, 100, false, "I'm a button !", onCol, offCol);

  the button background would turn red if the button was pressed. The button
  colors can also be addressed directly. "myButton.on.bg = BLUE;" will turn
  the background blue in the on state. The other two properties of the
  ButtonColors variable are predicatably called 'text' and 'outline'.

  If you run the sketches you will see the text is placed in the center of
  the button and the buttons have visually please round edges. The corner
  radius defaults to a quarter of the shortest side of the button. You can
  change all this with the remaining parameters when setting up the button:

    Button myButton(10, 10, 200, 100, false, "I'm a button !", onCol, offCol,
                    TL_DATUM, 0, 10, 0);

  These last parameters indicate where to put the label in the TFT_eSPI
  standard datum values, top-left in this case. The values after that are the
  dx and dy, meaning the offsets from the default position. In this case
  that's no left-right offset and 10 pixels down. Negative values move the
  other way. The last value is the corner radius. In this case it would draw
  an ugly 1980's rectangular button.

  You can make a button draw its current state with "myButton.draw()", or all
  buttons do that with "M5.Buttons.draw()". You can also call draw with a
  ButtonColors variable so "myButton.draw({BLUE, WHITE, WHITE})" draws it
  with those colors. Until the next state-change comes along that is, if you
  have colors for the new state defined.

  Note that the text provided here is the name of the buttton. A button
  always keeps the same name, but the label (that which is shown) can change,
  but initialises to the name. Use 'myButton.setLabel("New text!")' to change
  it.

  With "myButton.hide()" you can make a button temporarily invisible to the
  touch sensor. You can specify an optional color value to draw over the
  button if you want to make it visually disappear also. myButton.draw() makes
  it visible to the touch sensor again, even if you have no colors defined, so
  nothing shows on the screen. "MyButton.erase()" only paints over the button,
  in a color you can specify (default black).

== Visual Buttons (Labels) with Hardware Buttons ==

  You can have a visual representation of the state of a hardware button on
  the screen, for example right above the hardware buttons of the original
  M5Stack. We'll call these buttons "labels", but they're regular buttons
  that just respond to a physical button insetad of the touch sensor. If you
  want to display a label on the screen that responds to the state of a
  hardware button, just set up a hardware button up as usual, but then follow
  the parameter list with "hw" (in quotes), followed by the parameters of the
  touch button below.

  The hardware buttons in the older M5Stack devices are already set up to
  display labels: all you need is supply colors. Their initialization (in
  M5Stack.h in this library) looks like this:

    Button BtnA = Button(BUTTON_A_PIN, true, DEBOUNCE_MS,
                         "hw", 3, 218, 102, 21, true, "BtnA");
    Button BtnB = Button(BUTTON_B_PIN, true, DEBOUNCE_MS,
                         "hw", 109, 218, 102, 21, true, "BtnB");
    Button BtnC = Button(BUTTON_C_PIN, true, DEBOUNCE_MS,
                         "hw", 215, 218, 102, 21, true, "BtnC");

  As you can see: its just a hardware button that has a zone to display the
  label. So the sketch below is all that is needed to show repsonsive labels
  on the M5Stack:

    #include <M5Stack.h>

    void setup() {
      M5.BtnA.off = M5.BtnB.off = M5.BtnC.off = {BLUE, WHITE, NODRAW};
      M5.BtnA.on  = M5.BtnB.on  = M5.BtnC.on  = {RED,  WHITE, NODRAW};
      M5.begin();
      M5.Buttons.draw();
    }

    void loop() {
      M5.update();
    }

  If you looked closely you might have noticed that the mysterious fifth
  argument has changed from 'false' to 'true'. This argument is called
  'rot1', and it determines that the location of this Zone or Button is
  specified in rotation one, i.e. the normal default screen rotation. What
  that means is that no matter what rotation you set the display to, these
  button will always stay in the same place. The documentation in
  src/utility/PointAndZone.h has more details if you want to know more about
  this. You will only ever need rot1 if you need multiple screen rotations
  AND you want objects to stay in the same physical place regardless.

== M5.Buttons ==

  Apart from the class "Button" that you use to create buttons of your own,
  there is an instance called "M5.Buttons" (plural), that is used to talk to
  the M5Button library for things that involve all buttons. For instance:
  "M5.Buttons.setFont" sets a font for all buttons, and you can use
  "M5.Buttons.addHandler" to add a handler that gets events for all buttons
  (and gestures).

== Events ==

  Buttons (and gestures, but we'll get to those later) have a set of simple
  functions to see if they are pressed or not. These Arduino-compatible
  functions work fine for that purpose. But if you want to detect whether a
  button received a short tap, or even a double-tap on many buttons
  simultaneously, you find yourself writing quite a bit of code for that.

  Events are M5Button's way of making it easier to react to events on
  hardware buttons or the touch screen. For this you need to define one or
  more event handler functions. This is done like this:

    void myHandler(Event& e) { ... }

  It's important to do it exactly this way, only changing the name of the
  function. You can then set things up so that this function receives events.

  Here's an events-based sketch for the Core2. We'll base it on the same
  buton we've seen before.

    #include <M5Core2.h>

    ButtonColors onCol = {BLACK, WHITE, WHITE};
    ButtonColors offCol = {RED, WHITE, WHITE};
    Button myButton(10, 10, 200, 100, false, "I'm a button !", onCol, offCol);

    void setup() {
      M5.begin();
      myButton.addHandler(touched, E_TOUCH);
      myButton.addHandler(released, E_RELEASE);
    }

    void loop() {
      M5.update();
    }

    void touched(Event& e) {
      Serial.println("Touched!");
    }

    void released(Event& e) {
      Serial.println("Released!");
    }

  Note that the function names "touched" and "released" are provided to
  addHandler without the parenthesis. Here's two ways you can set up a handler
  function to receive events:

    M5.Buttons.addHandler(myHandler);

    - or -

    myButton.addHandler(myHandler);

  The first form receives all the events relating to all buttons and gestures,
  the second form only receives the events for that specific button. After the
  name of the function, without the brackets, you can specify which events the
  function needs to receive. You can add together (or "bitwise or") the names
  of the events if you want a handler function to reive multiple events.

  The Event object that is passed to the handler function contains all sorts
  of information about the event: where on the screen it started, where it
  ended, the duration, etc. etc.

  Let's first look at all the possible events and when they are fired. The
  first three events always happen when a finger touches the display.

  E_TOUCH, E_MOVE and E_RELEASE

    The E_TOUCH and E_RELEASE events fire when a button is pressed and
    released. On a touch sensor, E_MOVE will fire every time it detects the
    finger has moved. These events cannot be prevented from firing, like most
    of the other ones. So every time your finger touches the display it will
    fire E_TOUCH and then E_MOVEs until finally, when you release your
    finger, an E_RELEASE.

  E_PRESSING and E_LONGPRESSING

    There are also events that happen while the button is still pressed.
    These are E_PRESSING and E_LONGPRESSING. E_PRESSING happens as soon as
    M5Button is sure that's not just a short tap (more later). The maximum
    time for a tap is settable, but defaults to 150 ms. So if the button is
    still held 150 ms after E_TOUCH, E_PRESSING fires. Just once, unless you
    have set up a key repeat, more about that later too. Then at some point
    you might get a E_LONGPRESSING, if you have set up a duration for that to
    happen.

  E_TAP, E_DBLTAP, E_PRESSED, E_LONGPRESSED and E_DRAGGED

    Unless the keypress is cancelled (more later), exactly one of these events
    will fire after the button has been released, after E_RELEASE has fired.
    Think of these as final decisions on what kind of keypress this was.
    (E_TAP takes a tiny bit longer before it fires because M5Button needs to
    make sure it wasn't a doubletap, in that case E_DBLTAP wil fire instead.)

    So tap and doubletap are sort of obvious, E_LONGPRESSED fires if the key
    was pressed more that the set time in ms. E_DRAGGED fires if the finger
    has moved outside of the button area when it was released. E_PRESSED is
    fires in all other cases.

  E_GESTURE

    Doesn't really fit in with the others, but is the event that gets fired
    when a gesture is detected.

  If at any point after the pressing of a button, "myButton.cancel()" is
  called, no further high-level events for that button will fire. What that
  means is nothing other than possible E_MOVEs and one E_RELEASE event will
  fire for that button until it is released and then pressed again. This is
  used internally when a gesture is detected, so that when a touch gesture
  starts on a button, there won't be an E_PRESSED, or any of the others.

  The second thing to look at more closely is the 'Event' object itself. When
  you set up a handler function like this

    void myhandler(Event& e) {

  what that means is you're creating a function that recives a (reference to)
  an event. That event has all sorts of properties that we can look at.

    e.type

      The type of event, such as E_TOUCH or E_TAP from above. The event
      itself, when you evaluate it, also returns the type. What that means is
      that "if (e.type == E_TAP) .." is equivalent with "if (e == E_TAP) .."

    e.finger

      0 or 1, whether this is the first or second finger detected on the
      touch screen. Left at zero on the M5Stack with buttons.

    e.from and e.to

      Points that say from where to where this event happened. Left at
      invalid for the M5Stack with buttons.

    e.duration

      Duration of the event in milliseconds.

    e.button

      Pointer to the button attached to the event. What that means is that you
      can use all the methods for button as long as you precede them with
      "e.button->". Note the '->' there because this is a pointer to an
      object.

    e.gesture

      e.gesture is a pointer to the gesture attached to the event, and may be
      null if the event is not a gesture. So unless you know for sure this
      event is a gesture (because handler attached to that gesture or because
      you asked for E_GESTURE events only), this pointer needs to be tested
      using "if (e.gesture)" before using -> methods on it, oterwise your
      program will crash.

    other methods

      Additionally, you can ask for the name of the event as text by using
      "e.typeName()" and get the name of the gesture or button with
      "e.objName()". "e.direction()" gives the direction, for instance of a
      gesture or of an E_RELEASE event, where it gives direction between
      E_TOUCH and E_RELEASE. "e.isDirectionTo(0,30)" will output true if the
      swipe was upwards, plus or minus 30 degrees.

  When you add a handler function you can also specify what events it should
  receive by supplying it as the second argument after the handler function.
  If you want to register multiple events for the same function, don't
  register the handler twice, but simply add (or bitwise or) the event
  values. The default value there is the pseudo-event E_ALL, which is simply
  a value with all the event bits turned on. You can also subtract event type
  values from E_ALL to exclude them.

  Here are some examples of ways to add a handler function:

    button1.addHandler(b1Function, E_TOUCH + E_RELEASE);

      b1Function only get these two events for button1.

    M5.Buttons.addHandler(btnHandle, E_ALL - E_MOVE);

      btnHandle gets all events, except E_MOVE.

    swipeUp.addHandler(nextPage);

      Handler nextPage is called when swipeUp gesture detected.

  Note that all handler functions must be of the "void someName(Event& e)"
  type, even if they plan to completely ignore the event that is passed to
  them.

  If your event reads data or calls functions in e.button or e.gesture,
  remember that these are pointers. Without going into too much detail, it
  means it must do so with the -> notation, so to read the button x position,
  you would say "e.button->x".

  Please have a look at the example sketch (see below) to understand how this
  all works and run the sketch to see all the events printed to the serial
  port.

== Taps, Doubletaps, Longpresses and Key Repeat ==

  Some features are best explained with some examples:

    myButton.tapTime = 0;

      Turns off detection of taps and doubletaps, the button will fire
      E_PRESSING immediately when pressed. Any other value makes that the
      maximum time a tap can take in milliseconds, and thus the wait tme
      before "E_PRESSING" fires.

    mybutton.tapWait = 0;

      Turns off detection of doubletaps only. Any other value makes that the
      wait before an E_TAP fires, because M5Button is still waiting to see if
      it's maybe a doubletap.

    mybutton.longPressTime = 700;

      Sets up the button to fire an E_LONGPRESSING after 700 ms, and then fire
      E_LONGPRESSED instead of E_PRESSED when the button is released. By
      default this is set to zero, meaning longpress detection is off.

    myButton.repeatDelay = 500;
    myButton.repeatInterval = 250;

      Makes the button repeat the sending of its E_PRESSING event every 250
      milliseconds if key is held for 500 ms.

== In Loop vs. Event Handlers ==

  Button and Gesture objects have an 'event' method that returns the event
  that was detected this time around by 'M5.update()'. Each event comes in
  it's own rotation of 'M5.update()', so if you prefer to detect events this
  way and not with handler routines that's fine too.

  If nothing was detected, the event type will be set to E_NONE with a value
  of 0, so you can do "if (myButton.event) ...". 'M5.Buttons.event' has the
  event detected this time around, regardless of what button or gesture it was
  attached to. This example prints a star to serial if it is doubletapped.

    #include <M5Core2.h>

    Button myButton(50,70,220, 100, false, "Button",
                    {YELLOW, BLACK, NODRAW},
                    {RED, BLACK, NODRAW} );

    void setup() {
      M5.begin();
      M5.Buttons.setFont(FSS18);
      M5.Buttons.draw();
    }

    void loop() {
      M5.update();
      if (myButton.event == E_DBLTAP) Serial.print("* ");
    }

== M5.background ==

  Only one button can become pressed for any spot on the touch screen. If you
  define overlapping buttons, the first defined button for the overlap become
  pressed and gets all subsequent events.

  One special button, "M5.background", was defined before any others, and it
  has the size of the entire touch sensor. This means it gets all events
  where the first touch was not within any of the defined buttons.

== Gestures on the Touch Screen ==

  Whenever a finger is released from the touch screen and before any
  higher-level button events are fired, the library first checks whether this
  was perhaps a gesture. When you define gestures, you can optionally specify
  the zone in which the gesture must start, the zone in which it must end, the
  minimum distance the finger must have travelled, the direction it has
  travelled in and the maximum time the gesture may take.

    Gesture exampleGesture(fromZone, toZone, "exampleName", minimumDistance,
    direction, plusminus, ro1, maxTime)

  Where fromZone and toZone can be valid zones or the word "ANYWHERE". If you
  want to specify neither fromZone nor toZone, you can also leave them off
  completely. The minimum distance defaults to 75 pixels. The direction
  (default: don't care) is in compass degrees (so 180 is down), but the
  compiler defines DIR_UP, DIR_DOWN, DIR_LEFT and DIR_RIGHT are provided for
  convenience. The plusminus deines how many degress off-course the gesture
  may be, and the rot1 flag defines whether this direction is relative to the
  current rotation, or as seen in rotation 1. maxTime is in milliseconds as
  usual and defaults to 500 ms. DIR_ANY can be used for direction if you need
  to specify it in order provide a rot1 or maximum time value.

  here are a few examples of valid gesture definitions:

    Gesture swipeDown("swipe down", 100, DIR_DOWN, 30);

      Down (plus or minus 30 degrees) for at least 100 pixels within 500 ms

    Gesture fromTop(Zone(0, 0, 360, 30), ANYWHERE, "from top", 100, DIR_DOWN, 30);

      The same but starting from within the top 30 pixels. (If you make that
      too narrow you may miss the swipe because the sensor 'sees' only once
      every 13 ms or so.

  (Note that if you defined both these gestures in this order the second one
  would never fire because any swipe that matched number two would first match
  number one and fire that one instead.)

  Gestures have a 'wasDetected()' method if you want to detect them in the
  main loop, or you attach a handler the same way you would for a button,
  with "myGesture.addhandler(myHandler)"

    #include <M5Core2.h>

    Gesture swipeDown("swipe down", DIR_DOWN, 30);

    void setup() {
      M5.begin();
    }

    void loop() {
      M5.update();
      if (swipeDown.wasDetected()) Serial.println("Swiped down!");
    }

== Advanced Hints and Tricks

  ## drawFn

    If you look at the source code for the library you will see that the
    drawing of the button is done by a static function in the M5Buttons
    object. It's defined as

      void M5Buttons::drawFunction(Button& b, ButtonColors bc)

    If you make your own function that takes the same arguments but that does
    something different, you can make the library use it by saying
    "M5.Buttons.drawFn = myFunction". You can even do that on a per-button
    basis with "myButton.drawFn = myFunction".

  ## drawZone

    A Button instance _is_ also a Zone object, in that it descends from it.
    Which means a Button has all the methods of a Zone object, as well as its
    own. But it contains another zone, called drawZone. This allows you to
    have the visual representation happen somewhere else than where the
    button is on the touch sensor. Normally this is set to "invalid zone",
    but if you set it to a valid screen area, the button will be drawn there.
    This is used internally to put the optional labels for the off-screen
    buttons on the Core2 on the screen just above their touch areas.

  ## Drawing is Non-Invasive

    This library uses a brand-new feature of the M5Display object --
    M5.Lcd.popState() and M5.lcd.pushState() -- that allows it to save and
    reload the complete display driver state before and after drawing a
    button. What that means is that you can draw to the display without
    worrying that the button drawing will mess with your font setting, cursor
    position or anything else that is display-related.

  ## TFT_ePI_Button Emulation

    This libary also defines an object called TFT_eSPI_Button, which is the
    old way of doing buttons that comes as an optional extra with the display
    library. Together with M5Touch's emulation of the TFT_eSPI touch
    interface (written for the older resistive touch-screens), you can use it
    to run software made for those APIs. Do not use either for new code: the
    native interfaces are much more powerful.

  ## Buttons and Variable Scope

    Buttons come into existence and are drawn in their initial state when
    their variables are defined and are not detected anymore when their
    variables are removed from memory when the function they were defined in
    returns. Except for global buttons - defined outside any functions: their
    variables always exist. The programmer has to take responsability for
    erasing expired buttons off the screen because Button doesnt know what is
    supposed to be in the background. If you're not clearing the entire
    screen anyway, this can be done with "myButton.erase(BLACK)" if the
    background is to be black.


Seeing 500 issues related to SSL connection issues

System details:

Ubuntu 14.04 LTS
Chef Server 12
Opscode Push Server 1.1.6-1

I've attempted to use chef-server-ctl reconfigure and opscode-push-jobs-server reconfigure with no change in behavior. I've restarted everything as well after attempting a reconfigure.
I've verified my erchef nginx certs using openssl s_client, and saw that it was valid with the CA certs already on my system.
I'm getting these errors every time I attempt to query the server with either knife node status or knife job list:
(client side)
knife job list
ERROR: Server returned error 500 for https://SERVER_URL/organizations/REDACTED/pushy/jobs, retrying 1/5 in 4s
ERROR: Server returned error 500 for https://SERVER_URL/organizations/REDACTED/pushy/jobs, retrying 2/5 in 6s

(server side)
2015-10-31 02:31:04.681 [error] <0.336.0> SSL: certify: ssl_handshake.erl:239:Fatal error: certificate unknown
2015-10-31 02:31:04.682 [error] <0.296.0> Webmachine error at path "/organizations/REDACTED/pushy/jobs" : {throw,{error,{conn_failed,{error,"certificate unknown"}}},[{pushy_http_common,fetch_authenticated,2,[{file,"src/pushy_http_common.erl"},{line,44}]},{pushy_org,fetch_org_id,1,[{file,"src/pushy_org.erl"},{line,38}]},{pushy_object,fetch_org_id,1,[{file,"src/pushy_object.erl"},{line,45}]},{pushy_wm_base,verify_request_signature,2,[{file,"src/pushy_wm_base.erl"},{line,157}]},{pushy_wm_base,is_authorized,2,[{file,"src/pushy_wm_base.erl"},{line,135}]},{webmachine_resource,resource_call,3,[{file,"..."},...]},...]}

Not sure what else I could be missing. I've checked https://tickets.opscode.com/browse/CHEF-5144 and seems it could be similar? Saw that the Erlang version bundled with opscode-push-jobs-server is R15B03.

After chatting with support folks, I've tested 2.0.0~alpha.3 with erlang R16B03-1 and everything seems to work. The issue in R15B03 might have to do with the kind of SSL cert I'm passing in (wildcard cert, sha256 + RSA encryption)...

I can confirm that 2.0.0~alpha.3 also resolved this problem for me.

Just as a side note too, my hunch is that the reason why I saw the error in the first place was because one of the chain certificates was probably encoded in sha384 or sha512, which is not supported in R15B03. Might be worth checking if that's the case, if your server cert is sha256 but still exhibits the same behavior on the current stable version.

In my case one of the chain certs is signed with sha384

So I'm experiencing this same issue; could someone help with a solution? I'm using a comodo wildcard ssl cert and I think that I have the same problems as searches lead me back to here, and I'm not quite sure how I'd update the erlang processor in an embedded app setup like this. Instructions would be excellent.

Go here: https://packagecloud.io/chef/current
Find push-jobs-server package version 2.0.0~alpha.3 or newer for your platform and install it.
You will also need to update your push-jobs-clients to 2.0

My attempt at upgrading to opscode-push-jobs-server-2.0.0~alpha.4+20160226080810 is resulting in HTTP 400 messages:
<push.client.public.ip> - - [28/Feb/2016:04:31:50 +0000]  "GET /organizations/<ORG>/pushy/config/<HOST> HTTP/1.1" 400 "0.001" 26 "-" "Chef Client/12.4.3 (ruby-2.1.6-p336; ohai-8.5.1; x86_64-linux; +http://opscode.com)" "<chef.server.local.ip>:10003" "400" "0.001" "12.4.3" "algorithm=sha1;version=1.0;" "<HOST>" "2016-02-28T04:31:54Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 1053

haha; duh; one second; and thank you!

OK now there are 404s:
==> /var/log/opscode/opscode-erchef/erchef.log <==
2016-02-28 04:44:17.302 [error] {<<"method=GET; path=/organizations/<ORG>/groups/pushy_job_readers; status=404; ">>,"Not Found"}

==> /var/log/opscode/opscode-erchef/crash.log <==
2016-02-28 04:44:17 =ERROR REPORT====
{<<"method=GET; path=/organizations/<ORG>/groups/pushy_job_readers; status=404; ">>,"Not Found"}

==> /var/log/opscode/opscode-erchef/current <==
2016-02-28_04:44:17.31472 [error] {<<"method=GET; path=/organizations/<ORG>/groups/pushy_job_readers; status=404; ">>,"Not Found"}

==> /var/log/opscode/opscode-erchef/requests.log.1 <==
2016-02-28T04:44:17Z<EMAIL_ADDRESS>method=GET; path=/organizations/<ORG>/principals/<USER>; status=200; req_id=g3IAA2QAEGVyY2hlZkAxMjcuMC4wLjEBAAHc6gAAAAAAAAAA; org_name=<ORG>; req_time=3; rdbms_time=0; rdbms_count=3; req_api_version=1;
2016-02-28T04:44:17Z<EMAIL_ADDRESS>method=GET; path=/organizations/<ORG>/groups/pushy_job_readers; status=404; req_id=g3IAA2QAEGVyY2hlZkAxMjcuMC4wLjEBAAHdCgAAAAAAAAAA; org_name=mengesio; msg=group_not_found; couchdb_groups=false; couchdb_organizations=false; couchdb_containers=false; couchdb_acls=false; 503_mode=false; couchdb_associations=false; couchdb_association_requests=false; req_time=3; rdbms_time=0; rdbms_count=3; user=pivotal; req_api_version=1;

I'll try re-running chef-client on the push-job-clients

Looks like my client isn't able to successfully run:
2016-02-28_04:53:13.29198 INFO: [<HOST>] Starting client ...
2016-02-28_04:53:13.29203 INFO: [<HOST>] Retrieving configuration from https://chef-01.<DOMAIN>/organizations/<ORG>//pushy/config/<HOST>: ...
2016-02-28_04:53:13.29214 /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client.rb:209:in `rest': uninitialized constant Chef::REST (NameError)
2016-02-28_04:53:13.29216 	from /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client.rb:220:in `get_config'
2016-02-28_04:53:13.29217 	from /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client.rb:94:in `start'
2016-02-28_04:53:13.29217 	from /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client/cli.rb:138:in `run_application'
2016-02-28_04:53:13.29218 	from /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.0/lib/chef/application.rb:58:in `run'
2016-02-28_04:53:13.29218 	from /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/bin/pushy-client:8:in `<top (required)>'
2016-02-28_04:53:13.29218 	from /opt/push-jobs-client/bin/pushy-client:53:in `load'
2016-02-28_04:53:13.29219 	from /opt/push-jobs-client/bin/pushy-client:53:in `<main>'

OK so I finally fixed it. Seems there's a problem with the rest function usage/definition in pushy_client.rb at line 209.
Upgraded opscode-push-jobs-server' to 2.0.0~alpha.4+20160226080810`

Installed chef_current packagecloud.io repository: curl -s https://packagecloud.io/install/repositories/chef/current/script.rpm.sh | sudo bash
Ensured it was disabled: sudo sed -i "s/enabled=1/enabled=0/g" /etc/yum.repos.d/chef_current.repo
Installed 2.0.0~alpha.4+20160226080810 version of opscode-push-jobs-server: sudo yum --disablerepo=* --enablerepo=chef_current install -y opscode-push-jobs-server-2.0.0~alpha.4+20160226080810
Run opscode-push-jobs-server-ctl reconfigure

Here's what I've done to get push-jobs-cient working at all clients:

Installed chef_current packagecloud.io repository: curl -s https://packagecloud.io/install/repositories/chef/current/script.rpm.sh | sudo bash
Ensured it was disabled: sudo sed -i "s/enabled=1/enabled=0/g" /etc/yum.repos.d/chef_current.repo
Installed 2.0.2+20160226200016-1.el6 version of push-jobs-client: sudo yum --disablerepo=* --enablerepo=chef_current install -y push-jobs-client-2.0.2+20160226200016-1.el6
Hacked /opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client.rb

--- /a/opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client.rb	2016-02-28 05:41:01.924003375 +0000
+++ /b/opt/push-jobs-client/embedded/lib/ruby/gems/2.1.0/gems/opscode-pushy-client-2.0.2/lib/pushy_client.rb	2016-02-28 05:41:23.952003106 +0000
@@ -206,7 +206,10 @@
private
def rest

@rest ||= Chef::REST.new(chef_server_url, client_name, client_key)

@rest ||= begin

 require 'chef/rest'

 Chef::REST.new(chef_server_url, client_name, client_key)

end
end

def get_config
5. Restarted the client just to be safe.

Submitted the PR on opscode-pushy-client
https://github.com/chef/opscode-pushy-client/pull/84

As there have been no updates to this issue in 162 days, and there have been new major releases of both the push-jobs server and client in the interim, I'm going to close this ticket as stale.
@mengesb  if this issue is still valid, please re-open, we'll be happy to assist further.


Error while saving and opening py files - A system error occurred (EPERM: operation not permitted, open 'c:\UNC\trypythonex\cgi-bin\gs.py')

Issue Type: Bug
A system error occurred (EPERM: operation not permitted, open 'c:\UNC\trypythonex\cgi-bin\gs.py')

Created a new file
Ctrl S as a py file
Obtained error whenever I try to save

VS Code version: Code 1.23.1 (d0182c3417d225529c6d5ad24b7572815d0de9ac, 2018-05-10T17:11:17.614Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: enabledvideo_encode: enabledvpx_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
15.86GB (7.12GB free)

Process Argv
C:\Program Files\Microsoft VS Code\Code.exe C:\UNC\trypythonex\cgi-bin\excode.py

Screen Reader
no

VM
0%

Extensions (8)

Extension
Author (truncated)
Version

django-html
bib
1.2.0

django-snippets
bib
1.1.0

jupyter
don
1.1.4

python-extension-pack
don
1.0.1

MagicPython
mag
1.0.12

python
ms-
2018.4.0

git-merger
sha
0.4.1

jinja
who
0.0.8

@SundareshSankaran this indicates that you are trying to save a file where you do not have the right permissions to do so. Are you running VSCode as a different user than the file was created with?


Cannot Sync the Project with Gradle

Added the dependency (compile 'com.github.chrisbanes:PhotoView:1.2.7') and try to rebuild the project.
Receive this error:
Error:(30, 13) Failed to resolve: com.github.chrisbanes:PhotoView:1.2.7
Show in File
Show in Project Structure dialog

In the readme, it also mentions adding jitpack. Have you done this?

Sorry mate, my mistake. Hadn't got that part.
It's syncing now.
Thank you

No prob


feature transform running issue on GPU

Hello,
In my code, I'm using a Fourier transform like the one you used in "holography." The problem is that my code becomes very very slow on GPU while it can be executed on CPU with an acceptable runtime. I'm reaching out to see whether you faced the same issue or not.
def feature_transform(inputs):
    # Periodic BC in x
    w = 2 * np.pi / P
    x, y = w * inputs[:, :1], inputs[:, 1:]
    return tf.concat(
        (
            tf.math.cos(x),
            tf.math.sin(x),
            tf.math.cos(2 * x),
            tf.math.sin(2 * x),
            tf.math.cos(3 * x),
            tf.math.sin(3 * x),
            tf.math.cos(4 * x),
            tf.math.sin(4 * x),
            tf.math.cos(5 * x),
            tf.math.sin(5 * x),
            tf.math.cos(6 * x),
            tf.math.sin(6 * x),
            y,
            tf.math.cos(OMEGA * y),
            tf.math.sin(OMEGA * y),
        ),
        axis=1,
    )

To explain more about this issue, I found that the tensor slicing like this inputs[:, :1] and the function tf.concat are making the code slow. I just want to know whether you faced this issue before. Thanks for your time.

Update: Switching the backend from tf2 to tf1 will solve the issue.

https://github.com/lululxvi/deepxde/discussions/1006

Thanks.

Thanks.


[Task]: Rename TriggerUtils.java

Is there an existing issue for this?

[X] I have searched the existing issues

SubTasks
Rename TriggerUtils.java to RestApiTriggerUtils.java
Ref: https://github.com/appsmithorg/appsmith/pull/16554#discussion_r967011552

You may assign it to me. Here is the PR created for the fix: https://github.com/appsmithorg/appsmith/pull/16687

@bhuvanaindukuri thanks a lot for showing interest in this issue. I have assigned this issue to you. I will be reviewing your PR as well. Happy coding :)

@appsmithguru can you please check out the comment here before raising the PR : https://github.com/appsmithorg/appsmith/pull/16687#issuecomment-1246637097 cc: @sondermanish


add a theme to support cards that doesn't have covers

For cards that don't need a cover, the current implementation adds a blank cover, which is ugly. A better solution for this issue is to add another theme that doesn't render the card cover at all, e.g., lists, tables.

This feature seems not very useful so I'd just close it.


Use more inclusive language for category labels

Currently Some other race is used per CDC terminology; many find this to be a dismissive term and there is room for improvement. We have received feedback from HETF
Additionally, the term Other for Sex seems IMHO even worse. Currently the discussion has revolved around our racial categories but we should strongly consider this label as well. Perhaps using the same approach would work: An unrepresented sex

What's the status of this change, adding unrepresented race instead of some other race
Are we waiting for approval from anyone?
Meanwhile, here is some code I wrote that we may need if/when this is tackled
// export const UNREPRESENTED_RACE_DEF = `A single race not
// tabulated by the CDC, not Hispanic/Latino. The definition of
// "Unrepresented Race" is dependent on what other race
// categories exist in the dataset. Please note: The CDC and
// many other sources use the term "Some other race"; we find
// this term to be non-inclusive have avoided its usage.`;
``

will discuss this today.

received approval, Josh has this in progress.


Update README.md to be more sales-friendly

Rewrote README to look more sales-friendly and less plain. Comments/changes welcome

I notice your branch is not passing due to a naming convention problem (which is new).
I started this ticket to add some documentation about how to contribute from a branch naming perspective to be able to pass this workflow test.
https://github.com/orgs/openpredictionmarkets/projects/4/views/1?pane=issue&itemId=81458916
I think you may have to start a new branch off of this branch, basically on your terminal, do, "git branch {BRANCHNAME}" to create an exact copy and then fit the convention.
That being said, your branch is documentation, so we could just force merge it for now.
We could also change the workflow file mentioned in the ticket to allow "documentation/whatever" to be a viable option for branch naming conventions if that's ok with @j4qfrost


[Azure.Messaging.EventHubs] Prepare for release

Prepare for release of Azure.Messaging.EventHubs 5.12.0

API change check
API changes are not detected in this pull request.


fix 2 XSS vulns

This fixes a vulnerability in our editor and removes the use of dangerouslySetInnerHTML per #340 ... Created #341 to make things look nicer after this is merged.

:dancer:


Backdoor-apk + Ngrok tcp + msfconsole not working!

Hi, i've just created a infected app with backdoor-apk and it decompilation and compilation it's all right, but when i try to connect the backdoor with msfconsole says was not created, when the apk has been already executed by the android.
I hope yo can help me with this trouble, because i don't have any idea what's going bad.
Love u and kisses, amazing backdoor creation tool.

@vaerda Apologies but there's so much that could be going on here that I cannot fully troubleshoot or support. Create a version with an easily verifiable communication channel to rule out Ngrok or other network issues.


Should placecontext drop "context" from its name?

What are the schemas that are affected by the issue
placecontext
What are examples of products that are impacted by the issue
Unified Edge Gateway
Data Platform Web SDK
Possibly others
The placecontext schema seems to be the only context schema with "schema" in its name. This makes it inconsistent when residing alongside other contexts. This inconsistency is cascading through to APIs exposed by the Unified Edge Gateway and any SDK that use the gateway, among other things. Is this intentional or an oversight? Can/Should we change it?

Nevermind, I see that there's already a place context and I think I understand the difference between place and placecontext.


CentOS 9 stream is not able to find packages

What happened:
CentOS 9 stream is not able to find following packages:
 DynamicRM  devices.chrp.base.ServiceRM rsct.opt.storagerm rsct.core rsct.basic rsct.core

What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

pvsadm version (use pvsadm version):
Environment - On-Prem or IBM PowerVS:
OS (e.g: cat /etc/os-release):
Kernel (e.g. uname -a):
Others:

Ran into this issue recently, looks like the ibm-power-repo providing the missing packages doesn't support Centos 9 yet.
More info - https://www.ibm.com/support/pages/service-and-productivity-tools

Ran into this issue recently, looks like the ibm-power-repo providing the missing packages doesn't support Centos 9 yet. More info - https://www.ibm.com/support/pages/service-and-productivity-tools

@Amulyam24 can you please follow up with those folks and raise an issue to fix this issue?


DPIR Support.

Hi,
Any plans on supporting DPIR for denoising.
https://github.com/cszn/DPIR
Also, the model(s) link for KBNet is dead.
Thank you!

Sure!

Also, the model(s) link for KBNet is dead.

Yikes. Thanks for reporting. I made a PR to fix this. In the meantime, here's the correct link.

This is beyond the scope of this issue, but any idea when 0.2.3 will be released with the new features and bugfixes?

Once we get the release flow working for the new split registry packages, we will release 0.3.0.


Scrolling option for flashcards

There is no scrolling option in flashcards for large notes.

Hello,
How large are the cards you're creating?
Can you please post a sample?

Hello,
How large are the cards you're creating?
Can you please post a sample?

Hi! Of course.
Here is the example.

from a note.

I'll reiterate what I've said in the #31 issue.
I think the reviewing-entire-notes workflow is more suitable for this (described here). A card this big isn't really a flashcard.


started implementing additional and status data packing

Description
Started implementing packAdditionalData and packStatusData in writer.cpp
Additional Info
Goal is to pack entire (relevant) central data structure from data.hpp. Maybe will combine crucial, additional and status data in the future but for now just getting it packed.
packStatusData says it's not editable, but I edited anyway. Only reason it's marked as not editable is because of the GUI, which expects a certain input from the status data I believe. But that can be fixed once we're actually sending all the data we want.
TODO

[ ] Add tests for JSON serialising and deserialising

Codecov Report

Merging #84 (99978fa) into master (45443c3) will decrease coverage by 1.05%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
- Coverage   30.36%   29.31%   -1.06%
==========================================
  Files          72       72
  Lines        3791     3886      +95
==========================================
- Hits         1151     1139      -12
- Misses       2640     2747     +107

Impacted Files
Coverage Δ

src/telemetry/writer.cpp
15.00% <0.00%> (-13.58%)
:arrow_down:

src/utils/io/can.cpp
29.57% <0.00%> (-16.91%)
:arrow_down:

Continue to review full report at Codecov.

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

Have you tried running this? I doubt this works.

Have you tried running this? I doubt this works. You'll have to call json_writer_.StartObject somewhere. Right now you're just adding the contents of the battery struct to the array consecutively, instead of adding separate JSON objects for each struct.

I'm pretty sure it would work because this is how the rest of the data points are being added. StartObject is called by start in sendloop.cpp, then all the pack functions are called, and inside them add is used to add stuff.
Anyway, I've rewritten it so that there is an add overload specifically for the BatteryData struct, so each one is its own json object. This approach doesn't really seem aligned to what the rest of the code is doing, because other structs don't really have their own add overloads, add is just used to add every one of their individual fields, which is what I was doing for BatteryData before. On the other hand, even though it's not how the others do it, this might be the best approach for BatteryData specifically because it's the only case where we have structs in a list.
Let me know what you think.

I've written a test file but the headers have red squiggles under, cannot open source file "telemetry/writer.hpp" etc. Tried building it but still same issue. What do I need to do to make it find the headers?

I've written a test file but the headers have red squiggles under, cannot open source file "telemetry/writer.hpp" etc. Tried building it but still same issue. What do I need to do to make it find the headers?

@MiltFra

I've written a test file but the headers have red squiggles under, cannot open source file "telemetry/writer.hpp" etc. Tried building it but still same issue. What do I need to do to make it find the headers?

@MiltFra

Does it compile? try <telemetry/writer.hpp> instead.

I've written a test file but the headers have red squiggles under, cannot open source file "telemetry/writer.hpp" etc. Tried building it but still same issue. What do I need to do to make it find the headers?

@MiltFra

Does it compile? try <telemetry/writer.hpp> instead.

Yeah I tried <> instead of "", no difference. Yes it complies. Maybe it's just Intellisense? I'll push so you can check

@MiltFra I need to pass data to Writer but not sure how to get it in the file. In other files like sender.cpp it's being done in the constructor. How do I go about that? (Writer takes data::Data in its constructor)

@MiltFra I need to pass data to Writer but not sure how to get it in the file. In other files like sender.cpp it's being done in the constructor. How do I go about that? (Writer takes data::Data in its constructor)

I don't think there's any point in doing that. Just remove it from the constructor and initialise the field with data::Data::getInstance().

@MiltFra I need to pass data to Writer but not sure how to get it in the file. In other files like sender.cpp it's being done in the constructor. How do I go about that? (Writer takes data::Data in its constructor)

I don't think there's any point in doing that. Just remove it from the constructor and initialise the field with data::Data::getInstance().

Not sure what you mean. Check if what I've done now is okay: const auto data_ = &hyped::data::Data::getInstance(); and than passing *data_ to Writer. Or should I just pass data::Data::getInstance() to Writer every time?


Add GitLab as CI aswell

GitLab also offers CI runners for public and private repos.

Thanks for the contribution!


some questions with gitlab collectors

Hi team,
I have some questions when I use gitlab collectors.I get the latest code，and the version of gitlab-scm-collector.jar is 2.0.5-SNAPSHOT。My application.properties is as follows：

But there are errors in the log as follow：

I checked it many times and didn't find the reason. Then I tried to replace the jar version , using gitlab-scm-collector-2.0.4-SNAPSHOT, which worked.Application.properties has not changed.

The log is normal,and the data was also collected. But it only took effect in the first TeamDashboard. When I created a new TeamDashboard, I filled in the new gitlab repository address, but it didn't take effect. The data displayed was always the first gitlab repository.This is strange, I restarted the service, but it did not work.
Please help me find a solution!

@Piaoyzma : Can you please check if your second repository is enabled in the database?
Check in "collector_items" collection where "options.url" = the repo url you provided.

@Piaoyzma : Wanted to touch base and check if you were able to followup on our last conversation?

@subodhbattina Sorry, I missed the reply. I checked out mongodb, I didn't find the reason, probably because I was not familiar with mongodb. I will take the time to try again, the problem is closed first, thank you very much for your reply.

Hi. I've error 401 unauthorized.. I think because of gitlab host url as I'm using internal repo. could u provide me the sample?


Remove repo.scala-sbt.org and repo.typesafe.com from boot resolver

This was originally proposed by @mkurz as https://github.com/sbt/sbt/discussions/7174#discussioncomment-8286560.

IMHO for 2.0 it should be considered to drop the deprecated repo.scala-sbt.org and repo.typesafe.com repos.
Within the last weeks I helped migrating more or less all missing sbt plugins/projects to maven central. I can now build and test Play, Pekko, Akka and even sbt itself with having repo.scala-sbt.org and repo.typesafe.com blocked in my /etc/hosts (and of course having any local artifacts of those repos deleted in my local coursier and even ivy cache).
People can still add the repos themselves if needed, but I doubt when using sbt 2 you will need that repos anymore.
I think we should make clear that you should not use that repos anymore. I think it's better to cut off those repositories sooner rather than later.

notes on sbt 0.13 support
Given that sbt 0.13 artifacts are hosted on repo.scala-sbt.org, we should create a new directive bootOnlyZero in addition to current bootOnly directive:
   sbt-maven-releases: https://repo.scala-sbt.org/scalasbt/maven-releases/, bootOnly
   sbt-maven-snapshots: https://repo.scala-sbt.org/scalasbt/maven-snapshots/, bootOnly
   typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
   sbt-ivy-snapshots: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly

If possible, this would allow the user to resolve sbt 0.13 automatically while using the new launcher.

Among the other reasons to do this, there's performance: queries those resolvers takes time.
I think this change would be fair game for sbt 1.10.

On top of that, I also suggest to print warnings whenever these methods are being called:
  private[sbt] def typesafeRepositoryRoot(secure: Boolean) =
    (if (secure) "https" else "http") + "://repo.typesafe.com/typesafe"
  // TODO: This switch is only kept for backward compatibility. Hardcode to HTTPS in the future.
  private[sbt] def sbtRepositoryRoot(secure: Boolean) =
    (if (secure) "https" else "http") + "://repo.scala-sbt.org/scalasbt"

And/or deprecate following methods:

https://github.com/sbt/librarymanagement/blob/54011d5e74335bab229bc3f6532b6a1ca6d0d5cd/core/src/main/scala/sbt/librarymanagement/ResolverExtra.scala#L153-L158
https://github.com/sbt/librarymanagement/blob/54011d5e74335bab229bc3f6532b6a1ca6d0d5cd/core/src/main/scala/sbt/librarymanagement/ResolverExtra.scala#L147-L152

btw, I totally cut off Play from those repos now:

https://github.com/playframework/.github/pull/76 (this PR blocks the repos in our globally used reusable workflows)

I have this sort of working on my laptop (see also https://github.com/sbt/launcher/pull/103), and I'm not 100% sure if this would be a good thing or a bad thing overall.
The user would get something like this:
$ java -jar $HOME/work/sbt-modules/sbt/launch/target/sbt-launch.jar
[info] welcome to sbt 1.10.0-SNAPSHOT (Azul Systems, Inc. Java 1.8.0_352)
[info] loading settings for project global-plugins from idea.sbt,pgp.sbt,plugins.sbt,vimquit.sbt ...
[info] loading global plugins from /Users/xxx/.sbt/1.0/plugins
[info] loading settings for project foo-build from plugins.sbt ...
[info] loading project definition from /private/tmp/foo/project
[info] Updating
[info] Resolved  dependencies
[warn]
[warn] 	Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn] 		com.eed3si9n:sbt-assembly:0.15.0 (sbtVersion=1.0, scalaVersion=2.12)
[warn] 		com.eed3si9n:sbt-vimquit:0.1.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn] 	Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.eed3si9n:sbt-assembly;sbtVersion=1.0;scalaVersion=2.12:0.15.0
[error]   Not found
[error]   Not found
[error]   not found: /Users/xxx/.ivy2/local/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/0.15.0/sbt-assembly-0.15.0.pom
[error] Error downloading com.eed3si9n:sbt-vimquit;sbtVersion=1.0;scalaVersion=2.12:0.1.0
[error]   Not found
[error]   Not found
[error]   not found: /Users/xxx/.ivy2/local/com.eed3si9n/sbt-vimquit/scala_2.12/sbt_1.0/0.1.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/eed3si9n/sbt-vimquit_2.12_1.0/0.1.0/sbt-vimquit-0.1.0.pom
[error] 	at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:344)
[error] 	at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:313)
[error] 	at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] 	at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:313)
[error] 	at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] 	at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:60)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:134)
[error] 	at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:74)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:147)
[error] 	at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:147)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:128)
[error] 	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error] 	at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:161)
[error] 	at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3800)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] 	at sbt.Execute.work(Execute.scala:292)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:750)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.eed3si9n:sbt-assembly;sbtVersion=1.0;scalaVersion=2.12:0.15.0

Note here that sbt-vimquit is a global (machine-wide) plugin that I have configured. This can also be some older plugins for IDE etc. The fix would be to add resolvers, but I am starting to worry this could be something a new user can easily hit and won't be able to fix on their own, even if we printed better error messages.

How about if only a single command-line flag was enough to add the extra resolvers?


Write a decorator like np.vectorize to make a DataArray functions handle Dataset objects

For example, suppose I write a function to compare two DataArrays. I should be able to decorate it with something like xray.vectorize so that it now automatically handles Datasets by looping over data variables (of course, it should still work just fine when one or more arguments is a DataArray).
This will make it easier for users to extend write functions to manipulate xray objects in their own code.

This might still be useful, but the use-cases are less clear now that we have apply_ufunc.