[Event Request] Codeunit::"Inventory Profile Offsetting" - Function FindCombination - OnAfterFindSKUForCombination

We like to request the following Event:
Object: Codeunit::"Inventory Profile Offsetting"
Function: FindCombination
Publisher Event: OnAfterFindSKUForCombination
Reason: To implement custom business logic
Where is the event placed:
if SKU.FindSet then begin
repeat
IsHandled := false;
OnAfterFindSKUForCombination(SKU, TempSKU, IsHandled);
if not IsHandled then begin
PlanningGetParameters.AdjustInvalidSettings(SKU);
if (SKU."Safety Stock Quantity" <> 0) or (SKU."Reorder Point" <> 0) or
(SKU."Reorder Quantity" <> 0) or (SKU."Maximum Inventory" <> 0)
Event Code:
[IntegrationEvent(false, false)]
local procedure OnAfterFindSKUForCombination(var SKU: Record "Stockkeeping Unit"; var TempSKU: Record "Stockkeeping Unit"; var IsHandled: Boolean)
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


"Select Component" like "Select 2"?

I used to use select2 with BS3.
Have any Select Component for this?

FormsySelect. If you need more advanced features than Material-UI SelectField supports, feel free to contribute there.

Thanks, I can't help (new for react & material).
It mean react select/combo!

Not supported at the moment.


fix: Incorrect duration and animate utilities (close #404)

Description 📖
This pull request fixes the problems described in #404.
Added a test that ensures these invalid usages do not generate CSS rules.
Background 📜
It seems that processing < tokens opened up the door for a new category of bugs in utilities that were created prior to the change supporting <sm and similar variants. A similar bug is #403.
Perhaps instead of only fixing it at the utility level on a case-by-case basis, these tokens should not be interpreted as utilities in the first place:
// extract.ts line 61
const matches = !className.startsWith('<') && className.match(/\w+/);

However, the duration.value case suggests that the regex in the plugin utils should be more strict, as . should only occur if there's also a - in the token, as in ml-1.5. Am I missing a case here?
Test Case
Before
  .\<transition {
    -webkit-transition-property: background-color, border-color, color, fill, stroke, opacity, -webkit-box-shadow, -webkit-transform, filter, backdrop-filter;
    -o-transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-box-shadow, transform, -webkit-transform, filter, backdrop-filter;
    -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    -o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition-duration: 150ms;
    -o-transition-duration: 150ms;
    transition-duration: 150ms;
  }
  .\.duration {
    -webkit-transition-duration: 150ms;
    -o-transition-duration: 150ms;
    transition-duration: 150ms;
  }
  .duration {
    -webkit-transition-duration: 150ms;
    -o-transition-duration: 150ms;
    transition-duration: 150ms;
  }
  .duration\.value {
    -webkit-transition-duration: 150ms;
    -o-transition-duration: 150ms;
    transition-duration: 150ms;
  }
  .\<animate {
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
  }

After
No CSS rules

Codecov Report

Merging #405 (dfb25e6) into main (4368925) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   88.20%   88.22%   +0.01%
==========================================
  Files          56       56
  Lines        4782     4788       +6
  Branches     1029     1032       +3
==========================================
+ Hits         4218     4224       +6
  Misses        301      301
  Partials      263      263

Impacted Files
Coverage Δ

src/lib/utilities/dynamic.ts
94.32% <100.00%> (+0.03%)
:arrow_up:

Continue to review full report at Codecov.

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

I think we might need a better solutions to this. Ideally, . and < is only used in .dark and <sm, for other utilities, we should not have them detected.

Agreed. Feel free to modify this PR, the added test should be useful to prevent regressions.
Ideally, the plugin does not even send these invalid tokens to the compiler, but the compiler could also filter them out in a first pass in extract.ts.

Is there any new progress in this pr?


Incorrect txdata format in output

Description
When running mythril v0.22.22 on the following contract:
pragma solidity ^0.4.20;

contract Freemoney {
    bool[4096] flags;

    function Freemoney() public payable
    {
        require(msg.value == 0.1 ether);
        flags[1234] = true;
    }

    function extractMoney(uint256 idx) public payable
    {
        require(flags[idx]);
        msg.sender.transfer(this.balance);
    }
}

via
myth analyze --unconstrained-storage -m EtherThief --solv=0.4.20 array.sol

I receive the following output:
==== Unprotected Ether Withdrawal ====
SWC ID: 105
Severity: High
Contract: Freemoney
Function name: extractMoney(uint256)
PC address: 208
Estimated Gas Usage: 2567 - 37178
Any sender can withdraw Ether from the contract account.
Arbitrary senders other than the contract creator can profitably extract Ether from the contract account. Verify the business logic carefully and make sure that appropriate security controls are in place to prevent unexpected loss of funds.
--------------------
In file: array.sol:15

msg.sender.transfer(this.balance)

--------------------
Initial State:

Account: [CREATOR], balance: 0x21410c01400a0002, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x42080080502040000, nonce:0, storage:{}
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}

Transaction Sequence:

Caller: [CREATOR], calldata: , value: 0x16345785d8a0000
Caller: [ATTACKER], function: extractMoney(uint256), txdata: 0xab125858, value: 0x0

Expected behavior
The expected output should contain the following txdata: ab12585800000000000000000000000000000000000000000000000000000000000004d2
Environment
I am using 3.8.10 on Ubuntu 20.04.

I would like to describe some similar instances of unexpected behavior / undetected (or incorrectly detected) vulnerabilities.

Similar output is produced when analyzing the same contract on-chain (e.g. via ganache). In particular the same "attack" with txdata: 0xab125858 is detected. Notably, no getStorage requests are issued by mythril.
The same happens when replacing the hardcoded constant 1234 by a contract constructor parameter. I.e. when analyzing the contract on-chain, the array index value required to extract funds is not output by mythril and no getStorage requests are performed.
If we ditch querying an array in the contract storage and simply require guessing the value of some integer variable, i.e.pragma solidity ^0.4.20;

contract Freemoney {
    uint256 theVal;

    function Freemoney() public payable
    {
        require(msg.value == 0.1 ether);
        theVal = 1234;
    }

    function extractMoney(uint256 val) public payable
    {
        require(val == theVal);
        msg.sender.transfer(this.balance);
    }
}

The vulnerability is detected correctly when analyzing the solidity source directly, but once again the same incorrect output is produced when analyzing on-chain (and no getStorage queries happen).
When replacing msg.sender.transfer(this.balance) with suicide(msg.sender) in the contract code and EtherThief module with AccidentallyKillable in the mythril command line, analogous behavior is observed (with a different SWC).

Generally, I am wondering whether mythril is capable of consistently detecting vulnerabilities where the attacking transaction is dependent on some value in the contract storage (via contract code and on-chain). Is it expected to work at all? Can it be done by applying mythril in some different way?

Since you are using un constrained storage option which will assume the contract is already constructed with storage that can be anything, this results in the given tx data. You need to increase the solver timeout but there still seems to be some issue with transaction data.

Hi. Thanks for your reply!
Could you please explain the --unconstrained-storage option in a bit more detail? I cannot find any documentation. Do you mean it allows contract storage to contain any values at the time of the attack transaction and ignores any previous assignments?
Anyway, I tried removing this option and setting a high --solver-timeout. This helped in the case of determining the value of a single storage variable (i.e. the second contract above). getStorageAt request happens and the correct argument to extractMoney is produced. Execution time actually does not exceed previous attempts. Great.
However in the array case (first contract), the results are unchanged, although execution now takes a long time. With --solver-timeout 1000000 when analyzing the contract on-chain, analysis ran for ~85 minutes and the same incorrect txdata was produced and no getStorageAt requests occurred. The latter makes me doubt that simply further increasing timeout can help. By the way, for some reason, analyzing source code is ~5x faster (with the same result).
So the question remains whether mythril can correctly determine the problematic argument to extractMoney in the OP contract and if some bug is currently preventing this.

unconstrained storage will just assume the contract's storage can contain any value, it's mostly useful for running runtime-bytecodes. Since it assumes the storage to contain any value it leads to false positives since some storage states may not be possible to be achieved.

This issue is actually related to the one I am currently working on. There are issues with exponentiation since SMT solvers cannot directly support exponentiation without a significant slowdown due to the non-linear arithmetic. Boolean arrays are handled differently when compared to integer arrays, Instead of storing true at  some offset + idx in storage they  store power(256, last_6_bits(idx)) at offset + first_250_bits(idx) which mythril cannot handle properly due to the non linear arithmetic. Just change the boolean array to uint256 and you will see the true value, and it should run quite fast.

Thx for the explanation. After this change the array example indeed works as expected (when analyzing the source).
When analyzing on-chain, it still doesn't work (reports no attack at all). On-chain storage is not queried. Increasing timeout has no effect. However the vulnerability is detected when passing the contract creation tx input directly (via -c).

@loki3451 , are you analyzing it with an address?

Yes, that is what I mean by "on-chain". With an address after deploying to ganache. Can you reproduce this behavior?
I've changed the contract to:
pragma solidity ^0.4.20;

contract Freemoney {
    uint256[4096] flags;

    function Freemoney() public payable
    {
        require(msg.value == 0.1 ether);
	flags[1234] = 1;
    }

    function extractMoney(uint256 idx) public payable
    {
        require(flags[idx] != 0);
        msg.sender.transfer(this.balance);
    }
}

and run mythril as follows:
myth -v5 analyze --solver-timeout 600000 -m EtherThief --rpc localhost:8546 -a 0x54f17eca4A38C71319F253374D4c91CD572ded9f

(running time is 2-3 seconds). Attaching log just in case.
myth.array.int.onchain.2.log

This is a different issue, Since the storage ranges from 0 to 2**256 -1, it's not possible for mythril to load up all the storage for the contract, Hence there will be some issues when a storage access happens with respect to some symbolic index.The issues with the bool arrays should be fixed now, so I am closing this issue, feel free to open it if it still persists.

Appreciate your reply. Would be great if you could explain a bit further.

It seems that most of the 2**256 storage locations you mention can be safely ignored. Would it theoretically be feasible to load and further consider only initialized storage locations for a given on-chain contract?

Why is storage loaded when working with a single uint256 variable, but not with an array? Even if the array is of size 1 actually.

Does it make sense to open a new issue (or re-open this one) to further pursue this discussion? The question being: "can mythril (be enhanced to) detect vulnerabilities dependent on values of array elements in on-chain contract storage?"

Yes, but we do not know what storage locations to ignore as json rpc does not provide an easy endpoint for such information, The only access to storage that I know of is to give the index of the storage but we do not know what indices of storage are initialised this can probably be curbed by some heuristics but might be a bit expensive
arrays have accesses like array[index] where the index can range anywhere from 0 to 2**256-1, when a variable is accessed its location in storage is fixed, so it does not have such an issue.
It would be easier to track if you can open a new issue to discuss this, I can try out some heuristics to handle arrays, but it would be hard to handle mappings efficiently due to the current json RPC.


Question re. errors

I gave OptimusPy a try today, but I run into errors at the end.
Any idea what could be wrong? Am I missing a package or something (I did check requirements.txt)?
Completed analysis for cube '011_PnL'
Updated dimension order for cube '011_PnL' to ['Function_PL', 'Cost_element', 'Data_source', 'Reporting_entity', 'Currency', 'Product_group', 'Period', 'Version_Master', 'PnL_measure']
Traceback (most recent call last):
File "C:/TM1py/tm1py-samples-master/optimus-py-master/optimuspy.py", line 253, in
output=cmd_args.output)
File "C:/TM1py/tm1py-samples-master/optimus-py-master/optimuspy.py", line 197, in main
RESULT_PATH / RESULT_PNG.format(cube_name, view_name, TIME_STAMP))
File "C:\TM1py\tm1py-samples-master\optimus-py-master\results.py", line 166, in to_png
plt.savefig(file_name, dpi=400)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 689, in savefig
res = fig.savefig(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\figure.py", line 2094, in savefig
self.canvas.print_figure(fname, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 88, in print_figure
super().print_figure(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 2075, in print_figure
**kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 521, in print_png
cbook.open_file_cm(filename_or_obj, "wb") as fh:
File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 112, in enter
return next(self.gen)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\cbook_init_.py", line 407, in open_file_cm
fh, opened = to_filehandle(path_or_file, mode, True, encoding)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\cbook_init_.py", line 392, in to_filehandle
fh = open(fname, flag, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'results\011_PnL_Optimus_2020-12-02_19-09-39.png'

Hi @hermie64,
I was able to replicate the error. Currently, optimus fails if the results-foder doesn't exist.
For now, you can just create a results folder manually.
I will create a fix for Optimus so that it creates the folder autonomously

Thanks @MariusWirtz


Show QR Code not working, no options highlighting

On Lubuntu 17.10, build v1.5.1:
When right clicking on a receiving address and selecting the "Show QR Code" option then nothing happens. Maybe you already know about this but thought I'd mention if not.
Also when hovering the mouse over the options of a receiving address (Copy Address, Copy Lablel, Edit, Show QR Code, Sign Message) no options are highlighted. Ie the option isn't highlighted in a different colour, although all other options are functional. This isn't a bug but thought it'd be worth mentioning too.
Hope that helps. Other than that it's all working perfectly. Great job!

Just checked it in other QT wallets and doesn't work either, should of done that before!
QT problem not DeepOnion, closed.


Winget tries to replace Microsoft.WindowsSDK version

Brief description of your issue
Winget tries to upgrade Microsoft.WindowsSDK from build 19041 to build 22621 in-place while I believe these versions should be possible to be installed side-by-side. Otherwise, the user will be forced to retarget their development projects.
Name                                                      Id                                Version          Available    Source
--------------------------------------------------------------------------------------------------------------------------------
Windows Software Development Kit - Windows 10.0.19041.685 Microsoft.WindowsSDK              < 10.0.22000.832 10.0.22621.1 winget

Steps to reproduce

Install Microsoft.WindowsSDK - version 19041 (e.g. as part of Visual Studio).
run winget upgrade --all

Expected behavior
Microsoft.WindowsSDK having separate packages for major builds.
Having in-place revision updates is allright, but major build updates is not.
Actual behavior
Winget tries to upgrade Microsoft.WindowsSDK from build 19041 to build 22621 in-place
Environment
Windows Package Manager v1.3.2091
Windows: Windows.Desktop v10.0.22000.795
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2091.0

I believe these versions should be possible to be installed side-by-side

You're right. So it will be.

I think he should ignore such packages, not offer to update them.

Likely every major build should have its own ID, like

Microsoft.WindowsSDK.19041
Microsoft.WindowsSDK.22621

instead of all sharing the same ID (Microsoft.WindowsSDK) to prevent these updates?

After installation, winget will prompt to update the SDK again )

We don't check for an installed version of a package before we offer an upgrade yet. It's in progress for the 1.4 release. Running winget list after running upgrade will help confirm if the new version was installed side by side. After that running winget upgrade again will likely still show the upgrade to the older package is available if the versions are under the same "package".

I think this work is going to be part of:

https://github.com/microsoft/winget-cli/issues/2129

Also, if I may add to this, although I alread have SDK 10.0.22621.1 installed, winget upgrade shows this (even after running winget upgrade --all)
Name                                          Id                                  Version          Available     Source
-----------------------------------------------------------------------------------------------------------------------
Windows Terminal Preview                      Microsoft.WindowsTerminal.Preview   1.15.2003.0      1.15.2282.0   winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK                < 10.0.22000.832 10.0.22621.1  winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK                < 10.0.22000.832 10.0.22621.1  winget
Microsoft Windows Desktop Runtime - 3.1.27 (… Microsoft.DotNet.DesktopRuntime.3_1 3.1.27           3.1.28        winget
EA app                                        ElectronicArts.EADesktop            <IP_ADDRESS>41    <IP_ADDRESS>44 winget
Microsoft ASP.NET Core 3.1.27 - Shared Frame… Microsoft.DotNet.AspNetCore.3_1     3.1.27           3.1.28        winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK                < 10.0.22000.832 10.0.22621.1  winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK                < 10.0.22000.832 10.0.22621.1  winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK                < 10.0.22000.832 10.0.22621.1  winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK                < 10.0.22000.832 10.0.22621.1  winget
Microsoft .NET SDK 6.0.303 (x64)              Microsoft.DotNet.SDK.6              6.0.303          6.0.400       winget
11 upgrades available.

only thing that helps is uninstalling the old SDK, but I can't do that.

I am seeing this - trying to update both versions (using Winget version v1.4.2161-preview)
Windows Software Development Kit - Windows 10.0.22000.194 Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Windows Software Development Kit - Windows 10.0.19041.685 Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
2 upgrades available.

Same issue here, still annoying

Related, I think. I have .NET Desktop Runtime v6.x installed, then run following command to check if a update to v5.x is available:
"C:\Users\olav.birkeland\AppData\Local\Microsoft\WindowsApps\" list --exact --id Microsoft.DotNet.DesktopRuntime.5 --silent --source winget --accept-source-agreements
Results, winget says v6.x is a newer version of v5.x.

winget upgrade fails to install Microsoft.WindowsSDK

This issue has been resolved now that Microsoft.WindowsSDK has been separated into different packages based on their version. Related PR: https://github.com/microsoft/winget-pkgs/pull/108553
When running winget list or winget upgrade, verified that these packages are listed separated and show the correct available version corresponding to that package.


[#132060265] Check the git tag of the boshreleases prior upload

#132060265 Support: Wrong version of aws-broker deployed in CI
What?
How git-resource and concourse works, and how we implemented the build and upload of bosh-releases, it can happen that we build an older version of the bosh-release and upload it with the wrong version number.
The reason is that regardless the tag-filter configured in the git resource, the versions previously reported  still valid versions for concourse, and likely cached.
If the new version defined in the tag filter is not discovered (e.g. we forgot to add the tag or there was a typo) Concourse might checkout the latest valid version, but not the one defined in tag-filter.
We cannot add a safe-check in the git-resource, as the get might not be executed when the resource is cached.
Instead, and meanwhile we do not migrate to published final bosh releases built in a dedicated CI server, we will add a check before uploading the release, checking if the git tag matches the version.
Dependencies
The PR https://github.com/alphagov/paas-docker-cloudfoundry-tools/pull/74 should be merged first. After it is merged and the new container is generated, you can delete the WIP commit in this branch.
How to review?

run the pipeline, it should pass
Disable the latest version in the git-resource of any bosh release. Rerun cf-deploy. It should fail.

Who?
Anyone but @keymon

https://github.com/alphagov/paas-docker-cloudfoundry-tools/pull/74 is now merged and published.  WIP commit deleted.
Looks good, will re-run in my environment and await travis builds


Schema for generated card

How do you generate the schema for a card you create? I am trying to send a card to a powerautomate webhook and it is asking for a schema. Is there a way to do it via the validator?

Hey @mcfunk, hopefully, I got your question right. You can just make use of the to_json() method available for Card objects. Does that help already? Normally, you don't need to validate the schema.

so trying to send a card to powerautomate sends me an error saying that properties are missing, I try to use the sample payload to make the schema on the powerautomate side. I will see what I can find for history and errors.

Can you tell me a bit more about the error itself? What properties are missing? That would help a lot to trace down the issue. Thanks!

sorry got distracted today at work. seems like it is the Bolder property. i
can test more tomorrow (today) but in about 9 hours. thanks for the
response, more info to come!
On Fri, Aug 9, 2024 at 1:29 AM dennis6p @.***> wrote:

Can you tell me a bit more about the error itself? What properties are
missing? That would help a lot to trace down the issue. Thanks!
—
Reply to this email directly, view it on GitHub
https://github.com/dennis6p/adaptive-cards-py/issues/16#issuecomment-2277328399,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZGHQUA7I2JYSBBKY7SKTTZQRVWJAVCNFSM6AAAAABL4375Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXGMZDQMZZHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

alright, so it appears it was actually just my mistake, it is working as intended, I tried chasing it back to what mistake I may have made and was unable to figure out quite why it didn't work the first time around. Thanks for the response and thanks for the library !

Happy to hear that it works now!


fix(management): remove GraviteeContext from services

Replace https://github.com/gravitee-io/old-gravitee-api-management/pull/61
Issue
fix gravitee-io/issues#6071

Superseded by https://github.com/gravitee-io/gravitee-api-management/pull/971


Node error when updating

Trying to update my laptop running with:
sh mac 2>&1 | tee ~/laptop.log

when this happens in the middle of the process:
Installing NVM, Node.js, and NPM, for running apps and installing JavaScript packages ...
v0.10.35 is already installed.
Now using node v0.10.35

Setting 0.10 as the global default nodejs...
failed

and the whole update quits...
My brew doctor is clean.
I wasn't getting this error since some days ago.
Any idea?

Is this the newest version of the script? We no longer install NVM

probably not, It's from mid Dec 2014

I downloaded the new mac script and everything went ok. I think this can be closed ;)

Awesome!


[Enhancement] fix status check issue in spill-related code

Fix #27471
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 6 / 39 (15.38%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exec/pipeline/hashjoin/spillable_hash_join_build_operator.cpp
0
2
00.00%
[113, 167]

:large_blue_circle:
src/exec/pipeline/nljoin/spillable_nljoin_build_operator.cpp
0
1
00.00%
[82]

:large_blue_circle:
src/exec/pipeline/nljoin/nljoin_context.cpp
0
1
00.00%
[98]

:large_blue_circle:
src/exec/pipeline/hashjoin/spillable_hash_join_probe_operator.cpp
0
4
00.00%
[107, 109, 110, 111]

:large_blue_circle:
src/exec/spill/spiller.hpp
0
1
00.00%
[119]

:large_blue_circle:
src/exec/pipeline/hash_partition_context.cpp
0
1
00.00%
[65]

:large_blue_circle:
src/exec/partition/chunks_partitioner.h
0
1
00.00%
[91]

:large_blue_circle:
src/exec/spill/spill_components.cpp
1
17
05.88%
[45, 136, 139, 141, 162, 184, 187, 195, 196, 199, 221, 223, 482, 487, 532, 589]

:large_blue_circle:
src/exec/spill/spiller.cpp
2
6
33.33%
[108, 110, 113, 114]

:large_blue_circle:
src/exec/spill/mem_table.cpp
2
4
50.00%
[39, 89]

:large_blue_circle:
src/exec/spill/spill_components.h
1
1
100.00%
[]

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 4 / 34 (11.76%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exec/pipeline/hashjoin/spillable_hash_join_build_operator.cpp
0
2
00.00%
[113, 167]

:large_blue_circle:
src/exec/pipeline/nljoin/spillable_nljoin_build_operator.cpp
0
1
00.00%
[82]

:large_blue_circle:
src/exec/pipeline/nljoin/nljoin_context.cpp
0
1
00.00%
[98]

:large_blue_circle:
src/exec/pipeline/hashjoin/spillable_hash_join_probe_operator.cpp
0
4
00.00%
[107, 109, 110, 111]

:large_blue_circle:
src/exec/pipeline/hash_partition_context.cpp
0
1
00.00%
[65]

:large_blue_circle:
src/exec/partition/chunks_partitioner.h
0
1
00.00%
[91]

:large_blue_circle:
src/exec/spill/spill_components.cpp
1
17
05.88%
[45, 136, 139, 141, 162, 184, 187, 195, 196, 199, 221, 223, 482, 487, 532, 589]

:large_blue_circle:
src/exec/spill/spiller.cpp
2
6
33.33%
[108, 110, 113, 114]

:large_blue_circle:
src/exec/spill/spill_components.h
1
1
100.00%
[]


Shorter MacButton class

Why not do:
class MacButton extends HTMLElement {
  constructor() {
    super()
      .attachShadow({ mode: "open" })
      .innerHTML = `
        <style>
          button {
            position: relative;
            border: 2px solid black;
            padding: 4px 24px;
            background-color: #fff;
            color: #000;
            font-family: Krungthep;
          }
        </style>
        <button><slot></slot></button>`;
  }
}

Yeah, that would achieve the exact same result. I was experimenting with breaking out the markup and styles for readability. I'm also thinking about exploring having them in separate files.
Or I might just switch to using Lit, when this all gets too much. :)


Position should reset after route changes

I don't believe this was happening in v0.2 but in v1 when a route changes the page is opened from the previous page scroll position, that's bad UX.
Should probably be solvable with:
history.listen(_ => {
    window.scrollTo(0, 0)
})

It's a rather opinionated decision on the router's part. There are times it's undesired, like when paning a sub-section of a page

@ycadaner-merkos302 would it be reasonable to say when a  is clicked the behaviour should be just like a  with exception that the first case doesn't cause a reload just a view change.

@v4n If the url  is saving state, say photo id in a gallery, this wouldn't be the desired behavior.

This is a chronic problem. In traditional websites, getting back to the position where you left the last page was a very useful feature, but with modern single page applications where Javascript controls most aspects of the user experience it's less straightforward whether the behaviour is desirable or not.
When the HTML5 History API was implemented, Chrome and Firefox presented a difficulty in reliably preventing this behaviour because they triggered the scroll reset at different times, and it was impossible to reliably work out when this happened.
There's a host of Stackoverflow Q&As and libraries out there aiming to find solutions to this problem — Googling for "popstaate prevent scroll" yields some promising results…

@ycadaner-merkos302 if a link with href="#image-4  and oncreate={m.route.link} acts exactly like a normal link then indeed scroll to top shouldn't happen (unless there is an element with image-4 id. That's what I mean by previous comment.

@barneycarroll imo about 99% of the cases when navigating to a new page it doesn't make sense for scroll to start from the previous page state. Reload yes. But '/home' to '/about' makes no sense.
It's like opening a book and each time you move to a new page you start reading at the middle of it.
Any thoughts on why this behaviour didn't occurred on v0.2?

There was a global.scrollTo(0, 0)hardcoded on route. Some people complained about it or picked another framework because it was unwanted.
If it bothers you you can wrap m.route.set and m.route.link to do it for you.
We may want to add a note in the migration guide about this.

@pygy what scenarios did people complained about the global.scrollTo(0, 0)?
I can only think of anchor links and updates to the url without causing a view change, both which can be achieved without the usage of m.route.link.
I imagine the scenarios are less common than navigating a page. If so I don't think Mithril should make people have to monkey patch to deal with a very common situation.

@v4n
#567
#747
#989

I don't think resetting the scroll position is that common for SPA. You might repeatedly want to change the URL and only parts of the app/page (I needed that several times and it was quite a pain with v0.2). Changing the URL without the router is not a nice option if you need some components to get initialized.

@tivac this is more subjective but feels like scroll position when navigating different pages is more important to handle off the bat than:

back/forwards button scroll state is lost
hash usage with infinite scrolling with two page sections that have different scrolling points

@inta interesting. So if I understand correctly you had two views where only part of the pages where different - componentB <-> componentC in the following example.
view1 =
<compontA></componentA><compontB></componentB>

view2 =
<compontA></componentA><compontC></componentC>

And when the route changed between view1 and view2 you wanted the scroll position to be in the same place?

@v4n correct, the second component is something like an overlay with its own scroll area which does not entirely cover the first component. One oft those components is for the detail view and another for the legal notice. I think the user experience is quite nice, so there should be at least an option to route without scroll to top.

@inta aha makes sense.
In my case I use history push state to change the url when a modal is opened and since our main layout has {window.modal ? window.modal : ''} I simply add the modal component to window.modal when needed.
Your case might be more complex so I can understand the need of wanting to avoid scroll to top.
It would be nice having something like:

m.route.link which is used when linking to new pages and scrolls to top
m.route.update update existing page and don't scroll to top

If not, then keep increasing the amount of things to set for people get Mithril working reasonably on an app. Do you imagine navigating stackoverflow or twitter and scroll position not being reset on a new page.

I would expect a flag. Perhaps adding a boolean scrollToTop flag to m.route.link

I think the right position to configurate this should be route setup, not the trigger/link. I can't think oft a situation where you sometimes want to scroll to top and sometimes not. That would be really confusing for the user.

An what happens when route resolution is deferred?
This IMO would best be handled as a routeResolver wrapper that injects a new- or wraps an existing onmatch hook.
m.route(root, '/', {
  '/': scrollTop(RootComponent)
}

With logic in scrollTop to deal with components, routeResolvers with and without an onmatch hook.

That's somehow what I meant with "route setup", though I'm not yet familiar with the v1 routing and did not know what the right hook would be.

@pygy I'll defer to your experience on this but based on my attempts to paper over the differences between route components and route resolvers, the idea of a wrapper that patches consistent view lifecycle behaviour into any given route endpoint sounds terrifying if not impossible to write.
Besides, when @inta says

I think the right position to configurate this should be route setup

That chimes with me in that this behaviour should really be something that sits at an app-wide level, above individual routes (which are stateless inasmuch as they are ignorant of previous route resolutions). Besides, composing routes quickly gets cumbersome and difficult to rationalise as more concerns are forced into route endpoints, eg profile : ScrollReset( MainLayout( Authenticate( ProfileComponentOrResolver ) ).
I find a better pattern for execugting side effects in time with Mithril's lifecycle is to mount a component outside of the document and encapsulate the logic in a way that doesn't require patching orthogonal parts of the application:
m.mount(
  // Don't attach to the document
  document.createDocumentFragment(),
  {
    // We need a valid view for Mithril to behave
    view : () => '',

    // Will execute on the DOM ready phase of every draw
    onupdate(){
      const route = m.route.get()

      if(route != this.route)
        scrollTo(0, 0)

      this.route = route
    }
  }
)

// Route definitions are separate from routing behaviour configuration
m.route(/* ... */)

Something along this will go a long way (bring your own Object.assign(), and typed in the GitHub text box, not tested at all).
// always return a new RouteResolver with both onmatch and render
function identity(vnode) {return vnode}
var noop = Function.prototype
function normalizeRoute(endpoint) {
  if (endpoint == null || typeof endpoint !== 'function' && typeof endpoint !== 'object') {
    throw new error ("Component or RouteResolver expected")
  }
  if (typeof endpoint === 'function' || typeof endpoint.view === 'function') {
    return {onmatch: function() {return endpoint}, render: identity}
  } else {
    return = Object.assign(Object.create(endpoint), {
      onmatch: typeof endpoint.onmatch === 'function' ? endpoint.onmatch : noop,
      render: typeof endpoint.render === 'function' ? endpoint.render : identity
    }
  }
}

// then

function scrollTop(endpoint) {
  endpoint = normalizeRoute(endpoint)
  var onmatch = endpoint.onmatch
  endpoint.onmatch = function() {
    return Promise.resolve(onmatch.apply(endpoint, arguments))
      .then(function(){window.scrollTo(0, 0)})
  }
}

@barneycarroll based on your proposal if I had to add the 5 lines logic to our app's views (roughly 31)  we are talking about 155 additional lines of code to handle an expected behaviour when navigating to a new page.
We could DRY things up and reduce it to 2-3 lines. But when creating views there is high likelihood handling this will be overlooked.
@pygy leaving it up to people to add a routeResolver  for something an expected behaviour for usable apps (which other libraries fail at helping with this) feels like a bad way to resolve this.

Or google, dig through docs/GH issues, find the code, and copy paste into their codebase. All of that just so that page navigation works as one would expect.

This approach is maintaining that every url state will either desire a scrollToTop or will not. However, sometimes you the transition to the new url will scrollToTop and sometimes not. I think this should be at the discretion of the invoker of the request.
Truth be told, we can have all transitions scrollToTop, and augment m.route.set to m.route.set('url', 'preventScroll'). This will allow to attach an onclick event to an  and override the default for m.route.set.

@v4n this could become NPM packages (both normalizeRoute and scrollTop)
@ycadaner-merkos302 You can modify the scrollToTop wrapper above to work conditionally. You'd need to wrap m.route.set and m.route.link as well and have all three wrappers communicate (a common value in the parent closure would do).

@pygy would the RouteResolver solution force a view to always start from the top including reload and going back?
Making the scroll decision when using m.route.link would make scrolling behaviour work as expected for all scenarios: new page, reload, back button and the more complex scenarios as mentioned in the previous comments.

For delayed resolution, the scrollTo(0, 0) call must happen after the resolution completes otherwise the old page will scroll up when you click the link and wait while the new page data is loading. During that time, the user would be free to scroll down again. Bad UX/UI.
You probably want something like this:
var shouldScrollToTop = false

function scrollTop(endpoint) {
  endpoint = normalizeRoute(endpoint)
  var onmatch = endpoint.onmatch
  endpoint.onmatch = function() {
    return Promise.resolve(onmatch.apply(endpoint, arguments))
      .then(function(){
        if(shouldScroll) {
          shouldScrollToTop = false
          window.scrollTo(0, 0)
        }
      })
  }
  return endpoint
}

m.route.linkTop = function() {
  shouldScrollToTop = true
  return m.route.link.apply(this, arguments)
}

m.route.setTop = function() {
  shouldScrollToTop = true
  return m.route.set.apply(this, arguments)
}

Possible caveat re. picking back the page position on reload/coming back to the page: the presence of onmatch on routeResolvers currently triggers an async first render (that's why the normalizeRoute helper here doesn't bother telling Promises and other values apart and just wraps the value of the previous onmatch in Promise.resolve().
I don't know if that allows the page to pick back its old position if the first paint occurs after DOMContentLoaded.

Closing, since this issue has not been updated in over a month. If you feel something in Mithril needs added or changed, please file a new issue.


Admin Attempting to Create User Without Password Generates Unclear Error

This is a minor issue that should be avoided if users fill out forms completely.

Logged into Jamaican Psalms project.
Navigated to user administration.
Clicked "Add New."
Filled out all fields and checked "Active User" box, but did not fill out password field.
Error pictured below is generated.

Marking required fields or generating an error message with simpler feedback may address.

closing this as "not applicable" given that the former site admin panel is not longer enabled


Warning with cakephp3.5

Hello,
When i run TwigView on a CakePhp 3.5, with this code,
{{ _view.assign('title', __("I'm title")) }}

{{ _view.start('header') }}

I'm header

{{ _view.end() }}

{{ _view.start('footer') }}

I'm footer

{{ _view.end() }}

I'm content

i got those warnings :

Warning (4096): Object of class App\View\AppView could not be converted to string [ROOT/tmp/cache/twigView/93/9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.php, line 27]
I'm header
I'm title
Warning (4096): Object of class App\View\AppView could not be converted to string [ROOT/tmp/cache/twigView/93/9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.php, line 22]
Warning (4096): Object of class App\View\AppView could not be converted to string [ROOT/tmp/cache/twigView/93/9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.php, line 32]
Warning (4096): Object of class App\View\AppView could not be converted to string [ROOT/tmp/cache/twigView/93/9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.php, line 42]
I'm content
Warning (4096): Object of class App\View\AppView could not be converted to string [ROOT/tmp/cache/twigView/93/9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.php, line 37]
I'm footer

Everything works fine with Cake3.4

Mitch

Could you also include
/tmp/cache/twigView/93/9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.php

You'll find it attached here.
3d5e0211dc28c59bab413b8dac0ddbe4bc9521105d145d749578bb453c993008.zip

Sorry, I have included the wrong file, here's the good one.
9354f08c1f47e54248409d9f11b74ab4e9f9d332c0df7ef5d38a4a486cb660cb.zip

Some methods return $this since 3.5.
I've found a workaround for this, use none filter:
{{ _view.assign('title', __("I'm title"))|none }}

What about
{% _view.assign('title', __("I'm title") %}
{{ _view.get('title') }}

@inoas have you checked if your examples work, or maybe you are just guessing?

Half guessing. I do only use a few parts of TwigView in my projects and I am not using _view.*
Trying:
{% _view.assign('title', __("I'm title")) %} {# execute setter #} <= Not a valid tag
{{ _view.get('title') }} {# just echo #} <= not an existing property
{{ _view.title }} {# this may work as well, try-and-see #} <= not an existing property
p.s.: I could not even find the docs for none https://twig.symfony.com/doc/2.x/filters/index.html

Ok, so please don't mislead people :)
none filter is provided by this plugin.

Ok, so please suggest to use dirty hacks :)
The problem here is that CakePHPs minor release is non-BC.

As I said it is a workaround which actually works.

It does not.
You still need {{ _view.fetch('title') }} as |none will stop returning $this but not output the title as before as CakePHP 3.5 broke that feature non-BC.

I'll ask again: have you tried this or still guessing?

Have you, I have.

I use this workaround successfilly in my code.
Are we talking about the same?
{{ _view.assign('block', 'value')|none }}
{{ _view.fetch('block') }}

Yes that will work, despite being a hack (running echo return, looking at WyriHaximus\TwigView\Lib\Twig\Extension\Strings). Without the fetch call it won't work.
Can you see a better way to get around the hack required because of assign/set returning $this in CakePHP 3.5? The only way I found is creating quite a bunch of Twig-Tags as far as I understand: https://twig.symfony.com/doc/2.x/advanced.html#tags as {% foo %} seems only to allow DSL constructs and no Twig Simple Functions.

We should probably revert the changes in CakePHP then.

Well 3.5 has been out for some time now and that could have impacts /too/ so my suggestion (disclaimer @robertpustulka I have tried it, right now ;-) would be, to overwrite assign() and __set() in class TwigView to not return anything?
// in TwigView:
    public function assign($name, $value)
    {
        $this->Blocks->set($name, $value);
    }

@inoas That is another option as well. I can put together a pull request for that if it would be helpful.

I'll wait for @WyriHaximus to chime in and if he concurs I will do that and hopefully also add working unit tests.

@inoas This could work :+1:

A quick copy&adapt. I am not sure we ll need/want all of them (consistency? would you set the template path within a twig-template, ever, etc)?
    /**
     * {@inheritDoc}
     * @return void
     */
    public function setTemplatePath($path)
    {
        parent::setTemplatePath($path);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function setLayoutPath($path)
    {
        parent::setLayoutPath($path);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function enableAutoLayout($enable = true)
    {
        parent::enableAutoLayout($enable);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function setTheme($theme)
    {
        parent::setTheme($theme);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function setTemplate($name)
    {
        parent::setTemplate($name);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function setLayout($name)
    {
        parent::setLayout($name);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function start($name)
    {
        parent::start($name);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function prepend($name, $value)
    {
        parent::prepend($name, $value);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function append($name, $value)
    {
        parent::append($name, $value);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function assign($name, $value)
    {
        parent::assign($name, $value);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function reset($name)
    {
        parent::reset($name);
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function end()
    {
        parent::end();
    }

    /**
     * {@inheritDoc}
     * @return void
     */
    public function extend($name)
    {
        parent::extend($name);
    }

Question: I assume about the same amount of functions that should go inside TwigView would otherwise need to become Twig Tags for TwigView + CakePHP 3.5 to run without changes on Templates?
Then there is also `__set() which I am not sure if TwigView supports it, but it doesnt return $this (why not :P)?

Another option I thought of is to implement __toString() on View, and return ''. This would solve the compatibility issue for both this and other plugins.

I am going to give this a try before hacking other ways.

I gave it a try locally (in my SimpleTwigView ... but it should be the same).
Following works without being required to change any twig template code:
Within your class TwigView

    /**
     * {@inheritDoc}
     * @return string
     */
    public function assign($name, $value)
    {
        parent::assign($name, $value);

        return $value;
    }

    /**
     * {@inheritDoc}
     * @return string
     */
    public function __toString()
    {
        return '';
    }

Tested with
{{ _view.assign('title', __("I'm title"))|none }}

{{ _view.start('header') }}

I'm header

{{ _view.end() }}

{{ _view.start('footer') }}

I'm footer

{{ _view.end() }}

I'm content

{{ _view.fetch('header')|raw }}
{{ _view.fetch('footer')|raw }}

@WyriHaximus is this approach good with you?
Would any of you want to have any further setter methods to return their values for BC reasons?

@inoas I'll test it and dive into this issue tomorrow :+1:

@inoas I was proposing to implement __toString() on CakePHP's view class.

@inoas You are dead-wrong. This is not a BC break from the framework perspective.
"Void to sth" is always fully BC.
If the plugin and Twig used the return value of void methods and by accident just worked so far, that is the plugin's problem, not CakePHP core's. Please understand this difference.
That said, the solution now provided seems to fix this in some way. So seems to be all good with the next patch release.

Ideally a "native" support for Cake blocks would be great.
Something like:
{% start 'header' %}

Title

{% end %}

{% append 'header' %}

Subtitle

{% end %}

{% fetch 'header' %}

@markstory I am not sure that that is entirely good:
Setter-style-methods (like assign here) that returned strings before would throw notices/warnings as of now. With the global change in Cake\View\View itself, these warnings would not longer occur and plugin authors would possibly not know that things broke/changed.
@dereuromark not sure if I am the one who is dead wrong, this time ;-):

If the change was from any-non-void to void; How would that be BC? Say a transformator suddenly storing the transformed value instead of returning it?
The change here is from returning string to $this which is a return type change and that is non-BC, can you confirm this?

@robertpustulka yep, however:

do you agree that we should not force people to upgrade their Twig Templates during a minor CakePHP release, let alone they know about the problem. If we find a rather good compromise, It is bad enough that templates will break unless people will update/upgrade to the upcoming 4.x TwigView as well. To do that the solution above is fitting, or can you think about anything better?

After (1.) we can prep a PR to add Twig-Tags for start, append, prepend, assign, fetch, reset, and end and deprecate the old way to use them?

In a future TwigView release we can remove the old way of calling {{ _view.some_setter() }}?

The change here is from returning string to $this which is a return type change and that is non-BC, can you confirm this?

The change is from returning void to $this (see the code).
I suspect that you expected that assign() would have returned a block content. The behavior has not changed, only the return value has - from nothing to something.
Please, again, get your facts straight before you start telling people that they are wrong.

do you agree that we should not force people to upgrade their Twig Templates during a minor CakePHP release

Yes. I'm talking about a future plugin release.

As assign() never returned something despite that the TwigView docs made me believe it would, implementing __toString() in CakePHP 3.5 like suggested will fix this problem.
I can take care and implement the tags for start, append, prepend, assign, fetch, reset, end (tags do not (necessarily) echo) on top of the next major TwigView release.

@inoas But you complained about 3.5 in particular. But the only change there was https://github.com/cakephp/cakephp/pull/11134 which is BC.
The change regarding assign() seems to be in a very early 3.x version, though. So quite some years ago.

@Orken #61 will fix your problem once merged and tagged.
This is the followup issue to track the correct implementation in future https://github.com/WyriHaximus/TwigView/issues/62 for all those interested

4.0.6 has been tagged with a fix for this :+1:

Ref: https://github.com/cakephp/cakephp/issues/11276#issue-263070139


Native review for newlandsvalley/elm-WebMidi

I'd very much appreciate a review anyway (quite apart from being asked for one by elm-package publish).  My knowledge of Elm's native conventions has been gleaned merely by browsing the core libraries and then trying to guess the rules.
You will need to use a MIDI device such as a MIDI keyboard to evaluate the code.  Very simple library, providing support for just three MIDI signals - connection of a input device, disconnection, and production of notes from the device.

I've upgraded to Elm 0.16 and changed the repository name to be all lower case newlandsvalley/elm-webmidi.

The native review pipeline is stalled. That's probably not news to you, but I wanted to leave a note on all the open reviews. I cannot speak for everyone, but as one of the reviewers I just want to speak up and say that I will not be doing more reviews. The warning about publishing native packages has changed, and Evan has mentioned multiple times in different places that one of his priorities for 0.17 is improving this process. So I'm going to wait for that. I'm sorry we cannot move forward with publishing your library, but my experience is that even if we review and approve it, it will become stuck waiting for Evan to whitelist it.

Sorry to keep this in limbo for so long. I am moving towards the plan outlined here and discussed a bit further in the 0.17 announcement.
Ultimately, I think this kind of stuff should live in elm-lang/midi so I think the right way to proceed is to design a fully Task based API that just does low-level bindings in a module called Midi.LowLevel. Similar to how elm-lang/websocket has WebSocket.LowLevel that can be used to define any sort of effect manager.

Thanks for the response, Evan.  I'm very pleased that now with 0.17, it will be possible to wrap the web platform API,  I am very interested to see more detailed documentation (of Effect Managers in particular) and also to find out to what extent you'd like community involvement and to what extent you prefer to do it yourself.  Personally, I'd like to see the audio APIs covered sooner rather than later.


Bit manipulation

I'll need a bit manipulation abstraction, so I might as well get the party started. My biggest struggle so far has been naming it. As mentioned in (#27) "bit pattern" is not ideal. Here are some alternatives:

bit field
bit array
bitmask
bit map
bit set
bit string
bit vector

It should be noted that most conforming types will be fixed-width integers, but there's nothing integer specific about it. I think some separation of concerns is justified.

A shower-thought: bit manipulation is completely modular and can be built with public APIs, so it's possible to shove it all in a submodule or subpackage. My opinion on it: meh.

CS has a shortage of words. I'm leaning towards "bit vector" because it isn't related to Swift.Array. That, of course, confuses every other language that decided arrays should be called vectors. Also, Wikipedia says bit fields fit inside a word, which sounds misleading.

Note: NBKDoubleWidthTests fails to compile if you add NBKBitVector: NBKBitPatternConvertible.

Hm. I'm not yet convinced I need the non-full-width operations. Like, I know I need shifts and rotations but I don't yet have a use for individual bits or ranges of bits (#29). Seems premature, so I'll remove them. I'll keep the protocol around, however.

Meh. I'll remove this protocol and merge the rotations into fixed-width integer again. In short, the entire thing seems premature. I'm also not quite sure what to do with signed-ness as a concept.


[fix](multi catalog)Return emtpy block while external table scanner couldn't find the file.

Proposed changes
Issue Number: close #xxx
Problem summary
FE file path cache for external table may out of date. In this case, BE may fail to find the not exist file from FE cache. This pr is to handle this case: instead of throw an error message to the user, we return empty result set to the user.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 36.28 seconds
load time: 466 seconds
storage size:<PHONE_NUMBER>7 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221211174125_clickbench_pr_61671.html


corpus BLEU score have a minor issue when smoothing

Here should be hyp_lengths rather than hyp_len.

Thanks @wwt17! Good catch!


endpoint /:urlname/events/:id/attendance returns "event_time_error" for future events in sandbox.

Using https://secure.meetup.com/meetup_api/console/?path=/:urlname/events/:id/attendance
with
id 264330192
urlname Tampa-Hackerspace
returns
"code": "event_time_error",
"message": "Event must have started"
As of the time of this post, this event (and others) are sufficiently in the  future to make timezone issues unlikely.
This is the event in question.
https://www.meetup.com/Tampa-Hackerspace/events/264330192/

I see now that this works for past events.


[TPC-H] Dask query 10 fails during shuffle

duplicate of https://github.com/coiled/benchmarks/issues/1274, please re-open if I'm mistaken here.


python: CMessage.GetParams() returns unknowns

When using python based plugins that hook on the new-er *Message hoons (eg OnUserRawMessage), the GetParams() method on the CMessage given to the callback returns a tuple containing Swig Object of type 'unknown'.
ZNC version tested on: ZNC 1.7.0 (IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: no, build: autoconf)
ZNC was built from source on my Ubuntu 18.04 desktop using python 3.6.5

Fixed in 11fb42887871a6196dcdf7f7c5556f1e673aceb6


Why the github.com/bcicen/grmon import?

Why can't grmon not just parse the output of /debug/pprof/goroutine?debug=1?
This would make things a lot easier as the program you want to monitor doesn't have to add another dependency.

If any supplemental data (not already in pprof profile) is used going forward, the import would be still be needed; however, yes, in its current state parsing can just as well be moved into the client.
I will likely make this change in the next iteration. Thanks for the feedback!

I was thinking of opening an issue to say that grmon doesn't work for apps that don't use the http.DefaultServeMux.  However, switching to /debug/pprof ought to solve that as well.

grmon now reads directly from /debug/pprof of the target by default.
An (optional) agent is still included as well to allow for extended profiling data in the future.


Errorprone and nullaway static analysis

WIP, still fixing warnings

@dfsek the work around this is not finished but this is ready for merge


Bug : Not workin with Big Sur Beta 9

Disclaimer:
Please go through existing issues to avoid creating duplicates. If you found a similar issue please post a comment there. If you are uncertain your issue is related to others then create the issue. Obvious ignorance of this rule might get you blocked from posting new issues. Please tick the box below to show that you have followed the guideline.

[ ] I have checked for a similar issue and sure it hasn't been reported before.

Describe the bug
A clear and concise description of what the bug is.
Steps to Reproduce
Steps to reproduce the behaviour (feel free to change the placeholder as you need):

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behaviour
A clear and concise description of what you expected to happen.
Setup information:

Audio device used for playback: [eg AirPods or Macbook speaker or Bose QC32]
Audio transmission interface: [eq HDMI or Bluetooth or 3.5mm Jack] Usb Headphones
macOS Version: [e.g. 10.15] 11.0 b9
eqMac Version [e.g. 0.0.1] (if audio related issue) Not workin
eqMac UI Version [e.g. 0.0.4] (if UI related issue) -
EQMac Bug Reporting.zip

Screenshots or Console.app logs
If applicable, add screenshots to help explain your problem. Also you can run Console.app and apply filter for eqMac
I added all details
Additional information
Incompatible with 11.0 Beta (20A5384c), microphone access not requested, Cannot start later

label:fix

@nodeful

ME too！！

Driver now works 👍 , cannot give microphone access still not working :(

Have you tried latest v0.3.6 version?

Have you tried latest v0.3.6 version?

Sorry for late reply Updated App works,Driver too but cannot give microphone access Added Screenshot

label:support

Priority:medium

Works with Big Sur RC Thanks for Support Issue Closed


Nat.repr slow for very large literals, quadratic algorithm

When experimenting with encoding set as bitvectors as Nats, which seems like it should be rather efficient, I noticed that processing the file in VSCode was quick enough, but lake build would take a long time, and lean is busy writing the .c file.
I suspect that Nat.repr is just very slow on larger literals, given that it goes through List Char, rather than allocating a String of the right size and then (linearly) updating it digit by digit (or chopping the Nat into USize-sized limbs, using the C code to print it, and concatenating efficiently).
It also seems to scale quadratically with the length of the number, as
#time #guard_msgs(drop all) in #eval (Nat.repr (10^50000)).length
#time #guard_msgs(drop all) in #eval (Nat.repr (10^100000)).length
#time #guard_msgs(drop all) in #eval (Nat.repr (10^200000)).length
#time #guard_msgs(drop all) in #eval (Nat.repr (10^400000)).length

shows, which gives me (on live.lean-lang.org) timings
time: 622ms
time: 2374ms
time: 9302ms
time: 37342ms

Versions
"4.12.0-nightly-2024-10-18"
Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.

Base conversion is algotihmically quadratic. I don't think the List Char thing (which is linear) is what you are witnessing.

Ok, but presumably there are still some large constant factors on the table here?

Yes, possibly, I'm just saying that these numbers don't demonstrate that. If large number literals are transitioned to use a from_array function instead of translating a string, the calls to Nat.repr would disappear except for small numbers, where I think they are not a bottleneck.


Add a "region" selector question so that TRP can track Easy Forms use across regions

The region selector should be included in each interview run and provide a way for internal tracking of Easy Forms used by partners/workshops across regions.
The region options should be:

Chicago
Northern Illinois
Western Suburbs
Central & Downstate Illinois

This was handled with the EAD updates.


Flakiness in Build and Test / test action

Lately (at least for a few weeks now) there's been some flakiness in the GitHub test action when doing PRs, despite no code changes to the back-end (only front-end code changes).  Quite often need to rerun the test action, which slows down reviewing and merging PRs.  The test logs haven't so far shown any specific reasons to the failures.

I've seen the SQS transport test to be flaky, but I could not reproduce it locally.

This doesn't seem to be fixed yet, the test job is still very flaky, which at least I find quite annoying.

I believe it was better for a while, but reappeared. Let me simply try with increasing the timeout further.

Hmm, given that the timeout is already at 30s, I wonder whether we should tweak some of these queue properties instead:
https://github.com/eclipse-apoapsis/ort-server/blob/10d58322e17d4767370d1062a175e6487572abf5/transport/sqs/src/main/kotlin/SqsMessageReceiverFactory.kt#L70-L82

I am closing this again as tests have been more stable recently.


Add the ability to set the evdev path

So like theclicker -D /dev/input/event3
Cool porject

The app needs to know if the device is a mouse or keyboard to set the default keybindings!
I am thinking of adding -M and -K for specifying the device type, this sounds good or you have something else in mind?
-M is Mouse
-K is Keyboard
-M or -K will only be used if the device is set with -D

This https://github.com/konkitoman/autoclicker/commit/063ae7c942a9ee2f1f9684e387a850535eb65e31 solves your problem?


Fix subscripting NoneType error with single sleeper

With the update to homeassistant 2022.3(which changed from sleepyq to asyncsleepiq) I started getting these errors. My bed is a single-envelope model with only one side. The left side returns Nones for the data in this case.
Validated on my home-assistant install by making the change, restarting, confirming that I no longer got the error logs and that I could get the sleepiq data.

2022-03-04 06:03:14 ERROR (MainThread) [homeassistant.components.sleepiq.coordinator] Unexpected error fetching REDACTED@SleepIQ data: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/components/sleepiq/coordinator.py", line 37, in _async_update_data
await self.client.fetch_bed_statuses()
File "/usr/local/lib/python3.9/site-packages/asyncsleepiq/asyncsleepiq.py", line 189, in fetch_bed_statuses
self.beds[bed_status['bedId']].sleepers[i].in_bed = bed_status[side+'Side']['isInBed']
TypeError: 'NoneType' object is not subscriptable

In SleepIQBed it's assumed there's a Left and Right sleeper - can you check if the data sent to initialize SleepIQBed contains the keys sleeperLeftId and sleeperRightId? If it only supports one, that should be changed as well

Yes, there are both ids in the data parameter passed into the SleepIQBed constructor. The left id is set to '0' in this case, I guess to indicate no sleeper.


HTTP responses should be more verbose

When using any of the HTTP API methods, the response sent should be more descriptive. A descriptive status should be returned or a descriptive error should be returned in case of a failure.

obsolete since we are moving to http2 and grpc


some major improvements in FaceRec/app/main/Edit.py

Describe the bug
The Flask application exhibits several critical issues that impact its reliability, security, and maintainability:
1.Improper Resource Management for Video Capture:
The camera resource (cv2.VideoCapture(0)) is initialized at the module level and is never released. This leads to the camera remaining occupied even after the application stops, preventing other applications or subsequent runs from accessing the camera.
2.Lack of Comprehensive Error Handling and Input Validation:
The application does not adequately validate user inputs, allowing invalid or malicious data to be processed. Additionally, exceptions during camera access, file operations, or HTTP requests are not gracefully handled, potentially causing the application to crash or behave unpredictably.
3.Use of Global Variables Leading to Potential Race Conditions:
Global variables (EmployeeCode, Name, gender, Dept, encoded_image) are used to store temporary data across different routes. This practice can lead to race conditions in a multi-threaded environment, making the application unreliable and difficult to maintain.
To Reproduce
Steps to reproduce the issues:
1.Improper Resource Management:
Start the Flask application.
Access the video feed via the /video_feed route.
Stop the Flask application without properly releasing the camera resource.
Attempt to restart the Flask application or use the camera in another application.
Observe that the camera cannot be accessed due to it being locked by the previous instance.
2.Lack of Comprehensive Error Handling and Input Validation:
Start the Flask application.
Navigate to the /capture route.
Submit the form with invalid data (e.g., non-numeric EmployeeCode, empty fields).
Observe that the application may crash or behave unpredictably without providing meaningful error messages.
3.Use of Global Variables Leading to Potential Race Conditions:
Start the Flask application.
Simultaneously make multiple requests to the /capture route from different clients or browser tabs.
Observe that global variables may be overwritten or accessed inconsistently, leading to incorrect data being processed or displayed.
Expected behavior
The application should exhibit the following behaviors to address the identified issues:
1.Proper Resource Management for Video Capture:
The camera resource should be initialized in a thread-safe manner and properly released when no longer needed or when the application stops. This ensures that other applications or subsequent runs can access the camera without issues.
2.Enhanced Error Handling and Input Validation:
All user inputs should be validated to ensure they meet required formats and constraints. The application should handle exceptions gracefully by catching errors and providing informative feedback to the user without crashing.
3.Refactoring to Avoid Global Variables and Improve Code Structure:
Temporary data should be stored within the scope of individual requests using mechanisms like Flask’s g object instead of global variables. This prevents race conditions and ensures data integrity across concurrent requests. Additionally, the code should be modularized to enhance readability and maintainability.

Please assign me this issue under hacktoberfest-accepted and gssoc-ext

sure - go ahead

You have assigned this issue to me right??

yes @bhavya2021245

You have assigned this issue to me right??


Focal Noetic installation instruction doesn't work on Husky

OS: Ubuntu 20.04
ROS Distro: Noetic
Installed using 'clearpath-universal-noetic-amd64-0.5.8.iso' from clearpath
Real hardware

Expected behaviour
I followed instruction provided at INSTALL AND CONFIGURE HUSKY SOFTWARE to install and configure the Husky. Expected behavior under Installing Husky Software point 8 mentions that 'Please follow the configuration instructions on the screen. If the computer reboots, wait for the PC to boot to the login screen, and re-enter the login credentials.'  and under Testing Base Configuration point 2 mentions that 'The COMM light on your Husky should go from red to green. You can check that the service has started correctly by checking the logs: sudo tail /var/log/upstart/ros.log -n 30'
Actual behaviour
There is no configuration instruction on screen as mentioned under Installing Husky Software point 8  and unlike what is mentioned under Testing Base Configuration point 2, COMM light changes color from red to yellow (not green) and there is no /var/log/upstart directory.
I also tried to check step 3 of Testing Base Configuration which mentions that 'Your husky should now be accepting commands from your joystick. The service will automatically start each time you boot your Husky’s PC' whereas that also didn't work.
Is INSTALL AND CONFIGURE HUSKY SOFTWARE up to date?
To Reproduce
Provide the steps to reproduce:
follow steps provided at INSTALL AND CONFIGURE HUSKY SOFTWARE
Other notes
Please let me know if any other information I should add here.

The configuration screen mentioned was recently removed in a refactoring of the ISO; previously the hostname was assigned as cpr-unassigned and there was a first-boot prompt that asked for a new hostname.  This was removed and changed to a prompt during the OS installation itself.  It still applies to older versions of the ISO, but if you don't see any configuration steps after logging in that's fine.  We'll update that section of the guide.
The yellow light indicates that the Husky is either e-stopped or connected to shore power.  Please make sure the e-stop is disengaged and that the battery is properly connected.
Regarding the upstart folder, that is a copy-and-paste error from the Indigo-era manual. 18.04 and 20.04 use systemd not upstart.  The logs can be found by running
sudo journalctl -u ros

Thanks for prompt response.
Husky is not connected to power. I also checked e-stop, lock has been rotated toward unlock position and reset button has been released so in my understanding e-stop is not enabled still STOP LED is red and COMM LED is yellow. Am I missing to check something?
When I run
sudo journalctl -u ros
I get following output:
Jan 04 13:29:35 noeticHusky systemd[1]: Started "bringup ros".
Jan 04 13:29:35 noeticHusky root[3797]: ros: Using workspace setup file /etc/ros/setup.bash
Jan 04 13:29:35 noeticHusky ros-start[3797]: <14>Jan  4 13:29:35 root: ros: Using workspace setup file /etc/ros/setup.bash
Jan 04 13:29:35 noeticHusky ros-start[3873]: ls: cannot access '/etc/ros/noetic/ros.d/*.xacro': No such file or directory
Jan 04 13:29:35 noeticHusky root[3889]: ros: Started roslaunch as background process, PID 3888, ROS_LOG_DIR=/tmp
Jan 04 13:29:35 noeticHusky ros-start[3889]: <14>Jan  4 13:29:35 root: ros: Started roslaunch as background process, PID 3888, ROS_LOG_DIR=/tmp
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-systemd-logind.service-WAeTwj': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-colord.service-WZOqFg': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-systemd-resolved.service-Zki3Mf': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-upower.service-LTKr3e': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-chrony.service-SQBRIf': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/tracker-extract-files.129': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-switcheroo-control.service-1TVByh': Permission denied
Jan 04 13:29:36 noeticHusky ros-start[3895]: /usr/bin/du: cannot read directory '/tmp/systemd-private-46aedbadacd646699441abea072f3e51-ModemManager.service-lHTkxg': Permission denied
Jan 04 13:34:15 noeticHusky systemd[1]: Stopping "bringup ros"...
Jan 04 13:34:15 noeticHusky ros-start[3940]: [WARN] [1641321255.236422]: Controller Spawner error while taking down controllers: unable to contact master
Jan 04 13:34:15 noeticHusky ros-start[3888]: WARNING: Could not change permissions for folder [/tmp/44eccf4e-6d8c-11ec-a6b3-b3e4c64188f8], make sure that the parent folder has correct permissions.
Jan 04 13:34:15 noeticHusky ros-start[3888]: Checking log directory for disk usage. This may take a while.
Jan 04 13:34:15 noeticHusky ros-start[3888]: Press Ctrl-C to interrupt
Jan 04 13:34:15 noeticHusky ros-start[3888]: Done checking log file disk usage. Usage is <1GB.
Jan 04 13:34:15 noeticHusky ros-start[3888]:
Jan 04 13:34:15 noeticHusky ros-start[3888]: started roslaunch server http://noeticHusky:46237/

As per log message, it failed to access multiple directories.
Also it says
cannot access '/etc/ros/noetic/ros.d/*.xacro': No such file or directory
Can you please help me understand what could be the reason for above issues?

Thanks for prompt response.
I checked e-stop, Robot is not connected to power, lock has been rotated toward unlock position and reset button has been released so in my undestanding e-stop is not enabled still stop LED is red and COMM is yellow. Am I missing to check something?
When I run
sudo journalctl -u ros
I get below output

Inside the battery bay there are 5 connectors: 2 red, 2 black, and 1 blue.  Can you please verify that all 5 are securely connected?
The blue connector is a short to ground, but if it is not connected it acts as an e-stop.  This is to prevent the motors from moving when the robot is connected to shore power.

COMM LED is green now, it was problem with remote e-stop switch. Thanks for support.

Glad you got it working!


Thumbs.db files fail to upload

Great project.  Would it be possible to skip certain files that are causing the sync to fail?  Thumbs.db is forbidden by dropbox.  Maybe desktop.ini also, but i haven't run into that.
Thanks!

I'm not actively maintaining this project, so it might be a while before I implement this. You might want to check rclone Dropbox for a more actively maintained alternative

Thanks, that's a good suggestion.  It seems to require dropbox business, unlike your project, so hopefully we'll see an update.

If you have some time to make a PR, you can pass a regex expression to the sync cli command in the file cli.py and check it against the variable "filenames" here

Welcome to python! You want:
filename = str(path_i)
if os.path.basename(filename)=="Thumbs.db": continue

With your more effective method, i tried to include most of the banned files documented at https://help.dropbox.com/sync/advanced-sync-troubleshooting
filename = str(path_i)
if os.path.basename(filename)=="Thumbs.db": continue
if os.path.basename(filename)=="thumbs.db": continue
if os.path.basename(filename)=="Desktop.ini": continue
if os.path.basename(filename)=="desktop.ini": continue
if os.path.basename(filename)==".ds_store": continue
if os.path.basename(filename)=="icon\r": continue
if os.path.basename(filename)==".dropbox": continue
if os.path.basename(filename)==".dropbox.attr": continue
if os.path.basename(filename)=="~$*": continue
if os.path.basename(filename)==".~*": continue

I think that solves the issue that i'm personally having with Windows backups, but there are file types that others may have that don't pass the test.  "icon\r" probably needs an escape character.  The bottom two lines may need .+ or whatever the wildcard is in that context.  My issue is resolved though, so thanks!


ldap: Fix development environment configuration.

This takes care of the neccessary update of the development ldap config, after all the recent changes to the ldap code broke it. Now all three modes seem to work correctly.
Unfortunately testing is manual - I went through all three modes checking that things seem to be as intended.

This is great, merged, thanks @mateuszmandera!  There's probably things we could do to make this more testable (involving moving the code from dev_settings.py to a separate file, but I think it's fine for development configuration that we expect to change rarely to be tested only manually, since it's purpose is for manual testing anyway.


Split README to CONTRIBUTING file

README - Info about the project, what is it used for, how is it build (key components) and how to use it.
CONTRIBUTING - How to setup dev environment, how to contribute code (e.g. bugs, what branch to use, which tests to run, etc) and what is the road map for the project.

https://github.com/Midburn/spark/blob/master/CONTRIBUTING.md
https://github.com/Midburn/spark/blob/master/README.md


Some questions about pgd_test

Hi Jin
I meet some problems when I run the code pgd_test in graph global attack examples.

In line 37, why normalize the feature matrix? This do harms the performance of GCN on clean graphs.

There might be a bug in line 43:
AttributeError: 'numpy.ndarray' object has no attribute 'todense'
features loaded via the torch.geometric are np.ndarray but not a csr_matrix.
I replace the data loader with the most common way in your other examples:
data = Dataset(root='/tmp/', name=args.dataset, setting='gcn')

Another problem is that neither the poisoning attack nor the evasion attack appear to be working. Do I miss some details?
(base) D:\Nut\Experiments\Attack graphs>python pgd.py --dataset=cora --ptb_rate=0.05
Loading cora dataset...
=== testing GCN on clean graph ===
Test set results: loss= 0.6284 accuracy= 0.8170
=== setup attack model ===
100%|██████████████████████████████████████| 100/100 [00:06<00:00, 14.52it/s]
=== testing GCN on Evasion attack ===
Test set results: loss= 0.7325 accuracy= 0.8140
=== testing GCN on Poisoning attack ===
Test set results: loss= 0.6890 accuracy= 0.8200

Hi,
Thank you for your feedback.

We follow the author's implementation to normalize the feature matrix. (see https://github.com/KaidiXu/GCN_ADV_Train/blob/master/train.py)
2/3. Are you using the latest code? The latest code should not have the "todense()" issue and I can get a reasonable attack performance.

$ python test_pgd.py  --dataset cora
=== testing GCN on clean graph ===
Test set results: loss= 0.7677 accuracy= 0.8190
=== setup attack model ===
100%|█████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:06<00:00, 14.29it/s]
=== testing GCN on Evasion attack ===
Test set results: loss= 0.9961 accuracy= 0.7310
=== testing GCN on Poisoning attack ===
Test set results: loss= 1.0123 accuracy= 0.7340

Thanks for your reply.
I find the reason anyway. The func-def preprocess is not the same in github/DeepRobust/utils.py as it in the Lib.
I reinstall deeprobust-0.2.4, but it still report the "todense()"issue. Finally I solve this problem by copying this func directly, and the results become the same with yours.
But I'm still confused why running the code like I said would cause the attack to not work at all. It looks like the only difference is that the preprocess function is different.

I tried to load the dataset by
data = Dataset(root='/tmp/', name=args.dataset, setting='gcn')
It will destroy the performance of GCN on clean graph and make the attack fail, so the failure of the attack is caused by data loading.
data = Dataset(root='c:/tmp/', name=args.dataset, setting='gcn')
from torch_geometric.datasets import Planetoid
from deeprobust.graph.data import Pyg2Dpr
dataset = Planetoid('./', name=args.dataset)
data = Pyg2Dpr(dataset)

Is there any difference between these two dataloader?
I also tried
data = Dataset(root='c:/tmp/', name=args.dataset, setting='nettack')
PGD does not appear to be working in this data split.
(base) D:\Nut\Experiments\Attacke graphs>python pgd.py --dataset=cora
Loading cora dataset...
Selecting 1 largest connected components
=== testing GCN on clean graph ===
Test set results: loss= 0.6457 accuracy= 0.8441
=== setup attack model ===
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:05<00:00, 16.94it/s]
=== testing GCN on Evasion attack ===
Test set results: loss= 0.6401 accuracy= 0.8426
=== testing GCN on Poisoning attack ===
Test set results: loss= 0.6511 accuracy= 0.8365

Thanks for your reply. I find the reason anyway. The func-def preprocess is not the same in github/DeepRobust/utils.py as it in the Lib. I reinstall deeprobust-0.2.4, but it still report the "todense()"issue. Finally I solve this problem by copying this func directly, and the results become the same with yours.

The issue was not addressed in deeprobust-0.2.4. So to install the latest deeprobust, we recommend to install from source:
git clone https://github.com/DSE-MSU/DeepRobust.git
cd DeepRobust
python setup_empty.py

But I'm still confused why running the code like I said would cause the attack to not work at all. It looks like the only difference is that the preprocess function is different.

I am not sure about this. It could depend on how you address the "todense" issue in the code.

Is there any difference between these two dataloaders?

Pyg dataloader provides  fixed data splits and full graph as in the original GCN paper; gcn provides randomly selected splits with the same ratio as the GCN paper; nettack follows the nettack paper and uses a different ratio as well as only using the largest connected component of the graph.

I also tried data = Dataset(root='c:/tmp/', name=args.dataset, setting='nettack') PGD does not appear to be working in this data split.

The data provided by Pyg dataloader is the same as the PGD data. We followed their implementation and we are able to reproduce the performance on this data split.
Well, this is interesting. I got this result as yours and I am not very sure about why PGD fails on this setting  data = Dataset(root='c:/tmp/', name=args.dataset, setting='nettack'). But I commented https://github.com/DSE-MSU/DeepRobust/blob/756453e894df2acd154c0016b9e25836c8960b27/examples/graph/test_pgd.py#L91-L96
and uncommented https://github.com/DSE-MSU/DeepRobust/blob/756453e894df2acd154c0016b9e25836c8960b27/examples/graph/test_pgd.py#L90, I am able to get the following performance:
$python test_pgd.py --dataset cora
Loading cora dataset...
Selecting 1 largest connected components
=== testing GCN on clean graph ===
Test set results: loss= 0.7055 accuracy= 0.8295
=== setup attack model ===
100%|█████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:08<00:00, 12.39it/s]
=== testing GCN on Evasion attack ===
Test set results: loss= 0.7221 accuracy= 0.8260
=== testing GCN on Poisoning attack ===
Test set results: loss= 0.9361 accuracy= 0.7651

What I want to note here is that, the very early test_pgd.py uses Line 90 (the setting in Metattack) instead of Line 91-96 (the setting in PGD attack). Line 90 consistently yields reasonable poisoning performance while failing on evasion attack; Line 91-96 usually produces better evasion performance but it seems (as you pointed out) it can sometimes fail in attacking some data splits. Maybe Line 91-96 does not work for the largest connected component setting.

The Line 90 seems equal to Meta-train, and Line 91-96 are similar to Meta-self.
I conduct more experiments, and the results show that PGD-evasion only works on the standard split (torch_geometric setting).
Thanks for your helpful replies.

Hi Jin, I have published a paper in ICLR for this problem, which can be referred here --- https://openreview.net/forum?id=dSYoPjM5J_W&referrer=[Author Console](%2Fgroup%3Fid%3DICLR.cc%2F2023%2FConference%2FAuthors%23your-submissions)

Hi @likuanppd, thanks for the insightful work! I really like the observation about the connection between robustness and distribution shift. It is interesting to see how it explains some phenomena in graph adversarial attacks.
Btw, (1) if you would like to contribute to deeprobust, feel free to pull request. (2) I would also like to mention our (slightly related) work on ICLR'23 that you might be interested in.

Hi @ChandlerBang, I find that the test_pgd.py now in the Deeprobust is different from the above code you showed in line 91 to 96.
The code you showed is
# Here for the labels we need to replace it with predicted ones
 fake_labels = target_gcn.predict(features.to(device), adj.to(device))
 fake_labels = torch.argmax(fake_labels, 1).cpu()
 # Besides, we need to add the idx into the whole process
 idx_fake = np.concatenate([idx_train,idx_test])
 model.attack(features, adj, fake_labels, idx_fake, perturbations, epochs=args.epochs)

The current version code is
    # Here for the labels we need to replace it with predicted ones
    fake_labels = target_gcn.predict(features.to(device), adj.to(device))
    fake_labels = torch.argmax(fake_labels, 1).cpu()
    # Besides, we need to add the idx into the whole process
    idx_fake = np.concatenate([idx_train,idx_test])

    idx_others = list(set(np.arange(len(labels))) - set(idx_train))
    fake_labels = torch.cat([labels[idx_train], fake_labels[idx_others]])
    model.attack(features, adj, fake_labels, idx_fake, perturbations, epochs=args.epochs)

And I run the code you showed with ''data = Dataset(root='./tmp/', name='cora', setting='nettack')", and the result is

Loading cora dataset...
Selecting 1 largest connected components
=== testing GCN on clean graph ===
Test set results: loss= 0.6980 accuracy= 0.8320
=== setup attack model ===
=== testing GCN on Evasion attack ===
Test set results: loss= 0.8186 accuracy= 0.7842
=== testing GCN on Poisoning attack ===
Test set results: loss= 0.8061 accuracy= 0.7902

The result is different from likuanppd.
But when I run the current version of test_pgd.py. The result showed below is similar to the result  likuanppd showed.

Loading cora dataset...
Selecting 1 largest connected components
=== testing GCN on clean graph ===
Test set results: loss= 0.6980 accuracy= 0.8320
=== setup attack model ===
=== testing GCN on Evasion attack ===
Test set results: loss= 0.7109 accuracy= 0.8239
=== testing GCN on Poisoning attack ===
Test set results: loss= 0.6950 accuracy= 0.8255

However, the current version of test_pgd.py has a bug. The true index of 'fake_labels' is inconsistent with the 'idx_fake' in "model.attack(...)". I would like to confirm if my discovery is correct.
Thank you for your help in advance.


[Messaging] ErrorResponse > Include DAT in tokenValue for RejectionMessages

Currently, for security reasons, the DAT is not sent with the automatic sending of RejectionMessages triggered by the Unified-Lib (see tokenValue in ErrorResponse withDefaultHeader).
The DAT cannot be sent until the validation routines for the DAT of an incoming message have been expanded (Issue  https://github.com/International-Data-Spaces-Association/framework-library/issues/15).
As a result, the DAT can be checked again for incoming RejectionMessages, otherwise they are forwarded to the connector-devloper regardless of the DAT status.

Closed due to inactivity. If there is an actual requirement from a use case, we will look into it again.


Answer disclaimer needs to be made responsive for small screen mobile devices.

Describe the bug
Answer disclaimer does not fit when viewed on mobile devices, for example, iphone 14, 15 etc.
Possible follow-up to #634
To Reproduce
Steps to reproduce the behavior:

Fork latest code from main. Launch the chatbot app on a mobile device.
Enter a query to generate an answer.
Scroll down to see the references and Answer disclaimer.
See error

Screenshots

The references and answer disclaimer are not formatted correctly.
Additional context
Adding the following media query to Answer.module.css seems to improve formatting on small screen devices:
@media (max-width: 480px) {
.answerFooter, .answerDisclaimerContainer{
flex-direction: column;
align-items: left;
gap: 4px;
}
}
Result:

This PR solves the issue addressed here: #659


Add Check (VF): All fonts in a family MUST have the same axes and supported ranges

Observed behaviour
Cabin was upgraded to a VF (https://github.com/impallari/Cabin/pull/20) but the variable font files in the family did not (as of 2020-04-01) have the same axes and supported ranges of those axes; because the legacy 'Cabin Condensed' family had no italics.
We should have a GF profile VF check for this that FAIL's the current family.

The description is a bit unclear so I will try to write down here my understanding of the problem.
It seems to me that @davelab6 is asking for a new check with the following description:
"Ensure that the Roman and Italic variable font counterparts have the same set of axes and axis ranges"
Is that what you need, Dave?
Also, what's the reasoning for that requirement? Is that needed in order to build more consistent user interfaces for interaction with the VFs? Or some other google-specific rationale?

I think it's not just Roman and Italic, something like Compacta and Compacta Outline should also have the same axes and supported ranges, I think?

Eli is correct.

great, thanks!


Scala Common Enrich: Base64 decoding does not specify UTF-8 charset

When Base64-encoded JSONs (unstructured events and custom contexts) are decoded, the new String() constructor used does not specify UTF-8 as the encoding. Unfortunately, Hadoop on EMR defaults to US_ASCII, causing non-Latin characters to be corrupted.
For any future reader: I initially thought the issue was that Hadoop was picking up an old version of Commons Base64, but in fact that was disprovable in two ways:

The Base64 API is different before URLsafe Base64 support was added. It would have thrown a runtime exception
When running an early (pre-URLsafe) version of Base64 against a URLsafe string, the decoded string is corrupted from the first non-URLsafe character onwards, not just the Unicode characters

Here is a demo:
scala> import org.apache.commons.codec.binary.Base64
import org.apache.commons.codec.binary.Base64

scala> val decoder = new Base64(true)
decoder: org.apache.commons.codec.binary.Base64 = org.apache.commons.codec.binary.Base64@2685334e

scala> val decodedBytes = decoder.decode("eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy91bnN0cnVjdF9ldmVudC9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy13ZWJzaXRlL3NpZ251cF9mb3JtX3N1Ym1pdHRlZC9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6eyJuYW1lIjoizqfOsc-BzrnPhM6vzr3OtyBORVcgVW5pY29kZSB0ZXN0IiwiZW1haWwiOiJhbGV4K3Rlc3RAc25vd3Bsb3dhbmFseXRpY3MuY29tIiwiY29tcGFueSI6IlNQIiwiZXZlbnRzUGVyTW9udGgiOiI8IDEgbWlsbGlvbiIsInNlcnZpY2VUeXBlIjoidW5zdXJlIn19fQ")
decodedBytes: Array[Byte] = Array(123, 34, 115, 99, 104, 101, 109, 97, 34, 58, 34, 105, 103, 108, 117, 58, 99, 111, 109, 46, 115, 110, 111, 119, 112, 108, 111, 119, 97, 110, 97, 108, 121, 116, 105, 99, 115, 46, 115, 110, 111, 119, 112, 108, 111, 119, 47, 117, 110, 115, 116, 114, 117, 99, 116, 95, 101, 118, 101, 110, 116, 47, 106, 115, 111, 110, 115, 99, 104, 101, 109, 97, 47, 49, 45, 48, 45, 48, 34, 44, 34, 100, 97, 116, 97, 34, 58, 123, 34, 115, 99, 104, 101, 109, 97, 34, 58, 34, 105, 103, 108, 117, 58, 99, 111, 109, 46, 115, 110, 111, 119, 112, 108, 111, 119, 97, 110, 97, 108, 121, 116, 105, 99, 115, 46, 115, 110, 111, 119, 112, 108, 111, 119, 45, 119, 101, 98, 115, 105, 116, 101, 47, 115, 105, 103, 110, 117, 112, 95, 102, 111, 114, 109, 95, 115, 117, 98, 109, 105, 116, 116, 101, 100,...
scala> new String(decodedBytes)
res0: String = {"schema":"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0","data":{"schema":"iglu:com.snowplowanalytics.snowplow-website/signup_form_submitted/jsonschema/1-0-0","data":{"name":"Χαριτίνη NEW Unicode test","email":"alex+test@snowplowanalytics.com","company":"SP","eventsPerMonth":"< 1 million","serviceType":"unsure"}}}

scala> new String(decodedBytes, java.nio.charset.StandardCharsets.UTF_8)
res1: String = {"schema":"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0","data":{"schema":"iglu:com.snowplowanalytics.snowplow-website/signup_form_submitted/jsonschema/1-0-0","data":{"name":"Χαριτίνη NEW Unicode test","email":"alex+test@snowplowanalytics.com","company":"SP","eventsPerMonth":"< 1 million","serviceType":"unsure"}}}

scala> new String(decodedBytes, java.nio.charset.StandardCharsets.US_ASCII)
res2: String = {"schema":"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0","data":{"schema":"iglu:com.snowplowanalytics.snowplow-website/signup_form_submitted/jsonschema/1-0-0","data":{"name":"���������������� NEW Unicode test","email":"alex+test@snowplowanalytics.com","company":"SP","eventsPerMonth":"< 1 million","serviceType":"unsure"}}}

/cc @epantera, @dstendardi

You Rock, thanks @alexanderdean


Hide symbols but show labels.

What problem does this feature solve?
In my case I only want to show the 1st & the last label. I am able to hide labels using the formatter function but empty symbols (small circles) make the UI very weird. Setting showAllSymbol to false hide the labels. Setting the size to 0 also hides the labels.
Is it possible to show only labels but no symbols?
What does the proposed API look like?
The API is already there. If Labels.show is true & showAllSymbol: false, show labels but hide the symbols.

Do you mean you want to hide the empty circles? It's easy to do by using symbol: 'none'.

It seems that there is no simple way to achieve such requirement, but here is a workaround for you https://gallery.echartsjs.com/editor.html?c=xIJyAD4BFw&v=1

Simple enough. symbol: null. Works well. Thanks

The solution introduces a small bug when using Legend.
itemStyle: {
            color: 'transparent'
        },

Legend icon is now not visible as it respects the color setting of itemStyle.
https://gallery.echartsjs.com/editor.html?c=xIJyAD4BFw&v=4

Yes, the legend doesn't display normally because of the transparent item color.
Though we can set legend.itemStyle.color(Note that this option is not listed in the documentation) as the color we want, but the symbol of the legend will only display a circle but not display the line at the two sides of the circle. This may be not what you want.
Therefore, maybe we can try another way, such as using a very small symbolSize.
https://gallery.echartsjs.com/editor.html?c=xIJyAD4BFw&v=5
But there will be an empty circle in the legend, which is hidden in the line series. In addition, the labels will be unclickable and can't respond to the hovering event for the very small symbol size. Will that be acceptable?


fix(ci): added trigger matching all except main.

Issue link
Closes #56
Relates #57
What does this PR do?

Updated triggers in build.yaml to match all case except pushing to main

What does not include in this PR?
N/A

Confirmed only Publish job would be triggered after merging this PR into main.


openzwave plugin not found with 1.0.8

I've installed and reinstalled the plugin using homebridge-ui-x and npm.  It shows up in the listing of plugin in ui-x.
I've added the config.json entry as shown. But I keep getting this error in the logs.
"No plugin was found for the platform "openzwave" in your config.json. Please make sure the corresponding plugin is installed correctly."
Stuck
Kevin

Remove the local homebridge-openzwave plugin then install it globally:
rm-rf /homebridge/node_modules/homebridge-openzwave
sudo npm i -g homebridge-openzwave
then restart homebridge and it should work.