Get a result out of a plan

#876 prompted discussion about establishing a pattern for letting plans return some result for interactive use. This has come up only incidentally on the NSLS-II floor so far. We have employed various works arounds such as:

just printing the result (obvious losing programmatic access to it -- bad!)
stashing it in RE.md (mixes abstractions badly, and requires the plan to hold a ref to the RunEngine instance)

This might be the way to go:
import bluesky.plans as bp
import inspect

class Foo:
    """
    Perform a scan and collect the readings (in leui of some interesting analysis.)
    """
    def __init__(self):a
        self.result = None

    def __call__(self, *args, **kwargs):
        result = []
        ret_val = None
        for msg in bp.scan(*args, **kwargs):
            if msg.command == 'read':
                reading = yield msg
                result.append(reading)
            else:
                ret_val = yield msg
        self.result = result
        return ret_val
    __call__.__signature__ = inspect.signature(bp.scan)

from bluesky import RunEngine
from ophyd.sim import motor, det  # apologies -- this uses work currently in progress in ophyd
RE = RunEngine({})

foo = Foo()

RE(foo([det], motor, 1, 5 ,5))
foo.result  # has a bunch of collected data -- but this could an analysis result

Perhaps even a method of a class?  Such as a stage that has default settings when tuning?
class SomeStage(device):
# ...
# motor, detector, min_step are set by other methods
def tune(start, stop):
yield from tune_centroid([self.detector], self.detector.name, self.motor, start, stop, self.min_step)
self.centroid = motor.read()[motor.name]["value"] # replace with Tom's suggested revision

Device methods that return plans are an interesting direction to explore. Currently there are zero examples of this.

I am :+1: on devices knowing how to create plans using them selves.
Some quibbles about how much state the device should store vs how much should be passed in and what the scope of what the SomeStage device owns should be.

I have been thinking about this and have started to think we should stash the uids on an RE property and let the plan return what ever it wants.
It is a pretty big API change, but I have not seen the return from RE() being used except in a few cases where it would be better handled by a callback on the RE or by capturing the uids returned by the start message.

Interesting. For what it's worth, I do make use of
uid = RE(...)
db[uid]

widely in tutorials and examples, but I agree that anecdotally that uptake by users does not seem to be high. Using db[-1] some future db[RE.uids] would be fine too.
It does seem like
result = RE(...)

and
def overnight():
    result1 = yield from plan1(...)
    print(result1)
    result2 = yield from plan2(...)
    print(result2)

RE(overnight())

would be popular and nice to have.

What about the following scenario?
def overnight():
    result1 = yield from plan1(...)
    result2 = yield from plan2(...)
    return result1, result2

result1, result2 = RE(overnight())
# do some stuff with result1 and result2 interactively

Yep, I agree that is a better version of overnight.
I think the take-away message is: by allowing plans to return anything they want (as opposed to standardizing on uid(s), as we currently do) plans can straightforwardly return results (1) for use by other sub-plans (2) through RE.__call__ back to the user.

Do we have any rules on what plans return right now?  I think we can do @danielballan 's version of overnight right now.  The RE just ignores the return value and returns the uids from __call__ instead.

I would be interested in feedback on this latest proposal from @prjemian @teddyrendahl @ZLLentz. To summarize:
Current situation

RE(plan(...)) always returns the uid(s) of the RunStart documents emitted while executing plan. If plan happens to be a coroutine, it has a final return value, but that value is swallowed/ignored by the RunEngine. RE() always return the RunStart uids, regardless of what the plan returns.
By convention, plans that generate runs return the uid of that run, which can be used internally in multi-run plans, such as:def plan():
    yield from close_shutter()
    dark_uid = yield from count(...)
    yield from open_shutter()
    light_uid = yield from count(..., md={'dark_frame_run_uid': dark_uid})

Proposal

RE(plan(...)) will return whatever the plan returns, if the plan is a coroutine. If the plan is a list or some other iterable, RE() will return None.
Plans will be allowed to return other objects, such as fit models, as appropriate to their purpose.

Advantages

This gives users a natural way to get results out of plans: result = RE(plan(...)
For use cases where returning uids is still useful, it is still supported. (The dark frame example above will still work as is.) We are just making other usages possible by letting the plan decide what ultimately gets returned to the user through RE().
This is not a drastic change. Plan stubs already return a variety of objects: abs_set return a Status object; open_run returns a uid string; etc. The convention we propose relaxing here only ever applied to plans that created a run, and it was not enforced by any technical means.

I'm 100% on-board with having the RE return the plan result.
To compensate, perhaps LiveTable should be made to print the uids along with the tables? I imagine there are use cases for grabbing these uids interactively.

A edge we will have to deal with is that currently __call__ returns the uids collected so far, so if you pause it, it will return something (maybe an empty list).  If we start returning the return value of the plan then we can not do this.  I think this is ok and will mostly break people who are using RE inside of for-loops so I don't feel too bad.

And you get back the same information again anyway when you call RE.stop() (or similar).

Actually, re-considering my comment from May, when you interrupt the RE we now raise so we can avoid having to return anything.  The issue @danielballan points out is still a problem, when you call stop() the plan may not gracefully exit, hence has no return value we can recover (but we should check to see if it did catch the exception and return instead.   Probably just return None otherwise?


Checkbox in to-do list items doesn't update correctly

Bug Summary:
When marking a task as 'complete' through the calendar view, the checkbox in the list view is not filled.

Steps To Reproduce

Create a task
Open the list view
Mark the task as complete by clicking on the task in the calendar
Observe

Expected behaviour
When a task is marked as complete in the calendar view, the corresponding item in the task list has its checkbox filled.
Observed Behaviour
When a task is marked as complete in the calendar view, the corresponding item in the task list does not have its checkbox filled.
Screenshots

Environment

Version: 9fab8f0
Operating System: Windows/Arch Linux
Browser (if any): Firefox v69

Additional Information:
Stack Traces
N/A
Test Cases
N/A
Code Examples
N/A
Error Reports
N/A
Other
N/A

This is potentially caused by #250 so we will have to wait till that is fixed before work can begin on this.

ill investigate


Add getTradeListSize, getTradeList

getTradeList -> get list of maps (sell : itemStack, buy1 : itemStack, buy2 : itemStack(or AIR) )
getTradeListSize -> get Size of trade list
tested in 1.18.1  & 1.17.1 server env(arucas not updated, it does not boot with gson)

not ready : I'll tweak clearTrade function so that it can throw when player inventory is full for external reasons

Done

todo ++ : get villager level and xp

Finished testing in 1.16.5


Ensure index entry components are within bounds

It turns out os.stat doesn't make any guarantees about the size of its results. In particular, after I upgraded to the macOS High Sierra beta, my fudge clones have been failing:
(venv) kahekkass ~/Code/bovarysme$ fudge clone https://github.com/bovarysme/whisper.git
Cloning into 'whisper'
Discovering refs and downloading a pack file
Parsing the pack file
Writing objects to disk (92/92)
Setting HEAD to 529f393
Checking out 529f393
Traceback (most recent call last):
  File "/Users/kivikakk/Code/bovarysme/fudge/venv/bin/fudge", line 11, in <module>
    load_entry_point('fudge', 'console_scripts', 'fudge')()
  File "/Users/kivikakk/Code/bovarysme/fudge/fudge/cli.py", line 128, in cli
    cmd_clone(args.repository, args.path)
  File "/Users/kivikakk/Code/bovarysme/fudge/fudge/commands.py", line 69, in cmd_clone
    read_tree(commit.tree)
  File "/Users/kivikakk/Code/bovarysme/fudge/fudge/tree.py", line 117, in read_tree
    write_index(index)
  File "/Users/kivikakk/Code/bovarysme/fudge/fudge/index.py", line 165, in write_index
    builder.set_u4(entry.ino)
  File "/Users/kivikakk/Code/bovarysme/fudge/fudge/parsing/builder.py", line 64, in set_u4
    self.pack('!I', value)
  File "/Users/kivikakk/Code/bovarysme/fudge/fudge/parsing/builder.py", line 33, in pack
    value = struct.pack(fmt, *args)
struct.error: 'I' format requires 0 <= number <=<PHONE_NUMBER>
(venv) kahekkass ~/Code/bovarysme$

The st_ino value was<PHONE_NUMBER> — I'm guessing APFS has something to do with it. Core Git doesn't care about this at all — it always just stored the values as uint32_t and so only took the low 32 bits.  This is called out directly in read-cache.c:
/*
 * dev/ino/uid/gid/size are also just tracked to the low 32 bits
 * Again - this is just a (very strong in practice) heuristic that
 * the inode hasn't changed.
 *

So I just mask off anything above 32-bits here. The test fails on current master on my machine, but the inode value isn't going to predictably fail, so the ugly monkeypatch to force result.st_ino > 2**32 is in there 😥

Wow, good catch! I'm also masking off st_uid, st_gid and st_size, just in case someone ever wants to check-in 4 GiB files.
Thanks a lot! :purple_heart:

You're welcome! 💜
Ohh, good thinking, somehow that didn't occur to me! Thanks for cleaning up my style too; I need to get my pep8/pyflakes vim integration going again ..


guard ATTR_GDBFN against redefinition as all the other #defines

We should guard ATTR_GDBFN against redefinition like the other defines to make it possible to set them in the Makefile, thus we do not have to change the gdbstub-cfg.h at all.

Merged, thanks for contribuing!


Add GenericWith to support summoning an instance of a type class for a Repr type simultaneously with the Generic.

I can't remember exactly what motivated this ticket, but the typelevel CPS that we have in Generic1 etc. probably qualifies as covering this. In shapeless 3.0 this will be generalized, so I'm going to declare victory on this as close it.


Basic test for CWL

This brings in a basic test for a toy CWL workflow.

AP: add ruff docstring checking


Repo structure

Hi everyone,
First of all thank you Ania for this repo and all of you for your contributions!
What would think if we organize this repository and create a Lesson based folder structure for the course?
For example we could create a folder for each lesson an a structure similar to this:
Lessons
    Lesson 1
       ---readme.ME
    Lesson 2
       ---readme.ME

or a more deeper structure like
Lessons
   Lesson 1
      ---1.1
          ---readme.ME
          ---resources.ME
          ---examples.ME
      ---1.2
          ---readme.ME

...
Looking forward to your feedback!
Regards,
Alexandru

We were talking about the Promises being tighter related to the Service Workers, as maybe some not-so-advanced students would have difficulties finding where Promises related resources are (atm in Further Learning).
Also, we should take up Ania's idea to structure Further Learning into JS / HTML / CSS topics as it would be more clear.
But what do you think of a Lesson 0: Prerequisite for the course ( we'd include promises there )?

I don’t know because right now we don’t have that much material and we already divided everything into lessons. Each sub lesson (1.1) is usually only a short video 2-5 min or an exercise. We can just add headers to the README.md and add them below

What about Lesson 0 ?

@alexandrufulop  I think deeply nested folder structures are not relevant for the majority. We work with linked markdown files and it brings no value to users because they rather view the repo then clone it.

What I was suggesting was a better root structure of the git.
I think the folders would be more relevant if their names would be prefixed with the Lesson number like:
L1-Introduction
L2-OfflineFirst
L3-ServiceWorker
...

but again everyone has his own logic...
The first lessons are basic, but later on things change...

@alexandrufulop Right now, the structure is already very similar:
Lesson 1: Introduction
Lesson 2: Offline First
Lesson 3: Service Worker

As our current naming convention is quite similar to one proposed by you @alexandrufulop I think that we can close this discussion.
But thank you for your suggestion Alexandru! Keep on rocking! 🎉 🎉 🎉


[FEATURE] Landing Page Design

Is your feature request related to a problem? Please describe.
I’m always frustrated when landing pages for decentralized platforms are overly complex and difficult to understand. Users often find it challenging to grasp the concept and benefits of using the platform at first glance, which can lead to lower engagement and adoption rates.
Describe the solution you'd like
I would like a clean, intuitive landing page that clearly explains what SolShare is, how it works, and the benefits of using it. The design should include sections for user testimonials, a quick overview of the token system, and clear calls to action for creating an account or learning more. Additionally, integrating visual elements that convey the decentralized nature of the platform, such as graphics related to the Solana blockchain, would enhance understanding.
Describe alternatives you've considered
I have considered creating a more traditional landing page with a focus on detailed text and technical specifications. However, this might overwhelm potential users. Another alternative could be a single-page application with interactive elements, but this might require more development effort than I can provide, as my focus is on frontend design only.
Additional context
The target audience for SolShare includes tech-savvy users interested in decentralized platforms, as well as casual users looking for new social media experiences. Including visuals that represent user engagement and community interaction can help build trust. Utilizing Next.js, we can ensure fast loading times and responsiveness. A modern design aesthetic with vibrant colors and engaging visuals would also appeal to our user base.

please add gssoc and level label too.

please add gssoc and level label too.

This project was not selected for gssoc-ext


updated tutorials.rst

New tutorial for 10x Genomics Xenium data

Codecov Report

Merging #615 (612ab79) into main (90ac001) will decrease coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #615      +/-   ##
==========================================
- Coverage   72.54%   72.52%   -0.02%
==========================================
  Files          36       36
  Lines        5060     5060
  Branches      921      915       -6
==========================================
- Hits         3671     3670       -1
  Misses       1146     1146
- Partials      243      244       +1

Impacted Files
Coverage Δ

squidpy/im/_io.py
66.42% <0.00%> (-0.72%)
:arrow_down:


Add first-timers-only badge to README

Lets add a first-timers-only badge to the README to advertise that those issues exist:

Add the following markdown next to the other badges in README.md (make sure you add a space between them)
[![first-timers-only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](https://www.firsttimersonly.com/)

I would like to take this.


Disable placeholders selection backgoundColor in date range between months

Hi, how can i disable placeholder background color while selecting date range, which starts in one month and ends in the next month? I need to disable only backgroundColor, placeholders must be shown Thanks

Not supported.

Will it be supported in the future?

you can hide the placeholder  @Gurbo

@Gurbo
How can we change the background color while selecting date range.
Can you provide some code.

@Gurbo how can I set the background color for other dates ?

Closing this as DIV is fully supportive now. Thanks.


change "requireDynamic" call to just "require"

looks like the "requireDynamic" method's been deprecated; throws an explicit "not defined" exception now.  Just changing the method name to "require" instead resolves the issue, though

requireDynamic -> require does the trick! Thanks alanchines.

Hi, Do you like to send a PR?

I created a PR

sorry I missed the ask for pull request (I'm afraid my github mail goes to a fairly cluttered inbox) - glad that'd been of use, tho :-)

See https://github.com/arjun024/facebook-friends-ranking-score/pull/4


HHH-17167 Unable to locate parameter for RESTRICT - DELETE error when removing entity with RowId

https://hibernate.atlassian.net/browse/HHH-17167

They require some changes in HR because the signature on some methods as change, it should be fine but I haven't try to fix the compilation errors yet.
I will do it today and let you know

@DavideD tanks for checking, just for context the signature changes were needed to clear up the default delete behavior when a @RowId is available. Before, the static delete operation built at boot time used the primary key, while whenever a row-id was available we always built a dynamic delete. Since the row-id case is the most common and should be the default, the operations have now been switched, which is also consistent with what we already did for updates.


Replace mapnik with sharp for SVG rendering

Replace spritezero with the (just-released) sprites, which uses the
same shelf-pack logic but uses sharp for SVG rendering, which has
the advantages of:

Provides binaries for several platforms (windows, macos, linux,
linuxmusl) and architectures (arm64 and x64) - Fixes #132.
Compiles without a fuss on other platforms (e.g. 32-bit linux arm),
unlike mapnik which is, shall we say, large.
Seems to render certain SVGs more correctly than mapnik. I haven't
prepared a gallery, but there were obvious fixes in  the area of
antialiasing and downsampling. Of note, mapnik was inflating the
stroke width in star_state_capital.svg and dot_city (if we liked those,
we should adjust the stroke width in the actual icon). There are minor
changes to dimensions due to rounding:

$ curl -fs https://zelonewolf.github.io/openstreetmap-americana/sprites/sprite.json | jq -c .shield40_us_oh_tus_salem
{"height":19,"pixelRatio":1,"width":25,"x":283,"y":61}
$ <style/dist/sprites/sprite.json jq -c .shield40_us_oh_tus_salem
{"width":25,"height":20,"x":85,"y":221,"pixelRatio":1}
$ head -n1 style/icons/shield40_us_oh_tus_salem.svg
<svg width="25" height="19.999" version="1.0" xmlns="http://www.w3.org/2000/svg">

As a result, the entire sprite sheet looks different, so a comparison is
full of noise, but efforts to align SVGs to a pixel grid can be more
useful now.

I'm not sure if this is specific to the branch, or it's systemic elsewhere since mapnik on FreeBSD is HARD to make work, but I get a plugin is not a function when trying to build .....
[darcy@getlost-02 ~/src/github.com/ZeLonewolf/openstreetmap-americana/style]$ npm run build

><EMAIL_ADDRESS>build
> run-s clean sprites build:code taginfo status_map

><EMAIL_ADDRESS>clean
> rm -rf dist .parcel-cache

><EMAIL_ADDRESS>presprites
> rm -rf dist/sprites

><EMAIL_ADDRESS>sprites
> node scripts/sprites.js

><EMAIL_ADDRESS>build:code
> parcel build index.html --public-url ./

🚨  /usr/home/darcy/src/github.com/ZeLonewolf/openstreetmap-americana/style/search.css:undefined:undefined: plugin is not a function
    at LazyResult.run (/usr/home/darcy/src/github.com/ZeLonewolf/openstreetmap-americana/style/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:288:14)
    at LazyResult.asyncTick (/usr/home/darcy/src/github.com/ZeLonewolf/openstreetmap-americana/style/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:212:26)
    at /usr/home/darcy/src/github.com/ZeLonewolf/openstreetmap-americana/style/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:254:14
    at new Promise (<anonymous>)
    at LazyResult.async (/usr/home/darcy/src/github.com/ZeLonewolf/openstreetmap-americana/style/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:250:23)
    at LazyResult.then (/usr/home/darcy/src/github.com/ZeLonewolf/openstreetmap-americana/style/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:131:17)
ERROR: "build:code" exited with 1.

Both npm start and npm run build worked for me out of the box, and the map looks right. @dBitech did you run an npm install before testing?

Yes

At any rate, your comment indicates that you were able to run sprites successfully, so that's great. I also tested this on darwin-arm64, linux-arm64, and linux-arm.
There are actually two native dependencies, sharp is the nodejs bindings to libvips.

Certain platform have a libvips binary and need a sharp binary built. This includes linux armv7 glibc. It's quite easy and only needs g++, make, python3. You might not even notice.
Certain platforms require building a libvips binary yourself. This includes linux armv7 musl, and freebsd. It's a lot more complicated.

Figuring out parcel on freebsd is a separate issue of course — we might look into esbuild which supports many platforms (nice thing about Go), and even has a WASM mode that can run anywhere that Node can, albeit more slowly. Our build is quite simple and shouldn't be "too hard" to port.

I think so, yes.

Yes this is a fair assessment that sprites is good on FreeBSD, and the issue is an unrelated parcel one. so we can disregard my noise on this.

Unclear exactly what you mean. Washington seems pretty close if you ask me.

None of the changes are intentional, we're using a different SVG renderer, so there are pixel differences just about everywhere. The only issue I'm aware of that's visibly different is the stroke width on the star and circle.

upgrade to sprites 6.28.1

Ah, it's identical actually https://github.com/linz/basemaps/blob/master/packages/sprites/CHANGELOG.md#6281-2022-06-07


Fix label counts for video datasets in the App

What changes are proposed in this pull request?
Label counts are not computed on develop for video datasets . This fixes that.
Introduced by https://github.com/voxel51/fiftyone/commit/114351f1a38a96143cb631eb3215a0ec90138bac.

How is this patch tested? If it is not, please explain why.
Locally.
Release Notes
Is this a user-facing change that should be mentioned in the release notes?

[x] No. You can skip the rest of this section.
[ ] Yes. Give a description of this change to be included in the release
notes for FiftyOne users.

Seems to also occur on release-notes, so this will need to be merged into that too.
I'm getting this error when selecting a label under "add label" in the filter widget, or unchecking the "no confidence" option.
Traceback (most recent call last):
  File "/fiftyone/server/main.py", line 108, in wrapper
    return func(self, *args, **kwargs)
  File "/fiftyone/server/main.py", line 197, in on_update
    state
  File "/fiftyone/core/state.py", line 175, in from_dict
    return super().from_dict(d, **kwargs)
  File "/fiftyone/core/state.py", line 128, in from_dict
    **kwargs
  File "/fiftyone/core/state.py", line 160, in __init__
    fos.ViewStage._from_dict(stage_dict)
  File "/fiftyone/core/collections.py", line 392, in add_stage
    return self._add_view_stage(stage)
  File "/fiftyone/core/view.py", line 371, in _add_view_stage
    stage.validate(self)
  File "/fiftyone/core/stages.py", line 496, in validate
    sample_collection.validate_fields_exist(self.field)
  File "/fiftyone/core/collections.py", line 277, in validate_fields_exist
    raise ValueError("Field '%s' does not exist" % field_name)
ValueError: Field 'frames' does not exist

I cannot reproduce the above. Is this from a quickstart, something else?

I can't reproduce it with the video quickstart, but I can reproduce it with a test video dataset with:
for sample in dataset.iter_samples():
    for i in range(1, 50):
        # sample.frames[i] = fo.Frame()
        sample.frames[i]["box"] = fo.Detection(
            label="foo",
            bounding_box=[i/100, i/100, 0.9, 0.9]
        )

I'm not sure what the difference is.
This is a server error, by the way.

Looks like it was introduced between 652cd70 and d3c048c
https://github.com/voxel51/fiftyone/compare/652cd70...d3c048c

Thanks, I'm seeing an issue with fo.Dataset.from_videos_dir() as well.


biotool-c not handling empty file correctly

Peter - need to figure out kseq diffs between empty file and no file?
$ ./.travis/test-all.sh
Invalid fasta file format 'test_data/empty_file'
Test Failed: c/biotool-c test_data/empty. Expected 'test_data/empty_file    0   0   -   -   -'
There were 1 errors found

The c version now explicitly checks if the file exists but contains no sequences.


Can use etcd instead of zookeeper for marathon to store apps info

When run above 1000 container as apps on marathon,marathon will beacome very slow.
The bottleneck is zookeeper , every app is a node in zookeeper.
If we use etcd to store app, whether it will perform better?
I see that mesos have a issue to use etcd instead of zookeeper, does marathon have the same plan?

give some measure data to prove your words.

@xianlubird

Would be great if you could share some performance data to understand, what slow means. (Use /metrics for example to retrieve metrics data)
Please try out Marathon 0.13.0-RC1 which has a store cache enabled by default.
We do have a pluggable persistent store interface (https://github.com/mesosphere/marathon/blob/master/src/main/scala/mesosphere/util/state/PersistentStore.scala) There is currently no plan of adding etcd, but it should be fairly easy.

Why @xianlubird has closed this ticket?
Maybe if mesos is working on use etcd instead of zk (https://issues.apache.org/jira/browse/MESOS-1806) , it should be a good idea avoid have got the zookeeper just for marathon.

I think Mesos will drop all external dependencies  (ZK and docker)  and will finally implement its own leader election system (source @benh answer on MesosCon EU 2015

We significantly redid the storage layout in ZK - which is very different from leader election (which is what the mesos ticket is about). The backend storage shouldn't be a significant issues after 1.4.
There are currently no plans to add new storage backends or leaderelection backends at this time.

According to the [Roadmap] (https://cwiki.apache.org/confluence/display/MESOS/Roadmap) Mesos will add support for etcd this year.


Feature Request: Add support for DISTINCT when using Count() method

Would be great if its possible to use DISTINCT when using the Count() method.
A use case is discussed here: https://github.com/jinzhu/gorm/issues/853
Since its currently not possible to use DISTINCT with Count(), we will be forced to rewrite the code using a raw query. We will lose the benefits of using GORM's features like Preload() etc...

A possible solution: https://github.com/jinzhu/gorm/pull/1120#issuecomment-239659728
I ended up doing something like:
db.Where("id = ?", id).Select("count(distinct(companies.id))").Count(&companyCount)

Thank you for the above! That worked great. No idea why we cannot get this feature implemented!


Support more languages

For example:

JavaScript (npm) or they would use David.
Python (PyPI) or they would use Requires.IO.

If Depfu is Ruby-only, it is not as outstanding since there is also Deppbot.

Bump.

Closing this in favor of a more general issue: https://github.com/depfu/feedback/issues/38


Protocol methods missing from classes

(There's a bit of related discussion in https://github.com/dart-lang/native/issues/1462, but this is a distinct issue.)
I'm unable to call methods on an object that come from a protocol, even when they are required methods. The concrete case I hit is:
@interface AVAsset : NSObject <NSCopying, AVAsynchronousKeyValueLoading>
...
@end

@protocol AVAsynchronousKeyValueLoading
@required

- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key error:(NSError * _Nullable * _Nullable)outError ...;

- (void)loadValuesAsynchronouslyForKeys:(NSArray<NSString *> *)keys completionHandler:(nullable void (^)(void))handler ...;
@end

In Obj-C code I can then of course call:
[asset statusOfValueForKey:@"tracks" error:nil] != AVKeyValueStatusLoaded

But that method simply doesn't exist on AVAsset in the ffigen output, even though it's an explicit part of the public interface.

Looks like we're bitten by limitations of libclang again. Traversing the children of the interface declaration cursor, I find a CXCursor_ObjCProtocolRef for each of the protocols it implements. But there's no way of getting from the CXCursor_ObjCProtocolRef to the CXCursor_ObjCProtocolDecl. The only information on the CXCursor_ObjCProtocolRef is the name of the protocol (it doesn't even have a usr ID). So the best I can do is look up the protocol by name and throw an error if there's more than one protocol declared with that name. This should cover most of the use cases at least.

Do I need to do something special in my config to pick up the protocol? I synced to the hash with that fix, and still don't have the methods described in the original issue description.

@stuartmorgan No, you shouldn't need to do anything. Can you send me your config? I'll see if I can repro. There might be a second bug here.

My actual repro case is here, but I think this should be the relevant parts (I haven't set up a clean test with this though):
name: Foo
description: Test
language: objc
output:
  bindings: 'ffi_bindings.dart'
  objc-bindings: 'ffi_bindings.dart.m'
headers:
  entry-points:
    - '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h'
exclude-all-by-default: true
objc-interfaces:
  include:
    - 'AVAudioSession'
    - 'AVMutableVideoCompositionInstruction'
    - 'AVMutableVideoCompositionLayerInstruction'
    - 'AVPlayer'
    - 'AVPlayerLayer'
enums:
  include:
    - 'AVAudioSessionCategoryOptions'

Ah ok. The issue is that the protocol is not being included by the config. I think probably the correct behavior here is that protocols that an interface conforms to should always be included in the interface's methods, regardless of the filters (or rather they should go through the same method filtering as ordinary methods). But we should only generate bindings for the protocol itself if the protocol is included in the filter.


no index.js

There is no index.js in the add-in route directory as specified above. There are many in the none_modules folders and there is an index.ts in the function-file folder.
Please advise

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 15be7148-d1e8-b58b-b026-9f072efb638a
Version Independent ID: 53a5d00c-d82b-6536-2e80-3e2a3452879a
Content: Build an Outlook Add-in
Content Source: docs/add-ins/quick-start.md
Product: outlook
GitHub Login: @jasonjoh
Microsoft Alias: jasonjoh

It appears the Office Add-in generator changed pretty significantly since that quick-start was written, so this walkthrough needs to be re-written. @lindalu-MSFT can you get a writer assigned?
@TobyFish when I ran the latest generator, I see a ./src/index.js file. This is with yo 2.0.5 and generator-office 1.1.15.

As @jasonjoh notes, index.js is now in a sub-folder. Apologies for the confusion. The update should go live soon but hopefully this info unblocks you.

@ElizabethSamuel-MSFT Thanks for fixing.

Thanks for the pointers. All I see in that folder is an index.ts, not an index.js, are the two used interchangeably?

@TobyFish It seems like you may be doing a different quick start. Can you share more details about the steps you were followed? Thanks.

this one https://docs.microsoft.com/en-us/outlook/add-ins/quick-start?tabs=visual-studio-code

@TobyFish I think I understand what happened. We provide steps for the script type "Javascript". I believe you ended up selected "Typescript" instead:

Please try the Javascript option to follow along with the tutorial.
Thanks.


Restrict camera angles in 3D viewer

For some 3D viewer use cases the camera angle should be restricted to a certain angle (like prevent the user to view the model from the bottom). Frameworks for iOS like SceneKit and RealityKit allow this and I think SceneView should also allow this easily.

As it's probably something that should be added to Manipulator I created a feature request in https://github.com/google/filament/issues/5451 .

I have wanted the same, and I have a working solution that gets rid of the default cameraManipulator, and allows for single finger camera movement though you may lose any scene interaction as I haven't tested that.
... sceneView.apply {
        // outside of detector so I can use them in scale gesture too.
        var cameraHorizontal=0.0f
        var cameraVertical=0.0f
        var camDistance=1.5f

        gestureDetector.cameraManipulator=null
        gestureDetector.moveGestureDetector = MoveGestureDetector(this@NonARActivity, object : MoveGestureDetector.OnMoveGestureListener {
            var currentX=0.0f
            var currentY=0.0f
            override fun onMove(detector: MoveGestureDetector): Boolean {
                val distX=detector.lastDistanceX
                val distY=detector.lastDistanceY

                val diffX=(distX ?: 0f) - currentX
                val diffY=(distY ?: 0f) - currentY

                cameraHorizontal-=diffX/200f
                cameraVertical=(cameraVertical+diffY/200f).coerceAtMost(HALF_PI-0.01f).coerceAtLeast(-HALF_PI+0.01f)
                camera.transform=genCameraView(cameraHorizontal,cameraVertical,camDistance)
                currentX=distX ?: 0f
                currentY=distY ?: 0f
                return true
            }

            override fun onMoveBegin(detector: MoveGestureDetector):Boolean{
                currentX=0f
                currentY=0f
                return true
            }

            override fun onMoveEnd(detector: MoveGestureDetector) {
                currentX=0f
                currentY=0f
            }
        })
...
fun genCameraView(horizontalAngle:Float, verticalAngle:Float, distanceToTarget:Float): Mat4 {
    val camPos=Float3(
        x = distanceToTarget * sin(horizontalAngle) * cos(verticalAngle),
        y = distanceToTarget * sin(verticalAngle),
        z = distanceToTarget * cos(horizontalAngle) * cos(verticalAngle))
    val targetPos=Float3(0f,0f,0f)
    val up=Float3(0f,1f,0f)
    return lookAt(camPos,targetPos,up)
}

@JohnGilbertson Thanks for your share.
@StevenMohr @grassydragon Does that could help you fix the camera manipulator?

Does that could help you fix the camera manipulator?

It actually replaces the Filament camera manipulator.
If Filament doesn't accept pull request to it, maybe the only solution is to copy the classes from Filament and rewrite the camera manipulator completely in Kotlin while supporting restricting the camera angle.
It is a little be sad that in the beginning we aimed to reuse the existing APIs from Filament, went through the difficulties of implementing everything this way and now we have to copy everything from Filament to be able to fix issues and add missing features.

I've got a solution for doing the restriction using the CameraManipulator.
I can share it when I'm back from vacation. It's basically saving the
camera position and creating a new CameraManipulator whenever the camera is
moved to a forbidden position.
Nikita Zaytsev @.***> schrieb am Fr., 27. Mai 2022,
09:13:

Does that could help you fix the camera manipulator?
It actually replaces the Filament camera manipulator.
If Filament doesn't accept pull request to it, maybe the only solution is
to copy the classes from Filament and rewrite the camera manipulator
completely in Kotlin while supporting restricting the camera angle.
It is a little be sad that in the beginning we aimed to reuse the existing
APIs from Filament, went through the difficulties of implementing
everything this way and now we have to copy everything from Filament to be
able to fix issues and add missing features.
—
Reply to this email directly, view it on GitHub
https://github.com/SceneView/sceneview-android/issues/62#issuecomment-1139349753,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXICR5G53DRTVX6V75K4Z5LVMBYZVANCNFSM5TAMVKGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

ction using
Hello Steven, can you please share your solution

Hey folks,
@StevenMOG
@gabrielazwaat
Was anyone able to solve this?
I need a solution to restrict camera movement on the x and z axis.
Would appreciate any help.


registered name of heat supplier header edit and hint text addition

Closing this only because there's a weird merge conflict happening. I've moved the changes to another branch.


Validate image formats, check if resize_to_po2 failed

This should fix #46480. The main problem was that we resize an image in modules/pvr/image_compress_pvrtc.cpp and assume that it always works. However, the resizing can fail for some formats. I've figured we can fix this in 2 ways:

change the signature of the resize_to_po2 method to return Error instead of void and check that error in modules/pvr/image_compress_pvrtc.cpp to stop the method if the resizing failed
repeat the initial check to see if the conditions that caused the resizing have been fixed and if not, stop the method

Changing the signature seemed like a big step, so I went with the second approach :) Let me know if it's acceptable.
I've also added some checks to make sure that methods like compress are called with proper formats. To do this, I've introduced new values to some enums. Let me know if this is ok or if I need to update some docs as well (the values are not really meant to be used, they just represent the max value, but maybe we want them in the documentation anyway).

Thanks!

Cherry-picked for 3.4.


Terminal inline chat should not have it own menu

Currently, the voice actions have to contribute to the terminalChatInput menu, but all other cases work with the MenuId.ChatExecute, so I wonder why the terminal inline chat is so special that it has its own menu.

Guessing we can switch this now

Starting looking into this. If we use the MenuId.ChatExecute, then we also have to use the submit action here, which doesn't work for us since it uses an editor instead of a terminal. we could add TerminalChatController here 🤔 but that complicates things...
https://github.com/microsoft/vscode/blob/3dc6e72b586b00e96559576c284d2f9474ba222c/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts#L149-L168

It would be nice if we could do this. I couldn't figure out a way given the above.

I see the code has changed since that time , might be possible now
https://github.com/microsoft/vscode/blob/6af39afd7de5470cc52fb5c511fa2ea556b44f25/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.ts#L61-L68


Last update b016a6e...4c5c4f8


Improve documentation/homepage

Use versions in the documentation
Mark incomplete sections in the documentation (e.g. 'This section is incomplete', 'This section requires examples' etc). This way users are aware that it isn't complete, and at the same time potential contributors know how to contribute.
Provide some steps for contributors to contribute properly (i.e. how to build and test the project locally on your pc). I noticed a pull request #2267 where the contributor doesn't know how to make a test. And for me, I know some php and the code base seems to be very clearly written, but I have no idea how to modify and then build the source code again. Adding a small guide (if possible just provide links to existing guides and make remarks for the changes) could really help to make contributing easier.

@jamieburchell @memen45 Thanks for this. I hope I'll find some time to take care of this, because I have the same problems currently setting up a new shopware project 😅

Well, we have new website already. :)


[hmac] Coding style and minor fixes

This PR fixes existing coding style issues in the HMAC RTL from earlier to bring it closer to the current coding style guide. It also adds minor styling fixes for the issues raised in the reviews for the wider digest PR https://github.com/lowRISC/opentitan/pull/21604, and fixes the I/O port suffixes in hmac_core.sv per the coding style per this issue https://github.com/lowRISC/opentitan/issues/21666.  Once the RTL is finalized and coverage is improved via the extended testplan for the new features, we will need to run the UNR analysis anyway again, and the UNR exclusions list will thus be updated with the changed I/O port names.

The CW310 tests failing for this PR are flash_ctrl_info_access_lc_test_unlocked0_fpga_cw310_rom_with_fake_keys and spi_passthru_test_fpga_cw310_test_rom. These seem related to the issue https://github.com/lowRISC/opentitan/issues/22152 (see Tests with similar or related failures).

Thanks @rswarbrick, I've taken care of your comments in my forced push now. I've narrowed down the message_length ports hierarchically until the SHA-2 padding module which is where we need it eventually padded into 128-bit.

This still fails CI tests that are not related to the changes here, @andreaskurth @vogelpi. I believe this has to do with CW310 Test ROM Tests failing issue. I'll push again to trigger CI checks again anyway.

//sw/device/tests/pmod:i2c_host_eeprom_test_fpga_cw310_test_rom fails locally for both this PR and that one https://github.com/lowRISC/opentitan/pull/22331, and they are not related to the changes introduced by the PRs.
@andreaskurth

//sw/device/tests/pmod:i2c_host_eeprom_test_fpga_cw310_test_rom fails locally for both this PR and that one #22331, and they are not related to the changes introduced by the PRs.

Ah, you've been able to reproduce that failure locally with your CW310?

The failing CW310 Test ROM Tests CI check is unrelated to this PR -- merging


FetchData documentation

I've searched until the edges of the Internet to find out how to get an accessToken to call my Azure Function API after being authenticated (Standalone with AAD / code auth flow).
Thinking that Hosted with AAD B2C topic didn't apply to my scenario I never bothered to look here.
Please add this example or a link to it to each of the documentation pages in this Chapter/Topic.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7d682d4c-86b5-c47e-89a3-3684b2235320
Version Independent ID: a80e115c-466a-288d-a918-9ef7514f5add
Content: Secure an ASP.NET Core Blazor WebAssembly hosted app with Azure Active Directory B2C
Content Source: aspnetcore/security/blazor/webassembly/hosted-with-azure-active-directory-b2c.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @guardrex
Microsoft Alias: riande

Hello @23min ... It's already covered (lightly) in each of the standalone topics. For example in the Standalone with AAD topic, it says in the Authentication service support section ...

The Blazor WebAssembly template doesn't automatically configure the app to request an access token for a secure API. To provision a token as part of the sign-in flow, add the scope to the default access token scopes of the MsalProviderOptions:

... with an example.
I admit that the example isn't generic enough, but I'm going to work on that today. Actually, I'll use this issue for the work because I haven't opened an issue yet for it.
It would be more apparent if the text and example were their own sections in these docs, so I'll do that, too.
... AND Those sections should link down to the Request additional access tokens section of the Additional scenarios topic.
Thanks for the comment and suggestions. I'll ping u on the PR.

Thanks! Yes, token retrieval is not automatic, but that's where the reader was left hanging, without any pointers on how to do this :)
Btw when you write these docs, will you also will test this code to verify they work in the sections they document? (It seems that this code does not work in Preview3 for Azure AD code auth flow because the retrieved token is null / similar symptoms to https://github.com/dotnet/aspnetcore/issues/20288 though it could be user error)
Looking forward to the updated docs!

Yes, indeed. I will test ... and also engineering will perform a careful review of the preview docs before the 3.2 release in May to make sure that they agree with everything before the final docs go live. Right now, these docs are under heavy ... almost daily ... revision. They're usually kind'a crappy at this stage ... incomplete 🙈 ... disorganized 🙊 ... unclear 🙉 ... until we massage them into something halfway decent for release. Fortunately, we have about a month to work on them before 3.2 comes out.
However, note WRT testing that I only have time to perform limited testing. A decent test would be for a standalone app to do something simple like a Graph API call. I won't be able to test more specialized use cases, such as an Azure Function. The community of devs will call out, as you did, when things 💥 with the guidance. Everyone wishes that it didn't have to be this way, but we're a small team with 400 topics to maintain! YIkes! 🏃😅

Ok ... well that turned out fine ... I hate to say "as expected" when it comes to anything having to do with security. :smile: lol
I gave my standalone AAD test app permission to get Organization data via Graph API in the portal.
Then ...
options.ProviderOptions.AdditionalScopesToConsent.Add(
    "https://graph.microsoft.com/Organization.Read.All");

... and ...
@page "/organizationdata"
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@inject IAccessTokenProvider AuthenticationService
@inject NavigationManager Navigation
@inject HttpClient Http
@attribute [Authorize]

Organization Data

This component demonstrates fetching organization data from Graph API.

<button @onclick="FetchData">Fetch Data</button>

Token: @_token

Data: @_data

@code {
    private string _data;
    private string _token;

    private async Task FetchData()
    {
        var httpClient = new HttpClient();
        httpClient.BaseAddress = new Uri(Navigation.BaseUri);

        var tokenResult = await AuthenticationService.RequestAccessToken(
            new AccessTokenRequestOptions
            {
                Scopes = new[] { "https://graph.microsoft.com/Organization.Read.All" }
            });

        if (tokenResult.TryGetToken(out var token))
        {
            _token = token.Value;

            httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.Value}");
            _data = await httpClient.GetStringAsync("https://graph.microsoft.com/v1.0/organization");
        }
        else
        {
            Navigation.NavigateTo(tokenResult.RedirectUrl);
        }
    }
}

... :beers: :tada: ...

I'm making the improvements discussed and fixing other little nits.
There's one more thing to take a stab at. The possible reason that I'm having a different experience than Javier is that he was using V2 tokens and I'm using V1. I'm going to try upgrading my app to V2 and see if I can get the full scope URI to work.
Anyway ... PR should be up shortly.


How to extract body from when Content-Type is 'text/html'?

Hello
Please tell me how to get response body in C# when Content-Type is 'text/html'?
I tried to use
.Extract().Body("").ToString()
or
.Extract().Response().ToString();

but it doesn't work
My response semse like this
HTTP 403 (Forbidden)
Content-Type: text/html
Content-Length: 1233
Cache-Control: private
Server: Microsoft
X-AspNet-Version: 4.0.30000
X-Powered-By: ASP.NET
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=300
Date: Thu, 04 May 2023 04:19:52 GMT

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>403 - Forbidden: Access is denied.</title>

Server Error

<fieldset>

403 - Forbidden: Access is denied.

You do not have permission to view this directory or page using the credentials that you supplied.

 </fieldset>

So, there's no 'proper' native support for dealing with HTML response bodies at the moment, but there's a straightforward workaround.
I've included that as an example here: https://github.com/basdijkstra/rest-assured-net/blob/c3ed36dd62eef25cdd7630d9fe2c3ac1b963df06/RestAssured.Net.Tests/ResponseBodyHtmlVerificationTests.cs#L67
All HTML examples can be found in https://github.com/basdijkstra/rest-assured-net/blob/main/RestAssured.Net.Tests/ResponseBodyHtmlVerificationTests.cs
@workmichsem, please let me know if that's acceptable as a workaround for now. I'd like to keep this issue open even if it is, as a reminder that I should work on improving HTML support.

I wish it looked shorter.
However, the current solution completely solves my problem.
@basdijkstra
Thank you very much for your prompt response as always.

You're welcome, @workmichsem. I can't really make it shorter at the moment as I'm working with the .NET built-in HttpResponseMessage type.
But, as I said, I'll update this issue and see if and how I can improve support for HTML responses.

Note to self:

Write a mock that returns an HTML response body
Enable RestAssured.Net to verify HTML response body elements
Enable RestAssured.Net to extract HTML response body elements

@workmichsem I've just committed https://github.com/basdijkstra/rest-assured-net/commit/fbf0b5fc1c7b05b1fd8740f028ad6401c89f8948, would you be so kind as to have a look at https://github.com/basdijkstra/rest-assured-net/blob/main/RestAssured.Net.Tests/ResponseBodyHtmlVerificationTests.cs and see if there's anything you're missing?
I've added HtmlAgilityPack as a dependency, which makes working with HTML content very, very similar to working with XML, as you can tell from the examples. XPath is XPath, no matter if you're working with XML or HTML :)
I still need to add support for extracting HTML response values, but with this commit users can verify them already.

@basdijkstra hello!
Looks great!
Thank you for implementing this feature so quickly.

HTML element extraction added in https://github.com/basdijkstra/rest-assured-net/commit/26d6565f798f3601216e434db6af940d82c779f7. Closing this issue now, I'll release these capabilities in version 2.6.0 later this week.


otIp6Send sends only 4 Bytes of payload over the thread network and need to send more

I am using Thread stack and using otIP6Send command to send and receive data over the Thread network . It is only sending 4 bytes over the Thread network and want to know how to increase the number of bytes or payload to 8 bytes or more.  I define the payload to be 20 bytes and it still only sends 4 bytes over the network. I just need advice on sending more data over the network.
I'm using nrf52840.
 bufferindata[0] = 0x48;
 bufferindata[1] = 0x45;
 bufferindata[2] = 0x4C;
 bufferindata[3] = 0x4C;
 bufferindata[4] = 0x4F;
 bufferindata[5] = 0x0D;
 bufferindata[6] = 0x00;
 bufferindata[7] = 0x00;

Code:
/**@brief Function for initializing the Thread Stack.
*/
static void thread_instance_init(void)
{
thread_configuration_t thread_configuration =
{
.radio_mode        = THREAD_RADIO_MODE_RX_ON_WHEN_IDLE,
.autocommissioning = false,
.autostart_disable = false,
.autocommissioning = true,
};
thread_init(&thread_configuration);
thread_state_changed_callback_set(thread_state_changed_callback);

uint32_t err_code = bsp_thread_init(thread_ot_instance_get());
APP_ERROR_CHECK(err_code);

otIp6SetReceiveFilterEnabled(thread_ot_instance_get(), true);
otIp6SetReceiveCallback(thread_ot_instance_get(), ot_receive_handler, NULL);

}
uint32_t* contructip6add (uint16_t pay_len)
{
static uint32_t header [10];
header[0]=lwip_htonl((((uint32_t)ver)<<28)|(((uint32_t)TRAFFIC_CLASS)<<20)|FLOW_LABEL);
header[1]=lwip_htonl((((uint32_t)pay_len)<<16)|(((uint32_t)NEXT_HEADER)<<8)|HOP_LIMIT);
header[2]=(0xADDEFD);
header[3]=(0xEFBE2);
header[4]=(0xFF000000);
header[5]=(0x00FC0FE);
header[6]=lwip_htonl(0xFF030000);
header[7]=lwip_htonl(0x00000000);
header[8]=lwip_htonl(0x00000000);
header[9]=lwip_htonl(0x00000001);
return header;

}
static void ip_packet_transmit_now(uint8_t bufferindata)
{
uint8_t err;
uint8_t header5;
  header5= (uint8_t*)contructip6add(20);
  otMessage *amessage;
  amessage=otIp6NewMessage(thread_ot_instance_get(), false);

  if (amessage != NULL)
  {

    err=otMessageAppend(amessage, header5, 40);

    err=otMessageAppend(amessage, bufferindata, 20);

    err=otIp6Send(thread_ot_instance_get(),amessage);

    if(err == OT_ERROR_NONE)
    {
       printf("Sent successfully!");
    }
  }

}
static void ot_receive_handler(otMessage *aMessage, void *aContext)
{
// Read the message itself and output it to serial
uint16_t length = otMessageGetLength(aMessage);
uint8_t *data_read = malloc(length);
uint32_t bytes_read = otMessageRead(aMessage,0,data_read,length);

if (bytes_read > 0)
{
  print_data(&data_read[40]);

}

free(data_read);
otMessageFree(aMessage);

}
It is sending data but only 4 Bytes with header from one node to the other nodes on the network.

I don't see anything immediately obvious yet.
What value is otMessageGetLength() in ot_receive_handler() returning?
Is it possible for you to provide OpenThread logs for greater visibility?
Also, can you provide more information on your setup:

Git commit id
IEEE 802.15.4 hardware platform

otMessageGetLength() in ot_receive_handler() returning is returning 0x3C or 60 bytes for 40 bytes in the header and 20 bytes in the data.  I am using the nRF52840 DK evaluation hardware board.   I modified the code in nRF5 SDK for Thread and Zigbee v4.1.0.  I used the https://github.com/openthread/openthread/tree/main/src/cli .  Do you know of parameter to set or why only 4 bytes are being sent over the thread network?

otMessageGetLength() returning 60 indicates that the receive message is 60 bytes in length.
Can you provide more detail in how you are determining that only 4 bytes are being sent over the Thread network?

The header part of the packet is the 40 bytes seems the same as the header I sent. Only 4 Bytes are valid data transmitted and received, which I put in the array to send. The rest of the 16 bytes are random values and zeros and not the 20 bytes of data in my array.  If send out [0x48, 0x45, 0x4C, 0x4C, 0x4F, 0x0D, 0x0A,0x00] and 16 zeros, I receive [0x48, 0x45, 0x4C, 0x4C, 0x00, 0x0A, 0x00,0x00] and other 16 random values. I only send and receive 4 valid bytes in the packet.

Above, I see:
static void ip_packet_transmit_now(uint8_t bufferindata)

and
err=otMessageAppend(amessage, bufferindata, 20);

Note that bufferindata has type uint8_t. Is that what you intended?

It is actually
static void ip_packet_transmit_now(uint8_t *bufferindata)
in the code.

When I only want to send 8 bytes I set the message length to 10.  Here is the code for that:
`static void ip_packet_transmit_now(uint8_t bufferindata)
{
uint8_t err;
uint8_t header5;
  header5= (uint8_t*)contructip6add(10);
  otMessage *amessage;
  amessage=otIp6NewMessage(thread_ot_instance_get(), false);

  if (amessage != NULL)
  {

    err=otMessageAppend(amessage, header5, 40);

    err=otMessageAppend(amessage, bufferindata, 10);

    err=otIp6Send(thread_ot_instance_get(),amessage);

    if(err == OT_ERROR_NONE)
    {
       printf("Sent successfully!");
    }
  }

}
`

The Github editor removed the pointer part.

For better formatting, you can use code block formatting.

One thing to test: if you send to link-local all nodes ff02::1, rather than realm-local all nodes ff03::1, are the bytes transmitted as expected?

I send
[0x48,0x45, 0x4C, 0x4C, 0x4F, 0x0D, 0x0A, 0x00]
and I get on the other node:
[0x48,0x45, 0x4C, 0x4C,0x00,0x0A,0x0A,0x00]
When using ff02::1. Is there a parameter I am missing ? Any suggestions?

I tried doing the same using the latest main branch (866c9602fb8f8611204823077001ab571b7b43a0), but all the payload bytes are being communicated properly from the sender to receiver.
Are you able to provide a packet sniffer capture? At least that can help determine whether it is an issue on the sender or receiver.

Quick question: on the receive side does the data array have to be 32-bit or does byte array work?
`static void ot_receive_handler(otMessage *aMessage, void *aContext)
{
uint16_t length = otMessageGetLength(aMessage);
uint32_t data_read[length];
uint32_t bytes_read=otMessageRead (aMessage,0,data_read,length);

`

Quick question: on the receive side does the data array have to be 32-bit or does byte array work?

A byte array should work.

What tool do you use for the packet sniffer?

What tool do you use for the packet sniffer?

See:

Packet Sniffing with Pyspinel
Packet Sniffing using Extcap

Can you show me the code functions you used to send and receive that had payload bytes are being communicated properly ?

Here is the (really hacky) test code I used (diff from 866c9602fb8f8611204823077001ab571b7b43a0). I repurposed the ping command for the test. Execute the ping command on both devices to see the output.

diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp
index 60391bb6c..c3dcf3a35 100644
--- a/src/cli/cli.cpp
+++ b/src/cli/cli.cpp
@@ -3103,9 +3103,69 @@ void Interpreter::HandlePingStatistics(const otPingSenderStatistics *aStatistics
     OutputResult(OT_ERROR_NONE);
 }

+static void ot_receive_handler(otMessage *aMessage, void *)
+{
+    // Read the message itself and output it to serial
+    uint16_t length = otMessageGetLength(aMessage);
+    uint8_t  data_read[100];
+
+    uint32_t bytes_read = otMessageRead(aMessage, 0, data_read, length);
+    printf("%d %d\r\n", bytes_read, length);
+
+    for (uint16_t i = 0; i < length; i++)
+    {
+        printf("%02x\r\n", data_read[i]);
+    }
+}
+
 otError Interpreter::ProcessPing(Arg aArgs[])
 {
-    otError            error = OT_ERROR_NONE;
+    otError error;
+
+    otIp6SetReceiveFilterEnabled(mInstance, true);
+    otIp6SetReceiveCallback(mInstance, ot_receive_handler, NULL);
+
+    OT_UNUSED_VARIABLE(aArgs);
+
+    static uint32_t header[10];
+    uint16_t        pay_len = 20;
+
+    uint8_t ver         = 6;
+    uint8_t HOP_LIMIT   = 64;
+    uint8_t NEXT_HEADER = 17;
+
+#define TRAFFIC_CLASS 0
+#define FLOW_LABEL 0
+
+    header[0] = htonl((((uint32_t)ver) << 28) | (((uint32_t)TRAFFIC_CLASS) << 20) | FLOW_LABEL);
+    header[1] = htonl((((uint32_t)pay_len) << 16) | (((uint32_t)NEXT_HEADER) << 8) | HOP_LIMIT);
+    header[2] = (0xADDEFD);
+    header[3] = (0xEFBE2);
+    header[4] = (0xFF000000);
+    header[5] = (0x00FC0FE);
+    header[6] = htonl(0xFF030000);
+    header[7] = htonl(0x00000000);
+    header[8] = htonl(0x00000000);
+    header[9] = htonl(0x00000001);
+
+    static uint8_t payload[20];
+
+    for (size_t i = 0; i < sizeof(payload); i++)
+    {
+        payload[i] = i;
+    }
+
+    otMessage *message;
+
+    message = otIp6NewMessage(mInstance, NULL);
+    VerifyOrExit(message != NULL, error = OT_ERROR_NO_BUFS);
+
+    SuccessOrExit(error = otMessageAppend(message, header, sizeof(header)));
+    SuccessOrExit(error = otMessageAppend(message, payload, sizeof(payload)));
+    SuccessOrExit(error = otIp6Send(mInstance, message));
+
+#if 0
+  otError            error = OT_ERROR_NONE;
     otPingSenderConfig config;

     if (aArgs[0] == "stop")
@@ -3180,6 +3240,7 @@ otError Interpreter::ProcessPing(Arg aArgs[])
     config.mCallbackContext    = this;

     error = otPingSenderPing(mInstance, &config);
+#endif

 exit:
     return error;

Do you have the function htonl?
header[1] = htonl((((uint32_t)pay_len) << 16) | (((uint32_t)NEXT_HEADER) << 8) | HOP_LIMIT);

@jwhui I did not find the htonl function in the OpenThread code.  Can you tell me the definition of it you used?


How to measure the number of training epochs

In order to compare with other NMT frameworks, I would like to know how many training epochs (i.e. passes over the whole training data) are done at the moment.
I can see the number of training (global) steps and I guess epochs = steps * batch_size / training_subwords.
So the questions boils down to: How to make T2T report (e.g. in the log) the number of subwords in the training data?

Yeah, this seems like a reasonable thing to want but unfortunately not simple to do currently. The variable batch size because of bucketing examples by sequence length complicates the picture.
Counting the number of subwords would need a pass through the data on disk, probably best done by a separate script.

@rsepassi hi, "batch_size" is the number of subwords of source and target sentences in a batch?
or only the number of subwords of source sentences in a batch?
thanks a lot.

@yuimo: it is the maximum of source and target subwords, for each sentence. See https://github.com/tensorflow/tensor2tensor/blob/92983eaaa457ec18729b1883ba5ae4a6614bdcb5/tensor2tensor/utils/data_reader.py#L145-L153

@martinpopel i got it, thanks a lot

@martinpopel , you meant to write:
epochs = steps * batch_size * worker_gpu / training_subwords
Right?

epochs = steps * batch_size * worker_gpu / training_subwords

Yes, exactly. In other words epochs = steps * effective_batch_size / training_subwords.
I wrote a simple script t2t_text2subwords.py for computing the number of subwords in train/test data, but I had not enough time to tidy it, document and send as a PR.

@martinpopel It would be nice if the T2T will show in the tensorboard how many epochs were done during training.
Do you know if there are any rules of thumb in respect to how many epochs should be done turing NMT tasks?
In addition, do you know if T2T runs on the training data in a deterministic way, or in a randomized way? (meaning if 2 training invocations should yield the exact same model?)

It would be nice if the T2T will show in the tensorboard how many epochs were done during training.

Yes, that would be nice, but there are two problems:

How to compute the number of epochs exactly? The formula above does not handle zero-padding, so it is just an upper bound on the number of epochs (I think). TensorBoard reports input_stats/targets_nonpadding_fraction and input_stats/inputs_nonpadding_fraction, so there is a way how to compute the number of epochs. Ideally t2t-datagen should report to stderr the number of subwords (as my script does) and t2t-trainer should report the number of epochs (or how many steps are in one epoch after the first epoch has ended).
How to present this number in TensorBoard? Currently, TensorBoard offers just "Step", "Relative" and "Wall" as the options for the x-axis and I doubt there is a way to provide other options (maybe plugins?). Also, I am not sure what is more helpful: epochs or number of training examples? For a given training data, these two options don't change the curves, just the x-axis labels, but when comparing experiments with different training data size, I guess the number of training examples is more relevant.

Do you know if there are any rules of thumb in respect to how many epochs should be done during NMT tasks?

The standard&naive answer is "until converged on dev set", but this is difficult to measure (how to set early stopping parameters) and achieve. My training data has about half a gigaword and even 18 epochs (11 days of training on 8 GPUs) were not enough to reach the highest possible BLEU.

In addition, do you know if T2T runs on the training data in a deterministic way, or in a randomized way? (meaning if 2 training invocations should yield the exact same model?)

It should be randomized and deterministic (thanks to the fixed rand seed), but I am waiting for the ultimate answer from the T2T authors, see https://github.com/tensorflow/tensor2tensor/issues/556#issuecomment-364303805 and the posts below.

@martinpopel, why not to go with simply the % of sentences (examples) completed, instead of subwords?
If we completed 100% of the cases in the training data -> We reached to 1.0 epochs, and so on?
I don't think we need to go into the subwords resolution.

@nadavb T2T computes batch_size in subwords (for translation problems with variable length). One batch may contain a small number of long sentences or a high number of short sentences.
T2T does not report the number of sentences processed, it reports just the number of steps (batches).
Thus, we need to know the total number of subwords in the training data, in order to estimate the number of epochs.
Of course, if you know the total number of sentences in the training data, you could estimate that x % of sentences are processed when x % of subwords are processed.

I probably don't understand something. Why do we care about subwords when we talk about epochs?
In the training data, we have input and output sentences.
During training, these sentences are being converted to subwords and then being sent to the different GPUs. The code that takes these sentences know how many sentences it took (and converted to subwords) in each step. We can simply have a counter counting the number of sentences passed. It must be somewhere anyhow, in order not to process a sentence twice. (Some Data Reader). That's it. I don't understand why it is so difficult to keep track on how many sentences we read from the training files. I understand that "One batch may contain a small number of long sentences or a high number of short sentences." - but we don't care how many sentences are in a batch. We only want to know how many sentences we took from the training data set before we converted them and send them to the GPU, hold a counter, and that's it.

We can simply have a counter counting the number of sentences passed.

Yes, you can implement such counter and send a PR. That would be great (and more precise than my subword-based estimates that are biased because of not taking into account zero-padding).

Where should I modify the code about set training steps?

I don't know where is the exact location for adding the epoch counter (but I have not spent much time searching it), otherwise I would do it myself. Maybe it is possible to solve it with a hook in utils/trainer_lib.py. Note that tf.contrib.learn.Experiment is deprecated and should be replaced soon, but it seems that tf.estimator does not support continuous_train_and_eval. As this schedule is not intended for distributed train&eval anyway, I would suggest to get rid of tf.contrib.learn.Experiment and reimplement in pure Tensorflow, where it is much easier to count the number of epochs.

@martinpopel With "number of training subwords" you mean the sum of subwords of all source texts plus the subwords of all target texts used for training, is that right?

@martinpopel Thank you. I used your script to compute the maximum number of subwords, but you said that it should be only an estimate because of padding tokens.
So I should check this input_stats/inputs_nonpadding_fraction and input_stats/targets_nonpadding_fraction, multiplying them with the number of subwords to obtain the real number of subwords without padding?
I am using Google Colab, so I would know if it's possible to train a Transformer at least one epoch in 12 hours (maximum time allowed on Colab) with a custom dataset using a specific batch size.

Yes, considering nonpadding_fraction should result in a more precise estimate.
I am not sure why "at least one epoch" is important in your use case. Usually you need more epochs anyway for good results (unless the task is simple a data large, in which case you may overfit well before reaching one epoch).
If you can store checkpoints and continue training in another Colab session, then you can try it anyway (T2T starts from a random part of the training data and shuffles the training files by default, I think).

My target is just to feed the model with the highest number of subwords in the dataset possible, so if I couldn't complete one epoch in less than 12h, I should use another Colab session and start the training from another random part.

epochs = steps * batch_size * worker_gpu / training_subwords

Yes, exactly. In other words epochs = steps * effective_batch_size / training_subwords.
I wrote a simple script t2t_text2subwords.py for computing the number of subwords in train/test data, but I had not enough time to tidy it, document and send as a PR.

@martinpopel may I ask something regarding the above formula? When training on a single TPU (v2), is the effective_batch_size equal to the batch_size, or to batch_size8?
In other words, a single TPU has 8 cores. If batch_size is 2048, does it mean that each core handles 2048 (so effective_batch_size is 20488), or this 2048 is splitted between the cores?
Thank you!

@coder1248: I would guess batch_size*8, but I am not sure as I have never used TPUs for real training. I know, T2T treats TPUs differently than CPU and GPU in several aspects (e.g. preferring/requiring fixed number of sentences per batch and "packed" problems, which perhaps influences also the estimate of number of epochs).

Thanks again for your help martinpopel!
@rsepassi @lukaszkaiser  could you kindly verify martinpopel's answer?  Thanks!


The flutter.jar dependency is still android.support, is there anyway to upgrade to androidX

I import a flutter module into my Native Project, and I create flutter module with AndroidX，cause My Native Project use androidx.
but when I run app, it crashed . Error log is: incompility android.arch.lifecycle.Lifecycle，I know this error is cause by the support library and androidx library
but I can not resolve。Can anyone has a solution?
Here are my flutter module configurations.

but I check the source of FlutterEngine.class. it is still support library.

@

Any solution to this? @zhangcongmin


Duplicate "inheritance principle" section

Not a big deal but I noticed there is a repeat of the inheritance principle section in the intro  and the common principles parts.
Also I wonder if some sections of intro  would not be better in common principles.
e.g definitions, compulsory/optional, raw VS derived

Thanks for spotting. Next time please create one issue per suggestion. It makes managing the project easier.


Issue407

Changed bundleExclude to publishExclude and updated the excludes.png to match.

Hi @row5is, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.dotnetfoundation.org.

TTYL, DNFBOT;

@row5is, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, DNFBOT;

Looks good! 6d5e94eb548f0796670be151a4e8f8a84791504b


Question : How can I reset the input box back to empty (and show the placeholder)

const datePickerProps = {
onDateChange: date => this.handleDateChange(date),
value : this.props.decisionDate || "",
initialDate : this.props.decisionDate || "",
};
return(
....
<SemanticDatepicker clearable={true} {...datePickerProps} />
....);
I have a scenario where I set the date in the control and submit the data.  It then should reload the data (so this.props.decisionDate is null.  I expected that this would re-initialise the input field back the placeholder but it's still got the text in it.
Please could you advise on how to clear out the text field ?
Thanks
Dan

From this line <SemanticDatepicker clearable={true} {...datePickerProps} />  it seems like you use some other calendar, not semantic-ui-calendar-react. Are you sure you use this package?

I'm having a similar issue (though I can confirm I'm using semantic_ui-calendar_react). After the user selects a date and time (and the value is stored in my model) they can come back and edit it, however, it starts in the last rendered "mode" (the minute selection).
Is there a way to set the mode back to the day so that they can basically start over. I'm aware they can click the header on the popup to go back, but it's not intuitive to users.

Yes, this behaviour is not convenient for users. But I'm not sure what is convenient.
I think that what definitely must be done is that when user clears the input field the input should
turn back to its initial state (currently it doesn't). Before this is implemented I would probably
enforce react to reinstantiate input component when its value is empty string by using key prop on that component.
I would update onChange handler like this:
handleChange(e, { name, value }) {
    this.setState((prevState) => {
      let fieldKey = prevState[name + 'Key'];
      if (value === '') {
        fieldKey = fieldKey === 'a'? 'b': 'a';
      }
      return {
        [name]: value,
        [name + 'Key']: fieldKey,
      }
    });
  }

And set key prop on input component like this:
<DateTimeInput
        placeholder="DateTime"
        key={this.state.dateTimeKey}
        name="dateTime"
        onChange={this.handleChange}
        value={this.state.dateTime} />

The other case I can imagine is when a user ends selecting a value (reaches the last mode) the input's mode turns back to its initial value. I don't know whether this is more user friendly? And I can't imagine right now how to make something like this from outside code.
I'll implement this in near future probably.

I've been hoping to have some time to fork and shoot you a PR (maybe this weekend), but my thought was to simply reset the mode/view via onFocus. Just going through QA with my team it seems like this is the most user friendly since the flow is shallow and feels like a single action (despite being 3 clicks).
Watching users QA this it seems like the desired behavior is to have the consistency of always going through the steps whether you're setting it from empty, or changing the date completely.
This could become a prop just with a boolean like preserveLastMode where:
_onFocus () {
  if (!this.props.preserveLastMode) this.setState({ mode: this.props.startMode })
}

Yes, that would be great.

 It's pretty simple, but wasn't sure if you felt it applicable to other pickers.


Simple-Bar Refresh / Workspace Issues

Hi! Sorry if this is the wrong place to post it but not sure where else it would belong.
I've installed Yabai, Übersicht, and lastly simple-bar this morning on my Macbook (15" Running macOS Big Sur 11.0.1).
Unfortunately I've noticed that the workspace functionality isn't seeming to work consistently and I'm not sure if this is a problem on my end or if there is something I had installed incorrectly.
My understanding of the workspace functionality is that it's supposed to represent the different Virtual Desktops that you can create on a Mac, and this functionality is one of the main factors that attracted my to simple-bar!
However I'm having problems with the workspace and titlebar functionality not actually working. The behaviors I've seen that stray from what is displayed here are:

Workspaces can't actually be created or deleted (I've confirmed csrutil status returns disabled since I know you mention SIP needs to be disabled for that functionality).
Workspaces do not automatically update with what applications are open in them, for example I would open iterm and it does not actually add the iterm icon in the open workspace.
Lastly unfortunately the titlebar does not actually represent what window is currently open.

I think this is a problem with how Übersicht is handling refreshing, because if I manually change the simple-bar menu color or theme then it does refresh (albeit it takes around ten seconds for the theme to change).
Is there anything that you can think of that I should be doing which I'm not?
I've read through the docs for both Yabai and Übersicht and I'm fairly certain I've configured them both properly for what I'm trying to do with them so I'm not sure what else I should do. I would be happy to provide any further data I could to help figure out what's going wrong. Thanks again, it's an awesome piece of software just wanna get it working!

Hi thanks for the compliments! Are you sure you added  all the signals necessary for making simple-bar responsive to workspaces changes?
See this readme section.
Let me know if this helps you!

Hi thanks for the compliments! Are you sure you added  all the signals necessary for making simple-bar responsive to workspaces changes?
See this readme section.
Let me know if this helps you!

Hi Jean, thanks for that link I added those sections and that's fixed almost all the issues! The reason I hadn't installed it originally was because I had been following the installation instructions listed on the simple-bar site.
Now the Titlebar updates as I change apps which it wasn't doing before, awesome.
The icons in the different workspaces update depending on when apps are opened, and if I switch workspaces it properly highlights which space I am in.
However I'm still unable to create or delete workspaces with the different places icons at the top of the status bar on the left. It's strange because earlier today I was able to create workspaces before that ability stopped working. csrutil status is still telling me SIP is disabled.
If you aren't sure what I could be missing it's okay if I can't create / switch workspaces with what's at the top. If that's the case would re-enablling SIP impact the titlebar / app icons and workspace highlighting?
Or is SIP only necessary for creating, deleting, and moving between workspaces?

Hi Jean, thanks for that link I added those sections and that's fixed almost all the issues! The reason I hadn't installed it originally was because I had been following the installation instructions listed on the simple-bar site.
Now the Titlebar updates as I change apps which it wasn't doing before, awesome.
The icons in the different workspaces update depending on when apps are opened, and if I switch workspaces it properly highlights which space I am in.
However I'm still unable to create or delete workspaces with the different places icons at the top of the status bar on the left. It's strange because earlier today I was able to create workspaces before that ability stopped working. csrutil status is still telling me SIP is disabled.
If you aren't sure what I could be missing it's okay if I can't create / switch workspaces with what's at the top. If that's the case would re-enablling SIP impact the titlebar / app icons and workspace highlighting?
Or is SIP only necessary for creating, deleting, and moving between workspaces?

Oh, indeed, I need to update the website about that part, thanks for the catch!
In order to create/delete workspaces, simple-bar is using yabai commands. You can try to run theses commands directly in your terminal and look a the output.
For example, try:
yabai -m space --create

If this command isn't working, you can check if you correctly installed yabai, there are some tricky stuff to think about when installing it. See this for activating the scripting addition.

I'm closing this for now, feel free to re open it if necessary. :)


Refactoring

refactoring : docker-compose.yml
add : Makefile
add : rector/rector

The problem with the tests has been resolved (they were not running due to the lack of dev dependencies in the production container). I borrowed the idea with makefile and made several changes in the dev branch.


MINOR: [C++] Aggregate doc fix

The Aggregate was exposed to the user, but the docs weren't properly fixed to reflect that. Adding that minor change in this PR.

cc @lidavidm @westonpace please take a look

Sorry, I don't see what the point of the change is?

Ah I moved the Aggregate code block within the /// @} range to make this included in the docs. So Aggregate becomes a click-able and easy to navigate to its definition if required.


quick little tool label for  change'none'

I think this should be "unknown" to be clearer

Is that for the GO columns?

Thanks.  That's fixed now.


Move CommandLineParameterParser.EarlyParse to UnmanagedPSEntry.Start to ensure early settingsfile parsing

Currently, there are a number of workarounds in the code base to handle the fact that logging needs to occur before the -SettingFile argument is parsed.
See:

https://github.com/PowerShell/PowerShell/issues/6085 - Logging is initialized before the configuration file is processed
https://github.com/PowerShell/PowerShell/pull/7449 - Make sure that -SettingFile arg is parsed before we load the settings

While these changes workaround specific issues, we still have areas where logging settings are ignored due to logging before the logging settings in the setting file is parsed.  PR 7449 presents a possible fix by parsing the -SettingFile argument earlier in command-line parsing. This change would move this logic to moving this logic to UnmanagedPSEntry.Start and avoid any further issues.
The call should be placed immediately before PSEtwLog.LogConsoleStartup(), the call should then be unconditional, and the conditional call in ConsoleHost can be removed.
Also revisit the SetSnapInLoggingInformation(coreMshSnapin) in PSSnapInReader.ReadCoreEngineSnapIn which is currently disabled on UNIX due to this issue.

Fixed by https://github.com/PowerShell/PowerShell/pull/7449


Instantly closes, or opens blank iframe

Hello. First of all, many thanks for StackEdit!  It's a wonderful piece of work!
I've been trying to embed it in a project, but after opening correctly the first few times, it stopped working, now either opening correctly but instantly closing (no error on the console), or opening with a blank window.
I've switched to a simple HTML file (served from my app, to avoid the file:// protocol), matching the example code, which again, worked for a bit and then stopped working.
Can you offer thoughts on what might be the problem?
Here is my test file (renamed to .html.txt for uploading here) --
stackedit_test.html.txt

Update: it now works fine in Chrome 68, but still instantly closes (after briefly flashing the StackEdit logo) on Firefox 62.  Does that suggest a direction?

Using "private mode" in Firefox 62, the SlackEdit logo hangs and the editor buffers never show.  The console shows:
"Error: Can't connect to IndexedDB. localDbSvc.js:28:12
t/r.onerror
localDbSvc.js:28:12"

If it helps anyone - I see the same instantly close behavior on Firefox 60.1.0esr (64-bit) with RHEL, but the frame properly stays open on 60.2.0esr (32-bit) on Windows 10.
Both were done using the buttons on the stackedit-js example page

Just clear the cache and should work, not sure what is the reason for this, as I have seen it too.

got the same behavior in FF 62.0.3 (64 bit)
iframe keeps immediately closing after some 2 hours of using in my project.
only thing that help is going to stackedit.io/app and click on reset application. so it is probably some application cache. is there any way to avoid this? in chrome its working good all the time.

same as @pohadkar with FF 62.0.3 64bit, both on Win and Linux. At first I didn't encounter the problem, but after loading a dev project today again, i was sofar unsuccessful to get anything else but a blank iframe (it doesnt close though)

Thank you, @pohadkar! This seems to be the problem indeed.  Can anyone come up with a patch?

Experiencing this on Safari 13.0.5

Experiencing on Chrome 81, just installed onto website


Can I get the inner "R" of tube?

Firstly, I can get the centerline by vedo. (success)
Secondly, I try to calculate the Radius of inner wall and then simulate with a serial of spheres.

Hi, sorry I don't understand the question.

Hi, sorry I don't understand the question.

This is my second question.
I need calculate the circle and the vector.

you can look at examples/basic/surfIntersect.py using a Plane or gridded plane Grid objects


tests/posix/common/src/clock.c: Dummy change to trigger issue with m2…

…gl025_miv board in CI.
Backing issue: #25017
Signed-off-by: Paul Sokolovsky<EMAIL_ADDRESS>

For reference, current m2gl025_miv failures are:

https://app.shippable.com/github/zephyrproject-rtos/zephyr/runs/71605/1/tests
https://app.shippable.com/github/zephyrproject-rtos/zephyr/runs/71605/3/tests

https://github.com/zephyrproject-rtos/zephyr/issues/25017 is created to track issue exposed by this patch.

To quote, the actual failure looks like:
20:30:06.1773 [DEBUG] uart: [+0.85ms host +0s virt 0.7s virt from start]   starting test - test_posix_realtime
20:30:06.1781 [DEBUG] uart: [+0.78ms host +0s virt 0.7s virt from start]   POSIX clock set APIs
20:30:06.1790 [DEBUG] uart: [+0.95ms host +0.1ms virt 0.7s virt from start]
20:30:06.1834 [DEBUG] uart: [+4.35ms host +0s virt 0.7s virt from start]       Assertion failed at WEST_TOPDIR/zephyr/tests/posix/common/src/clock.c:66: test_posix_realtime: (rts.tv_sec not equal to mts.tv_sec)
20:30:06.1839 [DEBUG] uart: [+0.54ms host +0s virt 0.7s virt from start]   Seconds not equal
20:30:06.1852 [DEBUG] uart: [+1.32ms host +0.1ms virt 0.7s virt from start]   FAIL - test_posix_realtime

@andyross is this something that could be related to recent timeout changes?

I added a commit which shows exact values in the failed comparison:

10:03:00.1941 [DEBUG] uart: [+0.67ms host +0s virt 0.7s virt from start]   starting test - test_posix_realtime
10:03:00.1947 [DEBUG] uart: [+0.61ms host +0s virt 0.7s virt from start]   POSIX clock set APIs
10:03:00.1962 [DEBUG] uart: [+1.5ms host +0.1ms virt 0.7s virt from start]   secs: mono: 69, real: 70
10:03:00.1964 [DEBUG] uart: [+0.21ms host +0s virt 0.7s virt from start]
10:03:00.1988 [DEBUG] uart: [+2.37ms host +0s virt 0.7s virt from start]       Assertion failed at WEST_TOPDIR/zephyr/tests/posix/common/src/clock.c:67: test_posix_realtime: (rts.tv_sec not equal to mts.tv_sec)
10:03:00.1995 [DEBUG] uart: [+0.71ms host +0.1ms virt 0.7s virt from start]   Seconds not equal
10:03:00.2004 [DEBUG] uart: [+0.83ms host +0s virt 0.7s virt from start]   FAIL - test_posix_realtime

In other words, for some reason CLOCK_MONOTONIC has value of 69 seconds, while CLOCK_REALTIME - 70 seconds. (For a moment I thought that maybe this board has RTC and CLOCK_REALTIME has a real wallclock time, but nope, just a weird 1s diff).

Seems not impossible that this is tickled by the timeout changes, yeah.  Is tests/posix/common the only affected test?   Does anyone have a clue how posix implements MONOTONIC vs. REALTIME?  Those aren't kernel features (the difference is in how it treats changes to the system clock due to calibration, etc... -- things we don't have an API for).
FWIW: I see these in the kconfig for that board:
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=660000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100

Is 660 kHz really the right clock speed for the RISC-V machine timer on the board?  That seems odd.  The intent of that feature is that it's a high speed 64 bit counter running at or near CPU speed, like the x86 TSC, right?  Maybe it's supposed to e 66 MHz and someone slipped a few zeroes?
Also a tick rate of 100 Hz is silly on a hardware device.  We still do that in emulation due to host timing interactions, but tickless devices with hardware clocks should be much higher.  We use 10 kHz for platforms with base-10-divisible clock rates, usually.

Yeah, here's the only place in the code where we treat those differently:
https://github.com/zephyrproject-rtos/zephyr/blob/master/lib/posix/clock.c#L26
Basically REALTIME has a fixed offset from system startup (to reflect the "actual current time" from an external source, I guess), where MONOTONIC doesn't.and just returns a raw uptime.  If they're skewed, it's because something is setting the time offset to something other than zero.
But... that's not wrong, is it?  My guess is that if the test is failing it's because the test is making assumptions that aren't correct.
Alternatively the test has some code to set the time and check the offset?  But I don't see how that can fail looking at how simple that implementation is.
Broadly: I think the timeout changes are off the hook, and I'm pretty sure the POSIX layer looks fine too.  My guess is this is a test bug.

Yeah, here's the only place in the code where we treat those differently: https://github.com/zephyrproject-rtos/zephyr/blob/master/lib/posix/clock.c#L26

Yeah, and in the latest CI build I even put printf debugging to see if something trashes memory in such a peculiar way that rt_clock_base.tv_sec gets exactly 1:
https://app.shippable.com/github/zephyrproject-rtos/zephyr/runs/71679/5/tests
11:32:59.1990 [DEBUG] uart: [+3.14ms host +0.1ms virt 0.7s virt from start]   rt_clock_base.tv_sec: 0, .tv_nsec: 0
11:32:59.2000 [DEBUG] uart: [+0.96ms host +0s virt 0.7s virt from start]   secs: mono: 69, real: 70

So, nope.
A couple of wild ideas:

The system is so deterministic that across half-dozen runs already made, the second bump happens exactly between 2 clock_gettime() calls.

Jokes aside, I'd still like to hear from folks who put that board into CI loop re: how much they tested the stuff before doing it. And apparently, from the board maintainers.
Neither of that is blocking so far of course, it would be a nice idea to run that on different real hw (of course, it doesn't fail in qemu). So far, didn't get to it.
And of course, we can patch stuff on the test side, and likely that's how it will end. It's just a pretty interesting case when "improvement" to CI loop actually becomes a source of instability, and if we don't treat those seriously, but silently work around, there won't be much good IMHO.

OK, for sure it's a buggy test, though I don't have a board and lack @pfalcon's dedication to testing this by firing stuff blindly into CI.  Here's the code that's failing:
https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/posix/common/src/clock.c#L58
It looks simple enough: it calls clock_gettime() twice, once with the REALTIME clock and once with MONOTONIC, and validates that the results are identical.
But that's wrong, because time passed between the two calls.  Clearly they aren't always going to be equal, they happened at different times!  In fact if you run exactly that sequence on x86 Linux (anything with a vdso-aware C library, so any distro of the past decade or so), it will fail every time, because the clock is provided by the TSC and that's sensitive to number of cycles that pass between the two calls.
Zephyr isn't that precise (yet), so in principle this could be made to work like it does on similar tests by ensuring tick alignment and guessing that two function calls won't take longer than a tick.  We could try this as a workaround:
diff --git a/tests/posix/common/src/clock.c b/tests/posix/common/src/clock.c
index 8465b7bcae..b420522514 100644
--- a/tests/posix/common/src/clock.c
+++ b/tests/posix/common/src/clock.c
@@ -55,6 +55,9 @@ void test_posix_realtime(void)
        struct timespec rts, mts;
        struct timeval tv;

+       /* Minimal sleep to align us to the next tick interval */
+       k_usleep(1);
+
        printk("POSIX clock set APIs\n");
        ret = clock_gettime(CLOCK_MONOTONIC, &mts);
        zassert_equal(ret, 0, "Fail to get monotonic clock");

But that's wrong

But of course, even the test itself knows that and invites to be victimized: https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/posix/common/src/clock.c#L51 . And yet so far it didn't fail consistently.

Zephyr isn't that precise (yet), so in principle this could be made to work like it does on similar tests by ensuring tick alignment and guessing that two function calls won't take longer than a tick.

That all doesn't explain why with 100% probability on a particular board 2 function calls "fall on a tick which increment the seconds counter". As that cannot happen, there's something wrong with that board, potentially other boards, and potentially other code.

  k_usleep(1);

I'll try it on next iteration playing with this.

@andyross: Your hint with k_usleep(1) worked, thanks! So, I'm adding that workaround ahead of removing that test chunk.

Fix merged into https://github.com/zephyrproject-rtos/zephyr/pull/24964. Closing.

OK, cool.  Yeah, the problem with many hardware platforms is that the timer code is scary deterministic.  You get something that should "never" happen and it turns out to be 100% reliable because the reset behavior is cycle-exact.


Backend fixes from old server

Fixed /estimates + various other bug fixes.
add more backend functionality

-added Sku functionality

need to refactor and make code cleaner


Investigate: random samples are of better quality than samples from fixed Noise

It might be the case that the random noise input is somehow learned too (I don't think that is good, but it might be)

Idea: since the attributes for the fixed noise are calculated randomly, it could be the case that they are non-sensical (e.g. black hair=True and blonde hair = true etc.), thereby confusing the generator. Idea: supply handpicked fixed attribute vectors, that way we can also check if glasses=True actually results in the face having glasses...

we were simply using fixed attributes that were either 0 or 1, we should have used -1 or 1


CIF-2161: align venia with wknd

Description
We want to align the build profiles between venia and wknd. However, there is a significant difference between the two as Venia is building a cloud and classic distribution which slightly differ from each other.
In this PR we separate everything that is classic/onprem specific in individual modules. Those modules are now located in classic/. Furthermore, all build artefacts don't contain any classifier anymore.
Use mvn clean install to build the default distribution only (cloud), or build the classic modules as well using mvn clean install -PwithClassic. The withClassic profile just adds the modules in classic/ to the build reactor.
Group- and ArtifactIds have been aligned with wknd as well.
Related Issue
CIF-2161
How Has This Been Tested?
Locally, Integration Tests
Types of changes

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

Checklist:

[X] I have signed the Adobe Open Source CLA.
[X] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes and the overall coverage did not decrease.
[X] All unit tests pass on CircleCi.
[X] I ran all tests locally and they pass.

The build is waiting for build-classic to finish (required). This build step was removed from the workflow. After merging we must change the repository configuration to not require the build-classic anymore.


guard against undefined ListRenderer content

newValue may be undefined when invoked here https://github.com/kriszyp/alkali/blob/c0607b0c7001bcfb5757544f2bdec2a4059a5808/Renderer.js#L211

Thanks, published a 0.11.5 with this.


I can login (in web/mobile) and register the device via qr code But registered devices do not appear on the screen

Hi,
images issue:
https://drive.google.com/drive/folders/1XUyiYYeXAVH0RKYTfdsKfqjX1KryvP8R?usp=sharing
log file:
https://gist.github.com/neuberfran/9cbd0b5ea41b80e8acf338fb1172db7e
I can see the devices registered in the firestore, but they do not appear on the mobile screen or in the web/angular application
I already registered 1 device using the tutorial below, which also does not appear
http://nilhcem.com/iot/cloud-iot-core-with-the-esp32-and-arduino
How to solve

Solved
https://stackoverflow.com/questions/63570992/iot-smart-home-cloud-gcp-project-registered-devices-not-appear-in-the-fluter-a
!


python310Packages.ssh-mitm: 2.0.2 -> 2.0.3

Description of changes
https://github.com/ssh-mitm/ssh-mitm/releases/tag/2.0.3

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 174050 run on x86_64-linux 1

2 packages built:

python310Packages.ssh-mitm
ssh-mitm (python39Packages.ssh-mitm)


tach check external does not seem to parse dependencies with extras correctly

In my repo, in my pyproject.toml I have a dependency on pandera with extras:
"pandera[strategies]>=0.18.3",
Running tach check-external reports "Undeclared dependencies" for the places where we use pandera, presumably because the extras are not properly parsed?

Thanks for raising this! You're right, check-external is only looking at the required dependencies. I think it makes sense to add a CLI option like --include-extras, maybe even letting the user specify which extras to include. I should be able to get to this soon, but will see if there is another contributor who'd like to tackle it in the meantime!

ok, but pandera itself is not an extra here, but a required dependency. Its only installed with extras as part of the definition in the pyproject.toml file. So pandera is an integral part of the list of required dependencies, not an extra. My guess is that the parsing somehow fails, and therefore pandera itself is not recognized as being part of pyproject.toml. Hope this clarifies?

Yes, totally my mistake! I read through the issue too quickly and misunderstood.
Now I see that the issue is pantera's extras (specified within the brackets) are not recognized by check-external, and so it doesn't map pantera correctly onto its imports in the code. This is a bug and a fix should be out soon.

@emdoyle Created a PR solving the same, ran the tests. Take a look!