Allow multiple values for cma case markets

Ticket: https://www.pivotaltracker.com/story/show/91095150
A CMA case can be relevant to multiple market sectors. These changes update the editing interface to allow multiple values to be selected for that field.
Before merging

[ ] Merge and deploy https://github.com/alphagov/rummager/pull/393

Closing this for now due to probably Rummager related issues with allowing multiple identifiers

There's a PR on Rummager to unblock this, so this is once again good for review and will soon be ready to merge.


Documentation doesn't match package.js

great, thanks!
hope 2016 will be the year we get account rename+redirect... really would prefer gadicc :)


Unable to use Option<> in a struct

What version are you using?
soroban-sdk = { version = "20.0.0-rc2" }
What did you do?
I'm working on creating a "Battle" struct that designates a winner (Address) once the battle ends. Initially, when a battle is created, there won't be a winner. To handle this, I used the Option<> type within the struct, setting the winner to None at the creation of the battle.
#[contracttype]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Battle {
    pub battle_status: u64,
    pub name: Symbol,
    pub players: Vec<Address>,
    pub moves: Vec<u64>,
    pub winner: Option<Address>,
}

pub fn create_battle(env: Env, name: Symbol, user: Address, _winner: Option<Address>) {
    user.require_auth();
    env.storage().instance().set(
        &DataKey::Battle(name.clone()),
        &Battle {
            battle_status: 0,
            name: name.clone(),
            players: vec![&env, user.clone()],
            moves: Vec::new(&env),
            winner: None,
        },
    );
  ...

What did you expect to see?
No errors
What did you see instead?
An error stating that the trait is not satisfied.
error[E0277]: the trait bound `core::option::Option<soroban_sdk::Address>: SorobanArbitrary` is not satisfied
  --> src/lib.rs:23:1
   |
23 | #[contracttype]
   | ^^^^^^^^^^^^^^^ the trait `SorobanArbitrary` is not implemented for `core::option::Option<soroban_sdk::Address>`
   |
   = help: the following other types implement trait `SorobanArbitrary`:
             bool
             i32
             i64
             i128
             u32
             u64
             u128
             DataKey
           and 22 others
   = note: this error originates in the attribute macro `contracttype` (in Nightly builds, run with -Z macro-backtrace for more info)

Closing because this is a duplicate of:

https://github.com/stellar/rs-soroban-env/issues/444
https://github.com/stellar/rs-soroban-sdk/issues/877

Please subscribe to those issues to track.
The fix for this bug is in progress and should be in the next release. 🤞🏻

Thanks @leighmcculloch
Will track those instead!


Cannot change AC temp units

Hello! I have an ac unit that I am trying to control However Homekit units are in F and the plugins are stuck in C
I want to change the plugins units to F but it's not working
Also I have each of the temps with its own HEX
(it would be nice if you allowed min temp to be higher bc my unit doesn't go that low)
I have:
"accessories": [{
"name": "Air Conditioner",
"type": "air-conditioner",
	"temperatureDisplayUnits":"F",
"minTemperature": 10,
	"maxTemperature":26,
	"data": { 				"off": "26004c02723...
However, that doesn't do anything and the units stay in C.
Anything helps thanks!

got the last version of the plugin?

I shall be adding better support for fahrenheit soon, keep an eye out.


Discovering services

Not really an issue; but more on the usage.
How do you use this to discover services and characteristics after finding the peripheral with discovery?
Thanks!

Hello,
For the moment this functionality is used only internally, basically you have to know in advance which services and characteristic you want to communicate with see this issue.
I don’t know when I will have time to do that but feel free to create a pull request.
Best,
Andrea


LaTex formatter commands clash with other packages

(Original issue 185 created by None on 2007-01-14T07:00:03+00:00)
The generated 'C'-prefixed LaTeX commands to format source code can, in some cases, collide with the commands of other packages.  Since the get_style_defs of the HTML formatter lets you supply a style prefix, I figured that would be a sane behavior here, too.  I'm uploading a patch to make the 'arg' argument to get_style_defs be used as the LaTeX command prefix, should someone (like me) need to avoid such collisions.  Thanks for Pygments!
Reported by Jonathan Daugherty<EMAIL_ADDRESS>

(Original issue was assigned to somebody)
(Original issue 185 last updated on 2007-01-15T15:00:48+00:00)
(Issue automaticaly closed due to status in Bitbucket: resolved)

(Original comment by gbrandl on 2007-01-15T15:00:48+00:00)
Fixed in revision r2699, thanks for noticing that.

(Original comment by None on 2007-01-14T07:08:12+00:00)
Trying again.

(Original comment by None on 2007-01-14T07:06:15+00:00)
That patch is actually wrong; uploading a new one.


Multiple versions of echarts in one document

What problem does this feature solve?
I should be able to run echarts version 4 together with echarts version 5 so that upgrading to the new version is easier
What does the proposed API look like?
var echarts4 = require('echarts');
var echarts5 = require('echarts5');
// anything in the echarts5 shouldn't be global

Hi jarben.
I think it's a problem with multiple npm version management. I found we can dot it after npm 6.9.0
npm install echarts@npm:echarts@4
npm install echarts5@npm:echarts@5

Then you can include two versions like your proposal API.

Hi @pissang, that's cool, didn't know this is possible via npm, thanks for sharing:) Will give it a try, can't wait for the 5 final, awesome work as usually!

Thanks!

Hi jarben.
I think it's a problem about multiple npm version management. I found we can dot it after npm 6.9.0
npm install echarts@npm:echarts@4
npm install echarts5@npm:echarts@5

Then you can import two versions like your proposal API.
Check https://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm

Hi jarben.
I think it's a problem about multiple npm version management. I found we can dot it after npm 6.9.0
npm install echarts@npm:echarts@4
npm install echarts5@npm:echarts@5

Then you can import two versions like your proposal API.
Check https://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm

Hi jarben.
I think it's a problem about multiple npm version management. I found we can dot it after npm 6.9.0
npm install echarts@npm:echarts@4
npm install echarts5@npm:echarts@5

Then you can import two versions like your proposal API.
Check https://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm

Hi, When i install two versions as you saw, there has errors, my npm version is 6.14.0.

Hi jarben.
I think it's a problem about multiple npm version management. I found we can dot it after npm 6.9.0
npm install echarts@npm:echarts@4
npm install echarts5@npm:echarts@5

Then you can import two versions like your proposal API.
Check https://stackoverflow.com/questions/26414587/how-to-install-multiple-versions-of-package-using-npm

Hi, When i install two versions as you saw, there has errors, my npm version is 6.14.0.


lib.webworker.d.ts refers to types not defined

lib.webworker.d.ts seems to refer to some types not defined in either that file or lib.core.d.ts: EventInit, UIEvent, MSAppAsyncOperation, MSExecAtPriorityFunctionCallback, XMLHttpRequestUpload, Node, NodeList, Position, PositionError, MediaQueryList, MutationRecord, MutationObserver, AudioBuffer.
It would seem that some of those types shouldn't be there, while others (EventInit) should be available.

Node.d.ts, which doesn't assume a windowed environment, needs types Uint8Array, Uint16Array, Uint32Array, ArrayBuffer, DataView, Float32Array, Float64Array, Int16Array, Int32Array, Int8Array, and Intl which are in lib.d.ts but not lib.core.d.ts.  I propose that these types be moved to the core.
console/Console is also required by Node, but it should maybe not be moved as it isn't available in all environments or might conflict with some different console mechanism with its own signature in some non-standard javascript environment.


df_setImageWithResource: with nil url crashes the application

DFImageManagerKit+UI.h

[self.imageViewIcon df_setImageWithResource:[NSURL URLWithString:data.imageUrl]];

Crashes here:
- (DFImageTask *)imageTaskForRequest:(DFImageRequest *)request completion:(DFImageRequestCompletion)completion {
    id<DFImageManaging> manager = DFManagerForRequest(request);
    if (!manager) {
        [NSException raise:NSInvalidArgumentException format:@"There are no managers that can handle the request %@", request];
    }
    return [manager imageTaskForRequest:request completion:completion];
}

Not really a bug, as I passed nil instead of NSURL, but still I think crashing is not the best choice.

Not really a bug

Yep, the resource is annotated as nonnull
- (nullable DFImageTask *)df_setImageWithResource:(nonnull id)resource;

crashing is not the best choice

You are probably right, I think the UI components should be more forgiving. Thank you, I'll give it a thought.

Done


stable swap subgraph mapping update

Summary
What are we doing, ser?

created the structure for stableswap subgraph, but will need to test it against the live data.
add mapping for handleRampA, handleRemoveLiquidityOne, handleTokenSwap

Acceptance Criteria

[ ] X happens

We need to account for internal StableSwap events too. Create new subgraph mappings for those?


Standardize Table

Is your feature request related to a problem?
Standardization means to give a variable a mean of 0 and a standard deviation of 1.
Desired solution

Add a class StandardScaler in safeds.data.tabular.transformation that wraps the StandardScaler of scikit-learn
Make it a subclass of InvertibleTableTransformer

Considered alternatives

Call the class Standardizer. However, several strategies (e.g. #141) for features scaling exist and the suffix Scaler makes them more visible.

:tada: This issue has been resolved in version 0.14.0 :tada:
The release is available on:

v0.14.0
GitHub release

Your semantic-release bot :package::rocket:


Add iCal Support

I feel it will be nice to be able to push public iCal calendars to this website.

Looking at this a second time, it doesn't appear that this would be possible since GitHub requires the backend be contained within the repository. So we we can render things that read read static content, and basic blogging is possible by saving to the repository, but any sort of dynamic storage is not possible.


MVP goals

A use can add a Registry, the contents of the registry are discovered
As a result Image objects are created.
For each Image, we generate a SBOM which is saved into a dedicated CRD
For each SBOM, we generate the vulnerability report and save that into a dedicated CRD

The following features are out of scope:

Cron job/scheduling of rescans
Defining CRDs that trigger the scan of an image/registry
De-duplication of the SBOMs, vulnerability reports

This can be closed, the goals of the POC have been achieved as of today (Dec 2nd 2024)


Refactoring for Angular 1.4.x upgrade

In order to upgrade to  the latest stable angular version we need to refactor some pieces of the application. We are doing some non-standard operations which aren't supported by Angular. The biggest offenders are:

mutating the resolve object in $routeProvider config - angular will copy the object when instantiated and ignore the mutations
Accessing $scope.$root instead of $rootScope - $scope.$root can be null

Also there are still a couple of endpoints which return plaintext but with application/json content-type header.

https://github.com/twosigma/beaker-notebook/pull/2763


Add package HolidAPI

This package is a collection of API wrappers to fetch holidays and do some code wizardry on them.

E: holidapi has an invalid method

Method should be "git", not "url".


[Idea] Any word completion

At first thanks guys for amazing work, I looking forward for vim tabs and workspace feature.
But it is another nice feature of vim that you may implement it is:
https://vim.fandom.com/wiki/Any_word_completion
In my setup of neovim i get at first completion from LSP(in oni case from vsc plugin ecosystem) then in same hint i get vim completion of words its super handy and speed up typing so much ;)
I think it wolulb be great to see this in oni, since editing is powered by vim i think you can get completion for words fairly easy ;) And once more thanks for great work ;)

Thanks @Miziak !

then in same hint i get vim completion of words its super handy and speed up typing so much ;)

Ah ya, definitely something I want to have available. I started a PR for it: https://github.com/onivim/oni2/pull/1227 - need to revive it and get it going again.

We now have keyword completion in latest nightly - implemented in #2575 and #2581 - let me know if you have any feedback on it :+1:


Horizontal scaling and High Availability (HA) clustering for Ocelot Config Server

Is horizontal scaling and high availability clustering supported by Ocelot Config Server? If so, can I safely run multiple instances against a single working directory?

Hi @mnowrot ,
we have a big inspect-IT environment in our company. So this was a point we have discussed. Our findings:

The agent do not need the configsrv to start, if the agent has before contact with the confisrv, there is a local copy for the agent-config. If there is no local copy, the agent is still there and is waiting for the configsrv, retrying to connect.
the config-file-directory (working directory) from the configsrv is a git-repo, so this way you could sync your different configsrv's. This task is not part of the inspect-IT solution, but could automated via scripts. This is the way we would solve this Task. We would solve with this way the "config drift" Problem for the stages. (every stage  in our infra has it on inspect-IT stack).
There is no technical need for HA of the configsrv. It is really stable and there are fallbacks (see 1.)
If you do HA, make a active/passive not active/active setup. It will help to get an overview (agent-status).
Do not share the working directory directly.

Regards

Thank you @mc-chaos - this replies my question fully.


Feature Request: Logseq-Agenda Gantt Chart

Search first

[X] I searched and no similar issues were found

What Happened?
Hello, I apologize for making an issue report for a feature request; I want to continue to use the Gantt Chart feature provided by the older version of Agenda.
Me and my student team have been relying on Agenda to get our project on time, and we would like to continue to see the Gantt and timeline feature on the newest 3.0 Logseq Agenda update!
Best,
Fenton
Reproduce the Bug
N/A
Screenshots
N/A
Environment Information
Windows 11 Home 64-bit 22H2 Build: 22621.2428 | Logseq Version: 0.9.2
Additional Context
No response
Are you willing to submit a PR? If you know how to fix the bug.

[ ] I'm willing to submit a PR (Thank you!)

Agenda3 will still support Gantt charts, but it will require some time for development. In the meantime, you can continue using Agenda2 as usual.

@haydenull Thank you for your work on the new release - it looks much simpler and more intuitive!
One feature missing right now is the project selection - Agenda3 seems to scan all files for unfinished TODOs, creating a huge backlog for me. Will there be a way to select only specific projects for scheduling, like in Agenda2?

Another missing feature is the time estimation - in Agenda2, I could write down the time of a task as 13:00-13:30, and the plugin would automatically find the proper start time and duration. Now, it only recognizes SCHEDULED, and for the duration, it recognizes the custom Agenda annotation. However, adding the latter is cumbersome without the GUI.

@mcopik Agenda3 has replaced “project” with a more flexible filter. We can discuss this in the issue. https://github.com/haydenull/logseq-plugin-agenda/issues/216
Agenda3 will try to use native syntax as much as possible, so custom syntax 13:00-13:30 is not currently supported.


🚀💻  Define profile for datapackage.json

Describe the feature you want and how it meets your needs or solves a problem

As a , I want  so that .
As a user, I'd like to know if my datapackage.json is valid for TIDES...not the more general datapackage.json.
Describe the solution you'd like

[ ] Define a tides-datapackage profile in /spec which has more requirements and defined fields than the tabular-datapackage profile.
[ ] Validate that tides-datapackage.json profile is consistent with the profile definition
[ ] Validate that all datapackage.json files in sample dir reference and are consistent with tides-datapackage profile.

Describe alternatives you've considered

Additional context

Tagging in @e-lo, @j-meelah, and @botanize because all three of y'all contributed to review/acceptance for the initial schema definitions, which included the initial spec JSON that references the desired tides-data-package profile.
What specific additional properties or behaviors did you have in mind for the tides-data-package profile that aren't present on the underlying tabular-data-package profile? On first glance, it looks like the required property under resources is an addition to the underlying tabular data resource, but I also see some old conversation indicating that its presence may not be necessary. Is there a canonical place where the extended requirements we wish to impose on (or extend from) the underlying profile are outlined?

@SorenSpicknall can you submit PRs addressing the final two check-boxes? This is related to some of the other CI work that I think you are working on.


Elastic IP management for control plane

Initially, this issue got discussed in CAPP #141.
The problem statement: No Load balancer
Packet does not provide a load balancer, it means that you have to figure out a way to route traffic between Control Planes when running Kubernetes in HA otherwise you will end up having a single point of failure (SPOF) even if you run k8s HA. Because only the Node that has the Elastic IP attached to it gets traffic.
When looking at how other cloud providers solve this issue it is clear that an externally managed load balancer will make this implementation straightforward. Your cluster gets a load balancer and all the control planes are registered there.
But we do not have a load balancer
We evaluated a couple of different ways originally to get around this problem, I will summarize them here

BGP at Control Plane device level with bird or equivalent. This will may work but it will conflict with MetalLB. The load balancer implementation that we ship with Kubernetes via CCM #53 because we will end up having two BGP communications ongoing from the same node, one from bird and one from MetalLB. This can potentially confuse the router.

MetalLB for Control Plane. This is a nice and clean solution in theory, but in practice, it is hard to implement. You need to have a  control plane up and running in order to place a Service type=LoadBalancer (managed by MetalLB) in front of the API Servers. But you can not have a reachable API Server until you get the right ElasticIP assigned to the Load Balancer. 🔁

Write a control loop based on time (every 6sec for example) that will check the status of the ElasticIP, if it does not respond it can be attached to another control plane because it means that the current one is broken.

We discussed the pros and cons in the other issue linked above.
This is a CCM issue... maybe
We are moving the conversation here because we think this is a better home for this kind of feature. Kubernetes HA on Packet is something that does not require ClusterAPI. Kubernetes clusters can be provisioned via Terraform or other tools. Fixing this issue here will make everybody using Kubernetes on Packet and CCM capable of using this feature.

This is a good summary of the issue. Here is what we agreed between us on the call:

CCM will be responsible for managing an EIP's attachment to a control plane node if the EIP exists already
CCM will have a default tag that it will look for on the EIP, configurable
If no EIP exists with the provided tag, CCM will log a message like, "no EIP with tag  found, EIP management disabled" (or similar)and ignore it
during its timed control loop, CCM will do the following:

get the EIP with the provided tag from the Packet API
get the control plane nodes from the k8s API
attempt to reach the control plane health check URL on each node on their IP:port, and via the EIP:port
if all nodes succeed and EIP fails, nothing to do, log a message
if the EIP fails and the node it is connected to fails, switch the EIP to a working node

CCM can have the tag to use set to override the default. It can be set using the env var PACKET_EIP_TAG or from the secret with the property eipTag
The retries between attempts and timeout should be configurable, but can start hard-coded.

Note that it can take long enough to test all of the nodes and the EIP, with retries and backoff, that this should have a conflict resolver. E.g. in the loop, before starting a new range of health checks, first check if one is in process.

CCM will have a default tag that it will look for on the EIP, configurable

This changed along the way, we won't have a default tag as far as I know because we will use the empty configuration as a way to enable/disable the feature itself.

Updated.


rancher-logging kube-audit pods should only run on CP nodes

Issue description:
rancher-logging 101.0.0+up3.17.7
If you enable kubeAudit logging in the rancher-logging app, the rancher-logging-kube-audit-fluentd DaemonSet pods should only run on CP nodes.
Business impact:
Why the ds would run on nodes without the audit logs? It consumes resources that are not needed on worker nodes.
Repro steps:

on cluster with a mix of master nodes and worker only nodes install rancher-logging 101.0.0+up3.17.7
check which nodes the rancher-logging-kube-audit-fluentd pods run on

Actual behavior:
kube-audit pods runs on all node roles
Expected behavior:
kube-audit pods run only on CP nodes

https://github.com/rancher/charts/pull/2365 resolves this

@sanjay920 I'm seeing two of the pods still running on worker nodes, but admittedly I'm not very familiar with logging/kubeAudit so I don't know if this is expected or if this issue should be reopened.

Seems only one of the workloads (fluentbit) got the node selector instead of all of them as suggested should happen in the comments.

This is the intended behaviour.  The fluentbit pods are responsible for collecting the kube audit logs and so should only run on controlplane nodes.  These logs are then aggregated to fluentd which is responsible for shipping to the logging store.  Fluentd runs as a statefulset not as a daemonset and due to its role it is appropriate for it to run on worker nodes.

Pass verified in rancher v2.7-head commit ID 95edd02

installed rancher-logging:102.0.0+up3.17.10
enabled fluentd kube audit
verified rancher-logging-kube-audit-fluentbit only running on cp node


Parsing additional query parameters

In addition to the config parameter, would it be possible to add functionality to parse positional data from the query string?
&uid=<viewconfuid>
&view_uid=<viewinviewconf>
&assembly=<assembly>
&chr1=<start chrom>
&start1=<start1>
&end1=<end1>
&chr2=<start chrom>
&start2=<start1>
&end2=<end1>

Perhaps some parameters are optional:
The assembly key (hg38, etc.) would be used to look up chromosome sizes, to map coordinates to higlass space. If this key is not specified, it would be extracted from the default or specified viewconf.
If uid is not specified, it may be useful to extract the default viewconf for the first view_uid key. Or, if uid is specified and view_uid is not, parse the viewconf for the first key in its view ID array.
If chr2/start2/stop2 are not specified, then they could be copied from chr1/start1/stop1.

Thanks for bringing this up. There are some things to keep in mind that, which could get hairy:

If no assembly is specified, getting the default, requires us to define how the  default is defined. Should it be the first centered heatmap? Or simply the first HeatmapTrack instances? Which view should the define the default default assembly? What shall we do when different assemblies are used in different views? HiGlass doesn't really warn about things like these.
As a first step I could imagine just enforcing the assembly parameter and showing a message if it's missing. The second step would require some new API endpoints on the hglib side.

Instead of start1, end1, start2, end2 quadruples I personally find triples (pos1, pos2, zoomlevel) easier to handle, where the center is set to pos1, pos2, zoomlevel. Isn't it often more about the zoom level and less about the absolute extent of a location?

Right now what you propose as uid is the same as config if I understand correctly? I don't mind changing the name but I personally hate the word uid with a passion 😇 because throughout the HiGlass infrastructure we're using uid and uuid for the same thing and I never know which one to use. Also, I understood, from a user perspective, why I have to type 3 or even 4 characters when id is clear enough. Hence, I would propose calling it id 🤓. Any objections? Things I am missing / not considering?
Could you elaborate a bit more on what <viewinviewconf> is suppose to be. Are you envisioning to be able to specify the location of several views within a viewconf at once?

The motivation makes total sense but I would not replicate the functionality of zoomTo() 1-to-1. For example, I am not sure view-independent zooming via URL params are user friendly. How do I find out about the view_uid without knowing the underlying viewconf? Also, the number of parameters to parse in the URL could be pretty high. E.g., imagine a 3x2 view with 8 params each. :)
I would keep it simple and only allow setting the location for all views at once. For more advanced use cases one can use the JS API. Or simply create a viewconf that already contains the locations for every view. I chatted with Pete about this a few days ago and we looked into Google Maps which provides 3 parameters for setting a specific location: longitude, latitude, and zoomlevel (https://www.google.com/maps/@42.3765752,-71.1196475,16.27z). To me this makes a lot of sense because when I look at a loop for example and want to send its location to my friends, specifying the x-y extent can dramatically change the zoom level depending on their screen size (e.g., 27" vs a tablet) and they might not see the same pattern as I do until they adjust the zoom level.
@pkerpedjiev That makes me wonder: should update zoomTo to support centering all views to at a specific location and zoom level?
Either way, feel free to object to my ideas :)

If all views are zoomed to the specified position and zoom level, then two level context-overview views would get clobbered. You would lose the differential zoom.
You're right about the view ids though. Maybe we can do something like specify the index of the view in the viewconf? So one could effectively say something like "move the 2nd view to this position". Of course we have no way of keeping track of the order of the views but it would be easier to try indexes like 0, 1, or 2 rather than uuids. The downside is that that may cause confusion with view_uuids.


vim9script offers significant improvements over the legacy script

That's true, though I though these mainly apply to them as scripting languages rather than for command-line.
The one such listed advantage applying to the latter seems to be Unicode handling.
Is there any difference between :vim9script :%substitute and %substitute, say in speed?

Not in this case. :s is handled by native C code, not vim script. You can verify like this: :let x = reltime() | %s/foo/bar/ | echom x->reltime()->reltimestr() vs :vim9 g:x = reltime() | %s/27/bar/ | echom g:x->reltime()->reltimestr(). On a 20M file they both take 1.04 seconds, when I measured.
This link says vim9 is 10-100x faster.

Thank you. So while the Vimscript syntax takes some time to getting used to, for single shot commands there's no speed benefit. So on the command-line, Vim9script's benefits are rather more digestible syntax and Unicode handling.

"Vim9script's benefits are rather more digestible syntax and Unicode handling"
That is absolutely correct.
On a different note, vim9script does not complete global variable or functions (like let g:<tab> or call g:<tab> in wildmenu legacy script). This should be fixed in Vim.


Different results using skorch and my training function

I was trying to translate my codes to use braindecode. Previously I had a function train that took pytorch neural net and trained model. Now I wanted to replace this function with skorch classifier. I created an example that should use the same network, the same parameters and the same dataset and it gives different results (with my train function it gives 1.0 train accuracy after around 10-15 epoch instead of not even similar results after 50 epochs). On my dataset it does not work at all, so that is why I got interested in the skorch performance.
I'm stuck and I don't have any idea what causes this behavior. If anyone has some time and would like to help me here is a link to the python file with the example, maybe fresh look can help https://github.com/sliwy/braindecode/blob/strange_example/examples/skorch_slow_learning.py

Today I will submit an issue to skorch, to ask what is the difference between skorch training loop and the on defined by me. I saved numpy arrays to remove not needed data processing and include everything except model defininton in one file https://github.com/sliwy/braindecode/blob/strange_example/examples/skorch_ext_example.py
Let you know if I know anything new.

I'm closing it as I've found the reason, in my train function there was a typo and I was setting model to train mode only at the beginning of training. After first validation step the model was in eval mode till the end of training.

I see, great catch. Then it means that in your case it is actually better to train in eval mode?


Document audit event logger

Is your feature request related to a problem? Please describe.
Documentation needed for the audit event logger.
Describe the solution you'd like
Refine documentation for the audit event logger. Include lack of tenant identity.
Describe alternatives you've considered
n/a
Additional context
n/a
Related to: https://github.com/IBM/FHIR/issues/1531

In CADF we log the tenantId
new CadfResource.Builder(logEntry.getTenantId() + "@" + logEntry.getComponentId(),

Closing out per discussion with Liz


No pictures found in English film view

film -> layout.png
Issue cause:
- filmslug = filmslugs[my_path]
In English view (incorrect):
my_path = en/the-goddess-of-fortune
In Estonian view (correct):
my_path = the-goddess-of-fortune

Fixed, needs separate branch and commit etc (will do later).


[AutoPR sql/resource-manager] Add deprecated Extensions_Get for completeness

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/7250

(message created by the CI based on PR content)

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/7330


Link 'sizes' property is DOMTokenList type not string

Here's an error:
Turns out HTMLLinkElement property 'sizes' is set to DOMTokenList which isn't meant to be serialized/deserialized. I think the best course of action is to override the type to string.

Hey @gvkhna, thank you for reporting this. Would you be willing to submit a PR for this?

That should be all that is needed but there is lack of instructions for building/testing and I don't have time to work on this further. If you can take a look that would be great. Thanks!


gorelease file is out of date, using deprecated syntax

I'm updating goreleaser locally and using gorelease check to fix the errors.

I'm updating goreleaser locally and using gorelease check to fix the errors.


cant't register to consul

When you add go.mod to github.com/micro/go-web spceify dependent github.com/micro/go-micro v0.23.0 at https://github.com/micro/go-web/blob/master/go.mod#L7. But you have breaking changes after 0.2x.x on go-micro, cause I can't register web and srv to consul registry.
example code:
// web.go
package main

import (
	"github.com/micro/go-web"
)

func main() {
	service := web.NewService(
		web.Name("go.micro.web.test"),
		web.Version("0.0.1"),
	)
	service.Init()
	if err := service.Run(); err != nil {
		print("some error")
	}
}

// srv.go
package main

import (
	"github.com/micro/go-micro"
)

func main() {
	service := micro.NewService(
		micro.Name("go.micro.srv.test"),
		micro.Version("0.0.1"),
	)
	service.Init()
	if err := service.Run(); err != nil {
		print("some error")
	}
}

then run the service
consul agent -dev

go run web.go
go run srv.go

I don't see them on consul services list, I have trouble for days

That's because MDNS becomes the default registry after version 0.21.0.
Please refer here for change log and work around: https://github.com/micro/go-micro/releases/tag/v0.21.0

@eyasliu try:
use the flag --registry=consul
$ go run web.go --registry=consul

it work, thx! @leninhasda @printfcoder


Fix crash

when play sound happens too early (world join) and level is still null
fix concurrent modification exception
removed the project root rename since that causes issue if you do a fresh checkout (as project name will be LootBemas not lootbeams)

already have all of these fixed on local - this PR also doesn't fix the CME

tru i guess gotta use ConcurrentHashMap


remove dependency on Images

AFAIK, there's no need to let histogram algorithms depends on Images.jl, even if we do, we should reduce the dependency to other submodules.
I'm pretty sure that you know this, just open it as a memo

@JuliaRegistrator register()

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/1106
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
git tag -a v0.2.2 -m "<description of version>" a3f4afff65496c8f890486a0386aed99ccc62fe0
git push origin v0.2.2

Registration pull request created: JuliaRegistries/General/1106
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
git tag -a v0.2.2 -m "<description of version>" a3f4afff65496c8f890486a0386aed99ccc62fe0
git push origin v0.2.2


Convert your project to react js

I want to convert your project into react js so that it will be easy for the contributors to implement new features in your wbsite please assign me this issue under GSSOC'24

Hello , as a Contributor in GS'SOC 2024 I am looking forward on working and contributing in this project .
I've developed skills in JAVA , C , Javascript ,Python , WEB development and basic Machine Learning ,currently under Artificial Intelligence training on implementing AI tools ,exploring more in tech.

Hey you raise your own issue it is my issue

Hey I am frontend developer and i make stunning and modern websites in React.js.
I have done internship in frontend developer.
So i have better experience with making the websites in react.
The following are my some works made in react :
https://ochi-clone-parth.netlify.app/
https://exoape-clone-parth.netlify.app/

Hey, I want to contribute to this project. I am a MERN stack developer and I have worked on several projects and won hackathons as well. I can convert whole project into Reactjs.
Here's my linkedin profile : https://www.linkedin.com/in/nakshatravyas/
Github profile : https://github.com/nakshatravyas

hey it is my issue you raise your own issue

Converting the entire project to reactjs is not required right now.


About data split

Thanks for your contribution. I noted that the evaluation set includes 40 CT and 40 MRI volumes. Would it be possible for you to share the specific data split used for this set? Furthermore, according to your description, it seems that all test data from the KiTS dataset were interpolated to a uniform size of 512^3 prior to training. Could you please confirm if this preprocessing was applied consistently across the entire KiTS test dataset?

Hello. Thank you for the awesome work. I have similar questions about the training dataset up. It was mentioned in the paper that all CT volumes are resized to 512*512*512 with nearest neighbour interpolation. However, this pre-processing is not found in the current repository.
May I check if this is done before downsampling HR to LR for training and evaluation or after? For example, let’s say the original CT volume is 96*512*512. Do I upsample the volume to 512*512*512 first, use a 256*256*256 volume to train CuNeRF, and evaluate performance with the 512*512*512 volume?
Or do I downsample the volume to 48*256*256 first? And then upsample the volume to 512*512*512 for training and then evaluate with the 96*512*512 volume?
Any input is appreciated. Thank you in advance :D


Export of error classes as values prevents use as types

DB Errors are exported from objection in objection/typings/objection/index.d.ts.
  const DBError: typeof dbErrors.DBError;
  const DataError: typeof dbErrors.DataError;
  …snip…
  const NotNullViolationError: typeof dbErrors.NotNullViolationError;

The errors are classes that could be used as types if exported differently but the export as value prevents use as a type.
import { UniqueViolationError } from 'objection'

export class UserExists extends Error {
  // typescript error:
  // 'UniqueViolationError' refers to a value, but is being used as a type here. Did you mean 'typeof UniqueViolationError' ts(2749)
  error: UniqueViolationError
}

Exporting the classes directly rather than as a variable would allow them to be used as types.
I'd be happy to put up a PR if someone is able to guide me on what's preferred here.

Is the "correct" way to deal with this to import the errors directly from db-errors instead of from objection?

This is resolved for me by importing the errors direct from db-errors.


Einthusan extractor seems broken.

[x] I've verified and I assure that I'm running youtube-dl 2016.09.19

Before submitting an issue make sure you have:

[x] At least skimmed through README and most notably FAQ and BUGS sections
[x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

[x] Bug report (encountered problems with youtube-dl)

youtube-dl -v http://www.einthusan.com/movies/watch.php?id=2447
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.einthusan.com/movies/watch.php?id=2447']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.19
[debug] Python version 2.7.12 - Linux-4.4.0-38-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.6-1ubuntu2, ffprobe 2.8.6-1ubuntu2, rtmpdump 2.4
[debug] Proxy map: {}
[Einthusan] 2447: Downloading webpage
[Einthusan] 2447: Downloading webpage
[debug] Invoking downloader on u''
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 449, in main
    _real_main(argv)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 439, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1791, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 705, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 751, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1435, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1699, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1641, in dl
    return fd.download(name, info)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/downloader/common.py", line 354, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 2001, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 421, in open
    protocol = req.get_type()
  File "/usr/lib/python2.7/urllib2.py", line 283, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type:
...
<end of log>

Description of your issue, suggested solution and other information
Trying to download one of the videos in the TESTS, didn't work. Video plays fine in browser

A ping to @dstftw as he has seemed to fix the parser in the past.  =)

There are minor changes at their side. Thanks for the report.


Behavior described in Pre-Existing Threads doesn't match user's experience

The note in the "Chats and calls from pre-existing threads" section indicates that an existing thread between a Teams user (User A) and a Skype for Business user (User B) will become disabled once User B is upgraded to Teams because the interop no longer has a path to deliver the conversation to SfB.
In our experience, though, the old interop thread remains available and active.  Further, in most cases the Teams client even seems to prefer it over a Teams-to-Teams thread between the same user.  For example, if User A has two threads with User B (one interop thread from before User B switched to Teams only, and one native thread), when User A searches for User B, the Teams client opens the interop thread, not the newer one.  In many cases it also displays a message above the compose box in the native Teams thread indicating that "User B has switched to Skype for Business" and shows a link directing the user to "Start a new chat," which takes the user to the interop thread.
This is extremely confusing to the users.  We have opened a case with Support to identify if this is a bug, or if the functionality described here is not yet enabled.  Can you confirm if the behavior described here should be live for all tenants?

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

ID: 169a20a6-ebf7-1093-3cb1-fb438b9b7e13
Version Independent ID: b2074fd8-724e-75fa-bafb-a0f7966bf593
Content: Coexistence with Skype for Business
Content Source: Teams/coexistence-chat-calls-presence.md
Service: msteams
GitHub Login: @jambirk
Microsoft Alias: francoid

We're currently having the same problem. Unfortunately we've had other issues with documentation here, and it seems like the documentation written is how they want it to work, not actually how it is working.

Thank you for reporting.
The behavior described is accurate and in production. There is no issue with the documentation.
You must be hitting an issue where policies recently changed for a user take a long time to be followed by the client. We are actively working to improve that.
In the interim, you can ask your support person to open an ICM and request urgent whitelisting for the fix.

What’s icm?
Also if this is expected there needs to be documentation stating what is expected. We are having it happen for more than 24 hours after switching to teams and a ticket I opened 20 hours ago has gone ignored by Microsoft support.

@FrancoiD We have this same problem and are waiting for a response from support on getting “whitelisted” for the fix. Even with this fix, it’s my understanding from the support engineer that it can still take up to 24 hours for the change to fully take effect. That’s nowhere in the docs and needs to be clearly called out, in my opinion. He also didn’t mention that it would block the interop threads from working, as the docs indicate will happen. Is that still an accurate desicription of how the service works?
It’s been frustrating that many Teams docs seem to describe a to-be state for the service, not an as-is. I understand changes & features may roll out in waves, but the docs need to indicate something like “this behavior is currently rolling out with an expected completion of March 2019” or whatever is appropriate. Without it, as a customer I have to assume the docs describe how the product actually works, which more frequently seems like it’s not the case.
@StuBeck32 It took almost 2 weeks for our ticket to be assigned and worked, and that was only after several times engaging our TAM for escalation. Not sure what’s going on there, but if you have a TAM, definitely ask them for assistance.

@mschultz-bcbsne : the reason why the policy aspect is relevant here is that the client will disable the thread and offer a new thread once it knows that the recipient policy has changed. As long as it does not know of the policy change, the client can't do that.
The docs do describe the behavior once the policy is set. The behavior is not rolling out, it is implemented as such, as soon as the client has the policy.
Here we are facing a short term issue of policy latency. We are working hard to resolve that issue. Once it is resolved, you will observe the behavior as described on a consistent basis.
Until we have completed roll out of the policy latency fix, affected customers should indeed work with support and raise an ICM (that's a specific type of incident management process) which will enable us to whitelist them for the fix. Again, that's not a change in the behavior as described, only ensures the policy lands without the latency.

If it’s relevant please document it. Thanks.

Hi Stu, what I am saying above is that it's only relevant in the context of the temporary policy latency we are experiencing, not as a matter of the ongoing principle that this documentation is providing (as are other documentations on other behavior also potentially affected by policy latency). If anything, it's not here that policy latency issues should be documented. Let me explore whether we have a mechanism to expose that issue and its resolution. Thank you

Thanks. It’s clear we won’t agree about what should be stated way.
There needs to be a central means of showing this is an issue though. It’s likely out of context for here, but this should be on the office 365 portal as an advisory for example or as a notice when making changes. It could also be in the updated documentation for switching to teams as an issue which needs to be known.

We agree on a central means, let me discuss that internally.

Just as a followup, we're still having this issue 16 days later. The users have been switched over and this can't be the latency issue as the changes needed are never taking effect.

@Stubeck32 do you still see the issue?

Yep. Support gave up on trying to help

@StuBeck32  - have you tried asking your users to log out and back in?  In extreme cases we also asked them to clear their local cache in Teams by deleting these folders
%appdata%\Microsoft\teams\application cache\cache
%appdata%\Microsoft\teams\blob_storage
%appdata%\Microsoft\teams\Cache
%appdata%\Microsoft\teams\databases
%appdata%\Microsoft\teams\GPUcache
%appdata%\Microsoft\teams\IndexedDB
%appdata%\Microsoft\teams\Local Storage
%appdata%\Microsoft\teams\tmp

Yep, gone through all of that multiple times. My hunch is its caused by the switch over from SFB to Teams as the default, as we can no longer set users to "Org Wide settings" as it produces an error. We had no problems with this with moving two users over last year, but now that its "ready" we're having a lot more issues.
I was planning to have everyone switched over to Teams by now, but rather than doing this as a stepped approach, since SFB to Teams and back communication isn't supported, I'm going to have to switch everyone all at once. Its going to be a bit of a training nightmare.

@jambirk Hi James, any updates on this issues? Thanks!

@FrancoiD  please advise on what action to take, or whether to close thi issue.

@FrancoiD Hi, any updates on this issue?

I hit this every day.... any update?

There won’t be an update. It’s a known issue but with the impending forced switch to Teams it’s not something they will fix.

@mschultz-bcbsne, @StuBeck32 @Jetski5822  - thank you for engaging with the community here for the docs.
I know the product teams are always looking for user feedback and how to make Skype for Business better. They keep a close tab on user feedback and it would be awesome if you could add your voice in User Voice  https://www.skypefeedback.com.
You might find others have made a similar request that you can add to, or you can open a new one. Let us know here if you do so we can up-vote your request.
Thank you for your contribution to make the docs better! Much appreciated!

@officedocsbot close


Pull request for libavcodec-extra-53

For travis-ci/travis-ci#4349.
Ran tests and found no setuid bits.
See https://travis-ci.org/travis-ci/apt-whitelist-checker/builds/72054270

Sorry, but this test will have to be re-run. Will open a new one later.


AWS Lambda Python 3.9 support

Environment
AWS Lambda with Python 3.9 runtime.
Sentry sdk version sentry-sdk==1.3.1
Steps to Reproduce

Change lambda runtime to Python 3.9
Raise exception

Expected Result
Error should appear in the sentry dashboard.
Actual Result
Nothing happens.
I found that in Python 3.9 runtime, AWS has changed bootstrap location, so  return sys.modules["__main__"].bootstrap this is not working anymore.
I fixed it with this sys.modules["__main__"].awslambdaricmain.bootstrap

@AbhiPrasad any plan to prioritize this or any hint how to contribute?

I've just upgraded to 3.9 and have spent about an hour figuring out why my exceptions are not being logged anymore :-/

This is on our radar - we’ll take a look ASAP to try to merge in the PR and see if we need further fixes/adjustments.

Hello! What is the status of this issue?

Hey @kvey, there is a PR open that seems to have slowed down. We've not gotten the bandwidth to focus on this yet, so any contributions or help is greatly appreciated!

Tried the fix @fprochazka suggested but sadly didn't work. Sadly have had to downgrade to 3.8 instead.

I was able to trick sentry in finding it by doing this:
from sentry_sdk.integrations.aws_lambda import get_lambda_bootstrap

detected_bootstrap = get_lambda_bootstrap()
sys.modules['bootstrap'] = detected_bootstrap.awslambdaricmain.bootstrap

sentry_sdk.init()

I was able to trick sentry in finding it by doing this:
import sys
from sentry_sdk.integrations.aws_lambda import get_lambda_bootstrap

sys.modules['bootstrap'] = get_lambda_bootstrap().awslambdaricmain.bootstrap
sentry_sdk.init()

@jonapich this is very helpful. Just tested and it works like a charm. The transactions are coming back.

This should be released as part of SDK version 1.5.0, thanks to the excellent work of both @razumeiko and @tomscytale in #1239

I was able to trick sentry in finding it by doing this:
import sys
from sentry_sdk.integrations.aws_lambda import get_lambda_bootstrap

sys.modules['bootstrap'] = get_lambda_bootstrap().awslambdaricmain.bootstrap
sentry_sdk.init()

@jonapich this is very helpful. Just tested and it works like a charm. The transactions are coming back.

Anyone using this workaround, please make sure it is removed before upgrading to 1.5.0, otherwise you will see this error:
  File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/var/task/dev/sync_prod_data.py", line 10, in <module>
    from shared.logger import logger
  File "/var/task/shared/logger.py", line 13, in <module>
    sentry.init()
  File "/var/task/shared/sentry.py", line 27, in init
    sys.modules["bootstrap"] = bootstrap.awslambdaricmain.bootstrap

I've just deployed 1.5.0 and the problem is fixed, thank you!


Can't scroll down on map modal

When I'm in the map modal (this view):

I can scroll side-to-side, but I can't scroll down to see the rest of the map. It looks like when I try to scroll up and down, the info behind the map scrolls up and down instead of the map.
I'm using a scrolling gesture on a Mac laptop trackpad, using Chrome, browser window at about 1340x690.
It's not a blocker or anything since we also have the list.

Oh, wow! Can confirm - I suspect something's changed because it used to let you scroll when your window was smaller than the map.

(Chromium, Firefox on Ubuntu)


Refs #34060 -- Fixed crash when filtering against literal JSON with psycopg2.

Per https://github.com/django/django/pull/17855#issuecomment-1946528690

@charettes Thanks :+1:


help-fns+ and other packages  cannot be installed.

Observed behavior
In China, help-fns+ and other packages not installed by package.el cannot be installed.
Expected behavior
All packages are installed normally
Steps to reproduce

Copy init.example.el to init.el
run make install

System information

Click to expand
DOOM Doctor
Running Emacs v26.1, commit 5dacbb7cb1c6ac246a9ccd15e6c4290def67757c

shell: /bin/zsh
Compiled with:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
  ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
  TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2
uname -a:
  Linux mxre 4.18.5-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 24 12:48:58 UTC
  2018 x86_64 GNU/Linux

Attempt to load DOOM: success!

You may also understand the special situation of China's Internet.
I don't expect to solve this problem (because it may be necessary to put the source code of these packages into this repo like spacemacs, which may not be what you want.), I just want to ask where I should download these packages?

It appears you're using the master branch. Please switch to develop, which is more than 3000+ commits ahead of master. This issue has been resolved there (along with many others). I am planning a big merge soon, but it'll take a little longer while I'm traveling.

thanks.


IsValid on Optional Mask returning false

Why would this return false
var isValid =Inputmask.isValid(maskedString, { alias: "99-99 [99/99]"});
If my input was 03-11
I also tried with including the space var isValid =Inputmask.isValid(maskedString, { alias: "99-99[ 99/99]"});
still returns false.

@pricejt ,
I will verify & fix the issue, but I'm very busy on the dependencyLib.  So some patience.
The vanilla dependency is finished but all unittest need to be updated and that are a lot of tests. ;-/

@pricejt ,
Works in the latest version.
http://jsfiddle.net/7vkpwzwm/1/

@RobinHerbots ,
How do i pull only the part of the mask that is filled in?
For example my mask is 99-99[ 99/99]
If the user only enters 03-11
If i pull the value from the text box the user is entering in the value will equal
03-11 /
which is valid returns false
var isValid =Inputmask.isValid(maskedString, { alias: "99-99[ 99/99]"});
https://jsfiddle.net/za3omccc/

@pricejt ,
Hmm, ... have a look at https://jsfiddle.net/za3omccc/1/, but that is not exactly what you want.
Normally you should not check wheter the value is valid in the onComplete as that function already implies that it is valid.  The isValid function is very strict in validation.
Getting the unmaskedvalue is also not an option because then you will get 0311 instead of 03-11.
I will make the return value the same as you see on the screen.  When the clearMaskOnLostFocus, the trailing tail will be cleared in the value when it is optional.  (as you see in the UI side)

@RobinHerbots ,
Alright i don't know why i had the check for is valid that might of been so old code. I will just remove it. Sorry about that.


Spigot 1.8.3 Issue

I am not sure if it's me. But seems like PEX is a little buggy with 1.8.3. Is there is going to be a compatible version?
Because I have a prison server and it seems like the commands doesnt want to still to the player.

use /pex reload after changing things?

The latest version is 1.8.3 compatible. I'm not sure if you have any specific complaint here, so I'm going to close this. If you feel like you have an actual issue you can explain, open another issue.


Invoking the Hello World lambda function locally returns nothing

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug

Create a "Hello World" lambda function.
Invoking the function locally returns nothing.

$ amplify function invoke myLambda
Using service: Lambda, provided by: awscloudformation
? Provide the name of the file that contains your handler function: index.js
? Provide the name of the handler function to invoke: handler
? Provide the relative path to the event JSON object: event.json
Testing function locally

No errors and no response data. The function name is correct - retrieved from the amplify status command results.

The function is simply the "Hello World" function example provided.
The event.json test data I've tried is:
{
    "httpMethod": "GET",
    "path": "/generate"
}

and the original example
{
  "key1": "value1",
  "key2": "value2",
  "key3": "value3"
}

The function worlds once deployed and testing from the browser.
Amplify CLI Version
4.17.2
To Reproduce
As above ^
Expected behavior
The same result as when invoking via the browser.
"Hello from Lambda!"
Desktop (please complete the following information):

Ubuntu 18.04
Node v 12.11.1

Hi @kylekirkby, we now use amplify mock <yourFunction> for this functionality. Could you give that a try and see if this issue persists?

@kylekirkby please upgrade to the 4.18.0 version and use the above command to invoke it locally.

This issue is still going on, in 4.18 if I init a new amplify function, edit nothing,  push it to the cloud, it errors and says "CustomMessage failed with error index.handler is undefined or not exported."

This issue is still going on, in 4.18 if I init a new amplify function, edit nothing, push it to the cloud, it errors and says "CustomMessage failed with error index.handler is undefined or not exported."

getting the same error as @stevelizcano

@stevelizcano @reefloretto This is a known issue that we have a fix for (https://github.com/aws-amplify/amplify-cli/pull/3928), it is pending a release. As a workaround you can move the index.js file to your src folder and do a push.


How to show a small placeholder image by using UIViewContentModeCenter?

Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

[x] I have read the wiki page and cheat sheet, but there is no information I need.
[x] I have searched in existing issues, but did not find a same one.
[x] I want to reoprt a problem instead of asking a question. It'd better to use kingfisher tag in Stack Overflow to ask a question.

Issue Description
Is there a way to set a small logo image displayed in center as a placeholder image?

Running into the same problem. Tried the above suggestions:

The custom Placeholder way. I couldn't get it work. Somehow remove(from:) is never called.
Set content mode before and after setImage. It works, but the change of content mode at the end is noticeable. Not ideal.

In general, what I would like to achieve is, being able to set a different content mode for placeholder. Any other solution?

imageView.contentMode = .center
        imageView.image = UIImage(named: "placeholder")
        KingfisherManager.shared.retrieveImage(with: previewURL, completionHandler: { [weak self] (result) in
            if let image = try? result.get().image {
                self?.imageView.contentMode = .scaleAspectFit
                self?.imageView.image = image
            }
        })

extension UIImageView {
func set(link: String) {
set(url: URL(string: link))
}
func set(url: URL?) {
    let previousContentMode = self.contentMode
    contentMode = .center
    kf.setImage(with: url, placeholder: UIImage(named: "placeholder")) { result in
        switch result {
        case .success(let downlodedImage):
            self.image = downlodedImage.image
            self.contentMode = previousContentMode
        case .failure(_):
            self.image = UIImage(named: "placeholder")
        }
    }
}

}


cmd/govim: add test for hover balloons

This will, I suspect, be tricky unless we can fake the mouse position in Vim?

Raised https://github.com/vim/vim/issues/4210 as a proposal

Still pending the above Vim issue; the test_setmouse gets us part of the way there, but not quite (per  https://github.com/vim/vim/issues/4210#issuecomment-490567788)

This may well be superseded by #283 in time...


[Review] Zeel codder

Portfolio link
https://zeelcodder.tech/me/zeel
Code : https://github.com/zeel-codder/MyWebSitNextjs

Take a look at the alignment here

oh, Thanks. I will Fix It.
Thank You 😇

Nice clean design which works well on both mobile and desktop.
A few suggestions:

run a lighthouse check and fix the errors it flags
your links in the navigation are not reachable with the keyboard ie I can't tab to them
some of the animations are a little overwhelming, is it possible to reduce how much everything moves?

Repo Wise:

hide wiki if not using
add security policy, refer https://github.com/zeel-codder/MyWebSite/security
take a look at https://github.com/zeel-codder/MyWebSite/community

Website Wise:

It is currently "zeel" it should be "Zeel".

Looks great, some thoughts

hide packages if not being used
README is missing quickstart ...
Hide wiki tab if not using
Add Code of Conduct and License
.vscode should probably not be added to repo
commit messages could be improved

Review live stream https://www.youtube.com/watch?v=NxxJ_5nyG9E


Combat tracker - speed change causes additional post 12 recovery

Normal post 12 recovery happens:

The combat moves into turn 2 segment 2 and an attack causes a speed boost which causes a post 12 recovery

Generic check to prevent Post-Segment 12 running more than once per turn/round.


DockerComposeContainer with Selenium Grid example

Hi @rnorth, thanks for the good project!
However, I have several questions:

Do you have any samples of using DockerComposeContainer with Selenium Grid? I want to use official selenium images (hub, node-firefox-debug / node-chrome-debug) as separate containers to be able to scale them via docker-compose scale option. Not really sure if it's possible to pass scale image=N cmd args to already started containers.
Are you planning to add TestNG support? I noticed that you strictly dependent from JUnit Rules to be able to start / stop containers before / after test execution. What would be an effort to create a similar TestNG runner?

Hi,
Thank you :)
These are great questions!

No, I've not got an example of that use case, but it's an interesting one. I think that, probably, Testcontainers should have a .scale(String name, int size) method on the DockerComposeContainer class to allow containers to be scaled. There will be a bit of work needed under the covers to make this work, but it'd be nice.
Yes, with hindsight I wish I'd kept JUnit support as a separate module. For a future release, I think I'd like to break out JUnit support from core; this would make it much easier to use other test frameworks. In the meantime you could call the start() and stop() methods on a container object from TestNG BeforeTest/AfterTest methods. Of course, Testcontainers will still carry a JUnit classpath dependency, which is ugly...

Thanks
Richard

@rnorth thanks! Would be great to see these features soon.
By the way, I also noticed that BrowserWebDriverContainer is dependent from selenium/standalone-firefox(chrome)-debug images. With current approach we're able to run tests only in a single browser. But the main selenium grid's feature is in scaling. Would be nice to see some more generic container + specific child implementations. E.g. splitted hub / node / standalone containers, which could have existing class as a Base one (with some minimal updates).


Some UTF-8 characters changed into strange code after format

For example, after type let str = "阳" and save, the character 阳 changed into �\152�. I use vim to edit the same file and everything works fine.
Is it the problem with this plugin or merlin?

I think this is a known problem with refmt which is the upstream binary from the Reason project that handles the reformatting. Might be worth opening an issue for it there if there isn't already one.

thanks. will do.

I'm going to close this since it's an upstream issue.


[Feature Request] [RFC] Interface for Move

🚀 Feature Request
Motivation
Interface/trait is a key for creating abstractions for computer code. Historically ethereum was able to came up a number of well known interfaces such as erc20, erc72 that eventually became the de-facto standard for lots of applications in the blockchain community. As of now, Move doesn’t support any form of interfaces, neither statically nor dynmaically. However, this does imposed a huge problem for the Move ecosystem for smart contract authors. This document aims to go over the problem, and tries to propose a few solutions that could tackle the problem without compromising the core safety properties of Move.
What’s the current Problem?
As of now, Move only supports passing simple generic parameters without any trait bounds/interfaces. This implies that when a callee function is invoked with a generic parameter, the only thing that callee can do is to move the value of that generic type around, and there’s no way to dispatch different function calls based on the calling generic types.
This imposes a significant limitation for the modularity of Move. For example, when we want to write a generic uniswap contract for Move, it’s hard for the uniswap contract to invoke the corresponding transfer function for the buyer type and seller type.
How is that mitigated now?
There are two major ways to get around such limitations from my observation:
The more “idomatic Move” way is to use marker type for type parameters. So instead of having concrete type of WrappedEth and  WrappedSolana  as type argument, the contract will take a Coin<WrappedEth> and Coin<WrappedSolana> as argument. By doing so, the callee smart contract can invoke the generic transfer function that is defined under Coin module, and the token metadata can be found using borrow global on the marker type, ala WrappedEth and WrappedSolana. This is similar to what we did in diem-framework where we need to deal with different types of currencies.
Another way of doing this is a more brute force one: contract authors will simply try to bypass the limitation via reflection or runtime value. In both the aptos-framework and starcoin, there are functions that can return the name of the type. This allows caller to dispatch different calling methods by doing if statements on the identifier either returned from the runtime reflection or from the passed in type id.
What’s the flaw in the current mitigation?
Both mitigations has some significant flaws. For the “idomatic Move” way, Coin module is acting like the interface that provides generic functionality for token transfer. However, this is also implying that the implementations of Coin will be the one and only implementation of the token transfer and if some alternative party want to come up with an implementation of AltCoin  module that has exact same interface as Coin module but with some slightly different implementations, there’s no easy way for other defi contracts that calls into Coin module to swap the underlying implementation to AltCoin easily. The defi contract will need to recompile and republish the module that calls into AltCoin module instead.
Reflections and type id instead of types is also not a suggested approach. Firstly, there needs to be an exhaustive list of type ids that a callee can accept. This not only means a big block of if code in order to perform transfer based on the value of the type id, this also means that for every new type that the callee want to support, recompilation/rewritten of module is needed. Secondly, reflection/type_id can make verification so much harder as it is effectively introducing dynmaic dispatch and can potentially introduce other unexepected bugs as it bypasses the type system of Move.
Why don’t we have it now?
Interfaces are not implemented in Move intensionally, for multiple good reasons. Firstly, dynamic dispatching is not preferrable, as dynamic dispatching will complicate prover significantly, as you will no longer know the properties of the callee. Moreover, dynamic dispatching can potentially introduce reentrancy issues as you now might be able to invoke into yourself, which is the source of multiple notorious bugs in the solidity community.
However, static dispatch is also not easy to achieve in the blockchain setup. The main reason is that we publish codes by modules. Thus when a module gets published, it doesn’t necessarily know all the callers that might call into this module. Moreoever, it’s hard to do monomorphization for the exact same reason.
Pitch
The design here is simply an RFC now and the design principle I used here is to bring as minimal changes with how modules are organized in Move and aiming it to be a feature that is fully compatible Move code. This may not be the best/most ergonomic solution IMO and we should talk about the alternatives there.
The following idea was inspired mostly from ML’s module system. The idea is to introduce the concept of signature and functors into Move’s ecosystem. Signature is the type constraint for a module. Signature will describe the functions and types a module will need to implement. Functor is a special type of module that can have modules as its argument.
For example, a signature will look like following:
signature COIN =
sig
  struct T
  fun value(coin: &T): u64;
  fun split(coin: &mut T, value: u64): T;
  fun deposit(coin: &mut T, other: T);
end

A module can implements a signature. The syntax might look like following:
module 0xa::FooCoin: COIN {
  struct T {
    val: u64,
  }

  fun value(coin: &T): u64 { coin.val }
  fun split(coin: &mut T, value: u64): T {
    assert(coin.val > value);
    coin.val -= value;
    T { val: value }
  }

  fun deposit(coin: &mut T, other: T) {
    let T { val } = other;
		coin.val += val;
  }
}

Lastly we have functors that is essentially modules that can take modules as an argument:
functor 0xa::WalletMaker(C: COIN): WALLET {
   struct T {
     balance: C::T,
   }

   fun deposit(self: &mut T, coin: C::T) {
      C::deposit(&self.balance, coin)
   }
}

And other modules can call functions implemented functor only if all the modules has been passed in:
module 0xa::Bar {
   use WalletMaker(FooCoin) as W;

   fun bar(..) {
	W::deposit(..)
   }
}

There will be two ways to implement functors. One possibility would be that functor will only be a front end language support in move-lang and no extra support is needed in bytecode. In this setup, the compiler will need to do a monomorphization when a functor is instantiated with all of its arguments and a new module will need to be published as a result of this monomorphization. Functor also will become a completely off chain construct and there would be no ways to publish functors to chain directly, only the monomorphized module, which could be against the code reusing strategy for Move. A downside of this implementation is that name mangling would be required for the monomorphized module. In this sense, functor is just an example of a macro system for modules.
Another possibility is to introduce the concept of signature and functor into bytecode. This means that we will be able to publish functors into the on chain storage. Bytecode verifier will need to thus check if a module implements a specific signature. This would allow full on-chain dependency of functor and would make reusing on chain bytecode a lot easier. I would argue that using this approach would allow us to have full ethereum-like interface support in Move and allow us to create standards like ERC20/ERC721 inside Move.
Unknowns
However, how the functor/signature system could affect Move prover remains unknown to me. In the schema I just layed out, we still statically know all the instantiation of functors. However, it could be hard to verify the functor on its own as the implementation of the function is missing. We may want to add some spec to the signature in order to verify properties of functor.
[WIP] More examples/use cases of interfaces
Still working on this. Will update this section when I have more concrete examples.
Coin module and Wallet
Signature verification polymorphism
Container and Iterators

This imposes a significant limitation for the modularity of Move. For example, when we want to write a generic uniswap contract for Move, it’s hard for the uniswap contract to invoke the corresponding transfer function for the buyer type and seller type.

You can enforce this with a combination of hot potato like witnesses.
It's maybe not the most elegant thing, but it is doable.
In narrower cases, you can just use witness patterns (more on that below)

this approach would allow us to have full ethereum-like interface support in Move and allow us to create standards like ERC20/ERC721 inside Move.

I would argue that you don't need those standards in Move. Maybe @damirka would like to jump in. But would state that those standards exist from a lack of compositionally in Solidity/EVM. You cannot have values that pass between "contracts", at least not like is done with modules in Move. Witness patterns are then a powerful tool for ensuring that the "core" functionality is only invoked by the outer module. Which then lets the outer module add any additional functionality.
I think this then speaks to the downside of "interfaces", and then similarly so for signatures,  in that you really don't have any strong guarantees about what is going on inside of the interface/signature function.
In normal ML module systems, I don't think you care much about this fact since you are really just trying to reuse code in an elegant way. But in Move, I think you do care exactly what is going on inside of the core function (like split in your example). Our current composition approach feels good for that.
All this being said, I do think something like functors might be useful for code reuse. But I do not see them being necessarily useful for interfaces or similar patterns.

You can enforce this with a combination of hot potato like witnesses.

I don't think that possible. The key thing that we are missing IMO is the ability to dispatch function by types. As of now I think the polymorphism only comes from the fact that Coin<T> carries a generic type parameter. This means that for every downstream module who want to be benefited from the polymorphism behavior, they have to use Coin module and there can be no other module that has the same interface as Coin. This to me is a very unfortunate limitation to the ecosystem as we are essentially suggesting that for every token standard. Moreover, we will need a centralized registery for the type parameters that can be used for Coin<T>, which IMO is very much against the decentralization aspect of the ecosystem.

But would state that those standards exist from a lack of compositionally in Solidity/EVM.

I would actually argue the oppisite way. Think about how a uniswap contract needs to be implemented in Move. The generic uniswap contract will take in two parameters: the from token type and to token type. Without interface, I don't quite see how the uniswap contract can split the tokens and return the corresponding token type back to the caller.

My point is that you don't need a coin interface or dispatch, because you just need a single Coin type.

I see what you are arguing. I think what we are effectively arguing here is that for each interface standard, e.g: ERC20/ERC721, should it be one single module that implements this standard and everyone just use this module, or there can be multiple modules implementing the same standard and the caller get to choose which implementation they would like to use. In simple use cases like Coin I would agree that you don't need any customization logics. However in the future, there could be more complicated standards and no one single implementation will be the single standard that everybody would use.
I guess what I'm trying to argue there is that types should guide the code composability, not the implementations, where I get your critique as implementation carries semantic meanings as well. However, I think the situation is different from the EVM situation as we have a much stronger type system here where some basic properties of safety can be guaranteed and moreover, in the design I depicted, it will be the functor caller's job to make sure they invoked with the right module. reentrancy attacks won't be a concern in this setup.

what you have is semantically no different than if you copy pasted/templated out the code in the first place

I think that was the right observation, which is what I was trying to argue in the two different ways of implementation. Semantically, functor is the same as copy pasting the code. But in practice, module publishing could be expensive and publishing the same module back on chain IMO is not how you make Move more composable, as we will have lots of code that are instantiation of the same functors. Having functors directly on chain will make Move code a lot more composable, which is sth you won't have when everything is copy-pasted off chain.

I think we need to start with a lot more motivation here--IMO this RFC is jumping straight to interfaces as a solution without posing a specific implementation problem. To make a concrete suggestion:

This imposes a significant limitation for the modularity of Move. For example, when we want to write a generic uniswap contract for Move, it’s hard for the uniswap contract to invoke the corresponding transfer function for the buyer type and seller type.

I think it's worth expanding on this example, particularly what the "corresponding transfer function", what it does, and why the existing Move implementations of Uniswap-style DEXes do do the same thing as their EVM counterparts (and cannot be changed to do so).
Another example would work too if it's easier to explain, but I do think it's important to be specific here.

Updated the case study section for us to look into the reference swap implementation we offered. Will add another study to cryptographic primitives later.

I think we should distinguish two scenarios:
One: Asset scenarios, such as Token/Coin/NFT.
I call it as Free State, the state can move between modules.
We can use the type compositionally in Move, maybe do not need interface, or not so eager.
But if we want define a generic swap to supports future asset types, such as a Token that supports rebase, or supports Sui Coin standard, Aptos Coin standard, and Starcoin Token standard, We need to find a way to abstract the asset Type.
I think there are two approaches to do this:

The swap defines an internal asset type and auto-convert between different Coin/Token standards. if the swap wants to support the new asset type just needs to add a new converter.
Move Language provide a duck-typed interface, then the swap can extract an interface for all asset standard type, and just use the interface type internal.

Two: Service scenarios, such as different swap services want to keep the same ABI.
there are two swaps,  ASwap for AMM, and BSwap for 1 to 1 fixed exchange, but there are have the same ABI.
module ASwap{
  public fun exchange<F,T>(from_token: Token<F>):Token<T>;
}

module BSwap{
  public fun exchange<F,T>(from_token: Token<F>):Token<T>;
}

Now, we can extract a Swap interface
interface Swap{
  fun exchange<F,T>(from_token: Token<F>):Token<T>;
}

then the projects dependent on ASwap or BSwap can use the Swap interface to switch between different Swap services.

First of all, my point of view is clear: in order to have basic maintainability of the code of complex applications, it is necessary to use various design patterns. Interfaces or similar abstractions are the basis for implementing various modern programming patterns.
Without such an abstraction, not even a simple factory method can be implemented.
Here's an example stripped down from actual production code:
module starcoin_utils::SMTHasher {
    use std::hash;
    use std::vector;

    const LEAF_PREFIX: vector<u8> = x"00";
    const NODE_PREFIX: vector<u8> = x"01";
    const SIZE_ZERO_BYTES: vector<u8> = x"0000000000000000000000000000000000000000000000000000000000000000";

    public fun placeholder(): vector<u8> {
        SIZE_ZERO_BYTES
    }

    public fun digest_node(left_data: &vector<u8>, right_data: &vector<u8>): (vector<u8>, vector<u8>) {
        let value = LEAF_PREFIX;
        value = concat_u8_vectors(&value, *left_data);
        value = concat_u8_vectors(&value, *right_data);
        (digest(&value), value)
    }

    public fun digest_leaf(path: &vector<u8>, leaf_value: &vector<u8>): (vector<u8>, vector<u8>) {
        let value = LEAF_PREFIX;
        value = concat_u8_vectors(&value, *path);
        value = concat_u8_vectors(&value, *leaf_value);
        (digest(&value), value)
    }

    fun digest(data: &vector<u8>): vector<u8> {
        hash::sha3_256(*data) //hash::sha2_256(*data)
    }

    fun concat_u8_vectors(v1: &vector<u8>, v2: vector<u8>): vector<u8> {
        let data = *v1;
        vector::append(&mut data, v2);
        data
    }
}

module starcoin_utils::SMTProof {
    use starcoin_utils::SMTHasher; //To use a new SMTHasher impl., here need to modify
    use std::vector;

    struct Version has key {
        v: u64,
    }

    public fun do_somethig(signer: &signer) {
        _ = signer;
        foo();
        bar();
    }

    fun foo() {
        let a = SMTHasher::placeholder(); //To use a new SMTHasher impl., here need to modify
        _ = a;
    }

    fun bar() {
        let key = vector::empty<u8>();
        let value = vector::empty<u8>();
        let (hash, _) = SMTHasher::digest_leaf(&key, &value); //To use a new SMTHasher impl., here need to modify
        _ = hash;
    }
}

As we can see, there is no interface or similar abstraction, and when we want to replace the implementation of SMTHasher, we need to modify a lot of places.
So what if there is an interface? Maybe we can write code like this:
interface starcoin_utils::SMTHasher {
    fun placeholder(): vector<u8>;
    fun digest_node(left_data: &vector<u8>, right_data: &vector<u8>): (vector<u8>, vector<u8>);
    fun digest_leaf(path: &vector<u8>, leaf_value: &vector<u8>): (vector<u8>, vector<u8>);
    fun digest(data: &vector<u8>): vector<u8>;
    fun concat_u8_vectors(v1: &vector<u8>, v2: vector<u8>): vector<u8>;
}

module starcoin_utils::SMTHasherV1: starcoin_utils::SMTHasher{
    //...
}

module starcoin_utils::SMTHasherV2: starcoin_utils::SMTHasher{
    //...
}

module starcoin_utils::SMTProof {
    use starcoin_utils::SMTHasher;
    use starcoin_utils::SMTHasherV1;
    use starcoin_utils::SMTHasherV2;
    use std::vector;

    struct Version has key {
        v: u64,
    }

    public fun do_somethig() acquires Version {
        let addr = signer::address_of(signer);
        let ver = borrow_global<Version>(addr);
        let h = hasher(ver.v);
        foo(h);
        bar(h);
    }

    // This is a factory method!
    fun hasher(v: u64): SMTHasher {
        let h: SMTHasher = if (1 == ver.v) {
            // create SMTHahser v1
            starcoin_utils::SMTHasherV1 {}
        } else {
            // create SMTHasher v2
            starcoin_utils::SMTHasherV2 {}
        };
        h
    }

    fun foo(h: SMTHasher) {
        let a = h::placeholder();
        _ = a;
    }

    fun bar(h: SMTHasher) {
        let key = vector::empty<u8>();
        let value = vector::empty<u8>();
        let (hash, _) = h::digest_leaf(&key, &value);
        _ = hash;
    }
}

In the above code, functions such as hasher, foo, bar, etc. are all private; the factory method fully relies on the known module implementation when creating an instance of the interface. If it's necessary for security reasons to use these as constraints on the use of an interface, that's fine, I don't care. What I care about is that this really effectively brings together the "changes" of the code in one place.

no interface, no ecosystem.

no interface, no ecosystem.

We achieve ecosystem cohesion through composition, not inheritance. There's more than one way to encapsulate shared behavior :)

@wubuku I think your example is more of a motivation for enums than for interfaces. And enums (or ADTs or sum types, whatever you might call them) have been on our todo list for a long while.
If you had something like
enum SMTHasher {
  V1(SMTHasherV1),
  V2(SMTHasherV2),
}

Then you could do
let h: SMTHasher =
    if (1 == ver.v) V1(starcoin_utils::SMTHasherV1 {})
    else V2(starcoin_utils::SMTHasherV2 {});

Long store short, there's no magic here. Even in a language with interfaces, under the hood the runtime is likely doing something very similar to this. Without dynamic dispatch in Move,
I'm not sure there would a lot of benefit for hiding the enums behind a value level interface scheme.
That being said, the interfaces on the module level like you showed might be a nice source language feature for keeping modules intertwined with the same set of public APIs. Though I don't think they they are necessary for erc20-like standards, as we express those with a single module with generic types.

@tnowacki Agree, we can use enum to replace the interface in Strategy Pattern if we know all the implementations.

That being said, the interfaces on the module level like you showed might be a nice source language feature for keeping modules intertwined with the same set of public APIs. Though I don't think they they are necessary for erc20-like standards, as we express those with a single module with generic types.

As my example, if we want to define an asset type, we use generic types otherwise interface like erc20, but if we want to define a service, we need the interface to ensure all implements have the same public API.

if no interface, how a wallet transfer token.
0x1::coin::transfer just works for aptos coin and manged coin.
how to transfer a token with custom transfer.

interface is a part of type safe.

if no interface, how a wallet transfer token. 0x1::coin::transfer just works for aptos coin and manged coin.
how to transfer a token with custom transfer.
for aptos

Move used generic to behave like interface. In coding, you could use transfer<T>(xx:xx, xx:xx). The T could be any managed coins.

we need the interface to ensure all implements have the same public API.

It will be obvious if it doesn't. With enums you will need to manually implement each case in a match. So if there is some misalignment, you will see it.
But I still think the module signatures could be a helpful developer tool for keeping module APIs in line. But not something needed at the runtime level.

I think enum is more liek a syntax sugar to the dispatching logic that we can already implement in Move right now. The key thing that enum solution would be missing is the following: a generic module that needs to be implemented in a way where it don't care about the underlying implementation.
Take UniSwap as an example, in our current setup the Swap module can only work with fixed set of hard coded token types. This would remain the same even afer we implement enum. We may argue that this is the intended behavior but I think having a Swap contract that can deal with ANY token module is a completely different story, and I think Move can be a lot more expressive with such capability, as long as we still statically type check everything.

The interface best use case is the swap aggregator. if the aggregator wants to dispatch a function invocation to the swap, all swaps need to implement a swap public API standard.
module swap_aggreator{
  public fun exchange<F,T>(from_token: Token<F>):Token<T>{
     if xxx {
        ASwap::exchange<F,T>(from_token)
     }else if xxx{
        BSwap::exchange<F,T>(from_token)
     }else{
        xxxxx
     }
  }
}

Another good use case for interface is iterable containers. For example, we may have different implementation for vectors, maps and other data structures. The implementation of data structures could vary but they should all have the same interface and we should be able to use foreach to loop over the item.
To implement iterable container in the current proposal, we could imagine the following interface:
interface OWNEDITERABLE {
    struct T<T>;
    struct Iter<T>;
    fun get_iter(v: T<T>): Iter<T>;
    fun next(v: &mut Iter<T>): T;
    fun is_end(v: &Iter<T>): bool;
}

And we will augment the current vector stdlib:
module vector: OWNEDITERABLE {
    struct Iter<T: copy> {
         // It would be much nicer if we can have references in struct but we don't have it now... Thus we can only implement owned iterable..
         v: vector<T>,
    }

    fun get_iter(v: T<T>): Iter<T> {
         return Iter { v };
    }

    fun next(iter: &mut Iter<T>): &T {
         return vector::pop(&mut iter.v);
    }

   fun is_end(iter: &Iter<T>) {
        return vector::is_empty(&iter.v);
   }
}

Then other modules can use iterable modules via parameterized module:
module Foo(M: ITERABLE) {
    fun walking_iterables<T>(v: M::T<T>) {
          let iter = M::get_iter<T>(v);
          while(!M::is_end<T>(&iter)) {
                let t = M::next(&mut iter);
                // Do things with t of type T;
                ...
          }
    }
}

cc @wrwg  @sblackshear  @tnowacki

@wubuku I think your example is more of a motivation for enums than for interfaces. And enums (or ADTs or sum types, whatever you might call them) have been on our todo list for a long while.

Yes. I also agree with @jolestar  that from the point of view of implementation, i.e., accomplishing a business feature,

we can use enum to replace the interface in Strategy Pattern if we know all the implementations.

But from a software engineering point of view, especially from the point of view of code maintainability, they are different. Even if the compiler compiles both of these different implementations into the same bytecode.
When a team doesn't want to or hasn't figured out how to implement a needed feature, it can start by defining an interface, which is called " dependent on abstraction, not implementation".
It can then hand off the job of implementing this interface to another team. Of course, for security reasons, it is necessary to review the code implemented by other teams.
Finally, it takes the various parts of the application implementation (which may come from different teams) and assemble them in "one place". In traditional applications, this work is often done by configuring so-called IoC(Inversion of Control) or DI(Dependency Injection) containers. Even if you don't like IoC containers, it's still a recommended practice to manually program "assembly code" in one place.
I'm not quite sure if a similar effect can be achieved using enums.
Maybe for now, the on-chain part of most Dapps, i.e. smart contracts, is not complex enough to talk about software engineering too extravagantly, but I believe that one day, maybe soon, they will become quite complex, like traditional applications are now.


[GHSA-7x9j-7223-rg5m] Improper Access Control in commons-fileupload

Updates

Affected products

Comments
https://sca.analysiscenter.veracode.com/vulnerability-database/security/remote-code-execution-via-serialization/java/sid-2911/summary

👋 Hi @SunBK201, I'm not merging this community contribution because, according to https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload, 1.0-beta-1 is the first version of commons-fileupload:commons-fileupload. Therefore, the vulnerable version ranges >= 1.0-beta-1, < 1.3.3 and < 1.3.3 generate the same alerts, and the change is unnecessary.


Add rsbuild-plugin-glsl

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


Synonyms not working

I need to set a synonym for my product name field (eventually several of my fields) that allows the user to see the same search results if they type in "roller" or "wheel". I've been working on the code below all day and cannot get this to work. The search does return results when I search for "roller" (because I have products named "roller", but returns no results when I search for "wheel". I haven't received any errors either. I have no idea what to do at this point. Any help would be appreciated. I've re-indexed probably 20 times.
Here is the search method in my controller
@products = Product.search(
      query: {
          query_string: {

           fields: ['name', '_all'],
            query: "#{params[:q]} AND status:\"Viewable On Website & Backend\""
            }
        }
      ).page(page).per(25)

My settings:
settings index: { number_of_shards: 1 },
	analysis: {
  filter: {
    synonym: {
      type: "synonym",
      ignore_case: true,
      synonyms:[
        "wheel,roller"
      ]
    }
  },
  analyzer: {
    synonym: {
      tokenizer: "whitespace",
      filter: ["synonym", "lowercase", "stop", "snowball"]
    }
  }
} do
  mappings dynamic: 'false' do
    indexes :name, analyzer: 'synonym'
    indexes :status, analyzer: 'english'
    #indexes :description, analyzer: 'english'
    indexes :part_number, analyzer: 'english'
    indexes :text, analyzer: 'english'
    indexes :normal_model, type: 'nested' do
      indexes :name, analyzer: 'english'
      indexes :number, analyzer: 'english'
      indexes :machine_type, analyzer: 'english'

      indexes :normal_brand, type: 'nested' do
    	indexes :name, analyzer: 'english'
      end
    end
  end
end

My indexed_as_json method:
def as_indexed_json(options={})
    as_json(
    	only: [:name, :description, :part_number, :url_key, :image, :price, :shipping, :warranty, :eta, :status, :sku],
        include: {
        	normal_model: { only: [:name, :number, :machine_type],
        		include: {
        			normal_brand: { only: :name}
        		}
        	}
        }
    )
 end

The synonym analyzer is set only for the name field, can you use the "Match" or "Multi Match" query instead of the "Query String" query — the latter should be avoided in general?
Also, are you familiar with the "Analyze" API? It should allow you to debug the analysis process much faster then re-indexing and running queries.
Also, are you 100% sure that your index has the correct mapping, ie. the mapping from the model is applied? (There's the create_index force: true method for that.)

Thanks for the help. I changed the query_string to multi_match and everything started working as expected.  Thanks again!


ExchangeVersion enum is incomplete

The ExchangeVersion enum contains 4 values:
public enum ExchangeVersion {

  // / Microsoft Exchange 2007, Service Pack 1
  /**
   * The Exchange2007_ s p1.
   */
  Exchange2007_SP1,
  // / Microsoft Exchange 2010
  /**
   * The Exchange2010.
   */
  Exchange2010,

  /// Microsoft Exchange 2010, Service Pack 1
  /**
   * Exchange2010_SP1.
   */
  Exchange2010_SP1,

  // Microsoft Exchange 2010, Service Pack 2
  /**
   * Exchange2010_SP2.
   */
  Exchange2010_SP2,
}

But the RequestServerVersion API documentation lists 7 values:
Exchange2007
Target the schema files for the initial release version of Exchange 2007.

Exchange2007_SP1
Target the schema files for Exchange 2007 Service Pack 1 (SP1), Exchange 2007 Service Pack 2 (SP2), and Exchange 2007 Service Pack 3 (SP3).

Exchange2010
Target the schema files for Exchange 2010.

Exchange2010_SP1
Target the schema files for Exchange 2010 Service Pack 1 (SP1).

Exchange2010_SP2
Target the schema files for Exchange 2010 Service Pack 2 (SP2) and Exchange 2010 Service Pack 3 (SP3).

Exchange2013
Target the schema files for Exchange 2013.

Exchange2013_SP1
Target the schema files for Exchange 2013 Service Pack 1 (SP1).

Could we add the 3 missing enum values?

ews-java-api is missing the other specific Version only features. Adding the other values to the enum would be connected to implement these features within the API and should be added step by step. PR are welcome.

This is also duplicates #58


Use att extension for provenance

Align the provenance extension with the extension used by cosign.
https://github.com/sigstore/cosign/blob/bad18e5cb25f2cb86301d248e7e4ed39d49df143/pkg/cosign/fetch.go#L63

We are already using .att right? See: https://github.com/philips-labs/slsa-provenance-action/pkgs/container/slsa-provenance/versions
Can you elaborate or close this issue @marcofranssen ?

We are not in our release assets and when creating the provenance. There it is still by default on provenance.json.
For containers you are right. This issue is about aligning that with the containers.

Gotcha @marcofranssen, I will align this in my PR #134