__type table

Users in the past have requested that they be able to check if one type is the same as another: #356
Lately, users have also been requesting the ability to get the name of a type, such as @mrgreywater in the Gitter. It's a request that's popped up here and there, so I'm going to commit to adding such a thing. I want to make it a table, with the following entries:
__type.is ( obj ) -- function that tells you whether an object is of a certain type
__type.name -- string that has the C++ type name, or what we can get to the best of our ability

Anything else that should be included? I think that's just about all that's relevant, really. __type should be available on the metatable you register only, but not the object itself as far as I understand.
Thoughts?

Seems good to me. Just to clarify, would this only be available on the usertype table, not on instances of the usertype? For example, if Thing is a bound usertype:
local inst = Thing.new()

print(Thing.__type.name) -- prints `Thing`
print(inst.__type.name) -- error, attempting to index nil?

If so, then I think naming the function is might not be ideal (it doesn't make as much intuitive sense to me asking Class is instance? rather than instance is Class?), but that's a pretty minor thing.

To stay compatible with other lua extensions, __type should be a metamethod that returns the type string. One could make it optional if it either returns the name with which the type was registered, or the demangled c++ type name.
Another nice thing to have would be having a way to get the function signature(s) for usertype methods, so you can figure out how to call a certain function just from the lua side.
Having __type.is is not really necessary I think, but having a function from c++ to get the type name, which can be bound to lua if a user wants to would be nice.

I think there are three use cases for type info:

People who want to do type checks in lua
People who want runtime information for debug and documentation reasons
Informational error messages.
If you don't add usertype_name in c++, then people will add their own implementations, which might be worse than what you can come up with (see the recent issue with the globals table iteration approach)
As for not conforming to other extensions, then at least don't use __type and completely break them by using the same key, but supplying an incompatible table. even though I don't understand why you need to do it differently when this approach (__type string metafield) has been around since lua 5.0 with luaSub and works fine.

The recent issue was about finding the name of some object that exists in a table (particularly, the global environment), not getting its bound usertype name.
I'll keep __type for a string name, and __typeinfo for sol2's purposes. This should keep back compatibiltiy maximal but also give me the flexibility to implement the things I need.
Current implementation does not allow me to fulfill all the current requests, and it's likely something I won't be able to overcome unless I don't mind having obj.__type be a valid accessor (obj being an instance of some type T):
	sol::state lua;
	lua.open_libraries(sol::lib::base);

	lua.new_usertype<my_thing>("my_thing");
	lua.safe_script("obj = my_thing.new()");

	// works
	lua.safe_script("assert(my_thing.__type.is(obj))");
	lua.safe_script("assert(not my_thing.__type.is(1))");
	lua.safe_script("assert(not my_thing.__type.is(\"not a thing\"))");
	lua.safe_script("print(my_thing.__type.name)");

	// works
	lua.safe_script("assert(getmetatable(my_thing).__type.is(obj))");
	lua.safe_script("assert(not getmetatable(my_thing).__type.is(1))");
	lua.safe_script("assert(not getmetatable(my_thing).__type.is(\"not a thing\"))");
	lua.safe_script("print(getmetatable(my_thing).__type.name)");

	// crash, attempt to index nil
	lua.safe_script("assert(getmetatable(obj).__type.is(obj))");
	lua.safe_script("assert(not getmetatable(obj).__type.is(1))");
	lua.safe_script("assert(not getmetatable(obj).__type.is(\"not a thing\"))");
	lua.safe_script("print(getmetatable(obj).__type.name)");

sol::lib::extensions might make for a good top-level library name to put things like sol.is and sol.type_name into.

Fun stuff: a survey of libraries using the following displayed that these were already in use.

__NAME
usertype(obj)
type(obj).name
__type (as a function or string)
__typeinfo

It also gets better because almost none of them agree where the type name should actually go. Some have it on the metatable, but others have these as fields directly on the class (and inaccessible from the metatable). One person mentioned getting the metatable and then sweeping the Lua registery for a match, so they could check the name value in the registry (offensively slow, but they cached lookups).
I'm not sure where to put any of this type information for it to play nice. I also don't know which libraries do what: kaguya doesn't seem to make this information available immdeiately, neither does luwra. luabind apparently has __type, but a lot of that is hidden in its private details? I haven't been able to check OOLua or others yet.
There's also still my worry that people will start using __type.name or __type or whatever to do class checks in Lua, and that just smacks of bad design...

/me comes in without reading whole issue:
How are you currently using __name? It's the official lua field for naming a type. It gets used in various places by lua (e.g. argument checking error messages)

I don't, at all (none of sol2's code is Lua code: I don't have to read __name or __type or anything: I just serve up the C++ name directly to the user when I need to present an error).

I don't, at all (none of sol2's code is Lua code: I don't have to read __name or __type or anything: I just serve up the C++ name directly to the user when I need to present an error).

You don't control all error messages. e.g. see how __name is used internally by lua to present this error message:
$ lua
Lua 5.3.4  Copyright (C) 1994-2017 Lua.org, PUC-Rio
> some_foo = setmetatable({}, {__name="foo"})
> io.open(some_foo)
stdin:1: bad argument #1 to 'open' (string expected, got foo)
stack traceback:
	[C]: in function 'io.open'
	stdin:1: in main chunk
	[C]: in ?

That's good to know, but I was under the impression that luaL_newmetatable already supplied this (the metatable name, which has some sol-specific prefix + the class name, has shown up in people's error messages before). The manual says it does, but even then the __name of the metatable is not identical to the class name (which is what people are asking for) and a bunch of other information people want to shove into this type identification table.

That's good to know, but I was under the impression that luaL_newmetatable already supplied this (the metatable name, which has some sol-specific prefix + the class name, has shown up in people's error messages before)

Yes it does.

even then the __name of the metatable is not identical to the class name (which is what people are asking for)

In that case you need some sol-specific location.

and a bunch of other information people want to shove into this type identification table.

Can they put the existing __name field in such a thing?
However, reading your issue first post, if you're trying to identify types, then you need to do it based on the metatable itself, not by the contents of them.
Simplest way to do this is a (weak) table in the registry that maps from metatable to your chosen name/id/unique something.

From the gitter:

type name
type id
base classes
property/method names
property types, method signatures with return type (including overloads), constructor signatures

It was also stated they want this on all functions bound from sol, and all enumerations created. I was thinking I might not just have the __type field, but also have something special for tables (enums) and functions. I think for tables we can just go the metatable route with __type, but for functions bound from C++ I think it would be best to store the data in some predefined upvalue.
Problem: the way functions are bound in C++ are heavily complicated. We already reserve the 1st upvalue for set_environment, since this function gets and sets the first upvalue of userdata, functions, etc. to match the environment specification (Lua 5.1, we just use set_fenv and friends).
We could reserve the 2nd upvalue for a table that describes type information for the function, and then store other information the typical reference storage and function pointers in the other upvalues like before. But this makes things difficult when someone wants to do something like f = my_user_type.some_function, where the upvalue on f would contain the information. When variables are bound to a usertype, we have to use __index to retrieve the name some_function, which means we'd have to create and push a type table every single time someone queries the function (a real hassle and performance hit).
All in all, I think I might actually put this feature request on ice until later. So far the only scenario for all this information presented to me has been automatic documentation generation or error reporting for bad function calls, but I've already added error reporters for bad function calls that report the desired function signatures to users and the __name bit is already taken care of.
I'm not sure automatic documentation is something I want to commit to supporting, especially if it comes in the form of a complete reflection engine.... for now, I'm going to leave the __type table as it is now, and put this feature request on ice.


Update Search Sidebar when working with Quick Search

Release Type: No breaking change
Fixes:

https://x-team-internal.atlassian.net/browse/XP-3283
https://x-team-internal.atlassian.net/browse/XP-3282

Description

Created new component QuickSearchCloseButton
Included a way to activate focus for InputField, so that when clearing HeadingWithQuickSearch the focus goes back to the input
Fixed height behaviour of Filter Container and GenericCollapsible Body

Checklist

[x] set yourself as an assignee
[x] set appropriate labels for a PR (In Review or In Progress depending on its status)
[x] move respective JIRA issue to the IN REVIEW column
[x] make sure your code lints (npm run lint)
[x] Flow typechecks passed (npm run flow)
[x] Snapshots tests passed (npm run jest)
[x] component's documentation (.stories.js file) is changed or added accordingly to reflect any new or updated use cases or variants usage
[x] if you've fixed a bug, make sure to also include a new story that will expose declarations with problematic data that caused the bug in the first place, so that we can assure that no regressions will pop up on future interactions
[x] if any snapshots have been changed, verify that component still works and looks as expected and update the changed snapshot
[x] manually tested the app by running it in several different browsers (Firefox, Chrome, Opera, Safari, MS IE/Edge, etc.) and checked nothing is broken and operates as expected!

Related PRs

branch
PR

XP-3283-update-search-sidebar-layout-when-working-with-quick-search
XP

Steps to Test or Reproduce

Check the new component at http://localhost:9001/?selectedKind=UI Components%2FQuickSearchCloseButton
Existing components should not have any regression:

http://localhost:9001/?selectedKind=UI Components%2FHeadingWithQuickSearch
http://localhost:9001/?selectedKind=UI Components%2FFilters
http://localhost:9001/?selectedKind=UI Components%2FGenericCollapsible
http://localhost:9001/?selectedKind=Form Components%2FInputField

Impacted Areas in Application

forms/InputField.js
ui/Filters/Container.js
ui/GenericCollapsible/Body.js
ui/HeadingWithQuickSearch.js
ui/QuickSearchCloseButton.js
ui/QuickSearchCloseButton.stories.js

Screenshots
Please refer to https://github.com/x-team/xp/pull/1984 Screenshot section

@bernardodiasc Please also rebase with latest develop, packages will need to be reinstalled since we upgraded some of them. And then rebuild.

@nicksp the code review requests was updated in the commits https://github.com/x-team/xp-ui/pull/429/commits/d428adaf3d358dab6d9f0b3d256be39e57544af6 and https://github.com/x-team/xp-ui/pull/429/commits/c544fb78b271e28a83ce8cf9c20db472d44f5dc6, this PR is ready for another round. Thanks for the review&qa!

@bernardodiasc When you have a moment, could you please resolve build issues?

@bernardodiasc When you have a moment, could you please resolve build issues?

That's exactly the issue I had during the day... I don't know what's going on but I can propose a fix that bypass the issue.

That's exactly the issue I had during the day... I don't know what's going on but I can propose a fix that bypass the issue.

Right, I thought you said you could resolve it with clearing npm cache. Why didn't I get it locally? Sorry if I'm not that deep into the problem.

Right, I thought you said you could resolve it with clearing npm cache.

Looks like it solved locally, I'm not having that issue anymore o my machine.

Looks like it solved locally, I'm not having that issue anymore o my machine.

Any local changes that you will probably need to push to remote? I'd suggest you clear local npm cache, ensure you have Node v.9.3.0, then rm -rf node_modules, then npm i, then npm run build and then npm t. After that, if there're any changes, you do git add . and commit that, so Travis rebuilds that.

Nice, thanks @nicksp. I made the last adjustments on https://github.com/x-team/xp/pull/1984, so both PRs should be ready.


Linked to multiple visual cheat sheets (Git, JS, Markdown)

Linked to multiple visual cheat sheets (Git, JS, Markdown)

Thanks a lot!


fix: travis-ci yarn cache

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


New: Native Pie chart

What is the purpose of this pull request? (put an "X" next to item)
[] Documentation update
[] Bug fix
[X] New functionality
[] Changes an existing functionality
[] Other, please explain:
What changes did you make? (Give an overview)
Created Native Pie Chart
Todo:

[x] Documentation
[x] Legend Label Formatter

Add any screenshots

@ryanthemanuel Can you add some members of your team in this review? I'll be happy to answer any questions.

@Dinesh94Singh

+1

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


TypeError: plugins.expectFile is not a function

I found this tool today and when I tried I got this error. Is it something that I am doing wrong?
[16:23:20] Using gulpfile C:\xampp\htdocs\m2\gulpfile.js
[16:23:20] Starting 'critical'...
Running gulp task Critical CSS compilation for 1 theme(s):
pmcArceus
[16:23:20] 'critical' errored after 17 ms
[16:23:20] TypeError: plugins.expectFile is not a function
at C:\xampp\htdocs\m2\dev\tools\gulp\tasks\critical.js:44:31
at Array.forEach ()
at module.exports (C:\xampp\htdocs\m2\dev\tools\gulp\tasks\critical.js:41:36)
at critical (C:\xampp\htdocs\m2\node_modules\undertaker\lib\set-task.js:13:15)
at bound (domain.js:413:15)
at runBound (domain.js:424:12)
at asyncRunner (C:\xampp\htdocs\m2\node_modules\async-done\index.js:55:18)
at processTicksAndRejections (internal/process/task_queues.js:75:11)

@shivampmc which gulp version are you using?
Show me your gulp -v and node -v


Following Readme and example files leads to Error: missing field modules at line 6 column 1

modules.toml file in Readme or examples directory has a minor typo which leads to de-serialization issue
suru@linux-vm:~/Documents/wagi$ target/debug/wagi
=> Starting server
Error: missing field modules at line 6 column 1

#17


❓ [*Arr] Updrade add-ons

Which addon?
All *arr addons, but may apply to all existing addons in this repo.
Addon or app?
Addon
Describe the solution you'd like
Either automated or a step by step in README on how to upgrade add ons to there latest available upstream version
Describe alternatives you've considered
Clone this repo and rebuild all images, but it would be time consuming and loose the community aspect of this repo
Additional context
Especially about tdarr: there's unmapped node now and it would be very useful, but it's unavailable due to obsolete addon version
https://docs.tdarr.io/docs/nodes/nodes

Updates is automatically done every Saturday if the upstream image has a functional nomenclature for releases.

Well then maybe there's an issue
2.00.25 has been released on 9th August 2023
maybe there release nomenclature is wrong? Can you explain more on that? I'm aware of semver, and there version does not really match this (double digit 00?)
I see the tdarr addon has been updated, thanks =)


Allow image metas to specify explict builder images for their upstream Dockerfiles

content:
  source:
    ...
    ci_alignment:
      streams_prs:
        from:
        -  <full upstream pullspec>
        -  ...length of list must exactly match FROMs in upstream Dockerfile...

Codecov Report

Merging #381 (abd1110) into master (1010fea) will decrease coverage by 0.25%.
The diff coverage is 1.67%.

@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
- Coverage   27.95%   27.70%   -0.26%
==========================================
  Files          34       34
  Lines        7790     7882      +92
  Branches     1560     1590      +30
==========================================
+ Hits         2178     2184       +6
- Misses       5516     5600      +84
- Partials       96       98       +2

Impacted Files
Coverage Δ

doozerlib/cli/images_streams.py
0.00% <0.00%> (ø)

doozerlib/cli/release_gen_payload.py
26.53% <0.00%> (ø)

doozerlib/image.py
10.26% <0.00%> (-0.08%)
:arrow_down:

doozerlib/olm/bundle.py
0.00% <0.00%> (ø)

doozerlib/runtime.py
27.31% <0.00%> (-0.07%)
:arrow_down:

doozerlib/rpmcfg.py
32.06% <25.00%> (-0.19%)
:arrow_down:

doozerlib/model.py
57.65% <50.00%> (+3.45%)
: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 8d394e1...abd1110. Read the comment docs.


Database optimization

I've got a tree like this:

And my queries log for rendering this small tree is pretty huge:

Is there a way to improve database hit performances with some prefetch/select_related and where? Does it pass through monkey patching or there is another way to do so?
In order to seek a solution to this problem, I detected an issue with the tree rebuilding in treewidget/fields.py:52 method get_drawable_queryset where collecting disabled/selected IDs. I don't know where it can be useful but remove it improves significantly the database performances.
Thanks for any enlightenment.

See #2 for quick and dirty workaround

Yes the b penalty is a known problem of get_drawable_queryset, which is there to ensure, that the queryset data actually form a correct tree. You can omit this method completly, if your queryset isnt filtered. Maybe there should be a queryset matches .all check before, that can decide whether the method must be called at all.
Problem of get_drawable_queryset itself is the fact, that it has to check for the parents of all nodes, which is always a cumbersome request for trees in relational databases. Have to dig into this further to find an applicable solution.

@debnet
Was able to reduce the queries down to two for django-mptt with prefetching in get_drawable_queryset. No clue yet, how to achieve this with treebeard (did not find a get_queryset_ancestors equivalent there). For AL_Node this can't be done at all (by design).
Imho a real patch should include a setting in treesettings to switch get_drawable_queryset explicitly on, along with the optimized prefetched queries.

In #2 I put a settings in order to enable/disable tree rebuilding and I offer the ability to pass a QuerySet to the TreeSelect and TreeSelectMultiple widget. It does the job, could you review?

@debnet Thanks for the PR. Yep, the additional queryset for the widgets seems odd to me. Can you explain, what this will be good for from model/form generation side? (See comments in the PR...)

@debnet Please also have a look at e0737dc8cb15d9cb42faad4416c1c7fea341474a. It should reduce the queries needed in get_drawable_queryset at least 2 times. If you use django-mptt it should be fixed to 2 more queries than without this method. Still needs some testing, but looks promising (though I dont like the cache hack for treebeard).
Together with your setting patch it should be less painful.

Solved with #5

Thank you for your reactivity. I will test this this monday and I'll give you some feedback.

It works like a charm, very impressive. Thank you very much !


Styling the 'Step' titles

Is there any way to change the style of the step titles?
For instance, is it possible to display them in a way where each step looks like an arrow pointing to the next title similar to: http://css-tricks.com/triangle-breadcrumbs/. It would be great if there was a few styles to chose from.
Also, is it possible to completely hide the titles?

@Jericho - if by "completely hide the titles" you mean to hide the tabs across the top, you can use this approach suggested in #16


Use absl::flat_hash_map for primitive_buffers_by_layer_

Make sure primitive buffers are not moved when primitive_buffers_by_layer_ is resized.
Also replace std::unordered_map by absl::flat_hash_map.
Tests: Took a capture.

@reichlfl , you are absolutely right. I attributed a weird crash in a local branch to a resizing of the map, but it can't be since as you correctly point out, std::unordered_map does have pointer stability.

And sorry for the lack of context. It could be a marginal gain to use flat_hash_map here, so maybe we should still submit?

Yeah, if it ain't broke...

Sorry for commenting late, but what about the absl::node_hash_map suggested by Florian?


Fixed the mobile menu for on-demand django pages

Due to the .o-header scoping, some base styles were overwriting our mega-menu styles. By scoping the mega-menu to the header organism I was able to match the specificity and set the cascade properly.
Changes

Wrapped the mega-menu import in the header organism to match the scoping.

Testing

gulp styles:ondemand and open http://localhost:8000/test-fixture/?atomic=header in a smaller browser window. The left side of the nav should have the proper gutter instead of being pushed up agains the window as we're currently seeing on /complaint

Review

@anselmbradford
@sebworks

Screenshots
Before

After

Checklist

[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the front end playbook
[ ] Passes all existing automated tests
[ ] New functions include new tests
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged
[ ] Visually tested in supported browsers and devices
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

👍

👍

This will require an update to cfgov-sheer-templates. I'd merge them in at the same time if possible to avoid any weirdness from changing the markup and not having the styles.

We need to get this done ASAP, because, per @KimberlyMunoz's observation, I'll need to make another cfgov-sheer-templates fix and then update the 4 or 5 sites that use that before we can freeze.


"UibDateParser" in Migration guide for prefixes

There's a typo in Migration guide for prefixes.
"Change: dateParser for UibDateParser." should be changed to "Change: dateParser for uibDateParser."

@nvbn please feel free to file a PR.  Thanks.

I can't make pull request to wiki. The problem is in this page - https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes

apologies.  fixed.


⚠ Auth has degraded performance

In bac7ced, Auth (https://auth.k2lin.com) experienced degraded performance:

HTTP code: 200
Response time: 16903 ms

Resolved: Auth performance has improved in a4a523d.


Upgrade to Brave 3.11.0

Bump Brave version to 3.11.0 which supports inheritable Brave tracing.
Note that we still need to make the Brave tracer accessible for application local tracing use.
See https://github.com/openzipkin/brave/issues/206 for one option of global BraveRegistry though we could expose through Jersey DI.

@uschi2000 for SA

reverted the parts exposing the Brave tracer for now just to get the Brave 3.11 upgrade in place first, and I'll create another PR once this merges with something along the lines of https://github.com/schlosna/http-remoting/compare/davids/brave-3.11...schlosna:davids/brave-tracer

cheers


Remove pyarrow from setup.py

#414 added pyarrow to the setup.py as part of adding google-bigquery-storage to install_requires. I understand the motivation for adding google-bigquery-storage, but since that has its own allowed pyarrow version range, it seems simpler to just rely on that rather than specifying yet another pyarrow range here which can get (/ currently is) out of sync with that library.
@tswast what do you think?

Related: https://github.com/googleapis/python-bigquery/issues/1196 is an open issue for a request to make pyarrow optional again in google-cloud-bigquery

Does that make sense or am I missing something about how this library relies on pyarrow?

The DB-API package that this depends on can optionally rely on the BigQuery Storage API, which requires pyarrow to deserialize the results. This can be much faster for downloading large results, but won't make much of a difference for smaller result sizes.

If we were to drop pyarrow, we should also drop bqstorage. Ideally, we'd include these as "extras" and make sure we have tests where these packages are not installed & installed.

Related: googleapis/python-bigquery#1196 is an open issue for a request to make pyarrow optional again in google-cloud-bigquery

1196 got closed via this PR:
https://github.com/googleapis/python-bigquery/pull/1282/files
This makes pyarrow and google-cloud-bigquery-storage optional

@bnaul closing this PR based on some work related to making both pyarrow and bqstorage optional in PR #847.
Thanks so much for issuing this PR and providing impetus to improving python-bigquery-sqlalchemy.


Update Home Assistant to version 2024.9.1

This pull rquest updates Home Assistant to version 2024.9.1

coverage: 100.0%. remained the same
when pulling c75bd69ff20ac0592647592f1790d6c008470d6e on update_home_assistant_to_2024_9_1
into daf951ae0aa68ed08ad32ee50c5e9888817fa479 on master.


[TACHYON-746] Improve Javadoc in RemoteBlockReader

New contributor task #746

Can one of the admins verify this patch?

Jenkins, okay to test.

Jenkins, add to whitelist.

Added the throwing condition comment. Can you review?

+1 LGTM

+1 LGTM


[WIP] Reenable IISExpress on helix

I refactored how helix works items are collected to give projects more control over queues they run on.
I've also added support for per project pre/post commands

Can you also add a new section in the helix docs with some examples of how to use the new stuff?


Visual Multiline comment with which-key

Doesn't seem to work when using with https://github.com/folke/which-key.nvim
With v = "<Leader>c" when I select multiple lines, it only uses single line comments, with v = "gc" multiline comment works fine
e.g. in lua:
<Leader>c
        -- require("commented").setup({
            -- comment_padding = " ",
            -- keybindings = {n = "gc", v = "<Leader>c", nl = "gcc"},
            -- set_keybinding = true,
            -- ex_mode_cmd = "Comment"
        -- })

gc
        --[[ require("commented").setup({
            comment_padding = " ",
            keybindings = {n = "gc", v = "gc", nl = "gcc"},
            set_keybinding = true,
            ex_mode_cmd = "Comment"
        }) ]]

I haven't used which-key before, but I guess the mapping has been overlapped and which-key has taken that key. Have you tried :vmap and check if that key calls function from commented?

@winston0410
vmap is showing
v  <Space>c    * Commented_n()

@petertriho Showing v  <Space>c    * Commented_n() in vmap means that the mapping was not hijacked by other plugins. Can you confirm again that it doesn't work?

Yep, still doesn't work

Are you using space as your leader key?

Yes I am

I get the issue now, it is because by default I assumed user will use the same key for normal and visual mode, and the mapping is all done in a loop.
It is a easy fix.

I also use which-key with the below commented.nvim mappings, I am unable to block comments to work, even if I visual-select a single word in the middle of the line I get a line comment instead of block.
My setup function:
    use { 'winston0410/commented.nvim',
        config = function() require('commented').setup({
          keybindings = {n = "gc", v = "gc", nl = "gcc"},
        }) end
    }

Output of :nmap gc:
n  g           * <Cmd>lua require("which-key").show("g", {mode = "n", auto = true})<CR>
n  gcc         * Commented_nl()
n  gc          * Commented_n()

Output of vmap gc:
x  g           * <Cmd>lua require("which-key").show("g", {mode = "v", auto = true})<CR>
v  gc          * Commented_n()

@ibhagwan Do you mind posting your which-key setup as well? I will try and reproduce the issue you have.

@ibhagwan Do you mind posting your which-key setup as well? I will try and reproduce the issue you have.

My which-key setup is published here as part of my complete nvim setup.

@ibhagwan I have just tried out your setting, and it just worked. And this is my output of :nmap gc:
n  g           * <Cmd>lua require("which-key").show("g", {mode = "n", auto = true})<CR>
n  gcc         * Commented_nl()
n  gc          * Commented_n()

vmap gc
x  g           * <Cmd>lua require("which-key").show("g", {mode = "v", auto = true})<CR>
v  gc          * Commented_n()

@ibhagwan I have just tried out your setting, and it just worked. And this is my output of :nmap gc:
n  g           * <Cmd>lua require("which-key").show("g", {mode = "n", auto = true})<CR>
n  gcc         * Commented_nl()
n  gc          * Commented_n()

vmap gc
x  g           * <Cmd>lua require("which-key").show("g", {mode = "v", auto = true})<CR>
v  gc          * Commented_n()

Strange, this is exactly my output.
Just to be clear, when I visual line a couple of lines in a .lua file and press gc that should use block comment or am I misunderstanding when block comment is chosen?

@ibhagwan Oh I got you now. Right now this plugin is default to use inline comment for commenting, and it can handle inline and block comment for uncommenting. I plan to add the feature of using block comment for commenting next, so your setup right now is totally alright.

Oh, that makes sense now. Had another plugin installed that was mapped to gc, so block comment appeared to be working for gc but not for c

@ibhagwan @petertriho I have just committed, if you need to use line comment on single line, and block comment on multiple line, you can try this now:
require("commented").setup({
	prefer_block_comment = true
})

Perfect! Thanks

@ibhagwan @petertriho I have just committed, if you need to use line comment on single line, and block comment on multiple line, you can try this now:
require("commented").setup({
	prefer_block_comment = true
})

Ty! 🙏


GitHub setup assignment requires submitting the chess starter code to autograder

Overview
Currently, the GitHub repo instructions just have students create a repo and submit the URL for manual grading. The assignment walks them through making a commit, but the TA's don't dock any points for that. The overall attitude is that the autograder is the source of truth, and if they don't set it up properly, they won't get points in the future.
Without any validation, students end up running into the repo setup & project clone issues on Phase 0. It may be helpful to do all the starter-code cloning and pushing into GitHub as part of the setup, and we can even have them do an initial commit from inside Intelli-J. Then they can:

Submit the URL to Canvas
Submit the code on the autograder to receive a score

From the source:

Having the students extract the chess files to their repo, submitting the URL to canvas, and then running the autograder to check if their code in the repo successfully builds. If the code does successfully builds, then the autograder would give them full points.
It would require a bit more work on the students hand, but it should hopefully catch the issue of packaging or build failures in phase0 earlier and remove the need for us to manually grade that assignment.
— @Fiwafoofa

Credit
@Fiwafoofa

@jerodw We had meant to bring this up the TA meeting on Monday. Since we didn't, I wrote up an issue and hopefully we'll remember to talk about it next week 📆
@prattnj What do you think about this idea?

We finally discussed it. A slight changed was made to only require and verify that the student provided a valid and public github url. Verifying the chess starter code is not required as the assignment is due extremely early in the term/semester, leaving students with not enough time in case they get errors


[main] Upgrade to latest dependencies

testing -dprotaso
/cc knative/serving-writers
/assign knative/serving-writers
Produced by: knative-extensions/knobots/actions/update-deps

/lgtm
/approve


Use duck_test package to avoid dependency cycles.

As seen in: https://github.com/knative/pkg/pull/915 :(

Looks like the tracker tests have similar problems, so it may be simpler to move testbindable into a subpackage of pkg/testing :(


[Bug Report] el-checked-group does not support the select object array way?

Element UI version
1.3.6
OS/Browsers version
chorme
Vue version
2.3.4
Reproduction Link
https://jsfiddle.net/hgm6emvj/
Steps to reproduce
如链接所示, 传入数组对象
What is Expected?
希望拿到数组对象里的item, 并且能够全选
What is actually happening?
无法全选, 是我哪里写错了吗

https://jsfiddle.net/hgm6emvj/1/


Upgrade pipelines to Node18 + upgrade nvm recommendation

Update the recommended versions of Node.js for developers to use, as well as the version used by CI.
This updates from version 16 (which goes out of support on 2023-09-11) to version 18 (which goes out of support on 2025-04-30).
The minimum, as enforced by the root package.json's "engines" block is not updated to 18 yet. This can be done after a migration period.
This has no impact on the produced packages, but will allow (but not yet require) developers working in this repo to upgrade.
Users of nvm can upgrade by running: nvm use && rm -r ./node_modules/ && pnpm i in the root of the repo. Deleating the node_modules directory is needed to trigger reinstalling of nodegit to avoid an "Error: Module did not self-register" when building our codebase.

I don't see the NVM recommendation change. That would be in .nvmrc right?

@znewton I see it's already done https://github.com/microsoft/FluidFramework/blob/main/.nvmrc#L1
@robertobe-ms perhaps the PR title and description can be changed ?


What happenes with AMA once we migrate ARC VM to Azure?

Is your feature request related to a new Jumpstart scenario you would like to contribute?

Is your feature request related to a problem? Please describe.

Describe the solution you'd like.

Describe alternatives you've considered.

Additional context.

we can install Azure Migrate appliance installer (zip file) right to the ArcBox-Clien hyper-v VM
In the PS script make sure to delete PowerShell-ISE in the Install-WindowsFeature

This doesnt seem relevant to this repo.


Add a --check-only option

Sometimes you just want to know if a file has changed, and don't care about computing the minimal changes.
This would also benefit from an --ignore-comments option.

This would also benefit from #285.


Release is necessary for integrating with Zig's Package Manager (build.zig.zon)

In order to use Zig's package manager to install this library as a project dependency, it's necessary to create releases.
build.zig.zon required a tar.gz or tar.xz file.

Ah yeah, my bad. I realized this after I opened the same issue on the openxr-zig repository.
I think it would be beneficial to have releases with the respective hash posted as release notes. It would make the overhead of installing a dependency easier.
e.g copy and paste release/tar.gz and its hash

That sounds fine. I'll make one after I resolve some of the other issues that were reported this week.


Use OpenJDK8 instead of Oracle for IT docker (Don't merge)

The integration tests in Travis CI are failing because the docker image can't be built:
Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508271753_28541b80944dd708d047e6e43e9143b5 [following]
--2017-10-17 20:20:33--  http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508271753_28541b80944dd708d047e6e43e9143b5
Connecting to download.oracle.com (download.oracle.com)|<IP_ADDRESS>|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-17 20:20:33 ERROR 404: Not Found.
download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java8-installer

Testing to see if changing to openJDK will get the CI build going again.

IT test is able to run with this patch now, but the latest run hit travis' job time limit

Travis CI passes with this, if we're still having problems tomorrow with the integration tests related to the java 8 install, this will fix the issues for now.

Can you explain more why an openjdk build does not suffice for integration tests?
I'm a bit worried about using something based on echo oracle-java-8-installer shared/accepted-oracle-license-v1-1 select true

@drcrallen When I last tried using OpenJDK instead of Oracle, the integration tests never completed, individual tests seemed to take up to 50% longer if I remember correctly, not sure why there was such slowdown

Gotcha, thanks. This is helpful for any future questions or discussions on the matter.

Be careful when using public, prebuilt Docker images with Oracle Java inside. It is not clear if it doesn't violate their convoluted licensing. Just saying, IANAL.


Wrong path in iqsharp\meta.yaml, conda-recipes is not inside of src.

In iqsharp/meta.yaml there are multiple occurrences of src/conda-recipes. The dir conda-recipes is not inside of src.
cgranade: A typo, sorry... should not have src in that path.

cgranade: No, that's correct. The conda recipe copies the source folder nominated (in particular, ../../ to the src folder in the temporary environment created by conda-build. Those six occurrences are all correct as a result.


VM Exception when interfacing with Kyber contract

Testing a contract that otherwise works against a ganache mainnet fork but when interfacing with the KyberProxy contract I get VM Exception while processing transaction: revert.
Kyber address: 0x818E6FECD516Ecc3849DAf6845e3EC868087B755
The code is as simple as this
function testFunc() public view returns(uint minConversionRate, uint  slippageRate){
uint value =<PHONE_NUMBER>000000;
(minConversionRate, slippageRate) = kyberNetworkProxy.getExpectedRate(ERC20(ETH_ADDRESS), ERC20(snxAddress), value);
}

and the same code works on mainnet without issue. So we can safely rule out any issues related to contract code. Additionally, JS calls to the Kyber contract directly on ganache fork are working, so this bug is specific to interfacing with this contract from another contract on ganache.

I asked about this on gitter: [x ]
Link to my question on gitter: https://gitter.im/ConsenSys/truffle?at=5ea31b31afa1f51d4e1a5b0c

Expected Behavior
Return two values from the getExpectedRate view function
Current Behavior
EVM Revert
Possible Solution
Not sure but I've tested with very high gasLimits and it wasn't any help.
Steps to Reproduce (for bugs)

run ganache-cli --fork https://mainnet.infura.io/v3/<infura-token>
run testFunc()

Context
Your Environment

Version used: Ganache CLI v6.4.3 (ganache-core: 2.5.5)
Version of Truffle/Remix/Other tools used:Truffle v5.0.7 (core: 5.0.7)
Solidity - 0.5.0 (solc-js)
NodeJS Version: Node v13.3.0

Hi, commenting to add that I am also facing the same problem, and have had similar issues with 1inch.

@michaelcohen716 @alonmuroch @bertmiller, any chance any of you can try reproducing the issue with the latest version?
ganache-cli: https://github.com/trufflesuite/ganache-cli/releases/tag/v6.12.0
ganache-core: https://github.com/trufflesuite/ganache-core/releases/tag/v2.13.0
We fixed a handful of issues with storage that hopefully fixed this issue. Thanks!

it's been awhile so probably won't be able to reproduce. good luck!

@seesemichaelj so, I checked and I'm up to date on ganache-cli and ganache-core.
On my 1st try I was able to compile and execute a smart contract that interfaced with 1inch. Success!
Then I moved to compile and execute a smart contract that interfaced with Kyber. This failed with a VM exception.
Then I returned to my 1inch smart contract. Same code as before. But bewilderingly after restarting ganache, re-compiling, and re-executing it now returns a VM exception.

Thanks for the info @bertmiller! I'm going to defer to @davidmurdoch on this one going forward due to a shift of priorities on my end


[Snyk] Security upgrade electron from 15.5.7 to 22.3.25

This PR was automatically created by Snyk using the credentials of a real user.![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to fix 2 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):

doc/js_tutorials/js_assets/webnn-electron/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue
Score

Heap-based Buffer Overflow SNYK-JS-ELECTRON-5923343
  865

Out-of-bounds Read SNYK-JS-ELECTRON-5734243
  641

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Checkmarx One – Scan Summary & Details – e519e2f5-20b6-4a3d-8189-afa73bcb14a8
New Issues

Severity
Issue
Source File / Package
Checkmarx Insight

Buffer_Improper_Index_Access
/3rdparty/libjpeg-turbo/src/jdhuff.c: 240
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/libjpeg-turbo/src/jdhuff.c: 231
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/zlib/gzread.c: 35
Attack Vector

Buffer_Improper_Index_Access
/modules/objdetect/src/qrcode.cpp: 3885
Attack Vector

Buffer_Improper_Index_Access
/modules/objdetect/src/qrcode.cpp: 3879
Attack Vector

Buffer_Improper_Index_Access
/modules/objdetect/src/qrcode.cpp: 3878
Attack Vector

Buffer_Improper_Index_Access
/modules/objdetect/src/qrcode.cpp: 3872
Attack Vector

Buffer_Improper_Index_Access
/modules/objdetect/src/qrcode.cpp: 3859
Attack Vector

Buffer_Improper_Index_Access
/modules/objdetect/src/qrcode.cpp: 3858
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/split.dispatch.cpp: 64
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp: 2419
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/openexr/IlmImf/ImfDwaCompressor.cpp: 2419
Attack Vector

Buffer_Improper_Index_Access
/modules/flann/include/opencv2/flann/result_set.h: 133
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl.cpp: 1440
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl.cpp: 524
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl.cpp: 519
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl.cpp: 504
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl.cpp: 503
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl.cpp: 492
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 795
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 776
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 743
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 624
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 623
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 610
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 609
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 575
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 574
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 559
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 558
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 327
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 326
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 263
Attack Vector

Buffer_Improper_Index_Access
/modules/dnn/src/net_impl_fuse.cpp: 262
Attack Vector

Buffer_Improper_Index_Access
/modules/core/test/test_math.cpp: 1506
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 439
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 437
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 435
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 434
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 433
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 432
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 431
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 430
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 429
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 427
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 426
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 424
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 423
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 421
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 420
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 418
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 417
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 416
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 415
Attack Vector

Buffer_Improper_Index_Access
/modules/core/src/system.cpp: 414
Attack Vector

Buffer_Improper_Index_Access
/modules/calib3d/src/compat_ptsetreg.cpp: 322
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/protobuf/src/google/protobuf/descriptor.cc: 7963
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/openexr/IlmImf/ImfDeepScanLineInputFile.cpp: 879
Attack Vector

Buffer_Improper_Index_Access
/3rdparty/zlib/gzread.c: 35
Attack Vector

Buffer_Overflow_Unbounded_Format
/apps/createsamples/utility.cpp: 1258
Attack Vector

Buffer_Overflow_Unbounded_Format
/modules/calib3d/test/test_cameracalibration.cpp: 331
Attack Vector

CVE-2024-5830
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-5832
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-5834
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-5837
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-5847
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-6290
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-6291
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-6292
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-6293
Npm-electron-22.3.27
Vulnerable Package

Improper_Null_Termination
/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c: 992
Attack Vector

Improper_Null_Termination
/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c: 843
Attack Vector

Process_Control
/3rdparty/ittnotify/src/ittnotify/ittnotify_static.c: 87
Attack Vector

Resource_Injection
/samples/cpp/calibration.cpp: 350
Attack Vector

Resource_Injection
/samples/cpp/calibration.cpp: 350
Attack Vector

Resource_Injection
/samples/dnn/classification.cpp: 45
Attack Vector

Resource_Injection
/samples/cpp/calibration.cpp: 350
Attack Vector

Resource_Injection
/samples/cpp/calibration.cpp: 350
Attack Vector

Resource_Injection
/samples/dnn/classification.cpp: 45
Attack Vector

Resource_Injection
/samples/gpu/hog.cpp: 130
Attack Vector

CVE-2024-5839
Npm-electron-22.3.27
Vulnerable Package

CVE-2024-5840
Npm-electron-22.3.27
Vulnerable Package

Divide_By_Zero
/modules/core/src/cuda_gpu_mat.cpp: 230
Attack Vector

Divide_By_Zero
/modules/core/src/cuda_gpu_mat.cpp: 222
Attack Vector

Divide_By_Zero
/modules/imgproc/src/pyramids.cpp: 1046
Attack Vector

Divide_By_Zero
/modules/imgproc/src/pyramids.cpp: 1046
Attack Vector

Divide_By_Zero
/modules/dnn/test/test_halide_layers.cpp: 202
Attack Vector

Divide_By_Zero
/modules/dnn/test/test_halide_layers.cpp: 109
Attack Vector

Divide_By_Zero
/modules/calib3d/src/calibration.cpp: 4349
Attack Vector

Divide_By_Zero
/modules/calib3d/src/calibration.cpp: 4349
Attack Vector

Divide_By_Zero
/modules/calib3d/src/fundam.cpp: 248
Attack Vector

Divide_By_Zero
/modules/ml/src/boost.cpp: 116
Attack Vector

Divide_By_Zero
/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp: 515
Attack Vector

Divide_By_Zero
/modules/stitching/src/stitcher.cpp: 442
Attack Vector

Divide_By_Zero
/modules/stitching/src/stitcher.cpp: 255
Attack Vector

Divide_By_Zero
/modules/stitching/src/stitcher.cpp: 595
Attack Vector

Divide_By_Zero
/modules/objdetect/src/qrcode.cpp: 1615
Attack Vector

Divide_By_Zero
/modules/ml/src/kdtree.cpp: 214
Attack Vector

Divide_By_Zero
/modules/imgproc/src/lsd.cpp: 581
Attack Vector

Divide_By_Zero
/modules/imgproc/src/histogram.cpp: 2222
Attack Vector

Divide_By_Zero
/modules/imgproc/src/histogram.cpp: 2297
Attack Vector

Divide_By_Zero
/modules/imgproc/perf/perf_resize.cpp: 189
Attack Vector

Divide_By_Zero
/modules/imgproc/perf/perf_resize.cpp: 189
Attack Vector

Divide_By_Zero
/modules/imgproc/perf/perf_resize.cpp: 186
Attack Vector

Divide_By_Zero
/modules/imgproc/perf/perf_resize.cpp: 185
Attack Vector

Divide_By_Zero
/modules/gapi/test/common/gapi_video_tests_common.hpp: 40
Attack Vector

Divide_By_Zero
/modules/gapi/test/common/gapi_video_tests_common.hpp: 39
Attack Vector

Divide_By_Zero
/modules/gapi/samples/pipeline_modeling_tool/pipeline_builder.hpp: 103
Attack Vector

Divide_By_Zero
/modules/flann/include/opencv2/flann/lsh_table.h: 378
Attack Vector

Divide_By_Zero

More results are available on AST platform


feat(frontend): support user privilege check for ddl and dml

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Check privilege for all operations in ddl and dml.
Checklist

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)
Resolve #4001

And please all check can_login when user is connecting.

Do we have a mechanism to avoid forgetting to write these checks?

Maybe add something like control plane and wrap interface in the future.


Crash

The game crashes when I change a shape card to a hollow scan.
MC: 1.12.2
Forge:<IP_ADDRESS>2
RFTools:7.10

Crashlog please

I had this crash flipping thru the shape card. I dont know what was the next option.
https://pastebin.com/AiLt40vn

I can't reproduce this exactly. Do you have some more exact steps on how to do this?

Pull out shape card. Set to hollow. Quickly flip through the options on the left last one I saw was 'Top Dome' then server crashed.
https://pastebin.com/TjWjJNXt

Yes but what kind of shapecard? How was that shapecard made in the first place?

It was crafted like any other shaprecard.

And it started like that? This has never been in a scanner or composer?

Fixed


local nginx port - howto prevent it in links?

Hi there, I want to run wondercms using nginx on a local port 8080.
Port-forwarding is changing this port to std 80 again. But when I access index.php all links appear to be like this:
www.mycomain.com:8080:relative/link.html.
howto prevent wondercms to be using this port configured in my web server?
thx
Stefan

Hello @katakombi.
Please answer a couple of questions so we can help you better.

Have you edited your nginx.conf for WonderCMS as instructed in the wiki?
Can you provide a better example of a link, it is impossible for WonderCMS to generate an .html extension

is the link similar to mydomain.com:8080/wondercmsPATH/index.php?page=example
does the link contain the word relative?
can you possibly copy/paste the whole URL?

Does any page load correctly, are you getting any error messages?
4, Did any other app correctly forward the port, or is it just WonderCMS that doesn't do this correctly?

I'm not an NGINX expert, but WonderCMS should work with any port out of the box. I've done some Googling and found some examples on how to achieve this with the nginx.conf (and WonderCMS should listen to the config by default).
https://stackoverflow.com/questions/37999926/unable-to-forward-port-80-to-8080-using-nginx
https://serverfault.com/questions/536576/nginx-how-do-i-forward-a-http-request-to-another-port
Answer the questions and I'll try to help you to the best of my power. :+1:

Hi @robiso  thanks very much for helping out.
I am pretty much aware it is most likely an nginx thing and got maybe nothing to do with wondercms.
My page is hosted right now here http://dolmades.org/index.php but just for the time being since it is unprotected :)
If you hover over the login link you'll see it resolves to http://dolmades.org:8080/loginURL
My current nginx config is:
site config
server {
listen       8080;
server_name  dolmades.org;
#charset koi8-r;
#access_log  /var/log/nginx/host.access.log  main;

root   /var/www/html;
index  index.php index.html index.htm;

location ~ database.js {
    return 403;
}

autoindex off;

location / {
    if (!-e $request_filename) {
        rewrite_log on;
        rewrite ^/(.+)$ /index.php?page=$1 last;
    }
}

# pass the PHP scripts to FastCGI server listening on socket /run/php/php7.0-fpm.sock
#
location ~ \.php$ {
    #fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass   unix:/var/run/php/php7.0-fpm.sock;
    #fastcgi_index  index.php;
    include        snippets/fastcgi-php.conf;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
    deny  all;
}

}
global conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
rewrite_log on;

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

}
php conf
dolmades.org/info.php

Don't thank me just yet, hope we can get this up and running.
How does it get that port info? Can it be overridden?

the code that displays the URL (along with http or https and some other minor checks) - this is located in index.php, line 117 to line 119, called the url function. Yes it can be overwritten (but like you probably know, you would have to re-enter this change with each update, since we overwrite index.php with each update.

public static function url($location = '') {
	return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443'))? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/')? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
}

You could change the function to not read the port automatically, something like this:
public static function url($location = '') {
	return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((dirname($_SERVER['SCRIPT_NAME']) == '/')? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
}

The above will probably produce the wanted results, but I really wish it could be as simple as changing it like this in your server config (https://serverfault.com/questions/351212/nginx-redirects-to-port-8080-when-accessing-url-without-slash).
Here's the discussion when we implemented the above code for any port support:
https://github.com/robiso/wondercms/pull/37
// Edit
You can also try:
public static function url($location = '') {
return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443') || ($_SERVER['SERVER_PORT'] == '8080')) ? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/')? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
}

Let me know how this goes, I'll try to see and think of a simple plugin, that would enable you to overwrite the url function without having to do it all over with each update.

I see..
thanks for hinting to the pull request. I most cases this makes perfectly sense, but I intend to run nginx+php-fpm and wondercms in user space containers using a generic config across different systems. Ports are forwarded through a router behind.
In this case it doesn't so useful to obtain the domain name and the port number from the settings of the local nginx. I guess the best would be to have in the 'settings' a checkbox 'autodetect external urls'  and two fields 'domain-name' and 'port-number' for manually overriding the functions once you uncheck this option.
I tried to fiddle around with nginx proxy settings but they do not seem to have effect on the existing php code.
Next I'll go a try to rewrite the php function...

I've patched index.php.
What it does is to allow to set servername, serverport, serverdir statically in database.js and override the dynamic detection. Since it is static it won't help in all cases but it seems that the _SERVER variable has a lot of other content which could possibly made use of to contain the correct remote port or host name.
I just don't know how to configure that in nginx nor do I know if it would be consistent across web servers (nginx, apache...).
This works for me, however, so, please tell me what you think of this solution?
Could you include it in wondercms?
index.php.diff                                                                                100% 2216     2.2KB/s   00:00
stefan@khaleesi ~ $ cat index.php.diff
--- /var/www/html/index.php.backup	2017-10-29 08:14:47.567281032 +0000
+++ /var/www/html/index.php	2017-10-29 10:57:11.346750293 +0000
@@ -115,7 +115,14 @@
 		return wCMS::url('themes/' . wCMS::get('config','theme') . '/' . $location);
 	}
 	public static function url($location = '') {
-		return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443'))? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/')? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
+		if (wCMS::get("config","useDynamicServerSettings")) {
+			return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443'))? '' : ':' . $_SERVER['SERVER_PORT']) . ((dirname($_SERVER['SCRIPT_NAME']) == '/')? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $location;
+		} else {
+			$_servername = wCMS::get("config","servername")? wCMS::get("config","servername") : $_SERVER['SERVER_NAME'];
+			$_serverport = wCMS::get("config","serverport")? wCMS::get("config","serverport") : $_SERVER['SERVER_PORT'];
+			$_serverdir  = wCMS::get("config","serverdir")?  wCMS::get("config","serverdir")  : dirname($_SERVER['SERVER_SCRIPTNAME']);
+			return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_servername . ":" . $_serverport . $_serverdir . '/' . $location;
+		}
 	}
 	public static function parseUrl() {
 		if (isset($_GET['page']) && $_GET['page'] == wCMS::get('config','login')) return htmlspecialchars($_GET['page'], ENT_QUOTES);
@@ -553,6 +560,10 @@
 				'theme' => 'default',
 				'defaultPage' => 'home',
 				'login' => 'loginURL',
+				'useDynamicServerSettings' => true,
+				'servername' => $_SERVER['SERVER_NAME'],
+				'serverport' => $_SERVER['SERVER_PORT'],
+				'serverdir' => dirname($_SERVER['SERVER_SCRIPTNAME']),
 				'password' => password_hash('admin', PASSWORD_DEFAULT),
 				'menuItems' => [
 					'0' => [
@@ -607,4 +618,4 @@
 		]);
 	}
 }
-wCMS::init();
\ No newline at end of file
+wCMS::init();

Tested out your solution on main domain, subdomain, subdomain + dir and all worked perfectly fine.
Even when the first run of WonderCMS (first visit generates the database.js) saved the 80 port in the database, I had no trouble visiting the 443 port. Additionally tested out scenario where I set it to false, and everything worked out well.
I personally like the idea that the user could manually set this the dynamic value to false in the database.js itself.
Can I kindly ask for your input @gakowalski and @Alamantus? Does anyone notice any downsides to this?
@katakombi, can you please provide your name/last name and possibly a website, so we can include you to our list of contributors if this gets included?
Note: @katakombi, no matter how hard we try to remove the last line from GitHub, it will always re-appear, the extra space is never included in the ZIP file, only on GitHub files. :smile:

Those code changes look pretty good to me! If you don’t have an issue with adding those lines to the code base, I think it would be good to include the option for power users.
The only problem I can foresee is that adding those lines could potentially become an issue if a non-advanced user wanted to move their website to a new host and someone else had previously updated those settings to a specific server beforehand. It could cause some confusion/frustration if the user doesn’t know that extra settings were tweaked in the js file.
Maybe we could include the code change to the url() method but not update the default config? We could include how to change the database.js to make it utilize the advanced feature in the wiki or something, but it would not add the current server’s data by default. That way, a user could make the change but have a reference for what changed if they looked it up in the future.
Does that make sense? Thoughts?

Hi everyone,
one thing is that the port will be always included when the static config is taken. this could be changed in similar ways like the dynamic config removes std ports (80, when http, 443 when https is being used).
Personally I don't care to have ports in the generated links, but I wanted to let you know!
I'd be happy if you could merge the code, my name is Stefan Kombrink.
@Alamantus I am not sure I understand your concern/proposal. My standard config is not changing any behaviour in comparison as it was before.  Could you elaborate more, please?

@katakombi My concern is if someone uses WonderCMS to build a website for a user, then leaves, then the user wants a new web host. WonderCMS is great because you can simply take all the files in the folder and put it on any other web host and it will act exactly the same. If there had been an admin who utilizes the feature and then suddenly there is no longer an admin, the user could have a frustrating time trying to figure out what's wrong with their website if it is not clearly documented as an extra thing.
Or, imagine this (perhaps unlikely) scenario
This code sets the defaults to the current server:
'servername' => $_SERVER['SERVER_NAME'],
'serverport' => $_SERVER['SERVER_PORT'],
'serverdir' => dirname($_SERVER['SCRIPT_NAME']),

If 'useDynamicServerSettings' => true, ever somehow (accidentally, perhaps?) gets set to false and then the user moves the site to a new server. Those default settings are still pointing to the old servername, serverport, and serverdir, so when the user puts the site on their new web host server, their links are all broken because they are pointing to the previous server.
What I'm suggesting is to not set those default settings within the initialization code, but rather to include instructions for how to set the JSON in the resulting database.js file only if necessary.
Does that make sense?

@Alamantus You vote for rather having no init code for the database.js than to have it broken when a common user move it. I understand this problem but I don't understand how you want to store the settings then? How do you want to set the json in the resulting database.js file only if necessary, and how would it avoid the very same problem?
Or do you want to outsource the url function?

I believe the proposed changes lead in the wrong direction. WonderCMS is a CMS system and should only minimally deal with issues such as ports, addresses, redirects, proxies - it should focus on content management. If not for the fact that it currently uses absolute URLs (which is an anti-pattern generating exactly this kind of problems we are discussing right now), it should not deal with them at all. The right place for such things is the web server and the router. Nginx has a wide range of configuration options and proper redirections and rewrites can be achieved in a variety of ways. WonderCMS in this aspect should strive to simplify the code and not expand it.
You might think that it's not a big deal to add a couple new settings to database.js, defining static server names or ports, but power users might need more: setting different protocols, specific HTTP headers etc. All these things are currently supported in web servers. There is no need to duplicate such features and solve complexities that it might bring. It has been successfully addressed elsewhere.
What eventually could be implemented in WonderCMS is proper support of proxy specific variables like HTTP_X_FORWARDED_SERVER, HTTP_X_FORWARDED_HOST, HTTP_X_FORWARDED_PROTO, HTTP_X_FORWARDED_PORT  and others. This could make configuring web servers easier.
@katakombi

I've read about nginx config (forgot to bookmark the page) that SERVER['SERVER_PORT'] is defined by the running web server and cannot be overridden by the user.

You can set it's value using fastcgi_param in nginx config. You can aslo modify it in PHP script as regular variable, so there is no need to introduce additional variables and change body of url() . In your specific case, you might want to hardcode SERVER_PORT value as 80. If for some reason that wouldn't work, there are other ways like using sub_filter module to rewrite URLs in HTML content.

I will try to modify SERVER_PORT once more based on what Grzegorz
recommends - I will prefer any solution which works without modifying
wondercms code.
I think it could help users a lot to have a hint in the installation docs
as to how the url function will determine links, and what to configure in
cases like mine. I'd say it is not such a special case...

@Alamantus, @gakowalski, @katakombi, thank you for the discussion and finding the time to contribute to this project.
@katakombi, did your SERVER_PORT solution work without editing the index.php? If you managed to do this without the edit (maybe using functions.php?), please provide your example so we can add it to the wiki.
So in short, what I need to be adding to the wiki:

how the url functions works / how/where the links are generated
working example for when a case like yours happens
please suggest anything that might have helped you and you wish we already had in the docs (but had to find out the hard way)

Offtopic:
Once we gain more ground, anybody up for a WonderCMS summit in 2020? :tada:

Dear @robiso your'e welcome.
Please have a look at https://github.com/katakombi/wondercms/tree/nginx-docker where I forked wondercms and added a Dockerfile plus the related nginx/php configs.
This builds a container which hosts a wondercms in user space under port 8080.
For that docker needs to share the wondercms location under /var/www/html.
What users need to have is in particular the proper
https://github.com/katakombi/wondercms/tree/nginx-docker/fastcgi.conf
and https://github.com/katakombi/wondercms/tree/default

@katakombi, I see the changes introduced in fastcgi.conf.
fastcgi_param  SERVER_PORT 80;
fastcgi_param  SERVER_NAME "dolmades.org";

However, I do not know what important changes you made to default. Could you explain? My attention was caught only by include snippets/fastcgi-php.conf;. Is it a copy of cfg/fastcgi.conf? Dockerfile contains command to copy that file but to etc/nginx, not to snippets.

Yeah sorry, I've slipped that file which is part of the debian default installation:
root@f4a77c2004a6:/# cat /etc/nginx/snippets/fastcgi-php.conf
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;

# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;

# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;

fastcgi_index index.php;
include fastcgi.conf;

Maybe it would work without it just using the /etc/nginx/fastcgi.conf I'd need more testing to be sure.
Meanwhile you can track changes to my repo https://github.com/katakombi/wondercms/ as I plan to add https support in the nginx-docker branch and this will require more changes.
keep up the good work
Stefan

@katakombi, is there any way you could do a short explanation of how you've achieved wanted results? I'd love to include it in the wiki.
Please feel to re-open the issue if you feel it hasn't been properly solved.

Hi @robiso
have a look at the Docker file here https://github.com/katakombi/wondercms/blob/nginx-docker/Dockerfile
It makes use of the following config files:
https://github.com/katakombi/wondercms/tree/nginx-docker/cfg
You should  compare those to the default template configs which are delivered by the installed packages - the changes should be rather small.
It all boils down to override the PHP variables SERVER_NAME and SERVER_PORT.
Note that the configs are for HTTP not HTTPS.
Greetings and best wishes for 2018
Stefan


[Y2K-36] Files Settings on Mobile

This implements settings for files notifications on mobile.
cc @keybase/y2ksquad
TODO: before merging, I need to revert c4f1598 since it bypasses the offline flag for testing.

@jakob223 there is one more coming, that connects the notifications to the new state.


Fix bugs

Turn on Bluetooth to connect to the headphones, and then open the app to enter safe mode

Same


Error with Minio RELEASE.2018-02-09T22-40-05Z

I get the following error on scraping:
level=error msg="ERROR: collector failed after 0.002589s: invalid character '<' looking for beginning of value" source="minio_exporter.go:118"

I run the latest version of the minio-exporter docker image. Minio-exporter is able to authenticate with Minio.

Had this problem with RELEASE.2018-03-19T19-22-06Z. Was able to fix by re-building with newer versions of the dependencies - apparently there was a breaking change in the minio admin API.


Always modify UserObjectQosPolicy regardless of override policy

This PR updates rmw_connextdds to always modify DomainParticipantQos::user_object (as introduced by #25) regardless of the participant QoS override policy requested by the user (introduced by #41).
This is required to let the participant be shared with applications using Connext's C++11 API, even when they use policies basic or never. In these cases, applications would not be able to properly use the participant because UserObjectQosPolicy cannot be modified from XML:
RTIXMLParser_validateOnStartTag:Parse error at line 263: Unexpected tag 'user_object'

The change is trivial, since it only consists of moving a block to the beginning of rmw_connextdds_initialize_participant_qos_impl().

Since this PR has no functional impact wrt/unit testing when compared to #25 and #41 (because the differences only occur when RMW_CONNEXT_PARTICIPANT_QOS_OVERRIDE_POLICY is set to a value other than all), I'd like to merge it without running CI to save some time, but if we want the "checkbox marked", then I'll start the plans.
@ivanpauno is this allowed by the process?

Since this PR has no functional impact wrt/unit testing when compared to #25 and #41 (because the differences only occur when RMW_CONNEXT_PARTICIPANT_QOS_OVERRIDE_POLICY is set to a value other than all), I'd like to merge it without running CI to save some time, but if we want the "checkbox marked", then I'll start the plans.
@ivanpauno is this allowed by the process?

I agree that there's no functional impact in this PR.
I typically run at least CI in one platform with colcon build ... --packages-up-to rmw_connextdds_common colcon test ... --packages-select rmw_connextdds_common, to check that everything still builds/linters still pass (I used rmw_dds_common in the commands as an example, I write there the list of packages affected by the PR).

Quick CI validation (Linux, build --packages-up-to rmw_connextdds, test --packages-above rti_connext_dds_cmake_module):

--packages-up-to rmw_connextdds, test --packages-above rti_connext_dds_cmake_module

test --packages-above rti_connext_dds_cmake_module failed here because it's trying to run tests in packages that weren't build.
You have to make sure that the packages selected in the test command are a subset of the ones selected in the build command (which can be a bit confusing sometimes).
Linux

Oops, thank you for running with the right arguments, I see the issue now. I tried to be "slick" but I was definitely too quick :)
I think I could have used --packages-above rti_connext_dds_cmake_module --packages-up-to rmw_connextdds to just test the packages from ros2/rmw_connextdds.
Anyway, since things are green I'll go ahead and merge this PR.


Extraction of texts for translation

Hello!
There are many messages that are not in the files for translation.
Please run the extraction of messages for translation again.

Done!


uploads in assets folder won't display

I don't know if this is a problem with my hosting and/or the htaccess files?
When I upload media it is getting put into root > assets. The problem is, when I browse to the media file http://mydomainname.com/assets/file-name.gif, I get a 404 error.
I tried commenting out this two lines in roots-activations.php:
update_option('uploads_use_yearmonth_folders', 0);
update_option('upload_path', 'assets');
But, the files still get uploaded to the assets folder.
I am fine with using uploads if there is any way to disable the changed path. I just need it to work.
Any advice?

np :)


The result is really not good

I used the image with texts which is get by office word, but the result is really bad, should I do some other settings for the use like the encoding or something else? And by the way, where is the Chinese tessdata, I need to recongnize the Chinese as well. Thanks for your excellent work.

I've moved the information provided here to the Wiki: https://github.com/gali8/Tesseract-OCR-iOS/wiki/Tips-for-Improving-OCR-Results
I've also added some more notes about using GPUImage. I'll close this issue, but any other ideas about improving OCR results for Tesseract should be added to the Wiki page.

Good job!
Should we explain about skipping the internal thresholding somewhere? or at least mention about this feature on that page?

Yeah I think that'd be good to add. Want to add another section (one "#" in markdown) to explain about it?

How can I do this? Do I have a write access to the Wiki?
Wow! I do! :)
Let me try.

No. actually I don't. I can only edit the Sidebar content. I cannot find how to edit the wiki pages.

I think you should be able to because @BamX was able to edit one of the Wiki pages and he doesn't have collaborator status. Here's where I see it:

Ah! Thanks a lot for the help.
Seems ok now.


Fix max retry option for bot

:recycle: Current situation
The max retry function doesn't work because this.switchbot is undefined resulting in the following error:
"Cannot read properties of undefined (reading 'wait')"

:bulb: Proposed solution
Pass the switchbot reference to the max retry function.
:heavy_plus_sign: Additional Information
The max retry function was added in 20811cf3df2cfc11dbe8aac1f1059c5caedff29c to several devices, it appears to be an error as the config references the bot device:
https://github.com/OpenWonderLabs/homebridge-switchbot/commit/20811cf3df2cfc11dbe8aac1f1059c5caedff29c#diff-860fc236f2ad2dc501aacf1a8afd1ee4b8a5ea047a52ba86eb313eed6cf64ce0R975

please rebase to beta-2.4.0 branch and then I will merge.

actually I will close this as I have resolved this with the last push to the beta-2.4.0 branch! Thanks!


HTML5: Fix support for Emscripten 1.39.1+

A change in upstream Emscripten 1.39.1+ made our buildsystem error
out where it was previously only issuing a warning:
[  5%] Linking Static Library ==> main/libmain.javascript.opt.bc
shared:WARNING: Assuming object file output in the absence of `-c`, based on output filename. Please add with `-c` or `-r` to avoid this warning
Ranlib Library         ==> main/libmain.javascript.opt.bc
/opt/emsdk/upstream/bin/llvm-ranlib: error: unable to load 'main/libmain.javascript.opt.bc': file too small to be an archive

As advised on emscripten-core/emscripten#9806, we should be using
emar here to create the static library and not emcc.
This was apparently done to workaround Emscripten issues in the past,
but evidently this is no longer necessary.
The rest of the env redefinitions should probably be re-assessed
against the current state of Emscripten.
Fixes #33374.

Cherry-picked for 3.1.2.

Cherry-picked for 3.0.7.

Cherry-picked for 2.1.7.


0.1.0

Completely new SDK monorepo based on posthog-js-lite

Queuing
No ordering
Support for Node.js < 18
Tests
Retries
Improved logging with .debug()

Wait for https://github.com/langfuse/langfuse/pull/74 to merge


List of CCBC Program Documents: Report Reconcile

Based on spreadsheet of NDIT reporting, create new tab for:

NEW CCBC Schedule of Reporting
A tab for each report, with what fields will be required for each report.

This card will be done when a first draft of the overall list of reporting requirements are complete, and that list, with audience and periodicity has been run by Susan.
Sheet: https://bcgov.sharepoint.com/:x:/r/teams/04708/Shared Documents/Program and Project reporting/CCBC Schedule of Reports.xlsx?d=w65525288d6cf492292eb3310aca85e7e&csf=1&web=1&e=O2VKee

Completed. List of program documents lives in Sharepoint. Map to reporting requirements is also a tab in this spreadsheet. Future sprint goals should be based on individual report goals.
https://citz.sp.gov.bc.ca/sites/OCIO/CONN/NWBC/CC/SitePages/Home.aspx


Incorrect Dev Call info on PX4 / Dronecode properties

An increasing number of users have been reporting incorrect dev call information on some of our properties; please use this issue to track any reports from users.

According to @hamishwillee and from what I can see this is fixed.

The docs are definitely fixed - there is just ONE copy now of dev call info, and that is in the master docs .
I'm closing this as "Fixed for now"


Deprecation error throws in full expression rather than actual type

Description:

This is reflected in Deprecation BBE. Check the error messages for line 78 and line 81.
warning: .::deprecation.bal:35:5: usage of construct 'Address' is deprecated
warning: .::deprecation.bal:39:22: usage of construct 'LKA' is deprecated
warning: .::deprecation.bal:65:76: usage of construct 'Person' is deprecated
warning: .::deprecation.bal:68:5: usage of construct 'Person' is deprecated
warning: .::deprecation.bal:78:5: usage of construct 'Person' is deprecated
warning: .::deprecation.bal:78:16: usage of construct 'createPerson(Jane, Doe, Castro Street, Mountain View, USA)' is deprecated
warning: .::deprecation.bal:81:16: usage of construct 'p.getFullName()' is deprecated

Refer to PR: https://github.com/ballerina-platform/ballerina-distribution/pull/577
Changes introduced by this PR needs to be amended after the proper fix.
Steps to reproduce:
Please run Deprecation BBE in new parser.
Affected Versions:
jBallerina 2.0.0-Preview1-M6
OS, DB, other environment details and versions:
macOS Cataline
Suggested Labels (optional):
Area/Language,Type/Bug

Closing since this BBE is removed now.

Reopening this since it is a compiler issue.
The string representation of the expression is still used (slbeta1).
Reproducible with
@deprecated
function foo(int i, string s) {

}

public function main() {
    foo(1, "hello");
}

Compiling source
        test.bal
WARNING [test.bal:(7:5,7:20)] usage of construct 'foo(1, hello)' is deprecated

Fixed with https://github.com/ballerina-platform/ballerina-lang/pull/35286


Exponential value in model

Good afternoon,
In my model I define the number of agents and the best entry intervals per interval, given the need to manpower.
I minimize the sum of the absolute value of the difference between the number of agents allocated and needed per entry, the calculation is being done correctly.
However, it is necessary to include a parameter that validates if the daily weighted average of the wait_probability indicator is greater than or equal to a fixed value, for example 90%.
I created a model.NewIntVar (servers) that will receive the sum of the number of agents from all shifts for a specific interval to use in the function below.
The variable:
sum_server[e] = model.NewIntVar(-1000,1000,"sum_server {}".format(e))
sum_server[e] = sum([x[i,c] for c in range(len(list_carga_horaria)) for i in range(e+1) if (e-i) < list_carga_horaria[c]])
The type:
type(sum_server[e]) = <class 'ortools.sat.python.cp_model._SumArray'>
Calculation of the indicator (Erlang C):
def wait_probability(traffic, servers):
L = (traffic**servers / factorial(servers)) * (servers / (servers - traffic))
sum_ = 0
for i in range(servers):
    sum_ += (traffic**i) / factorial(i)
return (L / (sum_ + L))

When I run the model I get the error below:
TypeError: unsupported operand type(s) for ** or pow(): 'float' and '_SumArray'
Exactly on "traffic**servers"
I saw in another post that ortools does not work with exponents, we already have some way out, do any have any ideas?
Att,
Sergio Terzella

Precompute everything and use an element constraint.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le mar. 3 mars 2020 à 22:31, sergioterzella<EMAIL_ADDRESS>a
écrit :

Good afternoon,
In my model I define the number of agents and the best entry intervals per
interval, given the need to manpower.
I minimize the sum of the absolute value of the difference between the
number of agents allocated and needed per entry, the calculation is being
done correctly.
However, it is necessary to include a parameter that validates if the
daily weighted average of the wait_probability indicator is greater than or
equal to a fixed value, for example 90%.
I created a model.NewIntVar (servers) that will receive the sum of the
number of agents from all shifts for a specific interval to use in the
function below.
The variable:
sum_server[e] = model.NewIntVar(-1000,1000,"sum_server {}".format(e))
sum_server[e] = sum([x[i,c] for c in range(len(list_carga_horaria)) for i
in range(e+1) if (e-i) < list_carga_horaria[c]])
The type:
type(sum_server[e]) = <class 'ortools.sat.python.cp_model._SumArray'>
Calculation of the indicator (Erlang C):
def wait_probability(traffic, servers):
L = (trafficservers / factorial(servers)) * (servers / (servers - traffic))
sum_ = 0
for i in range(servers):
sum_ += (traffici) / factorial(i)
return (L / (sum_ + L))
When I run the model I get the error below:
TypeError: unsupported operand type(s) for ** or pow(): 'float' and
'_SumArray'
Exactly on "traffic**servers"
I saw in another post that ortools does not work with exponents, we
already have some way out, do any have any ideas?
Att,
Sergio Terzella
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1906?email_source=notifications&email_token=ACUPL3KP3MLDXBZE4HPCLLTRFVZL3A5CNFSM4LATUD52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISFGGLQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3P2L5HAOJ7GLLPU2PTRFVZL3ANCNFSM4LATUD5Q
.


fx: deployedContracts data inconsistency

Solves #369

As per our discussion on separation of deployed contracts into two files, one of which being for local deployments which is gitignored, there are two working solutions that I was able to find:

Creating a postinstall script just like before that will generate the empty (returning null) deployedLocalhostContracts.ts file
importing using try catch and require statements

I have implemented and tested the second method and it works well too. We can have further discussion on what to go ahead with now... and also if there is any other method.
Reviews and opinions @sverps @carletex @damianmarti @technophile-04

Wait why aren't my new commits showing up in this PR :)
Anyone has faced this problem or knows how to fix this?
I have pushed changes into kevinjoshi46b:fx-deployedContracts-data-inconsistency branch you can check it out there or maybe I might have to just create another PR :)

Closing this now, will try to create a fresh one later this week as discussed in #370
But Tysm @kevinjoshi46b, really appreciate it !!!


Add Demos & Examples page

Preview here - https://luxonis-docs-website--166.com.readthedocs.build/en/166/pages/examples/

Since the web preview is private, here are some screenshots of what this looks like so far:

Updated the preview, I think it's good to merge now

@VanDavv  Hello World and Multiple DepthAI per Host  tutorials have the same description.
Examples: Age Gender Recognition and Licence Plates Recognition have longer descriptions than others (starting from First,...). Maybe you could rephrase them to look similar to the others?


how can I modify value in tensor

def lineToTensor(line):
    ivl = line[0].split(',')
    response = line[1].split(',')
    tensor = torch.zeros(len(response), 2)
    for li, response in enumerate(response):
        tensor[li][0] = int(ivl[li])
        tensor[li][1] = int(response)
    return tensor

Is there some API like the following code? I only find the set_data, but it requires giving the new data.
fn line_to_tensor(line: &str) -> Tensor {
    let values: Vec<&str> = line.trim().split(',').collect();
    let ivl: Vec<i64> = values[0]
        .split(',')
        .map(|x| x.parse().unwrap())
        .collect();
    let response: Vec<i64> = values[1]
        .split(',')
        .map(|x| x.parse().unwrap())
        .collect();
    let mut tensor = Tensor::zeros(&[response.len() as i64, 2], (Kind::Float, Device::Cpu));
    for (i, &r) in response.iter().enumerate() {
        tensor.set(&[i as i64, 0], ivl[i] as f64).unwrap();
        tensor.set(&[i as i64, 1], r as f64).unwrap();
    }
    tensor
}

You can probably narrow on the different dimensions and use fill_, e.g. using the indexing operator tensor.i((i as i64, 0)).fill_(ivl[i]) (I haven't tested it though).

Closing this, hopefully the suggestion above did the trick.


Support RGB, YBR_FULL and YBR_FULL_422 PhotoMetricInterpretation

Hi @Enet4
This PR adds support for RGB, YBR_FULL and YBR_FULL_422 as PhotoMetricInterpretation.
It works by converting YBR_FULL and YBR_FULL_422 color spaces to RGB.
Now that I read through this PR, I think it might be a better option to do this:

Read as ndarray.
Optional Apply modality LUT and make it a public method under the utilities module.
Optional Convert color space and make it a public method under the utilities module.
Convert to DynamicImage

What do you think?
Closes: https://github.com/Enet4/dicom-rs/issues/119

Hi @Enet4 , I changed it a bit.
There were many places where I converted vectors back and forth. I tried to reduce that.
I reduced the complexity a bit by assuming that colored dicoms are either 8 bit, or 16 bit unsigned without any transformation. I think that is a safe assumption.
Grayscale images are handled via to_ndarray. Modality LUT is applied, MONOCHROME1 is inverted (I couldn't find a valid test file yet, I'll search for one), and then normalized to u16. VOI Lut is still missing.
I'm also replacing pixels when converting them to RGB, instead of creating a new vector.


Create generic configurations

Currently, YAML configurations assume that the canonical Bookinfo app is installed and is used for testing performance. It would be beneficial to have generic configurations to allow for testing performance with non-standard workloads.

I agree. We should at least allow providing custom yaml as done for other adapters.


[QUESTION] Does it protect from Web Debuggers?

Does it protect your project against web debuggers such as Fiddler, HTTP Debugger and many others?
And against forced proxy clients? Like proxifier.

No, this project is to protect .NET code against debugging or running programs on emulators and can in no way prevent listening on system ports.


Update qt_windeployqt.cmake

Pull request type

Please check the type of change your PR introduces:

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Issue Number: #553
What is the new behavior?

Does this introduce a breaking change?

[ ] Yes
[x] No

Other information

The issue here is that qt_windeployqt was actually meant for internal use, where the parent_scope is required due to the cmake layout. That was why I said that we may just not install it at all.
If we want the file to appear in the installation and also be usable, we must find a universal way, probably by either making the parent_scope work in the installation or by moving the file so we don't need parent scope internally any more.

Hi Florian,
I guess I was too quick and over confident about the change. :)
Nevertheless, I agree, whatever is available/public, the user should have the possibility to use it. I did not know you also plan not to have it available in the installer, that's also a way to solve it.
Then I think we can close this pr. :)
Best regards,
Oana


[Pentest] klimadao.finance

Web application - work in progress.

@AleksandrMikhail0x1337 will you also run the test on carbonmark.com?

100% yes I will do so separately.


Allow tutor to create pre-configured VM using a public image

Use public image, run a script to install things, instead of uploading which will take sometime.
Current implementation supports creation of instance using public image by simply specifying the image name and its project name. Though, other ways of automating installation of software may be considered instead of relying on a bash/powershell script. One may consider ansible? Otherwise, startup script is fine.

Front-end just have a radio button that let's tutor choose to create instance based on public or custom image.

Specify a script for SSH login for public images


Extend MmapAsRawDesc to handle anything implementing AsRawFd

This automatically extends support to e.g. async-std. For example, the following variants on its cat example works
use std::env::args;

use async_std::fs::File;
use async_std::io;
use async_std::prelude::*;
use async_std::task;

use memmap2::Mmap;

fn main() -> io::Result<()> {
    let path = args().nth(1).expect("missing path argument");

    task::block_on(async {
        let file = File::open(&path).await?;
        let map = unsafe { Mmap::map(&file)? };

        let mut stdout = io::stdout();
        stdout.write_all(&map).await?;
        stdout.flush().await?;

        Ok(())
    })
}

I am looking into doing the same for Windows, i.e. going for
#[cfg(windows)]
pub struct MmapRawDescriptor(RawHandle);

even though it will mean breaking this up against #[cfg(not(any(unix, windows)))] again. Sorry for the back and forth... |-\

Sure, not problem. I like those patches.


tag-release: update the submodules for the SDK container

For the SDK container we need to make sure that we update the new
coreos-overlay and portage-stable submodules in the scripts repo.
At the same time we need to remain compatible with the old way,
which is still used in LTS.
Leveraging https://github.com/flatcar-linux/scripts/pull/198 we can
use the submodule update helpers and push the update to the release
maintenance branch and also sign the commit as done before. This is
has to be done after the tags for coreos-overlay and portage-stable
are created the old way (which is not covered by the ci-automation).
The other commit is just to move back to the flatcar-linux GitHub org.
How to use
Testing done
None

Doing a test run for a flatcar-1234 branch


MAINTAINERS: update for x86 arch and platform

Update collaborators list for x86 arch and platform

@nashif @MaureenHelm  could you please approve and help to merge the PR ?


Questions about WMT14 EN-DE dataset.

Thank you for your wonderful work, there is a question about WMT 14 EN-DE dataset. I can't find the code of RFA on WMT 14 EN-DE dataset. Could you please release them? Since I have tried to train RFA on WMT 14 EN-DE dataset, but it cannot converge, thanks.

Sorry for the late reply. Please go to our official repo for more details. We provide the scripts for process MT data:
https://github.com/facebookresearch/mega/blob/main/examples/mega/README.mt.md


Pr/axis

Features

Pure Axes
All d3.svg.axis functions are implemented that change the axis

Notes

Most of the axis functions can take no parameters and will spit out the current value or the default (e.g., .ticks() => 10). None of these are implemented. I'm not sure how necessary they are: I don't think any of them give meaningful or hard to compute information. Moreover, I don't know when they're actually used.
The Axis implementation is in D3/SVG/Axis.elm. There is a new directory, it mirrors the D3js structure. D3 has a lower case naming scheme but elm-d3 is natural case. Do you feel strongly about SVG, Svg, or svg?

What next?
Once this gets merged in, I have my bar graph example that I'd like to get in. It could be a good resource for someone who wants to use Scale and Axis.

Gonna stick to the core selection API for now. Sorry for taking so long to address this.


Updated the Links

Fixed the Galaxy Australian Badge Links

Awesome, thanks @Harrystark99!

Hopefully, It solves the Australian Badge Issue


Truncated result with unixodbc driver

I trying to use sqlpad with Firebird databases but the displayed result only show the first char of String columns values.
When i try the same query with isql or Squirrel, the result was good.
Is there an settings to display all correct result or is it a display issue ?
Or a Database setting ?
ISQL :

Squirrel :

SQLPad :

Hi @Overcrash86.
What kind of encoding is used for this DB? There are some open issues in Node's ODBC driver that might be the culprit (https://github.com/markdirish/node-odbc/issues/242, https://github.com/markdirish/node-odbc/issues/106, https://github.com/markdirish/node-odbc/issues/100)

Hi @rickbergfalk ,
my database use UTF-8, i'fe tryed to configure the ODBC connection string with specified charset but without success.
Somes connection string tries :
DRIVER=Firebird;UID=SYSDBA;PWD=masterkey;DBNAME=<IP_ADDRESS>/3050:/db/OPEN_DB.FDB;CHARACTERSET=utf-8
DRIVER=Firebird;UID=SYSDBA;PWD=masterkey;DBNAME=<IP_ADDRESS>/3050:/db/OPEN_DB.FDB;CHARSET=utf-8
DRIVER=Firebird;UID=SYSDBA;PWD=masterkey;DBNAME=<IP_ADDRESS>/3050:/db/OPEN_DB.FDB;
i'll look on node-odbc, thx for links.


Failed install of testnodes now Flexdash uninstall failed!

Node-RED palette failed install of testnodes.  I tried to uninstall Flexdash.  Now the uninstall failed!  "Error: Unrecognised module: @flexdash/node-red-flexdash".  It looks like it partially uninstalled, now it cannot complete the process.  Is it in no-mans-land?

Without knowing what you did nor any logs, I'm afraid it's impossible to help you...
I would appreciate if you could post details in the forum...