How would look like a prisma-mapper.base.ts ?

Thanks a lot for this repo !
I would like to know how it would be possible to use a mapper with Prisma (like orm-mapper.base.ts).
As far as I understand, it sounds that it's not meant for creating model inside a class, but only inside a schema.prisma file
Thanks for any help !

Prisma generates typescript types/interfaces for you: https://www.prisma.io/docs/concepts/components/prisma-client/advanced-type-safety
In a mapper you will just need to map your domain entity to match that type so you can save it into a db

@Sairyss is there any chance you can provide an example of repository  for using prisma typescript types/interfaces with mapper ? (for both methods toDomainEntity and toOrmEntity)
I'm totally stuck on the implementation of the classes

I don't use Prisma, but according to their docs it generates TS types based on your schemas and exports them from @prisma/client/index.d.ts https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#type-definitions.
The mapper would look something like this:
// user type exported from prisma, not sure if the "from" is correct but it should be somewhere in your project
import { User as PrismaUser } from "@prisma/client";

export class UserOrmMapper extends OrmMapper<UserEntity, PrismaUser> {
  protected toOrmProps(entity: UserEntity): PrismaUser {
    const props = entity.getPropsCopy();

    const prismaUser: PrismaUser = {
      email: props.email.value,
      role: props.role,
    };
    return prismaUser;
  }

  protected toDomainProps(prismaUser: PrismaUser): EntityProps<UserProps> {
    const id = new UUID(prismaUser.id);
    const props: UserProps = {
      email: new Email(prismaUser.email),
      role: prismaUser.role,
    };
    return { id, props };
  }
}

Repository can look something like this:
export class UserRepository {
  protected constructor(
    protected readonly mapper: OrmMapper<UserEntity, PrismaUser>,
  ) {}

   private readonly prisma = new PrismaClient();

    async save(entity: UserEntity): Promise<UserEntity> {
        entity.validate(); // Protecting invariant before saving
        const ormEntity = this.mapper.toOrmEntity(entity);
        const user = await this.prisma.user.create({ data: ormEntity })

        return this.mapper.toDomainEntity(user);
  }
}

You might need to modify base classes slightly to support prisma instead of typeorm, but the general principles are the same

Thanks @Sairyss I'm gonna try this :)

Everything  working like a charm, thanks @Sairyss !


Thank you ❤

Hi there 👋
I just wanted to let you know that this nuget has solved a giant headache for me, adding Giscus to Blazor Server has been rough, until I was made aware of this nuget 😅
Thank you!

Glad to hear that.
I'm currently studying in university, preparing for postgraduate entrance exam, so I may not be able to update the code frequently.

Fair enough 👍 I'll gladly help out if needed.


THORN-2165 Fix topology-openshift

Motivation
topology-openshift fraction has some API discrepancy between third party libraries (okhttp and okhttp-ws) due to an upgrade in okhttp, causing this fraction to not work.
Modifications
As okhttp-ws doesn't have a newer version, downgrade okhttp so they are both compatible.
Result
topology-openshift fraction works again.

[X] Have you followed the guidelines in our Contributing document?
[X] [v2] Have you created a JIRA and used it in the commit message?
[ ] [v4] Have you created a GitHub Issue and used it in the commit message?
[X] Have you checked to ensure there aren't other open Pull Requests for the same issue?
[ ] Have you built the project locally prior to submission with mvn clean install?

@Ladicek forgot to say I pushed suggestions this morning

Windows failures are unrelated (MP Config and MP FT TCKs).


Rubocop 1.16.1 fails with error for Layout/HashAlignment cop

Starting with robocop 1.16.1, our CI fails with the error described below. Please see the below link for a detailed trace.

Actual behavior
An error occurred while Layout/HashAlignment cop was inspecting /home/runner/work/foreman_puppet/foreman_puppet/app/controllers/concerns/foreman_puppet/extensions/api_hostgroups_controller.rb:11:163. undefined method 'loc' for nil:NilClass
Steps to reproduce the problem
See here:
https://github.com/ATIX-AG/foreman_puppet/runs/2784078280?check_suite_focus=true
RuboCop version
1.16.1 (using Parser <IP_ADDRESS>, rubocop-ast 1.7.0, running on ruby 2.7.3 x86_64-linux)
  - rubocop-minitest 0.10.3
  - rubocop-performance 1.8.1
  - rubocop-rails 2.8.1

I see that this issue is pinned. I also see that it is closed. Should there be a new release so that users can get this fix?
Thanks!

There is a fix in master (you could install rubocop from master for now if necessary, it should be stable), but we are planning on another release likely early this week.

RuboCop 1.17 is out. Thank you for waiting!


WIP: Feature, enable source compressed images support [bzip2, gzip, xz, tar.bz2, tar.gz, tar.xz]

Description:
Alow to use compressed format (for the format supported see title) when user specify the  source  of image. HTTP or Local are supported ( see example).
Once the image (raw or qcow2) are decompressed, the provider will autodetect the format
fix #390
Local (gzip example)
resource "libvirt_volume" "geeko-qcow2" {
  name = "opensuse-gzipped"
  source = "/tmp/openSUSE-Tumbleweed.qcow2.gzip"
}

HTTP/web-server (bzip2 example)
resource "libvirt_volume" "kubic-image" {
  name = "kubic-image"
  source = "https://mygeeko.server/openSUSE-Tumbleweed-Kubic.x86_64-15.0-kubeadm-cri-o-hardware-x86_64.qcow2.bz2"
}

TODO:

[x]  finish implementation

[x]  add tests

[ ]  add doc

[ ] add via glide missing xz pkg dep used

some results
2018-11-10T01:33:58.136+0100 [DEBUG] plugin.terraform-provider-libvirt: 2018/11/10 01:33:58 [INFO] Volume ID: /var/lib/libvirt/images/bzip2-raw-tar
2018-11-10T01:33:58.136+0100 [DEBUG] plugin.terraform-provider-libvirt: 2018/11/10 01:33:58 DEBUG: first bytes of FILE: [66 90]
2018-11-10T01:33:58.136+0100 [DEBUG] plugin.terraform-provider-libvirt: 2018/11/10 01:33:58 bzip2 source file

Closing I thin this will open to much worms and I don't have much time for opening this kind of Pandora.  We will still have it

So this is not integrated in 0.6? What are the worms in it? :)

nope this isn't integrated to 0.6 :) The "worms" are lot of work and tricky situation when compressing/decompressing formats and other stuff that I forget back in the time.
Imho we could perhaps try to add a gzip and tar.zip format as first feature, and using perhaps some code here with adaption. etc.


[Question] Is it expected that LH & storage still keeps volume config even volume backup is deleted on Harvester?

Question
After delete the (only) VM backup on Harvester, we found that

Longhorn still keep the backing image record
Storage still keep volume.cfg

Is this behavior by design?
Environment

Harvester

Version: v1.2.0
Profile: QEMU/KVM, single node (8C/16G/250G)
ui-source: Auto

Reproduce Steps

Fresh install Harvester and empty NFS storage

Setup backup-target

![image](https://github.com/harvester/harvester/assets/2773781/99df45d1-cb6f-4fc3-96f4-348d833adfea)

Create VM & Take backup

Delete VM Backup from Harvester

blocks are deleted
metadata still keep on LH and storage

Note

Files can be complete cleanup via delete backup record from Longhorn

Before

After

TL;DR: Yes, it's expected by LH's implementation.
There are two key CR for volume backup: Backup and BackupVolume

Backup represents an LH snapshot backup (Listed in LH GUI Backup -> specific volume)
BackupVolume represents a set containing all backups for a specific LH volume (Listed in LH GUI Backup)

As a volume backup is triggered, the backupstore data usage increases in the match data path (E.q. for NFS backup is <NFS path>/backupstore/volumes/xx/xx/<volume>/). In contrast, as a backup is deleted, the backupstore data usage decreases in the match data path.
Once all backups are gone for a specific volume, there is only a volume.cfg left in the backupstore. And volume.cfg's size is small (< 1MB).
Maybe there is room to improve, for example, once there is no backup for a certain volume, delete all the data on backupstore (i.e. delete CR BackupVolume).
However, considering the size of the left data is not great, IMHO, it should not have a big impact on users so far. Thanks.

Thanks for checking, will discuss about.


playnite: Update 9.12 -> 9.14

The download URL for 9.12 is no longer works; is there a reason we're not downloading the GitHub releases?

[x] I have read the Contributing Guide.

I have switched it back to Github release. (https://github.com/ScoopInstaller/Extras/commit/7eed9325f8467a525616c96e6d1d4d303e80ac1d)
Looks like they removed Github release at some point (see #3248). That is why we are not using the Github one.


feat: add other transfer methods to client

Added some missing transfer methods to QbittorrentClient from WebUI API.

Get alternative speed limits state
Toggle alternative speed limits
Get global download limit
Set global download limit
Get global upload limit
Set global upload limit

@DrewCarlson do the changes get published automatically on SNAPSHOT / maven central?

Everything in the main branch is published as a snapshot.  I'll cut a new release later today.


Constraint variants parametrised

Proposed solution to #22.
Would you agree with this PR? Do you have other ideas to solve the same issue? This is mostly a fully fleshed-out version of what I presented in #22, but with enumerations instead of Booleans for legibility. Documentation is not yet up to date.
@Azzaare @odow

I don't have a better suggestion for now :(

I don't have better idea either.
I guess I will have to interface it for some solvers and see if other ideas come.
Thanks!

Shall I merge it (once the tests pass, that is), tag a new version, and we'll see later?

CI passed :v:
I think you merge indeed. Maybe tag breaking changes version?

That's why I tagged 0.3.2 just before :)!


Unexpected typehint behaviour

What steps will reproduce the problem?

Create a function with type hints containing a string (for example, I had trouble with x: "Altitude (m)")
def myfunc(foo: "bar (baz)"):
return foo * 2
Typing into the spyder console 'myfunc(' will cause a pop-up window to appear to help the user decipher what needs to be typed. The pop-up window will say
myfunc(foo: 'bar (baz)
Where actually, I think it should say
myfunc(foo: 'bar (baz)')
I think this is because the spyder console sees the close bracket in the variable's typehint, and so it decides it is now the time to go to the next line and continue reporting the function's docstring.

Hi @yaseen157 thank you for the feedack! I was able to reproduce this 👍🏼

We will be checking a fix for this in a future release


'Form' is not export from 'rimble-ui'

Describe the bug
For whatever reason, I'm getting this error when trying to use the Form elements. I can use Button, just fine for example.
Error I am getting:
Attempted import error: 'Form' is not exported from 'rimble-ui'.
I
To Reproduce
Steps to reproduce the behavior:
In my case:
npm install --save rimble-ui styled-components
follow example here:
https://consensys.github.io/rimble-ui/?path=/story/components-form-form--documentation
Expected behavior
Expected it to import, rather surprised it doesn't.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):
Firefox brower. 66.0.3 (64-bit)
OSX 10.14.4
Additional context
Add any other context about the problem here.

@crazyrabbitLTC can you send me which version of rimble-ui you're using in your package.json?

Should be resolve with this PR:
https://github.com/zeppelinos/zepkit/pull/12


Gerätekommunikation gestört / Device communication disrupted

Describe the issue you are experiencing
After a  6 hours the connection to 2 HmIP-SAM sensors is lost. This is shown in service messages. All  my other 20 devices are working without any issues. Recently I've installed at a different Raspberry HomeAssistant and have integrated RaspberryMatic still runinng at RP3 using Homematic(IP) Local.
The sensors have new batteries and have been placed for test purpose close to the raspberry-Pi3.
boot.log
messages.txt
hmserver.txt.log
Describe the behavior you expected
Device communication without errors.
Steps to reproduce the issue
1.Take out batteries from HmIP-SAM
2.Put batteries back in
3.Wait for 6 hours
...
What is the version this bug report is based on?
<IP_ADDRESS>20831
Which base platform are you running?
rpi3 (RaspberryPi3)
Which HomeMatic/homematicIP radio module are you using?
RPI-RF-MOD
Anything in the logs that might be useful for us?
Logs are attached above.

Additional information
No response

Same issue. But all of my actors show "Gerätekommunikation gestört".
Direkt-Verknüfpfung works.


Test the Pythia packages on more platforms

I'm bothered that it wasn't caught by the tests in the compat repo at https://github.com/chevah/compat/pull/700. What shall we do about it?

Maybe Oracle Linux 8 has that library ... I think that we are ok.

These are not actually "tests", but rather builds.

True. Makes sense.
well... what we can do is create separate docker test runs as part of GitHub actions.
It will work something like this

After the binary .tar.gz is created for each OS, upload that file as an GitHub Action artifact
After all the build jobs are done, trigger the docker test job
THe docker test job will download the GitHub Action Artifacts for this build and will save them in cache
The docker test job can then run a few smoke tests to make sure we can start Python on other OSes  ... for example run our custom test file

That's all
With GitHub Action Artifacts we can "publish" the pythia .tar.gz files in kind of a temporary location
More info about GitHub Artifacts here  https://github.com/actions/upload-artifact
Originally posted by @adiroiban in https://github.com/chevah/pythia/issues/58#issuecomment-2399885044

Don't think we have to deal with GitHub artefacts, as we already upload a testing package to our "bin" server after a successful build.
However, what would help immensely would be https://github.com/chevah/pythia/issues/47.


It is still not fully translated

Fully translated into Chinese

Hi there, we want to keep Github Issues focused only on bugs so I'm closing this for now.
Please create a discussion in Github Discussions or post in the Superset Slack if you'd like.
You're also welcome to open a PR to add more Chinese translations if you'd like :)

Why is a partial translation not a bug? The new language is definitely a feature request, but a partial translation sounds like a bug, which needs to be defined and fixed as it may, for example, result from uneven update of language files.

@LovelyShiba @ad-m translation issues are twofold:

If a literal string in the application isn't wrapped in _()/__() (Python) or t()/tn() (JavaScript/TypeScript), then this can be seen as a bug, as it means the strings won't be picked up when updating the translation mappings. However, for this to be actionable, the issue needs to list which strings need to be fixed.
Since the application is constantly evolving, new translated strings are also constantly being added/updated. Since this is an open source project, we don't have dedicated resources to ensure all translations are fully up to date all the time. For this reason we warmly encourage community members to contribute updates to the translations whenever possible. However, due to the lack of dedicated translation resources, incomplete translations are not considered bugs.


metadata property names

We have wrappee_version,  wrappee_license, app_version, and license. It might be more consistent to use app_license instead of license.
And can we find a better word for wrappee?

Yeah, I agree on adding app_ prefix. I also don't like the word choice of wrappee. Here's some random words I can think of now (in a random order)

kernel_
origin_
core_
upstream_
bound_

Actually, wrappee is not a word and if it were it would have meant "the thing that wraps" while it is used as "the thing that is wrapped". We did have some discussion on what app means a while ago and while I do not remember the outcome we now consider the entire application with third-party software and the CLAMS wrapper as the app.
In LAPPS we had wrapper as a way to refer to the code we created around Stanford et al, cannot use that here.
I cannot get enthusiastic about any of the five random words. The best I have is tool_ indicating that the app wraps some processing tool.

We remember we had a conversation over the decision that landed on the term app, instead of tool or service. I'd rather avoid re-introducing the term tool (even in a difference context), as we might have old usages of tool from the past when we interchangeably used tool and app (and service), buried in the documentation or app codebases. So I'd like to propose we use something new, for example, processor_ or analyzer_. I think they are more clearly indicating that what's wrapped is not any piece of software, but software that actually doing some data processing or analysis.
And on the app_ prefix, on second thought, now I think we might be better off without them. By not putting a prefix,

I think we can signal a field is a first-class citizen as opposed to a secondary, optional field (wrappee_version or its successor).
and in turn, developers are less likely to be confused between the idea of what's an app and what's a tool/processor/analyzer.

And to that end, my proposal is

app_version -> version
wrappee_version -> as discussion in the previous paragraph
mmif_version stays mmif_version as there'd be little confusion between app and mmif, and also this field is automatically filled, so developers doesn't have to worry too much anyway.

I do not share the worries about old usage of tool, but I can live with analyzer, which is pretty good.
On the prefix...

I think we can signal a field is a first-class citizen as opposed to a secondary, optional field (wrappee_version or its successor).

Having a prefix determine whether something is optional does not sound like a good idea to me (one thing that spring to mind is that mmif_version would now be optional). And I think the current implementation which gives an error when you forget a non-optional property works fine.

and in turn, developers are less likely to be confused between the idea of what's an app and what's a tool/processor/analyzer.

Not sure whether that makes any difference. But the most important part is to get our terms right, and there is more than one good answer there.
Finally, one big reason I do not like the use of license is that license() is a built-in function and the syntax highlighter will make it another color (mine does at least), it is like using if or True as a property.

Finally, one big reason I do not like the use of license is that license() is a built-in function and the syntax highlighter will make it another color (mine does at least), it is like using if or True as a property.

I think this is very valid point. And I agree on the point that what's important is us having terms completely ironed out.
So to summarize;

app_version stays
license -> app_license
wrappee_version -> analyzer_version`
wrappee_license -> analyzer_license
everything else stays the same

Closed via #86.


modify EthAddressInput to take a placeholder

What does this PR do and why?
Rationale: Allows us to set no placeholder in payouts modal
Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the changes.
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] I have tested this PR in all supported browsers.
[ ] I have tested this PR in dark mode and light mode (if applicable).

Current dependencies on/for this PR:

main

PR #2068

PR #2071

PR #2072

PR #2073

PR #2074

PR #2075

PR #2076

PR #2077   👈

This comment was auto-generated by Graphite.

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: TLpS7mRK611WyBbtlMOK

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: 7mQp0aCulfn1WjwNMx70


Chore/ci

Adds a github action that builds on pull-reguest and any push to master.
At least this checks for the project being able to build and is a first step towards continuous anything.

Thank you a lot!


Reset notified on threshold updates & rename to timestamp

Codecov Report

Merging #16 into master will increase coverage by 0.32%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
+ Coverage   91.06%   91.39%   +0.32%
==========================================
  Files          27       27
  Lines         291      302      +11
==========================================
+ Hits          265      276      +11
  Misses         26       26

Impacted Files
Coverage Δ

lib/legacy/feature.ex
100% <100%> (ø)
:arrow_up:

lib/legacy/api/features.ex
100% <100%> (ø)
:arrow_up:

lib/legacy/feature/store.ex
98% <100%> (+0.27%)
:arrow_up:

lib/legacy/feature/tasks.ex
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Making a Web based Piano app.

Develop a Javascript {Piano} app.

Requirements:

Basic HTML, CSS, and JavaScript skills
Example:
Piano like design structure, clickable keys, add different notes to each key, and etc.
Any further notes and sound that can make our web-based piano app more functional or better than existing
Different structures of the instrument can be added with specific notes and sounds to make it more helpful

Bonuses 🎉🎉:

Making functional keys, Adding appropriate sounds to each key, and etc.
App can have this thing.
Developers can also add this to the app: beautiful background, colouring and grading should be exact as piano
It will be great if App has this: Different sounds with different instruments to make up like an online music lab.

Any number of people can work on a single issue,
This issue is open to all.
Project location 👉🏻 PianoApp/USERNAME/
👨🏻💻 Happy Coding 👩🏻💻

@thinkswell I love to contribute to this, Please assign it to me.

@thinkswell I love to contribute to this, Please assign it to me.

The issue is open to all.

I would like to work on it

Hey @thinkswell I have started working on this.


Using Object::Pad and perlcritic

When using Object::Pad, for example this program:

Notice the blue lines under lines 1 and 7, when I hover the mouse over those lines I get

and

Thanks for the report. These are great issues to solve. In general, the issue is that PPI does not support modern keyword-based extensions like Object::Pad. There is movement in that repo (in https://github.com/Perl-Critic/PPI/issues/273 ), but that is more about signatures and try/catch, so it might be a while before full support for Object::Pad arrives. More specifically, you'll see these errors even if you directly call perlcritic and remove the Navigator from the mix entirely
For the first issue (Code not contained in explicit package), it may help to follow the Object::Pad file layout suggestions shown here, where they also specify a package in addition to the class: https://metacpan.org/pod/Object::Pad#File-Layout . I believe this recommendation is primarily for Perl::Critic. However, I'm also in support of trying to work around these issues.
For example, using an async sub or a method previously resulted in similar issues to the Module does not end with "1". problem. Currently, these are solved by pre-processing the file in https://github.com/bscan/PerlNavigator/blob/main/server/src/perl/criticWrapper.pl . The same script also pre-processes for UTF-8 support (PPI does not support UTF-8). It would be reasonable to add some additional pre-processing to address both of the issues you've mentioned here.
Pull requests more than welcome, or I'll otherwise eventually get around to it. Fixing this before Perl 5.38 would be great, since that's when use feature 'class' will be part of core, and I assume it suffers from the same problems.

These are great issues to solve.

@bscan  Thanks for the positive reply, I will take a look.

Sorry, accidentally closed.

it may help to follow the Object::Pad file layout suggestions shown here .... https://metacpan.org/pod/Object::Pad#File-Layout

Good idea. I tried this: first removing use strict; use warnings; and inserting a package Foo; declaration

this still gives critique RequireExplicitPackage, but exchanging the order of the two first two lines seems to work:

Line 5 ... Critic: Module does not end with "1;"  (Modules::RequireEndWithOne)

This can be fixed by placing a semi colon after the ADJUST block:

Added a question on stackoverflow.com to get some more feedback: https://stackoverflow.com/q/75760912/2173773

Awesome, thanks! I'm curious what the response will be.
There was some similar discussion here: https://github.com/Ovid/Cor/discussions/95 , but this was more related to the design of the Object-Oriented system than a precise style recommendation for dealing with Perl::Critic.
I also looked into the Modules::RequireEndWithOne issue a bit. The key from the Object::Pad documentation is:

Note that an ADJUST block is a named phaser block and not a method;

I suspect PPI is parsing this as calling a sub named ADJUST that takes a codeblock as a parameter, which is a statement that requires a semicolon.
However, PPI considers a phasers as an "implied end", which do not need a semicolon.
https://github.com/Perl-Critic/PPI/blob/93d6cb20accb627bb3d36cfce65d54168a091e71/lib/PPI/Lexer.pm#L741
Seems like there are two possible fixes for this problem. Either we map the Object::Pad phasers (BUILD and ADJUST) to the types of phasers that PPI recognizes (e.g. END), or remove the name entirely since bare blocks also parse correctly.
Removing entirely might be better to ensure the word END doesn't sneak into error messages and confuse people.
Note that the following form is also allowed:
ADJUST :params ( :$var1, :$var2, ... ) {

which does appear to parse correctly in PPI when adjusted to:
( :$var1, :$var2, ... ) {

Hi @hakonhagland , thanks again for pushing this forward. I spent some more time looking at this. Given the conflicting information about proper file layout, and the StackOverflow answers, I think it best if the Navigator tolerated all the different forms, as they'll all be common and not really "wrong". Trying to organize my thoughts and document reasons for changes, I put together a checklist of various changes I think are needed. I'm happy to do them, or I'd gladly accept pull requests if you're looking at any of them already.

[ ]  Get Modules::RequireExplicitPackage to allow Object::Pad to start a file. Specifically, https://github.com/bscan/PerlNavigator/blob/main/server/src/perl/defaultCriticProfile should have the following lines added to support use Object::Pad and use feature 'class'

[Modules::RequireExplicitPackage]
allow_import_of = Object::Pad feature

[ ]  While we're at it, might as well add this too, in case someone has this policy installed (not installed by default). There might be other policies worth thinking about as well, but this is a good start.

[Subroutines::ProhibitCallsToUndeclaredSubs]
exempt_subs = Object::Pad::class Object::Pad::field Object::Pad::role Object::Pad::has

[ ]  I also noticed that syntax highlighting is incorrect when the use Object::Pad statement occurs prior to the package declaration. This can be seen in your images as well where class and ADJUST are only highlighted in some examples. I believe simply removing the line "end": "(\\b)(?=^\\s*package\\s*[\\w:]+\\s*;)",  from perl-scopes.json will cause the Object::Pad highlighting scope to extend until the end of the file instead of resetting with each new package.

[ ]  criticWrapper.pl needs to be able to detect usage of Object::Pad, so we can then pre-process files only when it's in use. This regex can probably be re-used: https://github.com/bscan/PerlNavigator/blob/31b6d7b4b110821ea7550abb0dde53ebe94e5cd3/syntaxes/perl-scopes.json#L61

[ ]  Preprocess file in criticWrapper.pl to remove phaser titles (ADJUST, ADJUST :params, ADJUSTPARAMS, and BUILD) when Object::Pad or feature class are in use.

[ ]  Preprocess file in criticWrapper.pl to modify class Foo -> package Foo. I think this will help for RequireExplicitPackage and RequireFilenameMatchesPackage. If someone only uses "class" and not "package", it's still a valid usage and I think perlcritic should accept it. class also creates a package with the same name, so I believe this transformation is valid.

Thanks!

I put together a checklist of various changes I think are needed.

@bscan Looks great to me!

I put together a checklist of various changes I think are needed. I'm happy to do them, or I'd gladly accept pull requests if you're looking at any of them already.

Great! Please go ahead, sorry I have a busy schedule so I will probably be very slow if I should do any of these :) But let me know if you want me to have look at any of the items on your list or some other issue with PerlNavigator within a longer time frame (not so urgent issues).

The updates for Perl::Critic and syntax highlighting should are now available in the Marketplace (and on NPM) in version v0.5.5. Normally will automatically update to the latest version, but may require reloading vscode. I also added some code to allow for lexical methods like method $foo.
@hakonhagland, thanks again for your help on this one. I think this helps substantially toward the goal of making vscode with the Perl Navigator the best development environment for modern Perl.


[MRT Reference App] @W-13153758 Add /cache endpoint

Description
Reopening https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1219 to trigger CI

Types of Changes

[ ] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Documentation update
[ ] Breaking change (could cause existing functionality to not work as expected)
[ ] Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

Removing a public function or component or prop
Adding a required argument to a function
Changing the data type of a function parameter or return value
Adding a new peer dependency to package.json

Changes

(change1)

How to Test-Drive This PR

(step1)

Checklists

General

[ ] Changes are covered by test cases
[ ] CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance
You must check off all items in one of the follow two lists:

[ ] There are no changes to UI

or...

[ ] Changes were tested with a Screen Reader (iOS VoiceOver or Android Talkback) and had no issues
[ ] Changes comply with WCAG 2.0 guidelines levels A and AA
[ ] Changes to common UI patterns and interactions comply with WAI-ARIA best practices

Localization

[ ] Changes include a UI text update in the Retail React App (which requires translation)

Superseded by https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1237


The browser does not check the OS DNS cache, router's DNS cache, or ISP's dns cache.

To the best of my understanding the browser has it's own DNS cache. When this cache fails, it simply asks the OS to resolve the domain. The OS resolver has it's own cache which it will check. If it fails this, it resorts to asking the OS configured DNS servers. The OS configured DNS servers will typically be configured by DHCP from the router where the DNS servers are likely to be the ISP's DNS servers configured by DHCP from the internet gateway to the router. In the event the router has it's own DNS servers, it may have it's own cache otherwise you should be directed straight to your ISP's DNS servers most typically as soon as the OS cache was found to be empty.
This is probably too verbose for an expected response but "it checks the router cache" followed by "it checks the ISP cache" is so ambiguous you may end up with interviewers who interpret the correct answer as wrong if they themselves are not well-versed.

Thanks a lot, I updated answer for this.


Change top.coh() and cohort catch outputs to use MCMC medians

All of these values still use MLE outputs!!
All the text in the doc that says thing like "The largest cohort was the 2020 with 38%, followed by the 2014 cohort with 22%..." etc are not MCMC-based. I fixed this already in the new branch I made to switch to a package (package-dev). One of the benefits of going through all the code ad nauseam is we get to notice little things like this. The 2020 cohort is 33% when using the medians, not 38% (MLE) as we have reported this year.
I'm not going to change the JMC presentation for this year.

This whole slide will change:

Thanks for finding this Chris.
On Mon, Feb 27, 2023 at 10:39 AM Chris Grandin @.***>
wrote:

This whole slide will change:
[image: image]
https://user-images.githubusercontent.com/4551051/221653372-b74f77c9-fb45-4a4e-88cb-72209a81a490.png
—
Reply to this email directly, view it on GitHub
https://github.com/pacific-hake/hake-assessment/issues/1055#issuecomment-1446858969,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB4T76T45XXEHSPZ6GFDDMTWZTYD3ANCNFSM6AAAAAAVJYJG4Y
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Aaron Berger, PhD
https://www.fisheries.noaa.gov/contact/aaron-m-berger-phd (he/him)
Fisheries Resource and Monitoring Division
Northwest Fisheries Science Center
National Marine Fisheries Service
National Oceanic and Atmospheric Administration
2032 SE OSU Drive
Newport, OR 97365 USA
@.*** @.**>541.275.1739 (google voice)
541.231.1417 (cell)

Most of this done in the major package upgrade (commit 7e3d56) but the
plot is still wrong. Will do this year (2024)


How to hide the plaintext password in the RTSP uri during packet capture?

When using Wireshark to capture and camera RTSP negotiation messages...

Add streams to config

I did it this way, but if the rtsp uri in the stream domain of the go2rtc.yaml file does not have a username and password, the actual situation fails with an error message indicating that the username and password were not provided

So provide them in the config file

I don't quite understand what you mean.. I have provided the user and password in the stream uri of the configuration file, but the current issue is that the password during RTSP negotiation is transmitted in plaintext on the network. I want to hide the plaintext password on the network.. So I'm a bit confused about what you're saying, and there's no explanation in the github readme file, or is it that Go2RTC currently doesn't support it

RTSP is plaintext protocol

But there is another authentication process (two DESCRIBE requests), instead of directly playing a uri with a user and password. Would you consider changing the format of the request uri, such as adding a configuration item in the configuration file stream, to solve this problem?

I really don't understand what you talking about

sry sry sry, my mistake ,there's some things wrong...😱 let me make sure...


Update readme for xcode install

I ran into this issue when installing this on a fresh laptop

Apologies. We forked this.


Uptime refactor

My initial solution to moving uptime functionality from a dependency to the core program. It is not as pretty as i would hope it would be, this PR is open to any suggestions.

Ok, so I'll have to say you didn't actually refactor the functionality into the core. You're just loading the plugin manually.
My suggestions would be to:

move the getUptime into the main script, but this may require to move basically the whole plugin code;
or, and I guess this is easier and more "clean",  just move the startTime to the main script to store its "boot time", this way the plugin will have access to this timestamp and be able to do the calculations the way it needs

I initially didn't want to move whole uptime code to AwesomeBot.js because of all the constants it introduces to global namespace, so should i add an if condition to AwesomeBot.onMessage() for uptime functionality?

Maybe it's better to create a "utils" file. I'd create a directory ./lib and move this time diff function there. Also, create a bootTime (or similar) on the bot and initialize it on the constructor.
This way the uptime plugin and your new plugin can both just call this function.
What do you think?

Sounds reasonable, will follow it

Ok, it took me too much time to review this, so I went and pushed what I intended with my previous comments. See f6fae62 and 0abbf37.


Handle new libnacl exceptions

See https://github.com/saltstack/libnacl/pull/91
This PR also adds some test to make sure we'd at least detect changes.

Codecov Report

Merging #34 into master will not change coverage.
The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master      #34   +/-   ##
=======================================
  Coverage   60.19%   60.19%
=======================================
  Files           9        9
  Lines        1334     1334
  Branches      129      129
=======================================
  Hits          803      803
  Misses        484      484
  Partials       47       47

Impacted Files
Coverage Δ

threema/gateway/e2e.py
78.83% <66.66%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


stats: when hot-restart is disabled, each stat still consumes maxNameLength() bytes for the name.

Description:

When storing stats in shared memory for hot-restart, we preallocate max_stats * maxNameLength for string storage. But this means you have to make hard up-front decisions about how much memory you can spend.  However if we disable hot-restart, there's no compelling reason to pad each stat, so you could just set maxNameLength pretty high. If that were fixed, we wouldn't have to tune maxNameLength so carefully.

@ambuc may wind up looking at this as he was the last one to dive into the not-hot-restart case.

More thoughts on this in light of the #3506 which forced me to look at the stats code again and realize this problem:
I think a solution to this problem that will improve the maintainability of the codebase is to remove the following methods & data from Stats::RawStatsData

configure(options)
configureForTestsOnly(options)
maxNameLength()
maxObjNameLength()
nameSize()
static initializeAndGetMutableMaxObjNameLength()
and replace them all with:
static calculateRequiredSize(size_t name_length)

In the context of a hot-restart allocation, the calculateRequiredSize will be called with option_->maxObjNameLength().  In the case of a non-hot-restart allocation, it will be called with actual_name.size().  Then you can remove a whole bunch of hacks in the test dealing with the static underneath initializeAndGetMutableMaxObjNameLength.

@jmarantz big +1 on killing the statics.


Support text-multilingual-embedding-002 embedding model

Description of the feature request:
https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api lists text-multilingual-embedding-002, however https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding does not. I can successfully instantiate a GenerativeModel, but when I call embedContent like I do with text-embedding-004 it errors out with:
models/text-multilingual-embedding-002 is not found for API version v1beta, or is not supported for embedContent. Call ListModels to see the list of available models and their supported methods.
What problem are you trying to solve with this feature?
I'd like an application to support multiple languages. I inspected embeddings of equivalent sentences on Vertex AI with the text-multilingual-embedding-002 and they were close. Unfortunately text-embedding-004 doesn't seem to be good with the language I tested.
Any other information you'd like to share?
My code:
    final model = GenerativeModel(
      model: 'text-multilingual-embedding-002',
      apiKey: preferences.geminiApiKey,
    );
    final content = Content.text(prompt);
    final embeddingResult = await model.embedContent(content);

Unfortunately, text-multilingual-embedding-002 is only available in VertexAI, not via the Google AI API (which is what this SDK is for). You can use firebase_vertexai instead.

Unfortunately, text-multilingual-embedding-002 is only available in VertexAI, not via the Google AI API (which is what this SDK is for). You can use firebase_vertexai package instead.

Thanks, I'll get to the bottom of this. Interestingly with Firebase Vertex AI I could not use text-multilingual-embedding-002 and even text-embedding-004. It depends on generative-ai-dart package and the object hierarchy is similar (hence I created https://imgflip.com/i/92caxj). https://github.com/firebase/flutterfire/issues/13269

@davidmigloz What's the best repository or issue tracker to advocate for inclusion of the multilingual embedding model into Google AI API?

(hence I created https://imgflip.com/i/92caxj)

🤣🤣 Yeah, both APIs are very similar (but not identical), so they reuse the client.

@davidmigloz What's the best repository or issue tracker to advocate for inclusion of the multilingual embedding model into Google AI API?

On the docs page, there's a feedback button in the top right corner, I normally use that channel. Otherwise, there's a gemini-api channel on the Google Developer Community Discord, which is monitored by people on the team. Last but not least, you can always ping Logan on X, he's pretty responsive.


feat(router): Block list spm customer for payment link flow

Type of Change

[ ] Bugfix
[x] New feature
[ ] Enhancement
[ ] Refactoring
[ ] Dependency updates
[ ] Documentation
[ ] CI/CD

Description

Block list spm customer for payment link flow
Additional Changes

[ ] This PR modifies the API contract
[ ] This PR modifies the database schema
[ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

[x] I formatted the code cargo +nightly fmt --all
[x] I addressed lints thrown by cargo clippy
[x] I reviewed the submitted code
[ ] I added unit tests for my changes where possible
[ ] I added a CHANGELOG entry if applicable

@sahkal Are we sure we want to send a 403 as opposed to some empty response? Cuz it may interrupt the SDK flow even tho nothing is technically wrong here.

@vspecky I think the correct way of interpreting of what we are trying to achieve implies to forbidden.

@sahkal Okay, can you confirm once with SDK folks if they are ready to handle 403s from this API as intended?


Save a few bytes by shortening willRender

From my comment in #317.

Ahaha.  This was already changed, my local branch was just out of date.  Good work!


2d nodes should have z property

most other engines i have tried have this. They draw like godot, based on their position on the tree... but have separate drawing trees for every value of z... everything goes into the z=0 by default.
This allows to set what is on top of what easily. The workaround is use get_index and move_child... and raise... and it feels hackish at best
not sure how easy would be to implement because right now you only have to travel the scene tree once to draw, but sure would be nice for game developers (maybe automatically reorder the node tree based on z when something is added to it?)

Also desirable: the ability to vary z-order across a tilemap, so as to allow interleaved rendering of both tilemap-with-tilemap and tilemap-with-sprites. Necessary for proper isometric (and other axonometric) rendering.

2D nodes now have z property.

Why is Z a limited range integer?
What if I want to independently Z order 1025 sprites?
Wouldn't full-range floats be better than this apparently arbitrary limitation?

nope performance issues, and the fact the main sorting is done tree-wise.
Range could be increased though (1024 was just an idea, but my be little)
On Sat, Jan 10, 2015 at 10:15 PM, surt<EMAIL_ADDRESS>wrote:

Why is Z a limited range integer?
What if I want to independently Z order 1025 sprites?
Wouldn't full-range floats be better than this apparently arbitrary
limitation?
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/issues/405#issuecomment-69479453.

you have other tools to sort, you can use y-sort, tree-sort, remote
transform, etc. This is mostly for consistency when splitting into many
scenes.
On Sat, Jan 10, 2015 at 10:19 PM, Juan Linietsky<EMAIL_ADDRESS>wrote:

nope performance issues, and the fact the main sorting is done tree-wise.
Range could be increased though (1024 was just an idea, but my be little)
On Sat, Jan 10, 2015 at 10:15 PM, surt<EMAIL_ADDRESS>wrote:

Why is Z a limited range integer?
What if I want to independently Z order 1025 sprites?
Wouldn't full-range floats be better than this apparently arbitrary
limitation?
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/issues/405#issuecomment-69479453.

What's the status on this issue?

This issue can be closed. A z value has been added by reduz.

Do Controls have a z value, though? I can't find it...

@Zireael07 no, the Z property exists only for Node2D and its descendants.

you can put a GUI under a Node2D and change the Z of that node, and the GUI
will change Z too
On Tue, May 30, 2017 at 9:06 PM, George Marques<EMAIL_ADDRESS>wrote:

@Zireael07 https://github.com/zireael07 no, the Z property exists only
for Node2D and its descendants.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/405#issuecomment-305043681,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2xFEMoVPNavsvqfXrTgwL6RG3jE6ks5r_K8bgaJpZM4B54rB
.

there is no move_child in 2D nodes

http://docs.godotengine.org/en/latest/classes/class_node.html#class-node-move-child


Port to Mbed OS6

I would like to port the lorawan fuota code to mbed os6 version. How am I supposed to do that?

Can I get an update on this issue @janjongboom

@kvkc97 I have left Arm two years ago, and no-one in Arm has taken over the LoRaWAN stack. So I don't think this'll happen anytime soon.

@janjongboom. I realize that you left ARM/MBED and are sooo past the MBED LoraWAN stack. However, your Lora FUOTA example is the only one around for MBED. It's  well written and well commented, so it should be usable in a MBED 6 context too (with some minor changes) - I need this also... but one thing elludes me when going through your code.
In your main.cpp you use the 'get_session/set_session' call when changing back and forth between CLASS-A/C to dynamically update (and restore) the current-session keys with the multicast-keys.
I get that 'get_session/set_session' methods are patches to the original MBED LoRaWAN implementation... but I dont understand why you need to do this.
Why can the obtained multistcast-keys and address not be stored in the multicast-linked-list (multicast_params_t *multicast_channels;) for which there already exists interface-methods?
multicast_channel_link (multicast_params_t *channel_param)   // For adding a set of multicast keys & address
multicast_channel_unlink (multicast_params_t *channel_param)   // For removing

Changing the session parameters directly - as you do - would that also not prevent you from receiving/sending unicasts while in Class-C mode?  Maybe it's obvious and I'm missing some point here (wouldn't be the first time), I dont't know. Anyway, I comment on this in an off-chance that you remember you old work and have to time to comment back - if not, no offence will be taken :-)


Remove default assertion for dash shell

Proposed changes

Unreleased project version (optional)

Related issues (optional)

Deploy preview for docsdocker ready!
Built with commit 24019d9d85416f45bd1014e098b33a0a8985a1a3
https://deploy-preview-7770--docsdocker.netlify.com


Recursive Types Cannot be Defined

I might have a Typescript type like this:
type T = string | T[]

But if I try to define this type in valita I cannot pass the identifier to its own instantiator:
const T = v.union(v.string(), v.array(T)); // error: identifier used before it is defined

I mulled over this a bit, but I can't think of a smart way to implement it that doesn't involve somehow the union after it is instantiated, and then having to trick typescript into giving it a different type...

I think chaining off of unknown should let you do this.
function recursive<R>(getSchema: () => Type<R>) {
  return unknown().chain((value) => {
    const schema = getSchema();
    try {
      return ok(schema.parse(value));
    } catch (error) {
      return err((error as ValitaError).message);
    }
  });
}

type T = string | T[];
const T: Type<T> = union(string(), array(recursive(() => T)));

That... really blew my mind

Having used this a bit, I propose the following:
Add a lazy() type constructor to valita, which behaves like Bubz43's recursive function. Giving us idiomatic recursion and references between types that would otherwise have issues with order of instantiation:
const A = object({
    a: string(),
    b: lazy(() => B).optional(),
});

const B = object({
    b: string(),
    a: lazy(() => A).optional(),
});

Good discussion! Yes, recursive types are indeed something that we ourselves have needed for some time now. So I added lazy to the library, it works quite similarly to @Bubz43's suggestion with some additional guardrails:
type T = string | T[];
const t: v.Type<T> = v.lazy(() => v.union(v.string(), v.array(t)));

The main problem here was trying to solve was the following scenario:
type T = string | T[];
const t: v.Type<T> = v.lazy(() => v.union(v.string(), v.array(t)).optional());

// Uh oh, t's optionality is erased:
const o = v.object({ t });
type X = v.Infer<typeof o>; // { t: T }, should be { t?: T }

So I took some drastic measures and restricted where .optional() types can be used! 🙂 For example, you now can't return an optional from lazy, so this is a type error:
const t: v.Type<T> = v.lazy(() => v.union(v.string(), v.array(t)).optional());

As is this:
const t: v.Type<T> = v.lazy(() => v.union(v.string(), v.array(t))).optional();

The most common usecase for .optional() is still supported:
type T = string | T[];
const t: v.Type<T> = v.lazy(() => v.union(v.string(), v.array(t)));

const o = t.object({
  x: t.optional()
});

I believe this a pretty good tradeoff between expressivity and providing safe guardrails against accidents. This is a backwards incompatible change, for which I apologize. Looking at the only public repository using Valita, @Bubz43's https://github.com/Bubz43/ep2e, it seems that no changes are needed there at least 🙂

Version v0.0.18 is now published, containing v.lazy 👍

I'm using Valita quite heavily in a not yet public rework of that project with plenty of v.optionals and I didn't have to change anything, so it shouldn't be too breaking.

Awesome 👍
Oh, and for completeness' sake we should mention Zod's lazy here as well. v.lazy is named after it (and @Geordi7's suggestion) and behaves almost similarly. Thanks, Zod ❤


Does the framework have cookie authentication login for more useful information？

I use this framework to crawl the content of some websites, but authentication is required

you should do the auth by yourself in the main


Deck not loading layers when one layer has configuration issue?

Hi! I have noticed that deck will not load any layers if one or more layers has a configuration issue...
This seems counter-intuitive. I would think if deck has trouble rendering a layer it would omit rendering that layer but render layers that do not have issues. Additionally, there doesn't appear to be a way to handle these errors.

@jfuehner Some comments based on work I did on this a long time ago (@Pessimistress likely has more recent insights)

I would think if deck has trouble rendering a layer it would omit rendering that layer but render layers that do not have issues.

This was the original intention. There was code to catch exceptions from each layer during rendering phase and continue with next layer but I have also seen that this seems to be broken.

Additionally, there doesn't appear to be a way to handle these errors.

E.g. as in allow the application to catch any resulting exceptions? The exceptions are likely being caught by deck.gl which would be somewhat reasonable if rendering wasn't broken.

@ibgreen Perhaps a error event indicating what layer(s) were unable to be rendered? If you have quite a few layers rendering its challenging to identify why one might be broken. Especially, when none are rendering ;-)

Agreed, errors should not be silently discarded. As errors are caught and handled there should at least be console logs emitted.

We do catch the errors during layer lifecycle, so that all layers get initiated/updated even if one fails. However we throw the error at the end:
https://github.com/uber/deck.gl/blob/80978528ffdebf4a82265c0d4408327a0eb0686c/modules/core/src/lib/layer-manager.js#L259-L261
We can expose an optional onError handler that replaces the crash.


Refactor inlined JavaScript/CSS styles to external files #38

Move scripts and styles to own files. Use module exports for JavaScript and organize files according to the referencing page. Refactor main-layout JavaScript/CSS assets. Simplify footer definition. Adopt security config for CSS/JS resources.

Thanks for the PR!
I'm wondering if we can move all the resources into a common folder so as to map only a single folder. Perhaps we could restructure to use static/assets/css and static/assets/js folders. Then we can map only /assets/** to public.
Part of the concern is mapping file extensions to security constraints is fragile due to the way Spring MVC handles file extensions. For example, I have a @RequestMapping("/admin/cla/link") for my controller. However, the URL http://localhost:8080/admin/cla/link.css will resolve to the controller (notice that this file extension would match ../**/*.css thus giving un authorized access to the user.

PR updated

Thanks for the PR! This is now merged into master


Can't parse valid SCTE-35

Here it is:
/DBlAAAAAAAAAP/wBQb+GVJTDABPcAZNRFNOQzUCRUNVRUkAAKTff8MAACky4A8xdXJuOnV1aWQ6QnJlYWstQjAwMjA4NTU2ODlfMDAxMi0wNy0xMC1YMDExMjUxNjEyNDAAAPkSB7E=
This is valid SCTE-35 found in the wild (in a DSM-CC stream).
It is perfectly parsable with https://comcast.github.io/scte35-js/
For reference, this is the code the HbbTV app uses to parse it:
http://hbbtv.mediaset.net/app/mplayhbbtvgoldzoo/dev/js/component/scte35Parser.js
Looks like threefive doesn't have support for custom descriptors maybe? It seems to define a custom tag=0x70 descriptor.
I tried to do something like this: https://github.com/futzu/scte35-threefive/blob/master/examples/upid/custom_upid_handling.py
but unfortunately it doesn't work since as soon as threefive sees the unhadled tag=0x70 descriptor (not in known descriptor map) it refuses to parse extra stuff. After that there is a regular tag=2 descriptor but it gets ignored, and I get an empty descriptor array in the end. @futzu I guess this last one is a bug, it shouldn't ignore known descriptors.
I'd like to custom-process the tag=0x70 descriptor AND get the content of the tag=2 one

That is not valid SCTE-35 .
,
0x70 is reserved for future SCTE-35 Descriptors, you are not supposed to use it.
That being said,  it's not difficult to add what you need.
All you have to do is over-ride one function, threefive.descriptors.splice_descriptor

Here's how you do it.

a@debian:~/clean/scte35-threefive$ pypy3
Python 3.9.16 (7.3.11+dfsg-2, Feb 06 2023, 16:52:03)
[PyPy 7.3.11 with GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> import threefive

>>>> def my_splice_descriptor(bites):
....     tag = bites[0]
....     if tag not in descriptor_map:
....         return SpliceDescriptor(bites)
....     spliced = descriptor_map[tag](bites)
....     spliced.decode()
....     return spliced
....
>>>> threefive.descriptors.splice_descriptor = my_splice_descriptor

then you can run

>>>> cue = threefive.Cue('/DBlAAAAAAAAAP/wBQb+GVJTDABPA)
ZNRFNOQzUCRUNVRUkAAKTff8MAACky4A8xdXJuOnV1aWQ6QnJlYWstj)AwMjA4NTU2ODlfMDAxMi0wNy0xMC1YMDExMjUxNjEyNDAAAPkSB7E=')
>>>> cue.decode()
True
>>>> cue.show()
{
    "info_section": {
        "table_id": "0xfc",
        "section_syntax_indicator": false,
        "private": false,
        "sap_type": "0x3",
        "sap_details": "No Sap Type",
        "section_length": 101,
        "protocol_version": 0,
        "encrypted_packet": false,
        "encryption_algorithm": 0,
        "pts_adjustment_ticks": 0,
        "pts_adjustment": 0.0,
        "cw_index": "0x0",
        "tier": "0xfff",
        "splice_command_length": 5,
        "splice_command_type": 6,
        "descriptor_loop_length": 79,
        "crc": "0xf91207b1"
    },
    "command": {
        "command_length": 5,
        "command_type": 6,
        "name": "Time Signal",
        "time_specified_flag": true,
        "pts_time": 4720.284578,
        "pts_time_ticks": 424825612
    },
    "descriptors": [
        {
            "tag": 112,
            "descriptor_length": 6,
            "identifier": "MDSN"
        },
        {
            "tag": 2,
            "descriptor_length": 69,
            "name": "Segmentation Descriptor",
            "identifier": "CUEI",
            "components": [],
            "segmentation_event_id": "0xa4df",
            "segmentation_event_cancel_indicator": false,
            "program_segmentation_flag": true,
            "segmentation_duration_flag": true,
            "delivery_not_restricted_flag": false,
            "web_delivery_allowed_flag": false,
            "no_regional_blackout_flag": false,
            "archive_allowed_flag": false,
            "device_restrictions": "No Restrictions",
            "segmentation_duration": 30.0,
            "segmentation_duration_ticks": 2700000,
            "segmentation_message": "Provider Advertisement Start",
            "segmentation_upid_type": 15,
            "segmentation_upid_type_name": "URI",
            "segmentation_upid_length": 49,
            "segmentation_upid": "urn:uuid:Break-B0020855689_0012-07-10-X0112516124",
            "segmentation_type_id": 48,
            "segment_num": 0,
            "segments_expected": 0
        }
    ]
}
>>>>

Does that make sense?

I'll add that to threefive, just give me a minute to make sure it doesn't cause any problems,

upgrade to 2.3.99
python3 -mpip install --upgrade threefive

a@debian:~$ threefive '/DBlAAAAAAAAAP/wBQb+GVJTDABPcAZNRFNOQzUCRUNVRUkAAKTff8MAACky4A8xdXJuOnV1aWQ6QnJlYWstQjAwMjA4NTU2ODlfMDAxMi0wNy0xMC1YMDExMjUxNjEyNDAAAPkSB7E='

{
    "info_section": {
        "table_id": "0xfc",
        "section_syntax_indicator": false,
        "private": false,
        "sap_type": "0x3",
        "sap_details": "No Sap Type",
        "section_length": 101,
        "protocol_version": 0,
        "encrypted_packet": false,
        "encryption_algorithm": 0,
        "pts_adjustment_ticks": 0,
        "pts_adjustment": 0.0,
        "cw_index": "0x0",
        "tier": "0xfff",
        "splice_command_length": 5,
        "splice_command_type": 6,
        "descriptor_loop_length": 79,
        "crc": "0xf91207b1"
    },
    "command": {
        "command_length": 5,
        "command_type": 6,
        "name": "Time Signal",
        "time_specified_flag": true,
        "pts_time": 4720.284578,
        "pts_time_ticks": 424825612
    },
    "descriptors": [
        {
            "tag": 112,
            "descriptor_length": 6,
            "identifier": "MDSN"
        },
        {
            "tag": 2,
            "descriptor_length": 69,
            "name": "Segmentation Descriptor",
            "identifier": "CUEI",
            "components": [],
            "segmentation_event_id": "0xa4df",
            "segmentation_event_cancel_indicator": false,
            "program_segmentation_flag": true,
            "segmentation_duration_flag": true,
            "delivery_not_restricted_flag": false,
            "web_delivery_allowed_flag": false,
            "no_regional_blackout_flag": false,
            "archive_allowed_flag": false,
            "device_restrictions": "No Restrictions",
            "segmentation_duration": 30.0,
            "segmentation_duration_ticks": 2700000,
            "segmentation_message": "Provider Advertisement Start",
            "segmentation_upid_type": 15,
            "segmentation_upid_type_name": "URI",
            "segmentation_upid_length": 49,
            "segmentation_upid": "urn:uuid:Break-B0020855689_0012-07-10-X0112516124",
            "segmentation_type_id": 48,
            "segment_num": 0,
            "segments_expected": 0
        }
    ]
}

Also, MDSN is not a valid identifier.
Public-1.pdf

Hey @futzu that's really amazing, thank you! Indeed, MDSN is not a valid identifier.
The parsing works fine for me.
I got some troubles understanding the function override. After the MDSN string, the custom descriptor has 2 bytes that are an ascii string representing a channel code. I'm trying to parse them:

def my_splice_descriptor(bites):
     tag = bites[0]
     if tag == 112:
        length = bites[1]
        private_bytes = ''.join(chr(i) for i in bites[6:6+length-4])
        print("private_bytes:", private_bytes)
        return
     if tag not in range(0, 4):
         return threefive.descriptors.SpliceDescriptor(bites)
     spliced = threefive.descriptors.descriptor_map[tag](bites)
     spliced.decode()
     #spliced["private_bytes"] = private_bytes
     return spliced

threefive.descriptors.splice_descriptor = my_splice_descriptor

However, it does not work. What's wrong in the code? (Thanks in advance!)

You were close, but this is cleaner.

mdsn.py
*   Subclass threefive.descriptors.SpliceDescriptor
* Add self.private_data to __init__
* Add a decode method (required to function)
* Add it to threefive.descriptors.descriptor_map 112: MDSNDescriptor

import threefive

class MDSNDescriptor(threefive.descriptors.SpliceDescriptor):
    """
    MDSNDescriptor
    """
    def __init__(self, bites=None):
        super().__init__(bites)
        self.name = "MDSN Descriptor"
        self.private_data=None

    def decode(self):
        self.private_data="".join(list(self.bites[: self.descriptor_length -4].decode()))

if __name__ == '__main__':
    threefive.descriptors.descriptor_map[112]=MDSNDescriptor

    cue = threefive.Cue('/DBlAAAAAAAAAP/wBQb+GVJTDABPcAZNRFNOQzUCRUNVRUkAAKTff8MAACky4A8xdXJuOnV1aWQ6QnJlYWstQjAwMjA4NTU2ODlfMDAxMi0wNy0xMC1YMDExMjUxNjEyNDAAAPkSB7E=')
    cue.decode()
    cue.show()

a@debian:~/clean/scte35-threefive$ pypy3 mdsn.py
{
    "info_section": {
        "table_id": "0xfc",
        "section_syntax_indicator": false,
        "private": false,
        "sap_type": "0x3",
        "sap_details": "No Sap Type",
        "section_length": 101,
        "protocol_version": 0,
        "encrypted_packet": false,
        "encryption_algorithm": 0,
        "pts_adjustment_ticks": 0,
        "pts_adjustment": 0.0,
        "cw_index": "0x0",
        "tier": "0xfff",
        "splice_command_length": 5,
        "splice_command_type": 6,
        "descriptor_loop_length": 79,
        "crc": "0xf91207b1"
    },
    "command": {
        "command_length": 5,
        "command_type": 6,
        "name": "Time Signal",
        "time_specified_flag": true,
        "pts_time": 4720.284578,
        "pts_time_ticks": 424825612
    },
    "descriptors": [
        {
            "tag": 112,
            "descriptor_length": 6,
            "name": "MDSN Descriptor",
            "identifier": "MDSN",
            "private_data": "C5"
        },
        {
            "tag": 2,
            "descriptor_length": 69,
            "name": "Segmentation Descriptor",
            "identifier": "CUEI",
            "components": [],
            "segmentation_event_id": "0xa4df",
            "segmentation_event_cancel_indicator": false,
            "program_segmentation_flag": true,
            "segmentation_duration_flag": true,
            "delivery_not_restricted_flag": false,
            "web_delivery_allowed_flag": false,
            "no_regional_blackout_flag": false,
            "archive_allowed_flag": false,
            "device_restrictions": "No Restrictions",
            "segmentation_duration": 30.0,
            "segmentation_duration_ticks": 2700000,
            "segmentation_message": "Provider Advertisement Start",
            "segmentation_upid_type": 15,
            "segmentation_upid_type_name": "URI",
            "segmentation_upid_length": 49,
            "segmentation_upid": "urn:uuid:Break-B0020855689_0012-07-10-X0112516124",
            "segmentation_type_id": 48,
            "segment_num": 0,
            "segments_expected": 0
        }
    ]
}

Every project I have done for the last 3 years has been used threefive, so I have it setup to be easy to subclass and I try to make things work the same way when possible.

 super().__init__(bites) is a big help.
threefive uses maps for everything. there's threefive.commands.command_map, threefive.descriptors.descriptor_map, and threefive.upids.decode has a upid_map.
almost everything in threefive has a decode method.

Did you try sub-classing SpliceDescriptor?

Yep I tried your code (subclassing SpliceDescriptor) and it works perfectly!! Pretty handy having maps for everything and having a decode function everywhere, I must say. I was exploring the code and that's very well thought out, very nice. Good job, this library is a pearl

I'm glad it worked out for you. I appreciate your feedback,  I would have never thought of this myself.
you definitely helped make threefive better, thank you.


Need some kind of meta-logging infrastructure

Errors encountered in the logging process are currently just dumped to stderr. This should be configurable in some way. In particular, it'd be great if it were possible for logger internals to provide diagnostic logging as well to debug configuration issues.

What are your thoughts on how this might be added to log4rs?

It seems like dumping to stderr has stood the test of time.


First working version

Depends on https://github.com/ipfs/js-libp2p-ipfs/pull/6
Closes https://github.com/ipfs/js-ipfs/issues/126

Greeeeeeeen :D


msm-javolution-serializer: java.util.Currency gets deserialized with ReflectionFormat

From<EMAIL_ADDRESS>on February 10, 2010 12:13:00
java.util.Currency gets serialized and deserialized with the
ReflectionFormat which always creates new instances during deserialization.
The transient field defaultFractionDigits is then always zero and a
comparision with equals may return false even if the currencyCode is equal
since it is just Object.equals(). Only one instance should exist for each
currencyCode.
This applies to all Versions up to and including 1.2-SNAPSHOT.
I've added a patch that provides a special XMLFormat for Currency that
resolves the issue.
Thomas
Attachment: 0002-added-special-XMLFormat-for-java.util.Currency.patch
Original issue: http://code.google.com/p/memcached-session-manager/issues/detail?id=34

From martin.grotzke on February 10, 2010 08:09:50
(No comment was entered for this change.)
Summary: msm-javolution-serializer: java.util.Currency gets deserialized with ReflectionFormat
Status: Accepted
Owner: martin.grotzke

From martin.grotzke on February 10, 2010 08:33:16
(No comment was entered for this change.)
Labels: Milestone-1.2

From martin.grotzke on February 12, 2010 02:40:31
Patch applied, added test case.
Additionally made these changes:

Exclude currencies from reference handling as the XMLCurrencyFormat uses
Currency.getInstance
Support serialization of currency as an attribute (using currency code)

Changes are merged to develop branch, this will be released with 1.2
Status: Fixed


[Refactor] Use generator

Codecov Report

Merging #46 into master will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              master       #46   +/-   ##
===========================================
  Coverage     100.00%   100.00%
- Complexity        36        37    +1
===========================================
  Files             10        10
  Lines            139       136    -3
===========================================
- Hits             139       136    -3

Impacted Files
Coverage Δ
Complexity Δ

src/Controller/ArchiveController.php
100.00% <100.00%> (ø)
3.00 <0.00> (ø)

src/Service/ArchiveReader.php
100.00% <100.00%> (ø)
4.00 <2.00> (+1.00)

src/Service/DirectoryListing.php
100.00% <100.00%> (ø)
8.00 <4.00> (ø)

Continue to review full report at Codecov.

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


Check reviews requests reviews on draft PRs

@coderobe wrote

The "Check reviews" step currently automatically requests reviews on draft PRs, i think the correct behaviour would be to only request review once the draft is converted to a non-draft PR.
To avoid creating noise for the reviewers for draft PRs that are not intended to be merged anyways and stuff that's far from ready

I wouldn't say this is a bug because it currently works as intended. The problem is that we never considered this kind of request.

Closing because https://github.com/paritytech/substrate/pull/11248 and https://github.com/paritytech/polkadot/pull/5356 and https://github.com/paritytech/cumulus/pull/1188 all got merged.


Empty module if dep is not optimized ahead of time

[x] Read the docs.
[x] Use Vite >=2.0. (1.x is no longer supported)
[ ] If the issue is related to 1.x -> 2.0 upgrade: no

Describe the bug
This is somewhere between a bug and a feature request/question:
I have a use case where I am using Vite via createServer, and the files that will be bundled are not known ahead of time (so the dependency pre-bundling won't/can't work).
Here's what I expect to happen:

Start Vite server. It sees nothing to pre-bundle
I ask Vite to transpile a file with any import to node_modules:import $ from 'jquery'
console.log($)

Vite sees that there is a non-pre-bundled import, and triggers a pre-bundle, in the meantime it should either respond with the transpiled file, or wait until the pre-bundle finishes before responding (I don't know if the ?v= param depends on the pre-bundle already existing
Something like:import __vite__cjsImport0_jquery from "/node_modules/.vite/jquery.js?v=1d07b389"
const $ = __vite__cjsImport0_jquery.__esModule ? __vite__cjsImport0_jquery.default : __vite__cjsImport0_jquery

console.log('here is jquery:', $)

Then I fetch the module /node_modules/.vite/jquery.js?v=1d07b389 and once Vite finishes bundling it Vite responds with it

Here's what currently happens:
On step 3 Vite responds with:
import $ from '/node_modules/jquery/dist/jquery.js'

console.log('here is jquery:', $)

And when I fetch /node_modules/jquery/dist/jquery.js Vite responds with an empty file and without a content-type so the module can't be executed.
Reproduction
You can see the bug here: https://github.com/calebeby/vite-bug

npm i
Clear node_modules/.vite if you ran it previously
npm run dev
Open a browser tab to http://localhost:3000/main.js (only to avoid CORS errors)
In the browser console paste await import('http://localhost:3000/main.js')
Problem: response for imported jquery is empty and doesn't have a content type

There is code in place that triggers a full-reload when a missing pre-bundled dep gets bundled, but what I am not understanding is why vite doesn't just wait to respond until the pre-bundled dep gets pre-bundled. I think WMR's npm middleware handles it closer to the way I expect

This is expected, because a new found import may have cross-imports with other existing deps, which can lead to invalidations of other pending or already imported imports. To ensure correctness it is necessary to perform a full reload.

@yyx990803 Is there any way for me to workaround for my use case, where a reload is not possible? I am using vite to transpile modules for a puppeteer-based test runner, and if the browser reloaded in the middle of the test all of the state would get lost and the test would fail.

But this should only happen if you are editing the files? Are you editing source files during the tests?

The files that are run in the browser are virtual files that are given to vite via a rollup plugin

So vite's crawler can't find the deps to pre-bundle them ahead of time

Is there a way at runtime for me to tell Vite to walk a module graph and perform dep optimization? Sort of like adding entries to library mode at runtime?
Also, does the dep optimizer run rollup plugins for resolution/loading/transpiling when it figures out the module graph?

Well, adding entries at runtime leads to a re-bundle and requires a reload. So I'm afraid you'll have to rethink your use case.

I have a few more questions, sorry 🙈

Is it possible to disable pre-bundling for ESM node_modules?
Is there a way from the API to detect when Vite found a missing dep and performed re-dep-optimizing?
If I restart vite does it keep previously optimized deps in the cache, even if the new entry no longer points to the previously optimized deps?

I think I am able to make my use case work if the first one is true, or if both the second and third are true

Is it possible to disable pre-bundling for ESM node_modules?

If the dep provides pure ESM you can list it in https://vitejs.dev/config/#optimizedeps-exclude

Is there a way from the API to detect when Vite found a missing dep and performed re-dep-optimizing?

No.

If I restart vite does it keep previously optimized deps in the cache when it rebuilds the deps, even if the new entry no longer points to the previously optimized deps?

Yes it keeps previously found imports as long as the lockfile + vite config didn't change.

👍 I am planning to make it restart the test when Vite performs just-in-time-pre-bundling. Would you accept a PR to expose events to the API that trigger at the same time as these logs?
new dependencies found: ${...}, updating...
✨ dependencies updated, reloading page...


Merges master to dev

Coverage increased (+0.01%) to 99.018% when pulling a38c7626216704d1e87d92794bb27fab10ebe4f7 on armonge:dev into 85af58c97e4c807651ad752db709ba4fedb698b0 on mediarain:dev.


CrossEntropyLoss return single value when reduction is "none"

🐛 Describe the bug
When using LigerCrossEntropyLoss with reduction="none", it returns a single value, instead of an array.
Reproduce
import torch
from liger_kernel.transformers.cross_entropy import LigerCrossEntropyLoss

def test_cross_entropy_matches_torch():
    # Test cases with various shapes and values
    batch_size = 3
    num_classes = 5
    seq_length = 4

    # Generate random logits and labels using torch
    torch.manual_seed(42)
    logits = torch.randn(batch_size, seq_length, num_classes, device='cuda')
    labels = torch.randint(0, num_classes, (batch_size, seq_length), device='cuda')

    # Set some labels to -100 to ignore them
    labels[0, -1] = -100  # Ignore last token of first sequence
    labels[1, -2:] = -100  # Ignore last two tokens of second sequence

    # Liger cross entropy
    liger_ce = LigerCrossEntropyLoss(reduction="none")
    liger_loss = liger_ce(logits.view(-1, num_classes), labels.view(-1))
    print(liger_loss)

    # PyTorch cross entropy
    torch_ce = torch.nn.CrossEntropyLoss(reduction="none")
    torch_loss = torch_ce(logits.view(-1, num_classes), labels.view(-1))

    # Check if losses match
    torch.testing.assert_close(
        liger_loss,
        torch_loss,
        rtol=1e-5,
        atol=1e-5,
        msg="Liger and PyTorch losses don't match",
    )

    print("All tests passed! LigerCrossEntropyLoss matches PyTorch's implementation")

if __name__ == "__main__":
    test_cross_entropy_matches_torch()

Versions
Environment Report:
Operating System: Linux-5.15.0-88-generic-x86_64-with-glibc2.35
Python version: 3.10.15
PyTorch version: 2.5.1+cu124
CUDA version: 12.4
Triton version: 3.1.0
Transformers version: 4.46.2

Sorry. We only support "mean" and "sum" for now. Are you willing to contribute by adding an assertion or implementing "none" reduction? Thanks!

I think I can make a PR to add an assert to block "none" first, then let's see how to implement the "none" reduction one.

The triton kernel of liger ce is actually giving none reduction loss, just need to make a reduction=="none" branch condition to output loss1d directly
https://github.com/linkedin/Liger-Kernel/blob/main/src%2Fliger_kernel%2Fops%2Fcross_entropy.py#L288-L288

#take I made a PR about this issue, please take a look, thanks @ByronHsu @leng-yue @Tcc0403

Looks good to me


Instrumentation tests

This updates LoginActivityTest and ClaimInfoActivityTest to use ActivityInstrumentationTestCase2 (AITC2) rather than ActivityUnitTestCase.
To get everything working, TravelTrackerApplication needed to be replaced by a custom singleton. The problem is that with AICT2, we can't change the Application, so a function needs to be called on the app (setDataSource) to change the source. However, in order to get the Application in the first place, we need to have created an Activity to call activity.getApplication(). The result is that the data source is set after the Activity has been created, which wreaks havoc on our test code.
Instead, I changed DataSourceSingleton into an actual Singleton rather than an interface and removed TravelTrackerApplication entirely. The resulting changes to our codebase are fairly minimal (outside of updating test cases), as most accesses to the DataSource are through TravelTrackerActivity.datasource anyway. I think this may be a better choice going forward anyway -- these are the issues Josh predicted when he suggested that we use our own singleton.

I'm going to merge this in about 45 minutes unless there are any concerns.


Make license and Readme consistent

The README states, that OpenSplice is licensed under Apache 2, while the License clearly isn't a Apache 2 license.
This is misleading and should be consistent.

agree ..
Still, sources DO specify the  proper Apache 2.0 license:
/*
 *                         Vortex OpenSplice
 *
 *   This software and documentation are Copyright 2006 to  ADLINK
 *   Technology Limited, its affiliated companies and licensors. All rights
 *   reserved.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

Corrected the license to match the Apache 2 license


Add FAQs reagrding how to use Water Monitoring System on the website

Is your feature request related to a problem? Please describe. Describe the solution you'd like
Since there isn't enough data on the website regarding the project, there must be a page about the project or a separate column that explains everything regarding the frequently put up questions. Add some FAQs on the website like how the project works and what do people need to do to use the website, is there any mobile app etc.

I can work on this ..

I am interested to work on this...if possible please assign me

Sure @vngarg @habeeba-naaz, you can work on this. Make sure you have to add a good UI section for FAQs on the website and the questions should be relevant and properly answered.

Thank you for assigning...any deadlines for completing?

Yeah, you both need to complete the task by 3rd March 2020. @jainpawan21 @vinitshahdeo  will help you with the frontend part.

Sure...

To fork this project , I have already installed react...still anything required to get access to this project?

How to get started with this issue...Please let me know more details for this like from where should i need to take data as  a base and develop FAQs for water monitoring system on the website

I have completed most of the part..but got 3 questions..1)Does this project has app?
2)What are future enhancements ?
3)How to use the website?

@PragatiVerma18 @vinitshahdeo
Unable to push changes in feature/fronted....access denied...do I need to create my own branch or use feature/fronted please reply?

@habeeba-naaz please follow the following steps:

Fork this repository
Clone the forked one
Create a branch
Push your changes

👏Now, it's time to create the PR.

Yes.,,I followed same thing but I checked out in feature/ frontend.do we need to create on my own branch?

Okay thank you

While pushing why it is asking username and password of GitHub?

Please check pull request #98 ...I kept deployed gh-page link and let me know if any changes to be done


Data convertor support

Current situation:
we use a ByteArraya as return type for neo-gui, RPC request, neo-cli, etc. But ByteArray is not human readable. Users are always looking for a tool to be able to convert ByteArray to different data format, such as string, number, etc. For example:

ByteArray; 7472616e73666572
String: transfer

Proposal

can we add data convertor support in neo-gui ?
such as :

ByteArray <-> String
ByteArray <-> Number
Address <-> ScriptHash (Big-endian/Little-endian)

we can detect if it is an ascii byte array, and show it as string

I am thinking to provide a extra function or tool in neo-gui to support those conversion so that developers can use it when they need to convert a return data from neo which is not only from neo-gui, but neo-cli, or RPC request.


Fixed patch::add creating non-existent parents.

[Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.]
Previous behavior was not in accordance with RFC6902. Added test case to unit-json_patch.cpp that catches the bug. Issue was created here:
https://github.com/nlohmann/json/issues/3134

Pull request checklist
Read the Contribution Guidelines for detailed information.

[ x ]  Changes are described in the pull request, or an existing issue is referenced.
[ x ]  The test suite compiles and runs without error.
[ x ]  Code coverage is 100%. Test cases can be added by editing the test suite.
[ x ]  The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

Please don't

The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
Specifically, I am aware of compilation problems with Microsoft Visual Studio (there even is an issue label for these kind of bugs). I understand that even in 2016, complete C++11 support isn't there yet. But please also understand that I do not want to drop features or uglify the code just to make Microsoft's sub-standard compiler happy. The past has shown that there are ways to express the functionality such that the code compiles with the most recent MSVC - unfortunately, this is not the main objective of the project.
Please refrain from proposing changes that would break JSON conformance. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension.
Please do not open pull requests that address multiple issues.

@Hudson00 Thanks for the PR, but the CI failed. Please double check why the fix breaks existing tests.

@Hudson00 Can you rebase and check on the failing tests?


AttributeError: 'Monitor' object has no attribute 'pipe'

While testing the model i get this:
Traceback (most recent call last):
File "test.py", line 65, in
test(opt)
File "test.py", line 55, in test
state, reward, done, info = env.step(action)
File "C:\Users\johnm\DeepLearning\Super-mario-bros-PPO-pytorch\src\env.py", line 100, in step
state, reward, done, info = self.env.step(action)
File "C:\Users\johnm\DeepLearning\Super-mario-bros-PPO-pytorch\src\env.py", line 55, in step
self.monitor.record(state)
File "C:\Users\johnm\DeepLearning\Super-mario-bros-PPO-pytorch\src\env.py", line 27, in record
self.pipe.stdin.write(image_array.tostring())
AttributeError: 'Monitor' object has no attribute 'pipe'
Can you help please?

I met the same issue at test. So I found the problem is in /src/env.py Class Monitor. And the reason is that we did not install ffmpeg. So the Monitor didn't create self.pipe. To solve this problem we can Install ffmpeg or Block the class Monitor.

I met the same issue at test. So I found the problem is in /src/env.py Class Monitor. And the reason is that we did not install ffmpeg. So the Monitor didn't create self.pipe. To solve this problem we can Install ffmpeg or Block the class Monitor.

Hey, my bro, I met the same problem, and I installed ffmpeg, but the problem is still exists. How did you install ffmpeg? pip install ffmpeg?

Comment out the lines in the create_train_env method in the env.py file:
# if output_path:
#     monitor = Monitor(256, 240, output_path)
# else:
#     monitor = None

and add monitor = None.

Comment out the lines in the create_train_env method in the env.py file:
# if output_path:
#     monitor = Monitor(256, 240, output_path)
# else:
#     monitor = None

and add monitor = None.

第二种方法参考：https://blog.csdn.net/m0_47449768/article/details/130102406


Unable to scroll down on Cloud changelog doc

For https://docs.mattermost.com/install/cloud-changelog.html, I'm unable to scroll down and see the rest of the content. Unsure how to fix it. Also unsure if this is an issue only on my end, however I checked and other changelogs scroll normally.

This didn't get posted in the Documentation channel.
@cwarnermm Just a FYI on this, I don't think this is urgent to fix now, unless this starts happening with other docs pages. Also unsure if this is an issue only on my end.

Fixed by https://github.com/mattermost/docs/pull/5244


Update here.js

hiii i want a python code for connecting social media to e commerce

@mehakafreen Why posting this here ?


The type search page does not seem to appear in the navigation

#1017 added a new type search page which replaces https://microsoft.github.io/TypeSearch/ but I cannot find it anywhere in the navigation of the website.
I would find it logical to access it through the tools section.

Agree!

Hrm, not as simple as I'd like - I'm not too far off wrapping up the designs for the DT page. So for now, this is gonna have to stick out as a gap ATM


Improve "New topic" experience.

This ticket talks about a couple issues with the "New topic" experience and suggests some solutions all in one ticket to provide context, but we may want to split this out into smaller tickets when we get consensus on the approach.  Also, anybody should feel free to create new issues for a particular subset of this proposal, if you want to elaborate on what you want.
There are a few common problems when creating a new topic:

If you're narrowed to one topic, and then you start a new topic, we don't automatically move your narrow to the new topic, which, in my experience, is what I want to do 99% of the time.
If you're in a topic where it's clear that a second semi-related conversation is starting to develop, it's easy to start a new topic, but it's clumsy to tell people in the old topic that you've diverted the conversation to a new topic.

I think we can solve both problems by introducing a modal for topics based on this prototype:

We'd make the checkboxes default to the most appropriate defaults, and of course we'd let the enter key submit.  Although not shown above, we'd probably have a cancel button.   And of course we'd have better styling.
Once the user hits "Compose message," they would be put in a narrow for the new topic, unless they unchecked that option.  And they would be in the compose box.
For the problem of "splitting off new topics," I think we'd start by adding an option called "new topic" to the message menu, and possibly a hotkey.
Before starting work on this, people should have some discussions on chat to figure out the most incremental things we can do here.

Hi,I've been paying attention to this issue for a long time,but its state always is open,is there any difficult problem to finish it?

Thanks for following up on this, @Xuxiaotianonlyone!
I don't think this is a hugely difficult problem, and I hope somebody tries to work on it soon.  It's probably about a three-day project for somebody with the right skills.  Somebody could probably produce a quick prototype in a matter of hours, but we'd want to thoroughly test it, get feedback on the design, etc.
The issue was opened two months ago, and we've been mostly toward the end of a release cycle during that time, so we've been encouraging folks to do things like bug fixing.  Once we release 1.7, I think new features like this will get more attention.

I'm really looking forward to it! I will Continue to focus on it. Thanks for you reply.

We have made some changes in this direction (e.g., "New conversation" and "Go to conversation" buttons), and have not current plans to specifically implement a modal.


Very different result between samtools and samblaster

Dear @GregoryFaust
I am using Lumpy to detect CNV. During preparing the discordant paired-end alignments, I found that the results from the following two pipelines are very different. In my test, the samblaster just reported 0 discordant read pair, but samtools reported many.
(1) samtools view -b -F 1294 sample.bam #refer to the github of lumpy (https://github.com/arq5x/lumpy-sv)
(2) samtools sort -@ 4 -O SAM -n sample.bam | samblaster (Version.0.1.25) -a -e -d $prefix.disc.sam -s $prefix.split.sam -o /dev/null
Hope you can help me, thank you.
Sincerely,
Zheng Zhuqing

Thanks for bringing this to my attention. Somehow, samblaster V25 does NOT output discordants when used with the acceptDupMarks(-a) option. I have a fix already prepared which I am now testing and will release very soon (this week at latest). In the mean time, samblaster V24 will work for the pipeline you have shown.
As an aside, if your BAM file was aligned with BWA MEM, both of your pipeline fragments shown assume that the -M option was not used. If it was, you will need to use the -M option with samblaster or make a change to the samtools filter specification.
Thanks again.
Greg

Dear @GregoryFaust
Thank you for reminding. Also I look forward to your update.
Sincerely,
Zhuqing

Closed in v.0.1.26


Parent is nil until viewDidAppear, for all Child(s) but the first

Xcode 8.3.2
iOS 10.3
XLPagerTabStrip 7.0.0
class SomeParentTabStrip: ButtonBarPagerTabStripViewController {
    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
        return [SomeChildOne(), SomeChildTwo()]
    }
}

class SomeChildOne: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        // not nil for first tab
        print(parent)
    }
}

class SomeChildTwo: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        // parent is nil
        print(parent)
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        // parent is no longer nil
        print(parent)
    }
}

+ Why is this a problem?
For my use-case I need to access values defined on the Parent. In addition, I need to execute logic One-Time, I am building a Form via Eureka, with initial values provided by a Realm model on the Parent.
Which means I have to "reinvent the wheel" within viewDidAppear, by using a flag to say it has loaded once already.
+ What is the actual use-case here?
I am making a "screen" which is a data entry form with multiple tabs. There is a set of form inputs on each tab.
I need to send data from/to Parent -> Child(s) and Child(s) -> Parent.
I am doing this a few different ways. During viewDidLoad I get the Parent and build the Form using the main model on the Parent. Then I need to update a Delegate on the Parent.
        // ChildView: in each child view, want to use in viewDidLoad
        parentVC = parent as! SomeParentTabStrip
        parentVC.someDelegate = self

        // ChildView: in form setup, example
        NameRow("label") {
            $0.title = "Label"
            $0.placeholder = $0.title
            $0.value = parentVC.someModel?.label
        }

        // ChildView: pass form data to parent when user switches tabs
        override func viewWillDisappear(_ animated: Bool) {
            super.viewWillDisappear(animated)
            parentVC.values += form.values()
        }

        // ParentView: for the current focused tab, parent gets the form values
        values += someDelegate.getFormData()

Because I see no method we can override to get access to the Child Controller when a tab is switched, I see no other way to "pass" data into the Child View.
If there is a better way to implement communication between the Parent and Child view(s), I am welcomed to hear those ideas.

The more I refine my solution and review the libraries code, the more I am starting to think this isn't really an "issue" or anything the library can resolve.
I see the base class PagerTabStripViewController calls addChildViewController (part of UIViewController) in two locations, viewDidLoad and updateContent. I assume the role of assigning parent is within the logic of addChildViewController.
In addition, I also noticed that my solution will need to update parentVC.someDelegate = self on every viewDidAppear anyways, otherwise the User could switch tabs again and the reference is pointing to the wrong Child.
I will leave this open, in case someone thinks the parent could be "assigned" sooner, of if anyone has some suggestions to a better solution. But maintainers are welcome to close if nothing merits a change.

Wanted to share a more detailed outline of my current solution of communicating between Parent and Child(s). In case anyone was interested. I've removed any extra "fluff" that doesn't apply to the context of XLPagerTabStrip.

// Extension to merge multiple Dictionary objects
extension Dictionary {

    mutating func merge<K, V>(_ dict: [K: V]){
        for (k, v) in dict {
            updateValue(v as! Value, forKey: k as! Key)
        }
    }

}

// --

// Delegate used by Parent to ask for form data from the currently focused Child
protocol SaveDelegate: class {

    func getFormData() -> [String: Any?]

}

// Base class for all Editor screens
// This class has IBOutlet(s) & IBAction(s) for common UI components
// ie Close, Save, & Delete buttons
class BaseEditorController: ButtonBarPagerTabStripViewController {

    // Main dictionary for all form values, used to update the Realm Model
    var values = [String: Any?]()
    weak var saveDelegate: SaveDelegate!

    @IBAction func onSaveAction(_ sender: UIBarButtonItem) {
        // merge the currently focused tab form values
        values.merge(saveDelegate.getFormData())

        // remaining logic is specific to Realm
        // ie realm.create(entityModel.type, value: values, update: true)
    }

}

// --

class SomeModelEditController: BaseEditorController {

    // This Model gets assigned from tableView->didSelectRowAt
    var someModel: SomeModel?

    // MARK: PagerTabStripDataSource
    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
        return [SomeModelInfoController(), SomeModelExtraController()]
    }

}

// --

class SomeModelInfoController: FormViewController, SaveDelegate, IndicatorInfoProvider {

    var viewInitialized = false
    var parentVC: SomeModelEditController!

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)

        if !viewInitialized {
            parentVC = parent as! SomeModelEditController

            initializeForm()
            viewInitialized = true
        }
        // update saveDelegate on every viewDidAppear
        parentVC.saveDelegate = self
    }

    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        // merge this forms values into main dictionary
        parentVC.values.merge(form.values())
    }

    private func initializeForm() {
        // remaining logic is specific to Eureka
        // ie NameRow() { $0.value = parentVC.someModel?.label }
    }

    // MARK: SaveDelegate
    func getFormData() -> [String: Any?] {
        return form.values()
    }

    // MARK: IndicatorInfoProvider
    func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo {
        return IndicatorInfo(title: "Info")
    }

}

// --

class SomeModelExtraController {
    // matches base implementation of SomeModelInfoController
}