Massive query count on forum index

I'm just getting to grips with the codebase at the moment, and have written a set of importers to import our current forum from phpBB.
We have about 2000 threads and 20,000 posts - I have successfully imported our users separately, and then populated forum_categories, forum_threads and forum_posts and everything appears to be working the only issue at the moment is the massive number of queries that occurs on the forum index.
I am currently getting 4082 queries on forum index, which is 9 categories (under 3 title categories) - which seems way too much.
Taking a look at laravel debugbar I am seeing this - http://i.imgur.com/SCw1DSa.png
It repeats alternating between querying users and forum_posts for the majority of the 4000 queries.
So, two questions I suppose;

Is there another table I should be populating with additional information? I thought perhaps threads read might be the issue, perhaps?

Any ideas what else could be causing this? Have you tested the forums with a large amount of threads and posts?

Cheers

Ouch - yeah, I'm aware of the excessive querying but never looked at it in detail. Certainly not for large amounts of data. I've been wanting to optimise Eloquent calls throughout, not just to reduce the number of queries but to make select statements more specific instead of doing SELECT * everywhere.
I'll try to prioritise some changes that should improve this. Thanks for the heads up.
Regarding the threads read table, you might want to see if you can populate that based on your phpBB data (otherwise every thread will appear as unread for everyone) but it won't help with the queries unfortunately.

I don't mind contributing and/or doing it myself if you can point me in the right direction as to what is happening? I am starting to review the code, but obviously there's a lot to get caught up on.

Additionally I'll provide my importers when they're clean, incase anyone else wants to use them.

Of course, any contributions would be very welcome. The main place to look would be the API controllers. The views are worth looking at as well, only because some of the properties/attributes being called on threads/posts in those may be triggering queries that aren't covered by eager loading.
There are probably a few methods in the API that could do with having some ->with() calls added.

Hey,
If you're still using this, I've just pushed some changes to this and laravel-forum-frontend that reduce the query count overall. It still needs work, but the forum index should be less query-heavy now. If you've overridden the views and want to see the difference in category and thread views, you'll need to make the following replacements:

$category->threadsPaginated to $threads in the category.show view
$thread->postsPaginated to $posts in the thread.show view

I would be very grateful for some feedback if you get a chance to try it and I'll see if I can make some more optimisations before creating a new release.
Thanks

@unbolt have you tried to debug it with clockwork and/or the debugbar package?

https://github.com/barryvdh/laravel-debugbar
https://github.com/itsgoingd/clockwork

Most of the queries being duplicated are specific to the package models. Unfortunately part of it is due to the Forum::route() helper method, where relationships are called to construct the route parameters and some of them point to models that are already available in the view. I've yet to figure out a workaround for that as it's not a simple matter of eager loading, and I want to avoid having to pass more than one model to the method.
The N+1 problem with categories is also a culprit, particularly with the breadcrumbs.

Will caching be a solution? I don't mean the laravel caching for time but a custom caching for the single request. For example cache keys like: category_1 thread_5 and so on and before querying the DB it can look in the cache. This will prevent things like: thread 5 is put in as an extra model but also requested as a attributerelation from category 1. I created something like this for mutated attributes in an app. This could be put in an extra Cache class and should get implemented in all/most eloquent methods (what could be hard) - just an idea.

class Model
{
    protected $cache = [];

    protected function cacheGet($key, $default = null)
    {
        return array_get($this->cache, $key, $default);
    }

    protected function cacheSet($key, $value)
    {
        $this->cache[$key] = $value;
    }

    protected function cacheRemember($key, \Closure $callback)
    {
        if (!is_null($value = $this->cacheGet($key))) {
            return $value;
        }
        $this->cacheSet($key, $value = $callback());
        return $value;
    }
}

Yeah, caching queries for the duration of the request would make a lot of sense. The only issue there is that some attributes are cached already using the Cache facade, which is obviously a different thing serving a slightly different purpose. I'll need to figure out suitable naming to avoid confusion.

@Riari: What about Remember, Rememberer or something like this!?

I'll install the package again and run my import and let you know how it's looking, I took it out as I was considering using some old forum code I wrote instead. Will update this weekend.

The very first load did over 4k queries, now it's doing approx 250 for the page index.  I'll definitely need to look into some kind of view cache going on, the forums are super active (20k posts over the past 7 years or so) so I can probably get away with flushing caches on people making new posts.

I take it back, it doesn't seem to cache that for too long. Is there any information I can output for you to help in sorting this?

I think it will help if you can put in the list of queries that are done. The debugbar will give a great list for this including the place where the queries are requested.

Yes, a query log would be very useful, thank you. Odd that the initial load still resulted in so many queries as the changes I made should reduce them regardless of anything being cached.

@Riari I take a look in the repo and can't find tests and also no factories!? It will help to have factories and/or seeder to solve this issue - if there are some I can setup a clean instance and fill it with thousands/millions of entries and can take a look in the queries to find the place where it creates all the too much ones.

It's too big for pastebin and too long to post here. So I've attached a text doc with the query log in it... If there's a better way to export this than c/p let me know.
querylog.txt

@Gummibeer I agree, they would be useful. I wasn't very confident in my test-writing abilities when I originally forked this package, but 4.0 (which I started here: https://github.com/Team-Tea-Time/illuminate-forum) will have test coverage and model factories to support it. That said, I think it's still fairly easy to examine an issue like this with a much smaller set of data, especially as debugbar gives you some indication of duplicate queries.
@unbolt thanks :)

And a comparison on the second load if that helps at all.
query_2nd.txt

Issues I noticed in the Query Log:

Queries categories minimum 2 times
Queries threads 2 times
Queries alot of Users after every Post Query

So creating some Kind of request Caching will help here, also if the real Cache is disabled, like on my installations.

I haven't looked into it too much, but it sounds as though a lot of additional information is being queries on many of the requests which isn't needed.
Perhaps something like the eventbrite API  where you can optionally extend certain pieces of information would be useful on the API end so that you can grab simple versions of the category, for example, and optionally expand to get the last poster.
Just spit balling really, query caching would be one thing, but it doesn't really get to the root of the issue if that queried information isn't needed at all.

If I edit the routes on the laravel-forum-frontend here to point the index as my own controller somewhere, would that make any sense for me to generate my own version of the forum index?
I'm running out of time slightly, I wanted to get the site online by Legion pre-patch which is probably the 19th given the current rumours, so if I have to bodge together my own forum index using my own queries to get it workable I can do that.
Ran the code on the Pi2 instead of my MBP and it won't finish loading the page in under a minute, so probably won't be workable on the Digital Ocean node we currently run the site on. This would allow me to write something quickly that only uses the bare minimum query and then go from there.
Just wanted to check editing in that particular spot makes most sense before I do it?

You can do that, or you can extend the controllers somewhere and change the namespace in the config: https://github.com/Riari/laravel-forum-frontend/blob/1.0/config/frontend.php#L41

Cool, thanks.
Minor thought - we don't appear to be saving post and thread count anywhere. Is it querying every thread in the forum to get the post count and total post count?
We could store this somewhere, either database level against the forum and thread (threads and reply count respectively) or memcache is and increment as the figures change.
Thoughts?

They're cached at 5 minute intervals by default, but are otherwise not stored anywhere. Could you open an issue for that? Or if you're up to it, maybe do a PR to change the current caching of those attributes? I think doing it at the database level and incrementing/decrementing via the ThreadObserver and PostObserver classes would make the most sense.

That would explain the initial load and then no load for a little while. I'll open an issue for it and work on it and provide my code, but I don't think I feel confident enough in my gitting abilities to do a pull request just yet.

With the changes from #142, this is certainly a lot better. All that leaves is to address the duplicated category and thread/post author queries.
I might move the category depth and deepestChild attributes to the DB as well, which probably means the caching (along with forum.preferences.cache_lifetimes) will be removed completely.
I'll keep this open until I get a chance to make more optimisations. Thanks for the help!

@Riari Is it possible to make a release with the lastest changes ? Thanks !

New release is out now. Thanks for your patience!


Fix dev12 build

The dev12 toolset was unhappy with the redeclaration of class static
constants, that was done to satisfy clang. Dev12 treats the second
declaration as a second definition and makes the linker unhappy.
Conditionally compiled out the redeclarations on dev12.

LGTM (not-sure tab comment).

Thanks! Fixed all the tabs in the comments


Creating a paged gui with VirtualInventory inside it

Hi there. Looks like there is no way to create a PagedGui what will show VirtualInventory, so there is no way to create paged interactable inventories, even while the VirtualInventory itself supports creating inventories much bigger than vanilla ones. I think it's a big omission.
I saw the #43, but it's quite complex and not portable to implement our own solution instead of using a default one. Can you implement this feature in InvUI, please? I believe a lot of people would like to see it.

This functionality was already added 1.17


I believe this page should say 10 HOURS... not 10 DAYS.

[Enter feedback here]

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

ID: 5d689602-4103-4688-0ca4-dadd3069e3ea
Version Independent ID: 7402857f-bbf0-008e-ceaa-9fd879d95770
Content: Create the Key Distribution Services KDS Root Key
Content Source: WindowsServerDocs/security/group-managed-service-accounts/create-the-key-distribution-services-kds-root-key.md
Product: windows-server
Technology: security
GitHub Login: @JasonGerend
Microsoft Alias: jgerend

Hey @GreysonMitchem,
Thanks again for contacting Microsoft. We value your feedback.
A documentation change has been made correcting the length of time and will be live after the next business day. We will now be closing this thread.
Thank you and have a most pleasant day.
#please-close


Added SetMouseOffset

Needed mouseScale to be seperate for x and y so it works when the width and height are different.
For example works with a size of 500x500 but not when using 1024x600.
Solved by addding SetMouseOffset to set the scale with a Vector2.
Default scale is 1.0f for both x and y and SetMouseScale sets both aswell.
Example
Vector2 size = { GetScreenWidth(), GetScreenHeight() };
Vector2 offset = { 1920.0f / size.x, 1080 / size.y };
SetMouseOffset(offset);

Actually, proposed SetMouseOffset() was intended to add and additional offset to mouse position reads.
For two dimensions scaling, SetMouseScale() could be just changed to receive a Vector2 scale.

Oh okay!
I could use a mouseOffset global in mouse reads like so
return (Vector2){ mousePosition.x+mouseOffset.x*mouseScale.x, mousePosition.y+mouseOffset.y*mouseScale.y };

Is that what you mean?

Yes, that's what I mean! :)
Actually, I'm already using something similar on fullscreen mode.

I found renderOffsetX and renderOffsetY. Can use that and maybe change to a Vector2 if it is used in the same way?

Sorry, I think it's not possible, those are used for letterbox screen rendering when needed.

Added and updated my example above. Order of operations needed fixing.

I'm reviewing this change, probably modyfing something...


⚠ Bofrost.lu has degraded performance

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

HTTP code: 200
Response time: 912 ms

Resolved: Bofrost.lu performance has improved in 8646c18 after 11 minutes.


Fix accountstate sndex  to refer account index (scope)

Fixes #issue_number
Description

Test scenarios

Checklist:

[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have cleaned up the code in the areas my change touches
[ ] My changes generate no new warnings
[ ] Any dependent changes have been merged and published in downstream modules
[ ] I have checked my code and corrected any misspellings
[ ] I have removed any unnecessary console messages
[ ] I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
[ ] I have tested for mobile functionality and responsiveness
[ ] I have added appropriate test coverage
[ ] I have updated relevant documentation and/or opened a separate issue to cover the updates (Issue URL: )

@guilledk made a similar PR for the same fix that was merged


Homebridge stop running after update

Hi!
I use this plugin for years, without probelm, but yesterday itt stopped working, after I update my Pi.
The error massage:
[3/4/2019, 2:05:08 PM] [Broadlink RM] Initializing BroadlinkRM platform...
/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/node-persist/src/local-storage.js:647
throw Error('[PARSE-ERROR] ' + file + ' does not look like a valid storage file!');
^
Error: [PARSE-ERROR] /root/.homebridge/plugin-persist/homebridge-broadlink-rm/33d6be66cf217ee1928d22ae1d245ca3 does not look like a valid storage file!
at LocalStorage.parseFileSync (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/node-persist/src/local-storage.js:647:19)
at LocalStorage.parseStorageDirSync (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/node-persist/src/local-storage.js:596:26)
at LocalStorage.initSync (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/node-persist/src/local-storage.js:141:14)
at Object.nodePersist.initSync (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/node-persist/src/node-persist.js:37:32)
at Object.init (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/homebridge-platform-helper/helpers/persistentState.js:10:15)
at BroadlinkRMPlatform.HomebridgePlatform (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/homebridge-platform-helper/platform.js:14:21)
at BroadlinkRMPlatform (/usr/local/lib/node_modules/homebridge-broadlink-rm/index.js:11:1)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:296:32)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
Can anyone help me?
Thanks!

Had the same problem two days ago. Hard but working: Remove your Homebridge (= all devices too) from HomeKit and restart both systems. After adding the devices again all works fine. Did you also experience that Siri will perform commands related to Homebridge successfully, but tell you there was an error anyways? Greetings from Germany, may it help others :-)

Hi!
Thanks for the hint, but not working for me.
I put back my backup, than update again, and everything works fine!
Greetings from Hungary :)


Add security.txt to web site

Our security advisory for log4j says
"Please contact the SCS project management team at project at scs dot sovereignit dot de to ask security questions or report security issues."
which is good, as we at least clearly communicate the communication channels.
Better would be to have a security-specific address (alias) that also offers encrypted contact options (PGP and maybe additional options). And to use a standardized way to advertize this using the security.txt standard.
See https://datatracker.ietf.org/doc/html/draft-foudil-securitytxt-12 and https://securitytxt.org/ .

Good point! We should also add this information as SECURITY.MD to at least the most frequently used repositories in the SovereignCloudStack namespace.
Should we offer a public PGP key on our website? Who is going to hold the key?

👍 on the SECURITY.MD (Docs/ at least, some other repos are going to be merged and archived anyways).
For the GPG key, I'd say the Product Board can appoint those people?

The PR #212 adds a security-related RSS feed to which one may subscribe if needed.

We should also hint these information here: https://github.com/SovereignCloudStack in the repository: SovereignCloudStack/.github

See: https://scs.community/feed/security.xml


fix: ingestion was not getting trigger for 1 day scheduler

Describe your changes:

Fixed issue related to ingestion workflow was not getting triggered

Type of change:

[ ] Bug fix
[ ] Improvement
[ ] New feature
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation

Checklist:

[x] I have read the CONTRIBUTING document.
[ ] My PR title is Fixes <issue-number>: <short explanation>
[ ] I have commented on my code, particularly in hard-to-understand areas.
[ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Maven-CI failed due to invalid JSON response not related to code


Error: Cannot find module 'lodash/lang/isFunction'

I just installed JSCS into a project of mine. When I try to run it, I get the following error:
$ node_modules/jscs/bin/jscs
module.js:338
    throw err;
          ^
Error: Cannot find module 'lodash/lang/isFunction'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (d:\fm-log\node_modules\jscs\node_modules\babel-core\lib\api\node.js:21:29)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26195852-error-cannot-find-module-lodash-lang-isfunction?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github).

Re-installing the package fixed it.

Thanks for reporting. To be clear, you reinstalled jscs and it worked
right? You didn't install lodash separately to make it work.
On Aug 26, 2015 6:20 AM, "Oliver Salzburg"<EMAIL_ADDRESS>wrote:

Closed #1730 https://github.com/jscs-dev/node-jscs/issues/1730.
—
Reply to this email directly or view it on GitHub
https://github.com/jscs-dev/node-jscs/issues/1730#event-392680112.

@mrjoelkemp Correct. I realized that the installed lodash dependency was missing a lot of files. Something must have went wrong during the initial installation of jscs. I cleared out my whole node_modules and ran npm i again.

Awesome. Thanks for the clarification! Enjoy.
On Aug 26, 2015 8:04 AM, "Oliver Salzburg"<EMAIL_ADDRESS>wrote:

@mrjoelkemp https://github.com/mrjoelkemp Correct. I realized that the
installed lodash dependency was missing a lot of files. Something must
have went wrong during the initial installation of jscs. I cleared out my
whole node_modules and ran npm i again.
—
Reply to this email directly or view it on GitHub
https://github.com/jscs-dev/node-jscs/issues/1730#issuecomment-134967438
.

I'm getting this issue after trying to update to 4.6.1. Not sure how to fix it

Try npm cache clear, removing your node_modules folder (or just jscs) and
then doing an npm install.
Does that work?
On Mar 24, 2016 12:33 AM, "simkessy"<EMAIL_ADDRESS>wrote:

I'm getting this issue after trying to update to 4.6.1. Not sure how to
fix it
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/jscs-dev/node-jscs/issues/1730#issuecomment-200660132


DCOS-56482/COPS-5100: fix: update status priorities

⚠ needs backport to 1.13 after merged (DCOS-56483)
old setup was misleading since stopped is user initiated, having a group dislay 'Running (2 of 3)' is okay if third one is stopped.
Closes DCOS-56482
Closes COPS-5100
Testing
have stopped and running services in a group - it should say "Running (1 of 2)" now.

Trade-offs

Dependencies

Screenshots
Before:

After:

Do we want a test for this? If yes, I can add one.

Also, have we asked the designers? I am hesitant to do something like this, just because one customer requested it. It might be that the old way is better for most of the customers.

re tests: good point, there should be a failing test after this change 🤔if not, would be awesome if you could do it 🙇
re change: yeah, we discussed it with dima and designers, you can check COPS issue for reference 👍

If it's okay with the designers, I am okay with it, too. I will add a test.

@juliangieseke , I added an integration test for this specific scenario. I think that adding integration tests for other similar scenarios (for example warning having higher priority) is a good idea, but not in the scope of this bug fix.

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


Start to graduate PrototypeMultiProcessingReadingService from "prototype mode"

    unrelated: we should start to graduate it from "prototype mode" and starts find initial pioneering use case adoption~

Originally posted by @wenleix in https://github.com/pytorch/data/pull/919#discussion_r1055161856

We should start to replace MultiprocessingReadingService by PrototypeMultiProcessingReadingService

Agree, and we need rigorously testing for this. Last I checked PrototypeMultiProcessingReadingService seems to behave correctly when things go right, but I worry that it doesn't necessarily clean up properly when an exception is raised.

Forget to mention, currently PrototypeMultiProcessingReadingService has distributed code, we need to graduate when the SequentialRS becomes available to combine both PrototypeMultiProcessingReadingService and DistributedReadingService.

Forget to mention, currently PrototypeMultiProcessingReadingService has distributed code, the graduation is blocked by availability of SequentialRS to combine both PrototypeMultiProcessingReadingService and DistributedReadingService. Then, the distributed code from PrototypeMultiProcessingReadingService can be removed.

With #985, what's leaving to graduate Prototype? :)

With #985, what's left to graduate Prototype? :)

Nothing in my mind. We can start to change it next week.


GSD Request

--- GSD JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v5.6 to before v5.15.25",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=90b93f1b31f86dcde2fa3c57f1ae33d28d87a1f8",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=db333693b052cf769d8d6dde034ad679ce2e9ab9"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "90b93f1b31f86dcde2fa3c57f1ae33d28d87a1f8",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "db333693b052cf769d8d6dde034ad679ce2e9ab9",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "ipv4: fix data races in fib_alias_hw_flags_set\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.15.25 by commit db333693b052cf769d8d6dde034ad679ce2e9ab9, it was introduced in version v5.6 by commit 90b93f1b31f86dcde2fa3c57f1ae33d28d87a1f8. For more details please see the references link."
}
--- GSD JSON ---

This issue has been assigned GSD-2022-1000460


add files to Vault

as an iLogic user, I need to create export file formats, like IFC, STP, or any other type, and add them to Vault. iLogic-Vault methods do not include a method to add new files.
Sample: dim success as bool = iLogicVault.AddFile(oExportFullFilePath).

Hi Markus, I was just wondering if you could advise, I am currently working on some automation for the products that our company produce and would be interested in a sample code if possible to implement the add files to vault as we have a few exports that it would be good to automate checking in to vault, I tried the above sample but it didn't work, but that may just be because I am fairly new to the coding side, at least the advanced side anyway.
Thank you in advance
K

@Caddylad: branch 2021.1.0 already includes the add file function. I did not compile a release yet and planned to do it by end of March. For now, you would need to compile the latest commit of the mentioned branch on your own.


[REFALM] Chip-tool has to be implemented for Refrigerator Alarm Cluster

Summary
Chip-tool has to be enabled with below mentioned Attribute :

[ ] Latch

Chip-tool has to be enabled with below mentioned command :

[ ] Reset

GitHub hash of the SDK that was being used
40fb7c246671e9d37ca8bb2cfbf37f81c1509334
Platform
raspi
Platform Version(s)
RPI - 4, 8GB RAM

Spec says:

[8.92] The Reset feature SHALL NOT be supported by an instance of this cluster.

Therefore it never has a Latch attribute or Reset command.


update gitignore to include folder created by make container-serve

When I use make container-serve a bunch of folders are created that are not useful for version tracking and git is not ignoring them.

I wonder if this is the right fix. Can we have those folders appear in the container's ephemeral file system? That way, they shouldn't bother you @remyleone

/lgtm


Fix type declaration

TSC emits the following errors for index.d.ts:
node_modules/@wojtekmaj/enzyme-adapter-react-17/index.d.ts:5:5 - error TS2377: Constructors for derived classes must contain a 'super' call.

5     constructor () {};
      ~~~~~~~~~~~~~~~~~

node_modules/@wojtekmaj/enzyme-adapter-react-17/index.d.ts:5:20 - error TS1183: An implementation cannot be declared in ambient contexts.

5     constructor () {};
                     ~

This PR fixes the issues by removing the implementation from the constructor in this type declaration.

@noah-friedman As the original author of these typings, can you review please?

@wojtekmaj looks good to me. Apologies for the oversight in the initial implementation.

@wojtekmaj do you mind publishing a new version that includes this change?  It is necessary to fix TSC errors for those experiencing them.

Released v0.3.2.


Using ModuleNotFoundError breaks python 3.5 compatibility

ModuleNotFoundError was only added in 3.6, before only ImportError was raised.
There are two possibilities:

drop python 3.5 support
Use ImportError, ModuleNotFoundError inherits from ImportError

See #444

Should change to ImportError then.  I didn't realize ModuleNotFoundError wasn't compatible.  The builds pass for py3.5, but of course they are versioned from a git-repo, so that code is never called.


Zoom in Zoom out

How can I control the zoom of the component with buttons?

You can set the pageScale prop https://github.com/stellR42/vue3-pdf-app#pagescale


Unable to Redeem Codes

Hi,
I tried to do the same steps as mentioned.
But the application is only moving the mouse pointer on the game screen.
No codes are copied or redeemed.
I really liked your app and love the idea of redeeming multiple codes.
I would really appreciate if you can help me with it.
Thank you in advance
If required, I can share screen and you can help me with the error !

Hi,
Besides the movement, the mouse should perform "click" actions as well. Does the cursor move on the actual buttons you're supposed to press when manually redeeming codes?

Yes, It hovers over the buttons which we actually use for copying and claiming codes
But I don't see it pasting codes in the code section, its always blank, while the pointer keeps moving
The mouse pointer goes to Claim Now button after 10 runs, I can see that
But there is not Code being pasted anywhere in the game screen

Does it also hover over the textbox to paste the codes? I've just tried it out on my own PC and it's working just fine...

Yes, It does hover over the test boxes to paste the codes.
But nothing gets pasted there...the mouse just then keeps moving

I'm not sure if I can help you, but if you have discord I can try and see what happens on your PC.
You can join me here:
https://discord.gg/UGU655

Here's a screen recording of what's happening at my end
Please check and let me know
https://photos.app.goo.gl/m7o3X9LD252btD1p9

I've removed the URL to make sure no one can try to read and steal your codes.

As discussed, it appears to be some weird issue which I can't reproduce and unfortunately can't solve either.
~Auriorx

I have the same issue. it moves and clicks, but doesnt actually paste codes into the box so im at a loss as well.


Compiled download?

Can you provide a compiled download of this mod

Just finishing up the SpaceWarp 0.4 conversion and will release after that's tested

Available for download now: release v0.1.0


feat: added new options to the CLI

Added speakers, categories and tags options to the cli

This PR fixes #5

I having trouble running through the workflow here. I'm getting some of the errors below:

At this point, it makes sense to add some functional tests. This means that you can stub out the downloading and transcription bit and focus on the features and also ensure that new features aren't breaking existing functionality.

 > tstbtc oubZGyDY4Dc chaincodelabs/chaincodepodcast -t 'Test test test' -s 'Adam Jonas, Murch' -T 'mempool,other' -c 'podcast' produced https://github.com/adamjonas/bitcointranscripts/pull/7/files
The transcript itself is in pretty good shape but the dir and subdir creation with index files needs some cleaning up.

Unsure if introduced in this PR but the transcripts aren't being cleaned up from a failed run.
See  https://github.com/adamjonas/bitcointranscripts/pull/6,  https://github.com/adamjonas/bitcointranscripts/pull/8,  https://github.com/adamjonas/bitcointranscripts/pull/9

Shall we move the creation of the test suite to a different issue as we already have a lot of PRs lined up

This shouldn't be empty, if there is no option that is provided, it shouldn't be in the front matter.

I'm going to merge this but https://github.com/bitcointranscripts/tbtbtc/pull/32#issuecomment-1404106196 needs to be addressed

Should we do this for the other options too (viz. tags, speakers, etc)?

There should not be empty strings in front matter no matter the type.

There should not be empty strings in front matter regardless of type.


pass response code in xdr callback

XDomainRequest has a limitation where the callbacks (onload, onerror, ontimeout, etc) don't have access to the response code. If onload is called, then that indicates success, so I just pass 200 as the response code to the callback. However for onerror, it makes it hard to detect what type of error it is (could be 400 bad request, 413 request entity too large). I attempt to string match on the responsetext, although apparently even the responsetext is unavailable (empty string) in onerror: http://stackoverflow.com/a/13592615 (frowny face).

This also closes: https://github.com/amplitude/Amplitude-Javascript/issues/16

I also verified on IE10 on Windows 7 that the events are cleared upon sending

LGTM


Refactor rules to use series where appropriate

This PR addresses an issue where we were unable to accurately report rows with errors for rules with compound conditions i.e:
all: [
cond1,
cond2
]
This was because we were creating a column for each condition and these columns were never getting compared, so if there was an error in one column it was reported as an error, even when all conditions had to be met for an error to be reported. To address this issue, we now only create one results column that is provided to the action when available. This results combination is the result of logically combining all conditions with 'and' or 'or' where appropriate. This fix required a change to any operator that needs to report on specific rows with errors. These operators now return a pandas series containing true where the condition was met and false where it was not.

I like the idea, only have 2 concerns:

I see that empty_within_except_last_row operator was not changed. Is it planned or haven't you noticed it?
Can you please provide an example of how can we use pd.Series results in the client code? I mean, how can we use it in generate_dataset_error_objects function?

I like the idea, only have 2 concerns:

I see that empty_within_except_last_row operator was not changed. Is it planned?
Can you please provide an example of how can we use pd.Series results in the client code? I mean, how can we use it in generate_dataset_error_objects function?

The following operators have not been updated because they involve the entire row, so the entire row will get flagged as an error:

exists
not_exists
empty_within_except_last_row
non_empty_within_except_last_row
contains_all
is_ordered_set
is_not_ordered_set

I've updated the generate_dataset_error_objects function to look something like this (still needs some cleanup, but it will be included in my next PR on the CDISC side):

    @rule_action(params={"message": FIELD_TEXT})
    def generate_dataset_error_objects(self, message: str, results: pd.Series):
        # leave only those columns where errors have been found
        self.variable.dataset["results"] = results
        rows_with_error = self.variable.dataset[
            self.variable.dataset["results"].isin([True])
        ]

        target_names: Set[str] = RuleProcessor.extract_target_names_from_rule(self.rule, self.domain)
        targets_in_dataset = [target_name for target_name in target_names if target_name in rows_with_error]
        if targets_in_dataset:
            error_info: dict = rows_with_error[target_names].to_dict()
            error_object: dict = {
                "domain": self.domain,
                "rule_id": self.rule.get("core_id"),
                "severity": self.rule.get("severity"),
                "error": error_info,  # a mapping like {"column_name": {row_number: value}}
                "message": message,
            }
        else:
            error_info = {}
            for target in target_names:
                if target not in rows_with_error:
                    error_info[target] = "Not in dataset"
            error_object: dict = {
                "domain": self.domain,
                "rule_id": self.rule.get("core_id"),
                "severity": self.rule.get("severity"),
                "error": error_info,
                "message": message,
            }
        # add usubjid only if it is unique
        usubjid: Optional[pd.Series] = self.variable.dataset.get("USUBJID")
        if usubjid is not None and len(set(usubjid)) == 1:
            error_object["usubjid"] = usubjid[0]
        # sequence number is an optional column
        sequence: Optional[pd.Series] = self.variable.dataset.get(f"{self.domain}SEQ")
        if sequence is not None and len(set(sequence)) == 1:
            error_object["sequence"] = sequence[0]
        self.output_container.append(error_object)


Remove tangled_up_in_unicode from Dockerfile

Basically, the currently released visions package has the requirement tangled-up-in-unicode.  visions:develop does not have that requirement anymore.  visions hasn't had a release since 2021 - so I doubt it will be updated anytime soon.
The problem is, is that for some python versions the tangled-up-in-unicode package is 1.5 GB, which is not ideal.
If you run pip uninstall it should get rid of that unnecessary package.

[ ] Code completed
[ ] Smoke tested
[ ] Unit tests added
[ ] Code documentation added
[ ] Any pending items have an associated Issue

Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
https://github.com/flyteorg/flyte/issues/3050

This is only a problem in the case of python 3.10:
 for v in 3.8 3.9 3.10 3.11; do                                                                                 ✔  3.11  
    echo "handling python ${v}"
    docker run --rm -it ghcr.io/flyteorg/flytekit:py${v}-1.10.0 du -kh --max-depth=1 /usr/local/lib/python${v}/site-packages | sort -h | tail -n3;
done
handling python 3.8
127M    /usr/local/lib/python3.8/site-packages/llvmlite
153M    /usr/local/lib/python3.8/site-packages/plotly
1.2G    /usr/local/lib/python3.8/site-packages
handling python 3.9
127M    /usr/local/lib/python3.9/site-packages/llvmlite
153M    /usr/local/lib/python3.9/site-packages/plotly
1.2G    /usr/local/lib/python3.9/site-packages
handling python 3.10
152M    /usr/local/lib/python3.10/site-packages/plotly
1.8G    /usr/local/lib/python3.10/site-packages/tangled_up_in_unicode
2.9G    /usr/local/lib/python3.10/site-packages
handling python 3.11
127M    /usr/local/lib/python3.11/site-packages/llvmlite
156M    /usr/local/lib/python3.11/site-packages/plotly
1.4G    /usr/local/lib/python3.11/site-packages

Closing this PR as it'll most likely break the rendering of some documents in python 3.10.

@eapolinario do you think you might reconsider? ydata-profiling has shims enable usage without importing tangled-up-in-unicode https://github.com/ydataai/ydata-profiling/blob/3003e32ff3283e3446c36909d81e56444e6296ab/src/ydata_profiling/model/pandas/describe_categorical_pandas.py#L57 So it should work relatively well without tangled-up-in-unicode.


Bee UI - stack using podman, macos, ollama - assistant fails

I’m trying to run the bee stack under podman/macOS. (docker-compose is installed as the podman compose provider)
I have ollama running locally (homebrew, has gpu acceleration for inference), with various models including llama3.2:latest loaded
I’ve set ~/.homebrew/brew.env to include OLLAMA_HOST=<IP_ADDRESS> to ensure ollama listens on all interfaces (ie this is for my local machine serving ollama models)
My .env (same directory as the compose yaml) includes:
#LLM_BACKEND=watsonx
LLM_BACKEND=ollama
EMBEDDING_BACKEND=ollama
WATSONX_PROJECT_ID=
WATSONX_API_KEY=
WATSONX_REGION=us-south
# Ollama
OLLAMA_HOST=http://host.containers.internal:11434/
OLLAMA_MODEL="llama3.2:latest"

The intent here is to use ollama locally, not watsonx
I bring up the environment with podman compose --profile all up -d
However when trying to use the UI at http://localhost:3000/ ie bee assistant, I’ll just get
An error occurred [cause]: Error: Internal server error

I can connect to one of the containers and check network connectivity ie:
➜  bee-stack git:(main) podman ps | grep api
9541b364112c  docker.io/iambeeagent/bee-api:0.0.5       /bin/sh -c  outpu...  5 minutes ago  Up 5 minutes (healthy)            <IP_ADDRESS>:4000->4000/tcp, 4000/tcp                                       bee-stack-bee-api-1
➜  bee-stack git:(main) podman exec 9541b364112c nc -zv host.containers.internal 11434
host.containers.internal (<IP_ADDRESS>:11434) open
➜  bee-stack git:(main)

It turns out the api server is throwing an error getting to ollama
{"level":"error","time":"2024-10-28T21:37:52.633Z","hostname":"9541b364112c","name":"bee-api","queueName":"runs","job":{"id":"run_67200430a3d0085099bd33c0","name":"runs","failedReason":"fetch failed","data":{"runId":"run_67200430a3d0085099bd33c0"}},"err":{"type":"TypeError","message":"fetch failed: connect ECONNREFUSED <IP_ADDRESS>:11434","stack":"TypeError: fetch failed\n    at node:internal/deps/undici/undici:12502:13\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async post (file:///app/node_modules/.pnpm/ollama@0.5.9/node_modules/ollama/dist/shared/ollama.133b951a.mjs:112:20)\n    at async Ollama.show (file:///app/node_modules/.pnpm/ollama@0.5.9/node_modules/ollama/dist/shared/ollama.133b951a.mjs:383:22)\n    at OllamaChatLLM.meta (/app/node_modules/.pnpm/bee-agent-framework@0.0.33_@bufbuild+protobuf@1.10.0_@googleapis+customsearch@3.2.0_@grpc+grp_mfkxw3ngujdfeym4yi6s5rae6y/node_modules/bee-agent-framework/src/adapters/ollama/chat.ts:147:19)\n    at TokenMemory.add (/app/node_modules/.pnpm/bee-agent-framework@0.0.33_@bufbuild+protobuf@1.10.0_@googleapis+customsearch@3.2.0_@grpc+grp_mfkxw3ngujdfeym4yi6s5rae6y/node_modules/bee-agent-framework/src/memory/tokenMemory.ts:84:20)\n    at TokenMemory.addMany (/app/node_modules/.pnpm/bee-agent-framework@0.0.33_@bufbuild+protobuf@1.10.0_@googleapis+customsearch@3.2.0_@grpc+grp_mfkxw3ngujdfeym4yi6s5rae6y/node_modules/bee-agent-framework/src/memory/base.ts:39:13)\n    at async executeRun (file:///app/dist/runs/execution/execute.js:75:3)\n    at async file:///app/dist/runs/jobs/runs.queue.js:49:7\n    at Worker.processJob (/app/node_modules/.pnpm/bullmq@5.8.1/node_modules/bullmq/src/classes/worker.ts:786:22)\ncaused by: Error: connect ECONNREFUSED <IP_ADDRESS>:11434\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)\n    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)"},"msg":"Job failed"}

But this is on <IP_ADDRESS>:11434 not the host I specified ( http://host.containers.internal:11434/ )
Did I get the configuration wrong?
Perhaps there is an issue with passing through the environment and ignoring my configuration?.
I did also try using podman-compose as the provider with quite different results (possibly the subject of another issue?)
➜  bee-stack git:(main) podman compose --profile all up -d
>>>> Executing external compose provider "/opt/homebrew/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

9731c7f63b2227c9b3a8e083e1bc00a0812cd5e03f6b82f72a93698185f496f4
Error: crun: setrlimit `RLIMIT_NPROC`: Operation not permitted: OCI permission denied
Error: unable to start container "c097aa00e184453aff6b8881787e6e073ec21db42d28c1e57f26b68dc4b95c82": crun: setrlimit `RLIMIT_NPROC`: Operation not permitted: OCI permission denied
abb770105d2e5cc5988aaa54a830f47e19f94d7e22d5870da6eba6d88fe92ef1
bf330d3111f374aab42791c9834e5700b762f80330c97bc759f700cbbd3cde8d
92d6d3310ef257c620322ca066293213f17a3f909445985db67b2db56b6d2cf6
f26e4469ef74de3cdf1021a59b4ad3617b459cc325f8e4b07fb221ce6cd0192d
81bd82e5a80a9fa2f3a543b8b02d4beac8daeb9961436372ae70992f28b6f04b
08edd6a8193ed7bd94dcba6b844ea089e30b2e9f4195a686261e95297629a9c8
ed2ac5d34554312a9c105f2177f908ed439cc406cbd70d7530f789c10a86aeed
44c922a2af84723d4986e24c81bef6465fdc77ceda48154fee6d0905a8d3d899
057db966d4ec183a8f43854352406475db02e4b4f4e1ca4d01412ced8656bf2c
8630307b792d5eae20bccbe6f653f10309d6f6434621bd74b0d86273ac3271db

Note: Could be Similar to #7

Using the docker-compose provider, the log does seem to indicate the env file is being passed ie with log-level=debug:
DEBU[0000] Executing compose provider (/opt/homebrew/bin/docker-compose --env-file=.env --profile all up -d) with additional env DOCKER_HOST=unix:///var/folders/y0/dtxnsmfs0sz8_01kd0hhfjrc0000gn/T/podman/podman-machine-default-api.sock DOCKER_BUILDKIT=0 DOCKER_CONFIG=

Ah! Found the issue.
The OLLAMA_HOST variable is not getting passed in the environment section of the compose file into the api server.

I'll try a fix and can create a PR

I see some fixes have been made to utilize this env var recently, presumably not in the image being used in the current compose yaml iambeeagent/bee-api:0.0.5
Additionally the bee-api is using OLLAMA_URL. Tried also passing this through, and was able to get the bee stack UI working for a simple dialogue. I didn't however see where the model was specified (first time looking at code).

Have updated PR, but this may be work in progress from the core devs, so just updating as an example which seems to work.

Unfortunately host.containers.internal is a podman-specific feature, we'll have to find a more generic solution working in all container runtimes, I'll look into this.

Unfortunately host.containers.internal is a podman-specific feature, we'll have to find a more generic solution working in all container runtimes, I'll look into this.

Correct, but as far as the bee code goes, it's just a hostname. If networking is configured appropriately it could be a regular DNS-resolved hostname, but there are a myriad of ways that networking can be setup in podman and docker  (in some ways it's easier in k8s)
docker has host.docker.internal. In fact it looks as if, since mid 2023, this is now standard for podman too (see issue) so we could update to just state that
The above relates to the readme PR #11 -- there's also a separate PR #10 on the additional variables that need passing from compose.


[Help]多卡训练的时候总说cache/torch_extensions/py38_cu113/utils/utils.so: cannot open shared object file: No such file or directory

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Loading extension module utils...
Traceback (most recent call last):
File "main.py", line 431, in
main()
File "main.py", line 370, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/disk1/shisj/project/ChatGLM-6B/ptuning/trainer.py", line 1635, in train
return inner_training_loop(
File "/disk1/shisj/project/ChatGLM-6B/ptuning/trainer.py", line 1704, in _inner_training_loop
deepspeed_engine, optimizer, lr_scheduler = deepspeed_init(
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/transformers/deepspeed.py", line 378, in deepspeed_init
deepspeed_engine, optimizer, _, lr_scheduler = deepspeed.initialize(**kwargs)
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/init.py", line 165, in initialize
engine = DeepSpeedEngine(args=args,
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/runtime/engine.py", line 308, in init
self._configure_optimizer(optimizer, model_parameters)
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/runtime/engine.py", line 1167, in _configure_optimizer
self.optimizer = self._configure_zero_optimizer(basic_optimizer)
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/runtime/engine.py", line 1398, in _configure_zero_optimizer
optimizer = DeepSpeedZeroOptimizer(
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/runtime/zero/stage_1_and_2.py", line 154, in init
util_ops = UtilsBuilder().load()
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/ops/op_builder/builder.py", line 445, in load
return self.jit_load(verbose)
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/deepspeed/ops/op_builder/builder.py", line 480, in jit_load
op_module = load(name=self.name,
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1202, in load
return _jit_compile(
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1450, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/disk1/shisj/anaconda3/envs/glm/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1844, in _import_module_from_library
module = importlib.util.module_from_spec(spec)
File "", line 556, in module_from_spec
File "", line 1101, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: /disk1/shisj/cache/torch_extensions/py38_cu113/utils/utils.so: cannot open shared object file: No such file or directory
多卡训练，显示找不到utils.so这个文件
Expected Behavior
No response
Steps To Reproduce
无
Environment
- OS:Centos 7.9.2009
- Python:3.8
- Transformers:4.27.1
- PyTorch:1.12.1
-CUDA：11.3
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :True

Anything else?
No response

我也遇到了同样的问题，请问你现在有解决吗？

Make sure you have installed ninja, You can install it by conda install ninja

I run ninja --version and the result is 1.11.1.git.kitware.jobserver-1

goto the /disk1/shisj/cache/torch_extensions/py38_cu113/utils/ directory, then compile utils.so manully with ninja

goto the /disk1/shisj/cache/torch_extensions/py38_cu113/utils/ directory, then compile utils.so manully with ninja

Nothing in this folder


how to setup docker

Problem description

Problem location

I saw a problem on the following URL:

I couldn't find the information I wanted. I expected to find it near the following URL:

Other:

Project version(s) affected

Suggestions for a fix

@khinmyomyat558 Suggest you take a look at the following topics to learn how to set up Docker:

https://docs.docker.com/get-docker/
https://docs.docker.com/get-started/


colapse multi-line comments even if they don't have spaces/tabs before the lines

i have already filed an issue under Microsoft/vscode-go , but it seems vscode do  colapsing work
for a golang project:
https://golang.org/doc/effective_go.html#commentary gives an example of block comment which has no space/tab before the lines.
all of .go source files in Kubernetes project have package comments , and all of these package comments have no space / tab before the lines.
gogland EAP version can colapse this kind of comments even when they don't have no space / tab before the lines.

so i sugguest :
even when multi-line comments have no space/tab preceding the lines, vscode  should colapse this kind of comments.

cc @alexandrudima @rebornix

The current folding strategy is only indentation based. You ask for language aware folding. This is #3422


remove demo image from ./static

This resolves issue #13.

Turns out I can edit it myself!
Thanks


bump-formula-pr: determine url/tag from version

[ ] Have you followed the guidelines in our Contributing document?
[ ] Have you checked to ensure there aren't other open Pull Requests for the same change?
[ ] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

Examples:
Before this PR:
brew bump-formula-pr sops --url https://github.com/mozilla/sops/archive/v3.6.0.tar.gz

brew bump-formula-pr kustomize --tag kustomize/v3.8.1 --revision 0b359d0ef0272e6545eda0e99aacd63aef99c4d0

After this PR:
brew bump-formula-pr sops --version 3.6.0				# Determines new URL and SHA-256

brew bump-formula-pr kustomize --version 3.8.1			# Determines new tag and revision
brew bump-formula-pr kustomize --tag kustomize/v3.8.1	# Determines new revision only

What the patches would look like:
-  url "https://github.com/mozilla/sops/archive/v3.5.0.tar.gz"
-  sha256 "a9c257dc5ddaab736dce08b8c5b1f00e6ca1e3171909b6d7385689044ebe759b"
+  url "https://github.com/mozilla/sops/archive/v3.6.0.tar.gz"
+  sha256 "fee1c27f14f9f45b5955627e301aafcc38973c9458b25f99ef241bdd0a3b082c"

   url "https://github.com/kubernetes-sigs/kustomize.git",
-      :tag      => "kustomize/v3.8.0",
-      :revision => "6a50372dd5686df22750b0c729adaf369fbf193c"
+      :tag      => "kustomize/v3.8.1",
+      :revision => "0b359d0ef0272e6545eda0e99aacd63aef99c4d0"

Links to formulae:

sops.rb
kustomize.rb

Decision chart:

Added determine_formula_from_url() to fix style offenses:
C: Metrics/AbcSize: Assignment Branch Condition size for bump_formula_pr is too high. [<88, 240, 104> 276/275]
  def bump_formula_pr ...
  ^^^^^^^^^^^^^^^^^^^
C: Metrics/CyclomaticComplexity: Cyclomatic complexity for bump_formula_pr is too high. [92/85]
  def bump_formula_pr ...
  ^^^^^^^^^^^^^^^^^^^

Can you write some examples for what we would be able to do with brew bump-formula-pr with this pull request that we wouldn't be able to do before?

Done! Added examples to the description
The commands that we'll be to use will look like this:
brew bump-formula-pr sops --version 3.6.0			# Determines new URL and SHA-256
brew bump-formula-pr kustomize --version 3.8.1		# Determines new tag and revision

I've been using this branch for the past day or so and tried to fix any unexpected behavior

I'm very much in favor of this. Making those changes could enable us to easily integrate the bumping procedure with livecheck and automate it even further in the future.

Merging this, thanks for the new feature and explanation! Also @SeekingMeaning please check the email listed on your GitHub profile, thanks!


feat(popover-edit): allow tabbing from popup to next/previous cell

Includes a demo of how this allows a more spreadsheet-like set of user interactions when combined with some of Popover Edit's other features.

Note that this is rebased over top of #15762 - so so just review the 1a68597 commit changes.

Calling .submit() does not work - It submits the form without calling any event handlers (and triggers an old-school page refresh).


IncreaseBrush/DecreaseBrush inversion in Geared version

By replacing CandleSeries by GCandleSeries, you should see an inversion of the colors. It seems that IncreaseBrush and DecreaseBrush properties are inverted in code.

Thank you ver much for the report, I am finally building an example with financial series using the geared package, and it will be in the site soon, I have noticed many issues with this series, I am fixing them as I am building the article.
I am closing this issue, it is already solved and will be included in the next version of the geared package 1.2.6

Hi Beto, I just noticed that the problem is still there.

Live-Charts version
1.2.9 (Geared)

.Net Version
4.6.1

Windows
Win10 Home

The brushes are not inverted. It is notion of increase vs. decrease that are in fact reversed. A point where Open > Close uses the IncreaseBrush and a point where Close > Open uses the DecreaseBrush, which should be the other way round. It would be nice if you could fix it @beto-rodriguez , but the workaround is to just assign the brushes in Xaml keeping in mind that the IncreaseBrush is used for decreasing candles, and vice versa.


Fix executable flags

Remove executable flag from json, swift, c, h, m files
Add executable flag to pl, py, r, rb files
Resolves #87

This is close, but there are still a few discrepancies. This command:
find . -type f -executable \! \( -exec bash -c 'case $(file -b --mime-type -- "$1") in application/x-mach-binary) ;& application/x-executable) ;& application/x-pie-executable) exit 0 ;; esac; exit 1' _ {} \; -o -exec cmp -sn2 -- =(<<<'#!') {} \; \) -printf '%P\n'

shows a few files that are still marked executable, but should not be:
parsers/test_Json.NET/Program.cs
parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/Newtonsoft.Json.dll
parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/System.Runtime.Serialization.Primitives.dll
parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.dll
parsers/test_Json.NET/bin/Release/netcoreapp1.0/publish/test_Json.NET.pdb
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakChanges.icns
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakGeneric.icns
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakImage.icns
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakPlugin.icns
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakProject.icns
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakScript.icns
parsers/test_Squeak_JSON_tonyg/Squeak.app/Contents/Resources/SqueakSources.icns
parsers/test_java_jackson_2_8_4/jackson-annotations-2.2.3.jar
parsers/test_json.cr
parsers/test_json.php
parsers/test_json_re.rb

That list includes a ruby script that does not have a shebang line. Adding a shebang would make its execute bit reasonable.
If the "not" operator is moved from after -executable to before it, the command shows that these files are still not marked executable, but technically should be:
parsers/test_ObjCNSJSONSerializer/test_ObjCNSJSONSerializer/a.out.dSYM/Contents/Resources/DWARF/a.out
parsers/test_ccan_json/json/_test/x.py
parsers/test_json-rust/target/debug/tj.dSYM/Contents/Resources/DWARF/tj
parsers/test_json-rustc_serialize/rj/target/debug/rj.dSYM/Contents/Resources/DWARF/rj

Though if the binaries in that list (everything except for x.py) have never been executed, does having the execute bit set really matter?

That is more bash that I normally string together. But your command is also giving me an error of -bash: syntax error near unexpected token '('.
I personally try to keep executable files with their executable flag set even though it is just about as easy to type bash bashfile.sh. I will chmod the files listed above and leave it there.

@themobiusproject Sorry, I use zsh and I've gotten so used to it that I sometimes forget which features are standard. In bash you can substitute =(<<<'#!') with the path to a file with the contents #! (newline is optional).


automate generation of default config in the docs

Is this created automatically or manually?
Originally posted by @marcobarilari in https://github.com/cpp-lln-lab/localizer_visual_motion/pull/105#discussion_r822994897

Manually but I can work on some automation because I am already tired of copy pasting twice.

Probably to also reuse in some of our other repos:

CPP BIDS
CPP PTB
CPP SPM
...


Backup database - 'smart' new features

Feature Request

If doing a transaction log backup and LSN chain is not intact switch to do a full backup
Auto discovery - if set to backup all databases on a server and a new one is found include that

Envisioning scheduling the backup command to run fulls once a week, diffs once a night, trns every hour perhaps, then on the hourly runs if the LSN chain was broken or a new db was found take a full backup. Perhaps some limits on size of db, wouldn't want a busy 2TB database suddenly being backed up in the day.
Additional information
Adding this to keep track of ideas that were discussed on slack channel.

Add the possibility to change path if the backup "method" changes. I
usually store fulls in a different path than diff and yet another for
incrementals.
Il 08 set 2017 4:27 PM, "Jess Pomfret"<EMAIL_ADDRESS>ha
scritto:

Feature Request

If doing a transaction log backup and LSN chain is not intact switch
to do a full backup
Auto discovery - if set to backup all databases on a server and a
new one is found include that

Envisioning scheduling the backup command to run fulls once a week, diffs
once a night, trns every hour perhaps, then on the hourly runs if the LSN
chain was broken or a new db was found take a full backup. Perhaps some
limits on size of db, wouldn't want a busy 2TB database suddenly being
backed up in the day.
Additional information
Adding this to keep track of ideas that were discussed on slack channel.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sqlcollaborative/dbatools/issues/2211, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAHdB6q0xKvsw6GGBHED27BnFJa_Mbubks5sgU67gaJpZM4PRQWG
.

We should ensure we don't end up on @spaghettidba's list ;)
https://spaghettidba.com/2017/09/13/expensive-enterprise-backup-tools-a-survival-guide/

What @potatoqualitee  says. none of those things don't belong in BACKUP function. they belong in a supporting function or set of scripts that people can use.
Small functions that do one properly is a good maxim.
If people really want that sort of thing, then may we branch out into writing some configurations tools using dbatools primitives. Be easy enough to do all of the above by scheduling combinations of Get-DbaDatabase, Test-DbaLsnChain, Backup-DbaDatabase, New-DbaAgent* etc.

Cleaning up issues...
Someone wants to tackle this can re-open it.


questions about the remote module imports

https://stackblitz.com/github/wpmjs/examples/tree/main/webpack4-module-federation/webpack4-vue-cli-umi-react?file=vue-cli-host%2Fsrc%2FApp.vue
import UmiApp from 'umi/App'
import {applyReactInVue} from "vuereact-combined"
import VueCliRemote from "vueCliRemote/App"
export default {
name: 'App',
components: {
UmiApp: applyReactInVue(UmiApp),
VueCliRemote
// Button,
}
}
in this example, vue-cli-host were able to import VueCliRemote from "vueCliRemote/App"  and use VueCliRemote as  vue component directly, but when i import demo from 'demo/App'  and console log the demo at main.js, the result is undefined. when i async console log the result is ok.
eg:   main.js:
import ElementUI from 'element-ui'
import Vue from 'vue'
import demo from 'demo/App'
import App from './App.vue'
Vue.config.productionTip = false
Vue.use(ElementUI, { size: 'medium' })
console.log(demo)  //  undefined
console.log(window.demo) // undefined
setTimeout(() => {
console.log(window.demo)  //   is ok
}, 5000)
new Vue({
render: h => h(App),
}).$mount('#app')
so how to get timely and accurate results from normal  "import  xxx from 'xxxx/xxx' " about the remote module ?

need to complete bootstrap, I will find time to fix this check, it will throw an error saying that bootstrap needs to be completed

bootstrap check completed<EMAIL_ADDRESS>


Generated deb package could not install

I ran into error when I executed sudo dpkg --install to generated deb file which using default template.
environment: same as #6
Here is a log:
exrm_deb_sandbox$ sudo dpkg --install rel/exrmdebsandbox-0.0.1.deb
dpkg: warning: parsing file '/var/lib/dpkg/tmp.ci/control' near line 8 package 'exrmdebsandbox':
 missing description
dpkg: error processing archive rel/exrmdebsandbox-0.0.1.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 16:
 several package info entries found, only one allowed
Errors were encountered while processing:
 rel/exrmdebsandbox-0.0.1.deb

Hi @niku - can you try the latest git ref?
{:exrm_deb, github: "johnhamelink/exrm_deb", ref: "b478fde"}

It works! Thank you :smiley:
exrm_deb_sandbox$ sudo dpkg --install rel/exrmdebsandbox-0.0.1.deb
Selecting previously unselected package exrmdebsandbox.
(Reading database ... 48603 files and directories currently installed.)
Preparing to unpack rel/exrmdebsandbox-0.0.1.deb ...
Unpacking exrmdebsandbox (0.0.1) ...
Setting up exrmdebsandbox (0.0.1) ...

exrm_deb_sandbox$ git diff HEAD
diff --git a/mix.exs b/mix.exs
index ed66bb8..7b617a2 100644
--- a/mix.exs
+++ b/mix.exs
@@ -30,7 +30,7 @@ defmodule ExrmDebSandbox.Mixfile do
   #
   # Type "mix help deps" for more examples and options
   defp deps do
-    [{:exrm_deb, github: "johnhamelink/exrm_deb", ref: "5d09389"}]
+    [{:exrm_deb, github: "johnhamelink/exrm_deb", ref: "b478fde"}]
   end

   defp package do

Brilliant! I've released this now - you can upgrade to version 0.0.5 to get the bugfixes for #6 and #9.
Thanks for your report!


Remove obsolete entries in FAQ.md

These two questions are not applicable anymore.

I restarted Travis since it should not have failed on a markdown change

The flakiness is due to https://github.com/PowerShell/PowerShell/issues/2748
I believe it's likely Travis CI problem and not out tests problem.


can't enable form_data

this doesn't give me dummy form data

Hey @arifsaqa, hope all is well.
Does the request you're trying to apply dummy form data use a custom FormRequest class? If not, that would be the reason why. The dummy form data only applies to a request where it can take the custom FormRequest rules array and match the keys to those fields.
If your request does use a custom FormRequest class, then feel free to post/send over via email the JSON export and I'll take a look this afternoon/evening sometime.

Hi @arifsaqa. I'm going to close this issue as there hasn't been a response in a couple of days. If you still need support around it, feel free to reopen the issue.


Text-Editor, External and Internal Link handling

Hi,
I use the Text Editor more and more often.
This one works great overall.
I hope I have not overlooked the following feature so far.
An optimization is what I would like to see.
When using a link, I often miss the option, if the link is an internal link for Framwork7 or an external link.
External links should not run through the router.
In Framework7 is used for the component Link the class "external" for it in combination with _blank, _self
The feature could be used like this.
Linkinput

{external:_blank}https://framework7.io/svelte/link.html
With the first part you can add the Framwork7 classen and attributes for the link.
Only as a suggestion.

Good idea, will add some support for adding custom attributes to link and image

I've been thinking about how to make the feature nice to use from a user perspective.
The calendar gets additional property. These properties are filters. With the filters Framework7 finds out what are internal links and what are external links. If a url starts with "https://framework7.io/" then it is an internal link. Everything else is an external link. Maybe you can also work with regex here.
This would have the great advantage that the logic is not in the persistent storage of the editor content.

Ok, so not to mess with formats, I think it is better to leave it to developer to decide. So now (with next release), editor will have insertLink and insertImage events, and based on these, you now can detect when link/image was added and post process the HTML/value

Ok, so not to mess with formats, I think it is better to leave it to developer to decide. So now (with next release), editor will have insertLink and insertImage events, and based on these, you now can detect when link/image was added and post process the HTML/value

This is the best solution. 👍


Fix upstream build failing due to changes in behavior of creating dirs

The upstream build fails due after the changes to Asciidoctor wrt mkdir.
This PR fixes the test by explicitly setting the mkDirs option to true for that test.

This is good news. It actually means that the test was failing silently before (or, at least, it was not completing all the tasks, in this case writing the stylesheet).

Upstream builds FTW!

👍


Allow to use operator tokens as functions

This PR enables the usage of operator tokens as functions. #572

Lets just allow to use "endsWith"
"startsWith"
"contains"
"matches" words as method names?

Lets just allow to use "endsWith" "startsWith" "contains" "matches" words as method names?

I have made the necessary updates based on your feedback.

This function is very important for my code, could you please add this function to the latest version with a tag, so that I can add it to the code

Let's try to implement this feature without adding additional options. I will try to do it.

Let's try to implement this feature without adding additional options. I will try to do it.

I have option functionality from configuration as per your feedback

Awesome work!

I actually not understand what original issues is was about: https://github.com/expr-lang/expr/issues/568
Is to be able to use reuse operator names as functions:
	options := []expr.Option{
		expr.Function(
			"contains",
			func(params ...any) (any, error) {
				return false, nil
			},
			new(func() bool),
		),
	}

	program, err := expr.Compile(`contains()`, options...)

I think this is a bad practice and not should be allowed. Also I think it's bad decision to allow to use some operators as functions =/
Let's not processed this this PR @ckganesan?

operator becomes a function to increase the extensibility, convenient for users to customize or extend. Consider a scenario where the user needs to pass in multiple arguments to the contains function, and the original operator is not satisfied, we can extend it to contain from an operator to a function

Consider a scenario where the user needs to pass in multiple arguments to the contains function

Can you show some examples?

Will this operation be allowed

No. For now, not. I don't see a use case. And adding such feature complicates parser and type checker.


Disable multithreading for UMAP

Here comes the PR to close #169.
Multithreading was disabled for UMAP and left as an optional choice due to the jupyter kernel crashing without any error when running UMAP in napari opened from the notebook.

When doing Dimensionality reduction using UMAP the Kernel and Napari are still running. However, the progress bar of the dimensionality reduction is still shown in the jupyter notebook but stays at 0% which could be confusing.

Thanks, Mara @marabuuu! It seems that since napari and umap end up running in the same thread causing the napari window to freeze, the progress bar in the notebook cannot be updated. I agree that is confusing, so I disabled verbose for umap unless multithreading is selected. Could you please test it one more time whether no progress bar is visible?

Now the dimensionality reduction using UMAP is successfully finished without showing a progress bar.

Thanks, Mara @marabuuu!


'View in admin' link for post popup menu

Fixes styling on menu to keep View Post & Replies on a single line
Adjust z-index of menu so it shows over post links of the next post
Admins will see a "View In Admin" link for posts to quickly navigate to the admin for troubleshooting/intervention

I'm not sure how much we want to direct admins to the Django Admin - we can swap this to a moderation view when things are further along, maybe.


Update outdated ODD project link

This PR updates the outdated ODD project link on the technical team page.
Thanks to @krHero for spotting.

Thanks!

Thank you!


Created basic groundwork for profile pages with Servlet and JSP

Added basic file details to start making profile pages. Right now it does not handle unique user profiles and only moves to one "profile page" right now.

Looks great thus far! With regards to the profile pages, will these be displayed in the navigation bar or accessed via another page/link? If the former, you may way to add the navigation details to ensure the user can still access the other pages on the ChatApp site.


ctkVTKRenderView - QVTKWidget doesn't display its buffer

Talk to @benjaminlong for details.

What the status regarding that issue ?

Can't reproduce in CTK master.

@benjaminlong Would be great if you could check if the problem still occurs on your workstation. If not, we will close the issue.


chore: add badges to README

Codecov Report

Merging #10 (f5c31e0) into main (f6c6f8c) will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##                main       #10   +/-   ##
===========================================
  Coverage     100.00%   100.00%
  Complexity        25        25
===========================================
  Files             10        10
  Lines             39        39
===========================================
  Hits              39        39

Flag
Coverage Δ

unittests
100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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


Make minAvailability mutual exclusive

Make minAvailability mutual exclusive with maxUnavailabilty on PodDisrutptionBudget + add a test for it.
Nice what we find with writing these tests :D

Thanks for the review :+1: i missed the gateway podDisruptionBudget :D


Express Application Generator resulting in GET /home.html 404

When I follow the instructions on the following page: http://expressjs.com/en/starter/generator.html
I receive the following error repeatedly: GET /home.html 404 ...
I am using:
Node 6.2.0
NPM 3.3.6
Express 4.13.1
Thank you.

Please post general queries such as this one at https://gitter.im/expressjs/express. I am available right now, let's continue the discussion over there.


wikihow command doesn't work

error.txt title and the attached file probably says what happened

looks like rapidapi finally got rid of their old domains, it seems that a simple URL change should fix it

fixed with addb16f


Review for adding strictness annotations

I believe there are many places where making certain fields strict may greatly improve performance.  Obvious examples include toText :: MOOString -> Text and everything in Value.

I had actually made Value strict early on, but found relaxing the strictness provided some interesting benefits for MOO code in the same way it does for Haskell, without an obvious reduction in performance. I admit however that I didn't do a very detailed analysis.
How would you suggest testing the performance characteristics of any such changes?


Click the dropdown button again to close dropdown

Is there a way to make it so the dropdown closes when the dropdown button is clicked while the dropdown is open?

I'm trying to make dropdown menu close when dropdown button click again or click other area but keep dropdown menu open when click dropdown content item.
The first idea was to use a state to simply control it, but this wasn't easy because the blur event would be triggered when the user clicked on the dropdown content item and vice versa. This makes it not easy to distinguish between clicking on a dropdown menu and clicking on a blank area.
I finally came up with a solution. But I don't think it's an elegant way.
Is there a better way to make this function?
I use React to do this.
function App() {
  const [themeMenuOpened, setThemeMenuOpened] = useState(false);
  const themeMenu = useRef(null);
  const themeMenuButton = useRef(null);
  useEffect(() => {
    if (!themeMenuOpened) {
      document.activeElement.blur();
    } else if (
      themeMenuOpened &&
      !themeMenu.current.contains(document.activeElement)
    ) {
      setThemeMenuOpened(false);
    }
  }, [themeMenuOpened]);

  return (
    <>

          daisyUI

 {
                setThemeMenuOpened(false);
              }}
              onClick={(e) => {
                if (themeMenuOpened) {
                  setThemeMenuOpened(false);
                } else {
                  setThemeMenuOpened(true);
                }
              }}
            >
              <svg
                xmlns="http://www.w3.org/2000/svg"
                fill="none"
                viewBox="0 0 24 24"
                className="inline-block w-6 h-6 stroke-current"
              >
                <path
                  strokeLinecap="round"
                  strokeLinejoin="round"
                  strokeWidth="2"
                  d="M4 6h16M4 12h16M4 18h16"
                ></path>
              </svg>

 {
                b.current.focus();
              }}
              onFocus={(e) => {
                setThemeMenuOpened(true);
              }}
            >

                Item 1

                Item 2

                Item 3

    </>
  );
}

A simple solution for this:
When you add event listener for "onclick", then element is already focused when you check. But when you add "onmousedown" listener, element is focused after this event occurs. So it gives you ability to check if it was previously focused and there is no need to handle state in a variable.

		...

function checkAndCloseDropDown(e){
		if(e.target && e.target.matches(':focus')){
			console.log('should close');
			setTimeout(function(){
			    e.target.blur();
            }, 0);
        }
    }

Here's another example using JS to add/remove dropdown-open class:
https://play.tailwindcss.com/Xavjuk4SGS

Here's another example using JS to add/remove dropdown-open class: https://play.tailwindcss.com/Xavjuk4SGS

It does not solve the effect of closing when clicking on other elements.
This should be the basic effect of a Dropdown component, at least this flaw should be prompted in the document or implemented in daisy-ui.
Otherwise, this component is very tasteless.

That's not a flaw. That's just how native CSS : focus works. When you click a focused element, it should not and will not lose focus.
However I can add a open/close functionality with a hidden checkbox (similar to collapse component) but that way, dropdown will only close if it's clicked again. It won't get closed when clicked outside.
More personalized functionality can be achieved with JS tho.

If you are using React then it can be done by useState. Here is an example code that is working on a navbar:
//Here we set the state for the display and the button, if clicked or not. //
const [menuDisplay, setmenuDisplay] = useState(true);
const [displayMenuStyle, setdisplayMenuStyle] = useState('');
const showMenu = () => {
setmenuDisplay(!menuDisplay)
if (menuDisplay) {
setdisplayMenuStyle('')
} else {
setdisplayMenuStyle('none')
}
return displayMenu
}
// Here we pass the displayMenu state ('string') that is set to '' empty or 'none'. //

Item 1

Item 2

Item 3

A quick explanation of the logic for noobs like myself....
We set 2 states, the one is checking if the button is clicked for the first time or the second. So we use the true or false to check that.
Its initial state is set to true because for some reason when it is set to false the first time you click it it will open and close instantly the menu ? no clue why, maybe the masters can help on that one.
Then we check if the menuDisplay state is true. If it's true then display is set to '' empty string and the menu pops up. If its false then the display is set to 'none' and the menu disappears.
Weird but it's working.
Cheers!

thanks @theodosiskats
Here's another example with React using useRef to handle focus instead of using states: https://codesandbox.io/s/eloquent-tree-bu2dt?file=/src/App.js

for those who use angular
import { Directive, ElementRef, HostListener } from "@angular/core";

@Directive({
  selector: '[appFocusRemover]'
})
export class FocusRemoverDirective {

  constructor(private elRef: ElementRef) {}

  @HostListener('click') onClick() {
    this.elRef.nativeElement.parentElement.classList.toggle('dropdown-open');
    if (document.activeElement instanceof HTMLElement) {
      document.activeElement.blur();
    }
  }
}

            Profile

Dashboard

Settings

Logout

I decide to refuse the opportunity to open a dropdown with focus because it adds more problems in my case.
Implementation on svelte:
  let isDropdownOpen= false // default state (dropdown close)

  const handleDropdownClick = () => {
    isDropdownOpen = !isDropdownOpen// togle state on click
  }

  const handleDropdownFocusLost = ({ relatedTarget, currentTarget }) => {
    // use "focusout" event to ensure that we can close the dropdown when clicking outside or when we leave the dropdown with the "Tab" button
    if (relatedTarget instanceof HTMLElement && currentTarget.contains(relatedTarget)) return // check if the new focus target doesn't present in the dropdown tree (exclude ul\li padding area because relatedTarget, in this case, will be null)
    isDropdownOpen = false
  }

Manually control the visibility of the dropdown without relying on the "focus" event:

		<button class ="btn m-1" on:click = {handleDropdownClick} >
		{#if isDropdownOpen}
			<svg> <title>Close Dropdown</title> </svg>
		{:else}
			<svg> <title>Open Dropdown</title> </svg>
		{/if}
		</button>

<button class="btn text-slate-300">Item 1</button>

<button class="btn text-slate-300">Item 2</button>

REPL

I've used alpine js for this and looks like it's working well...

        id }}'">Click

id }}'" class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52">

Edit

Delete

For my case, I added a event listener to blur() the focused item whenever .dropdown-content>li got clicked.
onMounted(() => {
  const dropdownContent = document.querySelectorAll(".dropdown-content>li");
  dropdownContent.forEach((element) => {
    element.addEventListener("click", () => {
      document.activeElement.blur();
    });
  });
});

I decide to refuse the opportunity to open a dropdown with focus because it adds more problems in my case. Implementation on svelte:

@whoisYeshua  for typescript, I have to add type
const handleDropdownFocusLoss = ({
		relatedTarget,
		currentTarget
	}: {
		relatedTarget: any;
		currentTarget: any;
	}) => {
		// use "focusout" event to ensure that we can close the dropdown when clicking outside or when we leave the dropdown with the "Tab" button
		if (relatedTarget instanceof HTMLElement && currentTarget.contains(relatedTarget)) return; // check if the new focus target doesn't present in the dropdown tree (exclude ul\li padding area because relatedTarget, in this case, will be null)
		isDropdownOpen = false;
	};

instead of any what is relatedTarget, currentTarget types?!

@msh2050
currentTarget: HTMLDivElement

Since the handler is hanging on the div
relatedTarget: Element | null

Element since it is necessary to cover all possible focusable elements -  HTMLElement & SVGElement (yup, SVGElement can be focusable if we add tabindex="0" to it)
null for all other elements which not focusable

if I change types from any I will get the following error:
[{
	"resource": "******/src/lib/components/Navbar.svelte",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "2322",
	"severity": 8,
	"message": "Type '({ relatedTarget, currentTarget }: { relatedTarget: HTMLDivElement; currentTarget: Element | null; }) => void' is not assignable to type 'FocusEventHandler<HTMLDivElement>'.\n  Types of parameters '__0' and 'event' are incompatible.\n    Type 'FocusEvent & { currentTarget: EventTarget & HTMLDivElement; }' is not assignable to type '{ relatedTarget: HTMLDivElement; currentTarget: Element | null; }'.\n      Types of property 'relatedTarget' are incompatible.\n        Type 'EventTarget | null' is not assignable to type 'HTMLDivElement'.\n          Type 'null' is not assignable to type 'HTMLDivElement'.",
	"source": "ts",
	"startLineNumber": 29,
	"startColumn": 25,
	"endLineNumber": 29,
	"endColumn": 36
}]```

@msh2050
I'm personally use this code:
const handleDropdownFocusLoss = ({ relatedTarget, currentTarget }: FocusEvent) => {
	if (
		relatedTarget instanceof Element &&
		(currentTarget as HTMLDivElement).contains(relatedTarget)
	) return;
	isDropdownOpen = false;
};

But you can try something like this:
type DivFocusEvent = FocusEvent & { currentTarget: HTMLDivElement };

const handleDropdownFocusLoss = ({ relatedTarget, currentTarget }: DivFocusEvent) => {
	if (relatedTarget instanceof Element && currentTarget.contains(relatedTarget)) return;
	isDropdownOpen = false;
};

or:
const handleDropdownFocusLoss: svelte.JSX.FocusEventHandler<HTMLDivElement> = ({
	relatedTarget,
	currentTarget
}) => {
	if (relatedTarget instanceof Element && currentTarget.contains(relatedTarget)) return;
	isDropdownOpen = false;
};

My case is… I want to close the popup menu when menuItem is clicked
A simple solution is to add this onClick to the menuItem:
onClick={() => {
  if (document.activeElement instanceof HTMLElement) {
    document.activeElement.blur()
  }
}}

What if I want to do the same thing by drowdown-hover?

@Yokoi-Tofu you mean open the menu on first hover and close it on second hover? 🤔

@saadeghi
I want to click on the dropdown-hover menu to close it.
But this is a hover, not a focus, so document.activeElement.blur() doesn't work.

For my case, I added a event listener to blur() the focused item whenever .dropdown-content>li got clicked.
onMounted(() => {
  const dropdownContent = document.querySelectorAll(".dropdown-content>li");
  dropdownContent.forEach((element) => {
    element.addEventListener("click", () => {
      document.activeElement.blur();
    });
  });
});

This has actually worked with Svelte, thanks

document.activeElement.blur()

@kpaquino2 It's working with :focus so as long as the button is focused, drop-down will remain open. But you can use JavaScript to remove the focus on second whenever you want.
Please let me know if you have any questions.

@saadeghi can you lemme know the code for the same i didnt know how to do it in react

React, this is what I ended up with:
const clickRef = useRef(0);

if (!user || user.isAnonymous) {
    return (
        <Link className='btn btn-secondary' to='/login'>
            Login
        </Link>
    );
}

return (

        <Avatar
            user={user}
            onFocus={() => (clickRef.current = 0)}
            onClick={(event) => {
                if (++clickRef.current === 2) {
                    event.currentTarget.blur();
                }
            }}
        />
...

This situations make me wanna puke every time I say some good things about framework/library to someone (boss, coworker)... and then we are not able to close on click... and then some random dude comes here and give some solution and it actually works. I wonder how many of this bs situations will I encounter after I ???finish??? this project.

Thank you @serkodev, now it works. -.-'

This situations make me wanna puke every time I say some good things about framework/library to someone (boss, coworker)... and then we are not able to close on click... and then some random dude comes here and give some solution and it actually works. I wonder how many of this bs situations will I encounter after I ???finish??? this project.  Thank you @serkodev, now it works. -.-'

daisyUI is a CSS library and there is no click event on CSS. As I mentioned, dropdown works with CSS :focus.
You can use JS whenever you need but unfortunately you can't expect a CSS library to handle JavaScript click events.

If you are using React then it can be done by useState. Here is an example code that is working on a navbar:
//Here we set the state for the display and the button, if clicked or not. //
  const [menuDisplay, setmenuDisplay] = useState(true);
  const [displayMenuStyle, setdisplayMenuStyle] = useState('');

  const showMenu = () => {
    setmenuDisplay(!menuDisplay)
    if (menuDisplay) {
      setdisplayMenuStyle('')
    } else {
      setdisplayMenuStyle('none')
    }
    return displayMenu
  }

// Here we pass the displayMenu state ('string') that is set to '' empty or 'none'. //

              <Link to='/'>Item 1</Link>

              <Link to='/'>Item 2</Link>

              <Link to='/'>Item 3</Link>

A quick explanation of the logic for noobs like myself....
We set 2 states, the one is checking if the button is clicked for the first time or the second. So we use the true or false to check that.
Its initial state is set to true because for some reason when it is set to false the first time you click it it will open and close instantly the menu ? no clue why, maybe the masters can help on that one.
Then we check if the menuDisplay state is true. If it's true then display is set to '' empty string and the menu pops up. If its false then the display is set to 'none' and the menu disappears.
Weird but it's working. Cheers!

also, add the  onBlur={showMenu} for keeping the state synced.

Need the drop down menu to close upon clicking a link, yes.
The drop down menu closes after you click it manually again. I am using React in nextJS.
do:
onClick={() => document.querySelector('#menu').click()}
e.g.:

Products

                        {mainCategories.map((category) => {
                            return (

 document.querySelector('#menu').click()}**
                                    >{category.title}

                            )
                        })}

Contact
About

thanks @theodosiskats Here's another example with React using useRef to handle focus instead of using states: https://codesandbox.io/s/eloquent-tree-bu2dt?file=/src/App.js

How can I while applying this logic remain the functionality of closing the dropdown by clicking outside?

I ran into this issue too (dropdown not closing after click) and I've used to hyperscript to first settle the transition and then close the dropdown. Not settling results in the transition finishing only when the dropdown gets opened again.
Using the dropdown example:

  open or close

Item 1

Item 2

For me, this worked using the  dropdown
on:click={(e) => {
    e.target.parentElement.parentElement.parentElement.removeAttribute('open');
}}

This is what worked for me with Alpine.js:

Item 1

Item 2

None of these solutions worked well on Next.js 14 so here is a quick and easy solution using useState() inspired by @theodosiskats
  const [displayMenuStyle, setdisplayMenuStyle] = useState("");   const handleSuffixClick = (slot: SlotType, suffix: string) => {     if (setSuffix) {       setSuffix(slot, suffix);     }     setdisplayMenuStyle("none");   };
Then just add this to the outer
`
 setdisplayMenuStyle("")}
    onMouseLeave={() => setdisplayMenuStyle("none")}
  >
`
And styling for the
`

`
It works like a charm. Anyways, good job to the DaisyUI team 🌼


Is SQL Server 2012 SP4 Supported?

Can it please be clarified if SQL 2012 SP4 is supported.

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

ID: b3fbb109-0afc-6a7b-2486-0d6412501d10
Version Independent ID: 54e31b36-d865-79e6-0949-3fd9a2ce6978
Content: Supported software platforms
Content Source: MIMDocs/microsoft-identity-manager-2016-supported-platforms.md
Product: microsoft-identity-manager
GitHub Login: @billmath
Microsoft Alias: billmath

Please note that SQL Server 2012 Service Pack 4 itself is no longer in mainstream support, it is in extended support.

#please-close


SCSS Wording

Hound notified me that I should better group/nest my Sass but it took me a while to figure out what he meant.
I think a message along the lines of “Next select:focus within .select on Line 6” would’ve been more clear to me.

If it said “Nest select:focus within .select on Line 6”, wouldn't it then be duplicating lines 22-24, at which point you'd want to merge with it?
It's a little weird that it picked the closing brace for the rule on lines 22-24, but it does seem to be correct.

@croaky Yes! My bad; I mean Line 22. It is that Hound pointed to the closing bracket, rather than the opening one that tripped me up.


ng/jupyter: Pipe stdout to output buffer

Create a pipe that temporarily pipes stdout to the session buffer so
fmt.Print*() and friends print to jupyter, not stdout.
I think users would expect those funcs to get printed out, but I'm not sure if this is expected behavior.  Also I'm not sure if I implemented it correctly.  Writing to buf could be racy.
Updates #16

Codecov Report

Merging #91 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master     #91   +/-   ##
======================================
  Coverage    42.8%   42.8%
======================================
  Files          19      19
  Lines        9029    9029
======================================
  Hits         3865    3865
  Misses       4724    4724
  Partials      440     440

Continue to review full report at Codecov.

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

Closing in favor of a better strategy.

@ksshannon do you plan on sending another PR for using a Pipe inside ngcore? (I think the extra plumbing I mentioned above can wait for another time.) If not, I'll file an issue so we remember.
Also, thank you for sending a PR!

@crawshaw, I'll take a crack at it.  If I get hung up or can't do it, I can file an issue.  Thanks for the feedback.

I've been thinking a bit more about this, and I think we should change the ngcore package interface a bit.
Right now it has fields for Stdout/Stderr that are io.Writers, and it adapts a pipe to them as needed for passing into job executions. Instead, we should make Stdin/Stdout/Stderr *os.File objects in the interface. Let callers of the ngcore package create a pipe and set it as they want.
Then you can take those *os.File objects, and use them to temporarily set os.Stdin, Stdout, Stderr during an eval execution.

@crawshaw #104 is my new attempt.  I added the *os.File changes mentioned.  I'm not sure about the ioutil.Discard->os.Create(os.DevNull) change, there is probably a cleaner way to do that.


Liqo-route: added static mac to vxlan + device sanity check

Description
This PR adds a static mac address to the liqo-vxlan interface.
This solves an issue with virtualized Ubunutu2204 ( and maybe other distributions... ), where the MAC address I overwritten by the operating system immediately after it has been auto-generated by the operating system itself.
It introduces also a simple sanity check on vxlan interface configuration, which restart the pod in case of troubles.
How Has This Been Tested?

[x] KinD (Debian 11)
[ ] CAPK (Ubuntu 2004)
[ ] CAPK (Ubuntu 2204)
[ ] OpenShift
[ ] EKS
[ ] GKE
[ ] AKS

/build

/build

/rebase test=true

/rebase test=true

/build

/test

/merge


use systemd notify when services are ready

Because of systemd's aggressive parallelization of service startup, sometimes a race condition occurs regardless of dependency order.
This is because the simple service type does not block - it becomes active immediately after starting the process, even if it is still initializing.
e.g. wait4deps module is started and then registerservice module is started before wait4deps was ready, so it does not know about the cluster service dependencies.
The code for notifying systemd about service status is already in vccutil since 1ed8c5a6ac0055efd1459e0164d41975bce8f270.

Only modules that are daemonized need the ready notification

clusterdns
clusterkeys
clusterwatcher
registerservice

These modules should be oneshot services because we must block until they have finished running

clusternet
wait4deps

Using native module for sd-daemon since eb2626856906f4c3beec608b9a69c2fc74236403


Deleting templates with raw rest

Gorjun allows delete templates by /kurjun/rest/raw/delete rest.

Gorjun allows this only to subutai user.


Header echo functionality gone?

Some months back I had been using ipd to test security proxy functionality and ensure appropriate headers/cookies are making it to app backends. It does not look like this is supported any longer. Any chance this feature will make a comeback?

Sorry, that feature won't be returning. I suggest you use http://httpbin.org/headers.


Separate the CLI from the lib module

The lib should be split into its own module, and the CLI should be considered as a regular frontend.

I'll try to find some time in the evening after doing my work now so I can approach this issue. Meanwhile, could you please summarize a little bit what still has to be done?

I think you can leave it, I'm already on it and it's a total mess x) I will do it by chunks because it's too heavy. But what could really helpful at the moment is to check / fix new bugs (many issue were opened recently), and I lake of time to treat all of them. I'm thinking about https://github.com/soywod/himalaya/issues/370, https://github.com/soywod/himalaya/issues/373, https://github.com/soywod/himalaya/issues/359, https://github.com/soywod/himalaya/issues/292 etc.

Or if you want sth more challenging and interesting you have https://github.com/soywod/himalaya/issues/341, it can be developed aside independently.

 I just need to clean up and we can move forward.

That's nice to hear! I'm still stuck adding chumsky to the parser at the moment... I'm sorry that it takes so long

No problem dude, don't worry. Be ready, good news are coming soon :tada:

Released in the v0.6.0 :tada:

Thats great! thanks a lot this must have taken quite a lot of effort!

Hell yes, a good thing done! I will focus a while on fixing bugs to make this new base as solid as possible, then I will be able to take care of big features like the offline #342, email composer #341 or contact completion #49.


v0.5.2 does not include PR #60

@taichi
Thank you for merging and releasing PR https://github.com/taichi/ci-yarn-upgrade/pull/60.
However, v0.5.2 distributed at npm does not include PR https://github.com/taichi/ci-yarn-upgrade/pull/60 changes :cry:
$ yarn add ci-yarn-upgrade
$ head -n32 node_modules/ci-yarn-upgrade/lib/compare.js | tail -n1
        return cw.homepage ? `[${cw.name}](${cw.homepage})` : cw.name;

oh... i'm sorry about release v0.5.2.
i release v0.5.3 again, please check it.


Invoke-WebRequest using Get method doesn't allow content-body

Making a HTTP GET requests using either Invoke-WebRequest or Invoke-RestMethod with a content-body throws an exception. HTTP RFC 7231 describes that a content-body is allowed even though the response of the webserver might be

A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.

This is making it difficult to interface with various RESTful API's like InfoBlox and ElasticSearch that rely on JSON payloads for retrieving data.
Steps to reproduce
$uri = 'http://www.microsoft.com'
$payload = @{Microsoft='loves linux'}
$result = Invoke-WebRequest -Uri $uri -Body ($payload | ConvertTo-Json) -ContentType 'application/json' -Method Get
Expected behavior
HTTP OK
Actual behavior
Invoke-WebRequest : Cannot send a content-body with this verb-type.

This is a limitation of the .NET class that Invoke-WebRequest is using. Not sure what the best way would be to work around it.

File this bug on the CoreFx repo?

Thanks, I've raised the issue on the CoreFX repo:
dotnet/corefx#11211