Build documentation preview upon opening a pull request

Reference Issue

Fixes #6849
What does this implement/fix? Explain your changes.
When a pull request is opened, a preview of the documentation will be created on Read the Docs, and linked to in the PR.
Any other comments?

@greglandrum I copied in the GitHub Actions file from the instructions you linked to. Two things that the owner of the Read the Docs project (I'm guessing this is you) needs to do:

Ensure the project-slug value is correct on the last line of the GitHub Actions file .github/workflows/documentation-links.yml. I guessed that the slug is rdkit. The GitHub Actions README advises 'You can find it on your Read the Docs project's details page in the right menu under "Project Slug".'

Configure pull request builds:

To enable pull request builds for your project, your Read the Docs account needs to be connected to an account with a supported Git provider. See Limitations for more information.
If your account is already connected:
Go to your project dashboard
Go to Admin, then Settings
Enable the Build pull requests for this project option
Click on Save

@bertiewooster I think things should now be setup properly on the read the docs side.
And, yes, "rdkit" is the correct slug for the project.

Great, thanks! This PR is ready for review then.

@bertiewooster if you push a commit to this PR, will it actually run the integration? It would be nice to see if it actually works. :-)

I pushed an empty commit and am not seeing a doc preview link yet...you may have to approve the PR before it can do that? We can hold off merging the PR while I push another empty commit.

I pushed an empty commit and am not seeing a doc preview link yet...you may have to approve the PR before it can do that? We can hold off merging the PR while I push another empty commit.

Let's try merging it and see what happens; I may still need to change something in the RTD setup


Frontend homework 5

SnapShots:

Problem 1:

Server Runnning:

localhost:8000/system-info

Problem 2:

Metric
Value

alert_status
:white_check_mark: OK

bugs
0

code_smells
0

reliability_rating
A (0 Bugs)Note: A being best, E being worst

security_rating
A (0 Vulnerabilities)Note: A being best, E being worst

vulnerabilities
0

Metric
Value

alert_status
:white_check_mark: OK

bugs
0

code_smells
0

reliability_rating
A (0 Bugs)Note: A being best, E being worst

security_rating
A (0 Vulnerabilities)Note: A being best, E being worst

vulnerabilities
0


Barcelona Spain is not in "Cataluma"

It's in "Catalonia" (English), "Cataluña" (Spanish) or "Catalunya" (Catalan)

Thank you!
Tarragona and Mataro seem to have the same problem, right?
Perhaps this may also be a result of the encoding issues: https://github.com/delight-im/FreeGeoDB/issues/4
We also have to decide which language version (native or English) to use.

It turned out that this problem was only due to the encoding errors referenced in the other issue.
Now that those problems have been fixed, the region for "Barcelona" is correct again :)
Thank you!


Error -32601 received from application: Method not found

I updated flutter today to 1.17.5 and now I'm seeing this "Error -32601 received from application: Method not found" while debugging. I don't know what's the problem, everything is normal except the debug console and no changes appearing in mobile device after this error appears. Any help?

Hi @saagarch,
Can you try running flutter pub cache repair and then flutter run to see if it works for you ?
If problem persists, provide flutter doctor -v and a minimal complete reproducible code sample that shows the issue you are facing.


refactor sampling layer setup

Motivation
setup sampling layer after forward to increase parallelism
test with llama-2-7b-chat and 1000 num_prompts
before
--------------------------------------------------
concurrency: 128
elapsed_time: 79.527s

number of prompt tokens: 248339
number of completion tokens: 240582
token throughput (completion token): 3025.156 token/s
token throughput (prompt + completion token): 6147.852 token/s
RPS (request per second): 12.574 req/s
RPM (request per minute): 754.460 req/min
--------------------------------------------------

after
--------------------------------------------------
concurrency: 128
elapsed_time: 78.886s

number of prompt tokens: 248339
number of completion tokens: 240582
token throughput (completion token): 3049.727 token/s
token throughput (prompt + completion token): 6197.786 token/s
RPS (request per second): 12.676 req/s
RPM (request per minute): 760.587 req/min
--------------------------------------------------

LGTM.
But I'd like to initiate a discussion: can we only maintain the BaseSamplingLayer? This consideration arises Since I have observed a significant amount of duplicated code between TopKSamplingLayer and TopPSamplingLayer

But I'd like to initiate a discussion: can we only maintain the BaseSamplingLayer?

I write some suggestions in https://github.com/InternLM/lmdeploy/pull/1966

cc @lzhangzz

After this refactor, the whl size reduced by about 3MB. @irexyc cc @lzhangzz
new
https://github.com/zhyncs/lmdeploy-build/releases/tag/203f9e4
old
https://github.com/zhyncs/lmdeploy-build/releases/tag/f613814


[WIP] Drafting advanced sdk on top of the existing api-augment and types

I’m closing this PR since it should be opened by Charles. I wanted to comment on the code but wrote an OIP issue instead.


update the website according to README

I think "*" in bullet points is also unnecessary, both in README and the website.
it should be

Indian Students Only
not
*Indian Students Only
what do you guys think?


we need README in each download so we can read it again without having to go back and find it on tonehunt.org

maybe even a repo with all the models and IR and include a csv or sheets doc with it?

We are looking into some options to accomplish this. We'll give an update once we figured something out.


Undefined variable: lown

I get Undefined variable: lown.
Do you have any ideas how to fix it?
In app.php, I have this;
       Gmopx\LaravelOWM\LaravelOWMServiceProvider::class,
In my controller
use Gmopx\LaravelOWM\LaravelOWM;

class DashboardController extends Controller
{
    public function index()
    {
        $lowm = new LaravelOWM();
        $current_weather = $lown->getCurrentWeather('london');

        dd($current_weather->temperature);
    }
}

Laravel Framework 5.4.23 running on php 7.1.0.

There's a typo on the line:
$current_weather = $lown->getCurrentWeather('london');
You have $lown instead of $lowm

Aha, thanks.
Then can you change your readme file as well. I just copied it from there.

Thanks @shinokada  and @jmaurer1994
Typo fixed.


Add pipeline run tests for DVC

Description
Add tests for DVC pipelines to test that they actually run in tests/test_pipeline_run_dvc.py.
Aldo changes default flavor for DVC to be StagePerArtifact.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[X] Added tests (non-breaking change)

How Has This Been Tested?

Locally and included as part of github actions.

@andycui97 I'm fine with the changes, I think the comment above is obsolete!

@andycui97 I'm fine with the changes, I think the comment above is obsolete!

Sg! Just waiting on @aayan636 to review internally as well.


[Bug]: runtime's source.source() does not return a string

System Info
System:
OS: Windows 11 10.0.22631
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 8.69 GB / 15.79 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
@rspack/cli: ^1.0.0 => 1.0.0
@rspack/core: ^1.0.0 => 1.0.0
@rspack/plugin-react-refresh: ^1.0.0 => 1.0.0
Details
When extracting the chunk sources in the build using source.source(), all sources are extracted as strings except for the runtime chunk, which returns the following object: {"type":"Buffer","data":[...]
Relevant code snippet:
new HtmlPlugin({
        scriptLoading: 'module',
        templateContent: ({ compilation }) => {
          const assets = compilation.getAssets()
          const pages = pagesManifest.map(({ chunk, path, title, data }) => {
            const scripts = assets
              .map(({ name }) => name)
              .filter(name => new RegExp(`[/.]${chunk}\\.(.+)\\.js$`).test(name))

            return { path, title, scripts, data }
          })

          if (production) {
            const assetsWithSource = assets
              .filter(({ name }) => /^scripts\/.+\.js$/.test(name))
              .map(({ name, source }) => ({
                url: `/${name}`,
  ----------->  source: source.source(),
                parentPaths: pages.filter(({ scripts }) => scripts.includes(name)).map(({ path }) => path)
              }))

            writeFileSync(join(__dirname, 'public', 'assets.js'), JSON.stringify(assetsWithSource))
          }

          return htmlTemplate(pages)
        }
      }),

Reproduce link
https://github.com/theninthsky/client-side-rendering/tree/rspack
Reproduce Steps

Clone https://github.com/theninthsky/client-side-rendering.git
Switch to the rspack branch.
npm i
In the scripts/inject-worker-html.js file, comment line 29 which removes the helper file public/assets.js.
npm run build
Open public/assets.js and look for runtime.

You'll see that only this chunk was extracted as an object.

@theninthsky I cannot reproduce this issue on a Mac. It might be a Windows-specific bug. I will try it on Windows later.

@SyMind
Thanks.
It also happens in Cloudflare Pages CI build (Linux).

Same error happened. I wrote a custom plugin .
My plugin is
import { Compiler, Compilation, sources } from '@rspack/core';

class DynamicPublicPathPlugin {
    constructor() {}
    apply(compiler: Compiler) {
        compiler.hooks.emit.tapAsync(
            'DynamicPublicPathPlugin',
            (compilation: Compilation, callback: () => void) => {
                // 修改__webpack_require__.p的值为CDN地址
                const assets = compilation.assets;
                Object.keys(assets).forEach((key) => {
                    if (key.endsWith('.js')) {
                        const asset = assets[key];
                        // Bug： https://github.com/web-infra-dev/rspack/issues/7781
                        let source = asset.source() as string;
                        const pattern = /([a-zA-Z0-9_.]+)="\<\$\= locals\.cdnDomainUrl \$\>"/g;
                        const replacement =
                            '$1=window.__SPOTTER_APP_BOOT_DATA__.cdnDomainUrl + "/"';
                        source = source.replace(pattern, replacement);

                        // 创建新source
                        const newSource = new sources.RawSource(source);

                        // 覆盖source
                        compilation.assets[key] = newSource;
                    }
                });

                callback();
            }
        );
    }
}

export = DynamicPublicPathPlugin;

@theninthsky  I wonder if the problem is related to your regex filtering the name field. Even if source.source() returns a buffer, there should still be content present, rather than nothing as mentioned in your issue.

et source = asset.source() as string;

All api is same as Webpack

@kitiho Not the same bug. Rspack transforms the source from the Rust side to the JavaScript side. Now, it will be converted to RawSource. If you want to call replace on the source, you should use const replaceSource = new ReplaceSource(source);.

@SyMind
You mean the "data": [...] part I wrote?
Sorry, I just wanted to it make it short. There is indeed binary data inside data.
I don't think this is related to the assetsWithSource name filtering, but I'll try removing it and just keep all assets to see if it fixes the issue (might take a few days since I'm not home).

@theninthsky I reproduce this issue. I'm trying to fix it.

@SyMind
Works like a charm, thanks!


cmd/go: inconsistent result when go build output path is not a exists directory

What version of Go are you using (go version)?
go1.15 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?

Project Hierarchy
.
├── go.mod
└── main.go

The first time to build, go complain about a exists directory that is actually created by go itself and not exists before the build.
$ go build -o bin/ main.go
go build command-line-arguments: build output "bin/" already exists and is a directory

Project Hierarchy
.
├── bin
├── go.mod
└── main.go

The second time to build. Since the directory already exists, go works fine in this time.
$ go build -o bin/ main.go

Project Hierarchy
.
├── bin
│   └── main
├── go.mod
└── main.go

What did you expect to see?
An idempotent result from go build.

Pros:

No need to create a directory by users.
Easy to write a common build command in scripts. (Putting binary in a directory seems like a common convention to build)

Before: go build -o bin/foo . go build -o bin/bar . (We need to change the output name)
After: go build -o bin/ .

Consistency. go build -o bin/foo . also creates the directory for users.

@bcmills @matloob @jayconrod


Pin and document what version of yarn to use

Using the ‘project-locked’ that's recommended in the yarn 2.x docs, but
also documented for use with yarn classic, could make it easier to stay
on a consistent version across the team without requiring any changes to
the global yarn installs that we were using already.

@andrewhercules or others, if you feel that this is overkill for now, do feel free to let me know that too!

Hm, looks like CI is failing at the first yarn command, but that same error occurs in the base alpha branch.

Pull request #133 should address the build failure, so that we can be assured that this change doesn't break anything.

Given that we are using the latest yarn version, does it make sense to include the release in the code? It will probably be updated as development continues.

This approach allows updating it for everyone by running yarn set version <new version>, without having to ask all core developers, contributors and customisation builders to change their global installation.

And just like the pins in yarn.lock for all other dependencies, it should avoid some people running into bugs that others can't reproduce because they're using different versions.
in an extreme example, I already lost some time looking up how to install the latest version of yarn, seeing it fail to build, and installing yarn classic instead.

Agreed. Thanks for the PR!


Lighthouse in ci

Added pipeline check of lighthouse

Killed the build because the install was taking so long, the push pipeline should cover the bases


Cannot start a container

Hi,
I tried to start a container but logs keep on this loop :
Aug 20 09:17:42 systemd jwilder_nginx-proxy_latest.service: control process exited, code=exited status=1
Aug 20 09:17:42 docker Error response from daemon: No such container: jwilder_nginx-proxy_latest

Aug 20 09:17:42 docker 2014/08/20 07:17:42 Error: failed to remove one or more containers

Aug 20 09:17:42 systemd Unit jwilder_nginx-proxy_latest.service entered failed state.

But the container does exist. I can start it from command line.
Same after editing the "application" and rebooting the system.
Thanks.

Hello , same problem with same specific image - dockerfile..
I don't think it is due to size / download speed.
It must be something misconfigured. Please try to reproduce it , as a solution will strengthen
underlying mechanisms to handle such cases.
How about if a manual deployment will docker on this one. Will it be possible for panamax to see it
and include ti to an application structure and link it with other containers?
Is there a work around?
Regards


housekeeping: move the code of conduct to the website

@ghuntley,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Changes Unknown when pulling ce7b949b11ba3d14c041026fba4e45c9bd0054c2 on ghuntley-patch-4 into ** on develop**.


Duplicating files loses track of references or even crashes VS Code

VSCode Version: latest
OS Version:OS X El Capitan

Steps to Reproduce:

create a file "ball.ts" that has a class "Ball"
create a new file in the file explorer pane
paste the whole code of ball.ts into the new file
now type your new class name in the new file, for example "Paddle"

result:

the file name of your new file in the explorer keeps changing to "ball-1.ts".
every time you rename that file to "paddle.ts", VS Code creates a new "ball-2.ts" and so forth.
even if you manage to get rid of all the redundant files and you end up with one paddle.ts that has a "Paddle" class, VS Code still keeps complaining that you have two Ball classes.
the only way to fix this is quit VS Code and restart.

@KokoDoko for the duplicate warning see https://github.com/Microsoft/TypeScript/issues/7744
@bpasero I move this to you. It looks like the explorer has still focus and does something on paste ? I can't imagine how otherwise the file would become ball-1.ts

@KokoDoko hard to understand what you are doing, mind to attach a video? I am often using liCECap on Mac to produce animated gifs.


An absolute WTF issue

Your mod seems to think it requires one of the addons. WTF?

Moreover it requires not existing version of addon, there is only 1.4.1e version as most recent.

I'll have a 1.4.2 version of the thaumcraft add-on out very soon.  Hopefully today. Sorry for the inconvenience.

New Thaumcraft add-on 1.4.2 is now out
https://www.curseforge.com/minecraft/mc-mods/dttc


delete dead link

@duglin not sure what it was supposed to be
@resolves #21

@duglin @jkomg @nimbcode If I am going to own this, I need access to merge things.

LGTM


README - small changes

Add link to jump to installation section
Add link to jump to installing tab completion. Named this link "auto-complete" so that "auto" and "complete" (ending with an -e rather than -ion) would both show up when grepped/ ⌘+F

Why:

Faster to "just install it" when you know you're going to do that anyways. i.e. from a friend recommending. or on a new machine.
Less intimidating to newcomers, possibly

@hangtwenty Thank you Michael, it's a good point


amoled.isBatteryConnect() always returns 0 - T-Display S3 AMOLED 1.91 v2 touch [H681]

all sample code compiles and runs fine
running fine on a 1100 mAh Lipo battery
amoled.getBattVoltage() seems to work fine either via usb or on battery
However, trying to detect if device is running on battery power, amoled.isBatteryConnect() would always return 0
amoled.isCharging() always returns 0 even though the battery is charging
would appreciate any help. Thanks

Johnwcha,
I don't think that function will work because the 1.91 touch does not have
a battery power management unit/PMU like the 1.47 lite version.
SteveC
On Tue, Apr 9, 2024 at 1:13 PM johnwcha @.***> wrote:

all sample code compiles and runs fine
running fine on a 1100 mAh Lipo battery
amoled.getBattVoltage() seems to work fine either via usb or on battery
However, trying to detect if device is running on battery power,
amoled.isBatteryConnect() would always return 0
amoled.isCharging() always returns 0 even though the battery is charging
would appreciate any help. Thanks
—
Reply to this email directly, view it on GitHub
https://github.com/Xinyuan-LilyGO/LilyGo-AMOLED-Series/issues/31, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AD6NLMR7IBFORLVI5VAPVSLY4QOVNAVCNFSM6AAAAABF6662LOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTGOJTGU2DGNQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

I see. Thanks, Steven.
On the website, it says The module is equipped with a built-in battery management system. Is there any function to work with battery status/charging?

Take a look at the 1.91" version schematic. It only has a TP4065 based charging circuit.  So no status feedback is possible, The ESP32 can only read the BAT_VOLT voltage on GPIO4. The 1.47" version has a smart interface.

Thanks. You're super !!!

Surprised it didn't throw an error. Those functions should only work for BOARD_AMOLED_147 and BOARD_AMOLED_2417 versions.
No problem, glad it helped!

Forgot to mention that amoled.getBattVoltage() does work for 1.91". It just uses the ESP32 S3 built in ADC. Gives millivolts.


📝Create "Types" file or directory

I think we want a dedicated place for custom types/interfaces. These can then be exported to the entire app.
A directory will probably be nice so we can split files (e.g. supabaseTypes, movieDbTypes, etc.)
Be sure to move any and all existing interfaces to this new location.

Closed by #76


Update repository URL

Solely so the link on npm gives some confidence.

Current coverage is 63.68% (diff: 100%)

Merging #1807 into master will decrease coverage by 0.36%

@@             master      #1807   diff @@
==========================================
  Files             1          1
  Lines          4400       4400
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           2818       2802    -16
- Misses         1582       1598    +16
  Partials          0          0

Powered by Codecov. Last update 223404a...306c43a

This patch is so ready.

Awesome, thanks!


Fix #1538, add capability to generate multiple tables

Adds a "install_custom.cmake" hook that can be put into a CPU-specific subdirectory under the "defs" directory, that can perform extra installation steps as required for the project/mission.
Tweaks the "add_cfe_tables" function such that it can also be called from the install_custom.cmake script to generate additional/alternative table binary files for that CPU.
The main update is that it uses the "APP_NAME" parameter to associate the table files with the app library, so the same set of include files can be used.  This relies on the target-scope properties being used.  Historically that string wasn't verified, it could have been any unique string, but now it should match the app if this is to work as expected.
Describe the contribution
Fixes #1538
Testing performed
Add multiple/alternative table definitions for sample_app in a local 2-cpu configuration.  Confirm that all table files are built and installed to the staging area correctly, and that sample_app can be tweaked to load one of the alternatives, just by changing the filename it loads.
Expected behavior changes
Because the "APP_NAME" (1st parameter) of add_cfe_tables was never validated historically, it just had to be unique, this still allows any string for backward compatibility.  It will generate a new "Note" message to the user if it does not match an application name, but it is still accepted.
If the multiple table feature is used, it actually needs to match the application name, or else the include paths may be incomplete.
System(s) tested on
Ubuntu
Additional context
See also nasa/sample_app#148
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Ping @excaliburtb, does this meet your need for building multiple versions of tables?

This looks like what I would want. Is there a way to add include paths to a specific table?

This looks like what I would want. Is there a way to add include paths to a specific table?

You can always call the target_compile_definitions and/or target_include_directories cmake commands to configure how these table sources get compiled.  This does require you to know the actual target name, which in this case is a combination of the target name, app name, and table basename (i.e. without extension).  That is, you can do:
target_include_directories(${TGT}_${APP_NAME}_${TBLWE} ${extra_includes})

CCB:2021-05-19 APPROVED

Lets users install arbitrary files by calling "add cfe tbl"
Renamed library name to include the TGT_NAME and APP_NAME. Previously it could be an arbitrary string, it is still acceptable but it might result in a build failure.

There's an open issue in sample_app <https://github.c<om/nasa/sample_app/issues/148> to make it compatible with this pattern

Do we want to add a sample implementation?

[ ] open issue

Opened a ticket on elf2cfetbl to enforce naming https://github.com/nasa/elf2cfetbl/issues/79


SLS losing scrobbles on HTC One V

50% of tracks not being submitted to local cache or even not recognized like last playing.
Problem confirmed with both Hero Music Player and PowerAMP.
Chech plz.

@timaero @prashker can this be closed?

@HumbleBeeBumbleBee I have not had the phone since 2013. Having said that when I last used it I had switched from stock to a CyanogenMod based ROM and there was not issues. SLS was working back then.


Analytics adds latency to brew search invocation

The bash and zsh completion scripts use brew search; setting HOMEBREW_ANALYTICS makes brew search invocations take ~twice as long on my Macbook (500 ms enabled, 250 ms disabled). Ideally, brew search should be very fast.

And IMO using brew search in this context is an internal usage and not a direct invocation by the user, thus it probably shouldn't be counted anyway? (Tab completion can result in many invocations of this without ever leading to an actual brew command being executed.)

Should be fixed by #34. I'd rather we take the approach to making analytics completely async rather than disabling it for speed reasons.


Fix double free in FSR2 destructor

Before this change, using FSR2 resulted in the following error when the effect was destroyed:
ERROR: Attempted to free invalid ID:<PHONE_NUMBER>09453
   at: _free_internal (servers/rendering/rendering_device.cpp:4957)

This happened because ACCUMULATE and ACCUMULATE_SHARPEN passes shared the same shader_version object but had different pipeline IDs. When version_free was called for ACCUMULATE pass, it destroyed pipelines created from that version, including the pipeline for the ACCUMULATE_SHARPEN pass. Using a unique version works around this problem.

Note: Another version of this fix would be to remove manual calls to free for pipeline IDs, which I think is correct because they are added as dependencies for the shaders which version_free will destroy? This is perhaps less wasteful but I wasn't sure if the manual destruction of pipelines that this code uses atm serves a purpose. I can change to this method if preferred.

Thanks!

Cherry-picked for 4.3.1.


What do we have for picture galleries?

I found https://github.com/getpelican/pelican-plugins/tree/master/photos
And was wondering what do we have in Pelican for this, is there anything I've missed?
Thanks,
Pablo

No, we have nothing for it. Yet!

Based in your experience, what would be good to add?

Simple attempt, pics 'link' to full size image, no other modifications on https://github.com/getpelican/pelican-plugins/tree/master/photos but adding extra plugin, dependencies on requirements and define header to article
---
author: Pablo Iranzo Gómez<EMAIL_ADDRESS>title: Lego mini MOC adaptation
tags: lego, moc
layout: post
date: 2019-06-09 01:16:14 +0200
comments: true
category: blog
description:
gallery: {filename}gallery-source/minicooper
---

Based on the Lego MOC <https://rebrickable.com/mocs/MOC-24636/Keep%20On%20Bricking/75894-mini-transporter/> which I was unable to pay instructions for (Paypal complained), I tried to make my own based on the pictures appearing there, adding some more options like sizing cabin for allowing a minifigure to `drive`, plus some other alternatives for the front facing engine area and better holding of the rear wheels area.

Hope you like it!

Want me to PR it ? @talha131 @silverhook ?

Submitted the PR just for the thumbnail listing, if OK, I'll also add DOC on how to set it up before final merge (or create a new issue for tracking the doc need)

@iranzo If there is nothing left in this issue then please close it. Otherwise please mention what needs to be done here.

Closing!


Top Node.js Security Vulnerabilities and their Solutions

Proposed title of article
Top Node.js Security Vulnerabilities and their Solutions
Introduction paragraph (2-3 paragraphs):
Node.js, like any other framework or programming language, is prone to all kinds of web application vulnerabilities. The core of Node.js is secure, but third-party packages may require additional security measures to protect your web applications.
The most common Node.js security issues include NPM phishing and regular expressions Denial of Service (DoS). Besides the Node-related threats, there are also the usual web security issues like cross-site request forgery, cross-site scripting, unvalidated redirects, and security misconfiguration.
Key takeaways:

Definition of NPM and its relation with security issues
Main Node.js Security Vulnerabilities
Solutions to these vulnerabilities

References:
Please list links to any published content/research that you intend to use to support/guide this article.
N/A
Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

@Annpurity just wanted to follow up on this topic as I'm clearing up the queue where possible? Can be re-opened when needed.
Of perhaps I missed the PR this is attached to?


Cannot have two children with same table

Hello
I have one table that needs to be used twice in children array
The problem is when same table occurs in children, updating is not working
To handle it somehow I had to create 2 same views with only difference as names, so pgsync sees them as different tables.

yes this is a known issue. I will address this together with this issue as there are slightly related

@toluaina Think I'm running into the same issue, the initial load out of existing data works, but then updates fail. Will try the view approach to hack around for now.

I tried the workaround like this:

i create 2 sql views with different names that are referencing the same table.
But when i start pgsync, i have the following error:

ERROR:pgsync.sync: Exception invalid expression
pgsync               | Traceback (most recent call last):
pgsync               |   File "/usr/local/lib/python3.10/site-packages/pgsync/sync.py", line 968, in sync
pgsync               |     self.query_builder.build_queries(node)
pgsync               |   File "/usr/local/lib/python3.10/site-packages/pgsync/querybuilder.py", line 723, in build_queries
pgsync               |     self._non_through(node)
pgsync               |   File "/usr/local/lib/python3.10/site-packages/pgsync/querybuilder.py", line 648, in _non_through
pgsync               |     node, sa.func.JSON_AGG(self._json_build_object(params))
pgsync               |   File "/usr/local/lib/python3.10/site-packages/pgsync/querybuilder.py", line 50, in _json_build_object
pgsync               |     raise RuntimeError("invalid expression")
pgsync               | RuntimeError: invalid expression
pgsync               | 2022-09-07 13:38:47.363:ERROR:pgsync.elastichelper: Exception invalid expression
pgsync               | Traceback (most recent call last):
pgsync               |   File "/usr/local/lib/python3.10/site-packages/pgsync/elastichelper.py", line 130, in bulk

test_files.zip
I attached those test files that contains SQL instructions and the schema.json

Is it possible to have a working sample with view? I feel it is not possible in certain case. For example when the child table owns the relation, then i believe a trigger is set on the child table. But postgresql complains about trigger on view: "Views cannot have row-level BEFORE or AFTER triggers".


[INVESTIGATION] PettingZoo Environments Wrappers

Are there any examples of how to wrap and use a pettingzoo environment in MAVA?

Hey there. Thanks for reaching out.
Yes, in Mava we support multi-agent extensions of PettingZoo environments. See this example. You can find the PettingZoo wrapper here.


fix(versions): update Activiti/activiti-cloud-runtime-bundle-service versions into develop

UpdateBot pushed maven dependency: org.activiti.dependencies:activiti-dependencies to: 7.1.71

UpdateBot commands:
updatebot push-version --kind maven org.activiti.dependencies:activiti-dependencies 7.1.71 org.activiti.api:activiti-api-dependencies 7.1.48 org.activiti.core.common:activiti-core-common-dependencies 7.1.50 org.activiti.build:activiti-parent 7.1.28


clickhouse operator included in github, but missing on operatorhub.io

Hi there! Observe strange situation - how does it happen that clickhouse-operator it present in github repo https://github.com/k8s-operatorhub/community-operators/tree/main/operators/clickhouse but is missing on operatorhub?

I see that operator is there. https://operatorhub.io/operator/clickhouse

Closing. Please reopen when needed


Feature/update dependencies

Pull request updating some depenedenices.
Fixes #44
Updated JSONCOns
Remove source and added as submodule. This is Version 0.156.0
@rohoet Compare our submodule reference to jsoncons commit 5be801 which is the final commit of  https://github.com/danielaparker/jsoncons/tree/v0.156.0
Updated jwt-cpp
Remove source and added as submodule. I do not know our current version. I added v0.4.0. https://github.com/Thalhammer/jwt-cpp/tree/v0.4.0 @rohoet It is still MIT license and see our submodule commit id pointing to 34bb06, the last commit of v.0.4.0
I also needed to replace some deprecated API calls for JSONCons. Seems to work fine
⚠  * Do not merge before somebody else tested this*
@wenwenchenbosch  Please review/test this!
@nayakned You may want to give this a small testride, to see it is still working
@rohoet Please check if you forsee any troubles with dependencies. I think it should be fine, but as I said I have no idea which jwt-cpp version was cleared before

Can smebody check @rohoet  @eriksven  waht the problem with the build is? The hook says This commit cannot be built
Looking at the llink I see https://ci.eclipse.org/kuksa/job/kuksa.val/view/change-requests/job/PR-53/2/console fails with some missing includes, howeer the identical code base builds here https://kuksaval.northeurope.cloudapp.azure.com/job/kuksaval-boschresearch/job/feature%252Fupdate-dependencies/5/console
I think the root cause is, eclipse not checling out the submodules, if you see the first lines in the Jenkinsfile, correct is
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** my-image:5 cat
$ docker top 4577edbadd724499b2705f63ce862773342fdd8e60a9f34cbf0dd667fc0e6b08 -eo pid,comm
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Prepare)
[Pipeline] sh
+ git submodule update --init
+ mkdir -p artifacts
+ rm -f artifacts/kuksa-val-amd64.tar.bz2 artifacts/kuksa-val-arm64.tar.bz2 artifacts/kuksa-val-dev-ubuntu20.04.tar.bz2
[Pipeline] }

while the Eclipse CI only does
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Prepare)
[Pipeline] sh
+ mkdir -p artifacts
+ rm -f artifacts/*
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
+ ./docker/build.sh amd64
Sending build context to Docker daemon  5.306MB

so no submodules, I do see however this suspicious message in Eclipse side
‘Jenkinsfile’ has been modified in an untrusted revision

So does it use an older, cached "safe" version? If so, can you let the Jenkins trust the Jenkinsfile for this PR, so the build is checked correctly?

@rohoet  From a techical point of view, pls merge 😄

Can smebody check @rohoet @eriksven waht the problem with the build is? The hook says This commit cannot be built
Looking at the llink I see https://ci.eclipse.org/kuksa/job/kuksa.val/view/change-requests/job/PR-53/2/console fails with some missing includes, howeer the identical code base builds here https://kuksaval.northeurope.cloudapp.azure.com/job/kuksaval-boschresearch/job/feature%252Fupdate-dependencies/5/console
I think the root cause is, eclipse not checling out the submodules, if you see the first lines in the Jenkinsfile, correct is
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** my-image:5 cat
$ docker top 4577edbadd724499b2705f63ce862773342fdd8e60a9f34cbf0dd667fc0e6b08 -eo pid,comm
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Prepare)
[Pipeline] sh
+ git submodule update --init
+ mkdir -p artifacts
+ rm -f artifacts/kuksa-val-amd64.tar.bz2 artifacts/kuksa-val-arm64.tar.bz2 artifacts/kuksa-val-dev-ubuntu20.04.tar.bz2
[Pipeline] }

while the Eclipse CI only does
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Prepare)
[Pipeline] sh
+ mkdir -p artifacts
+ rm -f artifacts/*
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
+ ./docker/build.sh amd64
Sending build context to Docker daemon  5.306MB

so no submodules, I do see however this suspicious message in Eclipse side
‘Jenkinsfile’ has been modified in an untrusted revision

So does it use an older, cached "safe" version? If so, can you let the Jenkins trust the Jenkinsfile for this PR, so the build is checked correctly?

I think, after merging the PR to master, jenkins can build it again, because in https://github.com/boschresearch/kuksa.val, jenkins can build the branch successfully. If you really want the jenkins can also build this PR. I think, just also bringe the branch to eclipse repo will also solve the problem

I think that if the Jenkinsfile is changed in a PR, Jenkins checks with GitHub whether the PR author has the permission to push to the origin repository, which is trusted if yes, and untrusted otherwise. For the latter (our case here), I guess the last trusted Jenkins file version is used causing the new submodules to be excluded, ultimately causing the includes to fail.
So lets see if the build passes when the PR is trustfully merged into master.
Updated libs are already filed for IP checks.


[9.x] Fixed expectsOutputToContain & doesntExpectOutputToContain of PendingAction

All the details go here #43896
Basically expectsOutputToContain and doesntExpectOutputToContain didn't assert against all output .
So if you write an output that contains a lot of info, you can't assert it multiple times for the same output.
Partial content from #43896
When I tried to use the expectsOutputToContain, assuming it would validate all output against the string, but it didn't
The printed result of my command:
@property int $id
@property string $first_name

Test result:
$command->artisan(...)
    ->expectsOutputToContain('@property int $id') // ok
    ->expectsOutputToContain('@property string $first_name') // expected to work, but got "Output does not contain ..."
    ->execute();

Then I have to do the ugly way like this in order to assert the outputs:
https://github.com/sethsandaru/eloquent-docs/blob/main/src/Commands/EloquentDocsGeneratorCommand.php#L54-L57
$lines = explode("\n", $generatedDocs);
foreach ($lines as $line) {
    $this->info($line);
} // after this => expectsOutputToContain works fine

Hi @taylorotwell, could you please review it again? Thanks

Instead of risking breaking anything on a patch release I suggest just expecting multiple lines?


Backport HBASE-15519, HBASE-23364, HBASE-23802 to branch-2.2

This PR brings back HBASE-15519 and HBASE-23364 as prerequisites to HBASE-23802. They do not cherry-pick cleanly because of the presence of hbtop on branch-2; I had to unwind some minor complications that appear to arrive via HBASE-23065.

Reviewers: see associated discussion on https://issues.apache.org/jira/browse/HBASE-23802.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 14s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 4 new or modified test files.

_ branch-2.2 Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
5m 39s
branch-2.2 passed

+1 :green_heart:
compile
1m 30s
branch-2.2 passed

+1 :green_heart:
checkstyle
1m 57s
branch-2.2 passed

+1 :green_heart:
shadedjars
4m 27s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  4s
branch-2.2 passed

+0 :ok:
spotbugs
3m 15s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
4m  8s
branch-2.2 passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 13s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
5m 18s
the patch passed

+1 :green_heart:
compile
1m 30s
the patch passed

+1 :green_heart:
javac
1m 30s
the patch passed

-1 :x:
checkstyle
1m 30s
hbase-server: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
shadedjars
4m 24s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
16m 46s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1 :green_heart:
javadoc
1m  3s
the patch passed

+1 :green_heart:
findbugs
4m 40s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
0m 32s
hbase-hadoop-compat in the patch passed.

+1 :green_heart:
unit
0m 39s
hbase-hadoop2-compat in the patch passed.

-1 :x:
unit
230m  8s
hbase-server in the patch failed.

+1 :green_heart:
asflicense
1m 11s
The patch does not generate ASF License warnings.

295m 27s

Reason
Tests

Failed junit tests
hadoop.hbase.client.TestAdmin1

hadoop.hbase.replication.multiwal.TestReplicationSyncUpToolWithMultipleWAL

Subsystem
Report/Notes

Docker
Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1143/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/1143

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux e12b4e794ce5 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1143/out/precommit/personality/provided.sh

git revision
branch-2.2 / 4094275cd0

Default Java
1.8.0_181

checkstyle
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1143/1/artifact/out/diff-checkstyle-hbase-server.txt

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1143/1/artifact/out/patch-unit-hbase-server.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1143/1/testReport/

Max. process+thread count
4674 (vs. ulimit of 10000)

modules
C: hbase-hadoop-compat hbase-hadoop2-compat hbase-server U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1143/1/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

I think these additional back ports don't make sense for branch-2.2. Closing this one out in favor a of a simplified patch that addresses only the issue as described in the JIRA that's being back ported.


Migrated bootstrap-tour to IntroJs in Memorize Activity tutorial

Hey @llaske, I have migrated Memorize activity tutorial from bootstrap-tour to IntroJs, referring the Issue: #1090.  Please review the PR. Here's a look at the activity tutorial now:

@llaske I've fixed the merge conflict, please review and tell me if there are any changes. Thanks.


test directory rename

Pull Request Functional Test Report for #2933 / 92b886a9db5d279722fa1c28c1cc1c18fe1cbd40
Virtual Devices

Device
Test
Test Documentation
Job
Raw Log

Arista cEOS

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
0f2742b3
Log

Cisco 8000E

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
34e2ab40
Log

Cisco XRd

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
f2f9f4fb
Log

Juniper ncPTX

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
83b5739b
Log

Nokia SR Linux

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
018098f3
Log

Openconfig Lemming

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
b444e2c7
Log

Hardware Devices

Device
Test
Test Documentation
Raw Log

Arista 7808

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria

Cisco 8808

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria

Juniper PTX10008

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria

Nokia 7250 IXR-10e

RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria

Help

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 55.448%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1949

Relevant Lines:
3515

💛  - Coveralls


allow player to drag out futile moves/lose in drawn position

The example would be on Rc4+! you move the king and ... oops. Bad idea.

I've expanded this enough. There are cases where I could, but at this point it would have low value and high bug potential for the potential features added.


Make Node's vm module work with VS Code debugger

I'd like to call a function created by passing the content of a file in the current project tree to vm.compileFunction and be able to set a breakpoint inside file and have it work. I can't figure this out. Is this possible already? If not, how much work would it be to add it?
It already works with the debugger keyword. Presumably we just need to add like, some path logic in there or something, right? I am able to map the local filename from the file tree to this file if need be, passing it as the filename option to the aforementioned function. Will this help?
For context, I created this issue in the nodejs project and they told me I need to ask you.

It sounds like you want to add a comment like //# sourceURL=<original file uri>, where <original file uri> is in the form file:///foo/bar.js, to the end of the string you pass to compileFunction. This is a standard comment form which MDN has a brief section on: https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources

In this format?
vm.compileFunction(code + `\n//# sourceURL=${pathToFileURL(realPath).toString()}`)

Because it's not working. VS Code is not seeing the connection. It prints a valid file path, but in Windows format:
// ...
// ... js code here, last line below:
// ...

//# sourceURL=file:///c:/Users/myuser/Documents/projects/myapp/src/pages/home.tsx

Could that be why it's not working?

Oh wait, it's working. It's just I'm not giving a source map. Oops. Thanks @connor4312

@connor4312 Can we reopen this? Your suggestion isn't enough since it needs a whole source map, and I can't figure out how to give VS Code a source map that it understands. I've gotten pretty far but not knowing how to debug what VS Code is doing, and not knowing its internals, I've spent about an hour and gotten almost nowhere.

For context:

I'm creating a valid source map object
I'm encoding it correctly as a base64 URL
I'm correctly making it the last line of the compiled vm function source
I'm running my code inside VS Code's debugger
The sources key has a valid absolute file url to my file
VS Code can open that absolute file URL just fine on its own
I've tried passing several values to filename option of vm.compileFunction

Example source map:
{
  version: 3,
  file: 'myfile.js',
  sources: [
    'file:///C:/Users/myuser/projects/myapp/src/some/myfile.tsx'
  ],
  mappings: 'AAAA;[etc];AACA',
  names: []
}

More context:

When I put a debugger statement inside the file, VS Code stops execution right there as expected
It shows the compiled source, as expected, in a new tab
The name of this new file is exactly what I passed to filename option of vm.compileFunction
This new file has my source map at the bottom, in proper base64 format

Example base64-encoded URL at the bottom of my file (no newline at end, newline before it is \n):

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsiZmlsZTovLy9jOi9Vc2Vycy93b3cveW91L2FjdHVhbGx5L2RlY29kZWQvdGhpcy9pbS9zdXJwcmlzZWQveW91L3dlbnQvdGhhdC9mYXIvYXBwL3NyYy9tYWluLnRzeCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsIm5hbWVzIjpbXX0

This is what the debugger shows:

I wonder, is it related to the fact that it's showing <node_internals> before the file name I gave it? Like, maybe VS Code just needs me to convince Node.js that the function I created with vm.createFunction is not part of node_internals, or something?

That sourcemap looks correct. Using an absolute file URI in sources is the simplest way to get it to work, though the example sourcemap you gave looks incomplete. You can use https://sokra.github.io/source-map-visualization/ if you need to debug sourcemaps themselves.
You may also need to pass resolveSourceMapLocations: null in your launch.json to instruct js debug to resolve sourcemaps seen anywhere. By default it'll try to only resolve sourcemaps for sources in your workspace folder and excluding node_modules.

I just added the default value for that (the one it filled in for me):
      "resolveSourceMapLocations": [
        "${workspaceFolder}/**",
        "!**/node_modules/**"
      ],

And it worked!
This is so cool.
Thanks @connor4312

For future reference, the source map above is what worked. It is missing sourceRoot which is commonly empty string ("") but that doesn't matter since the sources are absolute file URLs. I found this out in the spec which is why I'm sure it's not fragile.

For reference, Novo Cantico is the new TypeScript framework which you all helped to make extremely easy to use with VS Code's debugger by helping me figure out how to make vm-compiled functions work with VS Code via source maps. Thanks, and I'd be glad to hear what you think of this framework if any of you have a minute to spare :)


Session listings share paging index in event management

In event management, the page index appears to be shared across sessions. This means that if you page into a session with a large number of attendees and then view a session with small number of attendees, the small session shows 'no attendees' if in the large session you've paged beyond the number of pages in the small session.
Steps to reproduce:

Create an event with more than one session
In one session, add 21 or more attendees
In the other session, add >1 <= 20 attendees
Go to My Dojos -> Event -> Manage
Expand the session with 21 or more attendees and page to the second page
Expand the session with <20 attendees. Session shows 'no outstanding applications' because it has paged beyond the number of attendees in the event (i.e. viewing page 2 whereas the event has only 1 page of attendees).

Thanks for the very detailled report !
That's probably a scoping issue, we'll have a look into it :)


#118 - JAR doesn't always include both slashes

Fixes the issue where a JAR file is found but the protocol doesn't include both slashes

fix for issue #118

Pull Request Test Coverage Report for Build 262

3 of 3 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.003%) to 95.908%

Totals

Change from base Build 261:
0.003%

Covered Lines:
3070

Relevant Lines:
3201

💛  - Coveralls

@max-norris when you get a minute, can you review the tests I suggested?  Oshoukry is a stickler for testing.  And though the previous implementation has gaps in the testing of the jar handling, covering the use cases affected by the change will make it simpler to incorporate.

Will do, I'll get the tests added tonight.

@tcurrie Added a test with an example string that I was getting in my project.


elinks does not detect spidermonkey

Describe the bug
elinks, although built with spidermonkey / JavaScript support enabled, fails to detect spidermonkey during its configure phase.  This is not fatal to the configure phase, so the build continues without issue, resulting in elinks without javascript support
To Reproduce
Steps to reproduce the behavior:

nix-build -E 'with import <nixpkgs>{} ; elinks.override {enableSpidermonkey = true;}' -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz
This shows during build that Spidermonkey is enable via --with-spidermonkey=path:
configure flags: --prefix=/nix/store/8wdr9icpfb4l0nxln7j3m49n73p6n34j-elinks-0.12pre6 --enable-finger --enable-html-highlight --enable-gopher --enable-cgi --enable-bittorrent --enable-nntp --with-openssl=/nix/store/2xrn1gilw9b0wg8b5zcc6g1cdag17i6h-openssl-1.0.2t-dev --with-bzip2=/nix/store/r1wkf3yahalrl3387vkvmsjixk8cjkfx-bzip2-<IP_ADDRESS>.1-dev --with-perl --with-spidermonkey=/nix/store/nb3zhyv4nnv3axdsn69v9z4bwxc2pq4z-spidermonkey-38.8.0

But later ...
checking for SpiderMonkey (1.5 RC3a or later)... no
...
Feature summary:
...
ECMAScript (JavaScript) ......... no

./result/bin/elinks -version shows no JavaScript support; same from within elinks

Expected behavior
elinks should have JavaScript support enabled
Metadata
Output of nix run nixpkgs.nix-info -c nix-info -m (please note that nixpkgs below is not relevant; 19.09 release used):

system: "x86_64-linux"
host os: Linux 5.2.14, NixOS, 19.03.173481.8a30e242181 (Koi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.2.2
channels(musteresel): ""
channels(root): "nixos-19.03.173481.8a30e242181"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

https://github.com/NixOS/nixpkgs/commit/7ee6674ec3975ed46a92b5232b0c0f7830a46ef1 is not the cause of this; building with nixpkgs set to the parent commit yields the same result.  This seems to be broken since a long time ...

configure of that elinks version searches for libraries libjs.so, libsmjs.so or libmozjs.so.  The libraries of spidermonkey are named libmozjs185.so, or libmozjs-XX.so for later versions (38, 52, 60 are on my system).  Patching configure to use the correct lib and using Spidermonkey 1.8.5 again ...
--- elinks-0.12pre6/configure.bak	2019-10-13 09:31:10.457274914 +0200
+++ elinks-0.12pre6/configure	2019-10-13 10:42:20.228698733 +0200
@@ -18077,13 +18077,13 @@
 	if test ! -d "$withval"; then
 		withval="";
 	fi
-	for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do
-		for spidermonkeyinclude in "/include" "/include/js" "/include/smjs" "/include/mozjs"; do
-			for spidermonkeylib in js smjs mozjs; do
+	for spidermonkeydir in "$withval"; do
+		for spidermonkeyinclude in $spidermonkeydir/include/*js* ; do
+		    for spidermonkeylib in $spidermonkeydir/lib/libmozjs*.so; do
 				if test "$cf_result" = no &&
-				   test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h"; then
-					SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib -l$spidermonkeylib"
-					SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude"
+				        test -f "$spidermonkeyinclude/jsapi.h"; then
+					SPIDERMONKEY_LIBS=" $spidermonkeylib"
+					SPIDERMONKEY_CFLAGS="-I$spidermonkeyinclude"

 					LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
 					CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"

... fails then during built; with errors like ...
spidermonkey.c:113:27: error: unknown type name 'JSScript'; did you mean 'JSString'?

... and lots of warnings.
Other Spidermonkey versions (38, 52, 60) seem to have a different API; there the configure checks fail to compile their test programs.


Duplicate/overlap of IP on pods across different nodes

What happened:
Duplicate/overlap of IP on pods across different nodes
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/http-app-5947d79757-4gwd6 1/1 Running 0 20s <IP_ADDRESS> w2.k8s.local   pod/http-app-5947d79757-5ldqx 1/1 Running 0 20s <IP_ADDRESS> w2.k8s.local   pod/http-app-5947d79757-b7lwr 1/1 Running 0 4m11s <IP_ADDRESS> w1.k8s.local   pod/http-app-5947d79757-clswr 1/1 Running 0 20s <IP_ADDRESS> w2.k8s.local   pod/http-app-5947d79757-g79vk 1/1 Running 0 20s <IP_ADDRESS> w1.k8s.local   pod/http-app-5947d79757-g7z2t 1/1 Running 0 20s <IP_ADDRESS> w1.k8s.local   pod/http-app-5947d79757-l6qpb 1/1 Running 0 4m11s <IP_ADDRESS> w1.k8s.local   pod/http-app-5947d79757-ldh8b 1/1 Running 0 4m11s <IP_ADDRESS> w2.k8s.local   pod/http-app-5947d79757-lwmqq 1/1 Running 0 20s <IP_ADDRESS> w2.k8s.local   pod/http-app-5947d79757-wsqd2 1/1 Running 0 20s <IP_ADDRESS> w1.k8s.local
What you expected to happen:
Pods on different nodes should not have overlapping IPs
How to reproduce it (as minimally and precisely as possible):
Deploy the cluster on ubuntu 18.04
`# On Master
export API_ADDR="<IP_ADDRESS>"
export DNS_DOMAIN="k8s.local"
export POD_NET="<IP_ADDRESS>/16"
export SRV_NET="<IP_ADDRESS>/16"
kubeadm init --pod-network-cidr ${POD_NET} --service-cidr ${SRV_NET} --service-dns-domain "${DNS_DOMAIN}" --apiserver-advertise-address ${API_ADDR}
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=${POD_NET}"
#On Workers (2 Workers)
kubeadm join <IP_ADDRESS>:6443 --token --discovery-token-ca-cert-hash sha256:
`
Once the cluster is ready create a test deployment
kind: Deployment apiVersion: apps/v1 metadata: name: http-app namespace: test labels: name: http-app spec: replicas: 3 selector: matchLabels: name: http-app template: metadata: labels: name: http-app spec: terminationGracePeriodSeconds: 60 containers: - name: http-app image: katacoda/docker-http-server:latest
Anything else we need to know?:
Environment: 3VMs ubuntu 18.04 (1 master + 2 Workers)
Kubernetes version (use kubectl version): Client Version: v1.18.1 | Server Version: v1.18.1
Cloud provider or hardware configuration: 4cpu +4 Gb ram + 100G HDD
OS (e.g: cat /etc/os-release): Ubuntu 18.04.4 LTS (Bionic Beaver)
Kernel (e.g. uname -a): 4.15.0-96-generic
Install tools: kubeadm
Network plugin and version (if this is a network-related bug): Weave net
Others: Calico works fine
Logs:
Running Weave Pods
NAME              READY   STATUS    RESTARTS   AGE   IP           NODE                               NOMINATED NODE   READINESS GATES
weave-net-dmt77   2/2     Running   1          11h   <IP_ADDRESS>   master-node.k8s.local   <none>           <none>
weave-net-krb7c   2/2     Running   1          11h   <IP_ADDRESS>   w1.k8s.local            <none>           <none>
weave-net-ppvmn   2/2     Running   1          11h   <IP_ADDRESS>   w2.k8s.local            <none>           <none>

Logs of Pod on master
INFO: 2020/04/11 09:38:15.450678 ->[<IP_ADDRESS>:47541] connection accepted INFO: 2020/04/11 09:38:15.451216 ->[<IP_ADDRESS>:47541|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 09:38:15.451326 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 09:38:15.451470 ->[<IP_ADDRESS>:47541|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 09:47:08.858431 ->[<IP_ADDRESS>:49939] connection accepted INFO: 2020/04/11 09:47:08.859080 ->[<IP_ADDRESS>:49939|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 09:47:08.859195 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 09:47:08.859289 ->[<IP_ADDRESS>:49939|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 09:51:11.836319 ->[<IP_ADDRESS>:47963] connection accepted INFO: 2020/04/11 09:51:11.837113 ->[<IP_ADDRESS>:47963|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 09:51:11.837222 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 09:51:11.837293 ->[<IP_ADDRESS>:47963|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 09:57:00.570089 ->[<IP_ADDRESS>:58447] connection accepted INFO: 2020/04/11 09:57:00.570690 ->[<IP_ADDRESS>:58447|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 09:57:00.570842 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 09:57:00.570872 ->[<IP_ADDRESS>:58447|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 10:04:19.595463 ->[<IP_ADDRESS>:53187] connection accepted INFO: 2020/04/11 10:04:19.596120 ->[<IP_ADDRESS>:53187|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 10:04:19.596231 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 10:04:19.596347 ->[<IP_ADDRESS>:53187|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 10:12:02.827258 ->[<IP_ADDRESS>:60041] connection accepted INFO: 2020/04/11 10:12:02.827909 ->[<IP_ADDRESS>:60041|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 10:12:02.827970 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 10:12:02.827993 ->[<IP_ADDRESS>:60041|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 10:20:15.465463 ->[<IP_ADDRESS>:51247] connection accepted INFO: 2020/04/11 10:20:15.465951 ->[<IP_ADDRESS>:51247|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 10:20:15.465999 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 10:20:15.466039 ->[<IP_ADDRESS>:51247|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 10:28:48.032877 Discovered remote MAC 06:1a:e7:27:5d:64 at 3a:8a:4e:83:b9:2a(w2.k8s.local) INFO: 2020/04/11 10:29:15.092271 ->[<IP_ADDRESS>:42009] connection accepted INFO: 2020/04/11 10:29:15.092789 ->[<IP_ADDRESS>:42009|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 10:29:15.092932 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 10:29:15.093036 ->[<IP_ADDRESS>:42009|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 10:30:59.105836 Discovered remote MAC 12:ff:c5:d2:c5:22 at 3a:8a:4e:83:b9:2a(w2.k8s.local) INFO: 2020/04/11 10:32:40.976961 ->[<IP_ADDRESS>:38145] connection accepted INFO: 2020/04/11 10:32:40.977755 ->[<IP_ADDRESS>:38145|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection ready; using protocol version 2 INFO: 2020/04/11 10:32:40.977898 overlay_switch ->[3a:8a:4e:83:b9:2a(w2.k8s.local)] using fastdp INFO: 2020/04/11 10:32:40.977921 ->[<IP_ADDRESS>:38145|3a:8a:4e:83:b9:2a(w2.k8s.local)]: connection shutting down due to error: Multiple connections to 3a:8a:4e:83:b9:2a(w2.k8s.local) added to c6:94:4f:41:b9:42(master-node.k8s.local) INFO: 2020/04/11 10:33:10.178578 Discovered remote MAC 3a:8a:4e:83:b9:2a at 3a:8a:4e:83:b9:2a(w2.k8s.local)
Network:
$ ip route
master
default via <IP_ADDRESS> dev ens160 proto static <IP_ADDRESS>/16 dev weave proto kernel scope link src <IP_ADDRESS> <IP_ADDRESS>/24 dev ens160 proto kernel scope link src <IP_ADDRESS> <IP_ADDRESS>/16 dev docker0 proto kernel scope link src <IP_ADDRESS> linkdown
w1
default via <IP_ADDRESS> dev ens160 proto static <IP_ADDRESS>/16 dev weave proto kernel scope link src <IP_ADDRESS> <IP_ADDRESS>/24 dev ens160 proto kernel scope link src <IP_ADDRESS> <IP_ADDRESS>/16 dev docker0 proto kernel scope link src <IP_ADDRESS> linkdown
w2
default via <IP_ADDRESS> dev ens160 proto static <IP_ADDRESS>/16 dev weave proto kernel scope link src <IP_ADDRESS> <IP_ADDRESS>/24 dev ens160 proto kernel scope link src <IP_ADDRESS> <IP_ADDRESS>/16 dev docker0 proto kernel scope link src <IP_ADDRESS> linkdown
$ ip -4 -o addr
master
1: lo    inet <IP_ADDRESS>/8 scope host lo\       valid_lft forever preferred_lft forever 2: ens160    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global ens160\       valid_lft forever preferred_lft forever 3: docker0    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0\       valid_lft forever preferred_lft forever 6: weave    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global weave\       valid_lft forever preferred_lft forever
w1
1: lo    inet <IP_ADDRESS>/8 scope host lo\       valid_lft forever preferred_lft forever 2: ens160    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global ens160\       valid_lft forever preferred_lft forever 3: docker0    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0\       valid_lft forever preferred_lft forever 6: weave    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global weave\       valid_lft forever preferred_lft forever
w2
1: lo    inet <IP_ADDRESS>/8 scope host lo\       valid_lft forever preferred_lft forever 2: ens160    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global ens160\       valid_lft forever preferred_lft forever 3: docker0    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0\       valid_lft forever preferred_lft forever 6: weave    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global weave\       valid_lft forever preferred_lft forever

K8S allocated each node with a different /24 from the /16 CIDR however weave does not comply with this
`# kubectl get nodes master-node.k8s.local -o json |grep "10.4"
"v:"<IP_ADDRESS>/24"": {}
"podCIDR": "<IP_ADDRESS>/24",
"<IP_ADDRESS>/24"
kubectl get nodes w1.k8s.local -o json |grep "10.4"
                        "v:\"<IP_ADDRESS>/24\"": {}
    "podCIDR": "<IP_ADDRESS>/24",
        "<IP_ADDRESS>/24"

kubectl get nodes w2.k8s.local -o json |grep "10.4"
                        "v:\"<IP_ADDRESS>/24\"": {}
    "podCIDR": "<IP_ADDRESS>/24",
        "<IP_ADDRESS>/24"

`
Weave issues duplicate/ overlapping IPs to pods on differnet nodes.

Found the solution!!
I had cloned the VMs for some reason the interface mac did not change for W1 and W2
Even after changing the interface mac and rebuilding the cluster, there was no difference in behaviour and weave interface on W1 and W2 had the same mac.
checked /etc/machine-id on all nodes and it was same.
deleted the machine-id files
truncate -s 0 /etc/machine-id rm /var/lib/dbus/machine-id init 6
rebooted all nodes & rebuild the cluster.
Boom its working. Cloning did not do the clean-up.


feat: configurable history directory

Users should be able to set up a custom history directory.
Also fix #17

Rather than making it user-configurable, why don't we implement a more disruptive update (since we're still in early versions) by moving the history directory to the $HOME directory and recording the absolute path? What do you think?

Says that we have a project under $HOME/coding/proj1, the history will be saved to $HOME/.avante_history/$HOME/coding/proj1? Or $HOME/.avante_history/coding/proj1? Or $HOME/.avante_history/proj1?

For example, my chat history in /Users/yetone/workspace/projects/test/foo/bar.go will be saved in $HOME/.avante_history/chat/Users__yetone__workspace__projects__test__foo__bar.go.json

However, according to @aarnphm's suggestion, we should use shada to store the history. I'm concerned that future refactoring might disrupt your current efforts. Are you interested in doing this refactoring?

Nevermind. I'll close this PR. Since using shade is better IMO.


How to use it with custom keyboards?

https://grammy.dev/plugins/keyboard.html#responding-to-clicks-1
https://grammy.dev/plugins/i18n.html#listening-for-localized-text


Output model files compatible with Official Bert's pre-trained models?

Hi, I tried to pre-train a Bert model with this project. I find the output of the model is not compatible with the official Bert's pre-trained model. Is it easy to make it compatible?
For example, I can use pytorch_transformers to read the official Bert's pre-trained models, but when I do this same for the model trained by this project, I get some errors about some shape sizes are not the same.
	size mismatch for bert.encoder.layer.0.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).
	size mismatch for bert.encoder.layer.0.output.dense.weight: copying a param with shape torch.Size([256, 128]) from checkpoint, the shape in current model is torch.Size([128, 256]).
	size mismatch for bert.encoder.layer.1.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).
	size mismatch for bert.encoder.layer.1.output.dense.weight: copying a param with shape torch.Size([256, 128]) from checkpoint, the shape in current model is torch.Size([128, 256]).
	size mismatch for bert.encoder.layer.2.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).
	size mismatch for bert.encoder.layer.2.output.dense.weight: copying a param with shape torch.Size([256, 128]) from checkpoint, the shape in current model is torch.Size([128, 256]).
	size mismatch for bert.encoder.layer.3.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).
	size mismatch for bert.encoder.layer.3.output.dense.weight: copying a param with shape torch.Size([256, 128]) from checkpoint, the shape in current model is torch.Size([128, 256]).
	size mismatch for bert.encoder.layer.4.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).
	size mismatch for bert.encoder.layer.4.output.dense.weight: copying a param with shape torch.Size([256, 128]) from checkpoint, the shape in current model is torch.Size([128, 256]).
	size mismatch for bert.encoder.layer.5.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).
	size mismatch for bert.encoder.layer.5.output.dense.weight: copying a param with shape torch.Size([256, 128]) from checkpoint, the shape in current model is torch.Size([128, 256]).```

try delete this line.

or try https://github.com/guotong1988/BERT-multi-gpu/blob/master/run_pretraining_gpu_v2.py

Hi @guotong1988 thanks for the reply. Actually I'm using the the run_pretraining_gpu_v2.py script from the beginning.

Could you find the error tensor corresponding to the code?

Hi @guotong1988 I don't know how to find the error tensor...
The above error was from this code (if it helps):

/usr/local/lib/python3.6/dist-packages/pytorch_transformers/modeling_utils.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    592         if len(error_msgs) > 0:
    593             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
--> 594                                model.__class__.__name__, "\n\t".join(error_msgs)))
    595
    596         if hasattr(model, 'tie_weights'):

RuntimeError: Error(s) in loading state_dict for BertForMultiLabelSequenceClassification:
	size mismatch for bert.encoder.layer.0.intermediate.dense.weight: copying a param with shape torch.Size([128, 256]) from checkpoint, the shape in current model is torch.Size([256, 128]).

try https://github.com/guotong1988/BERT-multi-gpu/blob/master/modeling_lastest.py
I copy it from https://github.com/google-research/bert

Hi, I assume you mean to change the run_pretraining_gpu_v2.py script by changing
the line
import modeling
to
import modeling_lastest as modeling
I'll have a try and let you know.

Yes

Hi @guotong1988 It works.
Thanks so much!


Replace SyntaxHighlighter

highlight.js might be a more extensive replacement for SyntaxHighlighter.
(Sort of a follow-up to #303)

This is cool, but not really a priority right now. Will file away in memory.


Merge embedded omnisidb engine into modin branch

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Linux Ubuntu 18.04
Python version:
Python 3.7.6

All changes related to embedded omnisidb engine should be merged into modin branch.

DBE has been added in PR: https://github.com/intel-go/omniscidb/pull/32


Can I use this with javascript without framework

As the title, can I use this library without framework? I don't find where the cdn is

Hi,
The library was never intended to be used without being installed from npm.
Given your question, I have tried to see if it would work anyway, and it almost did. In theory, if all dependencies of this library were ECMA script modules I think it would have worked. But unfortunately it seems like at least xmldom (which is a dependency of this package) does not support this way of running it.
So bottom line, you must install the package from npm in order to use it.
Just for reference, here is what I've tried:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Test Page</title>

Test Page

And the error shown in the console:
Uncaught SyntaxError: The requested module '@xmldom/xmldom' does not provide an export named 'DOMParser'


Feature Request: Send E-Mail Endpoint

Thank you very much for your work on PocketBase. Saw it in a Video and gave it a shot.
I tried to replace one of my backends with PocketBase and the only roadblock I face is that I need to be able to send E-Mails from my backend. Since all the E-Mail Settings are already there, I hope this might be doable.
2 Possibilities come to my mind.

It would be enough if there is an endpoint where I would have to pass everything. (Subject, Recipients, Body)
I am able to define templates like it's already there for "Verification", "Password reset", and "Confirm email change") and only provide the Recipients and the Template I would like to use.

Currently you can send custom emails only if you extend PocketBase, eg.:
app.NewMailClient().Send(&mailer.Message{
    From<EMAIL_ADDRESS>    To<EMAIL_ADDRESS>    Subject: "Demo 123",
    HTML: "...",
})

(I'll add it to the documentation sometime later this week)
Sending and configuring custom emails from the UI currently is not possible but eventually will be handled as part of the Collection triggers #317 issue.

I'd love to see this without having to extend PocketBase. Would it be possible to send mails via the JS SDK?
Thank you for your work - PocketBase looks truly outstanding.

@ikmolbo

Would it be possible to send mails via the JS SDK?

No, for now this is not planned. Even if it is added it will require to authenticate as admin, meaning that you'll have to execute it server-side anyway (as part of the PocketBase instance, in a node handler, etc.).
Option to bind to the app hooks with JS will be available in the near future (similar to the recent JS migrations support), or in other words, sending custom emails with JS hook will look something like this:
app.newMailClient().send(new EmailMessage({
    from<EMAIL_ADDRESS>    to<EMAIL_ADDRESS>    subject: "Demo 123",
    html: "...",
}))


Lonewolf: Let the user choose how to sort the standings

The default sort order would include late-join-points, and an alternative order would be the actual score. We could also consider merging the standings and wallchart views somehow.

this was merged a while ago.


error in get_current_apk_id

fastlane-plugin-amazon_app_submission-0.3.0/lib/fastlane/plugin/amazon_app_submission/helper/amazon_app_submission_helper.rb:88:in get_current_apk_id': [!] undefined method []' for nil:NilClass (NoMethodError)

https://github.com/ugroupmedia/fastlane-plugin-amazon-app-store-submission/blob/f0566795c798aead559fa7f7454548d7c71163f8/lib/fastlane/plugin/amazon_app_submission/helper/amazon_app_submission_helper.rb#L87-L89
do I need to create an upcoming version in the amazon portal manually first?

I printed the response body and see this:
[22:44:14]: The amazon_app_submission plugin is working!
[22:44:14]: Fetching app access token
[22:44:14]: Getting current edit
[22:44:15]: Current edit not found, creating a new edit
[22:44:15]: Get current apk id
{"Message"=>"Unable to fetch the request scope for uri = /appstore/v1/applications/amzn1.devportal.mobileapp.xxx/edits//apks and verb = GET"}

It seems that edit_id is blank, so creating a new edit maybe not working?

I had newlines in my client id/secret which was causing this issue.
Nonetheless, I made some improvements to make it more clear what is failing in #12, which showed:

helper/amazon_app_submission_helper.rb:46:in `create_new_edit': \e[31m[!] {"Message":"Request is not authorized."}\e[0m (RuntimeError)


[Container instances][Correct way for redeploy new image]

Hello,
I would like to know the correct way to redeploy image to container instance, like continues delivery.
.
 But maybe is there some correct way to do that.
Thank you for any information about it.

UPD
According to this topic, when i try to follow that suggestions (Using only az create ... for update container instance).
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-update#
I often get the next error:
2019-03-28T19:10:29.8480051Z ERROR: The container group 'ts-my-stage' is still transitioning, please retry later.
2019-03-28T19:10:29.9128763Z [command]/usr/local/bin/az account clear
2019-03-28T19:10:30.4882205Z ##[error]Script failed with error: Error: /bin/bash failed with return code: 1

Any suggestion for avoid it?

Really, this command group should support an actual update command (not a "re-run create to update" command) and it should have a wait command. Since it has neither, you would just need to retry periodically.

Our team does not own the az container commands, so it would be at the container instance team's discretion where this fits on their backlog. That being said, if someone were to submit a PR to add this functionality, I would happily approve it.

@Sviatik Apologies for the late reply. In order to update the newer image version of the containers in a running container group you can redeploy to an existing group with at least one modified property. Also note that when you redeploy an existing container group, its container image layers are pulled from those cached by the previous deployment. Instead of pulling all image layers fresh from the registry as is done with new deployments, only modified layers (if any) are pulled.
More info is here and here. You can also refer this article if you want to integrate ACI with Github actions and Devops for CI/CD. Please let us know if you have any queries on this. We would be happy to assist.


[Polish] Smarter time handling in TripPlanForm

If the user selects a custom time in the past, kick them forward a day, and inform them in a dialog. Allow the user to check a "don't tell me again" option.

Addressed by 7923ab458b8c821f664bb3cecdfc636d817d6fab.


2.1.0

[x] support macOS since 10.15
[ ] more flags for SwiftLayoutPrinter
[ ] suffix for SwiftLayout like sl? or something (this needs discussion) #156class View: UIView, Layoutable {
  func someFunction() {
    self.sl.layout() // new
    self.updateLayout() // deprecation
  }
}

@gmlwhdtjd do you have any progressing or expecting features?

If more flags are going to be added than now, it would be better to consider using OptionSet.

If more flags are going to be added than now, it would be better to consider using OptionSet.

very agree


PCL compilation issue

Hi,
I was compiling LeGO-LOAM and the following error show up:
 *** No rule to make target '/usr/local/lib/libpcl_common.so', needed by '/home/bruno/catkin_ws/devel/lib/lego_loam/featureAssociation'. Stop.
CMakeFiles/Makefile2:5390: recipe for target 'LeGO-LOAM/LeGO-LOAM/CMakeFiles/featureAssociation.dir/all' failed
make[1]: *** [LeGO-LOAM/LeGO-LOAM/CM

My pcl version is 1.7. Is that an issue?
Regards,
Bruno

I just solved by copying the libpcl_common.so to "/usr/local/lib".


Export graph

closes https://github.com/bp-bahn-order/soro-s/issues/21

[x] Do pipelines pass?

[x] No uncalled functions?

[x] No development leftovers?

[x] Can any functions be replaced with library functions?

[x] Can (duplicated) code be factored out to new functions?

[x] Efficient storage?

[x] Constants for magic numbers?

[x] Are no functions overly complex?

[x] Is code commented?

[x] Are the comments consistent?

[x] Are variables

[x] Well named?
[x] Properly typed, including constness?
[x] Non-redundant?

[x] Are bounds checked?

[x] Are inputs/arguments validated?

[x] Are all outputs written?

[ x Are all allocated things de-allocated again?


DMFEnableAllCompanyExport

For BYODB this one doesnt work since it do not work when you run it as a batchjob. If run manually it exports data for all companies but when it is run as a batchjob it only xports data from the company that you set up the batch job for

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

ID: 2c6788e8-dfb0-6108-71ae-e265bad542a2
Version Independent ID: 68a26703-3d8c-4d46-6f3f-37c30aa79373
Content: Data management - Finance & Operations | Dynamics 365 | #MSDyn365FO
Content Source: articles/dev-itpro/data-entities/data-entities-data-packages.md
Service: dynamics-ax-platform
GitHub Login: @Sunil-Garg
Microsoft Alias: sunilg

@Ake-Olsson, thanks for posting this.
@Sunil-Garg, please review and update the topic, as needed.

@Ake-Olson, can you try in the latest platform pls? We don't see this issue happening. If this is still an issue in your environment then, please open a support case. Thanks.


[FR]  Support Custom CSS for PDF Background Color Adjustment

Describe your request
Hi RyotaUshio,
I appreciate all the hard work that has gone into this project; it’s incredibly useful.
I would like to request support for customizing the PDF background color using custom CSS. I often read PDFs for extended periods, and having the ability to change the background color would greatly improve the reading experience by reducing eye strain.
What I’ve Tried: I attempted to change the background color by adding custom CSS, specifically by modifying .pdf-container .pdf-plus-select-box or similar classes. However, these changes did not take effect. I’m wondering if there might be restrictions or overrides that prevent custom background colors from being applied.
Feature Request: Would it be possible to enable support for custom CSS to modify the PDF background color? This would allow users to set a background color that’s easier on the eyes, which is particularly helpful for long reading sessions.
The final result is shown in the figure

the img from this link:  https://forum-zh.obsidian.md/t/topic/38211/8
Thank you for considering this request, and for all your efforts on this project!

Thanks!
You can turn the background red (this is just an example) by adding the following CSS snippet and enable the "Adapt to theme" toggle. This will work whether PDF++ is enabled or not.
body {
    --pdf-page-background: red;
}

but it's not work for me .

Have you enabled "adapt to theme"? What if you relaunch Obsidian?

When i enabled "adapt to theme" and relaunch Obsidian,  There's always something that doesn't work.

(<> It's a test pdf file exported from obsidian. )

What exactly isn't working? As far as I can tell from your image, it seems to be working properly.

The problem is the black in the center. it's not red.


Fix resolution scaling by removing force_original_aspect_ratio

Fixes #2297
Ideally, we would use force_divisible_by=2, but that option requires a fairly new ffmpeg version and we don't want to bump the ffmpeg version requirement in a minor Opencast update. For example, Ubuntu 20.04 default repositories contain a version that's too old.
All the resize operations will still maintain the aspect ratio due to the -2 as the height term. See the linked issue for why the force_original_aspect_ratio is not required.
Your pull request should…

[ ] have a concise title
[ ] close an accompanying issue if one exists
[ ] be against the correct branch (features can only go into develop)
[ ] include migration scripts and documentation, if appropriate
[ ] pass automated tests
[ ] have a clean commit history
[ ] have proper commit messages (title and body) for all commits

Since one month has passed and this looks reasonable, I'm gonna go ahead and merge this. :D


IDE confusion around functions calling each other?

If modal function fn_a calls modal function fn_b, and fn_b also calls fn_a, pyright gets confused!

The screenshot is from what I think is a MWE of this bug:
import modal

app = modal.App()

@app.function()
def fn_a(call_b: bool = True):
    if call_b:
        fn_b.remote()
    return

@app.function()
def fn_b():
    fn_a.remote(call_b=False)

@app.local_entrypoint()
def main():
    fn_a.remote()

The program above ia valid and runs fine, but my IDE is having a problem with something. The issue is cryptic - fn_a.remote appears to the IDE to be undefined - but only when both functions call each other! If the functions don't both call each other, either one can call either one with .remote with no issues.
Using VS Code, Python 3.12.

Python typing expert @freider – any idea what's going on?

I just tested it, and adding -> None return type annotations seems to fix the issue! :)

@freider annotating one of the functions as -> X did indeed fix the bug, both in the toy example and in my actual problem code.
This was very weird and pretty hard to pin down. Thanks for validating and responding so quickly! 🙏 @erikbern @freider
FWIW I only experienced this with Python 3.12, I switched my IDE to 3.11 and did not have this problem (though can't just switch my project ofc). Probably not worth leaving an issue on the Pyright repo or the Pylance repo since I can't come up with a MWE without using modal.App.function-decorated functions.


Bug/delete network

Description
For delete network, only assert there is only one "operational" logical port as opposed to just one logical port
Related PR and Issues
Fixes #166
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

@EleanorRigby I squashed the PR into one commit


Counter Example found for Arithmetic Laws

The tool says the checked in example ArithmeticLaws.mch is not correct (after the initialisation x=-3, y=-3, z=-3).

I fixed a part of the problem by simplifying the translation of BOOL and INTEGER. However, the issue of the solver returning UNKNOWN remains.

It might be a good Idea to enable ModelCheckingResult to reflect check-sat = unknown

testIssue59JustInvariant() leads to following solver stack (which produces check-sat = unknown):
(declare-fun x () Int)
(assert
    (let
        ((a!1
            (exists ((x Int))
                (let
                    ((a!1
                        ((as union (Array Int Bool))
                              (store ((as const (Array Int Bool)) false) x true)
                              (store (store ((as const (Array Int Bool)) false) 1 true) 2 true)
                        )
                    ))
                    (= a!1 (store (store ((as const (Array Int Bool)) false) 1 true) 2 true)
                    )
                )
            )
        ))
        (and (= (^ x 2) (* x x)) a!1)
    )
)
(check-sat)```

simplified version still produces check-sat = unknown in z3:
; prepare set = {1,2}
(declare-const set (Array Int Bool))
(assert (= set (store (store ((as const (Array Int Bool)) false) 1 true) 2 true)))
; prepare x
(declare-fun x () Int)
(assert (= (^ x 2) (* x x)))
; assert existence of y with y U set = set
(assert
  (exists ((y Int))
    (let
      ((setUnion
          ((as union (Array Int Bool))
                (store ((as const (Array Int Bool)) false) y true)
                set
          )
      ))
      (= setUnion set
      )
    )
  )
)
(check-sat)

if we remove the line (assert (= (^ x 2) (* x x))) it's satisfiable again...

maybe exponentiation is the weakness here? we could think about rewriting to multiplication if the exponent in a constant. What's the result if we add (assert (= (* x x) (* x x))) instead of (assert (= (^ x 2) (* x x)))?

Strangely the following code produces also check-sat = unknonwn
(declare-fun x () Int)
(assert (= (^ x 2) (* x x)))
(check-sat)

Apparently, support for non-linear integer arithmetic is not great in Z3:
http://stackoverflow.com/questions/13898175/how-does-z3-handle-non-linear-integer-arithmetic/13898524#13898524
I really think we should investigate whether we could set up a special case for translation of exponentiation if the exponent is a constant. So far, I do not see another option (aside of using several backends).
However, I am not sure how translation / rewrite rules should be applied on top of our parser. Maybe there is a better way than to introduce a special case in the translation. Maybe @dohan has an idea?

Is using (check-sat-using qfnra-nlsat) an option?

Doesn't solve our problem anyways... It just solves
(declare-const x Int)
(assert (= (^ x 2) 16))
(check-sat-using qfnra-nlsat)

We can not fix this issue now as z3 seems to be unable to recognize satisfiability for the combination of (^ x y) and the quantifier formula. Will open new issue for backlog...

development continues in #67


UCP: Migrate scalar function Right from TiDB

Description
Port the scalar function Right from TiDB to coprocessor.
Score

50

Mentor(s)

@lonng

Recommended Skills

Rust programming

Learning Materials
Already implemented expressions ported from TiDB

https://github.com/tikv/tikv/tree/master/components/tidb_query/src/rpn_expr)
https://github.com/tikv/tikv/tree/master/components/tidb_query/src/expr)

@lonng I found this in the codebase ScalarFuncSig::Right => right_fn_meta(), has this already been implemented? should this issue be closed?

Closed via #6499


My page framework overflow after upgrade to 2.1.0

The search box and darkmode toggle buttom:

the footer(can be fix by disable position: fixed):

BUT, it work well in mobile view:

And it was look like this:

Do I miss some configuration?
:/

Header:

    $navpath

$generatedby  $doxygenversion

<address class="footer">
$generatedby  $doxygenversion
</address>

I'm sorry for not responding about your problem yet. I will investigate this asap!

update: v2.0.3 work for me

I was able to reproduce a similar artifact like yours when changing the order of the CSS-files given to HTML_EXTRA_STYLESHEET. Make sure that doxygen-awesome.css is the first file referenced!
HTML_EXTRA_STYLESHEET  = doxygen-awesome.css \
                         doxygen-awesome-sidebar-only.css # <--- make sure this comes second!

Pls let me know if this fixes your problem.
Another thing that I noticed: Make sure to remove the old toggle initialization logic in your footer.html. Rn it looks like you initialize the dark mode toggle twice.

I was able to reproduce a similar artifact like yours when changing the order of the CSS-files given to HTML_EXTRA_STYLESHEET in the Doxyfile. Make sure that doxygen-awesome.css is the first file referenced!
HTML_EXTRA_STYLESHEET  = doxygen-awesome.css \
                         doxygen-awesome-sidebar-only.css # <--- make sure this comes second!

Pls let me know if this fixes your problem.
Another thing that I noticed: Make sure to remove the old toggle initialization logic in your footer.html. Rn it looks like you initialize the dark mode toggle twice.

thx, I believe all things work properly now.
except this button.

Thx for providing the link! It's always nice to see the theme in action! 😊
What's the problem with the button? It's actually supposed to be there, lgtm.

Thx for providing the link! It's always nice to see the theme in action! 😊 What's the problem with the button? It's actually supposed to be there, lgtm.

After I click that button, nothing change in the page. Do it suppose to do something? XD

Oh I see what that button suppose to do. And it work properly.


Prevent concurrent integration tests in CI build

🔧 Changes
Unfortunately if multiple CI builds are running in parallel they will all perform tests against the same tenant, causing each other to fail expectations. We're only allowing 1 build at a time with this change to prevent such issues, until perhaps in the feature we mock the integration tests.

📚 References

🔬 Testing

📝 Checklist

[x] All new/changed/fixed functionality is covered by tests (or N/A)
[x] I have added documentation for all new/changed functionality (or N/A)

It was sadly competing with another build 🌵


x11: don't wait for window to be mapped

This fixes situations when you want to wait until the game has finished loading before you map the window.

CC @punto- @Hinsbart


Added a reference to an application using Druid

This is my work in progress project to build a modular sound synthesizer using Druid for the UI.

@ForLoveOfCats thanks for your heads up. I already addressed your comments.


Question 76

Congrats on the questions, but I think you made an error on question 76.
Probably because you were in an iframe or something and had the window.name property.
The correct answer is D since it's returning a ReferenceError.
Maybe you could change the property to something different.
const { myName: otherName } = { myName: 'Lydia' };

console.log(myName); // Uncaught ReferenceError: myName is not defined

Hi. There's another issue about this here: #622
There are also several open PRs for this:
#698
#686
#670
#628
I am not involved with this project, so can't tell you any more than the above.

Thanks, then I'll be closing this.


Using shadow pattern for stats workers

lg, but I do wonder if this will get expensive as a lot of participants join/leave.. each time it involves copying the entire map.
perhaps it's negligible, but would be great to understand the impact.

Yeah. Not sure how expensive it is to copy a map. Did this for sake of consistency in pattern. Can revert it back and just use the older method.


Rename-Many add Drop param

Allows static text replacement of the Pattern in a Move operation. Should be able to replace multiple Pattern matches with the Drop static text.

There are implemetation problems with this issue:

This should be implemented such that the Anchor and Copy patterns should be applied to patternRemoved which will not include any indication of where the pattern was. The returned match object, will tell us this but that relates to the original source only.
If we create an alternative string dropped with the pattern replaced by the Drop, then how is that fork reconciled with patternRemved. If we apply the Anchor and and Copy to drooped, then they may be affected by what has been inserted by Drop making the tool more confusing and un-useable. I did think about inserting a text marker but this would not help as the marker could still interfere with Anchor and Copy.

... but as I write this, I may have found a solution. We could insert an extended ascii character that would not interfere with Anchor and Copy (see using powershell to replace extended ascii character in a text file and theasciicode.

WARNING when replacing characters in a string the [string]::replace method is ineffective with [char]:
[char]$holder = 0x20DE
$anothers.replace($holder, ':)')
MethodException: Cannot convert argument "newChar", with value: ":)", for "Replace" to type "System.Char": "Cannot convert value ":)" to type "System.Char". Error: "String must be exactly one character long.""

You should use the replace operator instead:
λ $anothers -replace $([char]0x20DE), ':)'
foxy ':)' business:)

or
[char]$holder = 0x20DE
$anothers = "foxy '{0}' business" -f $holder
$anothers -replace $holder, ':)'
foxy ':)' business:)

Usining a double cast fixes the problem:
      It 'should: replace only single with marker' {
        [regex]$patternRegEx = [regex]::new($pattern);
        [string][char]$marker = 0x20DE; # <--- DOUBLE CAST

        [string]$result = $patternRegEx.Replace($source, $marker, 1, 0);

        Write-Host ">>> MARKER (double-cast-single), original: '$source'";
        Write-Host ">>> MARKER (double-cast-single), result: '$result'";
      }

and note, you might think, well why don't we just define $marker as a string? Doing that just defines marker as the literal interpretation of 0x20DE, which is '8414', which is not what we want, so double cast is necessary. Invoking Replace with a [char] parameter just invokes the wroing overload and then fails.

Parameter splatting breaks if the target function has ValudationScript for its parameters:
Given:
function Get-InverseSubString {
  param(
    [Parameter(Position = 0, Mandatory)]
    [string]$Source,

    [Parameter()]
    [ValidateScript( { $_ -lt $Source.Length })]
    [int]$StartIndex = 0,

    [Parameter()]
    [ValidateScript( { $_ -le ($Source.Length - $StartIndex ) })]
    [int]$Length = 0,

    [Parameter()]
    [switch]$Split,

    [Parameter()]
    [char]$Marker
  )

Invoking Get-InverseSubString can't be invoked via a splat:
      [System.Collections.Hashtable]$parameters = @{
        'Source' = $Source;
        'StartIndex' = $m.Index;
        'Length'     = $m.Length;
      }
      [string]$remainder = Get-InverseSubString @parameters;

results in:
 TerminateException: System error.
 ParameterBindingValidationException: Cannot validate argument on parameter 'Length'. System error.
 at Split-Match, C:\Users\Plastikfan\dev\github\PoSh\Loopz\Elizium.Loopz\Output\Elizium.Loopz\Elizium.Loopz.psm1:3148
 at <ScriptBlock>, C:\Users\Plastikfan\dev\github\PoSh\Loopz\Elizium.Loopz\Tests\Public\Split-Match.tests.ps1:26

Just raised this PowerShell issue: Cross field parameter validation fails when invoked by splatted parameters