text:
examples: Add imageformats example

Example which renders RGBA color wheel, alpha gradient and full value channel textures to
catch conversion errors and bad internal type representations between different backend
renderers.
The example uses bimg to convert from a master texture to different textures.
Each texture is rendered in an ImGui list using ImGui::Image. A close-up is visible when hovering over each image.
U and I textures are skipped because they don't work for sampling.
Compressed textures are skipped because they don't have conversion functions.
Depth textures are not rendered because they don't work with channels.
Note: The screenshot shows existing bugs (ref: https://github.com/bkaradzic/bx/issues/282 #2866) and was taken in OpenGL

Let me know what modifications to the layout / look / texture.

I would like this to be displayed via ImGui window, see: https://github.com/bkaradzic/bgfx/blob/e354b14168d75c832a6ea2e6d7c69a624607292e/examples/common/imgui/imgui.h#L54-L66

Okay, I've now converted to ImGui. How's this?

Okay, I've now converted to ImGui. How's this?

This is great!
I would drop g_formats and change this:
for (int i = 0; i < int(sizeof(g_formats) / sizeof(g_formats[0]) ); ++i)

for (int i = bgfx::TextureFormat::Unknown+1; i < bgfx::TextureFormat::UnknownDepth; ++i)

That way there is no changes needed when formats are added/removed.

OK. Done your suggestions. About the line on the wheel. I've tracked it down to bx::atan2, it goes away with std::atan2. https://github.com/bkaradzic/bx/issues/282

There. It's much simpler now. I didn't realize that there was already hsvToRgb

Could probably add a column for R, G, and B.

Could probably add a column for R, G, and B.

Like with states BGFX_STATE_WRITE_x turned on/off depending on column or something else?

Btw, I already fixed one bug by using this example: :smile:
https://github.com/bkaradzic/bx/commit/b34337659154b04402d281c3b4ed9e8f9426eda9

Just because the fully RGB squares are so small on imgui

I'm trying to run this example on vs2022/x64, and I got this warning, and build failure as result:
pixelformats.cpp(130,24): warning C4244: 'argument': conversion from 'int' to 'bgfx::ViewId', possible loss of data
pixelformats.cpp(130,24): warning C4244: 			bgfx::setViewName(i + 1, formatName);
pixelformats.cpp(130,24): warning C4244: 			                    ^

Also example is crashing with Stack overflow exception while entering example init() function. Which is weird because every other example works. I'm still looking for the reason why.

Hopefully this last update fixes the compile warning on windows.
I also allocate rgbaf32Pixels on the heap now. Linux didn't have such a small limitation.
The bimg::imageConvert(bimg::TextureFormat::Enum(format), bimg::TextureFormat::RGBA32F) trick I use to skip U and I formats isn't working on windows for some reason.
I'm therefore checking for "U" and "I" at the end of the format name.

Would you like to present formats in form of table like this?

Would you like to present formats in form of table like this?

Yeah that looks way better.
I would also suggest adding current selection on separate window, instead of being hover tooltip. So that we can also display other information about texture format there.

Also there should be distinction between, not supported (when GPU can't create it at all), and can't be sampled U+I formats.

I agree that the grid view looks better for one texture at a time but if we add more textures to test other features of the formats, the current column view could be expanded to have new columns such as in https://floooh.github.io/sokol-html5/pixelformats-sapp.html
As for the preview window, I could make a window per format (closed by default) that you can open by clicking on each texture. This could be useful to compare two formats side by side.

I agree that the grid view looks better for one texture per format but if we add more textures to test other features of the formats, the current column view could be expanded to have new columns such as in

We don't have to follow this 1:1... Actually with ImGui there could be multiple view modes.

As for the preview window, I could make a window per format (closed by default) that you can open by clicking on each texture.

I think it should be just panel always present... And whatever texture format is clicked last should be there.

This could be useful to compare two formats side by side.

I think for now would be fine just to have preview in higher resolution, and some texture format info from Caps:
https://github.com/bkaradzic/bgfx/blob/2d313f46ad5be99ae63ea2c4885d32df60600e41/include/bgfx/defines.h#L501-L517
and maybe some bimg::ImageBlockInfo like bits per channel:
https://github.com/bkaradzic/bimg/blob/663f724186e26caf46494e389ed82409106205fb/src/image.cpp#L24-L25

@bwrsandman I will share a patch for you with changes I made. I got everything except extra details in preview window.

I got everything except extra details in preview window.

Just to clarify those extra features can be added after PR... I think this from last screen shot looks good, and good enough to land as-is.

OK. I will figure out why R1 does not show up in the table and I will post a patch.

It's because there isn't a packR1 function in bx/pixelformat.inl

It is listed. I expected to see INVALID for R1, but it was missing from the table. Now it is back.
Maybe some day converter to R1 will appear. : )

There is patched example:
pixelformats.zip

Can you send me that as PR on my fork? I'm away from my PC at the moment. Or it'll wait for tonight.

Screenshot needs updating

Is this automated?

Removed "INVALID" text, it was too noisy...

Looks great!

It's because there isn't a packR1 function in bx/pixelformat.inl

Ah, that's because it's technically "compressed" format. 1 byte = 8 pixels, and my pack/unpack API is all about single pixel.

Is there anything we can do about better seeing the alpha channel in the previews? Like a checkerboard background?

I think it should be possible to render checkerboard first, and then texture on top with blend mode enabled.

That way you can see the blending when you move the imgui window.

That might be more complicated. But checker board could be slowly scrolling UVs if you want to see movement. That Sokol example probably is doing something like that already.

I was in the process of adding checkerboard. I may finish it as well.

This is excellent! Thanks guys for working on this, it's very useful!

Checkerboard code: https://github.com/thedmd/bgfx/tree/pixelformats-example-checkerboard
and PR: https://github.com/bwrsandman/bgfx/pull/3

authors: bkaradzic bwrsandman thedmd

repo: bkaradzic/bgfx


text:
Implementation of Accounting user

Addition of an accounting user
Ability to increase/decrease stock of items(New APIs only accessable by accounting users).
Ability to increase/decrease price of items(Existing APIs, accessable by all authorized users).
Addition of AccountingGuard on frontend
Addition of isAccounting on backend

Hi!! @bkimminich @J12934. The implementation of above component can be seen here.
Please let me know your feedback, if it looks fine I will add unit tests as well?
Thank You!!😁🙂

One big open Question for me is, how are JuiceShop users supposed to find the accounting section?
Having a third score-board / administration type challenge where users have to search through the javascript bundle is something i would not like to see.
I'd suggest adding a accounting navbar entry which gets enabled for accounting users.

Hi!! @J12934 @bkimminich. Hope you had an awesome flight home.😁
Please let me know your feedback.😁😁
Thank You!!

Hey Arpit,
Thank you, the flight home worked out nicely 👌
Will take another look at the PR later

Please rebase this PR to the latest gsoc2019 which includes some refactorings - then we should be able to merge. Thanks!

@J12934 can we merge this change or are there any open points from your side?

Sorry forgot to post another review.
I think the PR is ready to get merged.

source: gharchive/pull-request

repo: bkimminich/juice-shop

license: MIT

license_type: permissive

license_source: github-api


text:
Support 32-bit instructions aligned to 16 bits (IALIGN=16), take two

Summary
This PR is the new revision of #986. It introduces support for executing 32-bit instructions aligned to an arbitrary 16-bit boundary. It does not widen or otherwise alter the instruction cache output; rather, it performs successive fetches and synthesizes the results via a new "realigner" component.
The key changes from the previous PR are as follows:

Branch prediction metadata is now indexed by the aligned address of the second (upper) half of an instruction rather than the first (lower) half

As a result, I've removed a bunch of state previously used to carry over this information

Modified and narrowed the I/O interface between the PC gen module and the overall frontend
Note: Dan and I had previously discussed moving the realigner out of pc_gen. I took a deep dive on this approach and found that the interface between the realigner and pc_gen/fe_top would not be improved as we had hoped; the interaction is somewhat involved and there are a few signals that need to be routed regardless of where the module is housed. Moving it out of pc_gen increased the number of needed signals by one (two, now that I've added one more for ITLB fill handling). I am fairly happy with the middle ground I've arrived at but am happy to discuss if there are concerns.

Support for exceptions and virtual memory is now fleshed out. This includes supporting instructions which span two pages. See the new tests in https://github.com/black-parrot-sdk/bp-tests/pull/32 for a demonstration.

Exception issue packets now include a new bit, indicating whether the exception is specific to the upper half of the instruction
Page table walks, ITLB fills and I$ fills are now performed using the appropriate half of the instruction
{m,s}tval now correctly indicate the portion of the instruction that failed (either the same as the faulting pc or 2 bytes beyond it)
{m,s}epc now reflects the true pc alignment and doesn't have its second-to-lowest bit masked

Issue Fixed
IALIGN is now 16
Area
Mostly frontend, but propagation of half-instruction faults includes backend changes too.
Reasoning (outdated, confusing, verbose, etc.)
Why is this change required?
Additional Changes Required (if any)
Test programs: https://github.com/black-parrot-sdk/bp-tests/pull/32
I also intend to do some updating and porting work for #988 but haven't done so yet.
Analysis
Test suite does its best to cover relevant cases. Test plan from #986 still applies. But of course, it could have any unknown side-effects.
Verification
Test suite does its best to cover relevant cases. Test plan from #986 still applies. See tests in https://github.com/black-parrot-sdk/bp-tests/pull/32.
Additional Context
Previous version of this PR is: #986

Overall, looks great, excellent work. Much less impact to flow control than before. Made several minor comments. Do you have a link to the google slide that goes along with this?
Two major comments:

I think that if we can it's better to allow for compression to be parameterized enable/disable (at the least to benchmark with/without). If this is impossible without substantial work we can skip, but looking at the code I believe that it's possible
We should look closely at the alignment operations to see which are necessary and which are strictly not. Will discuss offline

Do you have a link to the google slide that goes along with this?

I am a bit naughty and haven't drawn up a new diagram for the revised implementation. The fetch flow (i.e., which memory fetches are made and their timing) is the same as it used to be. The difference is that I've removed a bunch of state to delay branch prediction. Instead, it just puts the branch prediction metadata in the BTB/BHT according to the latter half of a misaligned instruction. If it'd be worth the time investment I can make an updated data+control block diagram.
The original documents are linked here: https://github.com/black-parrot/black-parrot/pull/986

I think that if we can it's better to allow for compression to be parameterized enable/disable (at the least to benchmark with/without). If this is impossible without substantial work we can skip, but looking at the code I believe that it's possible

Is the goal to eliminate all added state, or purely not use it (and allow the tools to eliminate it if it identifies the undriven regs)? I think either can be done, but I'm not sure how to guarantee the latter with a parameter rather than an ifdef. I'm asking, in essence, whether the goal is to allow benchmarking power/area or just cycle counts.

Is the goal to eliminate all added state, or purely not use it (and allow the tools to eliminate it if it identifies the undriven regs)? I think either can be done, but I'm not sure how to guarantee the latter with a parameter rather than an ifdef. I'm asking, in essence, whether the goal is to allow benchmarking power/area or just cycle counts.

Power/area as well for sure. if (0) === `ifdef FALSE === my_cool_logic & 0 from a synthesizer perspective, so same principle. Constant propagation is almost disturbingly good in tools nowadays

PR updated with the discussed re-architecture.
Key changes:

The vaddr used for ITLB fills is computed in the BE and sent back with the message, to remove it from critical path in the FE
I$ and ITLB misses, the two exception types which can occur to only one half of an instruction, now forward the partial realigner state through the backend rather than re-fetching a first half or storing it in the FE.
The realigner now operates on a "poison" mechanic; it stores validity and is invalidated by control flow and redirects. This is intended to make stalling FE designs easier in the future.

Verification:

My three new test programs, which verify execution, branch prediction, and exception handling of misaligned instructions, pass and execute in the expected number of cycles
The output of my "pc gen tracer" on aligned test programs is identical to what it used to be in the unmodified processor. This includes all branch prediction minutiae, stall conditions, etc.
I have manually inspected the "pc gen tracer" traces for all introduced test programs on misaligned code. I have confirmed that:

Misaligning code introduces precisely the expected number of additional cycle delays due to double-fetching, and they occur in the right places
Exceptions correctly propagate partial instruction data. Once a "first half" is fetched, it isn't fetched again.

Remaining TODOs (not blocking review):

The realigner and related signals sometimes use confusing names. "upper" and "lower" halves sometimes refer to those of a fetch, and sometimes refer to those of an instruction. The upper half of a fetch is the lower half of a misaligned instruction, and vice versa. I will do some naming normalization.
I implemented the parameter for enabling/disabling "C" support but have not used it yet. I need to go through and wrap checks around all new regs.
As discussed on Slack, I learned that branch prediction metadata is not sent with exceptions but the BE blindly reads the union field anyway. As a temporary workaround, I've zeroed this data in the scheduler to enable my consistency verification. I started but haven't finished introducing branch metadata into exceptions.
My VM test program doesn't save/restore all registers across ECALLs, and I don't want to leave accidents waiting to happen if the compiler chooses registers which get trampled on. Minor change.
Misc tracer cleanups. I'd like to add a few more signals to the PC gen tracer.
There may be some small comments above I haven't addressed yet.

I also haven't changed the FE->BE interface beyond the minimum signalling additions. We discussed a reformulation of those structures and if I make those changes it will be in a separate PR.

I don't know why GitHub isn't allowing a direct reply to these last two comments. Replying here.

Maybe sketch out what the alternative would be?

This would be:
assign next_fetch_linear = next_pc == pc_if1_r + 4;

Instead of identifying it via which source we pulled next_pc from. I currently believe your preference was to have redirects explicitly trigger realigner poisons which I think is more in line with what I've done in the current PR version.

When you say it's ignored under stalls, you mean that the if1/if2 valid bit gates the predictions from being taken?

Yeah, the r_v_li signal for both the BTB and BHT incorporates if2_v_n or similar (right now). So it disables reading the SRAMs when it knows that prediction isn't going to be issued. The minor bug is that the frontend still uses the output of the memory to predict jumps even when r_v_li is low and the instruction won't be issued. So you have a sequence of e.g. ten cycles where the frontend is stalled or waiting, but it's in a loop blindly predicting jumps to the last thing it predicted a jump to.
The only effects I can see this having are on power and trace clarity. The outputs are probably toggling a fair amount of the other branch prediction logic even though they don't need to, and it looks strange when the FE predicts this bogus in a trace of predictions. It's a very minor thing, so long as there isn't a bug which inadvertently uses the invalid output.

TODO: If possible, it would be good to add an assert in the FE<->BE interface that verifies all (pc, instr) pairs are correct. This would require out-of-band access to the simulated DRAM.

Remaining work, sorted in descending order of impact:

[ ] BHT+BTB indexing: https://github.com/black-parrot/black-parrot/pull/1098#discussion_r976284717
[ ] Move exception bit into be_pipe_sys
[ ] Finalize nonsynth counter of overrides: https://github.com/black-parrot/black-parrot/pull/1098#discussion_r976271510
[ ] Verify functionality with misaligned insns disabled
[ ] Cleanup to exception handling in virtual memory test program
[ ] Revert debug_all in Makefile

Some questions @dpetrisko

The BHT and BTB are being fed with potentially misaligned addresses now. Currently they then cut off the lower two bits. There are some aliasing conditions which would be improved by avoiding this truncation. If I just switch it to dropping only one bit, it effectively halves the capacity of these tables for aligned instructions. What should I do here?

Question here about nonsynth counter: https://github.com/black-parrot/black-parrot/pull/1098#discussion_r1000179356

Also, @dpetrisko do you know how to do hierarchical refs in Verilator when going through a named begin/end block? It seems I've broken the Verilator sim:
%Error: testbench.sv:576:67: Can't find definition of 'realigner' in dotted scope/variable: 'pc_gen.fetch_instr_generation.realigner'
  576 |            ,.realigner_v_i         (pc_gen.fetch_instr_generation.realigner.half_buffer_v_r)
      |                                                                   ^~~~~~~~~
        ... Known scopes under 'pc_gen.fetch_instr_generation': <no instances found>
%Error: testbench.sv:577:67: Can't find definition of 'realigner' in dotted scope/variable: 'pc_gen.fetch_instr_generation.realigner'
  577 |            ,.realigner_pc_i        (pc_gen.fetch_instr_generation.realigner.fetch_instr_pc_r)
      |                                                                   ^~~~~~~~~
        ... Known scopes under 'pc_gen.fetch_instr_generation': <no instances found>
%Error: testbench.sv:578:67: Can't find definition of 'realigner' in dotted scope/variable: 'pc_gen.fetch_instr_generation.realigner'
  578 |            ,.realigner_instr_i     (pc_gen.fetch_instr_generation.realigner.half_buffer_r)
      |                                                                   ^~~~~~~~~
        ... Known scopes under 'pc_gen.fetch_instr_generation': <no instances found>
%Error: Exiting due to 3 error(s)

The BHT and BTB are being fed with potentially misaligned addresses now. Currently they then cut off the lower two bits. There are some aliasing conditions which would be improved by avoiding this truncation. If I just switch it to dropping only one bit, it effectively halves the capacity of these tables for aligned instructions. What should I do here?

Good question! For C extension, it's claimed that misaligned instructions happen at the same frequency as aligned instructions. So I would say parameterize with compressed_support_p? Without compressed support => 2 bits, with compressed => 1?

>Also, @dpetrisko do you know how to do hierarchical refs in Verilator when going through a named begin/end block? It seems I've broken the Verilator sim:

%Error: testbench.sv:576:67: Can't find definition of 'realigner' in dotted scope/variable: 'pc_gen.fetch_instr_generation.realigner'
  576 |            ,.realigner_v_i         (pc_gen.fetch_instr_generation.realigner.half_buffer_v_r)
      |                                                                   ^~~~~~~~~
        ... Known scopes under 'pc_gen.fetch_instr_generation': <no instances found>
%Error: testbench.sv:577:67: Can't find definition of 'realigner' in dotted scope/variable: 'pc_gen.fetch_instr_generation.realigner'
  577 |            ,.realigner_pc_i        (pc_gen.fetch_instr_generation.realigner.fetch_instr_pc_r)
      |                                                                   ^~~~~~~~~
        ... Known scopes under 'pc_gen.fetch_instr_generation': <no instances found>
%Error: testbench.sv:578:67: Can't find definition of 'realigner' in dotted scope/variable: 'pc_gen.fetch_instr_generation.realigner'
  578 |            ,.realigner_instr_i     (pc_gen.fetch_instr_generation.realigner.half_buffer_r)
      |                                                                   ^~~~~~~~~
        ... Known scopes under 'pc_gen.fetch_instr_generation': <no instances found>
%Error: Exiting due to 3 error(s)

That's correct; what's happening is it's trying to evaluate the 'else' block where that instance does not exist. Could you use the signals in those blocks rather than inspecting into the conditionally instantiated module? That should fix the issue

The BTB/BHT indexing change reduced performance by a handful of cycles on my test programs. I don't think that's too surprising (given no compressed instructions == strictly half the capacity) but it's a bit unfortunate given there are a bunch of calls/returns in one of them which I know alias.

Verification methodology
Test programs
Aside from normal aligned code tests, I've developed three new misaligned test programs to aid in verification for this PR. The first two must only execute successfully and with the correct output to "pass", but also output performance measurements which should be verified manually. The third does not have a meaningful performance score but evaluates correctness as it runs.
For a quick confirmation that nothing drastic has changed, I've also tended to take note of the total cycle count of a simulation run. In general if the cycle count is the same behavior couldn't be much different.
misaligned_instructions_basic_jumps
This program tests unconditional jumps in the following scenarios:

Aligned -> unaligned unconditional jump, mispredicted as not taken (overridden)
Unaligned -> unaligned unconditional jump, mispredicted as not taken (overidden)
Unaligned -> aligned unconditional jump, mispredicted as not taken (overidden)
Unaligned -> aligned call, return back to unaligned code (call mispredicted as not taken)

Expected output
Hello Misaligned World! should be printed. There should then be a hexadecimal integer that follows it. This is the number of cycles taken to execute the relevant part of the program.
Ideally, what you verify here is the delta between this number running misaligned code and this number running aligned code. This should be done by recompiling the sample program with the ENABLE_MISALIGNMENT define disabled, not toggling compressed_support_p, as the latter also affects the BTB and BHT. The increase in cycles would ideally be 19 -- the minimum number of additional cycles required to execute this many jumps to misaligned code, due to double-fetches. Since we have chosen to implement a retroactive override mechanism for correcting erroneous jumps in the middle of an instruction, we lose more cycles to overrides. But the expectation is that the total increase is on that order of magnitude.
As of writing:

The aligned program gives 0x1fc = 508 cycles
The misaligned program gives 0x225 = 549 cycles

That's an increase of 41 cycles, which is fine. I've verified in the past that behavior is as expected. Confirming this number is fairly straightforward; diff the pc_gen_tracer output between these two runs (see below) to see where the added delays are.
misaligned_instructions_advanced_jumps
This program tests conditional jumps and branch prediction. It runs the same sequence of conditional jumps twice, to train the predictors one way, and then swaps one of the branch results and re-runs the sequence.
Expected output
It should print the following:
12
12
123
123

As with the other program, it will then print a cycle count for the critical portion of execution. And also as with before, the proper way to evaluate this number is relative to the same program and processor configuration with instructions aligned. We expect the measured portion to take 22 cycles longer for misaligned code, barring other mispredicts.
Currently:

Aligned: 0xb3 = 179
Misaligned: 0xd2 = 210

That's a 31-cycle increase in time taken. As with before, I've confirmed operation is as intended and this can be re-verified by textually diffing the tracer output.
misaligned_instructions_virtual_memory
This program verifies the correctness of exception conditions and the reported *epc and *tval. Running it and having it terminate successfully is sufficient to confirm that it "passes". However, I have personally inspected the sequence of TLB and cache misses for each case to confirm that they operate as expected, using the pc_gen tracer.
General technique: diffing pc_gen_tracer output
The new tracer has been vital to verifying that changes have the desired effect when working on the FE. There is a comment at the top of bp_fe_nonsynth_pc_gen_tracer.sv which explains its output. It is immensely helpful to diff the output of this tracer. However, since there are a handful of cumulative counters in the raw prints, a one-cycle change effects every line that follows. For this reason I tend to postprocess it to remove the counters:
awk -F, -v OFS=, '{$1 = ""; $6 = ""; print }' pc_gen_trace_0.trace

authors: WasabiFan dpetrisko

repo: black-parrot/black-parrot


text:
[Gally]: master <- dev

Automatically created by Git-Ally

:tada: This PR is included in version 2.7.5 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

repo: blackflux/lambda-tdd


text:
Reporting problem

"Is it just me, there are no lines showing on the graphs in the report?"
(from user @scll.co.uk)

Get user
SELECT [Id]  ,[Email]
FROM [dbo].[AspNetUsers]
Where Email LIKE '%scll.co.uk'
GO

Checked for Salford Museum & Art Gallery, the graphs look ok for Chrome Version 45.0.2454.85 m on Windows 7.

Please ask for....

Browser
Operating System
Screen Shot

We should probably be asking for these things straight of the bat anyway.

Probably fixed in commit 9c17b6bdc7f45fe1825b2aa40e5a1f8cbf9c6145
Please check with user.

source: gharchive/issue

authors: PeteCollins joejcollins

repo: blackradley/nesscliffe

license: mit

license_source: bigquery


text:
Bug report - Fields in a page do not appear on a task objects

What happened?
Per the docs it states:

Tasks inherit all fields from their parent page - so if you have a rating field on your page, you can also access it on your task.

However, it doesn't seem to be true - Tasks don't get any of the fields on the page. When I run this code in a note:
```dataviewjs
console.log(dv.pages('"Obsidian tasks"')[0])
console.log(dv.pages('"Obsidian tasks"').file.tasks[0])
```

The output of the first line is:

Note that the file has fff and tags fields. However, the second line returns the following, without any mentions to the fields of the page:

Here is the full markdown of the page:
---
tags: "#personal"
---

fff:: #umm

# Tasks

- [ ] Tasks

DQL
No response
JS
No response
Dataview Version
0.4.21
Obsidian Version
0.12.19
OS
MacOS

Hi.
(First of all a previous declaration: I'm not a coder or similar and the language I will use probably isn't the most appropriate...)
Well, how I read the documentation statements:

tasks are a particular "field", or better, a second level inside the main page level

Dataview tracks information at the markdown page and markdown task levels, where each page/task can have an arbitrary amount of complex (numbers, objects, lists) fields associated with it.

when in task query, this means that you can filter simultaneously in both levels - e.g., FROM #tag defines the source filtering pages with #tag (tags are always at page level); WHERE contains(text, "job") AND contains(fff, "umm") filter tasks by text (a task implicit field) and fff (a field at page level); ecc.
if you use this query you can see the "structure" of the fields in your page - $=dv.span(dv.current())

I'm not sure which interpretation of the docs is the correct one, but I was also under the impression that individual tasks would "inherit" their parent page's tags and fields.
If that's not the way it's supposed to work, I suggest this as a new feature. Say I have a page for a Project (with a project: XYZ field in the frontmatter) and then have various tasks throughout that page, each with their own contexts. If I'm doing a task query elsewhere and can WHERE project = 'XYZ' that would be extremely powerful and flexible (and to me seems like the expected behavior)

I'm not sure which interpretation of the docs is the correct one, but I was also under the impression that individual tasks would "inherit" their parent page's tags and fields.

@vcavallo I'm a zero in JS, but I think it's necessary to clarify differences between DQL and JS.
In fact tasks "inherit" their parent page's fields (implicit or others). And your example - WHERE project = "XYZ" - works in intended way.
But in my interpretation (and following the @vitalybe post), while in DQL task queries the conditions/filters in "WHERE", for example, work in both levels (page level and tasks level), in JS if you write dv.pages().file.tasks... at this moment, with the expression file.tasks, you are working only in the tasks level, not at page level.

interesting... testing this more thoroughly I see that tasks in files that have frontmatter fields are returned in the WHERE, but their fields don't show up in the task output, whereas tasks with the same fields inline do:

interesting... testing this more thoroughly I see that tasks in files that have frontmatter fields are returned in the WHERE, but their fields don't show up in the task output, whereas tasks with the same fields inline do:

Because the task content (the task text) it's a metadata. Then you see the text (as in normal note in preview/reading mode) that includes the render of the inline fields.

So if I'm understanding you correctly, for a task that appears within a file that itself has fields in frontmatter, there is no way to display those frontmatter fields on the task display, yes?
This is a table output with the full contents of the task objects:

@vcavallo
Yes, at least in DQL. In JS I don't know.

I know this thread is really old, but I'd like to bring it up again as this feature would be really great to have. And if it's supposed to work this way already then it would be great to have this bug fixed. @blacksmithgu @mnvwvnm

What's the use case you have in mind @zackdn?

+1 for this bug fix/feature!
It's less clutter to have global fields defined at page-level and then use those in queries, overriding as needed. Besides, this already works in DQL so why not JS too?
I use this to define a project's area (eg Writing, Programming etc) like you would with tags. For now I'll figure out a way to add those fields manually in JS or just add them directly to the task...

This is technically already doable in JS. Simply do page level filtering after dv.pages() before going down to the task level.
dv.pages().filter(t=>t.field == "value").file.tasks

@AB1908 thank you, but this won't work for my use case. I need the fields to be in the task itself. What if a task doesn't have the same value as its parent for the same field? It'll get filtered out anyway.
My query works as I want it to right now, it just has a lot of additional lines to transfer parent fields to the task if the task doesn't already have it. If this gets implemented in JS, I can remove those lines, but for now I have found a suitable workaround.

@Lulullia once in task level you can "build" again the page level. For example, in tasks level we have the link and the path. With it you can target any metadata in page level... for example .where(t => dv.page(t.path).file.name == "title")

@mnvwvnm sorry if I haven't expressed myself properly, but I already did this and my query is working as intended now. I don't have any issue right now. Only, having this implemented would allow me to clean up the code by removing those field-adding lines.

authors: AB1908 Lulullia mnvwvnm vcavallo vitalybe zackdn

repo: blacksmithgu/obsidian-dataview


text:
Could I update the README file for installing lsp-booster

From the eglot gist
https://gist.github.com/jdtsmith/d936801a4d7fd981bedf2e59dacd675e

huh even with that I can't find the command eglot-booster ,-, my bad

Give it a test and report how it works first after a day of use or so.  Then it's reasonable to update the README to offer options for lsp-mode or eglot.  Did you M-x eval-buffer that gist?

@Watynecc All you need to do is copy/paste that file into you init.el. It will read that as a function that you've written and you will be able to call it. Also, this conversation should probably be happening in #1, or at least that's my two cents.

@Watynecc All you need to do is copy/paste that file into you init.el. It will read that as a function that you've written and you will be able to call it. Also, this conversation should probably be happening in #1, or at least that's my two cents.

Excuse me ;-;

No worries! Just want to make sure it all stays in the relevant thread so that it is easier for people to find.

I've updated the README to include more instructions about building binary and added link to elot instructions. Please let me know if you have further suggestions!

authors: Watynecc blahgeek chookity-pokk jdtsmith

repo: blahgeek/emacs-lsp-booster


text:
TypeScript Declaration Publishing

See TypeScript Declaration Publishing
Right now VS Code doesn't automatically load bundled TypeScript definitions. Either two of the options from the link above should solve the problem.
I've only checked adding types: "./dist/common.d.ts" property to package.json and it kind of worked (but still throwing errors about tough-cookie).

Please search existing issues before opening a new one. I know how it all works, I'm stuck with a lack of TypeScript supporting what I need to make it work. See https://github.com/Microsoft/types-publisher/issues/4 and https://github.com/Microsoft/TypeScript/issues/7753, with duplicate issues being https://github.com/blakeembrey/popsicle/issues/89, https://github.com/blakeembrey/popsicle/issues/88 and  https://github.com/blakeembrey/popsicle/pull/77.

Sorry, my bad, should have looked into closed issues first. Went with typings after all.

Sorry for the pain, I know it's annoying! I wish I could replace Typings today too, but I need to get all the dependencies into DefinitelyTyped and even then, I can't support browser module resolution in case anyone is using popsicle in browsers.

authors: blakeembrey delight-by

repo: blakeembrey/popsicle


text:
df.to_castra breaking with pandas v0.18.0rc1

pretty much right out of here: https://github.com/dask/dask-tutorial/blob/master/03b-DataFrame-Storage.ipynb
note I am using python 3.5
In [18]: dask.__version__
Out[18]: '0.8.0'

In [19]: pd.__version__
Out[19]: u'0.18.0rc1'

In [22]: castra.__version__
Out[22]: '0.1.6'

In [6]: from prep import accounts_csvs

In [7]: accounts_csvs(3, 1000000, 500)

In [8]: import dask.dataframe as dd

In [10]: import os

In [11]: filename = os.path.join('data', 'accounts.*.csv')

In [12]: filename
Out[12]: 'data/accounts.*.csv'

In [13]: df = dd.read_csv(filename)

In [14]: df.head()
Out[14]:
    id   names  amount
0  171   Laura     533
1   69   Alice     112
2  130   Sarah     259
3  313  George     -56
4  202     Ray    2205

In [15]: c = df.to_castra('accounts.castra', categories=['names'])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-15-4e0e632fd837> in <module>()
----> 1 c = df.to_castra('accounts.castra', categories=['names'])

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/dataframe/core.pyc in to_castra(self, fn, categories, sorted_index_column, compute)
   1440         from .io import to_castra
   1441         return to_castra(self, fn, categories, sorted_index_column,
-> 1442                          compute=compute)
   1443
   1444     def to_bag(self, index=False):

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/dataframe/io.pyc in to_castra(df, fn, categories, sorted_index_column, compute)
    798     keys = [(name, -1), (name, df.npartitions - 1)]
    799     if compute:
--> 800         c, _ = DataFrame._get(dsk, keys, get=get_sync)
    801         return c
    802     else:

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/base.pyc in _get(cls, dsk, keys, get, **kwargs)
     41         get = get or _globals['get'] or cls._default_get
     42         dsk2 = cls._optimize(dsk, keys, **kwargs)
---> 43         return get(dsk2, keys, **kwargs)
     44
     45     @classmethod

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/async.pyc in get_sync(dsk, keys, **kwargs)
/Users/jreback/miniconda/lib/python2.7/site-packages/dask/async.pyc in fire_task()
    456         # Submit
    457         apply_async(execute_task, args=[key, dsk[key], data, queue,
--> 458                                         get_id, raise_on_exception])
    459
    460     # Seed initial tasks into the thread pool

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/async.pyc in apply_sync(func, args, kwds)
    506 def apply_sync(func, args=(), kwds={}):
    507     """ A naive synchronous version of apply_async """
--> 508     return func(*args, **kwds)
    509
    510

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/async.pyc in execute_task(key, task, data, queue, get_id, raise_on_exception)
    262     """
    263     try:
--> 264         result = _execute_task(task, data)
    265         id = get_id()
    266         result = key, result, None, id

/Users/jreback/miniconda/lib/python2.7/site-packages/dask/async.pyc in _execute_task(arg, cache, dsk)
    244         func, args = arg[0], arg[1:]
    245         args2 = [_execute_task(a, cache) for a in args]
--> 246         return func(*args2)
    247     elif not ishashable(arg):
    248         return arg

/Users/jreback/miniconda/lib/python2.7/site-packages/castra/core.pyc in __init__(self, path, template, categories, readonly)
    118
    119             self.partitions = pd.Series([], dtype='O',
--> 120                                         index=template2.index.__class__([]))
    121             self.minimum = None
    122

/Users/jreback/miniconda/lib/python2.7/site-packages/pandas/indexes/range.py in __new__(cls, start, stop, step, name, dtype, fastpath, copy, **kwargs)
     70             start = 0
     71         else:
---> 72             start = _ensure_int(start, 'start')
     73         if stop is None:
     74             stop = start

/Users/jreback/miniconda/lib/python2.7/site-packages/pandas/indexes/range.py in _ensure_int(value, field)
     56         def _ensure_int(value, field):
     57             try:
---> 58                 new_value = int(value)
     59                 assert(new_value == value)
     60             except (ValueError, AssertionError):

TypeError: int() argument must be a string or a number, not 'list'

cc @mrocklin @jcrist

This was fixed in #55. Try git master, it should work fine then.

thanks @jcrist works nicely.
can you do a release? (and make as a conda pack would be great as well).

@jcrist can you do a release of castra?

Castra 0.1.7 has been released. Closing.

thanks Jim!

authors: jcrist jreback

repo: blaze/castra


text:
Change color of selected item

I don't know where to look since there is not much documentation, but how do I change the color of the item that is selected (or change the color of hte unset items)
Right now every item is the same color and the end user might not now which item is selected

Hi,
you can do that with color selector and then set ti via android:textColor xml property to picker.
Example of color selector:
https://github.com/blazsolar/HorizontalPicker/blob/develop/HorizontalPickerExample/src/main/res/color/text_color.xml

authors: blazsolar zunjae

repo: blazsolar/HorizontalPicker


text:
How to listen to changing the text of UITextFiled in a xib?

Hello, Thank you very much for your library !!  I have a problem:  when I input text to a UITextFiled (from xib), how do I listen for changes in text ?

Hi @royu, you're very welcome!
If you create an IBOutlet for your UITextField, then attach it in Interface Builder, you can use it like this:
@IBOutlet weak var textField: UITextField? // Attach in Interface Builder

override func viewDidLoad() {
  super.viewDidLoad()

  let textFieldObservable = textField.dynamicObservable(keyPath: #keyPath(UITextField.text), type: String.self)
  observe(textFieldObservable) { event in
    print("Text field value changed from \(event.oldValue) to \(event.newValue)")
  }
}

authors: boyvanamstel royu

repo: blendle/Hanson

license: ISC


text:
Equality made to same value

https://github.com/bleroy/Nwazet.Commerce/blob/3f0e9a0b847437d22aa60662a0f8894456717e19/Nwazet.Commerce.Tests/TimePeriodTests.cs#L185
A bunch of those Assertions raise warning when building the project, because they are made between the same variable.
Is there a reason why they need to be like that or can they be safely removed?

Does the compiler optimize them away? It should not: those tests are testing the overloaded == operator and look legit. Seems like the right thing to do is to suppress the warnings.

Ok. Makes sense. I don't think they are being optimized away, but I haven't checked in a long time.
We were looking to clean up some of the warnings from our solution and those came up, so I thought I'd ask. Thanks for clearing them up.

authors: MatteoPiovanelli-Laser bleroy


text:
Call wifi.sta.config call with a table instead of two strings

Seems that the api has been updated since this script was last updated.
See https://nodemcu.readthedocs.io/en/master/en/modules/wifi/#wifistaconfig

I can confirm this, should be merged.

authors: isevcik stolmen

repo: blezek/blynk-esp


text:
第三次作业

practise

practise


text:
陈洲21851063

陈洲21851063

第二次作业


text:
Grouping edges by label

a -> b :knows
a -> b :emailed date:2021-07-11
a -> b :emailed date:2021-07-12
a -> b :emailed date:2021-07-13

Shows as
a -> b knows
a -> b emailed(3)

The aggregation operation should be executed by databases.
Then, the edge width can be adjusted by the property value.
a -> b :knows
a -> b :emailed count:3

repo: blitzboard/blitzboard


text:
Fix maven issue, support windows OS and support debug environment

Correct the version issue on maven config file.
Fix some bugs to allow RocksDB running on windows OS.
Fix SpringBoot related issue that provide the ability to debug gateway on IDEA with product config file

Tests in RocksDBStorageTest.java still failed in windows env.
I use your bat files cannot start the peers, could you tell me how to use them?
@michaelmao999

Tests in RocksDBStorageTest.java still failed in windows env.
I use your bat files cannot start the peers, could you tell me how to use them?
@michaelmao999

Please initialize blockchain ledger prior to start peer node.
For detail, please refer to http://ledger.jd.com/setup.html

Thanks for your committing!  We have solved this issue in the latest version.
For further communication  please email us to jdchain-support@jd.com.

repo: blockchain-jd-com/jdchain


text:
Clarification:  public $n_btc_mined;

Hi, can someone please clarify to me what this actually is? I took it that that is the total amount of bitcoins ever mined to date ( 24 hour delayed )
However upon looking at the value of $n_btc_mined -  1,900.00000000
That cannot be all the bitcoins ever mined. So, can someone just give me a recap what $n_btc_mined represents and then, can we update the documentation to add some clarity.
Much love from South Africa

Hey @ErikThiart
The value represents the total btc mined in the last 24 hours.
Much love from the UK ;)

authors: ErikThiart assafY


text:
feat: Admin item inside the menu with multiple actions

Add the Admin item into the dropdown menu with the following items inside it:

Grant Role: Make a dropdown menu to select the user's role
Revoke Role: An action to remove the role of an user
Set Attestation Title: Create a new name of an attestation
Set schema: Make a dropdown menu to select who can operate in the schema (Manager, Villager, Attest or Reply)

Heads up, the manager should also be able to view the admin page. But the only function he can call is setAttestationTitle. In matter fact, only the manager can call this function, so the ROOT must always check in as manager if he wants to create new badges

I just realized that the titles are hardcoded into the dApp front-end. We need to cut this dependency and make it always check for new titles. I will create a new issue to implement a way to calculate that by calling the contract directly

fixed by #103

repo: blockful-io/trustful-zuzalu


text:
Proposal: App Reviewer that ranks on internationalization

What is the problem you are seeing? Please describe.
Apps that are localized for many languages do get the same score as apps that are only provided in one language
How is this problem misaligned with goals of app mining?
User adoption is higher if the app is provided in the native language of the user. The app mining algorithm should encourage supporting many languages.
What is the explicit recommendation you’re looking to propose?
Do research who could be a good reviewer.

Sounds like a good idea, two questions come to mind:
– I'm not sure on the priority of this reviewer/factor?
– How would an app reviewer test this?

This makes only sense after the browser was localized.

authors: friedger jeffdomke

repo: blockstack/app-mining


text:
Collections: Note in readme that requests from same bucket should be handled by single Gaia hub

For a couple existing items (revocation) and future items (renames), correct functioning of the Gaia hub requires that a given bucket's requests are handled by a single Gaia hub instance. This is to handle synchronized paths in the Gaia code (i.e., check-and-sets).
This is really only relevant for Gaia deployments that run in a clustered way.

Repo now contains notes around concurrency control and clustering.

repo: blockstack/gaia


text:
How do I initiate a USDT SPL transfer transaction?

How do I initiate a USDT SPL transfer transaction?

https://blocto.github.io/solana-go-sdk/tour/token-transfer.html

https://blocto.github.io/solana-go-sdk/tour/token-transfer.html

Can feePayer and alice be aliceTokenRandomTokenPubkey?

I hope to implement a transfer process by only passing in the sender and receiver, the mint address, and the sending amount.

authors: pengbotter yihau

repo: blocto/solana-go-sdk


text:
🛑 Maxthon API is down

In 9bb59db, Maxthon API (https://api.maxthon.com) was down:

HTTP code: 500
Response time: 320 ms

Resolved: Maxthon API is back up in cdc1a35 after 8 minutes.

repo: bloodchen/upptime


text:
bug: 全文搜索bug

功能：全文搜索
平台：网页端，谷歌浏览器
全文搜索后会触发谷歌浏览器的修改密码功能以及密码泄露警告

别的浏览器是否也会出现类似情况
可以帮助我们测试一下吗？

repo: blossom-editor/blossom


text:
[BUG] Bloxstrap error with last roblox update (Help please)

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.
[X] I have thoroughly looked through the available Wiki articles and could not find a solution to my problem.
[X] I am using the latest version of Bloxstrap.
[ ] I did not answer truthfully to all the above checkboxes.

Bloxstrap Version
v.2.8.1
What problem did you encounter?
I've have ben goten a bloxstrap issue i reinstaled bloxstrap 5 times and thats didn't help me

Bloxstrap Log
N/A

help me pls

ive also got this issue and i dunno how to fix it so i cant help you

SOMEONE NEEDS TO HELP US

You can possibly solve this issue by making sure the drive your bloxstrap is installed in has no special characters, and is from A to Z in latin alphabet.

Duplicate of #3691

authors: IcarusFAith PoPcAkOtA Wanwood1 bigbubule pizzaboxer

repo: bloxstraplabs/bloxstrap


text:
Add other options to pass to ffmpeg

Hi, i have a problem when i'm using your lib that the cruiser/pointer is still present on my video. from what i read online and tested a bit, to remove it i need to add this option "draw_mouse 0" before the -i values but i don't have that option (correct me if i'm wrong). it would be nice if you could add an option to add other args as a string array before the -i flag.
this is the command that i can get now with your lib:
ffmpeg -y -video_size 1792x1096 -r 60 -f x11grab -i :0 -pix_fmt yuv420p ./test.mp4
and this is what i need:
ffmpeg -y -video_size 1792x1096 -r 60 -f x11grab  -draw_mouse 0 -i :0 -pix_fmt yuv420p ./test.mp4
thanks!

Thanks for your report @ronerwix and sorry for the late reply.
For now, I prefer to keep the options for this library as limited as possible, but I might reconsider if the use case is a frequent one. I've mostly been using this for webdriver recordings, where this didn't seem to be an issue.
For what it's worth, there are other NodeJS ffmpeg wrappers that do provide a more generic interface.

authors: blueimp ronerwix

repo: blueimp/record-screen


text:
会出现Incorrect TIMESTAMP value: ''2019-07-30''问题，不知道该怎么解决。

com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Incorrect TIMESTAMP value: ''2019-07-30''
at com.jfinal.plugin.activerecord.Model.find(Model.java:579)
at top.qianxinyao.algorithms.RecommendKit.filterReccedNews(RecommendKit.java:124)
at top.qianxinyao.contentbasedrecommend.ContentBasedRecommender.recommend(ContentBasedRecommender.java:95)
at top.qianxinyao.Main.JobSetter.executeInstantJob(JobSetter.java:112)
at top.qianxinyao.Main.JobSetter.executeInstantJobForCertainUsers(JobSetter.java:125)
at top.qianxinyao.Main.TestDataRunner.runTestData(TestDataRunner.java:37)
at top.qianxinyao.Main.Main.main(Main.java:26)
Caused by: java.sql.SQLException: Incorrect TIMESTAMP value: ''2019-07-30''
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1019)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:379)
at com.jfinal.plugin.activerecord.Model.find(Model.java:560)
at com.jfinal.plugin.activerecord.Model.find(Model.java:577)
... 6 more

请问解决了吗？我也出现了这个问题

repo: bluemapleman/NewsRecommendSystem


text:
Make some improvements to the Python script.

Don't allow CTRL+C while a Notecard transaction is ongoing. Previously, if the user interrupted the script with CTRL+C during the middle of a transaction and immediately ran the script again, it was likely for the old transaction to still be coming over the I2C bus. This wrecks communication between the script and the Notecard. Instead, note that CTRL+C was issued, finish the current transaction, and then interrupt the script.
Retry web.get requests if the status code isn't 206 or 200. I saw a 503 error at one point during testing. This change makes the script resilient to these kinds of errors.
Format everything with YAPF.

@paigen11 Note that the problem with a slow web.get request timing out is still unresolved. I will fix that once we know how we want to approach it.


text:
API cannot start

running this in the C:\blueseer director:
java -cp “.;dist*” utilities.apiServer
The java file cannot be found. Is the API still available in this? If so, is there updated documentation on this?

you're missing the '/' after dist.   Here's an example:
c:/blueseer/jre17/bin/java -cp ".;dist/*" utilities.apiServer
Also...if you do not use the embedded java executable (as I did in the example)...you will need to ensure that you are using Java 17 or higher.

Excellent! Thank you. Is there any authentication on the API? Any plans to
expand on the API aspect of it?
On Tue, Jun 27, 2023 at 8:32 AM Terry Vaughn @.***>
wrote:

you're missing the '/' after dist. Here's an example:
c:/blueseer/jre17/bin/java -cp ".;dist/*" utilities.apiServer
Also...if you do not use the embedded java executable (as I did in the
example)...you will need to ensure that you are using Java 17 or higher.
—
Reply to this email directly, view it on GitHub
https://github.com/blueseerERP/blueseer/issues/118#issuecomment-1609411631,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABO7DZB2VTFRT254MKIV3ILXNLHE5ANCNFSM6AAAAAAZUV27TI
.
You are receiving this because you authored the thread.Message ID:
@.***>

There is no authentication required on the APIs...as it was designed for internal network usage only.   There are only a few 'standard' APIs in the package....but I will entertain enhancements if they are beneficial overall to the application.   The API service...utilities.apiServer....also drives the cron entries and systems jobs.   (The documentation is woefully behind on this).  With regards to work order API validation, the API does have 'some' validation...(item must be in item master, work order number must exist and must be open, and operation of routing must be a valid operation).   If you have any issues with the APIs....shoot an email to support@blueseer.com ....and I'll take a look at it.

Thank you!

repo: blueseerERP/blueseer


text:
punycode failures, you can't @ a punycode handle, and handles render incorrectly

Steps to Reproduce
Someone has registered a handle with a punycode domain -
bsky-bsky-bsky.p-256.移动 which, correctly you are mapping underneath to bsky-bsky-bsky.p-256.移动
However, a couple of problems occur in the web app.

View that profile (https://bsky.app/profile/bsky-bsky-bsky.p-256.xn--6frz82g)
Now @ them, either via the compose button on their profile, or by following them and then using the search ahead (which works)
Add some more text
Create the post
Marvel as you get a post but the @ is not active. There are no underlying facets in the post record (e.g. at://did:plc:hfgp6pj3akhqxntgqwramlbg/app.bsky.feed.post/3laxkj2ww422c)
You're displaying the punycode handle on their profile page and search ahead. You should probably convert it back.

Attachments
No response
What platform(s) does this occur on?
iOS, Web (Desktop)
Device Info
No response
What version of the app are you using?
Build version: 1.93.0; Bundle info: 7731136 (prod); Bundle date: 24110818; Platform: web
Additional Information
No response

I can confirm, same problem here.

authors: blowdart pelifix

repo: bluesky-social/social-app


text:
Investigate tests crashing out during test_sigint_three_hits

The test
bluesky/tests/test_run_engine.py::test_sigint_three_hits

evidently exited pytest. I plan to rerun the build, but I have preserved the original log in this attachment:
travis-bluesky-542245260-log.txt

this test passes in the main at the moment. can we close the issue? @danielballan

authors: danielballan stan-dot

repo: bluesky/bluesky


text:
Motor and AreaDetector devices do not set their event loops as the bluesky event loop, meaning some bluesky plan stubs fail.

Overview of the issue
When trying to run a bluesky plan with ophyd-epics-devices motors and area detectors, I came across a bug where trying to read a PV from either of these devices would result in a RuntimeError:
RuntimeError: Task <Task pending name='Task-65' coro=<RunEngine._run() running at /dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py:1583> cb=[_chain_future.<locals>._call_set_state() at /dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.9/lib/python3.9/asyncio/futures.py:391]> got Future <Future pending> attached to a different loop

After some investigation by @coretl it was discovered that this is because upon collecting these devices, their event loops are set to be the current user event loop, not the bluesky event loop. This means some bluesky plan stubs (like read) don't work, because they check the ._valid property of the devices and ensure they are running on the bluesky event loop. It was subsequently fixed by directly handling and setting the event loop to be the bluesky event loop in the script.
Steps to recreate
from ophyd.v2.core import DeviceCollector
from ophyd_epics_devices.areadetector import MyHDFFlyerSim
from ophyd_epics_devices.motor import Motor
import bluesky.preprocessors as bpp
import bluesky.plan_stubs as bps
from bluesky import RunEngine

RE = RunEngine()

with DeviceCollector():
    rot_motor = Motor("BL46P-MO-MAP-01:STAGE:A")
    x_motor = Motor("BL46P-MO-MAP-01:STAGE:X")
    camera = MyHDFFlyerSim("BL46P-EA-DET-01:", drv_prefix="DET:")

@bpp.run_decorator()
@bpp.stage_decorator([camera])
def collect_sample_projections(start_angle: float, stop_angle: float, num_projections: int):

    yield from bps.abs_set(camera.hdf.file_path, "/dls/science/users/ton99817/projects")
    yield from bps.abs_set(camera.hdf.file_name, "p45test.h5")

    exposure_time = yield from bps.rd(camera.drv.acquire_time)

RE(collect_sample_projections(0.0, 0.0, 10))

In this case, I was running the script above inside "dls/science/users/ton99817/projects/p45", with this snippet of code saved at "dls/science/users/ton99817/projects/p45/src/p45/bluesky/plan.py". Running this script with the minimal dependencies required (bluesky, ophyd and aioca, with ophyd installed from the github repo) produced the following output:
Run aborted
Traceback (most recent call last):
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1523, in _run
    msg = self._plan_stack[-1].send(resp)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1147, in dec_inner
    return (yield from plan)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 333, in run_wrapper
    yield from contingency_wrapper(plan, except_plan=except_plan, else_plan=close_run)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 575, in contingency_wrapper
    ret = yield from plan
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1147, in dec_inner
    return (yield from plan)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 965, in stage_wrapper
    return (yield from finalize_wrapper(inner(), unstage_devices()))
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 511, in finalize_wrapper
    ret = yield from plan
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 963, in inner
    return (yield from plan)
  File "/dls/science/users/ton99817/projects/p45/src/p45/bluesky/plan.py", line 39, in collect_sample_projections
    exposure_time = yield from bps.rd(camera.drv.acquire_time)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/plan_stubs.py", line 371, in rd
    ret = yield from read(obj)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/plan_stubs.py", line 96, in read
    return (yield Msg('read', obj))
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1583, in _run
    new_response = await coro(msg)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1835, in _read
    ret = await maybe_await(obj.read(*msg.args, **msg.kwargs))
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1779, in maybe_await
    return await ret
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/ophyd/v2/epics.py", line 90, in read
    await self._valid.wait()
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.9/lib/python3.9/asyncio/locks.py", line 226, in wait
    await fut
RuntimeError: Task <Task pending name='Task-65' coro=<RunEngine._run() running at /dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py:1583> cb=[_chain_future.<locals>._call_set_state() at /dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.9/lib/python3.9/asyncio/futures.py:391]> got Future <Future pending> attached to a different loop
Traceback (most recent call last):
  File "/dls/science/users/ton99817/projects/p45/src/p45/bluesky/plan.py", line 78, in <module>
    RE(
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 893, in __call__
    plan_return = self._resume_task(init_func=_build_task)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1032, in _resume_task
    raise exc
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1663, in _run
    raise err
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1523, in _run
    msg = self._plan_stack[-1].send(resp)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1147, in dec_inner
    return (yield from plan)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 333, in run_wrapper
    yield from contingency_wrapper(plan, except_plan=except_plan, else_plan=close_run)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 575, in contingency_wrapper
    ret = yield from plan
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1147, in dec_inner
    return (yield from plan)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 965, in stage_wrapper
    return (yield from finalize_wrapper(inner(), unstage_devices()))
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 511, in finalize_wrapper
    ret = yield from plan
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/preprocessors.py", line 963, in inner
    return (yield from plan)
  File "/dls/science/users/ton99817/projects/p45/src/p45/bluesky/plan.py", line 39, in collect_sample_projections
    exposure_time = yield from bps.rd(camera.drv.acquire_time)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/plan_stubs.py", line 371, in rd
    ret = yield from read(obj)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/plan_stubs.py", line 96, in read
    return (yield Msg('read', obj))
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1583, in _run
    new_response = await coro(msg)
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py", line 1835, in _read
    ret = await maybe_await(obj.read(*msg.args, **msg.kwargs))
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/utils/__init__.py", line 1779, in maybe_await
    return await ret
  File "/dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/ophyd/v2/epics.py", line 90, in read
    await self._valid.wait()
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.9/lib/python3.9/asyncio/locks.py", line 226, in wait
    await fut
RuntimeError: Task <Task pending name='Task-65' coro=<RunEngine._run() running at /dls/science/users/ton99817/projects/p45/venv/lib/python3.9/site-packages/bluesky/run_engine.py:1583> cb=[_chain_future.<locals>._call_set_state() at /dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.9/lib/python3.9/asyncio/futures.py:391]> got Future <Future pending> attached to a different loop

To rectify the issue, the bluesky plan file can be changed to:
from ophyd.v2.core import DeviceCollector
from ophyd_epics_devices.areadetector import MyHDFFlyerSim
from ophyd_epics_devices.motor import Motor
import bluesky.preprocessors as bpp
import bluesky.plan_stubs as bps
from bluesky import RunEngine

RE = RunEngine()

import asyncio
from bluesky.run_engine import _bluesky_event_loop

asyncio.set_event_loop(_bluesky_event_loop)

with DeviceCollector():
    rot_motor = Motor("BL46P-MO-MAP-01:STAGE:A")
    x_motor = Motor("BL46P-MO-MAP-01:STAGE:X")
    camera = MyHDFFlyerSim("BL46P-EA-DET-01:", drv_prefix="DET:")

@bpp.run_decorator()
@bpp.stage_decorator([camera])
def collect_sample_projections(start_angle: float, stop_angle: float, num_projections: int):

    yield from bps.abs_set(camera.hdf.file_path, "/dls/science/users/ton99817/projects")
    yield from bps.abs_set(camera.hdf.file_name, "p45test.h5")

    exposure_time = yield from bps.rd(camera.drv.acquire_time)

Decided that this can be put into DeviceCollector, and it should have a set_event_loop arg to turn on and off

authors: RAYemelyanova coretl

repo: bluesky/ophyd-epics-devices


text:
Error connection collection

Hey,
I am with difficulty of to use this lib, because dont connection collection

can you try the example or show a gist of your usage?
https://github.com/blugavere/node-repositories/blob/master/packages/mongo-repository/examples/01.js#L14

Okay, I'll to test your example, later tell for you.

repo: blugavere/node-repositories


text:
Space after & in methods params (PHP 8.1)

On PHP 8.1, PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer add space after & sign in methods params.
// Before fix
private function test(array &$param): void
// After fix:
private function test(array & $param): void

Expected formatting:
private function test(array &$param): void

It should be fixed with next release of PHP CS Fixer or ECS.
https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/6100
https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5776

authors: krzysztofrewak mtracz

repo: blumilksoftware/codestyle


text:
Make IndexSet::intersection() work with stdlib's hashset

There's no reason it shouldn't work with the stdlib hashset. Perhaps we can add a second method for this?

It could work with lots of container types -- anything that has a contains method. But really, intersection amounts to just set.iter().filter(|item| other.contains(item)).

We don't inadvertently want to be responsible for a traitification of set collections, I guess? It's an awkward question.

authors: Manishearth bluss cuviper

repo: bluss/indexmap


text:
add some translations in  fra, ita, jpn

add some translations in  fra, ita, jpn

thanks! merged #33

authors: bluzi heinerenrique

repo: bluzi/name-db


text:
Coercions should be explicitly imported

See coq/coq#8094.

I don't have time to do this. Is it a workable solution to just drop this project from the CI test suite?

Is it a workable solution to just drop this project from the CI test suite?

Indeed I think this is the only solution for now, as this has blocked some desirable clean-ups on the Coq side for some time already.
On the longer term, I think @Zimmi48 suggested this development could be moved to coq-community. I'll let him say more about it.

Indeed, since, as far as I understand, this project is not actively developed anymore, it could be transferred to coq-community if it can find a new maintainer there. Have a look at the manifesto. If you think it makes sense, you could open a new issue to advertise that this project is looking for a new maintainer.

Let's close this since it's not in the CI anymore.

authors: Zimmi48 bmsherman maximedenes ppedrot

repo: bmsherman/topology


text:
Issue about the [matcher.lambda]'s adaptive setting

Hi, our group is trying  #on barefoot.
When reading the wiki and source code I came across the parameter matcher.lambda. It is adaptively set as the function of sampling time:
double beta = lambda == 0 ? (2.0 * Math.max(1d, candidates.one().time() - predecessors.one().time()) / 1000): 1 / lambda;
It works in our experiments. But I noticed in the original paper of Paul Newson and John Krumm, the parameter is set related to the distance of sampling points and route points.
Would you tell about how you decide the adaptive parameter only considering sampling time, while the intuition may relate the parameter to distance. #

In their paper, Newson and Krumm used a probability model that uses the distance to determine the probability of a route to be the transition between two matching candidates. The idea is to be time-independent since time can vary due to traffic jams, traffic lights etc. However, in a closed and non-representable dataset, we found that shortest paths let traces often go over hedges and ditches especially if sampling rates are low, i.e. 60 seconds intervals or more between two position measurements. The intuition was that if we would manually route between position samples, we would choose paths like a router which is usually fastest path plus it considers some factors that represent road types. Therefore, you will see that the probability model implemented here uses the time-priority cost function to determine the probability of a path. As a consequence, lambda parameter must be chosen to be an expectation value of the time-priority based probability model which is naturally the time interval of two position measurements, converted from microseconds to seconds, multiplied with a factor of some kind of average road type factor, here chosen 2. The positive side effect is that it is now also adaptive to varying sampling rates since the expectation value to be found is nothing else but the given time interval instead of an "artificially" and statically chosen value. Further, I never encountered any problem of being time-dependent because the only practical direction to vary in time is that a vehicle takes longer because of traffic jams and traffic lights which, however, naturally increases then the density of samples in space (if we assume a static sampling rate) and, hence, smoothes the effect of traffic jams and traffic lights again naturally.
As said, this was evaluated with a closed and non-representable dataset, but feel free to evaluate it yourself if you have some good dataset. You can also easily adapt the probability model of this library if you like. Also, if you find a general improvement of the probability model be sure that it will be implemented in barefoot ASAP. :)

Thanks for you explanation about this. I notice that you use this statement:
final double base = 1.0 * spatial.distance(predecessors.one().point(), candidates.one().point()) / 60;
By this, you mean that thee straight line speed between two points is estimated as 60m/s? How do make this decision?

authors: XiaoXiCanNotFly liuyialfred smattheis

repo: bmwcarit/barefoot


text:
not working

Hey there,
as I'd like to use this plugin, I don't seem to be able to make it work as expected. i got the following setup to try caching some results, fetched from my package.json:
Controller:
<?php

use Bnomei\Lapse;

return function ($kirby, $page) {

    $key = crc32($page->url());

    $expires = 5;

    $data = function () use ($kirby) {
        $file = F::read($kirby->root('base') . '/package.json');
        $content = json_decode($file, true);

        return $content['dependencies'];
    };

    $data = Lapse::io($key, $data, $expires);

    return compact(
        'data',
    );
};

Template:

    <?php foreach ($shit as $library => $version) : ?>

<?= $library ?> is version <?= $version ?>

    <?php endforeach ?>

.. but changing version numbers immediately gets shown where I expected a cached version to be delivered. Or maybe I got the concept wrong?
Any pointer in the right direction is highly appreciated.

@S1SYPHOS sorry to respond so late. feel free to ping me on slack if i ever miss a issue again.
are you on debug mode => true? then the plugin will not cache anything – even wipe the cache.

based on you code i doubt that might be happening (since you use the url) but it could also be that you use the same key somewhere else an thus overwrite the result.
the plugin can take care of the key automatically if you want to reduce it to a one-liner.
    $data = Lapse::io($page, function () {
        $file = F::read(kirby()->root('base') . '/package.json');
        $content = json_decode($file, true);

        return $content['dependencies'];
    }, 5);

another good tip is to add any object you use() to the keys array as well. then the automatic key will create different caches when the other object changes.
$flag = get('file', 'package');
$data = Lapse::io([$page, $flag], function () use ($flag) {
    $file = F::read(kirby()->root('base') . '/'.$flag.'.json');

will check that, thx!


text:
[gateway]: multi wallet support like wallet connect and others

Issue Type

[ ] bug report
[x] feature request

Current Behavior

Expected Behavior

Support the Wallet Connect to let users use the multisig
Steps to Reproduce

Suggested Fix

RainbowKit to have multi-wallet support and other benefits even going to support custodial wallets & fiat on ramps
https://www.rainbowkit.com/
Fairly easy to integrate & widely used.

RainbowKit to have multi-wallet support and other benefits even going to support custodial wallets & fiat on ramps
https://www.rainbowkit.com/
Fairly easy to integrate & widely used.

Ok! Sounds good!

rainbowkit and web3connect are not suitable at this moment. They use the wagmi package as the wrapper as the ethers package. wagmi uses react hook to create interfaces which is not suitable for our networkservice.
Therefor, the walletconnect v1 is added.

https://github.com/bobanetwork/boba/pull/625

authors: Boyuan-Chen sk-enya

repo: bobanetwork/boba


text:
--freqnum and --freq not mentioned in README.md

By reading README.md it would seem as if the program is only able to generate coordinates from negative modes. It would be nice to mention --freqnum and --freq, so it's perfectly clear that you can use it with any mode.

OK - thanks for the suggestion, will do that!

I've added a new example, showing how this functionality can be used to go from planar cyclohexane to two different minima (chair-shaped or twist-boat) depending on which normal mode is initially displaced.

authors: bobbypaton marianoastor

repo: bobbypaton/pyQRC


text:
add rebalance feature

https://www.bogleheads.org/wiki/Tax-efficient_fund_placement
https://www.bogleheads.org/wiki/Rebalancing

commit towards this: better stock/bond/other categorization with subcategories in UI

Now the holdings view shows both desired allocations and actual locations.

repo: bogle-tools/site


text:
Implementation of ODEInitCodeComponent class that creates a part of a report

Class is to implement in ode.en.py module that is a reporting component of usage of reporting components for ODESystem class.

Call code:
from dynpy.utilities.components.ode.en import ODEInitCodeComponent
from dynpy.models.odes.linear import LinearFirstOrder

ode_test = LinearFirstOrder.from_reference_data()

ODEInitCodeComponent(ode_test)

authors: Danielstryjewski bogumilchilinski

repo: bogumilchilinski/dynpy


text:
Estudar tipos compostos e estruturas de dados em Python

Obrigatório:

[ ] Strings
[x] Listas
[x] Dicionários

Dependência: #5.

Como o jogo não fará por enquanto manipulação de strings, isso ficará para depois, quando for tratar a entrada de dados com expressões regulares em #13.


text:
Fix conanfile recipe

It seems that the latest conan release changed the layout of the package options, so map syntax no longer works (Or it never had to be working and was my fault...).
I kept the revert commit in the history to make clear when I received and applied the conan.io feedback (Thanks @memsharded!).

You are welcome @Manu343726 , sorry to have broken the built, it was really bad luck that your self.options[option] was producing a correct output when it shouldn't.

repo: bombela/backward-cpp


text:
Estructura de issues labels

Crear y documentar una estructura de issue labels adecuada para este proyecto.
Partir de la siguiente url: issue-labelshttps://docs.readthedocs.io/en/stable/development/issue-labels.html).

se han configurado los labels adecuados para el proyecto. Se pueden visualizar en la siguiente URL:
https://github.com/boneless-chicken/Nugget-UI/labels

Se ha iniciado la wiki del repositorio y se añadió una pequeña sección en el home con la URL hacia la documentación generada por Github de los Labels
https://github.com/boneless-chicken/Nugget-UI/wiki/Inicio

repo: boneless-chicken/Nugget-UI


text:
Missing linter binaries

At least, these two binaries are missing from the list in the readme:
go get -u github.com/gordonklaus/ineffassign
go get -u github.com/jgautheron/goconst/cmd/goconst

Thank you @mdouchement.
I'm not really sure where the plugin use those binaries.

authors: bongnv mdouchement

repo: bongnv/atom-ide-golang


text:
Bug: Assertion error

Hi guys,
I am using Boogie to verify my program but have experienced an issue:
It seems the following code should pass the test but the verifier reports that the assertion might not hold... Is this a bug or I missed something?
var array:[int]int;

procedure F(n: int) returns (r: int)
modifies array;
{
  var a:int;
  var b:int;

  assume a < b;

  assume (forall i:int :: 0 <= i && i <= b-a ==> array[i+a] == a+i);
  assert (forall i:int :: a <= i && i <= b ==> array[i] == i);

}

Thanks,
Jianyi Cheng

I do not see any precondition that characterizes the contents of array.  I
would not expect this program to verify.
On Mon, Mar 11, 2019 at 8:19 AM Jianyi Cheng notifications@github.com
wrote:

Hi guys,
I am using Boogie to verify my program but have experienced an issue:
It seems the following code should pass the test but the verifier reports
that the assertion might not hold... Is this a bug or I missed something?
var array:[int]int;
procedure F(n: int) returns (r: int)
{
var a:int;
var b:int;
assume a < b;
assume (forall i:int :: 0 <= i && i <= b-a ==> array[i+a] == a+i);
assert (forall i:int :: a <= i && i <= b ==> array[i] == i);
}
Thanks,
Jianyi Cheng
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/boogie-org/boogie/issues/116, or mute the thread
https://github.com/notifications/unsubscribe-auth/AHURFrVLudAVrV7pfRMXc2MVD7RcW3FCks5vVnPzgaJpZM4bo3Mg
.

Hi @shazqadeer,
Thank you for instant reply!
I am trying to describe a group of array data indexed from a to b is overwritten in the procedure F using assume. The original array data can be arbitrary values. This information can be used for other assertions (so we know array[i] where i >= a && i <= b have certain values).
Maybe I wrote the program in a wrong way? I do not want to unroll the assignments to array[] in a big loop and think that using assume and forall may describe the same conditions.
Interestingly I found Boogie works with the following statements:
assume (forall i:int :: a <= i && i <= b ==> array[i] == i); // cond 2
assert (forall i:int :: 0 <= i && i <= b-a ==> array[i+a] == a+i); // cond 1

Does it means that Boogie takes cond 2 as only the sufficient condition of cond 1 but not necessary condition?
Jianyi

I did not spot the assume before the assert.  The assertion in your program indeed holds.  Sorry for the confusion.
You are running into the problem of incomplete handling of quantifier instantiations in the automated theorem prover behind Boogie.  To prove the assertion  a <= i0 && i0 <= b ==> array[i0] == i0 for an arbitrary i0, the quantifier in the assume statement must be instantiated at i0-a but the theorem prover is not smart enough to figure it out.  This is a well-known limitation and could be addressed by providing an instantiation-triggering expression as follows:
var array:[int]int;
function f(int): bool {
true
}
procedure F(n: int) returns (r: int)
{
var a:int;
var b:int;
assume a < b;
assume (forall i:int :: {f(i)} 0 <= i && i <= b-a ==> array[i+a] == a+i);
assert (forall i:int :: f(i-a) && a <= i && i <= b ==> array[i] == i);
}
Now the prover attempts to prove f(i0-a) && a <= i0 && i0 <= b ==> array[i0] == i0.  The triggering hint expression {f(i)} in the assume statement looks for any expression of the form f(_) and instantiates _ for i in the quantifier.  In this case, i0-a will be chosen and that does the job.

Thank you so much for your solution and explanation!
Great to know what happens behind the scene. :)

The difference between
assume (forall i:int :: 0 <= i && i <= b-a ==> array[i+a] == a+i);

and
assume (forall i:int :: a <= i && i <= b ==> array[i] == i);

is significant.
For the latter, the subexpression array[i] will automatically be selected as a matching trigger. This is good--anytime the verifier sees an expression of the form array[X] for any expression X, it will instantiate the quantifier with i := X.
The former has no good matching trigger for the quantifier. The subexpression array[i+a] is close, but no cigar. To use it as a trigger would be asking the verifier to instantiate the quantifier anytime it sees an expression of the form array[X+a], but since + is an interpreted function symbol, it would only be by luck that you might get an appropriate instantiation. Specifically, in your original program, the verifier is trying to prove something about array[k] (where I'm using k instead of i in your assertion, to avoid name clashes in my explanation). The verifier would then need to invent an X such that X+a equals k, and it won't do that.
In general, try to arrange so that the bound variable you want instantiated sits in a good place, like array[i] or f(i), not array[i+a] or f(i+a). You can read more about matching-trigger considerations here:

K. Rustan M. Leino, Clément Pit-Claudel:
Trigger Selection Strategies to Stabilize Program Verifiers. CAV (1) 2016: 361-381

or here:

Nada Amin, K. Rustan M. Leino, Tiark Rompf:
Computing with an SMT Solver. TAP 2014: 20-35

As described in the CAV paper, the Dafny verifier performs some rewrites of user-provided quantifications in order to get better triggers.
Rustan

@RustanLeino
Thank you so much for the comments and literatures!
It helps a lot!

authors: JianyiCheng RustanLeino shazqadeer

repo: boogie-org/boogie


text:
add setting

Closes #
https://github.com/boomerang-io/roadmap/issues/352
Changelog
New

Add new setting

Changed

N/A

Removed

N/A

Testing / Reviewing
Tested and verified locally

Hey @amhudson an updated payload for the settings.
{
    "_id" : ObjectId("62a7bec0a6166d30aff64a5b"),
    "config" : [
        {
            "description" : "The default auth token for authenticating as a Slack app. Only used if installing into a single workspace and not a distributed app.",
            "key" : "slack.token",
            "label" : "Slack Auth Token",
            "type" : "secured",
            "value" : "",
            "readOnly" : false
        },
        {
            "description" : "The App ID from your Slack apps credentials.",
            "key" : "slack.appId",
            "label" : "Slack App ID",
            "type" : "text",
            "value" : "",
            "readOnly" : false
        },
        {
            "description" : "The Client ID from your Slack apps credentials.",
            "key" : "slack.clientId",
            "label" : "Slack Client ID",
            "type" : "text",
            "value" : "",
            "readOnly" : false
        },
        {
            "description" : "The Client Secret from your Slack apps credentials.",
            "key" : "slack.clientSecret",
            "label" : "Slack Client Secret",
            "type" : "secured",
            "value" : "",
            "readOnly" : false
        }
    ],
    "description" : "Define the configuration for integrating with the extensions.",
    "key" : "extensions",
    "lastModiifed" : ISODate("2022-06-15T12:07:48.123Z"),
    "name" : "Extensions Configuration",
    "type" : "ValuesList",
    "_class" : "io.boomerang.mongo.entity.FlowSettingsEntity"
}

authors: amhudson tlawrie


text:
Add CI

Consider adding https://github.com/jeking3/boost-ci to improve quality.

I am not familiar with Boost.CI (is it an officially release component of Boost, like BJam?). I'll look into it can consider it if/when a new release of Boost.Contract is required.

Not officially, but I am part of the Community Maintenance Team and have been using it over the last year on about 20 boost repositories to improve quality.

If you copy the LICENSE file out of Boost.Assign into the top level of your repo, GitHub will automatically tag it using BSL-1.0 for licensing.

The AppVeyor build results should be ready around 12AM EST.
Travis is building now.  I opened some issues related to the failures I've seen so far.
AppVeyor Build Results: https://ci.appveyor.com/project/jeking3/contract/builds/20042520
Travis CI Build Results: https://travis-ci.org/jeking3/contract/builds/450610128

OK, I will consider adding Boost.CI to Boost.Contract.

I won't have time to add Boost.CI to Boost.Contract in release 1.1.0. However, this would be a good thing to do since it already found a couple of errors when it was ran locally by jeking3... it could also be done by whomever has the time to do so. Maybe do it and send me a pull request for consideration.

I'm working on this:
https://github.com/jeking3/contract/pull/1
However the test suite for Boost.Contract seems to take a long time and is causing timeouts.  I have to pare down the language levels supported in the build jobs I guess.  Why do the tests take such a long time?  I haven't looked yet.

Make sure you only run the tests under the test/ directory (you don't need to run the examples under the example/ directory instead). I think the tests take a long time just because there's really a lot of them, one for every feature and there's quite a few combinations to test (there's ever more combinations if you consider contracts that can selectively disable at compile-time #defining the BOOST_CONTRACT_NO_... macros but these extra test permutations which really take days to run are not part of the default test build unless you specify extra bjam params bc_no=...).

repo: boostorg/contract


text:
Library redirects

On the old website boost.org a URL with this format:
https://www.boost.org/libs/unordered
redirects to
https://www.boost.org/doc/libs/1_84_0/libs/unordered/doc/html/unordered.html
It goes to the latest documentation of the library.  A boost developer has requested this functionality for the new website also.

On the new website this is a valid URL: https://www.boost.io/libraries/unordered/
Therefore perhaps the most straight-forward solution is to simply add routes like this.
https://www.boost.io/libs/unordered/ -> https://www.boost.io/libraries/unordered/
And that's it.
As long as the link isn't showing a 404, and it link to what we consider the main page for the library.

I don't like having /libraries/ can we please change it to /libs/? Having /libs point to /libraries is an unnecessary extra complication. Just make it /libs/

@vinniefalco we can definitely do that, but if we make /libraries/unordered/ be /libs/unordered/ then we cannot do the original intent of this ticket.  It would have to be the library detail page and not the latest docs.
It's not a big deal, but part of why we picked /libraries/ originally was partly SEO (small improvement to have whole word in the URL) but also so we didn't get in the way of that redirect I believe.

heh yeah just let me know what you want to do here @vinniefalco

I'd say that making the old links continue to work, while maintaining the canonical URLs as still using /libraries (since the SEO part is important), would make the most sense.
So if we think it is of benefit that existing users who are accustomed to seeing /libs/ in the URL and have it either bookmarked or they're following a link from the docs that works on the existing site, would continue seeing /libs/ there in the address bar, that's fine, but the pages should then have a reference to the canonical URL as being /libraries and a user getting to the libraries section by first coming to boost.io would be seeing the URL as /libraries.
The connection with the doc URL, would make more sense to me if the URL were /libs/docs/..  I'm not exactly even sure why the /libs/ is part of the doc URL except just that that's how it's always been.  It would make more sense to me if it were /doc/boost_1_84_0/libs/ from a hierarchical standpoint?  But I'm not wanting to really steer the conversation this way.
I think the front-facing website which has the purpose of introducing people to Boost, and so is in a way the "marketing" side of things, should have the best practices for SEO adhered to since that will only help bring new people to find the docs.
But I'll defer to @vinniefalco on this too, just chiming in with my thoughts.

The new website must strive to preserve identically, the functionality of the old site. Only when we have thoroughly ported everything that users of the old site expect should we then contemplate innovations. Applying this principle to this issue, we should:

make https://boost.io/libs/X redirects to the documentation page for X
make https://boost.io/libraries/X bring up the Library Detail page

Google doesn't seem to index simple redirects, and we want Google to not index libs/X so that's fine. Google will index libraries/, and that is an SEO-optional name so we are also good there.

authors: 4down frankwiles sdarwin vinniefalco


text:
Add periodic tasks for updating release report data

Add periodic tasks that update release report utilized data that updates the versions, commit updates, contributors , mailing lists, issues and mailing list data (and anything else that's needed, except the slack reports, as they are updated daily) so that everything is current without having to click each button manually.

After discussing, this will be a manually run "supertask" rather than many periodic tasks.  For many of these tasks, it is not useful to run them frequently.  They just need to be run after a release.


text:
Update footer to have styles for light mode

Because of course white will not show on a white background.

I'm going to close this one too, for now.


text:
[Accordion] Menu button is not worked after opening editing cards.

Environment:
Version : XComponents - version 0.1
Device : Iphone 6 IOS 8.1.3 Safari browser   1334x750 4.7
Steps to reproduce:

Open Cards page - http://demo.xcomponents.org:3000
Open any contact  (confirn that edit contact menu displayed)
Tap Cancel button
Tap Back button
Tap Menu button

Expected result:
Menu opened
Actual result:
Menu button is not worked
2015-02-17_11-51-44.mp4

Reproduce for me. But, please, provide more clear steps - bug is understood only after watching video
XComponents - version 0.1
iPhone 4s iOS 8.1.3
Safari 3.5" (640 x 960)

I updated steps to reproduce. Max, thanks for your note.

repo: bootcards/xcomponents


text:
docs: add imports for useModalController examples

fixes #1787
documentation fix for useModalController
adds missing imports
PR checklist

[x] Documentation update - docs(...)

The PR fulfills these requirements:

[x] Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

https://github.com/bootstrap-vue-next/bootstrap-vue-next/issues/1787#issuecomment-1957390952

authors: VividLemon stevemandl

repo: bootstrap-vue-next/bootstrap-vue-next


text:
🛑 API Staging is down

In 94003d6, API Staging (https://api-staging.bvrdev.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: API Staging is back up in 8c479d3 after 7 minutes.

repo: borderlessvr/upptime


text:
ResourceOwner parameter doesn't validate as documented

Hi,
Not sure if this is the correct place for this, but I'm having some trouble with iam.simulate_principal_policy when setting ResourceOwner:
#!/usr/bin/env python

import boto3

iam = boto3.client('iam')

response = iam.simulate_principal_policy(
        PolicySourceArn='arn:aws:iam::<actualaccountid>:role/moo',
        ActionNames=['s3:GetObject'],
        ResourceOwner='123456789012')

When I run this I get:
Traceback (most recent call last):
  File "./moo.py", line 10, in <module>
    ResourceOwner='123456789012')
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 317, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 615, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidInputException: An error occurred (InvalidInput) when calling the SimulatePrincipalPolicy operation: '123456789012' is not a valid as a Resource Owner.

I've tried with a valid account id and it's the same problem. I also tried specifying the account id with hyphens, like so 1234-5678-9012, and as an arn like so arn:aws:iam::123456789012:root but still get the same error.
Documentation says:
       --resource-owner (string)
          An AWS account ID that specifies the owner of any simulated resource
          that  does not identify its owner in the resource ARN, such as an S3
          bucket or object. If ResourceOwner is specified, it is also used  as
          the  account owner of any ResourcePolicy included in the simulation.
          If the ResourceOwner parameter is not specified, then the  owner  of
          the resources and the resource policy defaults to the account of the
          identity provided in CallerArn . This parameter is required only  if
          you  specify  a  resource-based  policy  and  account  that owns the
          resource is different from the account that owns the simulated call-
          ing user CallerArn .

Pretty sure that's what I'm providing.
I see the same issue with the aws cli:
aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::<actualaccountid>:role/moo --action-names s3:GetObject --resource-owner 123456789012

An error occurred (InvalidInput) when calling the SimulatePrincipalPolicy operation: '123456789012' is not a valid as a Resource Owner.

boto3==1.5.4
botocore==1.8.18
awscli==1.14.14
Thanks in advance for any help.

This error is actually coming back from the service. So unfortunately there's not a lot we can do on the cli/boto side of things. It might be worth asking on stackoverflow or opening a support ticket here.
I'm not an expert in the policy simulation API but, I think is actually related to the fact that there's no resource based policies being tested in the simulation. Since you're providing a role this is actually an identity based policy. More info here.

OK, thanks joguSD. Will try support. I get the same problem with a resource-based policy simulation too. Maybe I'm doing it wrong.

authors: Bashton-MattBuckland joguSD

repo: boto/botocore