Take steps to increase verification rate

This PR closes https://github.com/python-discord/organisation/issues/276. If you cannot see this issue, a summary is below.
Increase verification rate
The aim is to reduce the amount of dormant users present in the guild without the @Developers role. This problem has become more pronounced after we allowed non-verified users to read all public channels (the justification is to allow users lurking from Discovery to see more than the verification channel). As an unfortunate side-effect, we're now seeing large numbers of users who never verify, as they aren't locked into the verification channel.
The steps will will take is:

[x] Send a welcome DM to all new-joiners, linking them to the verification channel
[x] Create a new @Unverified role with restricted read permissions for public channels
[x] Assign the @Unverified role to all users who fail to verify within 3 (configurable) days after joining
[x] Ping the @Unverified role once every 28 (configurable) hours
[x] Kick unverified members after 30 (configurable) days if they fail to verify

There are a few side quests to complete:

[x] Remove @Unverified from users upon verification
[x] Disable burst shared anti-spam rule in #verification
[x] Figure out a sane value for KICK_CONFIRMATION_THRESHOLD
[x] Probably send a DM to kicked users
[x] Collect stats
[x] Make the @Unverified role pingable
[x] Add a command group for management of the new internal tasks
[x] Persist whether tasks should start on cog load

New config for the test server - add this to your local config files to test this feature.
guild:
  roles:
    unverified:<PHONE_NUMBER>79470172  # Users that have failed to verify

Showcase
Each new-joiner will receive a new DM right after joining the guild:

Every 15 (configurable) minutes, a background task will do the following:

Add @Unverified to unverified users having joined more than 3 days ago
Collect members who have failed to verify after 30 days (does not consider whether they have @Unverified or not)

An unverified user is a user who has no roles apart from @everyone and optionally @Unverified.
If this is a significant portion of the guild, core devs will be asked to confirm or abort the operation:

We determine this by looking at the % of the guild's population to be kicked. If it exceeds KICK_CONFIRMATION_THRESHOLD, a confirmation is necessary. The threshold is currently set to 0 for development purposes, which means that a manual approval is necessary for any amount of kicking.
If the operation is authorized, or if the amount of members is below the threshold, the bot proceeds with kicking all unverified members. Each kicked member with open DMs receives this message:

The 0 is because I changed my config to test this. Sadly there's not much we can do with members with closed DMs, but they were getting pung in a public channel for 30 days so they must have known.
After the task finishes, a report is sent to #mod-log:

The numbers follow the format n_successes/n_attempts, if these two numbers are not equal it means that some requests have failed (bad status from API). The statuses are logged at info level so we can look at logs to see why it's failing. But in practice it shouldn't fail unless a stray 500 happens or something.
In the verification channel, we re-send this message every 28 (configurable) hours.

Justification for 28 is that we get a ping out at reasonable times in all time zones once in a while. It's easily adjustable if necessary, feel free to suggest changes.
Additionally, the @Unverified role has some extra permission overrides in channels, making unverified users only see the following channels:

Anti-spam
The @Unverified pings may cause surges of activity, so we're disabling the burst shared filter in the verification channel.
See: b1c800c623f90f46c4ecaff8da2269efcd04ee05
An ideal solution would allow this to be configurable from the outside, but internally we agreed that this is fine, at least for now.
Stats
With @SebastiaanZ we've agreed to collect statistics by upping counters in the following categories:

[x] verification.accepted_on_day_one: Verified on join day
[x] verification.accepted_before_unverified: Verified before @Unverified role given (before day 3)
[x] verification.accepted_after_unverified: Verified after role was given (after day 3, before day 30)
[x] verification.kicked: Kicked (never verified)

Notes

Currently more than 10% of the guild's population satisfies the requirements for a kick. This means that once the bot connects for the first time, we'll get a ping to confirm this. After that, we probably won't be getting pings, unless something weird happens.

This will need #1090 to be fixed. I'm leaning towards fixing it in a separate PR.

Let's wait for #1093 because Loop.is_running() will make my life a little bit easier here.

I think this should be ready for review now. Decided to add a super simple command interface for the internal tasks, it offers the following commands:
!verification status: check whether internal tasks are running
!verification start: start both internal tasks, if not already running (no-op otherwise)
!verification stop: stop both tasks if running, no-op otherwise
I don't think we need granular, per-task control. It's mostly there so that we can turn off the tasks if something goes wrong or we decide we don't like them, without unloading the cog. The settings are persisted with Redis so if the tasks are turned off, they will not start up on bot restart. It also helps during testing.

On the topic of Redis, because of #1095 I'm using ints 1 and 0 instead of bools for this, which is fine. The issue is pretty much insignificant and shouldn't block this PR. I will probably look into #1095 anyway, but I'd prefer to do it in a separate PR. If it gets fixed before this is approved, the fix can be used here, otherwise it doesn't matter.
I'm starting to make use of the d.py tasks framework so if anyone has any experience with it, I'd love to hear whether I used it somewhat reasonably.

Testing is a little bit tricky but you will want to manually change the values of:
UNVERIFIED_AFTER
KICKED_AFTER
And probably use an alt in the testing server to see how the bot reacts to it. I'm not sure how this could be tested at scale. Please pay special attention to the way members for kicking are chosen, and the authorization process in _verify_kick.
I could do some unit tests if reviewers consider it necessary but I'm still totally burnt out from the testing suite for #993. If some adventurous soul want to contribute a few unit tests to this PR, I will buy you a pizza.

@MarkKoz I think the idea we had with only letting _check_members collect up to 100 members for each category doesn't work, because it entirely defeats the purpose of _verify_kick. Now that we have a generic request executor, we can probably figure out some logic to batch the members and sleep after each batch.

689e520 is an attempt at throttling the requests so that the bot doesn't drown in ratelimits.
The chosen values are mostly semi-educated guesses based on the following:
REST:
        POST Message |  5/5s    | per-channel
      DELETE Message |  5/1s    | per-channel
 PUT/DELETE Reaction |  1/0.25s | per-channel
        PATCH Member |  10/10s  | per-guild
   PATCH Member Nick |  1/1s    | per-guild
      PATCH Username |  2/3600s | per-account
      |All Requests| |  50/1s   | per-account
WS:
     Gateway Connect |   1/5s   | per-account
     Presence Update |   5/60s  | per-session
 |All Sent Messages| | 120/60s  | per-session

@MarkKoz Thanks for the review!
Out of interest, how did you reach this state? I think it shouldn't be possible unless the first task fails.

I don't have an exact answer but basically I changed durations from hours/days to smaller units and forgot to change a couple spots.

Alright, that's fine then. I noticed a word was missing from that message; I pushed a commit to amend that.

Some notes on a not getting banned from Discord front:

If we trip the anti-spam system we will receive an error similar to discord.errors.Forbidden: 403 Forbidden (error code: 20026): Your bot has been flagged by our anti-spam system for abusive behavior. Please reach out to our team by going to https://dis.gd/report and selecting "Appeal an Action Trust and Safety took on my bot" as the Report Type.
This should cancel the DM process and alert the entire administration team since it will lock the bots functionality to DM members (I have systems ready to bring up a backup bot should we experience this issue).
We do not know that this is the only error code in use for anti-spam violations, instead we should just whitelist the 50007 code used for failed DM and everything else should probably cancel the process.

@jb3 We now stop kicking users on suspicious 403 and alert admins:

Screenshot is misleading ~ it will happen for 403s that are not 50_007, but I didn't know how to produce those in testing.
See 1d6d845 for implementation details. It may have to be adjusted, but I just don't know how to do it better.

Currently there are two internal tasks: one that manages users periodically (give role or kick), and one that pings @Unverified every n hours. When I was designing this initially I wanted there to be a command which will allow us to start or stop the tasks, and persist this setting in Redis, so that they will remember whether to run or not if the bot restarts. However, at the time it felt like we didn't need to keep track of these settings on per-task basis, either both tasks are running (most commonly) or something goes wrong and we disable both tasks while we're resolving the issue that occurred.
Now that the first task will abort on suspicious 403s, however, it would also make sense for it to un-schedule itself, so that it doesn't restart in 30 minutes. This is easy, but then the cog enters a state where one task is running and the other is not, and given the current setup we cannot persist this state in Redis (because there is only one control variable).
There are a few things that we can do here:

Do nothing ~ if something goes wrong, the bot pings @Admins which will then review the situation and use !verification stop to kill both tasks if appropriate (if the first task isn't running, it won't be assigning the @Unverified role anyway)
If the suspicious 403 occurs, ping @Admins and automatically kill both tasks, and store a 0 in Redis meaning that if the bot restarts, the tasks should remain dead
If the suspicious 403 occurs, kill the first task only, add commands to manage each task separately, and keep track of each task status separately in Redis (some extra work and complexity, but not too horrible...)

@MarkKoz @Senjan21 @jb3 or anyone else, how do we feel about this?

I prefer the second option (kill both tasks) because it's the simplest. The role task just adds a role, which is useless on its own (i.e. when the kick task isn't also running). Once the role task is restarted in the future, it'll process all the users it missed while it was off, so there's no benefit to keeping it running while the kick task is off.

I agree with Mark in that case, second option would be ideal.

@MarkKoz @Senjan21 I agree & went with option 2 but for clarity: kicking users and adding the @Unverified role is handled by the same task (above referred to task task 1). Task 2 only pings.


Investigate how to store the Notebooks persistent, in case of Docker Container removal

The current implementation is

Create and deliver the Docker Container with default notebook files in folder $BACKUP
Mount a host directory to mount point $MOUNT inside the Docker Container
Add an entry point to the Docker Container
For each notebook file the entry point checks if the file is present in $MOUNT
If not then the entry point copies the file from $BACKUP to $MOUNT

Entry point only copies missing files and directories (FS objects)
Copied FS objects are owned by root (of Docker Container)
Entry point relaxes permissions for copied FS objects to still allow host user outside the Docker Container modifying and deleting these FS objects in the mounted directory

Directory setting in current implementation

Folder
Type of DSS image
AMI, VM images vhd, vmdk

$BACKUP
{{ user_home }}/notebook_defaults
{{ user_home }}/notebooks

$MOUNT
{{ user_home }}/notebooks
mounting is not supported

Additional task:

[x] Try out VOLUME directive in Dockerfile, results: see comment below.

Current implementation uses a python script as entry point as

this is more flexible
easier to test and
offers higher level structures and language features

However, analysis showed that handling owners and permissions for FS objects in the mounted directories is difficult.
We therefore propose to not mount a host directory directly into the Docker container but to use docker volumes for persistent storage. Ticket #78 therefore requests to add instructions to the DSS User Guide.

Results of trying out directive VOLUME in Dockerfile:
I could not see any beneficial effect, to me Volumes seem to be a separate concept in the docker universe

Volumes can be created using docker commands, e.g. docker volume create
Volumes can be mapped to a directory inside the container, e.g. in the Dockerfile

The statements in stackoverflow/41935435 and official docker documentation relate to these volumes rather than ordinary directories in the file system of the host or inside the container.
I propose to apply the strategy as discussed

Store notebooks in a default folder, e.g. /root/notebooks-default
Create entry point EP running a script
Run Docker container with a mount option, e.g. mounting host directory /host/my-notebooks to /root/notebooks inside the docker container: -v /host/my-notebooks:/root/notebooks
For each file or subdirectory in /root/notebooks-default the script checks if the file is missing in /root/notebooks

if so then the script copies this file or directory
if not then the script skips this file

For copying we have two options:

O1) one-liner ENTRYPOINT cp -ur /root/notebooks/* /root/new/ && chmod -R a+rw /root/new/*
O2) script

for i in $(ls /root/notebooks); do
   F="/root/new/$i"
   if [ ! -e "$F" ]; then
       cp -r /root/notebooks/$i "$F"
       chmod a+rw "$F"
   fi
done

The script has the advantage that it won't change the permissions of the files added or updated by the user but also draw-backs

more complex
needs to be created in advance and added to the image

I tend to the script solution as we additionally need to start Jupyter server anyway.

However, analysis showed that handling owners and permissions for FS objects in the mounted directories is difficult.
We therefore propose to not mount a host directory directly into the Docker container but to use docker volumes for persistent storage. Ticket https://github.com/exasol/data-science-sandbox/issues/78 therefore requests to add instructions to the DSS User Guide.

This would actually make the VOLUME directive in the Dockerfile interesting

After further investigation, we found out the VOLUME directive actually creates an anonymous volume when no volume is specified by during docker run. The anonymous volume also exists after the removal of the container. Furthermore, it also contains the content of the specified directory after the container has started.

For our example, in the previous comment, the following command
docker run --detach --name test_container -v test_volume:/myvol test_image sleep infinity
creates a new empty volume (in case test_volume does not exist) and copies the content of /myvol from the image into it. If test_volume contains already something, nothing is copied.


Add support for all mac address info fields

Rename the mac address struct to comply with golint

closes #16


Make Travis CI run tests from the UnitTest project

Currently, Travis CI doesn't run tests from the UnitTest project when building the project, I want it to run all tests as part of the build process.

Hi @ivandrofly, do you have any idea how to do this?

Hi @ivandrofly, do you have any idea how to do this?

Haven't done it in past, but I can take a look at their documentation, doesn't seems that hard 😉

Okay, I'll go with small patches. There is not much thing to do actually, there is only couple united-test that needs some refact due to the change to dotnet core. < 15 tests

Closing this one as it's already implemented by @PatrykOlejniczak in #79.


Add git stash to deploy.sh

This allows there to be persistent local changes on the production server.

Coverage: 93.527%. Remained the same when pulling a75090600cdeb9e947491812d7ba7685dc443db7 on tweak-to-deploy-script into 1445175b6ef232fd471dc86442439a4696642320 on main.

Sounds good to me. How would I use?

Oh, nifty. It just stashes and pops automatically. That's great!


Query for Stake Pool List

Coverage decreased (-1.09%) to 77.215% when pulling 53e8a71096056458a9b56a8f3cbb308e9b6a7694 on feature-stakepool into 7f53bcf8bc046f1e07af93c400fa719558900e39 on master.


⚠ ClamAV has degraded performance

In 4fcfa9b, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 53 ms

Resolved: ClamAV performance has improved in 9ddc7d9.


Images won't embed

I have tried embedding an image and it does not seem to work. I even used the example code. Can anyone help me out?

What have you tried exactly? What kind of error do you get?

For embedding images, both the below examples work perfectly fine for me.
1.
+++HTML `

`+++

+++IMAGE youCanNameThisAnythingFunction('http://www.gstatic.com/webp/gallery/1.jpg')+++
and then in your createMethod function call, you will need something similar to this.
createReport({
  template,
  additionalJsContext: {
    youCanNameThisAnythingFunction: async url => {
      const resp = await fetch(url);
      const buffer = resp.arrayBuffer
        ? await resp.arrayBuffer()
        : await resp.buffer();
      return { width: 14, height: 10, data: buffer, extension: ".jpg" };
    }
  }
})

Note that the author of the library had clarified in #126 that image embeds by giving just the path to the image in the local filesystem is no longer supported, I believe you might need a web server running on your system, drop your image somewhere inside the docroot and can then reference the image using the localhost url, which seems to be working fine again for me.

Thanks for clarifying @ku3b1k0 !
Yes, that is indeed the case. As @ku3b1k0 pointed out in #126 , i forgot to update the example projects to reflect the fact that simply providing the image path is no longer supported.
You can still read an image from a path on your local filesystem from inside the template in the way @ku3b1k0 mentions in his second example. Just write a function that performs the actual filesystem interaction instead of a fetch call.
Does this solve your problem?

What is not working for me is embedding via base64 string and there is no error. It executes and fills in the variables but not the base64 string image. Any suggestions?

How are you creating the base64 string? docx-templates can't really check if it is a valid image beforehand. Any chance we can see some code? I can't debug it like this.

@jjhbw I am creating it on the front end and sending it to my server. I have also tried creating it with   fs.readFileSync().
// Current code
await createReport({
template,
data: {
name: object.metadata.name,
},
additionalJsContext: {
imageTest: async () => {
const data = base64String.slice('data:image/png;base64,'.length);
return { width: 300, height: 150, data: data, extension: '.png' };
},
},
noSandbox: true
}).then(rendered => fs.writeFileSync(tempLocalTemplateFile, rendered))
.catch((error) => {
console.log(error)
return null;
})

This doesnt show the creation of the base64 string. I cant know if it is valid.
Also, what does the template look like?

@jjhbw the base64 string is created on the front end through canvas using canvas.toDataURL();. It's a valid base 64 string. The template is using +++IMAGE imageTest()+++
Is there something I am missing? Everything else works except the embedding of the image.
testDoc.docx

@jjhbw I even tried the fetch method @ku3b1k0 suggested and it does not work either. Is there something I am missing with embedding an image into the a docx? The image never gets embedded. @ku3b1k0  what version of this module are you using? I am using 4.1.0

@jjhbw The only way that it worked for me was using the svg code example. I used a base64 buffer instead.
...
const b64 = base64Signature.slice('data:image/png;base64,'.length);
const svg_data = Buffer.from(b64, 'base64');
return { width: 6, height: 6, data: svg_data, extension: '.png' };
.....

I think i see the problem: note the width and height params reflect the desired dimensions of the image in the rendered document in centimeters. I think the image is properly embedded by docx-templates, but that Word refuses to render it due to its dimensions being insanely huge...
Note that you are providing 'sane' dimensions in the svg example.
I have added a bit more emphasis on this behaviour to the README in 3a65b497608417296a492eda9421f26f6922b2d7
It is nontrivial for the library to warn or throw if the user provides image dimensions that don't make sense, as AFAIK Word documents can take arbitrary shapes. I'll look into it.
Feel free to re-open if this doesn't solve your issue.


Make RNN encoders and decoders accept arbitrary TF RNN cell from config

Similarly how it is done with initializer and regularizer; encoder and decoder should accept cell class in config and cell parameters

in dev0.4 branch


Change url

Make main page (https://online.ntnu.no/petition/1/) to https://online.ntnu.no/petition/, so the users only have one site to relate to.

Ive made a ticket in our dotKom's internal tracker, as it's more a deployment issue dealt with locally then the onlinepetition app.


customizable table names

background & why
I'm working on a Rails project which has own tags table.
In order to implement a new feature in my project, I need a new, independent tagging system, which AATO is suitable for. But I couldn't install it because duplicate table exists. So I forked this gem to make table names customizable.
implementation
you can simply specify in config:
ActsAsTaggableOn.tags_table = 'aato_tags'
ActsAsTaggableOn.taggings_table = 'aato_taggings'

@seuros
I updated readme and changelog.
Thank you for reviewing.

@mizukami234 do you mind squashing the commits ? The first commits are not linked to your account.

@seuros
The first commits are actually not mine, added by @junmoka . They're not linked to him, but he said he didn't mind that.

I'm trying to implement this but I'm having problems with the models not using the correct table.
this is what I have
# config/initializers/act_as_taggable_on.rb
ActsAsTaggableOn.tags_table = 'aato_tags'
ActsAsTaggableOn.taggings_table = 'aato_taggings'

When calling ActsAsTaggableOn.tags_table on the rails console I'm getting the correct table name but when calling ActsAsTaggableOn::Tag.table_name I'm getting :tags
I think the problem is that the models are loaded before the configuration is set.
How and when are you calling the ActsAsTaggableOn.tags_table = 'aato_tags'?
I made this changes and it is now working for me.
https://github.com/Adrian2112/acts-as-taggable-on/pull/1/files
I can make a PR if you think this is the way to fix it


Actionscript 3 support

(Original issue 320 created by collab on 2008-03-25T00:15:39+00:00)
See attached patch for Actionscript 3 support.

(Original issue was assigned to gbrandl)
(Original issue 320 last updated on 2008-03-25T07:24:46+00:00)
(Issue automaticaly closed due to status in Bitbucket: resolved)

(Original comment by gbrandl on 2008-03-25T07:24:46+00:00)
Thanks, added to Hg trunk.


Update to 5.1 tools version

@swift-ci smoke test

/cc @SDGGiesbrecht

It seems straightforward. Is there something specific you wanted my thoughts on?

I think the JSON mapper one could simply be return try? get(key) as T, but it isn’t all that important. (The compiler is conflating the as T and as T? variants, since they now both result in T? once try? is applied. It used to reject as T? because it produced T??, which wasn’t returnable.)

Is there something specific you wanted my thoughts on?

Mainly wanted to notify you since you have some tooling on top of SwiftPM and I am bumping versions here.

I think the JSON mapper one could simply be return try? get(key) as T

Ah, thanks. I think I want to move away from these APIs since they're a pain to use with type inference. Specifying the type explicitly seems like the way to go: https://github.com/apple/swift-package-manager/blob/master/Sources/TSCBasic/JSONMapper.swift#L37


Revive the Contiki port

And add the socket implementation for it.

New version, now with more error checking!

Merged


JSON: Relaxing json.maxItemsComputed should reflect in open files

Testing #153312
Updating the json.maxItemsComputed setting doesn't seem to impact already open editors. It would be great if that worked.

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!


Add words to Vale and turn off  heading capitalization rule

Add words to Vale and turn off  heading capitalization rule, as per conversation with @natebower
Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.

@krisfreedain @nateynateynate  Please review when you get a chance. Thanks!


libmpd: Fix GCC 14 build

https://hydra.nixos.org/build/281958201/nixlog/3
Note that this is also needed by latest clang.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@ofborg build libmpd


Abstracted collections and models, reorganized, updated implementation of instrument(s)

I am super excited about these changes!
Part of #411

This looks awesome :+1:. Most of my comments were around trying to extract some of the fetch logic out, but all that can evolve pretty easily now that everything is so much cleaner!

Thanks for the awesome feedback! I implemented all of your ideas, @bensheldon.


[WIP] Improved artefact versioning

Applied from the original PR due to merge conflicts
Pulled out most duplicated code into methods in Jenkinsfile

Still some conflicting files it seems like? ;(

@navdeep-G just renamed some "dist" to "dist2" etc. in master to make the build pass (but turns out there were other issues anyway), nothing major. If this PR will work I will be able to just use this version as is. Please, make sure no one at the office works on the Jenkinsfile today.

@pseudotensor yeah the snapshots are being uploaded and the docker runtime is trying to use them - for some reason it fails with a 403, looking into why.

403 just means file not found really.  Is that your + thing?

No, 403 is auth failed - you'll get the same error if you try to just copy paste the url and go there using a browser. All works with %2B instead of +. Also tried on dl14.

yes i am saying auth failed is given even when file does not exist

@pseudotensor ah ok, sorry I'm getting slow :-) Yeah that's the + thing - pushed a fix.

What about updating the README links?  Easy to do later of course.

@pseudotensor yes will do that too, but I need to add an upload that will upload an artifact without the build number for that and to a bucket without build number, so we the URL is the same every time (now the artifact is something like h2o4gpu-0.1.0+master.1.whl etc. need to upload one without the +master.1 part). But might need to grab some sleep first.


Swipe not detect properly for left and right

when i am trying to swipe right it always gives me SWIPE_LEFT..anyone know how to fix it?

Same problem, can anyone know how to fix it.

Same problem here too.

Same Problem Here. Is there any wayout?

Hey, i have been dealing with the same issue, something in the code doesn't detect the swipe correctly.
I have used the 'onSwipe' attribute which gets a 'state' object as it's second argument, taking from it 'dx' and 'dy' i wrote these 4 lines of code which works great for me so far for detecting the swipe side.
Hope this will help others :)
`const figureHorizontalDirection = (delta) => (delta > 0 ? 'SWIPE_RIGHT' : 'SWIPE_LEFT')
const figureVerticalDirection = (delta) => (delta > 0 ? 'SWIPE_DOWN' : 'SWIPE_UP')
export default ({ dx, dy }) =>
Math.abs(dx) > Math.abs(dy) ? figureHorizontalDirection(dx) : figureVerticalDirection(dy)
`

Hey, i have been dealing with the same issue, something in the code doesn't detect the swipe correctly.
I have used the 'onSwipe' attribute which gets a 'state' object as it's second argument, taking from it 'dx' and 'dy' i wrote these 4 lines of code which works great for me so far for detecting the swipe side.
Hope this will help others :)
const figureHorizontalDirection = (delta) => (delta > 0 ? 'SWIPE_RIGHT' : 'SWIPE_LEFT')
const figureVerticalDirection = (delta) => (delta > 0 ? 'SWIPE_DOWN' : 'SWIPE_UP')

export default ({ dx, dy }) =>
  Math.abs(dx) > Math.abs(dy) ? figureHorizontalDirection(dx) : figureVerticalDirection(dy)

where should i add these code?

I have added this code to be the function that actually receives 'dx' and 'dy' from the component.

thank you @Diabl0269 Diabl0269
i try this
const direction = () => {
const figureHorizontalDirection = (delta) => (delta > 0 ? 'SWIPE_RIGHT' : 'SWIPE_LEFT');
const figureVerticalDirection = (delta) => (delta > 0 ? 'SWIPE_DOWN' : 'SWIPE_UP');
  const dx = this.endX - this.startX;
  const dy = this.endY - this.startY;

  return Math.abs(dx) > Math.abs(dy) ? figureHorizontalDirection(dx) : figureVerticalDirection(dy);

};
<GestureRecognizer
onTouchStart={(event) => {
this.startX = event.nativeEvent.pageX;
this.startY = event.nativeEvent.pageY;
}}
onTouchEnd={(event) => {
this.endX = event.nativeEvent.pageX;
this.endY = event.nativeEvent.pageY;
    const d = direction();

    if (d === 'SWIPE_UP') {
        this.onSwipeUp();
    } else if (d === 'SWIPE_DOWN') {
        this.onSwipeDown();
    }
}}
style={style.swipe_box}>

@JuEunSung is it working for you?

@JuEunSung is it working for you?

yes my case was up-down problem..
(sorry english clumsy)

@JuEunSung is it working for you?

yes my case was up-down problem..
(sorry english clumsy)

For both ios and android?

Did anyone find solution?


Add ReactPlayer and try to make it responsive

Changes

[x] Add ReactPlayer
[ ] Make it responsive (see screenshot of what happens when it's not responsive):

Checklist

[x] Read the contribution guide and accept the code of conduct
[x] Readme (updated or not needed)
[x] Tests (added, updated or not needed)

This can now be rebased as #259 is merged.


Hot Bar Pin Item next to Cluster Name

Show the Pin icon next to the cluster name (and catalog) to allow users to pin it to the hotbar easily!

@aleksfront sorry, I guess the description was not very clear... my fault! I thought this to be added next to name / icon on left hand side menu.
next to minikube:

wdyt?

But I think we can keep it on the list as well! That was already discussed with Miska afair...

Yes, it can be pulled as separated features.

created new issue for this:https://github.com/lensapp/lens/issues/3811


String valued members in enums

Enum types in TypeScript come in two flavors: Numeric enum types and literal enum types. An enum type where each member has no initializer or an initializer that specififes a numeric literal, a string literal, or a single identifier naming another member in the enum type is classified as a literal enum type. An enum type that doesn't adhere to this pattern (e.g. because it has computed member values) is classified as a numeric enum type.
With this PR we implement the ability for literal enum types to have string valued members.
enum Color {
    Red = "red",
    Green = "green",
    Blue = "blue"
}

The above declaration creates an enum object Color with three members Red, Green, and Blue. The members have corresponding new string literal enum types, Color.Red, Color.Green, and Color.Blue that are subtypes of the string literal types "red", "green", and "blue" respectively. Finally, the declaration introduces a type Color that is an alias for the union type Color.Red | Color.Green | Color.Blue.
When a string literal enum type is inferred for a mutable location, it is widened to its corresponding literal enum type (rather than being widened to type string).
const c1 = Color.Red;  // Type Color.Red
let c2 = Color.Red;    // Type Color

The above behavior exactly corresponds to the behavior for numeric literal enum types, only the values are strings instead of numbers. In fact, an enum literal type can contain any mix of numeric literal values and string literal values.
enum Mixed {
    A,
    B,
    C = "hi",
    D = 10,
    E,
    F = "bye"
}

The Mixed type above is an alias for Mixed.A | Mixed.B | Mixed.C | Mixed.D | Mixed.E | Mixed.F, which is a subtype of 0 | 1 | "hi" | 10 | 11 | "bye".
Enum members with string literal values must always specify an initializer, but enum members with numeric literal values may omit the initializer provided it is the first member or the preceding member has a numeric value.
In the code emitted for an enum declaration, string valued members have no reverse mapping. For example, the following code is emitted for the Mixed enum declaration above:
var Mixed;
(function (Mixed) {
    Mixed[Mixed["A"] = 0] = "A";
    Mixed[Mixed["B"] = 1] = "B";
    Mixed["C"] = "hi";
    Mixed[Mixed["D"] = 10] = "D";
    Mixed[Mixed["E"] = 11] = "E";
    Mixed["F"] = "bye";
})(Mixed || (Mixed = {}));

As is already the case, no code is generated for a const enum. Instead, the literal values of the enum members are inlined where they're referenced.
Fixes #1206.
Fixes #3192.

@mhegazy You want to take a look before I merge this?

This is a breaking change as the public EnumLiteralType was removed. LiteralType has also changed to expose .value instead of .text.

@andy-ms can u add a note about this in API-breaking changes.

This will be really nice to have!
That said, in nearly all cases I'm going to have something like this:
enum Color {
  Red = "Red",
  Green = "Green",
  Blue = "Blue"
}

All strings, keys and values are the same.
It would be super convenient if there was a short-hand where you didn't have to declare both key and value for an all-string enum, something like:
string enum Color {
  Red,
  Green,
  Blue
}

@aaronbeall This is how I've done "string enums" since TypeScript 2.1:
const Colors = {
  Red: true,
  Green: true,
  Blue: true
};
type Color = keyof typeof Colors;

const correctColor: Color = 'Red';

// Type '"Blu"' is not assignable to type '"Red" | "Green" | "Blue"'.
const incorrectColor: Color = 'Blu';

In TypeScript Playground

@aaronbeall  enum<T = number>
I think this syntax is more appealing. It would allow more than just string default syntax, but if left blank, defaults to number. It would be overloading the generic defaults syntax for enums.
enum<string> Color {
  Red = 0, // Red = 0
  Green, // Green = "Green"
  Blue = 2 // Blue = 2}

So the following code:
enum<number> Color {
   Red, // Red = 0
   Green = "Green", // Green = "Green"
   Blue // Blue = 2
}

would be the same as:
enum Color {
   Red, // Red = 0
   Green = "Green", // Green = "Green"
   Blue // Blue = 2
}

@ahejlsberg @wizarrc To me, a generic Enum is more useful than a mixed Enum. I would rather have enum<T = number> where T can be any type, not just string or number, than mixing strings and numbers in the Enum.

@robertpenner I agree, and it should throw a lint warning if types are mixed (by setting an initializer) with generic enums under strict mode. As for specifying any type, that would be difficult to implement as property assessors only support string, number (integer only), and I think symbols. But who is to say that that wont increase over time, so by making it generic, it would make it more future proof, and add constraints to value T in your example in the d.ts file that defines the generic enum. I'm not sure disallowing mixed enums altogether is the right thing to do. I think the current PR is a good start, and should add generic enums later (future feature request???).

Personally I don't see much value in enums of mixed type, either (I can't remember ever doing that). I like the generic idea but I don't know how it would fill in values for anything other than string (use key as value) or number (incrementing value) automatically. Obviously something like enum<User> couldn't be filled in.

@aaronbeall unless the User implements some function name (symbol for uniqueness) that generates it in a user defines manner. Just throwing that out there. Think of it as a compile-time function instead of runtime, and wouldn't even go into the final output. I thought about that during my first post, but didn't really go there since I didn't think it was a much demanded feature.

Great feature, would there be any possibility of implementing nested enums? Like instead of doing this:
`const enum EnumDefinition {
name = "X"
}
const enum EnumDefinitionGroup1 {
A = "B1"
}
const enum EnumDefinitionGroup2 {
A = "B2"
}`
to do this:
const enum EnumDefinition {     name = "X",     Group1 = {         A = "B1"     },     Group2 = {         A = "B2"     } }
One can use static class members to achieve the same structure;
class EnumDefinition {     static readonly __name = "X";     static readonly Group1 = {         A: "B1"     };     static readonly Group2 = {         A: "B2"     }; }
Of course one can't use the key name "name" because it conflicts with the built in name nor does anything get inlined.
Regardless I'm very happy this has been merged.

@Draqir I'm lost by your example. Is EnumDefinitionGroup1 the same as Group1? How do the groups relate to each other? Also, what value do nested enums provide?

EnumDefinitionGroup1 is the same as Group1 inside the enum definition, the groups belong to the EnumDefinition.
Benefit: avoid magical strings. The more times you need to repeat a thing, the higher the risks are that there'll be bugs, and misspelling a string is quite easy. So in order to avoid that I usually use "blueprints" like the following:
class TvChannel {
    static readonly Table = "TvChannelTable";
    static readonly RelatedChannels = {
        Category: "Category",
    };
    static readonly ChannelProperties = {
        Audience: "Audience"
    };
}

class Channels {
    static readonly Sport = "Sport";
}

So if I wanted to retrieve all TvChannels that are sport channels I would do something like this;
db(TvChannel.Table).conditions(TvChannel.RelatedChannels.Category, Channels.Sport)

However this could just be nicely inlined by the TypeScript compiler to
db("TvChannelTable").conditions("Category", "Sport")

@Draqir so it's like enum namespaces? If that's the case, I think that's an awesome idea!

@wizarrc Actually I hadn't considered that, but yes, it's exactly as enum namespaces.

@Draqir One more thought. Support enum flags with namespaces, where each namespace (nested group) is a compiler enforced mutually exclusive flag, but it all is represented as a single number. I'm not sure how well the compiler can enforce or if it's even possible because it's collapsed to a single type but I've seen several projects (i.e. angular2+) use enum flags to combine types (groups or namespaces) in their low level implementation for performance reasons. It would be nice to have more static checking on mutual exclusion to make sure both items are not selected inside the same group. Take a look at the NodeFlags interface https://github.com/angular/angular/blob/master/packages/core/src/view/types.ts
Maybe if namespaces would have a combined type for number enums, like EnumDefinition is a supertype of Group1 | Group2 or something along those lines.

enums and namespaces already merge.
enum EnumDefinition {
    name = "X",
}
namespace EnumDefinition {
    export enum Group1 {
        A = "B1"
    }
    export enum Group2 {
        A = "B2"
    }
}

@mhegazy Going to run some tests. If that's the case I'll open a bottle tonight.

@mhegazy @Draqir Oops. It did not occur to me that merging namespace and enum is basically enum groups. Sounds like a win. Unfortunately I don't think there is a way to collapse that all into a single number enum like my example shown above from the Angular project. That would be a nice way to have great abstraction and still low level performance. Something that can only be done if it is a pure number enum.

@mhegazy
It's very close but no cigar.
error TS2339: Property 'name' does not exist on type 'typeof EnumDefinition'.

const enums are removed, so they can not merge with namespaces. so this only works with none-const enums.

@mhegazy If they allowed nesting namespaces inside of enums, they should be able to allow const since nothing is being merged and everything is known upfront. This external merging is the problem.
Imagine this code:
const enum<flags> NodeFlags {
    None,
    CatRenderNode {
        TypeElement,
        TypeText,
    }
}

Then you could access the enum by NodeFlags.CatRendererNode.TypeElement and CatRendererNode is type TypeElement | TypeText. The output would be a single constant number as this code:
const enum NodeFlags {
    None = 0,
    TypeElement = 1 << 0,
    TypeText = 1 << 1,
    CatRenderNode = TypeElement | TypeText

where flags is either a subset of number or is a static class with a sequential number generator that generates flags at compile time.

+1 for @aaronbeall's comment on something along the lines of string enum Foo {} syntax for autogenerating the string values from the identifiers. For those interested in same, you can also try out typescript-string-enums which is a tiny library that generates semantically identical (I think?) string-based enumerations in this manner with a minimum of awkward syntax to support it.

It still make me confused in TS playground. When I type
enum Mixed {
    A,
    B,
    C = "hi",
    D = 10,
    E,
    F = "bye"
}

it shows me wrong result:
var Mixed;
(function (Mixed) {
    Mixed[Mixed["A"] = 0] = "A";
    Mixed[Mixed["B"] = 1] = "B";
    Mixed[Mixed["C"] = "hi"] = "C";
    Mixed[Mixed["D"] = 10] = "D";
    Mixed[Mixed["E"] = 11] = "E";
    Mixed[Mixed["F"] = "bye"] = "F";
})(Mixed || (Mixed = {}));

@faceach
It's currently v2.3.3 in playground, see console.log for the version.
See #17406 and #17353.


Secret stash wrench anchoring fix

About the PR

(reopened pr because had some git issues in previous)

Anchoring has higher priority over stashing
Verbs for stashing are always shown which allows to stash wrenches

Why / Balance

fixes #31646
Technical details

Media

https://github.com/user-attachments/assets/70ac6ff2-d8f1-4a39-a494-603fdb7261b8
Requirements

[x] I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

:cl: yuitop

tweak: Anchoring now has higher priority over stashing.

I went ahead and fixed the merge conflict and addressed the review myself.
Thank you for your contribution.


📦 Bump ReactiveKit to use a proper Swift 4.0 compatible release, and update Differ to 1.0.1

Just like the title says ☝
Also includes a pretty important fix to how NSControl's dynamic subjects work - the control event on AppKit is essentially meaningless in a lot of circumstances, so I've set these to use KVO instead.

Looking good and thanks for merging the previous PR :)


Fixed bugs with query merging

From @amandajliu's work w/ GitHunt, we discovered that there were some issues with the way query merging handled arrays and null values in the response. This PR fixes those issues.
TODO:

[x] Update CHANGELOG.md with your change
[x] Make sure all of the significant new logic is covered by tests
[x] Rebase your changes on master so that they can be merged easily
[x] Make sure all tests and linter rules pass

Tested with GitHunt. Should be ready to merge.

Tested with GitHunt. Works + should be ready to merge, @stubailo


Added the feature to determine the object within 10cm

Hi @iamanshulgit, we have added some comments to your code. Please resolve them.
Kindly refer to the latest code in the master branch which got updated recently.
We simply need the function to check if an obstacle is present using the distance variable passed in the argument and not calculating the distance itself in the function.

Thank you for guiding me.

Hello @mayankofficial999
I hope this code is working this time. Thank you.

@iamanshulgit Congratulations ! Your PR got merged. Thanks for your contribution.


fbneo: Adjust the manifest order and Notes

Adjusts the manifest order according to the contribution guidelines.
Generalizes the contents of notes, which has the upside of making the sentences themselves read better as well.

The suggested sorting order was changed here: https://github.com/Calinou/scoop-games/pull/580
@beyondmeat Should it be changed to match the upstream Scoop contribution guidelines?

@Calinou I was unaware they already had a preferred sort. You can merge this in and then I can adjust the sort and make a PR to adjust everything to that


CMakeLists.txt: Use GNUinstalldirs module

Debian's packger of librime here. This patch would introduce the GNUInstallDirs module into the project's top-level CMakeLists.txt.
GNUInstalldirs is available since CMake 3.0.2. It provides standard install directory variables as defined for GNU software. Using this module would provides standard variable names for bindir, libdir, includedir and datadir, etc., which would be beneficial. There's no needs for manual string concatenation anymore.
This module is especially useful for Debian-based Linux distributions since they are using /usr/lib/<arch-triplet>/ as libdir instead of /usr/lib/ and /usr/lib64/. The GNUInstallDirs module can elegantly suit such needs.
CMake >= 3.0.2 has been available for many years. It is at least available since Ubuntu 16.04 and Debian 8, which covers all supported Debian and Ubuntu versions (Ubuntu 14.04 LTS has reached End-Of-Life already). As a result, such version bump should not cause much troubles even for users of old systems. I would admit that CMake 3.x is not available on CentOS 7 but at least it is available through epel.
This patch modifies the top-level CMakeLists.txt and applies the standard variables accordingly. The minimal CMake version requirement is also bumped to 3.0.2. I'm wondering if you find it okay to merge it. Thanks!

Edit 1: I see that the currrent Travis CI config still uses Trusty (14.04). I would expect build failures with current settings. Maybe it's time to bump the testbed version?

Thanks for the pull request.
I have few questions to his Packager:
Will this PR end up changing the installed dir of the ibus-engine-rime binary on Debian?
If the executable is relocated, what about ibus itself, how does it know where to load its  engines?

I haven't checked thoroughly but here's a quick answer:
This pull request is only about librime, not ibus-rime; the binary of ibus-engine-rime is currently provided by another project thus it won't be affected by this change at all (ibus-engine-rime's install dir won't be relocated).
That said, We may need to reevaluate the impact when making changes in the ibus-rime project.

Thanks for the answer. I confused ibus-engine-rime with librime.so, the former one is an executable but ibus require it to be in /usr/lib/. librime.so should be okay to follow system convention of libdir.

BTW @lotem  here is the answer to the question of ibus-engine-rime:
IBus may find the engine executable file even if it is installed into /usr/lib/<arch-triplet>/ibus-rime/ rather than /usr/lib/ibus-rime/. By looking at the file list of ibus-rime package, you will notice a file with path /usr/share/ibus/component/rime.xml. The content on current Debian system is as follows:
<?xml version="1.0" encoding="utf-8"?>
<!-- filename: rime.xml -->
<component>
	<name>im.rime.Rime</name>
	<description>Rime Component</description>
	<exec>/usr/lib/ibus-rime/ibus-engine-rime --ibus</exec>
	<version>1.0</version>
	<author>GONG Chen <chen.sst@gmail.com></author>
	<license>GPL</license>
	<homepage>https://rime.im</homepage>
	<textdomain>ibus-rime</textdomain>
	<engines>
		<engine>
			<name>rime</name>
			<language>zh</language>
			<license>GPL</license>
			<author>GONG Chen <chen.sst@gmail.com></author>
			<icon>/usr/share/ibus-rime/icons/rime.png</icon>
			<layout>default</layout>
			<longname>Rime</longname>
			<description>Rime Input Method Engine</description>
			<rank>0</rank>
			<symbol>㞢</symbol>
		</engine>
	</engines>
</component>

The actual path to the ibus-engine-rime file is provided here. As a result, I guess it would also be okay if you use GNUInstallDirs module in the ibus-rime project. I may submit a Pull Request later.


cell.getStringCellValue() returns incorrect value when the cell is the type of formula

Hello~~
First of all thank you very much for this awesome library. It's seems very cool~
Unfortunately there are some problems when I'm using.
For example, c5 cell has formula =c4 and when c4 cell is blank, I use cell.getStringCellValue() to read c5 and it returns me 0. Actually, what I want is also blank.
I'm using version 2.1.0 and I'm trying to fix it by myself, but any help would be highly appreciated.

I can't reproduce the issue, looks like cell evaluation works the same in 'native' mode as in the streaming mode.
formula_empty_cell.xlsx
package com.monitorjbl.xlsx;

import org.apache.poi.ss.usermodel.*;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;
import java.io.InputStream;
import java.util.Locale;

import static com.monitorjbl.xlsx.TestUtils.nextRow;

public class FormulaTests {

    @BeforeClass
    public static void init() {
        Locale.setDefault(Locale.ENGLISH);
    }

    @Test
    public void testTypes() throws Exception {
        try (InputStream stream = TestUtils.class.getResourceAsStream("/formula_empty_cell.xlsx")) {
            check(WorkbookFactory.create(stream));
        }
        try (InputStream stream = TestUtils.class.getResourceAsStream("/formula_empty_cell.xlsx")) {
            final Workbook workbook = StreamingReader.builder()
                    .open(stream);
            check(workbook);
        }
    }

    private void check(Workbook sheets1) throws IOException {
        try (final Workbook sheets = sheets1) {
            Sheet sheet = sheets.getSheetAt(0);
            Row row = nextRow(sheet.rowIterator());
            Cell emptyCell = row.getCell(0);
            System.out.println("Cell: " + emptyCell);

            Cell emptyCellReference = row.getCell(1);
            System.out.println("Cell formula: " + emptyCellReference.getCellFormula());
            System.out.println("Cell formula evaluation: " + emptyCellReference.getStringCellValue());
        }
    }
}

You can try.
cell.setCellType(Cell.CELL_TYPE_STRING);
String value = cell.getStringCellValue();


Remove unbeforeunload event when close PM panel

When a user type something in TinyMCE Editor in PM panel, it will registered an unbeforeunload event. (autosave plugin)
If we didn't remove the event after the PM panel is closed, the browser will prompt user, when they try to leave the page.

I'm not following what this actually does, because I have purposely added this line.
https://github.com/leen3o/mvcforum/blob/master/MVCForum.Website/Scripts/general.js#L563
Which prompts the user if the TinyMCE editor is not empty before closing the PM panel?

Open PM Panel, and type something in the editor (if there is already something, then type more words)
Close the PM panel without sending the message.
Click any link or just leave the page, then you will see the prompt.

Ahhh I'm with you. I hadn't seen that before, thanks.

Have added this in, thanks again

A downside of remove unbeforeunload event is when a user close PM panel and reopen it, the text in TinyMCE editor will gone. It is because the autosave plugin uses unbeforeunload event to save the content (in cookie maybe).
This will not affect the TinyMCE editor in other pages.

I have the reminder I linked to above, which asks the user if they want to close the window. If they confirm then they should expect the text to be lost IMO.


authRequest only supports query string params.

Attempts to call modifyCaptionDetails appear to show that authRequest is taking the params that are intended to be sent through as data within the request body, and applying them as query string parameters.
ex:
this.ustream.video.modifyCaptionDetails('<videoId>', 'en-US', {is_visible: true, is_default: true})
After contacting the Watson Media team, it does appear that the issue is not on the Watson Media API, but is instead that they expect the is_visible and is_default as part of the Request body instead of appended as query params.

I'm traveling right now. I'll get this resolved over the weekend.

Do you have an ETA on when this issue may be resolved @MichaelJamesParsons ?


Support for Vec<impl From<Value>> in models

Models should allow for columns which are arrays.
For example a Postgres array column called "images":
"images" VARCHAR[] NOT NULL DEFAULT ARRAY[]::VARCHAR[],

Should integrate with a type Vec<String> on a model.
pub struct Model {
    pub id: Uuid,
    pub images: Vec<String>,
}

Currently, it throws an error:

the trait From<Vec<std::string::String>> is not implemented for sea_orm::Value

But all other databases (MySQL & SQLite) does not support array

Oh I see, I wonder if this feature could only be enabled when you have the postgres feature flag active.
I did see that MySQL has a JSON type and a JSON_ARRAY function... I wonder if it could also be implemented for MySQL and it works on JSON types, but if the JSON is an object, it will fail?

+1
I just test sea-orm-cli generate entity  from my model (which work fine with Diesel.rs), and I obtain the following code for entities :
...
    #[sea_orm(column_type = "Custom(\"array\".to_owned())", nullable)]
    pub other_patient_ids: Option<String>,
...

Clearly, other_patient_ids should be a Option<Vec<String>>.
Is it planned to support ?

Cont'd in #576

I'm confused, why was this closed? The other issue #576 is less detailed and is more recent. Is it because this is being worked on?

just to consolidate the discussions


[DOCFIX] Update memory requirement in doc

Add a note for embedded journal memory requirement.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-PR-Builder/11394/
Test PASSed.

alluxio-bot, merge this please.

alluxio-bot, cherry-pick this to branch-2.4 please


File much larger than the data it contains

I'm storing hundreds of millions of small records (key is 4 bytes and value is 18 bytes -  total 22 bytes), and with a million records  the database file size should be approximately 21 MB -- but it's 104 MB.
Obviously, I know the database file would always be larger than the data it contains due to pages, but when the database size is 5 times bigger than the data it contains - I feel like I'm wasting a lot of disk space.
(Edit: I tried bolt compact and it does reduce the file size from 104 MB to 93 MB, however it's still over 4 times bigger than the 21 MB of data it contains).
Examining the database file, I noticed records are stored in many small chunks and there's about a 4 KB of zeros between each chunk. How can I reduce that 4 KB padding between chunks?
Is it because of my system's page size? Can I reduce page size only for the bolt database without adjusting it system-wide? Can bolt make better use of that zero padding?
Maybe there another approach I can take to storing millions of small records without consuming so much disk space?
Thanks,
Moshe

@zippoxer Are you using a lot of buckets? Each bucket requires at least one full page regardless of how much data is inside. I agree that 5x the size of the data seems excessive.
Bolt splits pages when they become full so it's not uncommon to see half full pages. Unfortunately, packing data tightly would cause inserts to become much slower when pages split.

@benbjohnson I only use a single bucket and put the million records there. So according to what you said, I shouldn't be seeing many chunks of records separated with 4 kb padding in the DB file. Why am I seeing it then?

@zippoxer Do you have example code that reproduces the issue?

@benbjohnson
Yes, I have a test that produces this result:
package main

import (
	"log"

	"math/rand"
	"time"

	"encoding/binary"

	"bytes"

	"github.com/boltdb/bolt"
	_ "github.com/lib/pq"
)

type PriceRecord struct {
	D         time.Time
	ProductID int32
	StoreID   int32
	Price     int32
}

func gen(ch chan<- PriceRecord) {
	startDay := time.Date(2016, time.October, 0, 0, 0, 0, 0, time.UTC)
	day := 0
	for day < 10 {
		for i := 0; i < 100e3; i++ {
			ch <- PriceRecord{
				D:         startDay.AddDate(0, 0, day),
				ProductID: int32(i)/5 + 1,
				StoreID:   rand.Int31n(5e3),
				Price:     rand.Int31(),
			}
		}
		day++
	}
	close(ch)
}

type BoltRecord struct {
	Month     int16
	Day       int16
	Year      int16
	ProductID int32
	StoreID   int32
	Price     int32
}

func saveBolt() {
	start := time.Now()
	db, err := bolt.Open("zapt.db", 0600, nil)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()
	tx, err := db.Begin(true)
	if err != nil {
		log.Fatal(err)
	}
	b, err := tx.CreateBucket([]byte("prices"))
	if err != nil {
		log.Fatal(err)
	}
	buf := bytes.NewBuffer(nil)
	i := 0
	ch := make(chan PriceRecord, 100)
	go gen(ch)
	for rec := range ch {
		id, err := b.NextSequence()
		if err != nil {
			log.Fatal(err)
		}
		err = binary.Write(buf, binary.BigEndian, BoltRecord{
			Month:     int16(rec.D.Month()),
			Day:       int16(rec.D.Day()),
			Year:      int16(rec.D.Year()),
			ProductID: rec.ProductID,
			StoreID:   rec.StoreID,
			Price:     rec.Price,
		})
		if err != nil {
			log.Fatal(err)
		}
		err = b.Put(itob(int(id)), buf.Bytes())
		buf.Reset()
		if err != nil {
			log.Fatal(err)
		}
		i++
	}
	if err := tx.Commit(); err != nil {
		log.Fatal(err)
	}
	log.Println("took", time.Now().Sub(start))
}

func itob(v int) []byte {
	b := make([]byte, 8)
	binary.BigEndian.PutUint64(b, uint64(v))
	return b
}

func main() {
	saveBolt()
}

Look at saveBolt() - it saves 1 million records (18 bytes value & 4 byte key each) to the database file zapt.db which ends up taking 98-103 MB of disk space (depends on if you divide the bytes by 1024 or 1000).
BTW, I found that if I split it up to smaller transaction of 1K record per transaction, the files weighs less (98 MB instead of 103 MB). But it's still a lot.

What if you add a "b.FillPercent = 0.9" after the CreateBucket line? I haven't tried it, but that should tell it to do a 90-10 split instead of a 50-50 split when a page is full, which is more appropriate for sequential inserts.

@benbjohnson
Setting FillPercent to 0.9 reduces the file size by 37% from 103 MB to 64 MB. So that really helps, thanks :)
So 64 MB is a bit less than 3 times the pure data (22 MB). There's still some zero padding - here's a hex snippet from the file: http://pastebin.com/hZJdrwt3
Notice how there's a bunch of records. The records are consuming ~26 bytes each -- that's only ~15% higher than the real data which is awesome -- but then there's a padding before the next chunk of records. Notice how the padding isn't all zeros, it contains some values as well.

Your keys are 8 bytes, so 26 is correct. Database size is also rounded to the next power of two when it grows (see mmapSize() in db.go).
The mostly empty part in between looks like leafPageElement records (page.go), judging by 2nd half being "08 00 00 00 12 00 00 00", 8 being the key size, and 12 being the value size in hex, both as 32-bit ints. The other 8 bytes are flags and relative address. So those add 16 to each of the 26 bytes.

@dtfinch
Alright, now it seems reasonable to me :)
And yes, my key is 8 bytes (didn't notice the itob function I copied from bolt's README).
Thanks for walking me through the details, and thank you Ben for helping me reduce the file size to almost a half.


feat: vscode integration

What changed / motivation ?
I spent the last week or so building up an LSP for StyleX that I can use for a VSCode extension. This PR adds a link to it to the documentation in an integrations section to the API portion of the docs.
Link to VSCode extension: https://marketplace.visualstudio.com/items?itemName=yash-singh.stylex
Linked PR/Issues
Fixes # (issue)
Additional Context

Screenshots, Tests, Anything Else

Pre-flight checklist

[x] I have read the contributing guidelines
Contribution Guidelines
[x] Performed a self-review of my code

This is not the right place for this link.
I'm planning on adding an "ecosystem" sidebar item under "learn" which will include a set of tools that can be used alongside StyleX. This will include editor plugins, babel plugins, UI libraries etc. along with a basic introduction to each project.
Once your plugin is a bit more polished, I'll make sure to add it there.
Therefore, I'm leaving this PR open but not merging it for now.

Do we have / need a VSCode extension for internal use of StyleX?

We don't have a VSCode plugin for internal use. There is little need for one as Typescript or Flow should provide auto-complete.
But seeing colors, and getting better auto-complete for CSS values can be nice.

@nmn Quick status update here, I updated the VSCode extension and got the following working:

Auto-complete
Multi-byte Characters
Fixed various bugs and issues that arised by testing the extension on the following examples:

StyleX apps/examples: https://github.com/facebook/stylex/tree/main/apps/nextjs-example, https://github.com/facebook/stylex/tree/main/apps/rollup-example, https://github.com/facebook/stylex/tree/main/apps/webpack-example
qwik-stylex
docusaurus-stylex
nextjs-app-dir-stylex
Most code snippets present in the documentation

LMK if you are looking for anything else or find any issues in the extension.
I also updated the PR and moved the documentation page to the ecosystem section.

@Yash-Singh1  Thanks for the great work on the VS Code plugin. I've been using it myself a bit recently, and I've found the inline colour pickers to be useful even before you added all these additional features.
Again, the website changes will have to wait, because I want to find a good place for "related tools". I will probably make an extra page and document @stylexjs/open-props and the VS Code plugin to start.
Leaving the PR open till I get around to that.

I fixed the conflict and merged it.


[REFACTOR] Validation system

Changes Unknown when pulling e974798d74b5885f11a5d977bdcbb08edd7a00ff on zenika-dev-javi into ** on zenika-dev**.


Integrate ESM loading of commands & hooks

Greets. This is the first of three PRs regarding adding ESM support to Oclif v2.
This initial PR adds ESM loading of commands and hooks. I have tested it with my ESM Oclif middleware / CLI tool in addition to all tests passing in the repo.
The easiest way for me to proceed with working on the Help subsystem adding ESM help class loading support and async handling is for this PR to be merged first as it depends on the ModuleLoader addition.
Let me know your thoughts @amphro.

I've tried this branch on a couple of oclif/core cli's that we have and things look good. I haven't tested on a distributed cli with plugins installed but @oclif/plugin-plugins hasn't been updated yet to use core anyways. I'm good to merge this once I get your responses to my comments.

@amphro This PR should be good to merge now. I added ModuleLoadError to handle the CJS & ESM loader variance with the module not found case and added reasonably thorough unit tests for ModuleLoader in ./test/module-loader.

Love the changes. Nice work on this.


Refund button on host contributions view

I wish I could access the refund option on this view instead of having to go find the transaction on the Collective's page

Not sure about the complexity because our refund logic is usually tied to "Transactions", not "Contributions" (aka Orders). But the feature request makes sense. cc @kewitz since you've looked at this recently


Add 'orderBy' option for collection filtering on '$select->load()'

There is a neat option where for filtering hasMany relations: https://cycle-orm.dev/docs/relation-has-many#usage-load-filtered. It would be great if we could also have something simillar but for sorting.

That would be nice. To sort the has many items I had to use a constrain: https://cycle-orm.dev/docs/advanced-constrain
If there is an easier way currently, I would be interested in knowing about it.


Add GetQueuesRuntimeInfoAsync to ManagementClient

This adds GetQueuesRuntimeInfoAsync method to ManagementClient. Connected to #8434

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: tmasternak sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Can one of the admins verify this patch?

@tmasternak
The change looks good. Only thing is we might have to do the same for topic and subscriptions as well. Need to keep the API layer consistent across the entities. Could you please add that as well?

@nemakam sure. I'll update the PR.

@nemakam I've extended the PR with async queries for topic and subscription runtime info.

//fyi:  @JoshLove-msft, @ShivangiReja, @ramya-rao-a

@tmasternak , thanks for the PR


cast --from-wei and --to-wei should assume unit is eth

cast --from-wei assumes the user wants the result in wei, which is an unintuitive default target unit (and contradicts the description in the usage message ("convert wei into an ETH amount").
seth (despite saying otherwise in its documentation) defaults to eth as the target unit, which is more intuitive.
> seth --from-wei 10
.000000000000000010
> cast --from-wei 10
10

--to-wei assumes the source unit is wei, which is also unintuitive and contradicts the usage message ("convert an ETH amount into wei"), although it is consistent with how seth --to-wei behaves.

For context, I thought that it was OK to diverge from seth / default to wei in the PR which introduced this, https://github.com/gakonst/foundry/pull/261, but seems like it might've been more unintuitive.

For context, I thought that it was OK to diverge from seth / default to wei in the PR which introduced this, https://github.com/gakonst/foundry/pull/261, but seems like it might've been more unintuitive.


Webpack is not detecting newly installed modules

The repro and description can be found in https://github.com/steelbrain/webpack-bug

fixed


Tower of hanoi cpp code

The tower of hanoi c++ code

Please star this repository to show your support, in the meantime I am reviewing your code.

Ok bro of course you plzz accept it
On Thu, Oct 15, 2020, 12:22 PM Amritansh Vajpayee<EMAIL_ADDRESS>wrote:

Please star this repository to show your support, in the meantime I am
reviewing your code.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/amritansh22/Data-Structures-and-Algorithms-in-cpp/pull/423#issuecomment-708940449,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APHKUBYNSQG2YH23D3VORADSK2L2PANCNFSM4SRRFICA
.

Hey @Soumyajit2411 Please star this repository not the forked one.

Done
On Thu, Oct 15, 2020, 12:57 PM Amritansh Vajpayee<EMAIL_ADDRESS>wrote:

Hey @Soumyajit2411 https://github.com/Soumyajit2411 Please star this
repository not the forked one.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/amritansh22/Data-Structures-and-Algorithms-in-cpp/pull/423#issuecomment-708957251,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APHKUB574PBZ5M7JYYUNPMTSK2P6RANCNFSM4SRRFICA
.

Hey bro please give the level hactoberfest-accepted


co19_2/LibTest/io/FileSystemMoveEvent/destination_A01_t02 whent from flaky to RuntimeError on dartk-mac-release-x64

The test
co19_2/LibTest/io/FileSystemMoveEvent/destination_A01_t02 RuntimeError (expected Pass)

is failing on configurations
dartk-mac-release-x64

Log:
--- Command "vm" (took 45.000644s):
DART_CONFIGURATION=ReleaseX64 xcodebuild/ReleaseX64/dart --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/tests/co19_2/src/LibTest/io/FileSystemMoveEvent/destination_A01_t02.dart

exit code:
255

stdout:
unittest-suite-wait-for-done

stderr:
Unhandled exception:
NoSuchMethodError: The getter 'destination' was called on null.
Receiver: null
Tried calling: destination
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1      _main.<anonymous closure> (file:///b/s/w/ir/tests/co19_2/src/LibTest/io/FileSystemMoveEvent/destination_A01_t02.dart:32:44)
#2      testFileSystemEvent (file:///b/s/w/ir/tests/co19_2/src/LibTest/io/file_utils.dart:56:7)
<asynchronous suspension>
#3      _main (file:///b/s/w/ir/tests/co19_2/src/LibTest/io/FileSystemMoveEvent/destination_A01_t02.dart:28:3)
<asynchronous suspension>
#4      inSandbox (file:///b/s/w/ir/tests/co19_2/src/LibTest/io/file_utils.dart:24:12)
<asynchronous suspension>
#5      main (file:///b/s/w/ir/tests/co19_2/src/LibTest/io/FileSystemMoveEvent/destination_A01_t02.dart:20:3)
<asynchronous suspension>

--- Re-run this test:
python tools/test.py -n dartk-mac-release-x64 co19_2/LibTest/io/FileSystemMoveEvent/destination_A01_t02

This could be fixed by co19_2 roll https://dart-review.googlesource.com/c/sdk/+/187460.
@whesse Please close this issue if the test starts passing after the roll.

Indeed, this test started passing since co19_2 roll https://github.com/dart-lang/sdk/commit/137de39b7a72837a7851eb51389fd5811239f5a3.


Fix incorrect link and incorrect orders for debezium MySQL doc

After this PR gets approved, I will update the changes to all other versions (or just <IP_ADDRESS> and let github action sync other versions)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@RobertIndie Please help fix the history version.

I push a PR: https://github.com/streamnative/pulsar-hub/pull/360


[Feature Request]: When will llama-index implement adapt other FilterOperators other than EQual?

Feature Description
Im looking forward to the implemention of all the FilterOperators as it will be very useful feature
Reason
No response
Value of Feature
No response

@maherr13 We have, but it has to be implemented per-vector store
So far, we added support for qdrant, chroma, weaviate, pinecone, astra, Cassandra, postgres
Here's an example with pinecone
https://docs.llamaindex.ai/en/stable/examples/vector_stores/pinecone_metadata_filter.html


b3588 build fail on VS 16.8.0

is it something on my side or should I just wait for the fix?

The error text is saying your caches are outdated. You need to run build_clean.cmd or delete the \phlib\bin\ directory.
I also checked with the same versions as your screenshot and compiled fine:

Weird, I still have that error even on a new working copy...

Can you try recompiling \tools\thirdparty\thirdparty.sln before building the project?

1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): error C2220: the following warning is treated as an error (compiling source file jsonc\linkhash.c)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): warning C5105: macro expansion producing 'defined' has undefined behavior (compiling source file jsonc\linkhash.c)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): message : to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings (compiling source file jsonc\linkhash.c)

I get this while trying to compile debug | x64 | thirdparty.sln in VS 16.8.0.

I get this while trying to compile debug

I've pushed a fix to disable those cplusplus macros when building the project. You should be able to compile both the main project and thirdparty?

You should be able to compile both the main project and thirdparty?

Yeah, I re-compiled thirdparty and now the main project builds correctly. Thank you! 👍

Aleksoid1978 ran into a similar problem when building a static library and described it on forum.ru-board.com:

Aleksoid1978
An interesting joke came out with VS 2019 v16.8.0 - in the project one of the "Project" type is configured as a makefile and body shirts with parameters for assembly are written, etc. If anything - it's ffmpeg for building into a static lib. Output has the correct file name. Other "Project" lists dependencies on this.
Before 16.8.0 everything worked fine, ffmpeg.lib was built and everything was clear when linking. On 16.8.0, ffmpeg.lib is assembled but does not participate in linking, the linker swears at the functions that are in it. These are the "pies". I had to work around - to register this ffmpeg.lib in projects.

I will probably continue to use 16.7.7 for now and will wait for the compiler to fix it - there is a bug in it, its authors should fix it ...

The way that worked in MPC-BE: https://sourceforge.net/p/mpcbe/code/5659/

For MS VS2019 v16.9.0 also needed:

run ./build/build_clean.cmd
run if needed my clean.cmd:

@echo off
rm -fr ./.vs > nul
rm -fr ./bin > nul
rm -fr ./ClientBin > nul
rm -fr ./phlib/bin > nul
rm -fr ./phlib/obj > nul
rm -fr ./ProcessHacker/obj > nul
rm -fr ./ProcessHacker/sdk/phapppub.h > nul
rm -fr ./tests/phlib-test/obj > nul
rm -fr ./tools/CustomSetupTool/bin > nul
rm -fr ./trunk/tools/CustomSetupTool/obj > nul
rm -fr ./tools/CustomCmdTool/bin > nul
rm -fr ./tools/CustomCmdTool/obj > nul
rm -fr ./tools/CustomCmdTool/.vs > nul
rm -fr ./tools/peview/obj > nul
rm -fr ./SDK > nul
for %%A in (
    DotNetTools
    ExtendedNotifications
    ExtendedServices
    ExtendedTools
    HardwareDevices
    NetworkTools
    OnlineChecks
    ToolStatus
    Updater
    UserNotes
    WindowExplorer
    ) do if exist ./plugins/%%A (rm -fr ./plugins/%%A/obj > nul)
for %%A in (
    AtomTablePlugin
    AvgCpuPlugin
    DbgViewPlugin
    DnsCachePlugin
    DpiAwarenessExtPlugin
    ExtraCpuGraphsPlugin
    FirmwarePlugin
    GraphExplorerPlugin
    GrowlNotifications
    HexPidPlugin
    MemoryExtPlugin
    NvGpuPlugin
    ObjectManagerPlugin
    PerfMonPlugin
    PipeEnumPlugin
    PoolMonPlugin
    ProductPolicyPlugin
    ReparseEnumPlugin
    ROTViewerPlugin
    SbieSupport
    SecurityExplorerPlugin
    ServiceBackupRestorePlugin
    SetCriticalPlugin
    TaskbarExtPlugin
    TerminatorPlugin
    TrustedInstallerPlugin
    WaitChainPlugin
    ) do if exist ./plugins-extra/%%A (rm -fr ./plugins-extra/%%A/obj > nul)
exit /b

rebuild ./tools/thirdparty/thirdparty.sln

or VS2019 v16.9 can't build phlib.lib


Docker images available?

Hello,
Do you have any pre-built docker images available? I do not have root access on my machines, so cannot run docker, but can run built docker images using singularity.
Alternatively, could SNVstory be installed using a virtual environment (following the dependencies in the Dockerfile)?
Thanks!
Lauren

Hi @lcoombe you can find the docker image for this version here: docker pull heritagehelix/snvstory:3.0.0
And while I personally haven't I'm pretty sure you could build SNVstory using a virtual environment. There would be some tricks to making sure your environment played nice with the correct numba version; we run into lots of issues there.
Let me know if that Docker worked for you or if you have any other questions.

I'll give that docker image a try - thank you so much!


Rollup of 3 pull requests

Successful merges: #686, #687, #689
Failed merges:

In order to make things a bit faster...

Uh? One pr is failing...


Incorrect Value for KeyDoesNotExist

Describe the bug
Condition.KeyDoesNotExist takes map[string]string. However, the docs only have one param. I think this should be similar to KeyExists?
Is this a bug? If so I'll submit a PR. If not, what is the proper value for the map value? Also, can I work around it by setting the value to the empty string?
Note there are tests asserting what I believe to be the wrong thing here. Or at least they contradict the FluentBit docs.
To Reproduce
n/a
Expected behavior
n/a
Your Environment
- Fluent Operator version: master
- Container Runtime: n/a
- Operating system: n/a
- Kernel version: n/a

How did you install fluent operator?
No response
What happened?
No response
Your Error Log
n/a

Additional context
No response

@frankgreco Thanks for reporting this, and we'll take a look at this

This is because fluentbit 1.7 and earlier versions had two values, with the upgrade of fluentbit the value of this parameter is only one value. You can see here.

@wenchajun It makes sense then for backwards compatibility. However, anyone that is isn't familiar with FluentBit v1.7 or earlier (which I assume is most people) will be confused. Perhaps there could be a KeyDoesNotExistLegacy or something that makes it less confusing (I guess this would be a breaking change so not ideal)? At a minimum a code comment describing what to do for earlier versions (empty string value).
Also, what is the end of life timeline for FluentBit versions. When will 1.7 be EOL?

@wenchajun what do you think?

1.7 and 1.8 are already EOL, I like the suggestion of KeyDoesNotExistLegacy or an alternative. Do we need to raise in Fluent Bit main repo?

1.7 and 1.8 are already EOL, I like the suggestion of KeyDoesNotExistLegacy or an alternative. Do we need to raise in Fluent Bit main repo?

The Condition.KeyDoesNotExist has been changed since v1.8.
I think it makes sense to change it accordingly in fluent operator because now fluent operator supports v1.8+ and we're going to release a new version to support v1.9.
We needn't to KeyDoesNotExistLegacy for now because 1.7 is EOL.
@frankgreco would you create a PR for this?

Yes. Btw I think there are a few other instances of this. We can apply the same fix as they are found. Btw, since this is a breaking change. I'll let you guys figure out how you want to handle the semver

We're going to release 1.10

I meant breaking change for this repo, the operator. We should probs audit the rest of the process in apis/fluentbit where this same issues applies and fix them before bumping the version.

@frankgreco we might need to add CRD conversion for changes like this https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts.html https://book.kubebuilder.io/multiversion-tutorial/conversion.html
An example is here https://github.com/OpenFunction/OpenFunction/blob/main/apis/core/v1alpha2/function_webhook.go
https://github.com/OpenFunction/OpenFunction/blob/main/apis/core/v1alpha2/function_conversion.go

@benjaminhuo don't we need to decide on what the plan is to your comment before that PR is merged? Anyone that pulls latest will now run into errors and must upgrade all CRDs using that filter.

I mean we may introduce a new CRD version v1beta1 and support conversion between v1beta1 and current v1alpha2 if there're quite a few changes like this

I think we need to go with this change. Regardless of whether or not there are quite a few changes like this, I think the disruption just this change alone causes is bad.
I think we should track v1beta1 or v1alpha3 and aggregate a batch of changes to go in.

I think each version update will add or modify a part of the plug-in (including some bugfix). So each upgrade will result in a redeployment of crd. And with fluentbit 1.7 eol, lower versions of fluentbit are no longer supported.

@frankgreco the current k8s log processing pipeline doesn't use this functionality of the modify filter plugin and we haven't received an issue-reporting of his bug(The current FB version is v1.8.x+, which is incompatible with the old modify filter setting). Furthermore, v1.7.x has reached its EOL and the latest operator release will ship with recent FB version
So we may not upgrade the CRD version this time.

OK, I understood your concern now.
Let's revert this PR and prepare to upgrade the CRD version and add CRD conversion to it.

The PR has been reverted and let's reopen this issue to continue to work on it.

We want to include your previous PR because the current filter plugin setting KeyDoesNotExist is still for fluent bit v1.7. Although the default image shipped with the operator is already v1.8.
We might release v1alpha3  CRDs maybe after adding the custom plugin CRD mentioned in https://github.com/fluent/fluent-operator/issues/301#issuecomment-1152362843

We might release v1alpha3 CRDs maybe after adding the custom plugin CRD mentioned in https://github.com/fluent/fluent-operator/issues/301#issuecomment-1152362843

Perhaps then to get started we can do this
- you create a branch called v1alpha3 (I don't believe I have access)
- we merge PRs into that branch until we'll ready to release it
- I'll reopen my PR against that branch

https://github.com/fluent/fluent-operator/tree/v1alpha3
@frankgreco v1alpha3 branch created

@benjaminhuo Thank you! I'm at Snowflake Summit this week but I'll PR against that branch (along with all of the new v1alpha3 boilerplate) when I get a chance.


Fix invalid resource spec

Signed-off-by: James Munnelly<EMAIL_ADDRESS>

/approve cancel

cert-manager:munnerz-patch-2 should probably be deleted
/spam
/close


As a user, I want fixes to the modal

There are a few issues with the modal:

[ ] Modals need to have a way to close them. Add a close button.
[ ] Modals should not be opened by default. Default modals to be closed.

[ ] Need to add a clickToLaunch that opens the modal

IE11 Specific:

[ ] In IE11, the modal should remain in its container. Currently, it is being displayed as a full screen modal (which is how it would typically be displayed) but there's no way to close it in order to click a different component in the nav.

Hello, I am looking into the Modal and quick questions:

Revelry has a CloseButton, is it the design you would like?
(There are different buttons designs available from Revelry, and this is convenient to include it as a props.children to the StatelessModal component to easily modify the close button design)
When incorporating the StatelessModal, the isOpen props can be set as true or false (I see from your screenshot this is set to true). I am asking because I could not find a default option set to true, (set to props).
The clickToLaunch should be set on which element? (The modal should open when clicking on a specific item right?) I am unsure where to add this (I have it on button in the example below)

Thank you very much!

@blazebarsamian Could you please confirm that the IE11 bug is fixed and close this issue if so?


I need get the tile's properties  ,and I think this is a very useful feature

Can you provide some details as to your use-case? Why do you want to do this?


Add Size Labels

Pull Request
Description
This change adds new labels to categorise pull requests based on their size. The following size labels have been introduced:

XS (Extra Small)
S (Small)
M (Medium)
L (Large)
XL (Extra Large)
XXL (Extra Extra Large)

Each size label is assigned a unique colour for easy visual identification. These labels will help streamline the review process by providing a quick indication of the scope and complexity of each pull request.

#58
#57  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @JackPlowman and the rest of your teammates on  Graphite

Merge activity

Oct 26, 4:23 PM EDT: A user merged this pull request with Graphite.


Find a way to remove duplication between examples

Today, there are 3 TypeScript projects. Almost all the TS code is duplicated, and this is the same for html and css.
To reduce maintenance and ensure all projects test the same maxGraph features in the same way, find a way to remove the duplication.
See #5 or #10 for duplication manual management.

#4 will definitively help


How to get profile pics?

How to get logged in gmail user image and recipients image on recipient_change event?
@josteink

I don't think this is part of the Gmail.js library. We attempted to grab the image urls ourselves, but it ultimately wasn't worth the effort because the gmail divs that contain user and recipient images are often created dynamically on mouseover events.

From what I can tell, this is looked up dynamically via som XHR social-graph stuff:

We can clearly see a URL to some "usercontent" there, and that's the photo:

If we could find out how to forge/generate the first request, we could look this up, but looking at the URL, I don't see any obvious things to plug into or replace in that URL:
https://apis.google.com/u/0/_/socialgraph/lookup/hovercards/?n=0&sp=0&cmp=2&src=gmail&soc-app=1&cid=0&soc-platform=1&hl=en_GB&ozv=\<stuff>&f.sid=<stuff>&_reqid=<sequence?>&rt=j
The SID does not represent the message or thread Id, so I have no idea what that is.
Maybe a simple approach is checking the DOM? Looking into the HTML for the same email, I get this (under the DOM-node for the email-message itself):
<img id=":0_146-e"
     name=":0"
     src="https://plus.google.com/u/0/_/focus/photos/public/AIbEiAIAAABECKiT1qv9rZG_-AEiC3ZjYXJkX3Bob3RvKigwOTAzOWMzZTEyNmU4ZTFhNjhiYTJkOWVkMmExYTRjM2QwYjg5NTM2MAEPRoZnxth4oyKWLhi0z-IKc2ztoQ?sz=32"
     class="ajn"
<EMAIL_ADDRESS><EMAIL_ADDRESS>     data-name="João Távora" aria-hidden="true">

Based on that it seems fairly trivial to get a photo for a given email-address, if that address represents a shown email:
var emailAddress =<EMAIL_ADDRESS>var photoNode = document.querySelector("img[data-hovercard-id='" + emailAddress + "']");
var photoUrl = photoNode.src;
photoUrl
// https://plus.google.com/u/0/_/focus/photos/public/AIbEiAIAAABECKiT1qv9rZG_-AEiC3ZjYXJkX3Bob3RvKigwOTAzOWMzZTEyNmU4ZTFhNjhiYTJkOWVkMmExYTRjM2QwYjg5NTM2MAEPRoZnxth4oyKWLhi0z-IKc2ztoQ?sz=32

This gives us the tiny thumbnail, but from what I can tell, the sz-param represents size and can be tweaked:
Like this: https://plus.google.com/u/0//focus/photos/public/AIbEiAIAAABECKiT1qv9rZG-AEiC3ZjYXJkX3Bob3RvKigwOTAzOWMzZTEyNmU4ZTFhNjhiYTJkOWVkMmExYTRjM2QwYjg5NTM2MAEPRoZnxth4oyKWLhi0z-IKc2ztoQ?sz=256
Maybe that works for you. Maybe it doesn't. But I was able to cook that up in less than 15 minutes, so I figure whoever spends a little more time at this, may be able to get even further.

Old issue is old. Closing.


Age classification && building nn vs classifier

Greetings,
If I want to build an age or gender classification, I need to create a new nn, and train it on data with labels of  age, gender respectively?
Or can I use the the nn4.small2.v1 nn for example, and build a classifier of age/gender?
The given nn is good just for classification between different people?
Best regards,
Aviram

Hi Aviram, right, you'll probably need to train a new network, but the existing network may have some useful features that you could use.
-Brandon.

Hi, thank you for the answer.
Useful features like what?
Im sorry about all of the question, but I  just want to make sure that I
understand what is the purpose of the given nn.
Is just for classification of known people that i have trained?
Best,
Aviram
בתאריך 11 בנוב׳ 2016 08:18 PM, "Brandon Amos"<EMAIL_ADDRESS>כתב:

Hi Aviram, right, you'll probably need to train a new network, but the
existing network may have some useful features that you could use.
-Brandon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/cmusatyalab/openface/issues/204#issuecomment-260020606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI60VXS0sKbKPyKiCwA9qpiNItpX4cI0ks5q9LFkgaJpZM4KvgdP
.


add cosine similarity function

Decided to add a function for the cosine similarity. This is useful in the same way that the other functions are (ie: returning the metric with the result). In my particular case, I will likely want to throw out results below some threshold.

Thanks for the contribution! Imma bet that the math here is correct, I barely passed my linear algebra class...


Add AWS_DEFAULT_REGION variable to stemcell pipeline

If there is no variable it would always default to us-east-1.

merge story #152973498

@thardeck Thanks for the PR!  Unfortunately, this pipeline has moved to another repository at bosh-linux-stemcell-builder.  This PR no longer applies here.  If you are still interested in contributing please resubmit your PR to that repo.  Thank you!


Can x11docker run more docker containers with --desktop?

Hello,
I am trying to run more deepin desktop images with x11docker on one machine.
And I am use this command to run the deepin images:
sudo x11docker --desktop --systemd --gpu --sudouser --homedir /home/sdk/workspace/sdk -- "--privileged -v /dev/kvm:/dev/kvm" x11docker/deepin
I use the private nvidia drivers to support openGL APIs,it is no problem when this command is executed firstly.
But when I opened a another terminal and executed the uppper command again,it failed and the error is like the following shows:
x11docker WARNING: Will run DBus system services as root in container.
  If the image contains malicious applications started by DBus service files,
  they may abuse their root privileges and may try to break out of container.

x11docker ERROR: Error during startup of X server --xorg.
  Last lines of xinit log:
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.11.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

The /var/log/Xorg.11.log is like this:
[1711772.409] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[1711772.409] (==) NVIDIA(0): RGB weight 888
[1711772.409] (==) NVIDIA(0): Default visual is TrueColor
[1711772.409] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[1711772.409] (**) NVIDIA(0): Enabling 2D acceleration
[1711772.411] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[1711772.412] (--) NVIDIA(0):     CRT-0
[1711772.412] (--) NVIDIA(0):     DFP-0
[1711772.412] (--) NVIDIA(0):     DFP-1 (boot)
[1711772.412] (--) NVIDIA(0):     DFP-2
[1711772.412] (--) NVIDIA(0):     DFP-3
[1711772.412] (--) NVIDIA(0):     DFP-4
[1711772.412] (--) NVIDIA(0):     DFP-5
[1711772.412] (--) NVIDIA(0):     DFP-6
[1711772.412] (--) NVIDIA(0):     DFP-7
[1711772.414] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 960 (GM206-A) at PCI:1:0:0 (GPU-0)
[1711772.414] (--) NVIDIA(0): Memory: 2097152 kBytes
[1711772.414] (--) NVIDIA(0): VideoBIOS: <IP_ADDRESS>.01
[1711772.414] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[1711772.414] (EE) NVIDIA(GPU-0): Failed to acquire modesetting permission.
[1711772.414] (EE) NVIDIA(0): Failing initialization of X screen 0
[1711772.416] (II) UnloadModule: "nvidia"
[1711772.416] (II) UnloadSubModule: "wfb"
[1711772.416] (II) UnloadSubModule: "fb"
[1711774.613] (EE) intel(G0): [drm] failed to set drm interface version: Permission denied [13].
[1711774.613] (II) intel(G0): [drm] Contents of '/sys/kernel/debug/dri/0/clients':
[1711774.613] (II) intel(G0): [drm]              command   pid dev master a   uid      magic
[1711774.613] (II) intel(G0): [drm]                 Xorg  1296   0   n    y     0          0
[1711774.613] (II) intel(G0): [drm]                 Xorg 12439   0   y    y     0          0
[1711774.613] (II) intel(G0): [drm]                 Xorg 17603   0   n    y     0          0
[1711774.613] (EE) intel(G0): Failed to claim DRM device.
[1711774.613] (II) UnloadModule: "intel"
[1711774.614] (EE) Screen(s) found, but none have a usable configuration.
[1711774.614] (EE)
Fatal server error:
[1711774.614] (EE) no screens found(EE)
[1711774.614] (EE)
Please consult the The X.Org Foundation support

Is there any suggestions?My object is to want to run more desktops  in one machine at the same time,Is there any other solution ?Thanks very mych.

Thank you for reporting!
I often run more than one desktop on more than one tty. In general that is not a problem. (I have an AMD GPU with free radeon driver).
I assume there is an issue with NVIDIA driver.
Most probably it would work with free nouveau driver.
I think it should work with proprietary nvidia driver, too. I don't have an idea yet, but will think about it.

Thanks for your information.Just now ,I reboot the machine,it can work successfully,I do not know the rootcause,may be the under system have problem.Any any, it can work now.Thanks

ok, good! Even on Linux sometimes a reboot solves issues :-)


Install VolSync through OADP

wait for VolSync release in June.

closing since this will be done in OADP


Uploaded the router, made the env function on the route to specify the environments the user wants the route to run in

I made this to make it easier to the developer to use multi-stagging on the router package ... as I do it mostly in every project I make, so instead of doing it like this
if (config('app.env')==='local'||config('app.env')==='testing'|) Route::get('/', fn () => view('welcome'));
I make it like this
Route::get('/', fn () => view('welcome'))->env('local','testing');
and made it also on route groups:
Route::group([     'env'  => [ 'local', 'testing' ], ], function () {     .... });

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


Add cellsnp module to genetic demux

This PR adds two steps to the genetic demux pseudo-workflow (#127). The first is taking the output from STARsolo and mpileup to call genotypes for each cell barcode with cellsnp-lite. The second is to use those genotype calls to assign samples for each cell barcode with vireo.
The first step had some challenges, which I ultimately realized were due to the fact that I was trying to call SNPs for all 10X barcodes. So In this iteration I am using the calls from STARsolo.
Based on the previous STARsolo options, this means that we are using the emptydrops_CR setting to call cells, which should be fine, but we might want to adjust later. We could potentially use a low threshold to include more cells in that set, but we would have to get quite lucky for a low count cell to have sufficient SNPs to identify the sample of origin, so that might not be necessary.
As it stands, there were ~13,000 cells identified in the sample that I looked at, and cellsnp/vireo assigned 7,751 (58%) of them as single cells with assigned samples. (201 were assigned as doublets). There is certainly the chance that there would be some changes there with different thresholds, but I have not explored that yet (I seem to recall that the "standard" emptydrops threshold had many more cells, but I would have to look at that)
A few other notable points:

The input channels here are "simulated" based on previous runs. I expect these to change a bit as integration happens. Since I was not expecting to use the STARsolo expression calls, I had separated those into a different channel, but I might decide to fold those back in for simplicity, or to export just the cell barcode list... That might come with a decision about how to most effectively pick the cell barcodes. This will require looking a bit more at the output: if we are simply unable to call the low end expression, then we may leave it as is, or even get more conservative.

There was no vireo container that I could find, but the installation was pretty simple and very quick (seconds) so I decided to just use a miniconda container for now, rather than creating a separate docker container. For full reproducibility, it might make sense to specify all version numbers for dependencies, but I didn't do that yet. Here I was really just making sure that everything worked.

Next steps
Following this PR, I plan to go in two directions: One is to look more closely at the results as they stand to see how they might compare to previous demultiplexing with Seurat (since that made more calls), and generally look at the questions of which samples are getting called vs. not having enough information. I also plan integrate all steps into a single workflow, where we can start with a run or library id, find the relevant bulk samples,  then do all mapping and genotyping to calling cells from start to finish. There may need to be a bit more planning on what we want the outputs to look like, and which options to use, but I think we now have all the components we need.

In your PR you mentioned that you are using emptydrops_CR call cells and that you are getting ~13,000 cells that are identified in the sample and then cellsnp/vireo is assigning 7,751 of them. I definitely remember you identifying upwards of 50,000 cells using Alevin-fry + filtering with empty Drops or am I interpreting something incorrectly here? I'm just curious as to why this may be giving such drastic differences in results just with identifying the cells.

Yeah, I'm not sure! It could be a difference since these are nuclei, and default emptydrops might not be performing as well, and/or an edge case where there is really a large difference between emptydrops and emptydrops_CR. Or it could be a more general divergence between alevin-fry and starsolo. It is something I may look into a bit more as part of  #155.