proposal: add tree-based OrderedMap/OrderedSet

There are lots of OrderedMap/OrderedSet, although we have generics, there are no related containers in the standard library, so people have to implement their own sorting containers.
So I propose add OrderedMap/OrderedSet into std, maybe container package is a suitable place.
The main API are:
type OrderedMap[K, V any] struct{ /* private fields */ }

// Constructor function
func NewOrderedMap[K, V any](cmp func(K, K) int) *OrderedMap[K, V] {}

// And Ordered type version, but the name is a bit long 😂
func NewOrderedMapOfOrderedType[K cmp.Ordered, V any]() *OrderedMap[K, V] {
    return NewOrderedMap(cmp.Compare[K])
}

// Method set
// Insert new pair and return previous value if present.
func (m *OrderedMap[K, V]) Insert(k K, v V) (V, bool) {}
// Get get value associated with k, else return empty and false.
func (m *OrderedMap[K, V]) Get(k K) (V, bool) {}
// Contains judge k in OrderedMap ?
func (m *OrderedMap[K, V]) Contains(k K) bool {}
// Delete entry by key and return stored value if present.
func (m *OrderedMap[K, V]) Delete(k K) (V, bool) {}
// Keys return all keys in ascending order.
func (m *OrderedMap[K, V]) Keys() []K {}
// Values return all values in ascending order by key.
func (m *OrderedMap[K, V]) Values() []V {}
// Clear clear the whole map.
func (m *OrderedMap[K, V]) Clear() {}
// Retain will keep those entry which satisfy the given predicate function.
func (m *OrderedMap[K, V]) Retain(f func(K, V) bool) {}
// Len return number of entries of map
func (m *OrderedMap[K, V]) Len() int {}
// ForEach iterate over all entries in the map.
func (m *OrderedMap[K, V]) ForEach(f func(K, V) bool) {}
// Range iterate over range [start, end), this maybe replaced by [SubMap]
func (m *OrderedMap[K, V]) Range(start K, end K, f func(K, V)) {}
// First return the minimum entry.
func (m *OrderedMap[K, V]) First() (Entry[K, V], bool) {}
// Last return the maximum entry.
func (m *OrderedMap[K, V]) Last() (Entry[K, V], bool) {}
// Reverse reverse order of all entries.
func (m *OrderedMap[K, V]) Reverse() *Ordered[K, V] {}
// Merge with another OrderedMap, if key exists, replace it
func (m *OrderedMap[K, V]) Merge(o *OrderedMap[K, V]) {}
// SubMap copy entries between start and end to a new OrderedMap.
func (m *OrderedMap[K, V]) SubMap(start K, end K) *OrderedMap[K, V] {}

// Wrapper of OrderedMap with unit value.
type OrderedSet[T any] struct{ inner *OrderedMap[T, struct{}] }

// Constrcutor function
func NewOrderedSet[T any](cmp func(T, T) int) *OrderedSet[T] {}

// Method set
func (s *OrderedSet[T]) Contains(v T) bool {}
func (s *OrderedSet[T]) ContainsAll(elems ...T) bool {}
func (s *OrderedSet[T]) ContainsAny(elems ...T) bool {}
func (s *OrderedSet[T]) Insert(v T) {}
func (s *OrderedSet[T]) InsertMany(elems ...T) {}
func (s *OrderedSet[T]) Delete(elems ...T) {}
func (s *OrderedSet[T]) ForEach(f func(T)) {}
func (s *OrderedSet[T]) First() (T, bool) {}
func (s *OrderedSet[T]) Last() (T, bool) {}
func (s *OrderedSet[T]) Reverse() *OrderedSet[T] {}
func (s *OrderedSet[T]) Len() int {}
func (s *OrderedSet[T]) Retain(f func(T) bool) {}
func (s *OrderedSet[T]) SuperSetOf(o *OrderedSet[T]) bool {}
func (s *OrderedSet[T]) SubSetOf(o *OrderedSet[T]) bool {}
func (s *OrderedSet[T]) InterSection(o *OrderedSet[T]) *OrderedSet[T] {}
func (s *OrderedSet[T]) UnionInPlace(o *OrderedSet[T]) {}
func (s *OrderedSet[T]) Union(o *OrderedSet[T]) *OrderedSet[T] {}
func (s *OrderedSet[T]) Difference(o *OrderedSet[T]) *OrderedSet[T] {}
func (s *OrderedSet[T]) SymmetricDifference(o *OrderedSet[T]) *OrderedSet[T] {}

Appendix A

In C++, there are ordered_set/ordered_set based on rb-tree
In Java, there are SortedMap and SortedSet.
In Rust, there are BTreeMap and BTreeSet

Appendix B
If we land sum type in go, those return a bool flag would be instead by Option or Maybe, it's intuitive and more suitable.
Sum type is more suitable than Product Type here.

We aren't going to add any general purpose containers until we have an idea of how to implement iterators, aka how to find all the elements in the container.  Iterators are pending resolution of #56413, which itself is pending the forward/backward compatibility work that will be part of Go 1.21.
This should perhaps be a discussion first.

There's already a set proposal that is snagged on iteration. This seems related to that. This could be containers/ordered.Set and containers/ordered.Map and have overlapping methods with containers/set.

We aren't going to add any general purpose containers until we have an idea of how to implement iterators, aka how to find all the elements in the container.  Iterators are pending resolution of user-defined iteration using range over func values #56413, which itself is pending the forward/backward compatibility work that will be part of Go 1.21.
This should perhaps be a discussion first.

I'm agree that Iter is a important feature to iterate over all element in container, but there also many features does't relay on Iter, such as: map.Get/Insert/Delete/Contains/Clear/IsEmpty/First/Last and set.Insert(Many)/Contains(All/Any)/Delete/Clear/IsEmpty. They are useful in many scenarios.

A benefit is map's Key and set's Elem can any type, not limited to cmp.Ordered.

For those internal maybe relay on Iter, like set.SuperSetOf/SubSetOf/Difference/Union/InterSection and map.Merge/Keys/Values, not exposing implementation details can leave room for the introduction of Iter later.
The rest are Iter related, like: Iter can be ecognized by the compiler and can be used in for-loop, and iterate operations can based on this, including but not limited to ForEach/Map/Filter/Reduce/Fold/Max/Min/AllOf/AnyOf/Take/Skip/Cmp/Zip/Unzip/Chunk/GroupBy ...

I am curious why an ordered map cannot be introduced or considered. As stated, there are many different implementations of it, which are getting increasingly adopted, but they are painful to implement when using third-party libraries (especially when those involve range iterations).
Because many languages have already adopted a similar functionality (some examples):

Python
Kotlin
Rust

To provide a more concrete example, I am using libopenapi, which uses a custom orderedmap, rendering specifications require the ordering to be in place, especially when visualizing the results. With the current lack of an orderedmap solution a developer needs to introduce another solution compatible with the native supporting packages (e.g. templates and range functionality).

Coming back, with the use of yield things become a bit easier. I gave yield spin today over an iteration of an ordered map that previously required me to convert to a slice and loop over the slice and then over the map.
I still believe that adding support for an ordered map/set makes sense.

The Keys and Values methods (and a new All method) should definitely use go1.23 iterators rather than materializing a slice.
func (*Map[K, V]) Keys() iter.Seq[K]
func (*Map[K, V]) Values() iter.Seq[V]
func (*Map[K, V]) All() iter.Seq2[K, V]

Reverse too could be an iterator rather than a clone operation:
func (*Map[K, V]) Reverse() iter.Seq2[K, V]

Similarly, SubMap (renamed Range) could be an iterator for a portion of the key space. If you need to construct a new map from a Range (or All), combine the iterator with a InsertAll method that consumes the iterator.
func (*Map[K, V]) Range(from, to K) iter.Seq2[K, V]
func (*Map[K, V]) InsertAll(iter.Seq2[K, V]) bool

What is Entry? Just a pair? Or a reference to a part of the representation? (Java's Map.Entry took the latter choice and IIRC it was a major barrier to optimized special-purpose maps, because they still had to allocate one object per entry.) Is it necessary?
I like that all the operations return the maximum amount of information in a single access (e.g. Insert reports whether there was a previous entry), as these can really improve efficiency.
Retain should be DeleteFunc, with sense inverted.
We should try to harmonize the APIs of related collections types such as sets, lists, maps, queues, and so on. Java 1.5's collections did a good job of establishing conventions across a range of data types so that, for example, they all have an add(T) bool method that reports whether the size of the collection changed (though the API has grown to the point where I can no longer hold in memory).
Naming suggestion: package ordered; type Map; func NewMap{,Func}? Or package maps; type Ordered; func NewOrdered{,Func}?

I don't like Range since it clashes with range in a confusing way though I'm not sure what a better name is.
InsertAll should just be Insert because of maps.Insert.
:+1: to container/ordered. maps is for native maps. If there's a type in maps, it should be for wrapping a native map in something with all the usual methods for other container types.
Also, SuperSetOf should be SupersetOf.

I feel like container/ordered is ever so mildly confusing because there are lot ordered container types that make no sense in it, such as just a regular linked list, though I see the appeal of ordered.Map[K, V].

@DeedleFake I would expect inserting into an ordered.List to perform the insertion at an index that maintains sort order. So an ordered.Set that allows duplicates.

The Keys and Values methods (and a new All method) should definitely use go1.23 iterators rather than materializing a slice.
func (*Map[K, V]) Keys() iter.Seq[K]
func (*Map[K, V]) Values() iter.Seq[V]
func (*Map[K, V]) All() iter.Seq2[K, V]

Reverse too could return an iterator rather than a clone:
func (*Map[K, V]) Reverse() iter.Seq2[K, V]

Similarly, SubMap (renamed Range) could be an iterator for a portion of the key space. If you need to construct a new map from a Range (or All), combine the iterator with a InsertAll method that consumes the iterator.
func (*Map[K, V]) Range(from, to K) iter.Seq2[K, V]
func (*Map[K, V]) InsertAll(iter.Seq2[K, V]) bool

What is Entry? Just a pair? Or a reference to a part of the representation? (Java's Map.Entry took the latter choice and IIRC it was a major barrier to optimized special-purpose maps, because they still had to allocate one object per entry.) Is it necessary?
I like that all the operations return the maximum amount of information in a single access (e.g. Insert reports whether there was a previous entry), as these can really improve efficiency.
Retain should be DeleteFunc, with sense inverted.
We should try to harmonize the APIs of related collections types such as sets, lists, maps, queues, and so on. Java 1.5's collections did a good job of establishing conventions across a range of data types so that, for example, they all have an add(T) bool method that reports whether the size of the collection changed (though the API has grown to the point where I can no longer hold in memory).
Naming suggestion: package ordered; type Map; func NewMap{,Func}? Or package maps; type Ordered; func NewOrdered{,Func}?

Agreed, when this proposal was made, iterators had not yet been implemented. Now that they have been implemented, it makes sense to use iterator syntax.
The existence of Entry is a personal preference. Since seq2 has never been seen in other languages, tuple is used instead, but since go uses seq2, there is no better reason not to use it here.
Although I still think seq2 is a less successful abstraction. ^_^

I don't like Range since it clashes with range in a confusing way though I'm not sure what a better name is.
InsertAll should just be Insert because of maps.Insert.
👍 to container/ordered. maps is for native maps. If there's a type in maps, it should be for wrapping a native map in something with all the usual methods for other container types.
Also, SuperSetOf should be SupersetOf.

Since the native map supports direct insertion of a key-value pair at the syntactic level, but this does not work here. If you insert a sequence using insert, then I cannot think of any other suitable naming for inserting the key-value.
How about use InsertSeq or InsertIter instead.

InsertSeq() fits well with slices.AppendSeq().

I've been looking into this topic a bit and I'd like to share some of that work. This comment is about the leading ordered map implementation, github.com/google/btree. I think it's relevant to talk about, because if it's great, or maybe even good enough, then it can satisfy the ecosystem's need for an ordered map and there's no compelling reason to add one to the standard library. Python seems to have taken a similar route: there is no ordered map in the Python standard library, but there is at least one high-quality third-party implementation.
The strengths of google/btree (as I'll call it throughout) are:

It is stable, with few active changes and few or no outstanding bugs.
It is mature, having been around since 2014.
It is widely used: over 2,000 importers according to pkg.go.dev.
It is battle-tested: it is imported by major packages like Trillian, CockroachDB, and etcd.

Its weaknesses are:

It supports generics, but not range-over-func.
Its API is expressed in terms of a single Item type that includes both the key and value, instead of the more typical separate key and value types. That means that to look up a key, for instance, you have to pass an entire item with the key portion set.
It does not support range deletion (deleting a contiguous subsequence of keys). Range deletion can be done in logarithmic time, asymptotically faster than doing the deletions individually, so it is more than just a convenience. The issue to add it has been open since 2017.
The iteration API is clumsy: there are eight methods for iteration.
It provides no iteration guarantees when there is interleaved modification. That is, if the tree is modified while it is being iterated over, unexpected things can happen: deleted  keys can appear, inserted keys may appear twice, and so on. (To be clear, this is about a single goroutine writing during an iteration, not about concurrency: like most Go data structures, google/btrees are not safe for use by multiple goroutines unless all of them are reading.)

Last but not least, google/btree uses copy-on-write. One way to think about that is that cloning, instead of copying all at once, happens incrementally. Each clone copies a few of the shared tree nodes during each modification, until both are fully copied and no nodes are shared. Of course, if those modifications never happen, no copying happens either.
Copy-on-write provides a kind of iteration guarantee. Clone a btree, then iterate over the clone while confining all modifications to the original. The iteration will observe a snapshot of the original's items. Furthermore, the iteration is concurrency-safe (though not the individual keys and values), because the tree nodes are never written—they are always copied first.
Is copy-on-write a strength or a weakness? I would say both. It makes some operations, like iteration and keeping a snapshot of a tree, quite inexpensive. But its performance can be surprising if you are not aware of what's happening inside the implementation. For example, even after the iteration over a clone is finished and the clone becomes garbage, the original will still be copied each time a "shared" node is modified; the implementation has no good way to tell that the nodes are no longer shared.
google/btree is arguably good enough to serve as the ecosystem's ordered map of choice. On the other hand, its quirks and lack of ranged delete leave room to argue that there is a place for a more idiomatic implementation.

In this second comment (the first is https://github.com/golang/go/issues/60630#issuecomment-2440277569), I'd like to suggest a modern, idiomatic API for ordered maps. The github.com/jba/omap package is based on Russ Cox's rsc.io/omap but adds a few common operations and an improved range API.
In comparison with github.com/google/btree, this implemention:

takes two generic parameters, for the key type and the value type
supports range-over-func
offers range deletion
provides a uniform, easy-to-understand way to handle iteration over and deletion of ranges
has a strong iteration guarantee
provides a way to ask for the i th key and value in key order

If we were to adopt an ordered map implementation, I think it would be a good starting point.

@jba
It does support range-over-func, actually, just not explicitly: https://go.dev/play/p/pc574L-uHyf

@jba Most agree, But why is there a MapFunc type? Can it write to Map[K, V any], then use two different constructor variants
func NewMap[K, V any](cmp func(K, K) int) *Map[K, V]
func NewOrderedMap[K Ordered, V any]() *Map[K, V] {
    return NewMap[K, V](cmp.Compare[K])
}

@jba, could Map be an interface?
If any method wants to take another map as an argument, the current two-struct approach is going to make it awkward to implement.
func (m *Map[K, V]) Merge(o *Map[K, V]) {}

Maybe an argument can be make that Map doesn't need such methods, but if Set and SetFunc are implemented on top of them, strong arguments can be made that they should have methods like Union, Join etc. It would ideal if Map and Set could use the API style.

@jba I wonder if you can confirm that github.com/jba/omap is strictly superior to github.com/google/btree?
If not, what are the things that jba/omap need to improve over google/btree?
P.S.
I am not trying to troll by pitting libraries against each other, just trying to figure out what is the best library at the moment in the absence of a standard library implementation.
I also suggest if we decide to leave OrderedMap outside of the standard library, perhaps we could have a Wiki page or blog post to list the recommended/canonical third-party implementations for common data structures.
Currently, information on gonuts is too old, and google search results give very confusing picture, with the top search results containing extremely buggy poorly written code.
It was only until I stumbled upon this issue did I find a correct path forward for OrderedMaps.

I am not trying to troll by pitting libraries against each other

On the contrary, I think it's important to compare these packages.
I don't think there is a clear winner. In https://github.com/golang/go/issues/60630#issuecomment-2440277569 I talk in detail about the strengths and weaknesses of google/btree. The main weaknesses are the clumsy API, the lack of range delete, and the lack of iteration guarantees without doing a possibly expensive clone.
Google/btree is probably faster because jba/omap is unoptimized. For example, jba/omap allocates all new nodes on the heap instead of using a sync.Pool. There are other implementation tricks too that I haven't bothered with because the main purpose of jba/omap is to serve as a reference implementation for this proposal.
So I think it depends on your particular use case. From my point of view, I'd prefer you use jba/omap to help shake out bugs and serious performance issues, and perhaps to contribute improvements. I'd say if you're working on a personal or student project, it would be a more forward-looking choice. If you need something for serious production work, then certainly google/btree has a lot more mileage on it.

perhaps we could have a Wiki page or blog post to list the recommended/canonical third-party implementations for common data structures

The Go team talks about this from time to time, but the problems are that it's a lot of work, and also we want to remain impartial.

@jba Thanks for your helpful comparison!
It looks like omap is preferred except for performance critical cases.
I will be using it, and would report bugs or new ideas that may be useful.

The Go team talks about this from time to time, but the problems are that it's a lot of work, and also we want to remain impartial.
Understood, and thanks to the entire Go team for this great work all these years!


Fix typo in Changelog

Fixed in https://github.com/tarantool/crud/commit/b8f2f8fd34682c3aaf6e7b5ff1757a2fe7a2d481


fixfix max compute scanner OOM and datetime

Proposed changes

Fix MC jni scanner OOM
add the second datetime type for MC SDK timestamp
make s3 uri case insensitive by the way
optimize max compute scanner parallel model

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


[Gally]: master <- dev

Automatically created by Git-Ally

:tada: This PR is included in version 1.17.18 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


removing local netpbm binaries and libraries

Please consider to remove redundant binary executables and libraries from "netpbm" package.
For some reasons binaries are referenced in https://github.com/gigablast/open-source-search-engine/blob/master/Process.cpp#L161
It is the best to avoid committing prebuilt binaries to the repository. Thanks.

Of several "netpbm" binaries, bmptopnm, pngtopnm, tifftopnm and giftopnm are used only in Process.cpp to ensure their presence in gb's data(!) folder. This is unconventional and PATH should work just fine.
Only the following are actually used:

ppmtojpeg
pnmscale
jpegtopnm

IMHO it should be safe to remove all those utilities from the repository and especially from Process.cpp so admins could use newer (updateable) package from the Operating System.


Before first release: Unit tests

We need to cover all configuration options and features with unit tests to ensure we don't break compatibility and features with new changes and updates to the codebase.
All of these suites are based on existing examples, as the idea was to cover EVERY possible feature, method, use-case, and option with an example.
Planned test suites

[x] Basic usage
[x] Options combinations
[x] Different form modes
[x] Required fields
[x] Exported validateFormData util
[x] All form methods
[x] Live fields
[x] Type transformations based on input[type]
[x] Value transformation
[x] Validation
[x] Revalidation strategies

Closing after developing all unit tests. Not the most enjoyable experience.


Add front-end display effects so that players can only see their own pieces on the game page.

1f222f2
hide opponent's pieces


Cloudflare KV binary value

Current Terraform and Cloudflare provider version
Terraform v1.1.7
on linux_amd64
Description
Cloudflare Workers KV supports uploading binary assets such as images but this plugin only supports string as the value of a KV entry. Please check the value property from the official documentation.
Use cases
Upload images and other binary assets in KV storage.
Potential Terraform configuration

# Create KV namespace
resource "cloudflare_workers_kv_namespace" "example_ns" {
  title = "test-namespace"
}

# Create KV with string value
resource "cloudflare_workers_kv" "example_string" {
  namespace_id = cloudflare_workers_kv_namespace.example_ns.id
  key = "test-key-string"
  value = "test value"
}

# Create KV with binary value (solution 1 - using binary value directly)
resource "cloudflare_workers_kv" "example_binary" {
  namespace_id = cloudflare_workers_kv_namespace.example_ns.id
  key = "test-key-binary"
  value_binary = "binary value"
}

# Create KV with binary value (solution 2 - using base64 encoded binary value with the bulk update endpoint)
resource "cloudflare_workers_kv" "example_binary" {
  namespace_id = cloudflare_workers_kv_namespace.example_ns.id
  key = "test-key-binary"
  value = "base64 encoded binary value"
  base64 = true
}

References
https://developers.cloudflare.com/workers/runtime-apis/kv/#parameters
https://blog.cloudflare.com/whats-new-with-workers-kv/
https://api.cloudflare.com/#workers-kv-namespace-write-key-value-pair
https://api.cloudflare.com/#workers-kv-namespace-write-multiple-key-value-pairs

This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.


Port to 1.20.4 & refine Chinese & Japanese translations

Hi there. I've updated the mod to newest version and updated the language files.
 Thank you for your contribution, the history looks great. I will take a better look at it tomorrow and merge it =D

Wait, I found something very weird.
After loading the mod into the game, I found some of the C418 musics are unable to play and the settings panel looks like this:

The following is the full log:
log_1204.txt
Since I cannot reproduce this issue in the development environment, I'm not sure what to do. It maybe some mods or Minecraft itself changed the resource keys, but I've found no changelogs on the Wiki.
I'll take time to investigate on this issue afterwards.

I will take a look tomorrow. I'm pretty sure they just renamed the c418 music with their actual name instead of "creative1", "creative2", ... The change shouldn't be really hard.

Ok, I found the reason. Seems Mojang did rename the keys (link), but gradle's resource file is the old one so I didn't notice it :D

Thanks again for your work! =)


Folder uploads

ownCloud client can do directory uploading hierarchically, but through the WEB still only file uploads?

Sorry, this is the bug tracker for the owncloud.org website, not for any part of ownCloud. Please, see the repositories on https://github.com/owncloud and file feature requests in the right one.
Questions like these you should ask on IRC or the ownCloud forums. In this case I believe this is a limitation of web browsers, not of ownCloud.


Initial proposal for Population Variance

This is a proposed implementation for #36
I am still a bit confused with the edge case that on main, if I provide [] instead of a List with numbers, I am not getting the expected Err NotEnoughItems and I don't understand why.
Also, trying to run roc test (after uncommenting the expect) crashes, as reported on https://github.com/roc-lang/roc/issues/5482

Current output of running roc run --linker=legacy
σ² = 5032.13888888889

Thank you for your commits @Anton-4, and for adding the output expectation tests. 🙏
I am happy I could make a small contribution, roc is a delightful language.

This doesn't look blocked any longer.
@fdbeirao are you interested in resolving up the merge conflicts and updating to latest main?


Update dynamics-gp/index.md

fix link

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

dynamics-gp/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

dynamics-gp/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Make hostname checking optional

When running on OS X with boot2docker, it can be necessary to contact the Docker host without verifying the TLS hostname. We should add a flag for that which set kwargs['tls'].assert_hostname = False like specified in the docker-py documentation.

Hostname checking has been disabled all in all in commit d8fed1d, it is based on Fig doing the same thing in their code base, and I expect them to have some more experience on what is possible and not on the different platforms.


Just a feature suggestion, Scroll capture would be really nice.

If scroll capturing is possible to implement this app would be really great. Another thing that would be nice is being able to change the size of the drawing pen and having a custom color picking thing.

I am sorry, but scroll capture seems to be out of scope for now.
I will keep this issue open for the future, but don't expect a quick solution :)


Can not install in node 8.10.0

I can not install in node 8.10.0
Failed to execute '/Users/ambu/.nvm/versions/node/v8.10.0/bin/node /Users/ambu/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ambu/.nvm/versions/node/v8.10.0/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v1.0.1/node-v57-darwin-x64/debug.node --module_name=debug --module_path=/Users/ambu/.nvm/versions/node/v8.10.0/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v1.0.1/node-v57-darwin-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Since version 6.3, Node.js provides a built-in DevTools-based debugger which mostly deprecates Node Inspector, see e.g. this blog post to get started. The built-in debugger is developed directly by the V8/Chromium team and provides certain advanced features (e.g. long/async stack traces) that are too difficult to implement in Node Inspector.


external-dns: Align to upstream

external-dns just released a helm chart (https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.2.0)
We should investigate if it's worth contributing stuff we have to upstream and switch to the upstream version.

Attention: This is a default app!

[ ] compare charts to see what are the differences
[ ] align charts step by step
[ ] check if business logic is implemented in our chart
[ ] think a way around the business logic

I'll slowly start to align the chart with upstream.
Business logic will remain there until we define a solution.

https://gigantic.slack.com/archives/C02EVLE9W/p1670320792773109
we have a requirement to replace the values aws_access_key_id and aws_secret_access_key with a secret ref.
that should be possible with extraVolumes and env from upstream. I'll add next that and document the process.

Status report:
Most of the work for v3 is done but there a few blockers that need attention:

https://github.com/giantswarm/giantswarm/issues/26851
https://github.com/giantswarm/giantswarm/issues/26527
https://github.com/giantswarm/giantswarm/issues/26852
https://github.com/giantswarm/giantswarm/issues/25029
Move CRD job to a subchart
Move VPA and NPs to a subchart

I'll hold this into the backlog as v3 comes without PSP already. We can wait until the PSP/PSS migration is done.

This is back on track.

v3 has been released


Problem about weight initialization using DDP

Hi Antoine
It seems that you set a different seed for each rank before building the model. This may lead to different parameter initialization for different duplicate on each rank. Is it a mistake or a deliberate design?
Here is a comment from pytorch lightning ddp advice

Setting all the random seeds to the same value. This is important in a distributed training setting. Each rank will get its own set of initial weights. If they don't match up, the gradients will not match either, leading to training that may not converge.

"""starts from main.py line 347"""
# fix the seed for reproducibility
seed = args.seed + dist.get_rank()
torch.manual_seed(seed)
np.random.seed(seed)
random.seed(seed)
# torch.set_deterministic(True)
torch.use_deterministic_algorithms(True)

# Build the model
model, criterion, weight_dict = build_model(args)
model.to(device)

Hi, this is not deliberate: if I remember correctly this part of code is from the MDETR codebase which itself comes from the DETR codebase.

Hi, thank you for you reminder. I opened a new issue in original DETR repo. Not sure how this setting will affect the final performance, but it should be fixed if it's a bug indeed.

Seems it is solved https://github.com/facebookresearch/detr/issues/544.


file downloads as file.bin

When I try to download a file through the webview the file gets downloaded as file.bin despite being a pdf file. the content is correct though and renaming the file makes it usable.
any solutions?
thanks

more info:
expo sdk:41
built with: expo build:android
only react-native-webview library was used
here is the app.js code:
import { StatusBar } from 'expo-status-bar';
import * as React from 'react';
import { WebView } from 'react-native-webview';

export default class App extends React.Component {
  render() {
    return <WebView source={{ uri: 'https://jozvedar.pythonanywhere.com' }} style={{ marginTop: 20 }} />;
  }
}

When I try to download a file through the webview the file gets downloaded as file.bin despite being a pdf file. the content is correct though and renaming the file makes it usable.
any solutions?
thanks

same issue i m facing, did u get any solution ?

@ahsanparacha02  No unfortunately, I switched to externally handling links.

Hi @smahdink  how did you handle it externally?

Any updates?

@cybercris  Sorry haven't checked it recently.

ok I was able solve mine, the issue in my was wrong server config, the header config for the server handling had content-type set to
application/octet-stream instead of application/pdf.
follow this link for mime types
https://www.sitepoint.com/mime-types-complete-list/?utm_source=pocket_mylist

I was able to solve mine, the issue in my case was the wrong server config, the header config for the server handling had content-type set to application/octet-stream instead of application/pdf.
follow this link for mime types
https://www.sitepoint.com/mime-types-complete-list

Indeed my application is sending application/octet-stream in headers, but the problem is not only in PDF's files... .xls, .odt, etc, they all download as file.bin. In this case i have to change headers for each extension file?

@obie3 Good, but what about uploads?

Still Searching

still searchning

still searchning

Hi people,
Has anyone found the solution ? I'm stuck...
Thank

Hi people,
Has anyone found the solution ? I'm stuck... Thank

set you web server  Content- type

I'v already checked and I cannot set my Content-Type on 'application/pdf' for example, I download different types of files (.pdf, .txt, .xlsx...)

same issue

any update on this ?

I don't know, I dont work on it anymore. If you find anything please post
here.
در تاریخ دوشنبه 12 ژوئن 2023، 16:17 anujmpec @.***>
نوشت:

any update on this ?
—
Reply to this email directly, view it on GitHub
https://github.com/react-native-webview/react-native-webview/issues/2012#issuecomment-1587274546,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKRHRS244KNYEP4YUN7H423XK4FXJANCNFSM45MPMXTQ
.
You are receiving this because you were mentioned.Message ID:
@.***
com>

Still searching....

We are still facing this issue.


User keyboard shortcut for 'Run Selection/Line in Python Terminal' does not work when the 'Determines if selected code in a python file will go to ...'  setting is enabled.

Environment data

VS Code version: 1.48.2
Extension version (available under the Extensions sidebar): 2020.8.106424
OS and version: macOS Mojave 10.14.6
Python version (& distribution if applicable, e.g. Anaconda): Python 3.74 (miniconda), Python 3.83
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Relevant/affected Python packages and their versions: N/A
Relevant/affected Python-related VS Code extensions and their versions: N/A
Value of the python.languageServer setting: N/A (The issue occurs regardless. I tried all 4 values for the setting.)

Expected behaviour
I expect that the keyboard shortcut for 'Python: Run Selection/Line in Python Terminal' should work, as long as the said shortcut or the 'Python: Run Selection/Line in Python Interactive Window' keyboard shortcut has been assigned to another key.
Actual behaviour
The keyboard shortcut for the 'Python: Run Selection/Line in Python Terminal' command does not work. Selecting code in a Python file and hitting the shortcut does not trigger the command.
Steps to reproduce:

Open Settings. Tick the checkbox for the 'Determines if selected code in a python file will go to the terminal or the Python Interactive window when hitting shift+enter' setting.

Open Keyboard Shortcuts. Change the keyboard shortcuts for 'Python: Run Selection/Line in Python Terminal' and/or 'Python: Run Selection/Line in Python Interactive Window'.

Restart Visual Studio Code.

Open a Python file.

Select code in the file.

Hit the keyboard shortcut for 'Python: Run Selection/Line in Python Terminal'.

The issue occurs. 'Python: Run Selection/Line in Python Terminal' is not triggered.

Note: For your information, both 'Python: Run Selection/Line in Python Terminal' and 'Python: Run Selection/Line in Python Interactive Window' in the right-click context menu work.

As shown in the gif below, both 'Python: Run Selection/Line in Python Terminal' and 'Python: Run Selection/Line in Python Interactive Window' in the right-click context menu work, but the 'Python: Run Selection/Line in Python Terminal' keyboard shortcut does not.

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

N/A. The output is empty when the issue occurs.

Thanks for the bug.
It looks like if the terminal command is different from the interactive command, it just gets swallowed.

It's this line here:
&& !python.datascience.ownsSelection

If you remove that line from the 'when' clause it should work. That was necessary in order to have both commands use the same shortcut.


Wizard: System configuration updates

We need to update the System configuration step to match the new mocks: https://marvelapp.com/prototype/6g7dja9/screen/81325308
A few specific issues to take care of:

Misalignment issue:

When adding new mount points by clicking + Add partition, the first new partition will be /home, and then the second new partition will also be home... which immediately shows an error. As per the updated mocks, validation will now be done upon clicking Next.

This was fixed with #788


"Gălășești" is listed in the drop-down menu

Description:
"Gălășești" is listed in the drop-down menu alongside its corresponding county and commune, according to the law
Precondition:
The website is up an running.

Step 1
Type "Gălășești" in the search bar.

Expected results
The location is listed in the drop-down menu as "Gălășești, Argeș (Budeasa)".


Binary error on linux (debian)

I'm getting a binary exec format error while trying to run this on Debian.
System configuration
Linux debian 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux

Steps
Here's that I did:

Manually download https://github.com/tmattio/spin/releases/download/v0.4.1/spin-linux-x64.zip
Unzip it
chmod +x spin
./spin

Error
Here's the error I'm getting:
bash: ./spin: cannot execute binary file: Exec format error

Extras
After running file command, looks like this exec was built for MacOS
spin: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE>

Thanks for opening an issue and all the details!
Your diagnostic was correct: we were releasing macOS's binaries for Linux. You can try again with the version 0.4.2, it should be fixed.

Going to close this, assuming the install is ok now. Feel free to re-open if this didn't solve the problem.


Install_db being called all the time...

Install_db is being called every time.  This is in a multisite install
I believe it's
update_option( "auth0_db_version", AUTH0_DB_VERSION );
and
get_site_option( 'auth0_db_version' )
not being the same thing...
should it be
update_site_option( "auth0_db_version", AUTH0_DB_VERSION );
Causing tons of mysql io...

I think you are right, I will change update_option to update_site_option and run some tests.
It should be fixed for the next release, in the meantime, is too much trouble if you just comment this code https://github.com/auth0/wp-auth0/blob/master/WP_Auth0.php#L699-L737 since I will not be able to release a fix until the next release (it is near to be released but cant give you an ETA yet)

Thanks, I just changed the function, tested it, it seems to work fine.
It also looks like the settings are only happening at the blog level, not sitewide.  I'm having to enable and configure Auth0 on each blog.  Typically in multisite you can set options globally, and each blog uses the global settings...  Not as sure how to fix that one..

In the Vnext, we are working in a way to export/import settings.
I dont think we are going to add a global setup in the near future, but this feature could be a nice workaround, what do you think?
The only issue is if you are generating new sites dinamically.

I just started using this (love the idea) but am generating sites dynamically.  Going to be tough! Any plans to allow settings at the network level?

Hi @beatelite no, but as I said, a new couple of new features will make this easier. One is the import/export settings and the other is a new wizard for auto-setup.

Awesome! Also, had a thought that might help someone else: We're just cloning a site on the network that has all the settings pre-done. This way the new site will have everything it needs - including the wp-auth0 info.
It won't help with existing sites but at least it's something.

@beatelite can you point me to some hook on the cloning process? if there is any it shouldnt be hard

We're using this for it: https://premium.wpmudev.org/project/new-blog-template/