test_home_installation_scheme fails on Python 3.11 on Windows

  tox
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    pythonLocation: C:\hostedtoolcache\windows\Python\3.11.0-beta.3\x64
python create: D:\a\distutils\distutils\.tox\python
python installdeps: pytest, jaraco.envs>=2.4
python installed: atomicwrites==1.4.0,attrs==21.4.0,colorama==0.4.4,distlib==0.3.4,filelock==3.7.1,iniconfig==1.1.1,jaraco.envs==2.4.0,packaging==21.3,path==16.4.0,platformdirs==2.5.2,pluggy==1.0.0,py==1.11.0,pyparsing==3.0.9,pytest==7.1.2,six==1.16.0,toml==0.10.2,tomli==2.0.1,tox==3.25.0,virtualenv==20.14.1
python run-test-pre: PYTHONHASHSEED='249'
python run-test: commands[0] | pytest
============================= test session starts =============================
platform win32 -- Python 3.11.0b3, pytest-7.1.2, pluggy-1.0.0
cachedir: .tox\python\.pytest_cache
rootdir: D:\a\distutils\distutils, configfile: pytest.ini
collected 306 items
distutils\_collections.py .                                              [  0%]
distutils\_functools.py .                                                [  0%]
distutils\unixccompiler.py ...                                           [  1%]
distutils\versionpredicate.py ..                                         [  2%]
distutils\command\sdist.py .                                             [  2%]
distutils\tests\test_archive_util.py .s...............s..                [  9%]
distutils\tests\test_bdist.py ...                                        [ 10%]
distutils\tests\test_bdist_dumb.py ..                                    [ 10%]
distutils\tests\test_bdist_msi.py ..                                     [ 11%]
distutils\tests\test_bdist_rpm.py ss.                                    [ 12%]
distutils\tests\test_bdist_wininst.py ..                                 [ 13%]
distutils\tests\test_build.py ..                                         [ 13%]
distutils\tests\test_build_clib.py ....s.                                [ 15%]
distutils\tests\test_build_ext.py s..sss........s..sss.........          [ 25%]
distutils\tests\test_build_py.py .......                                 [ 27%]
distutils\tests\test_build_scripts.py ....                               [ 28%]
distutils\tests\test_check.py ..s.ss.                                    [ 31%]
distutils\tests\test_clean.py ..                                         [ 31%]
distutils\tests\test_cmd.py ........                                     [ 34%]
distutils\tests\test_config.py ....                                      [ 35%]
distutils\tests\test_config_cmd.py ...s.                                 [ 37%]
distutils\tests\test_core.py ........                                    [ 39%]
distutils\tests\test_cygwinccompiler.py .s..                             [ 41%]
distutils\tests\test_dep_util.py ....                                    [ 42%]
distutils\tests\test_dir_util.py ......s.                                [ 45%]
distutils\tests\test_dist.py ........s......................             [ 55%]
distutils\tests\test_extension.py ...                                    [ 56%]
distutils\tests\test_file_util.py ......                                 [ 58%]
distutils\tests\test_filelist.py ..............                          [ 62%]
distutils\tests\test_install.py ...F.s..                                 [ 65%]
distutils\tests\test_install_data.py ..                                  [ 66%]
distutils\tests\test_install_headers.py ..                               [ 66%]
distutils\tests\test_install_lib.py ......                               [ 68%]
distutils\tests\test_install_scripts.py ...                              [ 69%]
distutils\tests\test_log.py ..                                           [ 70%]
distutils\tests\test_msvc9compiler.py .....                              [ 71%]
distutils\tests\test_msvccompiler.py s......                             [ 74%]
distutils\tests\test_register.py .....s..s.                              [ 77%]
distutils\tests\test_sdist.py ........s.......                           [ 82%]
distutils\tests\test_spawn.py ....                                       [ 83%]
distutils\tests\test_sysconfig.py .s...s....s...s..                      [ 89%]
distutils\tests\test_text_file.py ..                                     [ 90%]
distutils\tests\test_unixccompiler.py sss.s.                             [ 92%]
distutils\tests\test_upload.py .......                                   [ 94%]
distutils\tests\test_util.py ..s.........                                [ 98%]
distutils\tests\test_version.py ....                                     [ 99%]
distutils\tests\test_versionpredicate.py .                               [100%]
================================== FAILURES ===================================
________________ InstallTestCase.test_home_installation_scheme ________________
self = <distutils.tests.test_install.InstallTestCase testMethod=test_home_installation_scheme>
    def test_home_installation_scheme(self):
        # This ensure two things:
        # - that --home generates the desired set of directory names
        # - test --home is supported on all platforms
        builddir = self.mkdtemp()
        destination = os.path.join(builddir, "installation")
        dist = Distribution({"name": "foopkg"})
        # script_name need not exist, it just need to be initialized
        dist.script_name = os.path.join(builddir, "setup.py")
        dist.command_obj["build"] = support.DummyCommand(
            build_base=builddir,
            build_lib=os.path.join(builddir, "lib"),
            )
        cmd = install(dist)
        cmd.home = destination
        cmd.ensure_finalized()
        self.assertEqual(cmd.install_base, destination)
        self.assertEqual(cmd.install_platbase, destination)
        def check_path(got, expected):
            got = os.path.normpath(got)
            expected = os.path.normpath(expected)
            self.assertEqual(got, expected)
        impl_name = sys.implementation.name.replace("cpython", "python")
        libdir = os.path.join(destination, "lib", impl_name)
        check_path(cmd.install_lib, libdir)
        _platlibdir = getattr(sys, "platlibdir", "lib")
        platlibdir = os.path.join(destination, _platlibdir, impl_name)
>       check_path(cmd.install_platlib, platlibdir)
distutils\tests\test_install.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
distutils\tests\test_install.py:57: in check_path
    self.assertEqual(got, expected)
E   AssertionError: 'C:\\[16 chars]\AppData\\Local\\Temp\\tmpv2abfuj4\\installation\\lib\\python' != 'C:\\[16 chars]\AppData\\Local\\Temp\\tmpv2abfuj4\\installation\\DLLs\\python'
E   - C:\Users\RUNNER~1\AppData\Local\Temp\tmpv2abfuj4\installation\lib\python
E   ?                                                               ^^^
E   + C:\Users\RUNNER~1\AppData\Local\Temp\tmpv2abfuj4\installation\DLLs\python
E   ?                                                               ^^^^
============================== warnings summary ===============================
distutils\command\bdist_msi.py:19
  D:\a\distutils\distutils\distutils\command\bdist_msi.py:19: DeprecationWarning: 'msilib' is deprecated and slated for removal in Python 3.13
    import msilib
distutils/tests/test_bdist.py::BuildTestCase::test_skip_build
  D:\a\distutils\distutils\distutils\dist.py:859: DeprecationWarning: bdist_msi command is deprecated since Python 3.9, use bdist_wheel (wheel packages) instead
bj = self.command_obj[command] = klass(self)
distutils/tests/test_register.py::RegisterTestCase::test_create_pypirc
  D:\a\distutils\distutils\distutils\config.py:114: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    import cgi
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ===========================
FAILED distutils/tests/test_install.py::InstallTestCase::test_home_installation_scheme
====== 1 failed, 271 passed, 34 skipped, 3 warnings in 92.06s (0:01:32) =======
ERROR: InvocationError for command 'D:\a\distutils\distutils\.tox\python\Scripts\pytest.EXE' (exited with code 1)
___________________________________ summary ___________________________________
ERROR:   python: commands failed

When I inspect Python 3.11.0b1 on my local machine, I do see that platlibdir is DLLs... so I don't understand why the test fails.
PS C:\Users\jaraco> py -3.11
Python 3.11.0b1 (main, May  7 2022, 22:42:44) [MSC v.1931 64 bit (ARM64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> import sys
>>> sys.platlibdir
'DLLs'
>>> sysconfig.get_config_var('platlibdir')
'DLLs'

Aha. So it seems the value of sys.platlibdir has changed in Python 3.11:
PS C:\Users\jaraco> py -3.10 -c "import sys; print(sys.platlibdir)"
lib
PS C:\Users\jaraco> py -3.11 -c "import sys; print(sys.platlibdir)"
DLLs

But the install scheme used is posix_home, and that install scheme indicates "lib" in the path:
>>>  sysconfig._INSTALL_SCHEMES['posix_home']['platlib']
'{base}/lib/python'

So the assumption that previously held which was that the install scheme included platlibdir only held when platlibdir was "lib".

@zooba Can you help here? In particular, why has platlibdir changed on Windows in Python 3.11, and what does that imply for 'home' dir installs? Should Python get a platlibdir in the install scheme as seen in distutils? Maybe distutils should stop expecting platlibdir to appear? Or does sysconfig/distutils need yet another scheme for nt_home?

platlibdir was meaningless on Windows before, but its meaning everywhere else was "where is the platform-specific stdlib kept".  Since we now only have a single codepath for initialising everything, the more we can align the definitions of constants, the less we need to use platform-specific quirks (in getpath.py).
The POSIX schemes on Windows don't use sys.platlibdir anymore, because it was never correct anyway (and isn't ever correct unless you're on the specific machine you want the scheme for - you can't request it from a different machine).
I'm not actually sure what this option is trying to achieve here, but I suspect you just need to define an nt_home scheme and probably copy it from the regular nt scheme?

I'm also unsure what finalize_other is meant to do here. I wonder if anybody even cares about the _home install scheme on Windows. I would think not, because the scheme includes unixisms like bin instead of Scripts. I'm a little reluctant to create schemes for use cases that are unwanted, especially since I want Python to own the install schemes and not distutils.
Are you expecting that in Python 3.11, platform-specific libraries will begin to be installed to $base/DLLs/site-packages instead of $base/Lib/site-packages?


Represent/Add specific values for costs and energy consumption

Description of the issue
I would like to have a representation for specific values of costs and energy consumption i.e. currency per pkm/tkm/100 km/passenger and energy unit per pkm/tkm/100 km/passenger.
Is there a good way to represent that with the current terms in the ontology?
If not, I propose to include the specific values as new classes.
Ideas of solution
specific cost: A specific cost is a cost that is calculated by dividing the total considered costs through the quantity value of interest.
specific currency unit: A specific currency unit relates currency to another unit.

currency per pkm: Currency per pkm is a specific currency unit that relates currency to passenger-kilometre.
currency per tkm: Currency per tkm is a specific currency unit that relates currency to ton-kilometre.
currency per 100 km: Currency per 100 km is a specific currency unit that relates currency to 100 kilometer.
currency per passenger: Currency per passenger is a specific currency unit that relates currency to the number of passengers.

specific energy consumption: A specific energy consumption is an energy consumption value that is calculated by dividing the total considered energy consumption through the quantity value of interest.
specific energy unit: A specific energy unit relates an energy unit to another unit.

energy per pkm: Energy per pkm is a specific energy unit that relates energy to passenger-kilometre.
energy per tkm: Energy per tkm is a specific energy unit that relates energy to ton-kilometre.
energy per 100 km: Energy per 100 km is a specific energy unit that relates energy to 100 kilometer.
energy per passenger: Energy per passenger is a specific energy unit that relates energy to the number of passengers.

Perhaps it is better to include the values at the quantity value level instead of the unit level (or both). That would be cost per X is a specific cost that.. and energy consumption per X is a specific energy consumption that....
I am open for any suggestions.
Workflow checklist

[ ] I discussed the issue with someone else than me before working on a solution
[ ] I already read the latest version of the workflow for this repository
[ ] The goal of this ontology is clear to me

I am aware that

[ ] every entry in the ontology should have a definition
[ ] classes should arise from concepts rather than from words

I added this issue to the agenda of the next OEO dev meeting: https://etherpad.wikimedia.org/p/oeo-dev-49

I transfer this issue to the oeox repository.


Fix http authentication autocreation with organizations in subdomainless URLs

Testing Kerberos integration @danicarrion found out that users are not being created inside organizations for subdomainless URLs.
The patch is replacing
subdomain = CartoDB.subdomain_from_request(request)

with
subdomain = CartoDB.subdomainless_urls? ? request.host.to_s.gsub(".#{CartoDB.session_domain}", '') : CartoDB.subdomain_from_request(request)`

in app/controllers/signup_controller.rb.

cc @javisantana

we should merge this to the 3.12.X branch in order to release a new onpremise version (maybe we don't need to do the OVA, but at least tag and create new NEWS file)
cc @azamorano @santisaez

I can patch the source code manually and create the .deb from there, but of course having a tagged release would be perfect


Show errors when connecting to stats/logs/shell websockets

Created in RancherIO/Rancher: https://github.com/rancherio/rancher/issues/240


No such command: shell

For whatever reason, I get
pyenv: no such command `shell'

Installed on Ubuntu using LinuxBrew.
Note that pyenv help shell works.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

It just mean your shell isn't loading pyenv function properly. Please follow installation instruction. For typical cases, restarting shell could work.
https://github.com/yyuu/pyenv/tree/ad8f2886aecd7226225c567e5a04c770b70d69b1#installation

Really? All the other commands work...why would that one be different?
(I double checked the instructions; they are done.)

@lukesneeringer You probably just need to run echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
Worth noting that on my system, homebrew did NOT print that detail in the caveats as mentioned in the install instructions. Could just be me but it's an easy miss.

After installation, you'll need to add eval "$(pyenv init -)" to your profile (as stated in the caveats displayed by Homebrew — to display them again, use brew info pyenv). You only need to add that to your profile once.

 ~ $ brew info pyenv
pyenv: stable 1.0.8, HEAD
Python version management
https://github.com/yyuu/pyenv
/usr/local/Cellar/pyenv/1.0.8 (548 files, 2.2M) *
  Built from source on 2017-03-03 at 09:59:26
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pyenv.rb
==> Dependencies
Recommended: autoconf ✔, pkg-config ✔, openssl ✔, readline ✔
==> Options
--without-autoconf
	Build without autoconf support
--without-openssl
	Build without openssl support
--without-pkg-config
	Build without pkg-config support
--without-readline
	Build without readline support
--HEAD
	Install HEAD version


[clusteragent/autoscaling] Fix flaky DCA target test

What does this PR do?
Check that DPA is added to store before continuing to test that the proper error status is set.
Motivation
This test has flaked a few times. The error seems to be caused by the object not being found "in kubernetes". This moves the call to add the object to f.Objects earlier, better matching the logic used in the TestLeaderCreateDeleteLocal test.
Describe how to test/QA your changes
Check that test does not flake.
Possible Drawbacks / Trade-offs
Additional Notes

It has been quite difficult to test this change as I am not able to reproduce the same failure locally, so not 100% sure this will fix the flake but probably a change we would want to make anyway.

/merge


Frontend

We need a frontend for our database where the user can input, search and update data.
For this, the first idea is to use an existing approach.
Investigate!

here is a good comparison:
https://scalegrid.io/blog/which-is-the-best-postgresql-gui-2019-comparison/
it says, that pgadmin4 and dbeaver are the best tools, pgadmin4 comes as a docker container version (https://hub.docker.com/r/dpage/pgadmin4/) but this link is down..

another list:
https://wiki.postgresql.org/wiki/PostgreSQL_Clients#Web_Clients
again, are in front there
also, SIDU seems to be pretty nice (http://topnew.net/sidu/)
but the main problem is that it is made for IT people and we need a more 'userfirendly' thing

the proposed solution Oracle Forms is a proprietary software solution, but a free alternative is Libre Office Data.
I will try this, because it also supports forms etc.

Pro: seems to be easy usable, many assists for userfriendly experience, configured in short time
Contra: not a web based solution (but reads/writes from/to server backend), needs to be installed on devices

a form for inserting new catalogues and to scroll existing (Design is flexible, just as an idea)

also regular querying is possible..

Are there good frontends for TerminusDB?

Maybe this is helpful https://news.ycombinator.com/item?id=16508965.

I asked people who know the team:

[...] very good developers, so I am sure terminusdb has a good core. Not sure if it is convenient/business-mature

https://dev.to/ekafyi/the-most-simple-stack-to-create-a-web-app-for-public-use-4fij

https://firebase.google.com/

See also:

https://apex.oracle.com/en/


How Meta is your Metadata? : Designing a Meta-Metadata Specification for Hyrax

Julie Allinson, Arwen Hutt
<EMAIL_ADDRESS>As most Hyrax adopters know, Hyrax offers a basic set of metadata properties that it assigns to each new work type. Most adopters will extend that set, to a greater or lesser degree, adding new properties, defining vocabularies and terms lists, and setting other constraints and requirements. Adding new metadata is a complicated process in Hyrax, and there are various ways in which developers have worked to streamline things (eg. scooby snacks, dog biscuits and archetypes).
But before we even get to customising a Hyrax application, metadata librarians and developers must collaborate on specifying the metadata requirements. With no community machine-readable approach to defining those requirements, misunderstandings are common, and can be costly. With a machine-readable specification for metadata, metadata librarians could accurately specify requirements and developers could validate and codify those into applications.
That’s where the Machine-readable Metadata Modeling Specification (M3) steps in. The specification is the output of the M3 Working Group and is nearing its version 1.0 release. This presentation will provide a walkthrough of the specification, show how to construct and validate a new M3 profile, and illustrate the benefits of M3 for both metadata specialists and developers.

8/26 Julie registered

10/4 - Arwen registered


[BEAM-13589] python sdk examples: Fixed typo in wordcount example.

Fixed a typo in python example.
(This is partly a test to start contributing to this project.)
R: robertwb

I can merge this after tests pass. Thank you @blais


Increase code reuse

At the moment, while a small core of the plugin is reused and shared across all our ports, there is still a lot of potential for code reuse.

This will be a goal with the 10.2 release. Some work was done for this for 10.1.4 as well.
So far, java.util.logging handlers for Bugsnag have been unified with 579bbf2f.

Hey can u make a BuyCraft plugin for PocketMine??

@VCraftMCPE This is the wrong place to ask.

There is a version of the plugin now available for PocketMine. If you sign up at https://www.buycraft.net, you will be able to download the PocketMine plugin once registered.


Content-Type Alias field

This idea originated here: https://github.com/ordinals/ord/discussions/2879#discussioncomment-7892461
The basic premise is to replace the content-type data-push in every inscription with predefined sequences of (or just lone) magic byte aliases. There is no need for every text inscription to include the redundant text text/plain;charset=UTF-8 in the witness inscription. Instead the inscription could just include a single magic byte, e.g. 0x74 (the character t in ASCII). This is a huge efficiency gain for small inscriptions like BRC20.
I ran some calculations here, and estimated that on average, this simple trick could save about 35,932 blocks of witness space per block on average. At a fee rate of 100 sat/vbyte, that's about 890,000 sats (currently ~$400 USD) per block, every 10 minutes, which could be saved.
@casey suggested to define a new inscription field type, which for now I'll call the 'content type alias' field. We'd define a canonical mapping from aliases to web content type strings. ord and other inscription indexers would need to be updated to recognize this header, but due to the efficiency savings for BRC20, it seems like a no-brainer to me that inscribing software would adopt it.

Not convinced the savings in bytes is worth relying on an offchain content type mapping.
Perhaps, a better approach might to be explore setting certain tags that apply to all inscriptions within a batch. At the moment, content type, parent and delegation tags are repeated for every inscription when you batch inscribe. If there's a way to set them just once for all inscriptions within a batch, it'll result in a significant saving without having to rely on any offchain mapping.
Ref #2930

Another big issue is whether or not BRC-20 inscription software will adopt it. If they're using ord, they'll automatically adopt it when they upgrade, but if they aren't or don't upgrade, it will be hard to get them to change their software, and this might see limited adoption.

Not convinced the savings in bytes is worth relying on an offchain content type mapping.
Perhaps, a better approach might to be explore setting certain tags that apply to all inscriptions within a batch. At the moment, content type, parent and delegation tags are repeated for every inscription when you batch inscribe. If there's a way to set them just once for all inscriptions within a batch, it'll result in a significant saving without having to rely on any offchain mapping.
Ref #2930

I like this idea, but I don't think we can do it for subtle reasons. If tags apply to all inscriptions in a batch, then ord has to store a copy of the tag in the database for each inscription, it's essentially a DoS vector: user makes a batch of 1000 inscriptions, each has a 1kb tag, we must store 1mb in the database. This is a write amplification. Also, it breaks the model of each inscription being self-contained, which would make the code more complicated.

Another big issue is whether or not BRC-20 inscription software will adopt it. If they're using ord, they'll automatically adopt it when they upgrade, but if they aren't or don't upgrade, it will be hard to get them to change their software, and this might see limited adoption.

I think BRC20 devs recently said they were going to freeze their ord version at 0.9. That would suck because they wouldn't get any fee savings from any improvements in ord, nor would they recognize inscriptions made using newer versions of ord.

Not convinced the savings in bytes is worth relying on an offchain content type mapping.

Maybe we are thinking on very different scales, but i think 36 kilobytes of witness space per block is absolutely worth it. That's $21 million USD of fees per year (at current prices). Even if only 10% of inscriptions use the content-type alias, Isn't that worth such a small change?

in favor of this.


Specify host directory when using TART_EXECUTOR_HOST_DIR=true

Hello! I was exploring TART_EXECUTOR_HOST_DIR=true option for my pipelines and have some questions.

Is there any possibility to specify host dir instead of using tmp dir?
If there isn't, would you be interested in accepting a PR to support this?

We are trying to use tart and gitlab-tart-executor to optimise our pipelines. We have several big repos (up to 500 Gb) and usually we store them on volumes and don't download/delete sources every time we run pipeline. So for us it would be very useful to mount specific directory which already has sources.

I guess it makes sense to have something like TART_EXECUTOR_HOST_DIR_PATH that will be used checked here:
https://github.com/cirruslabs/gitlab-tart-executor/blob/384811f0777a0a767fc71e18e9f3c3008a9d114f/internal/gitlab/env.go#L30-L32
Note that you'll need to add logic for clean up stage to not delete it:
https://github.com/cirruslabs/gitlab-tart-executor/blob/384811f0777a0a767fc71e18e9f3c3008a9d114f/internal/commands/cleanup/cleanup.go#L45
@edigaryev what do you think of TART_EXECUTOR_HOST_DIR_PATH in addition to TART_EXECUTOR_HOST_DIR?

IIUC you would need to have GIT_STRATEGY: fetch set to gain any benefit from mounting the already cloned repo from the host. That would also imply you can only have a concurrency of 1 to prevent different jobs modifying the checkout during a build.
Since you can only run 1 job per host and the build dir is always checked out, I guess the only benefit of running in a VM is that you can have a consistent snapshot of tooling, otherwise I'd just run it on the host itself.
You already have the ability to pass a --dir hostdir:/path/on/host argument in the prepare stage that will mount the repo from the host into /Volumes/My Shared Files/hostdir, you just need to work out your directory structure so the runner finds your code where it expects it to be.

@edigaryev
Yes, I want the ability to mount arbitrary directories. But it won't violate CI/CD principles, because:

We set the builds_dir to be unique for each concurrent job using $CI_CONCURRENT_ID to ensure that two builds don’t share the same directory.
Regarding clean slate, we use GIT_CLEAN_FLAGS=-ffdx to ensure the mounted repo copy is clean at the start of the build.
Both of these approaches are recommended by the official documentation here https://docs.gitlab.com/ee/ci/large_repositories/#git-clone-path

Does it work like @waddles say in comment above?

You already have the ability to pass a --dir hostdir:/path/on/host argument in the prepare stage that will mount the repo from the host into /Volumes/My Shared Files/hostdir, you just need to work out your directory structure so the runner finds your code where it expects it to be.

Basically, this is exactly what we need - an ability to pass --dir argument with any host path we want.

Basically, this is exactly what we need - an ability to pass --dir argument with any host path we want.

Would https://github.com/cirruslabs/gitlab-tart-executor/pull/24 work for you?

Basically, this is exactly what we need - an ability to pass --dir argument with any host path we want.

Would #24 work for you?

Yes, thank you!


Why Loss function is 'MSE'?

Firstly, thanks for your re-implementing CRAFT text detector. I know that I should prepare my dataset so that I provide the detector with the char box annotation to fine-tune. but I ask for choosing the loss function. I saw you choose the mean squared error (MSE), why? and can I choose another loss function?

Hi there -- Of course, please do choose a different loss function, as desired. You can do this using detector.model.compile(). And feel free to file a PR to change the default if you find a different loss function provides you with better results. Thanks!


Update on Payment card number

Hello,
An update on Payment card number was released the 2022-08-22T02:22:00Z. Check for any new Issuer identification number edit. Link to the diff. Here is the summary:
Grammar
Can't load revision<PHONE_NUMBER>
If this Wikipedia's edit does not affect us, just ask for this issue to be close.
In case of trouble, ask for @aloisdg

As usual, only the text changed


docker-machine openstack driver - deletes keypair incorrectly

The docker-machine driver for Openstack is deleting manually created key pairs when the docker host is deleted. Here are the versions that I am using:
docker-machine version 0.6.0, build e27fb87
Openstack Mitaka installed using devstack on Ubuntu 15.10
Steps to reproduce:

Create a new nova keypair using the command: nova keypair-add test-kp.
Save the private key pair to a new file called test-kp.pem
Create a new docker host using the command:

docker-machine -D create -d openstack \
--openstack-flavor-id d3 \
--openstack-image-id 4586a537-0710-494b-9691-fef1962885b1 \
--openstack-net-name private \
--openstack-floatingip-pool public \
--openstack-ssh-user ubuntu \
--openstack-sec-groups default \
--openstack-private-key-file test-kp.pem \
--openstack-keypair-name test-kp \
--openstack-ssh-user ubuntu \
docker-01

After the host is created successfully, delete it using the command: docker-machine rm docker-01
Login to Openstack and run the command: nova keypair-list
The keypair will be deleted.

Possible duplicate - as Scott Lowe has already filed in another thred.

I see -- yes that sounds like a dupe, thanks!

Why is this closed?  I am having this exact issue, and don't see it referenced elsewhere.

It's a dupe of https://github.com/docker/machine/issues/3261

@nathanleclaire thank you


Use of GraphQL fragments as the domain model

My 2c - using GraphQL directly as the domain model is very productive. Code gen works to make new data available where it needs to be, and avoids writing additional data classes + mapping functions for all these extra cases.
Is there a reason for prefering these data classes?
data class Film(val id: String, val title: String, val director: String)

fun FilmFragment.mapToModel() = Film(id, title, director)

It's a good question and I've experimented with both approaches in various repos.  I created this particular project as basis for talks I was giving so had wanted initially to show how data could be mapped like this....but I agree using generated fragment data classes directly is very productive.

I'll take look later at removing those intermediate classes.

addressed by https://github.com/joreilly/StarWars/pull/19


Complex batch normalization

I would be interested to see an implementation of batch normalization for complex neural networks, as defined in section 3.5 of arXiv:1705.09792.
The paper argues that the usual batch normalization does not work for complex numbers. Naive use in Flax confirms this, since parameters are of type float32 (and I get various bugs which prevented me to make it work).

Sorry for not getting back to you sooner, I am very busy now and did not find time to make an appropriate explanation. Let me come back to you later.

@melsophos sounds good, for now I am closing this issue since it is open for 2 months and it is not clear what the problem is, but feel free to re-open it once you have a more detailed explanation.


[9.x] Add basicAuth() to retrieve Basic Authorization

Add ability to retrieve basic authorization (username & password) from the Request header

The underlying Symfony HttpFoundation Request object already has getUser() and getPassword() methods.


[Bug] Changes to README or RELEASE_NOTES triggers unwanted checks

Describe the bug
It is annoying that when an update is made only to the release notes or readme all the checks are relaunched. Just the syntaxcheck and Markdown ones would be enough.
it would be nice to avoid having to wait minutes for build even if only the readme was changed
Expected Behavior
Only Markdown and syntaxcheck should re-run
Steps To Reproduce

Open a PR in a golang repository
Push a commit with a README or RELEASE_NOTE change
All checks triggers

Exceptions (if any)
No response
Version
main

Also, an annoying thing, which I don't know if it can be solved, is that every time you want to merge a Dependabot PRs there is to manually fix the release note because there are always conflicts, I don't know if there is a way to avoid that (Like telling him to always accept the current), so that the checks can restart without human input

If dependabot would allow to create pr as draft, that would solve in combination with blocking the release note generation if not final. Alternative could be generating release note only on merge, but I am not so happy about the idea, because the approval of the check of the log in the release note, for me is part of the review process.

you can see of the merge of the pr https://github.com/zaphiro-technologies/github-workflows/pull/72
would affect a repository here: https://github.com/zaphiro-technologies/architecture/pull/164
I am not saying is the best solution, but it's a progress.
A more definitive solution (for this issue and any other issue related to useless cyclic action on not changed code) is to modify https://github.com/dorny/paths-filter to raise only changes between current and previous commit. This requires anyhow much more time.
So please, unless you have any other idea that preserve quality of the process, review, and merge the pr #72 so that we can at least mitigate the issue.
Thx

The wf now is generating release note only on approval, this may solve the issue with dependabot as well.

for go builds, a similar approach using https://github.com/dorny/paths-filter to trigger build only on the change of go / test data should be followed. the pattern for files, need to support configuration since it may be specific to the project (because for example test data are in different format / locations in different projects).

@zaphiro-technologies/platform with last merged PRs markdown wf and release note wf are triggered only when a pr is approved. This means that before merging you have to wait them to complete.

@hiimjako the generation only on approval of release notes, should solve the dependabot issue

I just tested this approving 3 dependabot PRs on c37 server, for me it's working correctly.


test: jestify invoke contract xdai test

Migrated test from Tap to Jest.
File Path:
packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai.test.ts
This is a PARTIAL resolution to issue #238
Signed-off-by: awadhana<EMAIL_ADDRESS>

@awadhana LGTM but before merging please make sure the PR description and the git commit are updated to not resolve the main jest issue.

Done :)

@awadhana There's a conflict on this one now. Please resolve and then we can merge!

@awadhana There's a conflict on this one now. Please resolve and then we can merge!

No problem

@awadhana This one seems to have an issue with the ignore/include patterns again.

@awadhana This one seems to have an issue with the ignore/include patterns again.


Port/strings: Use platform agnostic types for strings

Description
There are some ordering issues with this PR, some commits that should have been at the end, ran to the front after I split the commits ...... But I just don't have the energy to fix them. My suggestion is to squash them all when merging after review to prevent weird issues in the future.
This PR is part of Linux porting, and it makes conservative changes to the UE4SS string types.
These string types have been replaced with purpose-driven aliases, such as UEStringType, SystemStringType, etc.
Theoretically, all of these types should be unchanged on Windows platforms from before the change, meaning that what was a wstring is now essentially still a wstring.
Note the change to find_lua_mod_by_name, where I've continued to use template<class S> instead of the form in main.
All newly added types are aliases, so be sure not to overload with them when using them, e.g. func(UEStringType a) and func(SystemStringType b) will not be defined successfully on Windows because they are both wstring.
Also some changes have been made to RC::File, which now forces the use of UTF-8 encoding and should handle the BOM correctly.This part of the change may be breaking, as the original code seemed to treat it as UTF-16.But from what I've seen so far, UE4SS is actually using encodings that are UTF-8, and wrapping them incorrectly Therefore, these changes should have no real impact. These changes may be related to #556
Some changes are to separate platform-dependent code, they were moved to the Platform directory because they were affected by both linux porting and string types, and it didn't make much sense to create a dedicated copy (since it would eventually have to be moved to its own directory) and create additional headaches for rebase.
And, as part of this PR, https://github.com/Re-UE4SS/UEPseudo/pull/94 is reuqired to use it.
Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)
[x] Is/requires documentation update

How Has This Been Tested?
I compiled locally and tested on palworld.
Some rebase error just fixed.
I had to disable cppmods because I couldn't link it correctly, and I'm not sure what caused this.
Checklist
Please delete options that are not relevant. Update the list as the PR progresses.

[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] I have added the necessary description of this PR to the changelog, and I have followed the same format as other entries.
[ ] Any dependent changes have been merged and published in downstream modules.

Screenshots (if appropriate)
Additional context
Add any other context about the pull request here.

not sure what Any dependent changes have been merged and published in downstream modules. actually means and please let me know where should I document these changes?

not sure what Any dependent changes have been merged and published in downstream modules. actually means

It means any changes from other repos that this PR requires.
In this case, that would be the equivalent PR in the UEPseudo repo.

To maintainers: Do not forget to run UVTD and use the newly generated files when building UE4SS before you do any actual game testing.

To maintainers/reviewers: Do not forget to run UVTD and use the newly generated files when building UE4SS before you do any actual game testing.

For UVTD a known problem from my side is this
https://github.com/Re-UE4SS/UEPseudo/pull/94/files#diff-1f94e8bef92eeb702ce4ee4fe8b87dff171b1f07191967444601eaf828f9c38a
I'm not sure why but I have to do this for clang to work (and since there is also a type change around it somehow get into my PR..)
This change it not included in the UVTD as I'm not sure how to make it to generate code like this.. and this is the only enum that needs the workaround.

For UVTD a known problem from my side is this https://github.com/Re-UE4SS/UEPseudo/pull/94/files#diff-1f94e8bef92eeb702ce4ee4fe8b87dff171b1f07191967444601eaf828f9c38a
I'm not sure why but I have to do this for clang to work (and since there is also a type change around it somehow get into my PR..)
This change it not included in the UVTD as I'm not sure how to make it to generate code like this.. given this is the only enum that needs the workaround. all other enums compile without any problem.
But anyway this is not a problem for windows.

Yeah it's not actually allowed to forward declare enums without supplying the type.
I'm not sure what the best solution to this is that doesn't involve making UVTD generate definitions for these enums so that they don't need to be forward declared.
It does appear that the generated files in this PR contains this workaround which you said you haven't updated UVTD to do in this PR.
If this is the case, that needs to change.
We shouldn't be making changes to the generated files unless UVTD can reproduce those exact changes from the repp.
This is because we regenerate these files every now and then which means that any changes that's been made to them that UVTD can't make will get overwritten.

hmm.. for this PR I will rollback the commit in the uepseudo so it matches the UVTD output. Not sure if this is the best solutuon but I think use a FORWARD_DECL(enum EAspectRatioAxisConstraint) macro and generate enum EAspectRatioAxisConstraint: uint8_t on clang should be okay..? And find a place to define that macro..

I'm sorry to be ignorant and probably rude, but what is the point of building so many pointless abstractions that even UE itself does not have?
TCHAR is always an alias to WIDECHAR, which is an alias to wchar_t, which is a platform-specific type with variable length and encoding.
Since UE4SS works with UE strings 99% of the time, the relevant string type to use is std::wstring in all supported platforms, including Linux and Windows.
Therefore, I do not see the need to have so many different abstractions and conversions across different string representations when the most common case is working with UE strings, and to avoid huge amount of overhead and complexity, UE4SS should use the same string type as UE itself does for the platform it is running on, which is always wchar_t.
The only problem that UE4SS could potentially have right now is making assumptions about the internal encoding of wide strings. As long as we can clean up the code that does this, and instead convert wide strings to UTF8 in case they need to be handled by the external tools or written to external storage, we should be completely fine with sticking to std::wstring on all platforms as long as UE itself keeps doing the same.

many pointless abstractions that even UE itself does not have?

This is part of the linux porting and the reason for the abstraction is unlike UE which is a pure UTF16 envieonment, this project is using STL which has different string type on Windows and Linux.
For example, wchar_t on windows is UTF-16 but it becomes UTF32 on Linux.
Now, STL does provide a u16string which is UTF16 across all platforms. However, that type cannot be used for many STL functions like std::format which UE4SS heavily rely on.
That is why we need UEStringType and SystemStringType. On Windows there is no different since both are just std::wstring, on Linux, the UEStringType would become std::u16string to hold the UTF16 string from UE while SystemStringType will become std::string to hold string to interact with STL.
Another solution can be move to use fmt for u16 string, but because u16string uses chat16_t on Windows which cannot be used to interact with Windows APIs and etc, will be more annoying to fix. Plus, the completely lacking of utf16 handling C functions in Linux (sscanf/ssprintf for example).

It feels to me that in that case, rewriting these interaction points would be easier and take less effort than introducing completely new abstractions that cause ripples across the entire codebase and affect much more code than just one using std::format or C standard library functions.
We could create our own functions that convert to UTF8 in-place, perform the necessary operation, and convert back, or bring a third party library that handles wide strings.
Either way, there is much more code interacting with UE than interacting with a few functions that do not support wide strings, so I think from both the scope and the performance perspective it would be better to keep using wide strings and do conversions where it is unavoidable.

Either way, there is much more code interacting with UE than interacting with a few functions that do not support wide strings

No, there are more SystemString than UEString

And when you take account that most UEString are UVTD generated code, this changes make more sense

I added back fmt lib in a branch.  Would that simplify anything if it's merged?

I added back fmt lib in a branch. Would that simplify anything if it's merged?

I might simplify a bit but I'm not sure if it can get rid of the use of SystemString completely.. But that is almost redo the entire porting..

So.. It might reduce the use of many SYSSTR though.. but the result is all such output will need an extra charset convert after formatting..

I can't be sure for now but an easy way to estimate that is to change all wstring to u16string on Windows to give an estimation ..

Changing StringType typedef to be std::basic_string should be enough to resolve all UEStrings I would think?

Changing StringType typedef to be std::basic_string should be enough to resolve all UEStrings I would think?

Not sure I follow you, std::basic_string is a template, and wstring is basic_string<wchar_t>, while string is basic_string<char>, and u16string is basic_string<char16_t>.
So StringType is currently basic_string<wchar_t>.

Changing StringType typedef to be std::basic_string should be enough to resolve all UEStrings I would think?

There are also some places where it should be StringType while wstring is used in the code. (on the other hand, some code are meant to be wstring for using wchar_t* with c_str() say windows api and explode_by_occurrence etc.. )
For other use of UEString, it should be covered by changing it to u16string.

Changing StringType typedef to be std::basic_string should be enough to resolve all UEStrings I would think?

Not sure I follow you, std::basic_string is a template, and wstring is basic_string<wchar_t>, while string is basic_string<char>, and u16string is basic_string<char16_t>.
So StringType is currently basic_string<wchar_t>.

I'd also prefer to use UE's macros for any conversions that we can.
I.e.,
#define TCHAR_TO_ANSI(str)
#define ANSI_TO_TCHAR(str)
#define TCHAR_TO_UTF8(str)
#define UTF8_TO_TCHAR(str)

I'd also prefer to use UE's macros for any conversions that we can.
I.e.,
#define TCHAR_TO_ANSI(str) #define ANSI_TO_TCHAR(str) #define TCHAR_TO_UTF8(str) #define UTF8_TO_TCHAR(str)

it's not even the way used in current code.

The underlaying code convert maybe change to UE functions in StringConv.h though.

The underlaying code convert maybe change to UE functions in StringConv.h though but it seems to make Helper depends on UEPseudo..

Yeah, I was playing around with getting UE to not rely on File earlier.  It wouldn't be that difficult to move all the string macros out of File with just a couple edits.


Installation "with any rootfs" impossible on arm laptops without virtualization

Snapdragon 550 chips (and others, i'm sure) aren't likely going to see the same virtualization support that new chips have unless someone else writes the drivers. Windows itself also doesn't support this.
I wouldn't say you need to support this, but it's taken me about a week to figure out manually, and others on pre 800/c snapdragon chips may also appreciate it.
Error: (virtualization isn't enabled, ofc)
PS C:\Users\krita\Downloads> .\Launcher_arm64.exe
Using: C:\Users\krita\Downloads\rootfs.tar.gz
Installing...
ERROR:Installation Failed!
HRESULT:0x80370102

I was able to circumvent this by manually importing the rootfs in WSL and working out how to get wsldl working with that.
dl: https://cloud-images.ubuntu.com/groovy/current/groovy-server-cloudimg-arm64-wsl.rootfs.tar.gz
wsl --import Ubuntu2010 C:\Users\krita\Ubuntu .\rootfs.tar.gz --version 1
an option or envar to force WSL version 1 (before install) or automate the above process in some way would be neat.

Thank you for reporting issue
I'll investigate about it

It's worth noting wsl.exe itself has this same issue, so I don't know if it's a bug as much as a feature request.
Let me know if you need any testing done.

I checked on ARM64 and no virtualization, but it works.


Fix build by removing PKG_CHECK_MODULES.

I'm not sure if this is a proper fix or not but the build is failing for me
with:
./configure: line 14733: syntax error near unexpected token `PROTOBUF_C,'
./configure: line 14733: `    PKG_CHECK_MODULES(PROTOBUF_C, libprotobuf-c >= 1.0.0)'

As far as I can tell these were left in by mistake so they should be removed?
Once I remove the PKG_CHECK_MODULES and regenerate configure script the build is
working again.

Here they say that this may be because pkg-config is not installed:
https://stackoverflow.com/questions/36659867/pkg-check-modules-syntax-error-near-luajit
Can you verify?

I think my install of pkg-config from brew was not properly linked. I fixed it so I have a pkg-config in a normal path (/usr/local/bin) and the build is fine. Closing this, and sorry for the noise. :)

@wxsBSD I know its been awhile since this issue has been closed. However, this issue persists on Ubuntu 18.04 LTS within pkg-config  && protobuf-c-complier installed as follows:
dpkg -l automake gcc make libtool pkg-config protobuf-c-compiler
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version       Architecture  Description
+++-================-=============-=============-======================================
ii  automake         1:1.15.1-3ubu all           Tool for generating GNU Standards-comp
ii  gcc              4:7.4.0-1ubun amd64         GNU C compiler
ii  libtool          2.4.6-2       all           Generic library support script
ii  make             4.1-9.1ubuntu amd64         utility for directing compilation
ii  pkg-config       0.29.1-0ubunt amd64         manage compile and link flags for libr
ii  protobuf-c-compi 1.2.1-2       amd64         Protocol Buffers C compiler (protobuf-
I will remove the PKG_CHECK_MODULES , however should v4.0.2 work without this fix?

Ah, I see removing the entire AC_ARG_ENABLE([pb-tests], within the configure.ac before running the build.sh`` && ./configure``` helped me understand the fix of this issue.

@anash28 I'm experiencing the same issue on Ubuntu 18.04 LTS. Can you provide more details or a step-by-step to how you resolved the issue?


Can not use --set-version command to switch to wsl2. Error: 0xffffffff

Windows Version 10.0.19041.208
Below are the command I used:
C:\Users\user>wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
C:\Users\user>wsl --set-version Ubuntu-18.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Error: 0xffffffff
C:\Users\user>wsl -l -v
NAME            STATE           VERSION

Ubuntu-18.04    Stopped         1
kali-linux      Stopped         1

C:\Users\user>ver
Microsoft Windows [Version 10.0.19041.208]

In Windows Feature, have you enable:
Hyper-V, Virtual Machine Platform, and Windows Hypervisor Platform?

Yes, all three are enabled and yes I have the appropriate settings enables
in the BIOS, also.
FrankD Gunseor
On Sat, May 9, 2020 at 6:47 PM Muhammad Ridwan Hakim <
<EMAIL_ADDRESS>wrote:

In Windows Features, have you enable:
Hyper-V, Virtual Machine Platform, and Windows Hypervisor Platform?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/5193#issuecomment-626260083, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AGIQJQN4LXJZALGPF2FAFXLRQYBUVANCNFSM4M5ACB7A
.

It happened to me as well. Even if you succeed in running the command you would have to wait a lot for conversation to take place.
It's faster just to re-install Distribution. Uninstall it from "Apps & Features" and install then through MS Store. You will lose the content of the VM though.

For some reason you need to make sure no servcie/app is currently using some common ports.
I my case, I find AdGuardHome caused this issue as it will use port 53.

If you have no use for Hyper-V (no intent to run VMs), possible workaround is to remove the hyper-v feature and restart.
HV is not mentioned in the instructions (https://docs.microsoft.com/en-us/windows/wsl/install-win10) and AFAICT it's not a dependency for WSL2.

Ran into the same issue

Error: 0xffffffff

Hyper-V is still required according to this FAQ:
https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#does-wsl-2-use-hyper-v-will-it-be-available-on-windows-10-home

Fixed by right-clicking the wsl_update_x64.msi kernel and select uninstall, then install the kernel package again.
Credits to:
https://github.com/microsoft/WSL/issues/5651#issuecomment-663959276

Still not fixed, I've already follow you all guide guys.
perhaps there is a problem on virtualization in bios, I can't find virtualization option on my bios settings.
need help.

What is your motherboard and CPU models?
In powershell, execute (GWMI Win32_Processor).VirtualizationFirmwareEnabled
should be True

Nothing worked to me apart this solution on Reddit:

Find out if a process listens on port 53 by doing netstat -a -o -n
If you find something, kill it by its PID: kill <PID>
Try again wsl --set-version <VM_NAME> 2

That worked for me. Hope it will help!

Find out if a process listens on port 53 by doing netstat -a -o -n
If you find something, kill it by its PID: kill <PID>

This solved it for me!

Nothing worked to me apart this solution on Reddit:

Find out if a process listens on port 53 by doing netstat -a -o -n
If you find something, kill it by its PID: kill <PID>
Try again wsl --set-version <VM_NAME> 2

That worked for me. Hope it will help!

Thanks! It worked 😘🎉

netstat -a -o -n

Thanks! worked for me 💋

Thanks, @wzzyj, and a special thanks to @jpmolla for a detailed answer.

this worked out for me, thanks dude!


Add option for creating private S3 endpoint

We've seen increased costs where applications on clusters access S3 and pay for network costs (i.e: transit gateway). It'd be useful to have an option to create a private S3 endpoint with the cluster.

@alex-dabija as we chatted, i assume you want to be put some more details in here

We have a VPC endpoint (it only works for the S3 buckets in the same region) but I worry that this would not work if we use HTTP proxy in the private clusters as we see lots of S3 traffic in the proxy.
This means that we have:
goat -> TGW -> goatproxy -> private S3 endpoint -> S3
Would love to have:
goat -> private S3 endpoint -> S3

is this still relevant Joe? Seems to be more of proxy issue and i heard the increased costs were actually due to monitoring stack traffic


Possible functionality Change

Hi, we run PF2 with the players not being able to see the AC's of their targets.  Consequently I have to tell them whether or not they hit after each attack. I know I could potentially auto-roll damage on hits, but players like to roll.  Is there a way that your module could be updated to check if a hit has been scored on a targeted opponent and only display the buttons to roll damage on a hit?

This is a tough one, there's a lot of different variables that can affect the attack rolls outside of what's coded into the system in foundry. I actually spoke with the developers in discord about this idea a long time ago and they suggested it wasn't a good idea to automate the showing and hiding of the buttons, especially in events where something was mis-rolled or a modification to an attack roll was missed.
Ultimately having players click the damage button regardless of whether or not an attack actually hits isn't too big of a deal... if the attack hits and they click the damage button, you can just choose to ignore it and all that happens is you just get some extra text in chat.
At some point the PF2e system will be eating this module and making it standard anyway so I'm sure they have some better ideas in mind on how to potentially handle what you're asking for

That's cool, Just trying to figure out ways to smooth combat for my players.  This seemed like a logical extension.  They still don't know the meta information of the creatures AC, but they do know if they hit because they get offered the option of damaging the creature.
I suppose it still works that way, as a hit could be described as hitting the armour if they roll damage but it has no effect.
Thanks for taking the time to respond.


"Package is not defined" if 'meteor-client' not imported separately to each file in Vue project

I know you're more into Angular and React, but can you think of any potential reason that this error...

Uncaught ReferenceError: Package is not defined

...would show up if I don't add:
import 'meteor-client'

before other Meteor-related imports in all files?
I already imported 'meteor-client' in my main JS file. The code is working as long as I have the same line repeated in all other files that try to use Meteor. But I see you don't do it with React, so I guess it should work without it.
Error shows up both when I use special .vue files syntax and pure JS files.
My configs:
  externals: function (context, request, callback) {
    var match = request.match(/^meteor\/(.+)$/);
    var pack = match && match[1];
    var locator = pack && 'Package["' + pack + '"]';
    return locator ? callback(null, locator) : callback();
  },
  resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      'vue$': 'vue/dist/vue.esm.js',
      '@': resolve('src'),
      api: resolve('api/server')
    }
  },

package.json:
(scripts)
    "api": "cd api && meteor run --port=8000",
    "bundle-meteor-client": "meteor-client bundle -s api --url=localhost:8000"
(...)
(dev dependencies)
    "meteor-client-bundler": "^0.1.1"

meteor-client.config.json:
{
  "import": [
    "meteor-base",
    "accounts-password"
  ]
}

@gustojs ,same problem with you. but i find that import inside the App.vue juse do the trick.
checkout here


connection: do not unregister close callback on close

This is done automatically and if the connection has been closed
unexpectedly, this will trigger an error. We ignore the error but it can
appear in the logs.

There's not another way to check if it's closed first and then unregister the callback?

In this case, this is not really important as the close callback is always unregistered automatically. However, we have the problem for other kind of callbacks that cannot be unregistered if the connection is closed unexpectedly. I have asked on the libvirt mailing list for some guidance on how to handle all that.


Refactoring executor

Current executor has some not good implementation, especially retry and timeout related code.
So we have to refactor it.

Close via #97


Partially downloaded files can be deleted causing the UI to show false information

Is your feature request related to a problem? Please describe.
I've just had the misfortune to accidentally remove the partially downloaded files from my download folder. The files being:

{$originalfileName}
{$originalfileName}.aria2

Two problems:

Deleting files which are being downloaded is possible;
The UI still updates the progress and finishes the download, but the file already dissapeared.

Describe the solution you'd like
Make it impossible to delete the file,  the same way Chromium browsers solve this:

Describe alternatives you've considered
As an alternative solution, at least update the UI or trigger a notification that the partially downloaded file has been removed.
OS: Windows 10 21H1
Motrix: Motrix-1.6.11-win Portable version

I think attaching a fileWatcher to the partially downloaded files will do the trick.


[N64 Bug Fix Request] Jonathan erroneously set as ally in bonus mission 'The Duel'

For the objective "Defeat Jonathan Dark", because the devs somehow forgot to set Jonathan as an enemy rather than ally (a carryover of his other mission appearances), he can never land his shots. The only way to fail this objective normally is to wait around until he manages to land a punch on you at melee range.
https://github.com/fgsfdsfgs/perfect_dark/assets/66316465/7e508510-597c-4e62-b730-16ff67441a46
Additionally, the fact that the devs left in his beta name is also questionable. Originally Joanna and Jonathan were at one point to be brother/sister, but that idea was abandoned and ultimately retconned by PD Zero. So I would suggest potentially changing the objective description to either just "Defeat Jonathan" (as he is otherwise referred in PD) or "Defeat Jonathan Steinberg", his canonized name from Zero onwards. Or leave it as-is, up to you.

"Defeat Jonathan" would line up with his bio in the information lab (last name unspecified) although i could have sworn it listed him as jonathan dark in the info lab on my PAL/AUS cartridge. to be fair, it has been about 15 years since i last had my N64 set up


Include 'plugin:' prefix in managed item source

@nickfyson This should make the behaviour the same as calling the getSource(Plugin) method.

LGTM


Bump jose from 4.11.2 to 5.2.4

Description
Bump jose from 4.11.2 to 5.2.4
Addresses CVE-2024-28176
Category
Maintenance
Check List

[X] New functionality includes testing
[X] New functionality has been documented
[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Here's the release notes from v5: https://github.com/panva/jose/releases/tag/v5.0.0
If v5 causes issues then this can also be upgraded to 4.15.5: https://www.npmjs.com/package/jose/v/4.15.5

@cwperks shall we wait until the CVE is actually published prior to merge?

It can be merged now. 4.11.2 is from a year ago and there have been many versions published since.


[NDM][Cisco SD-WAN] Do not update pagination params in-place

What does this PR do?
Refactor Cisco SD-WAN pagination logic to not update request params but recreate it for each next page

This helps/fix a bug where we could pass some previous page params to the next one, leading to a failure to get the next page
Also updates index-based pagination to start from endId instead of endId+1, as per Cisco's recomendation

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


Unable to exit properly

i think there should be at least one of the following 2 ways to exit the program during execution:

hitting ctrl+C
hitting enter on an "exit" option, e.g.:

What do you want to do?  (Use arrow keys)
   ---------------
 ❯ Hash
   Encrypt
   Decrypt
   Exit

when hitting ctrl+C, we get an annoying error message:
Cancelled by user

Traceback (most recent call last):
  File "C:\Users\nivim\code\python\EncryptoCLI\main.py", line 30, in <module>
    operation = prompt([
KeyError: 'operation'

i would like to add both options, or whichever one you prefer @Arpan-206 .
please let me know :)

Go right ahead!


Add support for rabbitmq cluster failover

Declare queue with HA mirroring, this way rabbitmq will do it's best to not lose
messages by replicating them to all nodes in the cluster.
Redeclare queues when failing over to a new node in the cluster, this will
make sure that queue and binding survive node crash.
Add retry logic when publishing an events, this is only retry in the connection
level.
Don't declare queues as durable, since:

It doesn't mean what most things it's means.
When a queue is durable, failover fail of queues.

Don't block when getting a connection from the pool, blocking is bad at best blocking
should be used with timeout, even better fail fast.

To use this PR we need to remove all existing queues, to do that easily just
reset your RabbitMQ like this:
$ rabbitmqctl stop_app
$ rabbitmqctl reset
$ rabbitmqctl start_app

+1

To delete all queue we can also do:
for queue in $(rabbitmqadmin list queues name -f bash); do rabbitmqadmin delete queue name=$queue; done


Add go2rtc_stream_name attribute for cameras (for WebRTC integration)

So that the WebRTC Camera integration can take the camera as an entity rather than the url, which can be confusing for users.
@alexxit, do you think this is something that your WebRTC integration can add support for?

I don't understand what you're doing.

@AlexxIT, this is so users does not need to have:
type: custom:webrtc-camera
url: my_camera

But instead, they can simply have:
type: custom:webrtc-camera
entity: camera.my_camera

And under the hoods, the WebRTC card would check if camera.my_camera has the go2rtc_stream_name attribute set on it, and use it as if it was set as the card's url.

@felipecrs What would you like to do with this PR?

Actually, nothing. Let me see if I can get it done in WebRTC integration first. Thanks for the reminder!


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/106571

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/107064

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/117020


[CWS] only log as debug when failing to parse IMDS event

What does this PR do?
It's probable that we could fail to parse an IMDS body if we don't have the whole body in a single packet. As such let's log it as debug instead of error for now.
Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


onPress events for subviews of Custom Marker

Question
Is there any option for handling onPress event for child control of Custom Markers ?
I'm building accordion widget on map so I need to detect on which row of opened custom widget was clicked.
<Marker onPress={() => { alert('I dont want this onPress. I want inner event') }} ...>
  <TouchableOpacity onPress={() => { alert ('Not triggering this event') }}
    <View style={{backgroundColor: "red", padding: 10}}>
      <Text>SF</Text>
    </View>
  </TouchableOpacity>
</Marker>

Please use this issue tracker for bug reports and features. Questions are better suited for Stack Overflow.
Thanks!


Cheers

Yeah 👍 Sure, but i was just kidding 😂, but definitely i will contribute
to such projects whenever I get free
time!!
Thanks,
On Thu, Oct 13, 2022, 22:24 aayush gupta @.***> wrote:

Hey @Vickyhackgit https://github.com/Vickyhackgit you have to make 4
such contributions on repositories with label: hacktoberfest in order to be
eligible for t-shirt.
Cheers
—
Reply to this email directly, view it on GitHub
https://github.com/GDSC-IIIT-Kalyani/playground/pull/98#issuecomment-1277910012,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXMALU45ECKQD5LYNGMVUG3WDA5CTANCNFSM6AAAAAARDO4D3Q
.
You are receiving this because you were mentioned.Message ID:
@.***>


[FEA] Option to turn off slack notifications in Jenkins test builds

Is your feature request related to a problem? Please describe.
Currently our jenkins jobs notify slack on failure, when we are testing new builds it would be nice just to have a check box or something when we launch the job as to whether it notifies slack so we don't put extra messages in slack chennel.

@GaryShen2008 @NvTimLiu @pxLi do you have any ideas if we can do something like this?

Yes, we have a parameter "MUTE_SLACK", if it's true, there won't be a slack notification if it failed.
If your job doesn't have this parameter, Tim can help to add it.


Add optional argument to override the current branch

Summary [Fixes #26]

Add support for overriding the current branch
Make copying url to registers an optional feature. It doesn't look like registers work well with a command that takes arguments, you'll have to choose one or the other.

bump

@BSathvik sorry for my late reply I didn't see your PR

Thanks so much for adding this 👍


royaltyInfo function doesn't use _tokenId

Hi, why should we get input of token ID if we don't use it within the function?

Hey, so we left the token ID input to maintain consistency with the https://eips.ethereum.org/EIPS/eip-2981. Option to vary royalties by token by adding some code, which we didn't do in this contract.


make FindConnext less strict on required vars

@dirk-thomas @esteve for review.

lgtm

+1

The assumption was that the failed build was due to Docker using "older" Debian Connext packages. The packages have been fixed in the meantime but since they didn't change the name the Docker was using the "outdated" cache.
But after poking Docker (by changing the Dockerfile) the new build (http://<IP_ADDRESS>:8080/view/ros2/job/ros2_batch_ci_linux/22/) fails with the same error.

This now builds with ros2/ros2#41 merged
http://<IP_ADDRESS>:8080/view/ros2/job/ros2_batch_ci_linux/25/console

Thanks @esteve

Test results include pub/sub test for all three rmw implementation now :+1:


Resolve aliases when using getIn

Is your feature request related to a problem? Please describe.
I have a situation where I have a list of paths from a YAML document. I need to map these paths to the location in the document source code. This can be done using the following code:
import { parseDocument } from 'yaml';

const yaml = `
foo: &anchor
  bar: 1
fooz:
  baz: *anchor
`;

const doc = parseDocument(yaml, {});
console.dir(doc.getIn(['foo', 'bar'], true));
console.dir(doc.getIn(['fooz', 'baz'], true));
console.dir(doc.getIn(['fooz', 'baz', 'bar'], true));

Unfortunately the last statement  doesn’t work, because getIn doesn’t resolve aliases.
Describe the solution you'd like
I would love for getIn to be able to resolve aliases.
Describe alternatives you've considered
Possibly new methods can be introduced: resolve(key, keepScalar?) and resolveIn(path, keepScalar?). This would avoid breaking changes in get and getIn respectively.
It’s possible to do this manually, but I think it’s a useful feature for this library to support out of the box.
Additional context
We use this together with the jsonschema package. Apart from this issue, it’s working amazing!

I like this idea. I'd really rather not add any new methods specifically for it, though.
I'm rather tempted to say that going from doc.getIn(['fooz', 'baz', 'bar'], true) returning undefined to indicate not finding the value, to it returning the Scalar { value: 1 } should not count as a breaking change: Really it's just an improvement in the search method.
Or is there a potential real-world use where this might break something?

I think whether or not this is a breaking change really depends on how you look at it. For me this wouldn’t break anything, nor can I think of any potential real-world use cases that could break, but it is a change of behaviour.
Another alternative would be to accept an options object:
interface GetOptions {
  keepScalar?: boolean;
  resolveAnchors?: boolean;
}

doc.getIn(path: Iterable<unknown>, options?: boolean | GetOptions)

Passing true would be equivalent to { keepScalar: true }

I think it also makes sense to resolve the alias node itself if that would be the result. So given the example above, the following two lines would be equivalent:
console.dir(doc.getIn(['foo'], true));
console.dir(doc.getIn(['fooz', 'baz'], true));

I’ll gladly provide a pull request if we reach concensus over the options format. :)


Add abort on unmount to get rid of potential memory leak

Prevents:

Warning: Can’t call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

Coverage decreased (-0.7%) to 94.03% when pulling 33210fb920c5780b8193b32a74c1b6e24e03b26c on joeydebreuk:add_abort_fetch_on_unmount into 380d74aa94fddd6aff7802367482c930c44ade60 on esphen:master.

Looks great, thanks for the PR! Merging and releasing a new version soon


Fix RenameMiqSearchDb migration

Cleanup after https://github.com/ManageIQ/manageiq/pull/5406 because it

Didn't have a spec
Didn't handle a down migration properly, since it used change
Should not access models directly, and should use a migration stub
Should use say_with_time around the data migration piece.

@martinpovolny Please review.

cc @h-kataria @jrafanie

@Fryguy : thx for the learning material. For some changes I see the reason for other I will do some reading and get back to you for clarification if needed.

Good find @Fryguy


Add ARM example & troubleshooting info

Took a first stab at updating the README. Let me know if you'd like it a different way or not at all; either way thanks for your help.

This looks well done, thank you!
Just two spaces are missing for formatting, please add them as suggested. Than I'll merge the PR.

Thank you!
I did some final changes to fit my own style. I can assess the appearance in README.md after upload/merge only.
I've removed the buildx link, it's out of scope for x11docker.


Need a example for SkyWalking Exporter

I really need an example for SkyWalking Exporter. When I try to explore by myself I even can not find a jar like opentelemetry-exporter-skywalking.

hi @leopardrota! this is probably a better question to post to the SkyWalking community

I'm confused now. I thought the fact is OpenTelemetry has done some work for supporting export metrics data to SkyWalking when I found this readme.md . Have I misunderstood?

I'm confused now. I thought the fact is OpenTelemetry has done some work for supporting export metrics data to SkyWalking when I found this readme.md . Have I misunderstood?

ah, that is for the OpenTelemetry Collector, which supports exporting to lots of different places
the OpenTelemetry Java project doesn't publish a (direct, without going through the OpenTelemetry Collector) SkyWalking exporter

I'm confused now. I thought the fact is OpenTelemetry has done some work for supporting export metrics data to SkyWalking when I found this readme.md . Have I misunderstood?

ah, that is for the OpenTelemetry Collector, which supports exporting to lots of different places
the OpenTelemetry Java project doesn't publish a (direct, without going through the OpenTelemetry Collector) SkyWalking exporter

Thanks for your reply. Do the OpenTelemetry community have plans to develop a jar similar to opentelemetry-exporter-jaeger or opentelemetry-exporter-zipkin for SkyWalking?

Thanks for your reply. Do the OpenTelemetry community have plans to develop a jar similar to opentelemetry-exporter-jaeger or opentelemetry-exporter-zipkin for SkyWalking?

We don't - but if someone happens to do that we'd welcome the addition to our contrib repo.

hey @leopardrota - jaeger, zipkin and OTLP exporters have been spec'd (and are required to be implemented) by the OpenTelemetry specification, which is why they live in the opentelemetry-java repository. as @mateuszrzeszutek mentioned, other exporters are welcome to be contributed to the opentelemetry-java-contrib repository


parseQuery and stringifyQuery option don't get applied using nuxt.config.js.

Environment

Operating System: Linux
Node Version:     v16.14.2
Nuxt Version:     3.5.2
Nitro Version:    2.4.1
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      router
Runtime Modules:  -
Build Modules:    -

Reproduction
https://stackblitz.com/edit/github-lud3m5-kbud6a?file=nuxt.config.ts,app%2F__router.options.ts
Describe the bug
Hi, I ran into this issue when I changed my repo's configuration structure. I previously put customized option settings for vue-router in app/router.options.js, and this worked okay. The option file was like below(simplified version for focusing on the issue):
// app/router.options.js
import qs from 'qs';

export default {
    parseQuery: qs.parse,
    stringifyQuery: qs.stringify
};

And following the official doc for nuxt says, I moved those options to nuxt.config.jslike below:
// nuxt.config.js
import qs from 'qs';

export default defineNuxtConfig({
    router: {
        options: {
            parseQuery: qs.parse,
            stringifyQuery: qs.stringify
        }
    }
});
...

But when I changed like this, the query parameters became a plain string, which was similar to the issue I previously reported.
You can check this issue at reproduction repo above I linked. The repo doesn't work, but if you modify the source code into using app/router.options.js instead of nuxt.config.js's router.options, you will find that the query parameter is passed properly.
Additional context
I tested it on Nuxt 3.5.3, and the same issue remains as well.
Logs
No response

The docs says:

Note: Only JSON serializable options should be passed by nuxt config. For more control, you can use app/router.options.ts file.

Functions (like qs.parse) are not serializable to JSON. That is why it is not working. Instead you should set them in app/router.options.ts as the documentation recommends.

The solution with app/router.options.ts is not working on current nuxt version.


[BUG] spaces only can be used update/create

Report
Only spaces can be entered and update in different places.
Expected behavior
Should pop same error { error : it produces when name is empty }.
i would like to work in this issue !
please assign this to me
thank you :smile:
Steps to reproduce the problem
https://drive.google.com/file/d/1ypir0DdXo__VGj27OguVuvnrns47_uup/view?usp=drive_link
On main page after login
1 try to create project with only "            " spaces
On settings tab
1 try to update name with only "            " spaces
Logs (if applicable)
example

Pezzo version
https://app.pezzo.ai/
How do you use Pezzo?
Pezzo Cloud

@adityadeshlahre feel free to pick this up. Thanks for reporting.

Fixed in #262


⚠ Bofrost.lu has degraded performance

In b678a3b, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1468 ms

Resolved: Bofrost.lu performance has improved in feff94f after 33 minutes.


Improved the footer of the webpage

I had improved the footer of the website .

Please review my pull request .

There have some conflict check it once

There have some conflict check it once

Done, Please check it now


BibTeX optional metadata

What is the expected behavior?
@lerongil mentioned that it would be great for research assets to optionally have a way to get the bibtex entry associated with projects, for easy citing.
I think it would be possible to have an optional field in the project metadata with the arXiv paper ID. With that data, arXiv API could retrieve and build the BibTeX entry, similarly to https://arxiv2bibtex.org/

Hi @1ucian0 :) do you mean having the reference of the project as same as the title or the description for example ? Also, I notified that lot of code projects are using Zenodo to attribute a doi to the project.


[SPARK-17206][SQL] Support ANALYZE TABLE on analyzable temporary view

What changes were proposed in this pull request?
Currently ANALYZE TABLE DDL command can't work on temporary view. However, for the specified type of temporary view which is analyzable, we can support the DDL command for it. So the CBO can work with temporary view too.
How was this patch tested?
Jenkins tests.

@hvanhovell Based on the prior discussion, I opened a JIRA and this PR. Can you review it if it is on right direction? Thanks.

Test build #64330 has started for PR 14780 at commit cfbfefc.

Test build #64330 has finished for PR 14780 at commit cfbfefc.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64330/
Test PASSed.

@hvanhovell @cloud-fan Can you help review this?

Test build #64986 has started for PR 14780 at commit 29e22fe.

cc @hvanhovell @cloud-fan Can you take a look? Thanks.

what's the main benefit to analyze a temp view?

@cloud-fan I have a discussion with @hvanhovell at https://github.com/apache/spark/pull/14729#issuecomment-241453606.
I think the main benefit is the CBO can work on all tables. If we can't analyze on a temp view, the query plan involving temp views will not be applied on CBO.

Test build #64991 has started for PR 14780 at commit 6a3aff2.

Test build #64986 has finished for PR 14780 at commit 29e22fe.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64986/
Test PASSed.

Merged build finished. Test PASSed.

Test build #64991 has finished for PR 14780 at commit 6a3aff2.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64991/
Test PASSed.

ping @hvanhovell @cloud-fan any more thoughts on this?

@hvanhovell Would you like to comment on this? Thanks.

@viirya this seems like a good idea. However, I want to wait with adding this until we have finished merging all the CBO related statistics stuff.

@hvanhovell ok. Thanks!

Test build #67746 has started for PR 14780 at commit 6a3aff2.

Test build #67746 has finished for PR 14780 at commit 6a3aff2.

This patch fails Spark unit tests.
This patch does not merge cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67746/
Test FAILed.

Build finished. Test FAILed.

I close this for now and maybe reopen it when all the CBO related statistics stuff are merged.


Propagate request errors

As a general note, it's useful if you prefix the commit message with the modules it touches. Or [all] if more than three.

Current coverage is 45.42% (diff: 80.00%)

Merging #185 into master will increase coverage by 0.01%

@@             master       #185   diff @@
==========================================
  Files           605        605
  Lines         15674      15679     +5
  Methods           0          0
  Messages          0          0
  Branches       1604       1604
==========================================
+ Hits           7118       7122     +4
- Misses         8095       8096     +1
  Partials        461        461

Powered by Codecov. Last update 53ebb58...eefbf12


Useful feature

like in modding +??

you failed the test

like in modding +??

No, I looked at blantados betadciu JSON files an saw that an I thought it would be a good idea for psych

why are psych engine users so dumb

This guy just failed the test, bruh.


ShyHeader "bounces" when pulled too far

I love the ShyHeader effect but it doesn't quite match how Groove has implemented it.
In Groove (see video), if I pull down, nothing happens - the header stays at the maximum size.
Groove Music 23_07_2017 21_36_38.zip
However, in the sample app (see video), if I pull down, the header grows and then bounces back to the maximum size.
Windows UI Dev Labs Sample Gallery 23_07_2017 21_37_20.zip
What do I need to do in order to get ShyHeader to behave the same way as Groove? I find the over-growth and bounce-back unappealing unfortunately.
This is with build 15063.

Yah--no problem.  You can just comment out the lines that animate the header scale during overpan/bounce:

            // Create and start an ExpressionAnimation to scale the header during overpan

            ExpressionNode headerScaleAnimation = EF.Lerp(1, 1.25f, EF.Clamp(scrollingProperties.Translation.Y / 50, 0, 1));

            headerVisual.StartAnimation("Scale.X", headerScaleAnimation);

            headerVisual.StartAnimation("Scale.Y", headerScaleAnimation);

Once you are removing that, you can also get rid of this:

            //Set the header's CenterPoint to ensure the overpan scale looks as desired

            headerVisual.CenterPoint = new Vector3((float)(Header.ActualWidth / 2), (float)Header.ActualHeight, 0);

Hopefully that updates it to give you the effect you want!

Brilliant! Thank you.


lineProps is passing false as the lineNumber argument for all but the last line since v13.0.0

Describe the bug
Hello. I've updated to v13.0.0+, and noticed that when we use the prop lineProps as a function, it is passing false as the lineNumber argument for all but the last line.
To Reproduce
Steps to reproduce the behavior:

Render a <SyntaxHighlighter /> with the prop wrapLines enabled and a code string with more than 1 line.
Use the prop lineProps, passing a function that should receive a lineNumber as argument.
Try to use this lineNumber, then realize it is almost always the boolean value false

This codesandbox reproduces the bug:
https://codesandbox.io/s/little-tree-7ljvt?file=/src/App.js
In the example I tried to alternate blue and red lines. But they are almost always blue because de lineNumber is false for all except the last line.
I put a console.log() to print the received value, then we can see that lineProps is assigned as false instead of the proper numbers.

Expected behavior
The argument for lineProps should be a proper number representing the line number as it happened until v12.2.1
Desktop (please complete the following information):

OS: macOS 10.15.6
Browser: Chrome
Version: 84.0.4147.105

Per https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/368#issuecomment-794734440, passing showLineNumbers={true} and lineNumberStyle={{display: 'none'}} is a workaround for this.
It'd be nice to have the line number for highlighting lines or applying other props to the line wrapper, even when not showing the line numbers.


processor.Parser is undefined

If I use the example at https://github.com/wooorm/retext#usage, I get the error
C:\Users\Morten\node_modules\retext-emoji\index.js:133
    var proto = processor.Parser.prototype;
                                ^

TypeError: Cannot read property 'prototype' of undefined
    at emoji (C:\Users\Morten\node_modules\retext-emoji\index.js:133:33)
    at Retext.use (C:\Users\Morten\node_modules\retext\index.js:113:19)
    at Object.<anonymous> (C:\Users\Morten\Desktop\retext.js:8:6)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3

I have installed retext, retext-emoji and retext-smartypants and I'm using node v4.0.0.

Sorry, I should put a note up. I’m in the process of updating retext, and all its plugins. Could you try installing with @next? npm install retext@next should do the trick?!

I havent got the time to update the docs yet, but you should be able to run the example as follows:
/* Require dependencies. */
var Retext = require('retext');
var emoji = require('retext-emoji');
var smartypants = require('retext-smartypants');

/* Create an instance using retext-emoji and -smartypants. */
var retext = new Retext()
    .use(emoji, {
        'convert' : 'encode'
    })
    .use(smartypants);

/* Read a document. */
retext.process(
    'The three wise monkeys [. . .] sometimes called the ' +
    'three mystic apes--are a pictorial maxim. Together ' +
    'they embody the proverbial principle to ("see no evil, ' +
    'hear no evil, speak no evil"). The three monkeys are ' +
    'Mizaru (:see_no_evil:), covering his eyes, who sees no ' +
    'evil; Kikazaru (:hear_no_evil:), covering his ears, ' +
    'who hears no evil; and Iwazaru (:speak_no_evil:), ' +
    'covering his mouth, who speaks no evil.',
    function (err, file, doc) {
        /* Handle errors. */
        if (err) {
            throw err;
        }

        /* Log the text content of the tree (the transformed input). */
        console.log(doc);
        /**
         * This logs the following:
         *   The three wise monkeys […] sometimes called the three
         *   mystic apes—are a pictorial maxim. Together they
         *   embody the proverbial principle to (“see no evil,
         *   hear no evil, speak no evil”). The three monkeys are
         *   Mizaru (🙈), covering his eyes, who sees no evil;
         *   Kikazaru (🙉), covering his ears, who hears no evil;
         *   and Iwazaru (🙊), covering his mouth, who speaks no evil.
         */
    }
);

Oh okay. I'm just about to learn nodejs in order to use this amazing library :-)
Your example works!. Thank you!

Wow, i’m honoured :) Great to hear it’s working. I’ll let this issue open ’till i update the readme.

Do you also have any plans for implementing https://en.wikipedia.org/wiki/Tf–idf?

Never had the need, but i don’t doubt if someone could implement it. I’m actually not that familiar, but I could probably help you if you’d wanted to!

I will take a look at it when I become better at programming :-)
I guess it's something like
// build corpus
var document1 = "This text is about node.";
var document2 = "This text is about ruby.";
var document3 = "This text is about nothing."
var corpus = [document1, document2, document3];

// some long text
var document = "This text is about node and ruby.";

// stopwords to filter out
var stopwords = ['it', 'is', 'am'];

// split into terms
var terms = document.split(/\W+/).filter(function(token) {
  // lowercase words (ignore case)
  token = token.toLowerCase();

  // filter out short words and stopwords
  return token.length >= 2 && stopwords.indexOf(token) === -1;
});

// loop through remaining terms
for (var i=0; i<terms.length; i++) {
  var term = terms[i];

  // compute tfidf for term
  var tfidf = tfidf(term, document, corpus);

  // print
  console.log(term + '(tfidf: ' + tfidf + ')');
}

// function to compute tf-idf
function tfidf(term, document, corpus) {
  // compute term frequency (occurances in text)
  var num_occurances_in_document;
  var tf = num_occurances_in_document;

  // compute inverse document frequency as idf=log(N/df_t)
  var num_documents_in_corpus;
  var num_documents_containing_term;
  var idf = Math.log(num_documents_in_corpus / document_frequency);

  // return tf-idf
  return tf * idf;
}

but I guess many of the needed functions are already implemented in retext.

Yup, retext has real good support for finding “words” :)

Closed by 08a095d9748e6d3b06aad82f32752ca6d39b3aef.


Disable args initialize in CKB

Due to CKB's design, programs receive no args in the verification phase. But CKB-VM always does the initialize_stack, as a result, CKB-VM always puts a 0 (length of args) on the top of the stack, which makes no-sense.
https://github.com/nervosnetwork/ckb-vm/blob/develop/src/machine/mod.rs#L138
It's a bit strange, and if users try to customize memory layout through the linker script, the default behavior may override some data undesirable.
We can add a new flag to the VM and automatically disable args initialization on the future version of CKB-VM. (need to be applied on the next hard-fork)

After testing, I am sure that it is necessary to initialize the stack. If we do not initialize, it means that the SP is located at the highest address of the memory, and then the _start section will cause an error when it is executed here:
00000000000100c8 <_start>:
   100c8:       00002197                auipc   gp,0x2
   100cc:       bf018193                addi    gp,gp,-1040 # 11cb8 <__global_pointer$>
   100d0:       f6018513                addi    a0,gp,-160 # 11c18 <_edata>
   100d4:       f9818613                addi    a2,gp,-104 # 11c50 <__BSS_END__>
   100d8:       8e09                    sub     a2,a2,a0
   100da:       4581                    li      a1,0
   100dc:       16e000ef                jal     ra,1024a <memset>
   100e0:       00000517                auipc   a0,0x0
   100e4:       30650513                addi    a0,a0,774 # 103e6 <atexit>
   100e8:       c519                    beqz    a0,100f6 <_start+0x2e>
   100ea:       00000517                auipc   a0,0x0
   100ee:       2c850513                addi    a0,a0,712 # 103b2 <__libc_fini_array>
   100f2:       2f4000ef                jal     ra,103e6 <atexit>
   100f6:       0ea000ef                jal     ra,101e0 <__libc_init_array>
***100fa:       4502                    lw      a0,0(sp) ************************** Cause an OutOfBounds error
   100fc:       002c                    addi    a1,sp,8
   100fe:       4601                    li      a2,0
   10100:       0b2000ef                jal     ra,101b2 <main>
   10104:       0be0006f                j       101c2 <exit>

I see one ways this could be addressed, SP still moves, but does not write data(argc) to the top of the stack.


[Feature] Make trigger migration possible

Use case
I was trying to include a CREATE FUNCTION statement in a migration file, but I kept getting an unterminated dollar-quoted string at or near "$$ error. Upon inspection of the code I saw that the library explodes the whole content of the migration file at the semicolons, and the statement was being diced up in multiple parts.
Solution
As a workaround I made it explode at the ";\n" sequence, so you can select which semicolons you need to preserve with an innocuous comment.
Example
BEGIN;

CREATE TABLE emp (
    empname text,
    salary integer,
    last_date timestamp,
    last_user text
);

CREATE FUNCTION emp_stamp() RETURNS trigger AS $emp_stamp$
    BEGIN
        -- Check that empname and salary are given
        IF NEW.empname IS NULL THEN
            RAISE EXCEPTION 'empname cannot be null'; --
        END IF; --
        IF NEW.salary IS NULL THEN
            RAISE EXCEPTION '% cannot have null salary', NEW.empname; --
        END IF; --

        -- Who works for us when they must pay for it?
        IF NEW.salary < 0 THEN
            RAISE EXCEPTION '% cannot have a negative salary', NEW.empname; --
        END IF; --

        -- Remember who changed the payroll when
        NEW.last_date := current_timestamp; --
        NEW.last_user := current_user; --
        RETURN NEW; --
    END; --
$emp_stamp$ LANGUAGE plpgsql;

CREATE TRIGGER emp_stamp BEFORE INSERT OR UPDATE ON emp
    FOR EACH ROW EXECUTE PROCEDURE emp_stamp();

COMMIT;

(Source: https://www.postgresql.org/docs/10/static/plpgsql-trigger.html)
PS It's ugly and hacky, but for now it works... Though it should be documented. If you accept this change I'd also like to contribute a small section on tips about writing plain SQL migrations.  I've stumbled upon a few more gotchas.

Thank you for your Pull Request. It is really well documented.
I believe your idea is good and totally makes sense for me. However there are 2 main issues about this:

PHP_EOL is OS dependant. So Windows, Mac and Linux would produce different end of line
The same is for the source of the SQL file. For example, if the SQL File was produce in Windows much probable to have \r\n instead only \n; the same for Mac that the EOL is \r.

So what do you think to change the explode for a preg_split?
<?php
$sqlList = preg_split("/;(\r\n|\r|\n)/", "SELECT 1;\r\nSELECT 2;\nSELECT 3;\rSELECT 4;");
print_r($sqlList);

Please do this change and I'll approve it.

Yes, I settled on PHP_EOL because I thought that people developing on Windows would also run their migrations on Windows (same for Linux and Mac), but this is probably a bit of a stretch. OTOH your solution should work on any scenario and never "surprise" anyone, so I'm gonna change it right away.

PS You've got your .idea folder in the source tree, mind if I delete it? I see that it is already ignored in the .gitignore file.

Thank you!
About the .idea folder, there is no necessary to remove. I only share the folder .idea/runConfigurations. I just share some run configurations.

Hi merge into the branch 2.1.0. Until next week will merge into the master. For while, you can use the version: 2.1.0.x-dev in your composer file.


Flatten nested 'let' terms for transformation into Java

When we map 'let' terms into Java, we turn the individual bindings into local variables, taking care to get the order of variable definitions right, and wrapping them in a container for delayed evaluation in the case of recursive variables.
However, nested 'let' terms are currently unsupported. For example:
let a = 1
    b = let x = 10
            y = 20
            in x + y
    in a + b

This is a perfectly reasonable term in Haskell, but in order to map it into Java, we will need to flatten it first, e.g.
let a = 1
    b = b_x + b_y
    b_x = 10
    b_y = 20
    in a + b

Now we have siblings which reference each other, but this is supported so long as there are no cycles. This flattened structure can be mapped directly into Java.

That this transformation is semantics preserving follows from the associativity law for monads!  https://wiki.haskell.org/Monad_laws


Sections should have a "Improve this page" button

Would this link to the markdown file on github in edit mode?

@wordofchristian Not in edit mode. Just a link to the file.