Don't index course pages individually

Considering #686 and the issues when searching for courses, we should have a view for the course itself that contains the content for all pages. Links to individual course pages should instead go to the root course (w/ JavaScript only showing the relevant page; see also https://support.google.com/webmasters/answer/66353?hl=en). This should solve all the issues (indexing courses, duplicated content). The only thing we lose with this (and let's discuss if that's a problem and if we could get around that), is that you can't get directly to an individual course page from the search (you would instead get to the beginning of the course). IMHO: this is fine since you'd usually won't start in the middle of the course, anyways.

Actually, it was a request, that the course page search results redirect to the beginning of the course. Because you should go through a course from the beginning.
On the other hand, I don't really like that the user searches for something and then gets to a side, where that isn't visible directly... I would check with Ctrl + F and then leave^^
What about the loading time of such a huge page (espacially on mobile)? Do you think that could be a problem?

IMHO: loading time shouldn't be much different from articles (it's mostly text anyways). We might be able to defer loading of images, but I don't think that it is really an issue

Could be an issue on mobile, though, right?

Might. Not sure how many courses we do have that are image-heavy. Btw: Cloudflare is already doing some optimizations, so maybe we don't have to do much in this regard.


docs: fix typo on hooks.md

Informations

Type
Breaking change

Feature/Fix/Doc/Chore
Yes/No

Description
A few sentences describing the overall goals of the pull request's commits.
Usage example
Example to use your feature and to improve the documentation after merging your PR:
import {} from "@tsed/common";

Todos

[ ] Tests
[ ] Coverage
[ ] Example
[ ] Documentation

:tada: This PR is included in version 5.57.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Building v5.2.1 fails on itkDCMTKImageIO.cxx

Description
I get a build failure saying some types are not defined (output below).  It seems that the file ITK-build/Wrapping/itkDCMTKImageIO.cxx generated by the wrapping system is missing some includes. It seems the includes are missing from here: https://github.com/InsightSoftwareConsortium/ITK/blob/047fa6934ac32711d1d7b84fa6eb81c72db01960/Modules/IO/DCMTK/wrapping/itkDCMTKImageIO.wrap
The missing includes seem to be itkDCMTKImageIOFactory.h and itkDCMTKSeriesFileNames.h.
Steps to Reproduce
Attempt to build the SimpleElastix super build, which clones and builds ITK.
Expected behavior
The build completes without error.
Actual behavior
My build produces the following error:
Scanning dependencies of target ITKIODCMTKCastXML
[ 88%] Generating ../../itkDCMTKImageIO.xml
/workspaces/rapid-angio-2/SimpleElastix/build4/ITK-build/Wrapping/itkDCMTKImageIO.cxx:31:18: error: no type named 'DCMTKImageIOFactory' in namespace 'itk'
    typedef itk::DCMTKImageIOFactory itkDCMTKImageIOFactory;
            ~~~~~^
/workspaces/rapid-angio-2/SimpleElastix/build4/ITK-build/Wrapping/itkDCMTKImageIO.cxx:32:18: error: no member named 'DCMTKImageIOFactory' in namespace 'itk'
    typedef itk::DCMTKImageIOFactory::Pointer itkDCMTKImageIOFactory_Pointer;
            ~~~~~^
/workspaces/rapid-angio-2/SimpleElastix/build4/ITK-build/Wrapping/itkDCMTKImageIO.cxx:34:18: error: no type named 'DCMTKSeriesFileNames' in namespace 'itk'
    typedef itk::DCMTKSeriesFileNames itkDCMTKSeriesFileNames;
            ~~~~~^
/workspaces/rapid-angio-2/SimpleElastix/build4/ITK-build/Wrapping/itkDCMTKImageIO.cxx:35:18: error: no member named 'DCMTKSeriesFileNames' in namespace 'itk'
    typedef itk::DCMTKSeriesFileNames::Pointer itkDCMTKSeriesFileNames_Pointer;
            ~~~~~^
4 errors generated.
make[5]: *** [Wrapping/Modules/ITKIODCMTK/CMakeFiles/ITKIODCMTKCastXML.dir/build.make:82: Wrapping/itkDCMTKImageIO.xml] Error 1

Reproducibility
100%
Versions
v5.2.1
Environment
I'm building under an anaconda environment in a centos7 docker container.  I am building as part of the superbuild for simpleelastix.  I set the ITK git tag to v5.2.1.  I'm using the compilers package from conda-forge.
Additional Information

Two more bits of info:

Someone else seems to have hit this issue: https://discourse.slicer.org/t/build-error-when-building-itkpython/15302
Modifying the file I linked above (https://github.com/InsightSoftwareConsortium/ITK/blob/047fa6934ac32711d1d7b84fa6eb81c72db01960/Modules/IO/DCMTK/wrapping/itkDCMTKImageIO.wrap) to add the missing includes has allowed the build to progress beyond that point for me.  The build is still in progress now.

Can you please submit a PR?

Can you please submit a PR?

Done.  See #2764


feat: Add Zapier docs

This can replace old help article.

@valekjo is off, added @fnesveda

@davidjohnbarton updated it and send it over. You can check @fnesveda


proposal: multipart/writer: refactor virtual writer to support upload large files(4G+) without consume lots of memory

Proposal Details
As I know, current multipart/writer can not support upload large files , it need copy all file content to memory.
So I write a virtual writer , it can delayed read file contents until real upload, I use it to upload multi large files(4G+) with multi part protocol.
Refer : https://github.com/fishjam/go-library/blob/main/mime/multipart/virtual_writer.go
and there is UT(demo) in https://github.com/fishjam/go-library/blob/main/mime/multipart/virtual_writer_test.go
Now I want create PR  for it. but I don't know how to refactor it, because the API Function is incompatible. example:

multipart/writer : func (w *Writer) CreateFormFile(fieldname, filename string) (io.Writer, error)
my/virtualwriter : func (vw *VirtualWriter) CreateFormFile(fieldName, filePath string) error

2 Solutions:

refactor current multipart/writer without consider the api incompatible
add new VirtualWriter

which is better? when confirm, I will try add PR. or you can refactor it yourself according my code.

I don't see anything about the current multipart writer buffers everything in memory?

I don't see anything about the current multipart writer buffers everything in memory?

please refer this:
https://github.com/golang/go/blob/99e12bee441ac82f53bbb0e5cf2fdad716aba5a6/src/net/http/request_test.go#L309-L314
in the test code, just write hard code Repeat([]byte("abc"), payloadSize) , but usually, user will Open "myfile.txt" file and use io.Copy(mf, file) function to copy all file's content into the Writer.  what will happen if myfile.txt is very big(example: 4G+)?
Of course, user can use some avoidance measures , example: io.Pipe. after test, it can work, but it maybe not best solution.

2 Solutions:
refactor current multipart/writer without consider the api incompatible
add new VirtualWriter

See https://go.dev/doc/go1compat go1 does not make incompatible API change.

See https://go.dev/doc/go1compat go1 does not make incompatible API change.

Got it, then I will consider add virtual_writer.go and create the PR.

as noted by the CreateFormFile documentation, it is just a convenience wrapper around CreatePart, which provides an io.Writer for streaming.

you don't need an entirely new Writer implementation for this

it's hard to meet the following two conditions at the same time:

1.remain  API compatible

don't add new Writer implementation

So I refactor my virtual_writer.go , and I think user can use it to upload large files easily. I will not create the PR for it. I will close this issue.
But if you need , you can modify Writer in golang by yourself.


Stormcloak Rogue needs to be removed or race changed/Stormcloak scout issues

Note: Full disclosure i am on level 100
Stormcloak rogue is an Argornian, this would never happen

Human rogue that sometimes appears:

Additionally i have seen this cursed abomination from time to time (Stormcloak scout)

Handling under #51


Fail to register custom connector on Flow

Hi, I'm stuck at registering my custom connector. I always receive "The reply url specified in the request does not match the reply urls configured for the application". I am sure I have put the correct reply url as indicated in step 6 Azure AD in INSTALL.md. Any idea why?

Hi Ehandani,
I was running into this problem as well and found that I had to use the Redirect URL that is on the Security tab of the custom Microsoft Flow Connector (https://global.consent.azure-apim.net/redirect) and copy that and to add it as a Web Redirect URI in the Report Renderer App registration.  After doing this, I was able to test and register the custom connector in Microsoft Flow without an issue.
Chad Rexin

Thanks Chad!
Strange, I had tried this at first and it didn't work but now it works like a charm!
Erry Handani


[gwenhywfar] update to 5.10.1, add support for windows

Describe the pull request
Updates to 5.10.1, adds support for Windows.

What does your PR fix?
WIP

[ ] Depends on #18029
[x] Depends on #26364
[ ] Depends on #26340
[ ] Depends on #26619 for [qt5] feature on Windows

Which triplets are supported/not supported? Have you updated the CI baseline?
Should support all triplets, although some are skipped due to dependencies not supporting all platforms

Does your PR follow the maintainer guide?

Yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

Ping @wrobelda for response, Is work still being done for this PR?

Ping @wrobelda for response, Is work still being done for this PR?

It's a Draft, eventually, yes.

@wrobelda , Can you please resolve the conflicts against master?

Pinging @wrobelda  for response. Is work still being done for this PR?

Closing this PR since it seems that no progress is being made. Please ping us to reopen if work is still being done.


class member property and method should have different scopes

The definition of class properties and methods should have different scopes, so that they can be highlighted with different colors. The usual way is to colorize the method like a function definition. At the moment all class members are colored the same, because they have the scope typescriptMember. Even when calling the methods they have both the scope typescriptProp.

Is there any way of implementing this behaviour? It really irritates me, and keeps me away from working with typescript in neovim ... :/

I deliberately chose to not differentiate properties and methods. The reason is performance: telling a property from a method requires lookahead and backtracking which slow down vim.


Translucent tab bar in contact journal

Avoid duplicates

[x] Bug is not mentioned in the FAQ
[x] Bug is specific for iOS only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
[x] Bug is not already reported in another issue

Technical details

Device name: iPhone 12 Pro Max
iOS version: 15.0.2
App version: 2.12.1

Describe the bug
Tab bar in diary view is translucent when selecting person or location
Steps to reproduce the issue

go to contact journal
tap on a day
see bug

Internal Tracking ID: EXPOSUREAPP-9910

Internal Tracking ID: EXPOSUREAPP-10178 duplicate of
Internal Tracking ID: EXPOSUREAPP-9910

PR: #3788 merging into release/2.14.x.

@dsarkar Please, could you inform the team that PR #3788 did not sufficiently fix this issue? See https://github.com/corona-warn-app/cwa-app-ios/issues/3161#issuecomment-1032963516.

Addition from my side:
Bug also occurs if the following is done:

select a day in the journal
slightly swipe from the left hand side of the screen as if going back to the overview, but don't complete the swipe to stay on the day view
tab bar is transparent again

@max-ae Thanks for reporting. In which iOS do you reproduce this issue?

@max-ae Thanks for reporting. In which iOS do you reproduce this issue?

iOS 15.3.1 on iPhone 12 Pro Max, CWA version 2.18.1

@dsarkar Version 2.25 seems to be mostly a bugfix release. Could you maybe ask around internally if this could be fixed with that version?

@Ein-Tim ok, I will check.

@Ein-Tim Fix will not be included in 2.25

@dsarkar Ok, thanks for the info. Is there any plan to fix this issue soon? I mean it is quite an annoying issue, which is known for many months now.

@max-ae @Ein-Tim FYI PR https://github.com/corona-warn-app/cwa-app-ios/pull/4869

@dsarkar The "Fix 2.29" label should be renamed to "Fix 3.0".

@dsarkar

Please change the label to "Fix 3.0".
I can confirm that this issue has been fixed in version 3.0. It can therefore be closed.

Thanks to all participants,
I'm closing this issue now as it has been fixed in version 3.0.


Improve validation messages

Q
A

Is bugfix?
❌

New feature?
✔

Breaks BC?
❌

Inherits
#56

Added support for magic methods

Need test PR with yiisoft/di and yiisoft/factory also.

DI works fine. Here is PR for factory

Case w/ class_exists() to resolve.
CHANGELOG.


[BUG] Hardware requirement for running a node is off

In this page https://docs.near.org/docs/roles/validator/hardware we claim that 50GB of disk space is enough, which is not true. I suggest the following:

Change it to "at least 100GB" and update the cost correspondingly.
Remove "Windows" in the table as we don't really support it (and has no plan to do so in the foreseeable future).
There is no requirement on whether the disk is SSD or HDD. We should not specify SSD here (could be misleading).

@bowenwang1996 given how easy it is to click the "Edit" link and submit these sorts of improvements as a PR, why not do that rather than create an issue?

@chadoh I didn't have time to look up the costs.


implement vc.Verify(vcJwt)

reference kt and js impls
kt: https://github.com/TBD54566975/web5-kt/blob/main/credentials/src/main/kotlin/web5/sdk/credentials/VerifiableCredential.kt#L211
js: https://github.com/TBD54566975/web5-js/blob/main/packages/credentials/src/verifiable-credential.ts#L255

already exists in vcjwt.go


Replace records with classes

Your records were a neat trick for object-like API but I don't expect constraint unification to be patched in the near future (note all the unsafeCoerces in my test). Pros/cons of a class like @joneshf's original implementation? Coming soon in #6:
DOM                     -- convention
├─WebStorage.purs       -- reexports
└─WebStorage            -- W3C name
  ├─Internal            -- convention
  │ ├─Foreign.js        -- wrap JS interface
  │ ├─Foreign.purs      -- call JS wrappers
  │ └─Generic.purs      -- newtype for Generic transcoding
  ├─Local.js            -- expose localStorage
  ├─Local.purs          -- instances
  ├─Session.js          -- expose sessionStorage
  ├─Session.purs        -- instances
  ├─Mock.js             -- implement JS interface
  ├─Mock.purs           -- instances
  ├─Str.purs            -- String methods
  └─JSON.purs           -- polymorphic methods

Simplified into functions monomorphic on ForeignStorage.


Example-forum package: Update parameter cannot have both modifier and non-modifier fields.

In the example-forum package, I set the setting forum.requirePostsApproval to true. But when I try to approved a user's pending post, I get this error message:
Update parameter cannot have both modifier and non-modifier fields.
When I try to set it to other status like "Rejected", or set it back again to "Pending", it works. The "Approved" status is the only one that does not work and outputs the error message.
Maybe it has something to do with onEdit line in this code in schema.js?
status: {
    type: Number,
    optional: true,
    viewableBy: ['guests'],
    insertableBy: ['admins'],
    editableBy: ['admins'],
    control: 'select',
    onInsert: (document, currentUser) => {
      if (!document.status) {
        return getCollection('Posts').getDefaultStatus(currentUser);
      }
    },
    onEdit: (modifier, document, currentUser) => {
      // if for some reason post status has been removed, give it default status
      if (modifier.$unset && modifier.$unset.status) {
        return getCollection('Posts').getDefaultStatus(currentUser);
      }
    },
    form: {
      options: () => getCollection('Posts').statuses,
    },
    group: formGroups.admin
  },

I found the issue coming from the code in server/posts/callbacks/other.js
function PostsEditRunPostApprovedSyncCallbacks (modifier, post) {   if (modifier.$set && Posts.isApproved(modifier.$set) && !Posts.isApproved(post)) {     modifier = runCallbacks('posts.approve.sync', modifier, post);   }   return modifier; } addCallback('posts.edit.sync', PostsEditRunPostApprovedSyncCallbacks);
Not sure what this piece of code is supposed to do. I commented it out to resolve the issue.


How to detect the key combinations such as Control+C via TaskPoolHook?

I'm trying to detect the key presses such as:
Control+C, but it is not working.
Example below:
private static void OnKeyReleased(Object? sender, KeyboardHookEventArgs e)
{
//            Console.WriteLine(e.RawEvent);
if(e.RawEvent.Mask.HasFlag(ModifierMask.Ctrl) && e.Data.KeyCode == KeyCode.VcQ)
{
Console.Beep(800, 300);
}
}
Any help please?

It worked now.
I had to change the code like this:
private static void OnKeyReleased(Object? sender, KeyboardHookEventArgs e)
{
//            Console.WriteLine(e.RawEvent);
if(e.RawEvent.Mask.HasFlag(ModifierMask.LeftCtrl) && e.RawEvent.Mask.HasFlag(ModifierMask.LeftShift) && e.Data.KeyCode == KeyCode.VcQ)
{
Console.Beep(800, 300);
}
}

Hi! Thanks for posting this issue!
ModifierMask.Ctrl is defined as both ModifierMask.LeftCtrl and ModifierMask.RightCtrl, so writing e.RawEvent.Mask.HasFlag(ModifierMask.Ctrl) will check whether the event occurred when both Ctrl keys were pressed.
Instead, you can do this:
e.RawEvent.Mask & ModifierMask.Ctrl != ModifierMask.None

This looks a little less readable, but it checks whether any Ctrl key is pressed, not just the left one.

Ok, thanks a lot bro.
I'm implementing it like this.


Global setting to enable desired layout mode for all folders

So, not a bug, but an annoyance that if you want to change the layout mode setting of all your folders (from a list view to a grid view) you have to do this for every folder individually, as you open them.  Sometimes, the nested folders will also take the chosen setting, but not always.  I have looked everywhere, but there isn't a global setting to set a default layout mode (Unless the "Layout Mode" option under the "Display Options" is meant to be sticky; if so, this may be a bug) format for ALL folders and this would be very helpful.

You should be able to:

Turn Off "Enable individual preferences for individual directories" in Settings > Files and Folders
Go to any folder and set your desired layout mode
Optional: Turn "Enable individual preferences for individual directories" back on

The selected layout at step 2 will be the default.

what about the 'list' view? the one without details, its my default in explorer and seems to be missing from the provided views.

I believe default layout mode should option in settings.


Sharp error on deployment

Hello I encounter this error when deploying a simple nextjs app
john@JOHN:~/workspace/app$ npx sst deploy --profile prod --stage prod
SST v2.30.3

➜  App:     app
   Stage:   prod
   Region:  X
   Account: X

[WARNING] aws-cdk-lib.aws_certificatemanager.DnsValidatedCertificate is deprecated.
  use {@link Certificate } instead
  This API will be removed in the next major release.
Monorepo detected at /home/john/workspace/app
Next.js v13.5.6
OpenNext v2.2.4

┌─────────────────────────────────┐
│ OpenNext — Building Next.js app │
└─────────────────────────────────┘

><EMAIL_ADDRESS>build
> next build

 ✓ Creating an optimized production build
 ✓ Compiled successfully
   Skipping validation of types
 ✓ Linting
 ✓ Collecting page data
 ✓ Generating static pages (9/9)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

Route (app)                              Size     First Load JS
┌ ○ /                                    228 B          80.9 kB
├ ○ /_not-found                          874 B          81.5 kB
├ ○ /about                               204 B          80.8 kB
├ ○ /community-guidelines                205 B          80.8 kB
├ ○ /privacy                             204 B          80.8 kB
├ ○ /support                             228 B          80.9 kB
└ ○ /terms                               204 B          80.8 kB
+ First Load JS shared by all            80.6 kB
  ├ chunks/1dd3208c-b2615f357c962e21.js  51.1 kB
  ├ chunks/53-86c33e625b50f980.js        27.5 kB
  ├ chunks/main-app-ee4882900a7f2a20.js  230 B
  └ chunks/webpack-22732b761b854a9f.js   1.86 kB

○  (Static)  automatically rendered as static HTML (uses no initial props)

┌──────────────────────────────┐
│ OpenNext — Generating bundle │
└──────────────────────────────┘

Bundling static assets...
Bundling cache assets...
Bundling server function...
Applying plugins:: [opennext-13.5-serverHandler,opennext-13.5-util,opennext-13.5-default] for Next version: ^13.5.6
Open-next plugin opennext-13.5-serverHandler -- Applying override for imports from ./13.5/serverHandler.js
Open-next plugin opennext-13.5-serverHandler -- Applying override for handler from ./13.5/serverHandler.js
Open-next plugin opennext-13.5-default -- Applying override for imports from ./default.replacement.js
Open-next plugin opennext-13.5-default -- Applying override for processInternalEvent from ./default.replacement.js
Open-next plugin opennext-13.5-default -- Applying override for postProcessResponse from ./default.replacement.js
Open-next plugin opennext-13.5-util -- Applying override for requireHooks from ./13.5/util.js
Open-next plugin opennext-13.5-util -- Applying override for requestHandler from ./util.replacement.js
Bundling revalidation function...
Bundling image optimization function...
npm ERR! code 1
npm ERR! path /home/john/workspace/app/apps/web/.open-next/image-optimization-function/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/stechstudio/libvips-lambda/releases/download/v1.0.1/libvips-8.5.5-lambda.tar.gz/v8.14.4/libvips-8.14.4-linux-arm64v8.tar.br
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: Prebuilt libvips 8.14.4 binaries are not yet available for linux-arm64v8

npm ERR! A complete log of this run can be found in: /home/john/.npm/_logs/2023-10-20T21_43_45_512Z-debug-0.log
node:internal/errors:932
  const err = new Error(message);
              ^

Error: Command failed: npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="/home/john/workspace/app/apps/web/.open-next/image-optimization-function"<EMAIL_ADDRESS>    at checkExecSyncError (node:child_process:890:11)
    at Object.execSync (node:child_process:962:15)
    at createImageOptimizationBundle (file:///home/john/.npm/_npx/ab9ffda21675e838/node_modules/open-next/dist/build.js:231:8)
    at build (file:///home/john/.npm/_npx/ab9ffda21675e838/node_modules/open-next/dist/build.js:33:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 10917,
  stdout: null,
  stderr: null
}

Node.js v21.0.0

Error: There was a problem building the "Site" site.

Need help with this error? Post it in #help on the SST Discord https://sst.dev/discord

Thank you

Also I tried running the failling command it give more info about the error
john@JOHN:~/workspace/app$ npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="/home/john/workspace/app/apps/web/.open-next/image-optimization-function"<EMAIL_ADDRESS>npm ERR! code 1
npm ERR! path /home/john/workspace/app/apps/web/.open-next/image-optimization-function/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Detected globally-installed libvips v8.14.4
npm ERR! sharp: Building from source via node-gyp
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using<EMAIL_ADDRESS>npm ERR! gyp info using<EMAIL_ADDRESS>| linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Invalid version number: 18
npm ERR! gyp ERR! stack     at getNodeDir (/home/john/.nvm/versions/node/v21.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:57:25)
npm ERR! gyp ERR! stack     at /home/john/.nvm/versions/node/v21.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:31:7
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
npm ERR! gyp ERR! System Linux <IP_ADDRESS>-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/home/john/.nvm/versions/node/v21.0.0/bin/node" "/home/john/.nvm/versions/node/v21.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/john/workspace/app/apps/web/.open-next/image-optimization-function/node_modules/sharp
npm ERR! gyp ERR! node -v v21.0.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/john/.npm/_logs/2023-10-20T21_45_32_141Z-debug-0.log

Error seems pretty clear Error: Invalid version number: 18. You are no .nvm/versions/node/v21.0.0

here is the log for the failling sub command on Node.js v18.18.2
john@JOHN:~/workspace/app$ npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="/home/john/workspace/app/apps/web/.open-next/image-optimization-function"<EMAIL_ADDRESS>npm ERR! code 1
npm ERR! path /home/john/workspace/app/apps/web/.open-next/image-optimization-function/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Detected globally-installed libvips v8.14.4
npm ERR! sharp: Building from source via node-gyp
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using<EMAIL_ADDRESS>npm ERR! gyp info using<EMAIL_ADDRESS>| linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Invalid version number: 18
npm ERR! gyp ERR! stack     at getNodeDir (/home/john/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:57:25)
npm ERR! gyp ERR! stack     at /home/john/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:31:7
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
npm ERR! gyp ERR! System Linux <IP_ADDRESS>-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/home/john/.nvm/versions/node/v18.18.2/bin/node" "/home/john/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/john/workspace/app/apps/web/.open-next/image-optimization-function/node_modules/sharp
npm ERR! gyp ERR! node -v v18.18.2
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/john/.npm/_logs/2023-10-23T15_51_46_398Z-debug-0.log

I guess the value "18" for target is no compliant with semver, when I replace "18" by  "18.0.0" the command runs well.
We may need a change here
 npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="${nodeOutputPath}" sharp@${sharpVersion},

npm ERR! sharp: Downloading https://github.com/stechstudio/libvips-lambda/releases/download/v1.0.1/libvips-8.5.5-lambda.tar.gz/v8.14.4/libvips-8.14.4-linux-arm64v8.tar.br
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: Prebuilt libvips 8.14.4 binaries are not yet available for linux-arm64v8

This seems like sharp-related thing. Can you try installing libvips yourself instead of relying on Sharp? Check out https://formulae.brew.sh/formula/vips. I would encourage you to open issue on sharp's repo, it seems like they are using libvips version which was not pre-compiled for ARM :/

I'm on Windows WSL 2 Ubuntu (x86_64), I've installed brew install vips successfully but I get the exact same error.
It seems like an arm64 compiled libvips is needed to package the lambda.
Am I the only one not being able to deploy my nextjs app on a standard x86 linux system ?
Is everyone using open-next on an arm64 M1 macbook thus being able to get the arm64 libvips straight from brew cmd ?
If I understand well, my option are to cross-compile libvips on my x86_64 system for arm64 or wish sharp team to provide it
thank you for your time

Well, it seems WSL-related I think. Either way, I would recommend changing the --arch flag to x86 and subsequently change architecture of image optimiser in CDK.
@khuezy would it make sense to pre-package whole lambda code so it's just copy-paste? I went with that approach in https://github.com/sladg/imaginex-lambda/tree/master as it was too much headache to deal with different people's OS-es and settings, so prepackaging everything and uploading ready code to Lambda was easiest.

Well, it seems WSL-related I think. Either way, I would recommend changing the --arch flag to x86 and subsequently change architecture of image optimiser in CDK.
@khuezy would it make sense to pre-package whole lambda code so it's just copy-paste? I went with that approach in https://github.com/sladg/imaginex-lambda/tree/master as it was too much headache to deal with different OS-es and settings, so prepackaging everything and uploading ready code to Lambda was easiest.

"replacement of shitty build-in NextJS image optimizer." lol
Yea, let's try to use your imagex-lambda. Btw, how shitty is the NextJS image optimizer compared to the python one?

I've found a quick working workaround for the time being
instead of fetching the missing arm libvips from default stechstudio/libvips-lambda
I' ve been able to override the source to the more richer lovell/sharp-libvips repo
using the npm flag sharp_libvips_binary_host
like this:
npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="/home/nemesis/workspace/social/apps/web/.open-next/image-optimization-function"<EMAIL_ADDRESS>--sharp_libvips_binary_host=https://github.com/lovell/sharp-libvips/releases/download/

added 51 packages in 7s

10 packages are looking for funding
  run `npm fund` for details

that could be a quicker fix for open-next

@khuezy it's okay-ish, but there is overhead of starting up Next on image request. Also, trying to separate it efficiently and/or handle dependencies is rather painful. The API is rather simple so recreating in Python with minimal overhead seemed like win-win.

Since the process is async and result is cached at CDN, the extra latency shouldn't be a big deal.


New package: Nanoid v0.1.0

Registering package: Nanoid
Repository: https://github.com/aldy505/Nanoid.jl
Created by: @aldy505
Version: v0.1.0
Commit: 1d3a820055f93e9b07a2ae77323c626315e2a064
Git reference: master
Description: Julia implementation of Nanoid

Blocking, there's a bug in the code (not secure it seems), I'll file an issue.

@PallHaraldsson Hi, I've updated my library. It should do fine now.
[noblock]

Hi, I've updated my library. It should do fine now.

You should also trigger registration again on the latest commit without changing version number so that this PR will be automatically updated, so that it'll include your fix.
[noblock]

@PallHaraldsson if your concern has been addressed, please edit [noblock] into your comment so registration may proceed.
[noblock]


fix: Chinese character tag bug

#961
Adopted the method used for handling UrlTitle to process slugname.

Initially, I also thought it was a front-end issue, because the encodeURIComponent function was used, so I deleted encodeURICompontent in the functions related to the tag slugName.
For example, in   ui/src/router/pathFactory.ts
const tagLanding = (slugName: string) => {
  const r = slugName ? `/tags/${encodeURIComponent(slugName)}` : '/tags';
  return r;
};

Also in ui/src/components/Tag/index.tsx
const Index: FC<IProps> = ({
  ...
  href ||= pathFactory.tagLanding(encodeURIComponent(data.slug_name));
  ...
})

This will lead to new issues; if the slugName contains '/' or some special characters, it will result in URI errors.
Thus, I decided to resolve this issue using a method similar to the one used for handling UrlTitle.
I'm not sure if my understanding is correct, and I would be happy to discuss this issue with you.

Initially, I also thought it was a front-end issue, because the encodeURIComponent function was used, so I deleted encodeURICompontent in the functions related to the tag slugName.
For example, in ui/src/router/pathFactory.ts
const tagLanding = (slugName: string) => {
  const r = slugName ? `/tags/${encodeURIComponent(slugName)}` : '/tags';
  return r;
};

Also in ui/src/components/Tag/index.tsx
const Index: FC<IProps> = ({
  ...
  href ||= pathFactory.tagLanding(encodeURIComponent(data.slug_name));
  ...
})

This will lead to new issues; if the slugName contains '/' or some special characters, it will result in URI errors.
Thus, I decided to resolve this issue using a method similar to the one used for handling UrlTitle.
I'm not sure if my understanding is correct, and I would be happy to discuss this issue with you.

Tags are different from titles. tags are created without any checksums, so in order to prevent special characters from damaging the integrity of the URL, encodeURIComponent is used here to escape.
this was done with the following main considerations in mind:

make the display of the tag on the page look the same as when it was created.
no need to consider the compatibility of some of its old data.

like this:

The reason for using the encodeURIComponent method is to ensure that the URL conforms to the requirements, and there is no such restriction in the API, so we just need to restore the escaped parameters in the API inputs.
The APIs involved are

/answer/api/v1/tag?name=xxxx
/answer/api/v1/question/page?page_size=20&page=1&order=active&tag=xxxx

If you have other questions, you can continue the discussion.


chore: Update Renovate

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


git lfs objects appear to be missing in this repo

Errors seen during clone:
rsimha@rsimha-macbookpro2:~/src$ git clone git@github.com:rsimha/amp-closure-compiler.git
Cloning into 'amp-closure-compiler'...
remote: Enumerating objects: 596, done.
remote: Counting objects: 100% (596/596), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 596 (delta 340), reused 589 (delta 336), pack-reused 0
Receiving objects: 100% (596/596), 2.98 MiB | 16.93 MiB/s, done.
Resolving deltas: 100% (340/340), done.
Downloading packages/google-closure-compiler-java/compiler.jar (11 MB)
Error downloading object: packages/google-closure-compiler-java/compiler.jar (715e1c1): Smudge error: Error downloading packages/google-closure-compiler-java/compiler.jar (715e1c1a03fc0cb8de194c8fcf541626a3ac1c45deaac5bfaaadfd392b71e026): [715e1c1a03fc0cb8de194c8fcf541626a3ac1c45deaac5bfaaadfd392b71e026] Object does not exist on the server: [404] Object does not exist on the server

Errors seen during GH action checkout:
Fetching LFS objects
  /usr/bin/git lfs fetch origin refs/remotes/pull/2/merge
  fetch: Fetching reference refs/remotes/pull/2/merge
  [106dc309b856da4be05b77905a4bcc0a0a8771935c6bfd833f63027041806c1b] Object does not exist on the server: [404] Object does not exist on the server
  [e3e3991f497191164c2c9f08f979bddb65089f55feddaa5c858f6c9391877cf8] Object does not exist on the server: [404] Object does not exist on the server
  [715e1c1a03fc0cb8de194c8fcf541626a3ac1c45deaac5bfaaadfd392b71e026] Object does not exist on the server: [404] Object does not exist on the server
  [5240b349693d1ca107b5376bfb804be7a8901af74b263b7fdfe8798df59ab886] Object does not exist on the server: [404] Object does not exist on the server
  ##[error]error: failed to fetch some objects from 'https://github.com/ampproject/amp-closure-compiler.git/info/lfs'
  The process '/usr/bin/git' failed with exit code 2
  Waiting 14 seconds before trying again
  /usr/bin/git lfs fetch origin refs/remotes/pull/2/merge
  fetch: Fetching reference refs/remotes/pull/2/merge
  [106dc309b856da4be05b77905a4bcc0a0a8771935c6bfd833f63027041806c1b] Object does not exist on the server: [404] Object does not exist on the server
  [e3e3991f497191164c2c9f08f979bddb65089f55feddaa5c858f6c9391877cf8] Object does not exist on the server: [404] Object does not exist on the server
  [715e1c1a03fc0cb8de194c8fcf541626a3ac1c45deaac5bfaaadfd392b71e026] Object does not exist on the server: [404] Object does not exist on the server
  [5240b349693d1ca107b5376bfb804be7a8901af74b263b7fdfe8798df59ab886] Object does not exist on the server: [404] Object does not exist on the server
  ##[error]error: failed to fetch some objects from 'https://github.com/ampproject/amp-closure-compiler.git/info/lfs'
  The process '/usr/bin/git' failed with exit code 2
  Waiting 17 seconds before trying again
  /usr/bin/git lfs fetch origin refs/remotes/pull/2/merge
  fetch: Fetching reference refs/remotes/pull/2/merge
  [106dc309b856da4be05b77905a4bcc0a0a8771935c6bfd833f63027041806c1b] Object does not exist on the server: [404] Object does not exist on the server
  [e3e3991f497191164c2c9f08f979bddb65089f55feddaa5c858f6c9391877cf8] Object does not exist on the server: [404] Object does not exist on the server
  [715e1c1a03fc0cb8de194c8fcf541626a3ac1c45deaac5bfaaadfd392b71e026] Object does not exist on the server: [404] Object does not exist on the server
  [5240b349693d1ca107b5376bfb804be7a8901af74b263b7fdfe8798df59ab886] Object does not exist on the server: [404] Object does not exist on the server
  ##[error]error: failed to fetch some objects from 'https://github.com/ampproject/amp-closure-compiler.git/info/lfs'
  ##[error]The process '/usr/bin/git' failed with exit code 2

This was also reported by @mrjoro who helped us by migrating the old repo to the ampproject organization.
I'm going to attempt to fix this by deleting the four missing files and regenerating them.

Can confirm this is now fixed during clone / fetch. I'll regenerate the binaries shortly.


added new command stats

Hi @JacobEvelyn
Just added stats command to list Total no of friends and activities.
https://github.com/JacobEvelyn/friends/issues/36

Thanks so much for contributing! I've added a few small comments to your pull request.
In addition, I'd love if you could write tests for this as well; see the introvert_spec.rb file for more details, and I'm happy to help guide you through that as well.
Lastly, I'd love to see if this command could also return the elapsed time period, as shown in #36. I'm more than happy to help you write that code as well!
Lastly, since you're the first external contributor to this project (wooo!), let me know if there are things I can do (add to the README, write a CONTRIBUTING.md file, add labels for Issues that others can take, etc.) to make this process smoother!

@JacobEvelyn  added test cases and modified the code as per your comments. for return the elapsed time period can tell me how you expect output ?
e.g:
we have two activity
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute.
2015-01-04: Got lunch with Grace Hopper and George Washington Carver.
Subtract each activity date form today and sum ?

Thanks for making those changes!
Subtracting each activity date from the current day and summing would yield quite a large number, but I don't see what that number would really represent. What I was looking for is the total elapsed days of activities recorded, so something like this:
def elapsed_days
  return 0 if @activities.size < 2

  (@activities.last.date - @activities.first.date).to_i
end

And use it like:
days = @introvert.elapsed_days
"Total time elapsed: #{days} day#{'s' if days != 1}"

Does that make sense? Do you see a better stat to display instead?

@JacobEvelyn  Added elapsed days

Hey! Thanks so much for working on this, and sorry it still hasn't been merged. I have some more feedback on the PR that I added via comments.
I know it can be frustrating to have a feature get slowed down by a lot of back-and-forth in code review so if it's easier I can make a new branch, cherry-pick your commits onto it and then add my own commit to tidy up the code (it won't take me long and really is no trouble). I thought I'd give you an opportunity to make the changes first though before I barged in on your work. :smiley:
Let me know what you think!

@JacobEvelyn  Thank you so much   for your reviews and detailed comments . I have modified the code as per your comments.

One last comment: those stub_friends and stub_activities methods should only affect things within their blocks, like MiniTest's native stubs. To ensure this, I just pushed a new commit that enforces this behavior in how stub_friends and stub_activities are defined. (If you rebase on top of that new commit, you'll see that your tests fail.)
To fix this, please put your test assertions within the blocks (any time you have an empty block, as you do currently, that should be a red flag that something's not right).

@JacobEvelyn Thanks you so much for you valuable comments. As you said early Please  cherry-pick the commit and to new branch.
This my first pull request to a open source. I learn Many things from your Comments. Thank you So much for that.

No problem, and glad you've learned! If you're curious, here's the last commit I did: https://github.com/JacobEvelyn/friends/commit/760517eae551cc746f9415521a0865b66606764e
Thanks for doing all of the heavy lifting on this PR, and congrats on your first piece of open-source work!


python3.6 How to share A = ahocorasick.Automaton() in multiprocess ?

That's a good question. The module was not designed to be a thread-safe.
What's your use case?

I have a multiprocessor program that spawns multiple processes to split a huge file among those processes, and then each processor's role is to tries to look if the long string it's responsible for contains any of the possible substrings(which are the words added to the automaton).
So, in this case, is it safe to create the automaton on the start of the server, and then pass the instance to each processor?

@Salma7amed I have no experience with multiprocess python software. The Aho-Corasick searching procedure does not modify the data, but fetching the value associated with a key is not thread safe as it bumps up reference counters.

Guys, could you please provide some simple proof-of-concept multi-process script which would model your use case? As I mentioned, I have no experience with such kind of programs, but having an example I might check how the module behaves.

There is a large difference between multi-processing and multi-threading in Python. @feiyangzhang it will be hard to literally share the Automaton object between processes. When Python creates a new process, it launches a new Python interpreter. This means that the memory address space of the child processes is not shared with the one of the parent . The only reason why the parent variables can still be accessed is because the memory of the parent is copied to the child, hence the variables too. If you change some variable on the child and try to access that same variable on the parent, you will notice that the parent process will still have the old value.
When it comes to threads, the threads share indeed the memory address space of the their parent. Hence, you can interchange the variables' values in both child threads and the parent (with perhaps sync methodologies, but that is another topic)
In most situations, there is no point in using pyahocorasick in threads, because of the Python GIL. For instance, the situation that @Salma7amed mentioned is a perfect example of this. The GIL ensures that only one thread can run at a time. Of course, they run concurrently, but not in parallel. The reason for this is because each thread needs to acquire a lock of the Python interpreter so they can get their code interpreted (and run). The searching process of the aho-corasick makes it CPU bound. This means that, if you have several threads trying to search something using pyahocorasick, one thread will always have to wait for the other (of course, putting aside CPU time scheduling algorithms which may grant different CPU times to each thread).
However, if we are talking about multi-processing, that will indeed work in parallel. Because each process has its own Python interpreter.
 Threads share memory but do not run in parallel. Processes run in parallel, but do not share memory.
Since python3.8, there is the possibility to use V shared memory. Yes, it is what you are thinking, the memory is literally shared among processes. However, in order to share memory, your object, data type, or whatever you want to share needs to be convertible to bytes.
Now, the question is @WojciechMula , is there anyway that you can make the Automaton convertible to bytes and from bytes to an Automaton again? This would be the real stuff.
If you can do this and solve the problem you mentioned above: "The Aho-Corasick searching procedure does not modify the data, but fetching the value associated with a key is not thread safe as it bumps up reference counters." , I will be down to implement the shareable memory part in python3.8 and make a pull request.
Also, if you need help for something else concerning this subject, I can help you.

Here is an example of what it looks like to share an Automaton in several processes an Automation in python3.8, with the new V shared memory features.
import ahocorasick
import io
import pickle
from multiprocessing import Process, shared_memory

trie_patterns = mountains = ["THISISAMALICOUSIOC"<EMAIL_ADDRESS><EMAIL_ADDRESS>"<IP_ADDRESS>", "<IP_ADDRESS>", "8934:9ABC:F6A0:19F7:E8EC:A65F:43B3:AB56"]

A = ahocorasick.Automaton()
for x in trie_patterns:
    A.add_word(x, x)
A.make_automaton()
automaton_to_bytes = io.BytesIO()
pickle.dump(A, automaton_to_bytes)

# shared memory
name = "pyaho_test"
automaton_len = len(automaton_to_bytes.getvalue())
shm_a = shared_memory.SharedMemory(create=True, size=automaton_len, name=name)
shm_a.buf[:len(automaton_to_bytes.getvalue())] = automaton_to_bytes.getvalue()

def perform_search(to_search, automaton_len):
    shared_mem = shared_memory.SharedMemory(name)
    automaton_in_bytes = shared_mem.buf[:automaton_len]
    automaton_in_bytes = io.BytesIO(automaton_in_bytes)
    A = pickle.load(automaton_in_bytes)
    while True:
        for match in A.iter(to_search):
            print(match[1])

try:
    for x in range(0, 20):
        p = Process(target=perform_search<EMAIL_ADDRESS>automaton_len))
        p.start()
        p.join()
except KeyboardInterrupt:
    shm_a.unlink()

I was actually able to convert to and from bytes an Automaton.
Each process has a while True loop and the memory keeps increasing... Is this supposed to happen? Could it maybe be because of the reference counters? Anyway, the match is found and no errors occur.

@OblackatO Doesn't this just make a copy from the shared memory for each process? Passing a copy of the automaton to each process would have the same effect no? I would expect that multiprocessing support would only keep the automaton in memory once.

@Dobatymo Unfortunately, it seems it does copy the shared memory object, which is not what I understood from the documentation. I edited the code above to a more practical example, with a limited While loop on the children. Also, I built an Automaton with 30k patterns that I load from an external file, in this lines:
with open("strings_file_30k.json", "r") as all_strings:
    strings = json.loads(all_strings.read())
for string_category in strings:
    for string_sample in strings[string_category]:
        trie_patterns.append(string_sample)
        if total_added_to_search_in != total_to_search_in:
            to_search_in.append(string_sample)
            total_added_to_search_in += 1

Just load the "strings" variable with some other source, or randomly generate 30k words and add to the "strings" list and the code should run fine for you too.
If we look at the memory analysis of the code with memory_profiler, using the command:
mprof run --multiprocess pyahocorasick_example.py

(Where pyahocorasick_example.py is the file with the code above)
We see that:
Filename: pyahocorasick_example.py

Line #    Mem usage    Increment   Line Contents
================================================
    44     69.6 MiB     69.6 MiB   @profile
    45                             def perform_search(to_search_in, process_number, automaton_len):
    46     69.6 MiB      0.0 MiB       print(f'On process {process_number}')
    47     69.6 MiB      0.0 MiB       done_iterations = 0
    48     69.6 MiB      0.0 MiB       shared_mem = shared_memory.SharedMemory(name)
    49     69.7 MiB      0.1 MiB       automaton_in_bytes = shared_mem.buf[:automaton_len]
    50    122.5 MiB     52.8 MiB       automaton_in_bytes = io.BytesIO(automaton_in_bytes)
    51    191.9 MiB     69.4 MiB       A = pickle.load(automaton_in_bytes)
    52    191.9 MiB      0.0 MiB       while done_iterations != total_iterations:
    53    191.9 MiB      0.0 MiB           for match in A.iter(to_search_in[random.randint(0, len(to_search_in)-1)]):
    54    191.9 MiB      0.0 MiB               r = match[1]
    55    191.9 MiB      0.0 MiB           done_iterations += 1
    56    191.9 MiB      0.0 MiB       print(f'Done searching on process {process_number}')
    57    165.3 MiB      0.0 MiB       shared_mem.close()

This is the function where the children processes are created. It starts directly with 69.8MiB, which is the memory of the parent. Already here, there is something wrong. The Automaton should be around 30MiB, because there are 30k patterns. I don't know where the remaining 39MiB come from. We might argue that it is the shared_memory object + the Automaton object, which will doubles amount of memory. But I don't think so. If you look at the code I set the A = None  and the Automaton is hopefully destroyed. (cannot control garbage collection) If I do the same memory analysis, without setting A = None, this happens:
Filename: pyahocorasick_example.py

Line #    Mem usage    Increment   Line Contents
================================================
    44    104.4 MiB    104.4 MiB   @profile
    45                             def perform_search(to_search_in, process_number, automaton_len):
    46    104.4 MiB      0.0 MiB       print(f'On process {process_number}')
    47    104.4 MiB      0.0 MiB       done_iterations = 0
    48    104.4 MiB      0.0 MiB       shared_mem = shared_memory.SharedMemory(name)
    49    104.5 MiB      0.1 MiB       automaton_in_bytes = shared_mem.buf[:automaton_len]
    50    157.3 MiB     52.8 MiB       automaton_in_bytes = io.BytesIO(automaton_in_bytes)
    51    226.8 MiB     69.5 MiB       A = pickle.load(automaton_in_bytes)
    52    226.8 MiB      0.0 MiB       while done_iterations != total_iterations:
    53    226.8 MiB      0.0 MiB           for match in A.iter(to_search_in[random.randint(0, len(to_search_in)-1)]):
    54    226.8 MiB      0.0 MiB               r = match[1]
    55    226.8 MiB      0.0 MiB           done_iterations += 1
    56    226.8 MiB      0.0 MiB       print(f'Done searching on process {process_number}')
    57    200.1 MiB      0.0 MiB       shared_mem.close()

So I can only assume that the Automaton is indeed garbage collected when I set it to None.
We can also see in both memory analysis that in line  automaton_in_bytes = shared_mem.buf[:automaton_len] the memory does not increase, which proves the piece of shared memory of the parent where the Automaton was put, is indeed shared.
There is a ramp up in the lines: automaton_in_bytes = io.BytesIO(automaton_in_bytes) && A = pickle.load(automaton_in_bytes) , but this is expected. BytesIO just copies the bytes "automaton_in_bytes", and when the Automaton is pickled, I guess the same thing happens.
For Ctypes structures that are convertible to bytes, there is away around this with the function:

from_buffer(source[, offset])¶
This method returns a ctypes instance that shares the buffer of the source object. The source object must support the writeable buffer interface. The optional offset parameter specifies an offset into the source buffer in bytes; the default is zero. If the source buffer is not large enough a ValueError is raised.

What is happening in the io.BytesIO and in the Automaton pickling is something similar to this:

from_buffer_copy(source[, offset])
This method creates a ctypes instance, copying the buffer from the source object buffer which must be readable. The optional offset parameter specifies an offset into the source buffer in bytes; the default is zero. If the source buffer is not large enough a ValueError is raised.

I wonder if there is a way to make the Automaton class being usable with from_buffer function. After all pyahocorasick is written in C... I looked at the code already, but I cannot find an easy answer.
Finally, I have one last remark. I created an Automaton in one python file X and put the Automaton in shared memory. After that I created another python script Y and attached a piece of shared memory to the memory created in X. The code of X is similar to the code on my issue above, I just did not launch the processes and used input() after the shared memory creation + plus the print of its name. The code of Y looks like this:
import sys
import ahocorasick
import io
import pickle
import random
from multiprocessing import shared_memory
from memory_profiler import profile

@profile
def run_child_process():
    to_search_in =<EMAIL_ADDRESS><EMAIL_ADDRESS>    shared_mem = shared_memory.SharedMemory(sys.argv[1])
    automaton_in_bytes = shared_mem.buf[:int(sys.argv[2])]
    automaton_in_bytes = io.BytesIO(automaton_in_bytes)
    A = pickle.load(automaton_in_bytes)
    total_iterations = 10000
    done_iterations = 0
    while done_iterations != total_iterations:
        for match in A.iter(to_search_in[random.randint(0, len(to_search_in)-1)]):
            r = match[1]
            #print(r)
        done_iterations += 1
    shared_mem.close()
    shared_mem.unlink()
    print(f'Done searching on process {sys.argv[3]}')
    sys.exit(0)

if __name__ == '__main__':
    run_child_process()

To call Y, I used:
python3.8 -m memory_profiler shared_mem_executor.py <shared_mem_object_name> <len_of_Automaton_in_bytes> <process_number>
python3.8 -m memory_profiler shared_mem_executor.py psm_2440913a 28029738 1

The memory analysis of shared_mem_executer.py looked like this:
Filename: shared_mem_executor.py

Line #    Mem usage    Increment   Line Contents
================================================
    16     35.3 MiB     35.3 MiB   @profile(stream=fp)
    17                             def run_child_process():
    18     35.3 MiB      0.0 MiB       to_search_in =<EMAIL_ADDRESS><EMAIL_ADDRESS>    19     35.4 MiB      0.1 MiB       shared_mem = shared_memory.SharedMemory(sys.argv[1])
    20     35.4 MiB      0.0 MiB       automaton_in_bytes = shared_mem.buf[:int(sys.argv[2])]
    21     88.7 MiB     53.3 MiB       automaton_in_bytes = io.BytesIO(automaton_in_bytes)
    22    126.9 MiB     38.2 MiB       A = pickle.load(automaton_in_bytes)
    23    126.9 MiB      0.0 MiB       total_iterations = 10000
    24    126.9 MiB      0.0 MiB       done_iterations = 0
    25    126.9 MiB      0.0 MiB       while done_iterations != total_iterations:
    26    126.9 MiB      0.0 MiB           for match in A.iter(to_search_in[random.randint(0, len(to_search_in)-1)]):
    27    126.9 MiB      0.0 MiB               r = match[1]
    28                                         #print(r)
    29    126.9 MiB      0.0 MiB           done_iterations += 1
    30    100.2 MiB      0.0 MiB       shared_mem.close()
    31    100.2 MiB      0.0 MiB       shared_mem.unlink()
    32    100.2 MiB      0.0 MiB       print(f'Done searching on process {sys.argv[3]}')

The normal ramp ups in BytesIO and pickle. However, we start with 35MiB, which is barely the size of the Automaton. If the memory is really shared, should the child process have 35MiB at the beginning? Maybe the memory_profiler does not realize the shared_memory object and considers it like a none shared object. I am not really sure.
@Dobatymo  What are your thoughts on this? Do you perhaps have another shared memory example with the Automaton with V shared memory of py3.8?

I don't think the shared memory feature is of any help here. I don't know how the ahocorasick automaton is working internally, but I know it must be a complex graph structure which cannot be read easily from a blob of bytes. Pickle is doing serialization of the data, and its result can be shared. But it cannot be used without deserializing the data back to format which the library uses internally.
 Supporting this functionally would probably require lots of changes from the pyahocorasick developer.

Supporting this functionally would probably require lots of changes from the pyahocorasick developer.

That I was expecting, but any other way of doing it is just not worth it IMHO.
The Automaton can still be shard in threads, which will significantly reduce the programming complexity, but in CPU-bound scenarios this is inefficient and does not make sense.
There are of course other ways to share the Automaton in processes, without using V-Shared memory such as Pipes. But these are too slow and the Automaton needs to be convertible to bytes anyway and we will face the same problem of serialization/deserializing, like I showed in the memory analysis above.
To have a real CPU-bound shared memory solution that is efficient and fast, V-Shared memory is the way to go. Any other solution seems to me be like "hacks" not worth doing.

a real CPU-bound shared memory solution

To be honest, you should be using a different language, not Python. Python is notoriously bad for this kind of stuff.
However, I can think of possible solutions, but both of them are pure speculation as I don't actually know how pyahocorasick is implemented.
I assume it uses a pointer based tree/graph structure in memory. So when loading/saving from/to disk, it will be converted to another kind of datastructure which doesn't use pointers. This datastructure however cannot be used in it's current implementation to implement the needed automaton methods. This means the memory model would have to be changed. Instead of using a pointer based approach, pyahocorasick would need to work with an index based (probably linear data structure like a vector/list) and do "graph path finding" using relative indices instead of absolute pointers. This way it could operate on a byte blob of data which could be shared with python. This would also enable pyahocorasick to mmap automaton files. I assume this would require a complete rewrite of the library.
For the second approach, one could implement a thread pool in C code and share the automaton in C level. Then a method could be expose to python to find words, which would use a queue to distribute the tasks to different threads (which can all access the same shared automaton)
But even then (for both approaches) there is still the issue with the reference counts. For that, probably a different data ownership model is needs (with explicit frees perhaps?).
Again I don't know if any of that makes sense, because I have not looked at the actual implemented (but I am familiar with the ahocorasick theory itself).
@WojciechMula maybe you can comment if this is accurate

First of all, thanks a lot for such a great explanation.
I fully agree with @Dobatymo. Making data structure able to be placed in shared memory, we would need completely rewrite everything from the scratch. This is a new memory model. Likely we would up with two libraries: plain C (unaware of python), and python wrapper that would interpret indices are python objects.
TBH don't see a good solution for @Salma7amed problem using existing module. I mean there are two options: 1) true multiprocessing, but then we have data duplication, or 2) single data structure reises inside a server which is queried from multiple processes.

I use extensive multiprocessing with fairly large automatons (this is all public doe). These are pickled/unpickled and I surely could benefit from using less memory. :)
Could using a memory mapped file be another approach? that would require somehow that an on-disk and in-memory representation is the same which is likely not something that is easy to get and a completely different implementation.

I use extensive multiprocessing with fairly large automatons (this is all public doe). These are pickled/unpickled and I surely could benefit from using less memory. :)
Could using a memory mapped file be another approach? that would require somehow that an on-disk and in-memory representation is the same which is likely not something that is easy to get and a completely different implementation.

While making the data structure portable (index-based rather address-based) might not be that complex, making stored values portable seems to be difficult.
Now, when you are retrieving an associated value, it's just reference counter incremented. Everything lives inside the same python instance, this is why it's that simple. But if we refer to a value from multiple processes? Then a trie should keep pickled values and each use re-materialize python object with unpickle. Sounds like possible performance problem.

While making the data structure portable (index-based rather address-based) might not be that complex, making stored values portable seems to be difficult.
Now, when you are retrieving an associated value, it's just reference counter incremented. Everything lives inside the same python instance, this is why it's that simple. But if we refer to a value from multiple processes? Then a trie should keep pickled values and each use re-materialize python object with unpickle. Sounds like possible performance problem.


Add codeclimate yml file

Allows us to run the engine on the repo itself

+1 but will let @nlf merge so he is aware


Why does the network structure in ConvGRUNet use module DeConvGRU?

Dear author,
Thank you for your outstanding work！ While reading the source code, I came across a question: the paper mentions two GRUNets for encoding and decoding, but in the source code, both the ConvGRUNet and DeConvGRUNet classes use DeConvGRU units. Although there is an implementation of ConvGRU in the source code, it is not used. Could you clarify if these two modules have the same functionality?
(This refers to lines 437 and 440 in lib\models\dladcn_gru.py.)
class ConvGRUNet(nn.Module):
    def __init__(self):
        super(ConvGRUNet, self).__init__()
        self.conv_gru_layer1 = DeConvGRU(3, 16, (7, 7), 1)
        self.maxpool1 = nn.MaxPool3d(kernel_size=(3,3,3), stride=(1,1,1), padding=(1,1,1))

        self.conv_gru_layer2 = DeConvGRU(16, 16, (3, 3), 1)

    def forward(self, c0_sta):
        # layer 1
        c0_seq, _ = self.conv_gru_layer1(c0_sta)                    # B, N, 32, 512, 512
        c0_seq_down = self.maxpool1(c0_seq.transpose(1, 2)).transpose(1, 2)     # B, N, 32, 256, 256

        # layer 2
        c1_seq, _ = self.conv_gru_layer2(c0_seq_down)               # B, N, 64, 256, 256

        return c1_seq
class DeConvGRUNet(nn.Module):
    def __init__(self):
        super(DeConvGRUNet, self).__init__()
        self.proj0 = nn.Sequential(
            nn.Conv2d(32, 16, kernel_size=3, stride=1, padding=1, bias=False),
            nn.BatchNorm2d(16)
        )
        self.proj_hm = nn.Sequential(
            nn.Conv2d(16, 16, kernel_size=3, stride=1, padding=1, bias=False),
            nn.BatchNorm2d(16)
        )
        for m in self.modules():
            if isinstance(m, nn.BatchNorm2d):
                nn.init.constant_(m.weight, 1)
                nn.init.constant_(m.bias, 0)

        self.deconv_gru_layer = DeConvGRU(16, 16, (3, 3), 1)

I retrained the model using the ICPR dataset and obtained the following metrics. However, the detection metrics for the sequence image with index 003 are abnormal. Could you please explain the possible reasons?

Looking forward to your response.

the detection metrics for the sequence image with index 003 are abnormal.索引为003的序列图像检测指标异常。 I checked the sequence images with the number 003, and the number of targets in the images is very small.我检查了编号为003的序列图像，图像中的目标数量非常少。

Hello, I’m trying to reproduce this code using the ICPR dataset, but I noticed that the download link is no longer working. Would it be possible for you to share the dataset? I’d greatly appreciate your help if it’s convenient for you. Thank you so much!


Doc - Describe setup_hint_processor using Rustdoc comments (three slashes: ///)

@tdelabro @Eikix
Fixed #58

@tdelabro @Eikix I have updated format . but I didn't change any rust file . I don't know why it is giving error .
error is like
thread 'hooks::tests::test_infinite_loop::case_1' panicked at 'Should be Ok: Compile(CairoCompileBinaryNotFound(CannotFindBinaryPath))', src\hooks\tests.rs:16:10
It have something to do with cairo compiler binary file path. You can tell me if any help i can do.


Isomorphic

@lindell First, thanks for the hard work on this library, it appreciated!
So, I had a need for a barcode generator to:

Be isomorphic
Node compatible
Use HTML5 Canvas and Node Canvas (if using on server side)
Support multiple barcode types

Your library was the furthest along from what I found.  I also scratched an itch with ES6 and webpack for bundling.  The result so far is this:
https://github.com/wavded/JsBarcode/tree/isomorphic
I still have to integrate node-canvas for server side data URI generation and packaging but I tried hard to ensure none of the core logic was lost.  Here is my test page against your test generator app examples:

My question is, do you have any interest in merging this in?  Of course with your feedback.  I will happily maintain a fork for my purposes but like the idea of having this project continue to receive bug fixes and improvements in one spot than make yet another barcode generator.  There are some notable and breaking changes which are up for discussion but here is my rationale:

jQuery support was removed as it didn't make sense for server side.
The output is always a data-uri for consistency server and client.
Instead of passing in a barcode type, they are just methods on JsBarcode, e.g. JsBarcode.CODE39(content).  I'm not married to that but seemed clearer at the time.

Thoughts?

The idea of the library supporting node have been on my mind for a while. It would be great to merge your work! I will probably have to review the changes another day as I don't have the time right now but will comment on the changes then.

Sounds good @lindell, I'll will finish up the packaging and server side canvas stuff likely today.  Feel free to comment whenever you have time.

@lindell I've added all the packaging and canvas support.  It turns out to be most flexible to just return the canvas object for both server and client, at that point you can stream it to a file or render it to an image depending what side you are using the lib on, the readme reflects the updated api and examples.
js-barcode was taken already in npm and jsbarcode was just too similar so I went with io-barcode and published that so I can start using it.  I know I've changed a ton about this project, its probably barely recognizable ;)  I am pretty happy with the changes.  Bower support should be trivial to re-add if desired.

I'm sorry I have not taken a look at this yet. I'm in the end of my period and have my exams next week. Will check the code and then merge it after next week.

Hello.
First I want to say sorry for completely ignoring this for so long. I did almost competently quit github for almost a year except for fixing a few bugs.
When I started updating JsBarcode again a few months back and looked at this issue I looked at your code and saw you where using ES6 syntax and thought it was no way it was still running in the browser without realizing you where using babel and webpack to compile it. I think it was well needed change and I'm changing to that now. Unfortunately it would be to much of an hassle to fork the changes but I will take a lot of inspirations.
I'm right now working on a big change with a change in the API which will make me upgrade to version 3 of the library. I will then add a contributors chapter in the readme and add you there.

I did also add nodejs support a while back. Therefore closing the issue


[DEFECT] Raven does not support Python  >3.9 and the dependencies file should reflect it

Thank you for the defect report

[X] I am using the latest version of RAVEN.
[X] I have read the Wiki.
[X] I have created a minimum, reproducible example
that demonstrates the defect.

Defect Description
Raven does not support Python  >3.8 (e.g. Pymo installation failures, etc.) but the dependency file https://github.com/idaholab/raven/blob/devel/dependencies.xml does not reflect that (at least in Mac and linux):
<python skip_check='True' os='mac,linux'>3</python>
If the establish_conda is run, the latest version of python is downloaded (3.11)

Steps to Reproduce
Fresh installation of RAVEN
Expected Behavior
No failure in build and installation
Screenshots and Input Files
No response
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review

[ ] Is it tagged with a type: defect or task?
[ ] Is it tagged with a priority: critical, normal or minor?
[ ] If it will impact requirements or requirements tests, is it tagged with requirements?
[ ] If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[X] Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure

[ ] If the issue is a defect, is the defect fixed?
[ ] If the issue is a defect, is the defect tested for in the regression test system?  (If not explain why not.)
[ ] If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
[ ] If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
[ ] If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?

@joshua-cogliati-inl I see you are playing with the dependencies...maybe your work can address (or make obsolete) this issue too.

Few others dependencies (mostly optionals).

Hm, can you include the errors you get from the other dependencies? (or does it fail to solve for them)?

With optional libraries:
... Installing libraries ...
... Installing libraries from conda-forge ...
... conda-forge command: conda create --name usnc_plugin -y -c conda-forge h5py numpy=1.21 scipy=1.7 scikit-learn=1.0 pandas=1.3 xarray=0.19 netcdf4=1.5 matplotlib=3.5.3 statsmodels=0.13 cloudpickle=2.2 tensorflow=2.9 python=3.9 hdf5 swig pylint coverage lxml psutil pip importlib_metadata pyside2 cmake imageio=2.22 line_profiler pywavelets=1.1 fmpy pyomo=6.4 glpk ipopt cyipopt setuptools
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - cyipopt

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.software.inl.gov/public/osx-arm64
  - https://conda.software.inl.gov/public/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Ah, osx-arm64.  Does this work if you force python to be a different version? (For osx-arm64 I have used the x86_64 version instead because of problems like this (which will need to be fixed at somepoint.)))

After updating Numpy, xarray and matplotlib, osx-arm64 with conda at least sorta works (as in I got some test failures, but it did manage to successfully run establish conda and build raven).  So I would recommend trying again with devel.
I couldn't get a pip install to work on Mac OS with arm because it couldn't install tensorflow. (As of tensorflow 2.11 it only supports arm 64 on linux: https://pypi.org/project/tensorflow/#files )

Let's try to support python 3.9 or higher in our next release @joshua-cogliati-inl

The python version was explicitly updated to 3.10 in https://github.com/idaholab/raven/pull/2197. Closing.

The python version was explicitly updated to 3.10 in #2197. Closing.

@PaulTalbot-INL @wangcj05 @joshua-cogliati-inl The issue is in MAC/Linux not in Windows. For MAC/Linux, the dependencies file still reports:
 <python skip_check='True' os='mac,linux'>3</python>

The python version was explicitly updated to 3.10 in #2197. Closing.

@PaulTalbot-INL @wangcj05 @joshua-cogliati-inl The issue is in MAC/Linux not in Windows. For MAC/Linux, the dependencies file still reports:  <python skip_check='True' os='mac,linux'>3</python>

Hm, I think part of the problem is we don't have a way to say Python 3.9 and 3.10 in the dependencies file.


Packet Rate and Throughput Plots

Write a scripts that creates packet rate and throughput bar diagrams.

I added a packet loss plot script in a07a0c19bb86951a916dd0c3cda9ba6703ad5a50 ... That should resolve this :)


Node Js SteamUser is not a constructer or SteamUser is not a Function Error

Hi. In my code I'm trying to make a basic steam chat bot which accept all friend request and answer basic questitions.
Bot when i write this code https://imgur.com/a/zOr7VfY Getting this error. What i need to do ?
`
var config =require("./config.json");
var SteamUser=require("steam-user");
var SteamUser=require("steam-totp");
var client = new SteamUser();
client.on('LoggedOn',() => {
console.log("success");

});
client.on('friendRelationship',() => {
if(relationship == 2){
console.log("new friend added");
client.addFriend(steamId);
}

});
client.on("friendMessage",function(steamId,message){
console.log("an object came " + steamId +":"+ message);
if(message.toLowerCase()=="ping"){

	client.chatMessage(steamId,"pong");
	console.log("someone sent smt");

	}

if(message.toLowerCase()=="hi"){

	client.chatMessage(steamId,"hi");
	console.log("we sent smt");

	}

if(message.toLowerCase().includes("cs")){

	client.chatMessage(steamId,"busy");

}

});
client.LogOn({

	accountName:config.username,
	password:config.password,
	twoFactorCode:SteamTotp.generateAuthCode(config.shared_secret)

});

`

You've imported steam-totp as SteamUser, overwriting the actual steam-user import.


Upgrade to react-syntax-highlighter v11

Feature Request
Description

A breaking change was made from v10.3.2 to v10.3.3 in https://github.com/conorhastings/react-syntax-highlighter.  It was fixed to be passive, but they made the change again to v11.  We should investigate upgrading to v11.

@ryanthemanuel I have investigated into v11 and pushed some changes to https://github.com/cerner/terra-core/tree/update-react-syntax-highlighter. Please have a look at it. And tell me if anything else is required to be changed.


Agent's z and h values are ignored

Hi @noeperez @roberottt,
I use the following agent config for simulation:
hunav_loader:
  ros__parameters:
    map: small_house
    publish_people: true
    agents:
      - agent1
    agent1:
      id: 1
      skin: 3
      behavior: 1
      group_id: -1
      max_vel: 1.5
      radius: 0.5
      init_pose:
        x: 1.866144
        y: 0.323669
        z: 1.250000
        h: 0.0
      goal_radius: 0.3
      cyclic_goals: true
      goals:
        - g0
        - g1
        - g2
        - g3
      g0:
        x: 3.629330
        y: -0.875358
        h: 1.250000
      g1:
        x: 2.938339
        y: -3.290771
        h: 1.250000
      g2:
        x: -0.968620
        y: -3.867865
        h: 1.250000
      g3:
        x: -1.914606
        y: -0.930699
        h: 1.250000

The problem I noticed is that the spawned human doesn't touch the floor and just walks in the air.

I tried to set different z and h values. But it doesn't seem to have any effect in Gazebo at all.
Could you please advise what I'm missing here?

BTW, just noticed in logs:

So it seems like some params are ignored. Will double-check the yaml. Maybe it's broken after copy-pasting.

It seems like we just don't print that info.

So the question is still actual: why does the human fly?

Also checked agent_manager and it seems like z is not used at all. There are 2d vectors everywhere. So how can we correctly position a human in a 3d space?

Hi,
the z value is just the initial height of the model. It is used to put the model initially in a higher position than the floor or the surface in which the model should walk on. Once the simulation is started, the models fall on the floor/surface (because of the gravity). So, then, the z is not used to navigate anymore.
Regarding the "flying humans", you are right, in the "small_house" and "warehouse" scenarios the humans does not fall properly on the floor and stay a bit higher. We are looking into it and trying to fix it as soon as possible.

The root cause is here. Z=1.0 works for the small_house. But ideally, it should be taken from z position instead.

We have fixed the problem. Please, pull the changes.
The human agents do not have collisions, and when the simulation starts, they fall to zero height (in the middle of their bodies approximately). So, we need to add an extra height (Z) according to the height of each model in order to put them on the floor (the floor of all the scenarios must be at zero height).

It's fixed. However, it'd probably make sense to move that magic numbers to some config files instead of hardcoding them in code. As any custom model would require extending this switch, which is not good from a design perspective. Do you agree with it?


Possible performance issue with dragover

I'm submitting a ...
[x] bug report
[x] feature request
[ ] question about the decisions made in the repository
Do you want to request a feature or report a bug?

A feature and possible also a bug.

What is the current behavior?

In firefox (and probably other browsers), it seems that the dragover event is fired hundreds of times when an item is dragged over an element. This leads to a drop in FPS and it seems to be made worse depending on how many elements have had draggable / droppable applied.
The performance hit seems to be worse on firefox than e.g. chrome.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.

Taken using Firefox performance analyser:

Most of these events are dragover.

What is the expected behavior?

Dragover not to fire so many times.

What is the motivation / use case for changing the behavior?

Improved performance, keep the FPS from dropping so low.

Please tell us about your environment:
Browser: [all | Firefox 49.0.1 ]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Suggestion how to fix:
At the moment when onDragOverCallback it will only fire if this._dragDropService.isDragged is true. Then a class is added this._elem.classList.add(this._config.onDragOverClass);. Maybe a further check should be done so that the code is only fired if this class has not already been added to the target element e.g.:
    _onDragOverCallback (event: MouseEvent) {
        if (this._dragDropService.isDragged && !this._elem.classList.contains(this._config.onDragOverClass);) {
            this._elem.classList.add(this._config.onDragOverClass);
            this.onDragOver.emit({dragData: this._dragDropService.dragData, mouseEvent: event});
        }
    };

Hi @danjford
Thank you for your investigation. I will have a look.

Hello!
So currently I am running into a performance issue and this looks related.  I have dnd-sortable being applied to a complex object because of the nature of this application. With 2 elements, if I start dragging an element between the 2 spots quickly, i noticed a ton of work was being on during the dragover event that would not let the page repaint quickly. I noticed a huge performance hit when I have 88 elements.

Any update on this @akserg

Hi @joshvanal
I have the similar issue inside of my project as well. I have a fix and still test it until rest of the week.

Awesome @akserg. If there is anything I can do to help please let me know!

Same here, dragover event called so many times that makes the application freeze and takes like 3-4 seconds to show the new item position (dragging a div column in a list of 5 elements). Have you set a debounce as a fix?

Hi same issue here:
When I Drag in plunkr (http://embed.plnkr.co/JbG8Si), it works fine:

But on my app:

Memory get saturated.
I am using angular4 and bootstrap4
Thanks

@alan345 I have, and I have a block in the page that uses the auth service to check if the user is logged in, in my header it shows if the current user is logged in.
I had the same issue because I was checking with angular-jwt if the token was expired and it was resulting in some computation, I've fixed it temporarily by checking only page load and then just return the isLogged stored boolean. I think it would be better if I used an Observable using the async pipe.
However, seems the issue is that angular re-renders the whole page

How's it going @akserg?

If someone needs a quick workaround:
Change the change detection to OnPush and trigger it manually.
`import {
...
ChangeDetectionStrategy
} from '@angular/core';
@Component({
...
changeDetection: ChangeDetectionStrategy.OnPush, // set to OnPush
...
})
export class BoxComponent {
...
}`

Would be great to hear some news on this, currently I'm running into performance issues while dragging elements around, when there are ~8-10 elements in my sortable container. I see in the elements view of chrome that all draggable + droppable elements get updated permantly (divs are flashing in the DOM) while dragging an element anywhere on the screen. Will try to set the change detection to onPush for now.

So i'm dealing with a similar issue where the dragging is just so laggy when theres a lot going on the page.
I have a few components that were repeated in a loop and I can drag it across those components but it's so laggy
The change detector seems to be the cause of the lag.
The workaround i did for this was to detach the change detector on drag start and to reattach it on drop. You could also set the change detection strategy to on push but this way you get to keep the change detector strategy and just turn it off while dragging.
`
constructor( private cd: ChangeDetectorRef) { }
onDragStart(){
this.cd.detach();
}
onDrop(){
this.cd.reattach();
}
`

i faced the same issue, because of having function's call inside draggable element, this function returns text or formatted date due to conditions, so it was called thousands times during dragging, i fixed this by placing already prepared data into the template.

@KDingeling
Hi, Even I'm facing the issue in my angular app. Please provide the solution if you have solved your issue.
I am using Angular 4.4.3 and Primeng 4.2.1.

@shashidhargm
Hey, I will take a look next week when I'm back at work. Can't remember it in detail.

@KDingeling
Thanks :)

I had similar issue my solution is fork this lib and do the next modification in AbstractComponent
Change
this.elem.ondragover = (event: DragEvent) => {
     this._onDragOver(event);
     if (event.dataTransfer) {
         event.dataTransfer.dropEffect = this.config.dropEffect.name;
     }
     return false;
};

by
        this.ngZone.runOutsideAngular(() => {
            this.elem.ondragover = (event: DragEvent) => {
                this._onDragOver(event);
                if (event.dataTransfer) {
                    event.dataTransfer.dropEffect = this.config.dropEffect.name;
                }
                return false;
            };
        });

This change implies change the constructors to inject ngZone
I am not using dnd as a library I have copied all files in my app to do the tests.
Also I made my own changes to improve performance a little and clean code. But the main change to improve performance is this.
Also as @AnthonySaldana suggested I detach and reattach cdr in onDragStart / onDragEnd in the library, so I do not need to do it in all components that use dnd but I reduce detectChanges timeout to 20ms to get about 50fps

@jmesa-sistel @akserg I also found running the drag events outside the Angular zone has significant performance benefits. There are still issues with lots of elements but this is much better. Created a fork here: https://github.com/joedjc/ng2-dnd

@joedjc
Remeber to execute the events inside angular
For example:
_onDragStartCallback(event: MouseEvent) {
        this.dragDropService.isDragged = true;
        this.dragDropService.dragData = this.dragData;
        this.dragDropService.onDragSuccessCallback = this.dragSuccess;
        setTimeout(() => {
            this.elem.classList.add(this.config.onDragStartClass);
        }, 0);
        this.ngZone.run(() => {
            this.dragStart.emit({ dragData: this.dragData, mouseEvent: event });
        });
    }

The seTtimeout fix another bug when you try to drag an element and you click near the border
I have rewrite the library to fix 4 or 5 bugs and I have clean the code and now the performance is not a problem. I will try to publish soon, when I have time, too busy at work. Too many changes to make a PR.

@jmesa-sistel @akserg I also found running the drag events outside the Angular zone has significant performance benefits. There are still issues with lots of elements but this is much better. Created a PR here: #269

It really is giving lots of performance benefits!! Thank you :)


chore: release master

:robot: I have created a release beep boop
ton-grpc: 0.9.4
Dependencies

tonlibjson-client: 0.16.1
0.16.1 (2024-01-31)
Bug Fixes

send request to latest ls when route is unknown (434bc28)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/getgems-io/ton-grpc/releases/tag/ton-grpc-v0.9.4 :sunflower:

:robot: Release is at https://github.com/getgems-io/ton-grpc/releases/tag/tonlibjson-client-v0.16.1 :sunflower:


cmd-ref: make changes related to update --rev

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.
🐛 Please make sure to mention Fix #issue (if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.
Please chose to allow us to edit your branch when creating the PR.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
Fix #1062. @jorgeorpinel, not all suggestions have been addressed though. :slightly_smiling_face:

@jorgeorpinel please review

@jorgeorpinel ping!

@jorgeorpinel, I have left two suggestions: one related to changing examples (to show about moving between tag to a latest rev in master), and other related to renaming revision to commit.
For former one, I don't want to modify current example, but feel free to add one if you think it's important. For later one, commit is not really an accurate word to use here for rev, because it really is a revision/reference, so, it can be anything like branch name, short-SHA, tag, etc.

@skshetry I think we're talking about different reviews. There were 4 pending comments in https://github.com/iterative/dvc.org/pull/1007#pullrequestreview-367607133 which don't seem to match with your comments. Anyway, I'm applying them in f8789da6 for #1110


no CSS changes made to main site show on any pages in the Identity area

I make changes to the CSS for my page, and then I go to log in, and I get blinded by the white background of bootstrap's Reboot.SCSS file, and there is no way to edit anything about that, since it is downloaded from elsewhere.

I also can't just add Inline CSS, since the entire page seems to be drawn straight from the aether, none of the pages that handle logging in are actually part of my project.

Not from the aether, but from a package. You can scaffold out the CSS for identity and make changes there.


Migrate theme

Just started reviewing :) :octocat: Sent from GH.

Pull request submitted to https://github.com/gamerson/liferay-blade-tools/pull/93. See changes here. :octocat: Sent from GH.


Crashed

java.lang.NoSuchMethodError: No static method encodeBase64URLSafeString([B)Ljava/lang/String; in class Lorg/apache/commons/codec/binary/Base64; or its super classes (declaration of 'org.apache.commons.codec.binary.Base64' appears in /system/framework/org.apache.http.legacy.boot.jar)

Code**
val header: MutableMap<String, Any> = HashMap()
header["alg"] = "HS256"
header["typ"] = "JWT"
    try {

            val algorithm: Algorithm = Algorithm.HMAC256("***************************")
            val token: String = JWT.create().withHeader(header)
                .withClaim("merchantId", "20070001001256")
                .withClaim("loginid", "********************")
                .withClaim("password", "********")
                .withClaim("language", "en")
                .sign(algorithm)

        showLog("valuesss", ">>>>>" + token)

    } catch (exception: JWTCreationException) {
        //Invalid Signing configuration / Couldn't convert Claims.
    }

@Gagandeep1408 where are you running this?

I'm implemented in android and when i try to run app in Android version
8.1. App crashed.
On Fri, 28 Aug 2020 at 01:54, Luciano Balmaceda<EMAIL_ADDRESS>wrote:

@Gagandeep1408 https://github.com/Gagandeep1408 where are you running
this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/auth0/java-jwt/issues/437#issuecomment-682172341, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AODKW4TGJR4J44XDO37ZH6LSC26IJANCNFSM4QMRZG5Q
.

The readme states that this library is not for Android. And signing tokens in a public client such as native app doesn't make much sense, since you can't keep the secret confidential.


move predicate regexp conversion into xpath classes

This PR was prompted by my seeing a bunch of code that only applies to XPath built selectors in the Locator & Selector Builder classes directly. This moves all XPath building code into the SelectorBuilder XPath classes.
In the process I realized we have a number of overloaded / confusing terms.
Locators are the ways elements can be located. One or more can be combined into a selector. For a given element, there can be multiple locators, but only one selector.
We overloaded the term filter. This code only uses it to mean either first or all. So filter_elements is now matching_elements and filter_selector is now: values_to_match, etc.

Pull Request Test Coverage Report for Build 1723

159 of 164 (96.95%)  changed or added relevant lines in 13 files are covered.
160 unchanged lines in 11 files lost coverage.
Overall coverage decreased (-0.1%) to 96.252%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/watir/locators/element/selector_builder.rb
9
10
90.0%

lib/watir/locators/element/locator.rb
26
30
86.67%

Files with Coverage Reduction
New Missed Lines
%

lib/watir/elements/select.rb
1
91.3%

lib/watir/elements/element.rb
3
93.79%

spec/watirspec/window_switching_spec.rb
4
96.65%

lib/watir/locators/element/locator.rb
5
91.46%

lib/watir/wait.rb
5
83.87%

spec/watirspec/alert_spec.rb
7
100.0%

lib/watir/capabilities.rb
12
76.83%

spec/watirspec/relaxed_locate_spec.rb
15
100.0%

lib/watir/legacy_wait.rb
18
77.27%

spec/watirspec/browser_spec.rb
42
99.68%

Totals

Change from base Build 1722:
-0.1%

Covered Lines:
10401

Relevant Lines:
10806

💛  - Coveralls

Pull Request Test Coverage Report for Build 1723

159 of 164 (96.95%)  changed or added relevant lines in 13 files are covered.
160 unchanged lines in 11 files lost coverage.
Overall coverage decreased (-0.1%) to 96.252%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/watir/locators/element/selector_builder.rb
9
10
90.0%

lib/watir/locators/element/locator.rb
26
30
86.67%

Files with Coverage Reduction
New Missed Lines
%

lib/watir/elements/select.rb
1
91.3%

lib/watir/elements/element.rb
3
93.79%

spec/watirspec/window_switching_spec.rb
4
96.65%

lib/watir/locators/element/locator.rb
5
91.46%

lib/watir/wait.rb
5
83.87%

spec/watirspec/alert_spec.rb
7
100.0%

lib/watir/capabilities.rb
12
76.83%

spec/watirspec/relaxed_locate_spec.rb
15
100.0%

lib/watir/legacy_wait.rb
18
77.27%

spec/watirspec/browser_spec.rb
42
99.68%

Totals

Change from base Build 1722:
-0.1%

Covered Lines:
10401

Relevant Lines:
10806

💛  - Coveralls


Harmonize RSS feed with W3C recommendations

Declare Atom schema support
Escape international characters in URL
Ignore locale in date

Thanks


emulate ecma-262

emulate js Spec, translate the words to animations to show how does it work

I do not know how to convert the words yet,  but it must be a good tool if can be implemented


Issues authorizing youtube application

Hi, I am having trouble authorizing the youtube application. When I open auth_url in the browser, select my google account and youtube channel, it gives me 403 error, even though I chose an email I created an app from.
Do I need to verify my app in order to upload youtube videos?

solved it by adding my email to Test Users