text:
[Feature] User Access Control / Multiuser

Here's some ideas for access control that I would like to see, I haven't really looked at the code so I’m not sure how hard this would be.
You'd probably have to create a table that would define users and their permissions to each album then have a php/js script determine what albums should be displayed and that would also limit access based on those permissions. It might also be a good idea to keep some of the session data stored on the server if it isn't already, that way you could compare the session identifier token to the username that the request was being performed as and validate that they match before executing any functions; this would assist to mitigate a malicious user from executing commands/actions as another user.
Superuser
Full access to view/modify all albums and photos
Standard
Per album view control  (who can or can't view album x)
Per album upload control (who can or can't upload to album x)
Per album and photo delete option (who can or can't delete photos from album x)
Read Only
Can only read/view images for explicitly defined albums.

+1

+1

Would be great if everyone could tell a bit about their use-case of this feature: Do you just want multiple users or multiple users with different permissions? What permissions should be adjustable? Are there other potential settings for users?

I would like to give some users permission to view some private albums..

Current state of this issue: I'm currently rewriting parts of the front-end, including the dialog system. The new one will make it easier to display complex settings, which are required for a "User Access Control". Don't expect this feature soon. It requires a lot of changes and Lychee is only a side-project. It's on the roadmap and has a high priority.

@PeterTheOne Public protected albums aren't working for you in this case? How about this: https://github.com/electerious/Lychee/issues/27 ?

#27 would be great yes! But frequent users of my gallery would potentially have to save a lot of links, so it would be nice if they had gallery permissions linked to their user account.

@PeterTheOne A password protected collection would be what you need: https://github.com/electerious/Lychee/issues/254 Could contain all albums for one group and they only need to input the password once.

@electerious also nice but imagine many different parties, holidays, etc. with different guests. Some are family events that I share with my family, some are event with my friends. Some guests are very often the same (need user accounts) but some change for every occasion (could deal with a link/password).

+1 @PeterTheOne
revoking access rights - for any reason - would lead to a new password protectd collection or at least a new password for everybody who still is allowed to view.

My user case:
I have a couple of friends (a pro will have customers) I'd like to share photos with. Not every friend/client shall see every album, so I need a user list, maybe groups (for a group of friends) and per photo/per album-settings to decide who may watch what.
I must admit that I meanwhile moved to piwigo where I found that feature already implemented very well. If you decide to keep lychee as lean as possible piwigo might be a recommendation for those whose needs are not met.
L.B.Q.R.

+1

+1

+1

+1

+1

+1

+1

Re: Would be great if everyone could tell a bit about their use-case of this feature: Do you just want multiple users or multiple users with different permissions? What permissions should be adjustable? Are there other potential settings for users?
My use case would be to have one super user (me), and other users (my wife, parent, etc.) which would have upload rights, and the ability to edit sharing options of their albums.
The super user would have every right on every album.

I simply won't install Lychee until this feature is implemented.
Here is what I would like:

1 super-user ("admin") and an unlimited number of normal users
Super user rights: list/create/edit/delete users, view/create/edit/delete/share albums, upload pictures
Normal user rights = any combination of those six: view, create, edit, delete, upload, share
Per user defaults rights for any new album
Per album view/create/edit/delete/upload/share control
Share options: password or user-based

Re: Would be great if everyone could tell a bit about their use-case of this feature: Do you just want multiple users or multiple users with different permissions? What permissions should be adjustable? Are there other potential settings for users?
We will use Lychee for an internal image library with multiple users (admins). As an addition we like to share some albums to our customers (maybe multiple albums to one customer).

Admin (upload photo, create album, edit metadata) - as it is now, maybe ability for multiple admins
User (visit/download selected albums) - new
Guest (visit/download shared album) - as it is now

At the moment I can share just a single album (not multiple inside the same link) to a customer and have to select every album as invisible to hide them.

Re: Would be great if everyone could tell a bit about their use-case of this feature: Do you just want multiple users or multiple users with different permissions? What permissions should be adjustable? Are there other potential settings for users?
My use case is for storing/archiving (and optionally sharing) family photos. I'd like the ability to have users and grant read or read-write permissions to users on a per album basis. Each user(wife, kids, etc) could create new albums which they would own and be able to share with other users. Anyone with read access should also be able to publicly share an album via emailed link facebook, etc.
If you've ever used ownCloud. I think it's file sharing model is about as good as it gets. Check out its federated sharing feature. Also the ability to grant write access to albums via public link (without creating a new user) is useful as no one wants to have to create new accounts for every extend family member (and then constantly reset their passwords for them). Thats the pie-in-the-sky goal for my installation.

My case in close of the Enoch247 case. I just need to give permission for family members to upload photos, create albums and share the content (optionally too).
One bit more: users can create "private" albums where no one, except the owner can see/share/edit.
Regards

Thanks for all the comments. There aren't any news about this feature, but it still has a high priority and will make it into a version after 3.0. Keep posting your use-cases, they're a big help! :)

+1

Another usecase: upload picture and generate link for one user and this user can accept or deny publishing this picture. Very often needed if you make pictures of events and respect the privacy of the people photographed: they get send a link (needs email input somewhere on admin) and can view and download their picture plus they can decide if they want others to see this picture. Others might be another group, multiple groups, or everyone.
yes, permission systems is something you want to plan from day 1 with your app :)

+1

+1

+1
I don't want some pals deleting pictures.

Is anyone currently working on this feature?
I'm thinking of starting on it this weekend, and wanted to check first if anyone has begun work on it, to avoid multiple implementations of the feature.

I don't know how far Tobias is into this enhancement.
Which functionalities would you add to it? What's your idea behind the whole feature?

Ok, the way I'm thinking of doing it is to do the login stuff mostly like they are now, except having a role assinged in the php session. This role will function like the current Admin and Guest roles work now.
As for user management I'm thinking of adding a menu item in the top-left menu, which will produce a pop-up, in which new users can be created, and current users can be granted read or write privileges to any album. So by selecting a user you get a list of all albums, and beside the name one checkbox for read and one for write.
In album view, under the share menu there will be a similar list of all the users, with read/write checkboxes beside them.
This way it would be easy to either grant a user privileges to any number of albums, or to grant multiple users privileges to any one album.
As for the actual implementaion of the access rights I haven't figured out how I will structure it completely, but I do have some ideas, for which I have to test a few SQL features to avoid having to do too much in php code..
I think the roles I will start with are just the current superuser which has all rights to everything, guest which have read rights to public albums, and visitor which has read and/or write the the albums for which the superuser has granted privileges.
This will result in a system which is not really multi-user per-say, more like single-user with better sharing possibilities. The most obvious use-case being a photographer as the superuser and his/her friends/family/customers as visitors (who will not have to keep multiple links saved somewhere)

Sounds good.
Some thoughts:

Keep the sharing function (in case you don't want to create a new user for just one album)
How would you manage users/album in the popup, when there are a lot of them (e.g. search field)?
Which user can create and delete albums? Which can create users?

I'm interested about Tobias thoughts. I thing it's important to decide which functionality should go into before starting with the implementation. This way we can exclude different opinions and create a stable and useful feature.
To put the feedback from above together:

Super User - has every privileges (view, edit and upload images, create user, delete albums)
User - read/write access to one or multiple albums (can view, edit and upload images)
User - read access to one or multiple albums (can view images)
Guest - can view a single album shared through a link (password protected)
Public - album is accessible to anyone through a link (no password protected, share over social media)

Do you agree with me?

@Aidenir @xxcram Sounds great!

@xxcram Response to your questions:

Absolutely I would not touch the current sharing, my idea yesterday was based on the sharing popup when viewing a single photo. I see now this would not work, so perhaps having a separate button which pops up a modal dialog with the user list.
To start with I don't think I will do a search field, but once the actual access rights code is working that would certainly be good to have.
For this I see it as you put it in the summary: only the superuser has rights to create users and albums and settings read/write privileges to albums/users.

I too am interested in what @electerious thinks about this, since everyone could benefit if the implementation is according to the design he has in mind so he can merge with minimal changes, otherwise I will probably just end up doing it to fit my particular use-case.

I started working on the database schema today.See 2c72b8bf2f74f6d4e35596451f50efb2042a2661.
Since the relationship between users and albums is a many-to-many I figured the best way to structure it is to use a privileges table, with foreign keys to the user and album id as well as a field for read and one for write. This allows to use something like this query when fetching the albums to display:
(SELECT * FROM lychee_albums a
  LEFT JOIN lychee_privileges u2a
  ON a.id = u2a.album_id
  WHERE  u2a.user_id = 1
)
UNION
(SELECT * FROM lychee_albums a
  RIGHT JOIN lychee_privileges u2a
  ON a.id = u2a.album_id
  WHERE  u2a.user_id = 1
)

A junction table is certainly the right table structure for the permissions. I don't understand what that query is supposed to do, though. To get a list of albums the user has access to, just query the privileges table:
select p.album_id
  from lychee_privileges p
 where p.user_id = 1

Or if you want to get the album data in the same query:
select a.*
  from lychee_albums a
  join lychee_privileges p on (a.album_id = p.album_id)
 where p.user_id = 1

(Assuming that there won't be any entries in the privileges table where neither read nor write are granted.)

What I tried to achhive with that query is to let the database do most of the heavy lifting. Instead of getting the ids a user has permissions to and then querying the db again.
The query I posted would do the same as the second one you posted, except that it would get read and write permissions into the result, which I figure can be handy when deciding which buttons to show in the GUI, which now that I think about it would not really be relevant if only the superuser has the rights to edit the album properties... But could be useful in the future at least :smile:

If you want the permissions as well, you can just add them to the above query:
select a.*, p.read, p.write
  from lychee_albums a
  join lychee_privileges p on (a.album_id = p.album_id)
 where p.user_id = 1

Aha ok, as you can probably figure out I'm quite the novice when it comes to SQL.
I have now gotten some of the user management working. Its possible to create and delete users (and login as these users of course), and the dialog for setting their permissions is there, but not functional yet.

The styling is not finilized either, just put it together so it worked. My thinking is that a similar view can be implemented in the album view, where instead of albums the users are listed.
Next up is implementing the access restrictions, and modifying the create user dialog to be able to choose what role new users should get.
If there is anything that looks strange in the commit 39ff762c8adebd469abb5077375da7643f657cb4 please let me know, so I can fix issues as soon as possible.

The styling looks good :)
(I didn't look at the code)

I got some more work done yesterday, and I'm not sure this implementation is the way to go, its clear that the frontend was not made with multi-user access in mind, so to keep the code as neat as @electerious has written it to start with, quite a lot would have to be rewritten. Although since this is a feature I need asap I will continue my work on it.
I got the role into the user-creation yesterday, and removed some of the options in the context menus when logged in as a regular user. For example a regular user is not allowed to set the dropbox link och manage users. I also reinforced this server side.
Furthermore only albums which the user has an entry for in the privileges table is returned when fetching albums.
One point I'm not sure on is whether a regular user should be allowed to edit album attributes such as name and description? Does anyone have an opinion on this? Right now they're not, and they're also not allowed to delete or merge albums

+1
The demo looks great, although I would prefer a "invalid credentials" message (or similar) instead of just showing empty albums after entering a invalid username/password.

@Aidenir - I'm glad to hear there is progress on this feature.  Since your last update in July, how close are you to completing V1?  I'd really like to start using this application but can't until multi-user is part of the build.  Thanks for your efforts.
P.S.  The demo link is broken.

To be honest I stopped working on it after my last update, since other projects were higher priority.
But I'm pretty sure I will look into whats left to do and how to do it this week, when I get some sparetime (working on outages at work :( )
And the demo should be back up again tonight.

The demo looks great, although I would prefer a "invalid credentials" message (or similar) instead of just showing empty albums after entering a invalid username/password.

This issue is fixed now.

P.S. The demo link is broken.

Fixed too.
I will try to resume development of this, but don't hold your breath, I have no idea when it'll work.

Thanks @Aidenir - I've had a chance to look at the demo and things are looking good.  I noticed a few things that I'm sure you're aware of and working on:
Creating a user works but I don't get an option to save the permission type.  It just says 'back'.
A delete option would be good idea where a user can upload photos but not delete them.

Right now the permissions is not implemented (currently working on it ;)), but the idea is that the permissions are saved when they are changed. This will of course generate more traffic to the server, but it make implementation (and usage) way simpler.
Yes upload-only is a good idea... Perhaps "view, upload, delete" would be better than read, write?

oh yes !!! the demo look so great !!!
Where i can get it ?

@Colir Right now the only addition is that multiple users can login. All of them has full admin rights. When/If I finish it I will submit a pull request, meanwhile you can grab my branch "multiuser", however I think it has conflicts with the current master, will try to resolve them soon.

This is the current status of this issue in my branch (will update comment continously):
Design

[x] Design database tables needed

GUI

[x] Add user management
[x] Add user privilege management
[ ] Per album user privilege selections (see earlier comments in this thread)

Security

[ ] Enforce album viewing rights server-side
[x] Enforce album viewing rights client-side
[ ] Enforce album upload rights server-side
[x] Enforce album upload rights client-side
[ ] Enforce album deletion rights server-side
[x] Enforce album deletion rights client-side

Should a normal user have the right to create albums? Adding another option for this would be quite hard, gui-wise, but for my use case I don't care, so unless someone else thinks differently non-admins will not be able to create albums...

Looks like a good plan @Aidenir and looking forward to seeing the next version.  :+1:

ok thanks you very much

Ok, new status update.
Right now I would say my branch qualify as a beta of v1.
Supported:

Create multiple users
Assign either "admin" or "user" role

Admin: all rights to everything
User: can be allowed to view albums, upload photos to albums, and delete photos from albums. Obviously the user must be allowed to view to be able to upload or delete.
User: set view,upload, delete on specific albums.

Not implemented:

Rights on smart albums. These are completely ignored so far.
Modification of album or photo metadata. I haven't even tested this, but I assume all users are allowed to change all metadata right now.
Modification of albums (delete, merge) by role user
Creation of albums as user
Moving photos by role user

The latest version is still available on https://demo.viha.se, as well as in my branch multiuser. New users are:

admin:password
user1:a
user2:a
user3:a

I really appreciate all feedback I can get on this, feel free to try to break the demo site. I have not tested it much. Since I no longer have the need for this function, I will not spend a lot of time on it unless someone else has some input in how the "not implemented" stuff should be designed.

Thanks for the update @Aidenir .  Where are the options to allow users to view, add and delete per album?  I've created an album as the admin and I'm looking to give permission to a new user. Currently the user can only see smart albums.

@moorestudios In the "manage users" in the top left corner, if you click on a user, you can see which albums he are allowed to. My plan is to have a similar view be available in the album view, where it will be possible to choose which users have access to the album, instead of which albums a user has access to.

Hello there !
For my own server, I'm merging your work on top of the latest develop branch. This is still ongoing (at the moment, I just did the merge and I will start heavily testing), but this may be of interest to you, as the version of master you started on is a little old now.
I rebased the sessions feature and now the multiuser is on its way.
Thanks for implementing anyway, this work allowed me to get more familiar with the code of Lychee, I wouldn't have been able to implement what I wanted from scratch.
https://github.com/Cilyan/Lychee/tree/multiuser

@cilyan - I've updated my demo site with your fork and it seems to be broken, at least for me.  Do you have it working on your end?  I can't authenticate any users...

@moorestudios - No, not yet. I stumbled upon some problems with the Session cookie databases, and at the moment there's a problem with the javascript, which I'm trying to debug but I was a little stuck while getting the source maps. I'm still working on it, just had too few time the last past days to push anything solid on Github yet.

@Aidenir Ive downloaded your lychee multi user fork and after connecting to my database it asks to create a user name and password for the install. When I try to create one it keeps saying,
"function not found: Please Check the spelling of the called function"
Are you able to assist me with this?
Thanks in advance

@engle2192 A little late maybe, but I'll try and take a look at it tonight.

I'm seeing the same thing as @engle2192

Seems to be a problem in php/api.php where it is falling into guest access mode while creating the admin user. It is trying to execute the function Settings::setLogin, which doesn't exist in guest Guest.php. I was able to work around it by commenting out lines 66 and 67 and replacing with "if (true){" for creating the admin account, and then setting back afterwards.

@Aidenir there are more problems with your branch;

I've come to understand that the mechanism for "sharing" an album with a regular user involves Settings --> Manage Users --> click the user, and it should open a window with a list of albums and checkboxes corresponding to the permissions granted to that user for that album. Unfortunately, the window is completely empty.

When logging in to a regular user without any albums, it spits out a blank page with a very cryptic error "Cannot execute function. Missing parameters or variables."

Following appears in logs;
[Mon Jan 11 11:34:58.866443 2016] [:error] [pid 5861] [client 127.0.0.1:60960] PHP Notice:  Undefined variable: database in /var/www/html/Lychee/php/modules/Album.php on line 217, referer: http://localhost/Lychee/
[Mon Jan 11 11:34:58.866461 2016] [:error] [pid 5861] [client 127.0.0.1:60960] PHP Notice:  Undefined variable: database in /var/www/html/Lychee/php/modules/Album.php on line 217, referer: http://localhost/Lychee/
[Mon Jan 11 11:34:58.866464 2016] [:error] [pid 5861] [client 127.0.0.1:60960] PHP Notice:  Trying to get property of non-object in /var/www/html/Lychee/php/modules/Album.php on line 217, referer: http://localhost/Lychee/

More problems;
You are using two reserved words as column names in table lychee_privileges. Those reserved words are "read" and "write".

Appears to be a bad query;
MariaDB [lychee]> SELECT a.id, a.title, p.view, p.upload, p.erase FROM lychee_albums a LEFT JOIN lychee_privileges p ON a.id = p.album_id AND p.user_id = 2;
ERROR 1054 (42S22): Unknown column 'p.view' in 'field list'
It appears that the view column was neglected from the table creation.

@Aidenir: I made a pull request to your fork with the database column changes.
Interestingly, the problem with the first admin account creation seems only to be terminal in Chrome. In Firefox, F5 is adequate to get past the problem on the second attempt. Its still a bug, mind you, just not a fatal bug.

@lbdroid I've merged your request, and I'll happily merge any other changes you make.
As I'm sure you noticed life got in the way and all the free time I had to work on this just went out the window, so I'm not sure whether I will finish this implementation. But I will at least look into the bugs reported in this thread and see if I can do anything about them.

Ok, I think I've solved the issue with the initial admin creation in commit  https://github.com/Aidenir/Lychee/commit/fc28037f38f1cf958867cbab310750d8349fe02b
As for a reegular user without any albums, that seems to work OK for me, meaning I only see the smart albums. However the error you added seems like a reasonable on, which I've fixed in https://github.com/Aidenir/Lychee/commit/7df1068cfc552b5351facfee2a47af7a29afbeff
And finally for the album selection for regular users, the window is blank if no albums exists(smart albums are completely separate), otherwise I see the albums I've created.
If you find any more issues please write about them. Otherwise I will probably not do much more here. What I'm missing is basically only selecting privileges for users based on album (now theres only album based on user), and this is not vital for my use-case anymore.

I'm down to just one obvious bug that I'm struggling with. If I leave it for a while without logging out, and refresh it, it goes into a strange mode where it shows basically a grey page with a black line separating the header area from the body. No contents, no buttons. If I clear the applicable cookies, it goes back to the logged out screen and I can log in and use it as normal.

[Tue Jan 12 14:32:42 2016] [error] [client 172.19.214.1] PHP Notice:  Undefined index: role in /data/lychee_image_host/php/api.php on line 66, referer: http://www.stage.ypdine.ca/imagehosting/
[Tue Jan 12 14:32:42 2016] [error] [client 172.19.214.1] 1 160d66a7f00a7882b64c486b83faaf1e  160d66a7f00a7882b64c486b83faaf1e, referer: http://www.stage.ypdine.ca/imagehosting/
[Tue Jan 12 14:32:42 2016] [error] [client 172.19.214.1] PHP Notice:  Undefined index: role in /data/lychee_image_host/php/api.php on line 70, referer: http://www.stage.ypdine.ca/imagehosting/

@lbdroid Yes I'm seen that issue as well, but I haven't been able to find the cause.
How did you get those log lines? Is it when the above issue is present?
If that is the case I think it has something to do with the php session expiring, and a session cookie still being present and active, but since Session::init is not called the php session doesn't contain the required variables (login, role and identifier).

I may be having trouble with your commit https://github.com/Aidenir/Lychee/commit/fc28037f38f1cf958867cbab310750d8349fe02b
After I pulled that one in, it started persistently going into the blank page mode, even after wiping my browser profile.

Do you have any steps to reproducce it? I tried with a fresh pull and a clean database and I can't get the blank page unless I let the php session expire.

Never mind that. Its working fine on my test rig.

Hey everyone, please stop using this issue for commenting a fork. Forks have their own issues. New "unrelated" comments will be deleted. Thanks!

On 12.01.2016, at 21:08, Viktor Hansson notifications@github.com wrote:
Do you have any steps to reproducce it? I tried with a fresh pull and a clean database and I can't get the blank page unless I let the php session expire.
—
Reply to this email directly or view it on GitHub.

@electerious could you please clarify... while it may be a fork, everything is a fork until it reaches a stage where it can be merged back, and in my mind, that makes it a valid discussion for this forum. That is, unless upstream has no intention of accepting this feature when it is finally ready...?

It's fine to discuss the general direction of forks, but I don't want that this issue turns into a support page. Issues related to the fork (e.g. "It's not working") should be postes in the issues of the fork.

On 12.01.2016, at 21:31, lbdroid notifications@github.com wrote:
@electerious could you please clarify... while it may be a fork, everything is a fork until it reaches a stage where it can be merged back, and in my mind, that makes it a valid discussion for this forum. That is, unless upstream has no intention of accepting this feature when it is finally ready...?
—
Reply to this email directly or view it on GitHub.

Ok, fair enough.
@Aidenir; could you add an issue tracker to your fork?

@electerious ok sounds reasonable.
@lbdroid done.

What's the status of this? Has @Aidenir run out of time to work on it?
If so, did the approach taken by Aidenir work without drawbacks - should someone else try to manually rebase the multi-user commits to the current Lychee, or were there still issues to resolve?

@Treer: As I needed the multi-user feature for the setup I had in mind, I've tried to get the branch created by @Aidenir updated to a more recent Lychee version (v3.0.9). Didn't have much time to work on it recently, have the website working with some bugs:

Login not auto-forwarding after successful login
Menu button not always reacting
I didn't initially notice that the video support feature was also included in Aidenir's fork. Not sure if this correctly works.

I'm currently trying to get it into a clean/stable state before updating the fork to the latest Lychee version.

I very much like the multiuser features myself, so I started separating @Aidenir's multiuser branch from the video support. My branch https://github.com/caspre24/Lychee/tree/multiuser is now based on v3.0.2 which is quite old.
I hope I find the time to merge with the lastest master the next days. In the meantime this branch might serve as a (hopefully clean) base to get multiuser support into Lychee, as @Treer suggested =)

The Multiuser tree is not longer available.
Is it still in work?

@petrk94 is available again. Seems I deleted it during cleanup of my github account. I found another solution that I find more practical so I won't be developing on Lychee anymore.

@caspre24 what you have found for a solution?
So I can use Lychee as for multiuser?

I'm now using piwigo with a bootstrap-based theme.
I'm not sure, how stable the multiuser-branch is.

Ah i see, I like the interface of lychee. Piwigo doesn't shows nice.
I want to use it as a free web service for photos.
Am 29.10.2016 13:01 schrieb "Carsten Sprung" notifications@github.com:

I'm now using piwigo with a bootstrap-based theme.
I'm not sure, how stable the multiuser-branch is.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/electerious/Lychee/issues/132#issuecomment-257085213,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASzjjLPUSFc-KcjmLwD7umlc6Dvj1_B5ks5q4yeTgaJpZM4B1K3R
.

Checking in again, after losing track of this issue for some time.
Currently have Lychee v3.1.5 up with basic multiuser implementation.
I have a server hosting a working lychee install based on the latest hash (3df88ba1298c46acadb07fbf6ce2af7fb0d05d5f) and I'm using that to check for further bugs.
Current list of issues I need to look into:

Starring of photo needs to be stored in separate table so it isn't shared between users.
Moving a photo while creating that album, only creates the album without moving the photo to it.
Video support is in this branch, but untested. Will need to be stripped out to a separate branch.
Code cleanup will be needed: debugging prints, adding comments, ...
....

I'm currently further cleaning up and checking for other bugs. If anyone does try my code in the meantime, be sure to report any problems you find.
I only recently learned about @caspre24's code. I might compare my current code against his changes, not sure far along he was..

Hello,
thanks for the informations. I want to use it as a service in a local Free Wifi Community called "Freifunk" in Germany. Thats why mulituser support is necessary.
My current problem is to install it on the server, because it denied the mysql server login and I dont know why this issue happens.

@petrk94 If you're seeing this problem only on my fork. Please create an issue there and I'll take a look at it.

@mvanrompuy I dont have tried your fork, are you developing it by yourself or only sometimes?

We'll I'm trying to get a multi-user install up and running for a family project. So I'm currently implementing it on my own.
Once I'm happy with the implementation I would also be open to other improvements that would be needed to try and merge this feature to master branch. So any input is welcome.

@mvanrompuy
this would be great :) please let us know when you have it done, the multiuser part is really important for me. In 2 weeks I can send you a screenshot of the Lychee issue with mysql, before I dont have internet which is fast enough to use it for working :/

Currently have a fairly stable multi-user branch on my account. Code needs some cleaning up and bugfixes, which I'm working on. If anyone's interested in helping feel free to report issues on my fork after trying out my code.

@mvanrompuy  I would like, but as freelancer I have not enough time. And I can not PHP, only HTML in this case :/

+1

+1 for the multi-user, thanks for working on it

+1

is anyone working on this?

+1

Github has a emoji/reaction function, where you can '+1' ideas without spamming watchers' inboxes. Please use it! Thank you!

is anyone actively working on this?

This issue will be closed because I'm not actively working on Lychee anymore. The repository of Lychee will stay available, but the main development continues under the Lychee Organisation. A fork maintained by the community. Important issues have been migrated. Feel free to re-add your issue(s) when necessary.

authors: 70m43 Aidenir BenoitDuffez COLABORATI Cilyan Colir Enoch247 JanWerder Ludvins MarceFX NxtGenCowboy Oozemeister PeterTheOne Shadowsilk Treer alleyoopster caspre24 computaholic djdallmann electerious engle2192 ftairs jeyca lbdroid lebochequirit mbrgm moorestudios mvanrompuy nikolauskrismer ohhdemgirls petrk94 pmichelazzo salyh scerazy squires tmlmt wongalan2002 xxcram ymoran00 zuloo

repo: electerious/Lychee


text:
Fix error 500 on database connect error

If $connection===false it obviously has no properties.
PR was originally opened as #529 against master (sorry).

Thanks for the fix!

Made connect_error a private function as it's currently used within the class only.

source: gharchive/pull-request

authors: electerious tribut

license: mit

license_type: permissive

license_source: bigquery


text:
Oled screen auto power off

Power off oled screen after 20s

Just checked this out using Torus as a test platform.

When I didn't explicitly set screenSaverTimeOut it caused a very short timeout which basically made the display flicker on each time you moved a control. Maybe we canb resolve this by having it default to 0.
It would be cool if the user could specify their own screensaver animation, although that's very much a thing we can just add later.

If you look into fixing 1 I'd say this is good to merge from a feature perspective.

Ouu, I agree with @beserge for custom screensaver animation, but I think that's out side of the scope of the PR. So I've made a new issue just for that.
Since a few of the other fields in the UiCanvasDescriptor will also cause issues when not explicitly set I think it's okay to leave it for now..
Once we get a few of the open PRs merged, and the GPIO converted to C++ I want to map out going through and cleaning up the existing inconsistencies within various parts of the API. So we can add a constructor for any logical defaults during that.
I think for now we can merge it.

@Tom97531 thanks for the contribution!

authors: Tom97531 beserge stephenhensley

repo: electro-smith/libDaisy

license: MIT

license_source: github-api


text:
asar.unpackDir directory will be included both in "app.asar" and in "app.asar.unpacked".

I found my own built Electrion Application contains duplicated file
in "app.asar", and in "app.asar.unpacked".
There is a way to remove duplicated file
in generated "app.asar" with electron-packager ?
Steps to reproduce:

build Electrion Application with electron-packager.

  electron-packager . hello-electron-000 --platform=darwin --arch=x64 --electronVersion=2.0.8 --overwrite --asar.unpackDir=unpack

app.asar.unpacked directory contains "asar.unpackDir" file.

  ls hello-electron-000-darwin-x64/hello-electron-000.app/Contents/Resources/app.asar.unpacked/unpack
  > test.txt

app.asar contains "asar.unpackDir" file, too.

  asar e hello-electron-000-darwin-x64/hello-electron-000.app/Contents/Resources/app.asar dist
  ls dist/unpack
  > test.txt

**Console output. **
% npm run package

> hello-electron-000@0.1.0 package /Users/taku.omi/Desktop/hello-electron-000
> electron-packager . hello-electron-000 --platform=darwin --arch=x64 --electronVersion=2.0.8 --overwrite --asar.unpackDir=unpack

Packaging app for platform darwin x64 using electron v2.0.8
Wrote new app to /Users/taku.omi/Desktop/hello-electron-000/hello-electron-000-darwin-x64
% ls hello-electron-000-darwin-x64/hello-electron-000.app/Contents/Resources/app.asar.unpacked/unpack
test.txt
% asar e hello-electron-000-darwin-x64/hello-electron-000.app/Contents/Resources/app.asar dist
% ls dist/unpack
test.txt

using minimum electron project:

https://github.com/taku-o/hello-electron-000

environment:
Mac OS X 10.13.6
electron-packager 9.1.0, and 12.2.0

It's not actually in the app.asar file. There is an entry in the asar file for the file in its metadata, but the contents are not actually there. To verify this, you can run:
grep aaaaa hello-electron-000-darwin-x64/hello-electron-000.app/Contents/Resources/app.asar

On my machine, it cannot find the contents of unpack/test.txt.

source: gharchive/issue

authors: malept taku-o

repo: electron-userland/electron-packager


text:
Try other ports when port 9000 is already used

Pre-flight checklist

[X] I have read the contribution documentation for this project.
[X] I agree to follow the code of conduct that this project uses.
[X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem description
When running npm start in a just-created project, I saw:

Proposed solution
Try other ports when port 9000 is already used.
Alternatives considered

Not trying out other ports: status quo, 0 development required, but 0 support for other ports different than 9000.

Additional information
Please.

Or allow us to specify a custom port.

It looks like you can modify the default port by configuration.🤔 Can you try it?
https://github.com/electron/forge/blob/5b40a8dbeeebb388f5aa1a39c1f452b8b7800f45/packages/plugin/webpack/src/Config.ts#L144-L146

Thanks! Indeed this was useful, for sure there was a way to configure it, but the sole fact of it being non-trivial made me create this issue. I suggest one of the following alternatives:

Add the port-probing mechanism, check for availability of a port from 9000 to 9999, for example, and fail if none is available
Add the line with the loggerPort: 9000, to the config generated by the npm init electron-app@latest my-app or yarn create electron-app my-app commands (or any other command that generates a project from a template). It would be redundant, for sure, since 9000 is a default value, but it would also be very convenient since changing the port would be trivial. I assume everyone will try first CTRL + F, and then 9000, and this time they'll find something, and be able to change it to make it work.

Thanks again!

authors: BlackHole1 maccman xavierlint

repo: electron/forge


text:
3rd party modules that support specific post type render on other post types too

Is this a bug report?
Yes!
Details:
1- I'm talking about modules with $this->post_types = array( 'X_post_type' );
2- Let's say you have two post types X and Y
3- When you edit a post from Y, the module must NOT render in the builder.
4- The issue: If you have a saved layout in the library that contains that module, and you import this layout in a post from type Y, the module renders in BOTH back-end and front-end.
5- This issue started with Divi 3.1, it didn't happen before.
6- In Divi before 3.1, if you import the layout in post type Y and that layout has a module that only supports post type X, it will NOT render in the back-end nor the front-end.
7- This screenshot shows the difference between Divi 3.1 and older
https://test.abdozo.com/wp-content/uploads/2018/04/Screen-Shot-2018-04-23-at-7.21.44-PM.png

Steps to Reproduce
Steps above.
Expected Behavior
A module that supports specific post should NOT be rendered on another post type, front-end and back-end.
And if a "saved layout" has that module and imported to a different post type, that module must be removed from the content just like before.

Note
I opened a support ticket in Elegant Themes forums but the support agent asked to open an issue here.

Hi, any updates on this one?

The fix for this is currently going through QA. It should make it into the next update :smiley:

repo: elegantthemes/create-divi-extension


text:
softLayer IBM s3

is it possible to add support for it? only missing env is ENDPOINT

@sarkistlt, can you send a PR for that?

Also, have you tried specifying the environment variable when running the container? It should support any environment variable supported by the aws-cli command.

let me test a couple things first, I think it will require new s3cfg file for IBM, but it's possible to have 2 conf file, lets say default and s3cfg-ibm, then if you want to use IBM all you need is add one more env. variable AWS_CONFIG_FILE=/s3cfg-ibm

Closed until OP sends more info.

authors: fabiob sarkistlt


text:
Issues with the Build System section of the Getting Started document

Point 2: Folder created is called cmake-modules. It should be made clearer that this needs to be renamed and copied into the hello-again folder.
Point 3: With the CMakeLists.txt file used as-is, the application will not build, and the cmake -DCMAKE_INSTALL_PREFIX=/usr ../  command from the next section will not run.
Change line 8 to list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/src)

Additionally, the instructions should include to remove the .bzr folder from the /cmake directory, otherwise the directory cannot be added to the repository

Was having the same issue, came up with a different fix. I copied the files in cmake-modules/src to a ~/Projects/${PROJECT_NAME}/cmake to work around the bzr issue.

This section needs to be updated as we now ship these cmake options as a development dependency which makes them update in all applications automatically instead of pulling them manually from version control. This needs input from our desktop developers.

Is there a better forum for questions on the Getting Started/Developer documentation? I'm having a hard time with the localization stuff too. I think the documentation is out sync there too.

On 15 February 2016, at 4:36 PM, Fabian Thoma notifications@github.com wrote:
This section needs to be updated as we now ship these cmake options as a development dependency which makes them update in all applications automatically instead of pulling them manually from version control. This needs input from our desktop developers.
—
Reply to this email directly or view it on GitHub.

The website isn't that outdated, you have two options:

move cmake-module into the cmake folder of your project, then nothing has changed.
use the cmake-elementary package (that is available starting from Loki)

If you're on arch, use the cmake-elementary-bzr package in the AUR

This is being addressed in #1157

authors: benwaffle danrabbit fabianthoma flatcap-monty tintou tkegan

repo: elementary/mvp


text:
fix: race condition tracking current ui

This PR addresses a race condition, when tracking the current UI, that can occur when open/closing the property inspector in quick succession, causing the propertyInspectorDidAppear and propertyInspectorDidDisappear to run out of sync.

Good suggestion; I've added a debounce counter to offset appear / disappear being out of sync for the same property inspector.

repo: elgatosf/streamdeck


text:
MSID: 90445 Version: 3 DOI: 10.1101/2022.09.27.509747

MSID: 90445
Version: 3
Preprint DOI: https://doi.org/10.1101/2022.09.27.509747
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=90445
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2022.09.27.509747

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/90445v3
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2022.09.27.509747
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/90445/v3/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

Structrual issues

authors: fred-atherden nlisgo

repo: elifesciences/enhanced-preprints-import


text:
include API coverage in README

The current README says it fully implements classList which initially misled me to believe it supported the replace method. This change updates the README to make it clearer what is supported.
Related to #70

I think it would be easier to just implement replace. I'll look into it when I get time, or you can submit a pull request that implements replace.

Sorry I don't have a need for it right now as it's easy enough to work around, so this PR was only meant as a stop gap until someone else implements #70.

Oh I just noticed you implemented replace :tada: Thanks.

that's a good thing

@eligrey Are you going to publish 1.2.201711092 to npm?
Can't wait for that

authors: andrewharvey eligrey englishextra

license: unlicense


text:
How to reload a component?

Thank you for this excellent library.
I am using aggrid to display a table. I'd love to make sure the content is refreshed on a click of a button.
the following reload obviously does not do this but adds another aggrid ... What needs to be changed to replace the aggrid with a "new" aggrid from a pandas dataframe or reuse the existing aggrid for the purpose?
def reload(self,_msg=None):
        '''
        reload clicked
        '''
        grid = self.df.jp.ag_grid(a=self.container)
        grid.row_data_div = self.row_data_div
        grid.on('rowSelected', self.row_selected)
        grid.options.columnDefs[0].checkboxSelection = True

I haven't used ag_grid. Why are you creating a new grid on reload? Just update the data for the current grid. It will get refreshed.

authors: WolfgangFahl sandeep-gh

repo: elimintz/justpy


text:
ci: fix broken CI pipeline

Summary by Sourcery
Update Docker Compose command, pin pip version to <24.1, and add type hints.
Build:

Pin pip version to <24.1 in the build process.

Chores:

Update the Docker Compose command to use the new syntax.
Add type hints to improve code maintainability.

@sourcery-ai review

Hey @JaeAeich - I've reviewed your changes - here's some feedback:
Overall Comments:

Consider splitting different types of changes (type hints, dependency updates, docker compose changes) into separate PRs for better review granularity
What's the rationale for strictly pinning foca to version 0.12.1? Using exact version pinning (==) instead of minimum version (>=) can make security updates more difficult

Here's what I looked at during the review

🟢 General issues: all looks good
🟢 Security: all looks good
🟢 Testing: all looks good
🟢 Complexity: all looks good
🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

X
Mastodon
LinkedIn
Facebook

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Generally a good comment, but in this case, we want to repair a broken CI because of outdated code. It makes sense to do so in one PR, especially since the changes are small.

Hey @JaeAeich - I've reviewed your changes - here's some feedback:
Overall Comments:

Consider explaining the rationale for pinning pip to version <24.1 in the PR description. If this is addressing a specific issue, it might be better to fix the root cause rather than artificially constraining the pip version.

Here's what I looked at during the review

🟢 General issues: all looks good
🟢 Security: all looks good
🟢 Testing: all looks good
🟢 Complexity: all looks good
🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

X
Mastodon
LinkedIn
Facebook

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

It may indeed be good to explain this. But no, we're gonna stick with the workaround for now.

Consider explaining the rationale for pinning pip to version <24.1 in the PR description. If this is addressing a specific issue, it might be better to fix the root cause rather than artificially constraining the pip version.

pining pip version because of dependency resolution issues in CI, since sooner or later this will be revisited and updated with pyproject, that will eventually update all the deps.

authors: JaeAeich uniqueg

repo: elixir-cloud-aai/proWES


text:
Float in embedded schema incorrectly written to db

When an embedded schema contains a field of type float it is in some cases incorrectly written to db. Embedded schema is an embeds_one :options, Test.Options, on_replace: :delete, of type jsonb in postgres db, and it contains
  embedded_schema do
    field :float_two, :float
  end

In case changeset contains value of e.g. 1,  changes: %{float_two: 1.0}, then Repo.update results in a correct state, e.g.

 id |     name     |  options
----+--------------+----------------------
  1 | testname     |  {"float_two": 1.0}

Reading the embedded schema is ok.

In case changeset contains value of e.g. 3000, changes: %{float_two: 3.0e3}, then Repo.update results in e.g.

 id |     name     |  options
----+--------------+----------------------
  1 | testname     |  {"float_two": 3000}

Reading the embedded schema in this case raises e.g.
Exception: ** (ArgumentError) cannot load `3000` as type :float for :float_two in schema Test.Options
    (ecto) lib/ecto/schema.ex:1394: Ecto.Schema.load!/5
    (ecto) lib/ecto/schema.ex:1362: anonymous fn/5 in Ecto.Schema.__load__/4
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/schema.ex:1347: Ecto.Schema.__load__/6
    (ecto) lib/ecto/type.ex:440: Ecto.Type.load_embed/3
    ...

Environment

Elixir version (elixir -v): Elixir 1.3.1
Database and version (PostgreSQL 9.4, MongoDB 3.2, etc.): PostgreSQL 9.5.1
Ecto version (mix deps): ecto 2.1.0-rc.4
Database adapter and version (mix deps): ecto 2.1.0-rc.4
Operating system: macosx 10.11.6
Poison: poison 2.2.0

What version of Poison (or other json serializer, if you changed the default) are you using?

@michalmuskala poison is version 2.2.0, updated above

I don't think this is a Poison bug. Poison encodes integers as 1 and floats as 1.0, which is valid according to the json spec.
The question is why ecto doesn't cast the value 3000 to 3000.0. It would be interesting to see how you build the changeset, there is a chance no casting is happening.

Changeset is built as below. It seems that if inspecting changeset shows the changed value in E notation (e.g. 3.0e3) the value is written as integer.
If I put "1" or "10" or "3000.1" in params below, the thing works correctly, while "100" shows 1.0e2 in changeset and an integer appears in db.
defmodule Test.Options do
  embedded_schema do
    field :float_two, :float
  end
  def changeset(arguments, params \\ :empty) do
    arguments
    |> cast(params, [:float_two])
    |> validate_required([:float_two])
  end
end

defmodule Test do
  schema "tests" do
    field :name, :string
    embeds_one :options, Test.Options, on_replace: :delete
  end
  def changeset(arguments, params \\ :empty) do
    arguments
    |> Ecto.Changeset.cast(params, [:name])
    |> Ecto.Changeset.cast_embed(:options, required: true)
  end
end

id = 1
params = %{name: "testname", options: %{float_two: "3000"}}
Repo.get!(Test, id)
|> Test.changeset(params)
|> Repo.update

The problem seems to be related to both poison and postgres. The query produced is
UPDATE "tests" SET "options" = $1 WHERE "id" = $2 [%{float_two: 3.0e3}, 1]

Postgres then writes 3000 to db, same as if in psql
update tests set options = jsonb_set(options, '{float_two}', '3.0e3') where id=1;
select options->'float_two' from tests where id=1;
 ?column?
----------
 3000
(1 row)

Putting in '3000.0' produces
 ?column?
----------
 3000.0
(1 row)

As per postgres docs it seems to me I've been barking up the wrong tree.
The problem is not writing the numeric type but reading it. I think ecto should always take into account the underlying type of embedded field: translating it to postgres jsonb types and back is not unambiguous.
So loading a jsonb field of type numeric with value 3000 into a field of type float or integer should both succeed, whereas loading the same with value 3000.0 into a field of type float should succeed, but to type integer it should not.

I found the problem was with loading the thing from a map. It works ok when loading from db.

authors: ericmj michalmuskala strokovnjaka

repo: elixir-ecto/ecto


text:
Add index storage parameters for Postgres

Hi, thanks for Ecto!
This PR adds support for index storage parameters for Postgres.
index(:posts, [:permalink], options: "fillfactor=50")

It uses :options for the WITH clause like TDS.

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

Thanks @josevalim!

authors: ankane josevalim


text:
RFC support reading dotenv files in tasks and plugin/workspace configuration

Explore loading environment variables from dotenv files as single source of truth for secret configuration settings that should not be part of the git repository and in as few places as possible.
This is a first draft and 'works on my machine' but I am looking for feedback regarding maintainability or other use cases I may not be considering.
Enables loading a dotenv file via i.e. workspace config:
{
	"folders": [
		{
			"path": "."
		}
	],
	"settings": {
		"elixirLS.projectDir": "myProjectDir",
		"elixirLS.envFile": ".env"
	}
}

or in tasks:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "mix_task",
            "name": "mix (Default task)",
            "request": "launch",
            "projectDir": "${workspaceRoot}/myProject/",
            "envFile": "${workspaceRoot}/.env"
        },
        {
            "type": "mix_task",
            "name": "mix test",
            "request": "launch",
            "task": "test",
            "taskArgs": [
                "--trace"
            ],
            "startApps": true,
            "projectDir": "${workspaceRoot}/myProject/",
            "envFile": "${workspaceFolder}/.env",
            "requireFiles": [
                "test/**/test_helper.exs",
                "test/**/*_test.exs"
            ]
        }
    ]
}

I verified the behavior with a test project and modifying test_helper.exs
System.get_env |> Enum.each(fn {n,v} -> IO.puts("name : #{n}\nvalue: #{v}") end)

ExUnit.start()

The current implementation has a few potential weaknesses / gotchas, which in my opinion is sufficient to address via documentation

little control out of the box within the app / code over what env vars are actually imported, though one could argue that this may not be desirable / out of scope and should be handled in the app consuming the environment variables
given a workspace configuration already had a envFile and an alternative envFile is specified , environment variables loaded in the previous file will not be removed from the environment - in the debugger a simple restart suffixes to clear the old environment variables

Hi,
Thanks for the feedback. I share your concerns. I'll see what I can come up with based on your feedback.
Cheers

@TobiG77 are you still interested in getting this merged? It doesn't seem to be a highly asked for feature and I don't really see the use cases

repo: elixir-lsp/elixir-ls


text:
Changes when CI runs

Right now it was only working for pull requests, but this is not exactly right:

It can happen that on merge our CI will fail, even the PR was fine. It happens when PR is stale for some time and is not properly rebased. New code can be pushed in the meantime
When you push directly to master
Without workflow_dispatch you cannot manually trigger the CI, which is sometimes super helpful

Getting this right was on my todo list. This looks right to me. :) Thanks!

authors: cigrainger sobolevn

repo: elixir-nx/explorer


text:
Change 'Program Files' to 'Program Files (x86)'

This is what the path is on my Win7 system, and what's mentioned in #2. It also seems like most people are using 64-bit Windows these days, or whatever it is that triggers the x86 variant of the Program Files directory, so I thought it was better to just change it rather than add special instructions for 64-bit Windows.

Different versions of windows use different names for this. Either way, it's going to be wrong unfortunately :(

authors: evancz toolness

repo: elm-lang/elm-platform


text:
Make Croppr handle resized large images

Call Croppr.reset() after editing the image height in order to correctly position the cropping bounding box.
When the image uploaded is large, Uppload will resize it to fit within the modal, but this results in Croppr positioning the cropping bounding box incorrectly.

There may be an issue here with some of the other settings not persisting with Croppr, specifically startSize. I'm checking a bit more.

Croppr converts percentage sizes to pixels when initialized, so calling reset does not fully address the issue.

I ended up needing to use some private Croppr methods, but I got it working nicely. Here's the relevant code from crop.js:
var cropOptions = {
    aspectRatio: scope.settings.crop.aspectRatio || null,
    maxSize: scope.settings.crop.maxSize || null,
    minSize: scope.settings.crop.minSize || null,
    startSize: scope.settings.crop.startSize || [50, 50, "%"],
    onCropStart: data => {
        dispatch("cropStart", data);
    },
    onCropMove: data => {
        dispatch("cropMove", data);
    },
    onCropEnd: data => {
        dispatch("cropEnd", data);
    },
    onInitialize: instance => {
        const allImages = previewWindow.querySelectorAll("img");
        for (let i = 0; i < allImages.length; i++) {
            if (allImages[i].offsetHeight > previewWindow.offsetHeight) {
                allImages[i].style.height = previewWindow.offsetHeight + "px";
            }
        }

        // Reset the Croppr instance after we resized the images.
        // insance.options is converted from percentage values to px values when it is initialized
        // so we need to reparse and reconvert before resetting the Croppr instance
        instance.options = Croppr.parseOptions(cropOptions);
        instance.options.convertToPixels(instance.cropperEl);
        instance.reset();
    }
};
const cropInstance = new Croppr(scope.modalElement.querySelector("#previewImage"), cropOptions);

This look good, thanks @pegler! I'll merge your request and add the convert to pixels lines as well.

This has been added in 0.3.5.

authors: AnandChowdhary pegler

repo: elninotech/uppload


text:
Fatal error: Uncaught Error: Undefined constant "Eloquent\Phony\Reflection\STDOUT"

After recently upgrading a Symfony 5.2 project to PHP 8, I'm getting the following error message:
NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "Eloquent\Phony\Reflection\STDOUT" in /usr/src/app/vendor/eloquent/phony/src/Reflection/FeatureDetector.php:155
Stack trace:
#0 /usr/src/app/vendor/eloquent/phony/src/Reflection/FeatureDetector.php(98): Eloquent\Phony\Reflection\FeatureDetector->Eloquent\Phony\Reflection\{closure}(Object(Eloquent\Phony\Reflection\FeatureDetector))
#1 /usr/src/app/vendor/eloquent/phony/src/Difference/DifferenceEngine.php(50): Eloquent\Phony\Reflection\FeatureDetector->isSupported('stdout.ansi')
#2 /usr/src/app/vendor/eloquent/phony/src/Difference/DifferenceEngine.php(37): Eloquent\Phony\Difference\DifferenceEngine->setUseColor(NULL)
#3 /usr/src/app/vendor/eloquent/phony/src/Facade/FacadeContainerTrait.php(193): Eloquent\Phony\Difference\DifferenceEngine->__construct(Object(Eloquent\Phony\Reflection\FeatureDetector))
#4 /usr/src/app/vendor/eloquent/phony/src/Facade/FacadeContainer.php(18): Eloquent\Phony\Facade\FacadeContainer->initializeContainer(Object(Eloquent\Phony\Assertion\ExceptionAssertionRecorder))
#5 /usr/src/app/vendor/eloquent/phony/src/initialize.php(10): Eloquent\Phony\Facade\FacadeContainer->__construct()
#6 /usr/src/app/vendor/composer/autoload_real.php(71): require('/usr/src/app/ve...')
#7 /usr/src/app/vendor/composer/autoload_real.php(61): composerRequire34151eb540343bf5a399e451787004d2('a4b31be0740d153...', '/usr/src/app/ve...')
#8 /usr/src/app/vendor/autoload.php(7): ComposerAutoloaderInit34151eb540343bf5a399e451787004d2::getLoader()
#9 /usr/src/app/public/index.php(10): require('/usr/src/app/ve...')
#10 {main}
  thrown in /usr/src/app/vendor/eloquent/phony/src/Reflection/FeatureDetector.php on line 155

One solution could be explicitly checking for the CLI SAPI:
--- a/vendor/eloquent/phony/src/Reflection/FeatureDetector.php
+++ b/vendor/eloquent/phony/src/Reflection/FeatureDetector.php
@@ -152,7 +152,7 @@ class FeatureDetector
                 }
                 // @codeCoverageIgnoreEnd

-                return function_exists('posix_isatty') && @posix_isatty(STDOUT);
+                return function_exists('posix_isatty') && PHP_SAPI === 'cli' && @posix_isatty(STDOUT);
             },
         ];
     }

Thanks for the report. I think I borrowed that code from the Symfony CLI component. I'll go have a look at what they're doing and see if they've made any changes. Could you help me out with the version(s) of Phony you're using?

Sorry for not mentioning that in my report. I'm using the latest version of phony - 5.0.1

Thanks. I've just pushed a branch that should hopefully fix the issue. Could you give Phony dev-update-ansi-check a go and see if that works for you?
I'm also curious - what SAPI are you running this under? I would have assumed most people run their tests under the CLI SAPI so I'd like to know the use case 👍

That worked!
I'm only running phony under the CLI SAPI (via Kahlan) and that's never been a problem.
But because I have it installed as part of my dev dependencies, it gets automatically evaluated and included in my composer autoloader and that wasn't playing nicely in a Symfony fpm-fcgi SAPI context - even though phony was not being used.

Fixed in 5.0.2.

authors: ezzatron yanneg

repo: eloquent/phony


text:
Reaction SMARTS

I have a need to perform chemical reactions on rdkit molecule objects with SMARTS patterns.  Would it be possible to have that capability added?
https://www.rdkit.org/docs/source/rdkit.Chem.rdChemReactions.html

I spotted some new functionality related to reactions in the MinimalLib but I'm not sure if it will be enough. It might be worth for you to open a discussion in the rdkit github repo telling what you want to achieve and asking if the required functionality could be added to the lib.
Happy to wrap it if it gets included. On the meanwhile I'll wrap the new functionality in the latests build for Julia: https://github.com/JuliaPackaging/Yggdrasil/commit/50255359bbbba66168d04b2ef5b9470c4a4b545a

I just wrapped the available functionality and it seems it can only draw reactions

authors: eloyfelix jmyounk


text:
Homework 3 Mihail Ernandes 10a 21

Homework 3 Mihail Ernandes 10a 21

Здравейте , мога ли да питам кои задачи съм оплескал и с какво , понеже имам само 10 точки и няма обяснение защо .

Зад. 3, вход:
23456789JQKA
изход: 2
това е резултат от компилиране с gcc -Wall task1.c:
There are warnings: /home/tsvetelina/elsys/po-homework/2015-2016/A/21/03/task1.c: In function ‘main’:
/home/tsvetelina/elsys/po-homework/2015-2016/A/21/03/task1.c:6:13: warning: unused variable ‘p’ [-Wunused-variable]
     int n,i,p,l,k;
             ^

Има ли възможност да ги оправя задачите ?

Оправете ги, но след като срока е минал няма как да получите повече точки

authors: FarbyPeckers tborisova

repo: elsys/po-homework


text:
Option to change ▶ symbol

I'm using elvish under WSL (basically, shell-only Ubuntu) under Windows 10. The only problem that I've noticed thus far in compatibility with conhost (the Windows master terminal) is that the default symbol used as the indicator for structured output ▶ is not rendered.
I'm sure that conhost isn't the only terminal with issues rendering the ▶ symbol (or maybe the font used simply doesn't have a mapping for that codepoint), so an option to change the indicator to an ascii character like * or something would be handy.
If this is already possible, I humbly beg forgiveness and would appreciate a link to read the relevant documentation.

Documented in https://elvish.io/ref/builtin.html#value-out-indicator.

It's nice that you allowed for an arbitrary string rather than a single character. This means you can include escape sequences to do things like change the color. You can't see it here but the hash-mark is rendered in green:
~/go/src/github.com/elves/elvish> value-out-indicator = "\e[32m#\e[m "
~/go/src/github.com/elves/elvish> put $value-out-indicator
# "\e[32m#\e[m "

I didn't see any obvious way to specify the style of the text in an abstract manner rather than hardcoding the escape sequences. Using le:styled as documented in issue #199 no longer works and there doesn't seem to be anything relevant in the docs.
Is the intent that people should use the external tput command? Would introducing a builtin analogous to fish's set_color command be accepted?

The le: module is now known as edit:.
It is not ideal, but you can use echo to convert the output of edit:styled to a string: value-out-indicator = (echo (edit:styled '# ' green))

authors: krader1961 mqudsi xiaq

repo: elves/elvish


text:
Removed $pwd from showing in Directory History listing in the CTRL+L tab(LOCATION) #527

The make passed successfully with those changes and the behavior is the intended one . Awaiting comments and feedback as this is my first serious contribution to the github&open-source community .

Welcome to the open source community! :)

Thank you! :)

Thanks.

Thanks for including it ! :)
Glad I could contribute to elvish since I've been using it for a while now both at home(+phone) and at work ! I'll keep contributing however I can around here . :smiley:

authors: adracea notramo xiaq


text:
Fix Airflow Operator execution bugs in handling of Elyra-owned properties

This PR fixes 2 bugs related to volumes for Airflow operators:

Brought to our attention in the elyra-ai/community gitter - The issue is that the mounted_volume property is being persisted as an empty list in the case where no values are added. This value is then not being popped off the dict of component_parameters for a given component before being passed to the DAG to render. The extra, unexpected kwarg is causing certain operators to fail.

airflow.exceptions.AirflowException: Invalid arguments were passed to PythonOperator (task_id: PythonOperator). Invalid arguments were:
**kwargs: {'mounted_volumes': []}

Fixes #2866 - The issue here is that pipeline default properties such as runtime image and kubernetes secrets are being incorrectly propagated to custom components and appearing in the component_parameters dict. Due to formatting errors with the runtime_image field in the DAG, black is throwing an error. Even without this formatting error, however, these operators would not execute properly.

What changes were proposed in this pull request?
This PR adds more conditions around property propagation and persistence on the Operation object.
Re: issue 1 above, the mounted_volumes property is now appropriately popped off the dict of component_params for an Operation object. If the value of the mounted_volumes param is not None, is a list, and either 1. the list is empty or 2. the list consists of VolumeMount dataclass objects, the mounted_volumes key is popped off the dict. This means it will not be rendered alongside the component-defined parameters for which a value was supplied. Recall that we are accounting for the possibility that the component defined its own mounted_volumes parameter. If this is the case, and if that property happens to be list-valued and the value entered is an empty list, the consequences of popping this off the param dict should be minor.
Re: issue 2 above, any property that is 1. considered a pipeline default and 2. only applies to generic components is now appropriately skipped during property propagation for custom components. A list of such properties that adhere to the 2 conditions listed above already exists as the ELYRA_COMPONENT_PROPERTIES variable.
How was this pull request tested?
Manual testing shows that mounted_volumes no longer appears as an extra arg during operator construction.

[ ] Add backend test for empty mounted volumes on a custom component
[ ] Add backend test for runtime image (or other pipeline default) to ensure it does not appear in the component_params dict for custom components

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Fix for https://github.com/elyra-ai/elyra/issues/2866 looks good (confirmed that it's working and the change makes logical sense)
Waiting for open TODOs to be resolved (or the description to be updated) before signing off

@ptitzler thanks for the continued review! Tests have now been added and TODO's marked completed 🙂

authors: kiersten-stokes ptitzler

repo: elyra-ai/elyra


text:
Create a new endpoint on chain that return list of latest asset prices

Description

Create a new endpoint on chain that return list of latest asset prices

What has Changed?
What specific problem were you aiming to address, and how did you successfully resolve it? If tests were not uploaded for this pull request or if coverage decreased, please provide an explanation for the change.

Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...

[ ] included the correct type prefix in the PR title
[ ] added ! to the type prefix if API or client breaking change
[ ] targeted the correct branch (see PR Targeting)
[ ] provided a link to the relevant issue or specification
[ ] followed the guidelines for building modules
[ ] included the necessary unit and integration tests
[ ] included comments for documenting Go code
[ ] updated the relevant documentation or specification
[ ] reviewed "Files changed" and left comments if necessary
[ ] confirmed all CI checks have passed

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] confirmed the correct type prefix in the PR title
[ ] confirmed ! in the type prefix if API or client breaking change
[ ] confirmed all author checklist items have been addressed
[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] reviewed documentation is accurate
[ ] reviewed tests and test coverage
[ ] manually tested (if applicable)

Deployment Notes
Are there any specific considerations to take into account when deploying these changes? This may include new dependencies, scripts that need to be executed, or any aspects that can only be evaluated in a deployed environment.
Screenshots and Videos
Please provide any relevant before and after screenshots by uploading them here. Additionally, demo videos can be highly beneficial in demonstrating the process.

Query results
ay@Amits-MBP ~ % elysd q tier get-all-prices
pagination: null
prices:
- amm_price: "7.977609988682000000"
  denom: ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9
  oracle_price: "7.977609988682000000"
- amm_price: "9.999344257530000000"
  denom: ueden
  oracle_price: "0.000000000000000000"
- amm_price: "0.000000000000000000"
  denom: uedenb
  oracle_price: "0.000000000000000000"
- amm_price: "9.999344257530000000"
  denom: uelys
  oracle_price: "0.000000000000000000"
- amm_price: "0.000000000000000000"
  denom: ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349
  oracle_price: "0.999900000000000000"

repo: elys-network/elys


text:
Changing the directory orientation

Is it possible to change the orientation of how the children expand? I have a large list that expands left to right, but would love for that to be top to bottom like an org chart.

I was able to flip the orientation, but now the labels/names are not creating enough space between each one. Any suggestions?

Yeah that was one of the reason I didn't have that template, I'm not sure how to have space for the file name without colliding with the siblings, can you submit the template you worked on maybe I can help?
try to put it on jsfiddle so we can present results to each other

authors: Unalloyedcube emad-elsaid

repo: emad-elsaid/dirtree


text:
net/udp: Add some embedded-nal-async UDP traits

Building on https://github.com/smoltcp-rs/smoltcp/issues/903, this implements some UDP traits.
It notably doesn't implement the core stack trait; as outlined in the docs, that doesn't go well with the user-allocated stack data structures. For the same problem, RIOT OS provides a Stack type that is actually kind of a Cell<Option<Socket>> and thus allows the creation of exactly one socket -- that is an option here. However, my test applications really already take a bound socket as an argument, so let's see how far this gets us without doing the ugly.
This is a draft PR both because it has waaay too many FIXMEs / todo!()s, and because it hasn't been tested so far (but it builds, so push it :-D )
When done, this closes: https://github.com/embassy-rs/embassy/issues/2516

Hi @chrysn, is there something specific preventing this from being merged? If so, I would love to help with that, since this a really useful feature.

there's a few TODOs and FIXMEs, i'd like to see them resolved before this is merged.
i've rebased this into https://github.com/embassy-rs/embassy/tree/impl-embedded-nal-async-udp-v2
however I can't put in more time to actually fix them. Anyone's welcome to pick this up if they need it.

Thanks for the rebase, I'll combine that in with my pending changes. I've been testing this for the last months in a limited scope – and just found out that I completely forgot to keep this PR updated. Sorry for that; got a few urgent things for the next few days, but I expect to come back to this in the next two weeks.

authors: Dirbaio Frostie314159 chrysn

repo: embassy-rs/embassy


text:
Fix PWM for advanced timers

Advanced timers have additional BDTR register, which has a global output enable bit and it is disabled by default.
Also added an example for F4, but it will only work once https://github.com/embassy-rs/stm32-data/pull/149 is merged. We can also move it to some other chip, but I don't have anything else to test on atm.

Thanks, @chemicstry, I was just preparing functionally identical code to do the same. I tested mine on stm32f103c8t6, stm32f401ccu6, stm32f303vct6, and stm32h743vit6 (using embassy-stm32 only, no async, and my embassy/stm32-data#149). Yours should work the same, I'm sure, but I'm not going to dig the boards out again to try it.

authors: chemicstry smbolton


text:
Template driver include error

Update of include file names for _template driver to allow for cloning of the branch without altering the source.

Sorry for the long delay and thank you for your fix!
Could you please change the merge request branch to 'develop'? I would like to merge it for the next upcoming release v4.4.1 with you as author.

Great, thank you for your collaboration.

authors: Jef-GB michael-hillmann

repo: embedded-office/canopen-stack


text:
Strange reranking eval result

I performed a reranking task on MMacroReranking dataset with bge-reranker-large, the result looks fine to me.
but when I switch to bge-large evaluating the same dataset, its result seems unreasonable, any clue?
bge-reranker-large eval result
{
  "dataset_revision": "8e0c766dbe9e16e1d221116a3f36795fbade07f6",
  "dev": {
    "evaluation_time": 33091.37,
    "map": 0.37640824211259494,
    "mrr": 0.36576587301587304
  },
  "mteb_dataset_name": "MMarcoReranking",
  "mteb_version": "1.1.2"
}

bge-large-zh-v1.5 eval result
{
  "dataset_revision": "8e0c766dbe9e16e1d221116a3f36795fbade07f6",
  "dev": {
    "evaluation_time": 39180.88,
    "map": 0.006013297204484398,
    "mrr": 0.0
  },
  "mteb_dataset_name": "MMarcoReranking",
  "mteb_version": "1.1.2"
}

cc @staoxiao

The loading methods of reranker and embedding model are different. You can refer to this script to evaluate bge embedding model.

This seems to resolve the issue. Will close it.

authors: Jeru2023 KennethEnevoldsen Muennighoff staoxiao

repo: embeddings-benchmark/mteb


text:
Add German clustering datasets

This pull request adds German clustering datasets (in reference to issue #115). More concretely, it adds four clustering tasks based two different data sources (blurbs and news articles, a s2s and p2p task per data source).
To do

[x] add tasks to mteb/tasks/Clustering
[x] update README.md
[x] update leaderboard code (fetch German results and show in clustering results)

@Muennighoff Please have a look at my proposed changes and let me know if I should change anything.
I will also open a PR to mteb/results with all the model evaluation results I have (I don't have write access to any of the HF repositories of the models I used).

Is it fine for you to merge this PR?

Is it fine for you to merge this PR?

Yes, please :) PR on HF for eval results follow soon!

authors: Muennighoff slvnwhrl


text:
Fix gem name.

fix gem name "embulk-plugin-postgres-json"

Good catch! Thank you.

authors: frsyuki takashiyamazaki

repo: embulk/embulk


text:
Volume examples with applications

Application examples should go in the documentation.

Include steps to discover other container dockerfiles and how to choose volumes properly
Find popular containers that are persistent
Show commands for running containers based on Volume points in Dockerfiles
Relevant volume options docker volume create --name test --opt=size=10 --opt=iops=1000 --opt=volumetype=io1

Some examples in https://github.com/emccode/rexray/pull/228

repo: emccode/rexray


text:
Improve new user setup guide

Added a new segment that guides the user through installation of the requirements.
Will also add a subsequent part about getting the connect server up and running.

Codecov Report

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

@@            Coverage Diff            @@
##             master     #123   +/-   ##
=========================================
  Coverage     13.22%   13.22%
  Complexity       45       45
=========================================
  Files            22       22
  Lines          1573     1573
  Branches        140      140
=========================================
  Hits            208      208
  Misses         1356     1356
  Partials          9        9

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 8be438c...01a5a28. Read the comment docs.

authors: codecov-io smeets

repo: emenlu/connect


text:
Raccolta medicinali e materiali sanitari nelle farmacie di Roma   e provincia - dal 9 al 16 marzo

type: healthcare
offerFromWho: Federfarma Roma
title: Farmacisti per l'Ucraina
recipients: ''
description: Raccolta medicinali e materiali sanitari in tutte le farmacie di Roma
  e provincia - dal 9 al 16 marzo
url: 'https://twitter.com/ukraineinfohelp/status/1501526286585499649?t=gG4S2XxlCPzIjVTQO5XYVQ&s=19'
address:
  mode: autocomplete
  address:
    place_id: 283767136
    licence: Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright
    osm_type: relation
    osm_id: 41485
    boundingbox:
    - '41.6556417'
    - '42.1410285'
    - '12.2344669'
    - '12.8557603'
    lat: '41.8933203'
    lon: '12.4829321'
    display_name: Roma, Roma Capitale, Lazio, Italia
    class: boundary
    type: administrative
    importance: 0.8996107180689524
    icon: https://nominatim.openstreetmap.org/ui/mapicons//poi_boundary_administrative.p.20.png
    address:
      city: Roma
      county: Roma Capitale
      state: Lazio
      country: Italia
      country_code: it
iConfirmToHaveReadAndAcceptedInformativeToThreatPersonalData: true
label: services
submit: true

Scaduta. Chiudo.

authors: cristigalas ehack-italy


text:
What is the highest supported VitePress version?

I am using version 1.0.0-alpha.15 and an error is reported.

Install
Add wrapper
Use
Run
Error

$ node collect-article-data.mjs && vitepress dev docs
vitepress v1.0.0-alpha.15

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
Failed to resolve import "mermaid" from "node_modules\vitepress-plugin-mermaid\dist\Mermaid.vue". Does the file exist?
下午6:31:23 [vite] Internal server error: Failed to resolve import "mermaid" from "node_modules\vitepress-plugin-mermaid\dist\Mermaid.vue". Does the file exist?
  Plugin: vite:import-analysis

Should work in all. It is a peer dependency and it should have installed the mermaid lib. depends in npm version and if you are using pnpm for example.
check if you can see mermaid in the node_modules.. if not you can install it and it should work.

Thank you very much, I am a backend developer, but also the first contact with the Mermaid.

Hopefully, the GitHub Pages _404 bug fix will be added when you document the FAQs.

repo: emersonbottero/vitepress-plugin-mermaid


text:
Possibility to the user to change password

In the user page

Done in the next update

repo: emilienschultz/activetigger


text:
Is not compatibility with farmer delight?

It don't show the crafting of pots in farmer's delight.

If you want JEI compatibility forwarding, you need to install JEI alongside EMI. If you're on Fabric and want native support, the EMICompat addon mod has Farmer's Delight support.

repo: emilyploszaj/emi


text:
Unable to query collections inside migration script

I am trying to insert data by querying pre-existing collection in a migration script
However find on that collection is returning zero results.
this.db.collection('some-existing-collection').find({}).exec(callback);
callback is never getting executed
Infact this.db.listCollections() is also returning emoty array.
It seems existing collections are getting ignored.

What Mongo version? Can you create a sample entire project where it's reproducible?

I am using mongod version: 3.0.7 and using mongodb-migrations 0.5.0
I will see if i can create a sample project.

while trying to reproduce the issue , I figured i was doing things incorrectly
i was invoking done() method outside callback.
so done() line got executed immediately and async callback never get executed
Thanks

Nice to know you've solved it. I supposed something along that lines.

authors: emirotin harrybvp

repo: emirotin/mongodb-migrations


text:
Aktualizacja komponentu z wynikiem walki o case z remisem

Design z #601
Powiązanie z backendem też niech będzie w scope tego issue.

repo: emkarcinos/WMIAdventure


text:
Condition use of unsafe serializers on signed data

The original design planned to not use unsafe serializers, in order to allow use of GALP between peers not tied to the same security constraints (e.g. a node on a shared HPC, a cloud provider node, and a dedicated server in a hospital).
This quickly appeared to be too restrictive, because life is just too short to write custom serializers for all the data types you deal with in modern data science. Each framework typically has its own python objects to represent the results of a training procedure, these are very common objects that you need to persist, and need to rebuild to pass them back to the frameworks.
Therefore, I gave up and allowed to use dill, which itself can use pickle under the hood and is therefore unsafe.
However, I still want to achieve the original goal one day, meaning that safe and unsafe serialization have to coexist somehow.
Originally, I was thinking on having sets of rules that allow use of a specific serializer if the object was received by a peer that is authorized. But that seems very complicated to implement.
Unless you opt for a simple low-level solution: sign the data.
Wrap the unsafe serializer into code that signs and verifies signatures. The "configuration" of peers to trust is limited to adding their keys. If you want to trust workers on a same cluster, you can just put their keys on the distributed filesystem where their code is stored. This way, any peer can easily tell wether an object comes from a node that shares the same code as itself, and therefore has the same security level.
The beauty is that you do not even need to implement a cryptographic layer. You don't need to track the proximal source of data, an untrusted client could even re-send you data that was serialized  by a fellow trusted worker without risk ! You can exchange safe and unsafe data over the same channel without the safe data having to pay any encryption overhead costs !
Automatically storing a key along with the cache would make local use of unsafe serializer work out of the box with no configuration. Marking the workers as trusted by the client (common scenario) would be very easy.
In practice, we could have only the workers trust themselves, and keep the client untrusted. That would expose very fast where exactly we use unsafe types and tell you what you should focus on, and would allow most intermediary results to be left untouched.

Closing as communication between untrusted peers is looking unlikely to ever be implemented.

repo: emorice/galp


text:
Setting EMQ_ADMIN_PASSWORD fails

Expected behavior
When specifying EMQ_ADMIN_PASSWORD=testpassword it is being used as specified. However the default password is still used (being 'public')
Actual behavior
The following appears in the logfile
emqtt_1 | ['2018-01-29T12:55:17Z']:admin password changed to testpassword emqtt_1 | Usage: emqttd_ctl emqtt_1 | -------------------------------------------------------------------------------- emqtt_1 | status                                          # Show broker status emqtt_1 | -------------------------------------------------------------------------------- emqtt_1 | broker                                          # Show broker version, uptime and description emqtt_1 | broker pubsub                                   # Show process_info of pubsub emqtt_1 | broker stats                                    # Show broker statistics of clients, topics, subscribers emqtt_1 | broker metrics                                  # Show broker metrics emqtt_1 | -------------------------------------------------------------------------------- emqtt_1 | cluster join <Node>                             # Join the cluster emqtt_1 | cluster leave                                   # Leave the cluster emqtt_1 | cluster force-leave <Node>                      # Force the node leave from cluster emqtt_1 | cluster status                                  # Cluster status emqtt_1 | -------------------------------------------------------------------------------- emqtt_1 | users list                                      # List users ....
Test code
docker-compose:
services:
  emqtt:
    build: .
    restart: "always"
    environment:
      - EMQ_LOADED_PLUGINS="emq_dashboard,emq_auth_http,emq_modules,emq_retainer"
      - EMQ_ADMIN_PASSWORD=testpassword
    ports:
      - "1883:1883"
      - "8883:8883"
      - "18083:18083"

EMQ version
2.3.4
Docker version
Docker version 17.12.0-ce, build c97c6d6

With emq_recon and emq_dashboard it actually still fails quite often, as though the CLI has not had time to initiate. To prove this I added a 5 sec sleep which seems to work well as a workaround:
if [[ ! -z "$EMQ_ADMIN_PASSWORD" ]]; then
    sleep 5
    echo "['$(date -u +"%Y-%m-%dT%H:%M:%SZ")']:admin password changed to $EMQ_ADMIN_PASSWORD"
    /opt/emqttd/bin/emqttd_ctl admins passwd admin $EMQ_ADMIN_PASSWORD &
fi

@7wonders @a3aanwisse I submit a PR #43 to fix the issue. Please help review it.

@7wonders @a3aanwisse Fixed in 2.3.5

repo: emqtt/emq-docker


text:
Creating dedicated Nuban is throwing an error

I noticed an error when I tried to create a dedicated nuban, I fixed it but I am unable to make a PR. kindly help check it out or allow PRs to be made.
Thanks
The error below
Error: Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream

I will check it

Thank you. Great job man

Hi there, has the issue been resolved

@GeekyGeeky Is there any reason why you are unable to make a PR?

I have been really busy and not able to look at it, honestly PRs are welcome

Been trying to push a PR but unable to do that, I'll try again.

@orimdominic the data sent should be sent as JSON string, that should fix it.

@GeekyGeeky You can probably paste the stacktrace of the error here or the steps (the file(s) that you modified and the code that you changed) here and I'll make a PR

Ok no problem. Thanks

I just tried making the PR again, made a fix

hello @en1tan , please kindly review the PR.
Thanks

merged and published. thank you

authors: GeekyGeeky en1tan orimdominic


text:
[supplementary_planes.py] add BIBFRAME support

Allow repaired or converted records to be converted to BIBFRAME RDF or JSON formats.
Possibly use PyBIBFRAME.

Added Bibframe 2 support with default output file format of RDF+XML
Added additional optional formats.


text:
FORTECH-116: RadioItem - Hover style not the same as Zeplin

Hover over RadioItem bug fixed for Silicon skin to match Zepplin design
Changed default children text in sample from 'Sound' -> 'Hello RadioItem' so it would be more appropriate
Enact-DCO-1.0-Signed-off-by: Adrian Cocoara adrian.cocoara@lgepartner.com

Could you modify the other skins with the same rule?

Could you modify the other skins with the same rule?

@jeonghee27, are we allowed to modify the other skins? Wouldn't it break some requirements for those skins?

Could you modify the other skins with the same rule?

@jeonghee27, are we allowed to modify the other skins? Wouldn't it break some requirements for those skins?

Of course your team can modify all other skins.
There is no GUI other than Gallium.
This obvious problem would be fine to apply to all.

repo: enactjs/agate


text:
327 switch account or community sliding up panel

There's still an issue with the sliding up panel library, for some reason the panelController is not attached
closes #327 (once finished)

First UX remark: Can you try to make the amount of sliding in responsive? On my emulator (Pixel 4a), it slides in way too much:

repo: encointer/encointer-wallet-flutter


text:
Provide a const function variant of from_num

Substrate's own fixed point types (eg Permill) provide const functions for creating instances. This is very useful because it allows things like
const INTEREST_RATE : U32F32 = U32F32::from_num(5) / 100; // 5% interest

When the functions are not const they cannot be called at compile time and thus constants of these fixed-point types cannot be created.

You could use from_bits which is a const fn. But I agree this would be nice. I'm happy to take a PR ;-)

From upstream here, just found this fork and had a look :) This cannot be a const function in this crate because from_num depends on the number of fractional bits, so you would have to use some constraints on the Frac generic parameter to actually use it as a number. And if you have constraints on the generic parameters, the function cannot be const, at least not in stable Rust. In fact, all const methods behave bitwise-identically whether operating on say U0F64 or U32F32, or even on FixedU64<()> which wouldn't make sense.

authors: JoshOrndorff brenzi tspiteri

repo: encointer/substrate-fixed