RenderTexture not working in OSX on 2.4.0

I get a black screen when using a render texture with SFML 2.4.0. If I switch to using the window object directly and bypass the render texture, it works correctly. If I use SFML 2.3.2 with the render texture, it also works correctly.
I am using a late-2013 Macbook Pro with the Intel Iris Pro.
Here's a small-ish program that reproduces the issue on 2.4.0:
#include <SFML/Graphics.hpp>
#include <iostream>

int main(int argc, char* argv[]) {
    sf::RenderWindow window(sf::VideoMode(1024, 768), "Repro");

    sf::RenderTexture render_texture;

    const sf::Color color(150, 50, 250);

    sf::CircleShape shape(16);
    shape.setFillColor(color);

    if(!render_texture.create(window.getSize().x, window.getSize().y)) {
        std::cerr << "Failed to create render texture\n";
        return -1;
    }

    while(window.isOpen()) {
        sf::Event event;

        while(window.pollEvent(event)) {
            if(event.type == sf::Event::Closed) {
                window.close();
            }

            if(event.type == sf::Event::KeyReleased) {
                if(event.key.code == sf::Keyboard::Escape || event.key.code == sf::Keyboard::Q) {
                    window.close();
                }
            }
        }

        render_texture.clear(sf::Color::Black);

        shape.setPosition(32, 32);

        render_texture.draw(shape);

        render_texture.display();

        const sf::Texture& texture = render_texture.getTexture();
        sf::Sprite sprite(texture);

        window.draw(sprite);

        window.display();
    }

    return 0;
}

I also have the same problem if I use the latest dev build.

I built from source, and I tracked down where this starts happening to this commit:
2752bbcfb048054e27cef0005f39b6df8d68deda
When running it in the OpenGL profiler, I see that the viewport somehow keeps swapping to a 0x0 size when rendering the front buffer. It doesn't do this in older versions.
I am using OSX 10.11.5 (El Capitan).

In the comments, I noticed some references to window.setActive. If I call this after creating my render texture, it starts rendering correctly. None of the samples that I've seen say this should be required.

Strange... I can't reproduce this issue on Windows or Linux. Commit 2752bbcfb048054e27cef0005f39b6df8d68deda didn't touch any platform-specific context behaviour, so it puzzles me why it breaks just on OS X.
Can you try throwing in sf::Content::getActiveContext() calls after every line in your example and see what they return?

It is 0x0 before the render window is created.
It is 0x7fa8c8f030a0 after the render window is created.
It is 0x7fa8c8d0d310 after the render texture is created.
If I add a window.setActive() call before window.isOpen, then the value stays the same after creating the render texture, and doesn't change after calling setActive.

It also stays the same as it was after creating the render texture if I stick calls inside the loop.

Just out of curiosity, does this problem exist when you use the feature/no_internal_context branch?

I am still getting the problem with the commit from that branch.
Contexts are now showing:

0x0 until the render texture is created, even if the render window has been created
0x7fce7bc283c0 after the render texture is created
No difference in the value returned even if I call window.setActive()

I have created some traces on my machine of the last working commit and the commit from feature/no_internal_context. I have trimmed everything after the first fully setup draw loop (where the calls start to become identical each iteration).
I can throw up gists if you're interested. I could also make another trace on my machine of the first problematic commit.

https://gist.github.com/kavika13/b0d5c183940064b46d9072097e574451

This might be a regression of the operating system: it works fine on Yosemite 10.10.5. I can't test on El Capitan, though.

Just had my hands on a 10.11.5 and 10.11.6 and I can confirm the bug. :-/

So... what exactly does this mean? Or in other words, what do we do? :confused:

I also notice that every time a render texture is created, the context seems to get messed up:

Create render window
Create render texture
Call window.setActive()
Create render texture

Expected:
Rendering happens normally
Actual:
Black screen
If I add a step 5 or remove step 4, then the window renders normally. It doesn't matter which of the two render textures I'm using.

I am assuming my trace doesn't give any hints as to what the delta might be (that you didn't already know when making your changes)?
Calling window.setActive() works around the problem for me. Would it make sense to patch the library to do something equivalent, maybe only on certain OSs, or is that even possible with the current interface?

So... what exactly does this mean? Or in other words, what do we do?

I don't know, this goes beyond my understanding of OpenGL, sadly.

@kavika13 is there a reason why all the CGLSetCurrentContext calls are missing? Those are the ones that are interesting and relevant...

I can't really tell you why the trace looks like it does. I copied and pasted it after compiling the sample against various versions of the SFML library. If OpenGL calls are missing, it is either because my trace tool isn't very good (OSX OpenGL debugger), or because SFML isn't emitting those calls.
I am in the middle of learning OpenGL for a different project, so I might be able to actually help you out in a few weeks here ;)

Bump. @kavika13 any news?

Just that I know a bit more OpenGL now ;) Nothing about context switching, but maybe I'll learn through this. I will take a look again.

I am still scratching my head over it. I have tried putting in a bunch of debug print statements in various places in the code, and no smoking guns are emerging. Maybe the fact that it isn't internally calling CGLSetCurrentContext is somehow telling? Putting up the OpenGL Profiler traces for an older version of OSX that doesn't repro the bug might be useful, so we could compare them to the traces I've produced - @mantognini ?
There were some (minor?) API changes, defining the nullability of a bunch of the OpenGL parameters and return types:
https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOSX10_11/Objective-C/OpenGL.html
I don't know if that is making a difference in being able to actually call the APIs or not, especially if SFML isn't using the lower level APIs (I can't really tell - it seems to be using the Cocoa API which I think wraps those calls...?).
There's also a few versions of release notes for OSX that mention NSOpenGLContext changes here: https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKitOlderNotes/

I turned on context tracing in OpenGL profiler (found the button).
I noticed that if I don't call window.setActive(); before the loop that there is a context switch between these two lines:
45 0x7fd415847e00    56.94 µs glCheckFramebufferStatus(GL_FRAMEBUFFER); returns: GL_FRAMEBUFFER_COMPLETE
46 0x7fd413064800     1.04 µs glBindTexture(GL_TEXTURE_2D, 0);

If I call window.setActive(); before the loop, then there is not a context switch at that point:
45 0x7f8f7c06c400    61.28 µs glCheckFramebufferStatus(GL_FRAMEBUFFER); returns: GL_FRAMEBUFFER_COMPLETE
46 0x7f8f7c06c400     0.71 µs glBindTexture(GL_TEXTURE_2D, 0);

When I add the call window.setActive();, then the next context switch happens right after the call to glFlush();. If I don't call it, then the contexts are not switch after the first call to glFlush(); (but they are switched just after subsequent calls, like normal).

I also found that if I remove the call to window.setActive, but move the call to  window.display(); to be at the top of my loop, things display correctly.

@kavika13 Can you give this a try again with SFML 2.4.1 - maybe there's been a fix on Apple's side?

Using the code in OP I can't reproduce any issues, it appears correctly whether using the rendertexture or not, using the latest git build
macOS Sierra 10.12.2
iMac (27-inch, Late 2009)
3.06 GHz Intel Core 2 Duo
8 GB 1067 MHz DDR3
ATI Radeon HD 4850 512 MBATI Radeon HD 4850 512 MB

Although NVIDIA and Intel graphic drivers were updated as part of security updates, 10.11.6 is still triggering the issue. :-/

I still see the bug when linking against 2.4.1, and don't see the bug against 2.3.1.

@kavika13 Can you provide the same full traces before and after that commit as you did before, except this time with context tracing enabled? It would help greatly in understanding the problem.

@kavika13 and @mantognini Try this patch:
diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp
index 4faa7ddb..48ec7e76 100644
--- a/src/SFML/Graphics/RenderTarget.cpp
+++ b/src/SFML/Graphics/RenderTarget.cpp
@@ -373,6 +373,12 @@ void RenderTarget::resetGLStates()
     // Check here to make sure a context change does not happen after activate(true)
     bool shaderAvailable = Shader::isAvailable();

+    // Workaround for states not being properly reset on
+    // macOS unless a context switch really takes place
+    #if defined(SFML_SYSTEM_MACOS)
+        setActive(false);
+    #endif
+
     if (setActive(true))
     {
         // Make sure that extensions are initialized

@binary1248 This seems to do the trick, thanks.
I invite others to test this as well by checking out the bugfix/osx_render_target branch.

Have same issue. Tried to test new branch, but had some troubles. More info here: https://en.sfml-dev.org/forums/index.php?topic=22786.0

Not sure if it's related, but on SFML 2.4.2, RenderTextures work for me (via SFML.NET) but I have this really strange issue where a specific one isn't clearing, unless I call CopyToImage() on its texture.


Gosu not working

Hi.
We are using the official postgres docker image in our CI system and we've found that gosu is not working since the last changes (because we haven't change anything from our part).
What we do is just build our docker image based on the latest version of the official docker image for Postgres just adding few SQL scripts inside /docker-entrypoint-initdb.d. What we have found is that our image is build correctly but the image never cames up because it returns an error. This is exactly what we can see after trying to starting the container:
...
waiting for server to start....LOG:  database system was shut down at 2017-03-22 15:06:56 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
 done
server started
ALTER ROLE

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/01-init-db.sh
error: failed switching to "postgres": operation not permitted

Here you can see part of the Dockerfile we are using:
FROM postgres:latest

ENV DB_USER xxx
ENV DB_PASSWORD xxx
ENV DB_NAME xxx
ENV DB_ENCODING UTF-8

ADD init/*.sh /docker-entrypoint-initdb.d/
RUN chmod +x /docker-entrypoint-initdb.d/*.sh

And in this case this is the shell script (01-init-db.sh) that we would like to run that is stored in our `/init' folder:
#!/bin/bash

{ gosu postgres psql --user postgres <<-EOSQL
    CREATE USER "$DB_USER" WITH PASSWORD '$DB_PASSWORD';
    CREATE DATABASE "$DB_NAME" WITH OWNER="$DB_USER" TEMPLATE=template0 ENCODING='$DB_ENCODING';
EOSQL
}

We have found recently some changes on the docker-entrypoint.sh, could be possible that those changes made gosu not work?
Best,

Looks like this is due to https://github.com/docker-library/postgres/pull/253 -- can you try dropping the use of gosu postgres from your script and see if that fixes the issue?

Yes, it solved the problem! Thx! ;-)


Jax.random Very Slow in JIT compared to Pmap under multi-gpus

Description
I'm using JIT (Jax.Array) for data parallelization, but generating a random matrix as required in dropout layers is very inefficient in JIT under the multi-gpu setting.
Below is an example code:
import functools
import numpy as np
import jax
import time

from jax import lax, random, numpy as jnp

from jax.experimental.pjit import pjit, with_sharding_constraint
from jax.sharding import Mesh, PartitionSpec, NamedSharding
from jax.experimental import mesh_utils, maps

# Start a device mesh.
device_mesh = mesh_utils.create_device_mesh((4, 1))
# Annotate each axis with a name.
mesh = Mesh(devices=device_mesh, axis_names=('data', 'model'))

def dropout_layer(x, rate, rng_key, share_dims=None):
  if isinstance(rate, float) and 0.0 < rate < 1.0:
    keep_rate = 1. - rate

    if share_dims is not None:
      if not isinstance(share_dims, (list, tuple)):
        share_dims = [share_dims]
    else:
      share_dims = []

    broadcast_shape = list(x.shape)
    for dim in share_dims:
      broadcast_shape[dim] = 1
    mask = jax.random.uniform(rng_key, broadcast_shape, x.dtype) < keep_rate
    mask = jnp.broadcast_to(mask, x.shape)
    return jax.lax.select(mask, x / keep_rate, jnp.zeros_like(x))
  else:
    return x

# Create fake inputs.
x = jnp.ones((96, 256, 512))
# Initialize a PRNG key.
k = random.PRNGKey(0)

import sys

method = sys.argv[1]

def f(x, k):

  for _ in range(10):
    x = dropout_layer(x, 0.5, k)
  y = x

  if method == 'pjit':
    return y.sum()
  else:
    return jax.lax.psum(y.sum(), axis_name='data')

if method == "pjit":
  jit_f = jax.jit(f)

  with mesh:
    start_time = time.time()
    x = jax.device_put(x, NamedSharding(mesh, PartitionSpec('data')))
    y = jit_f(x, k)

    for _ in range(100):
      y = jit_f(x, k)
    print(time.time() - start_time)

else:
  pmap_f = jax.pmap(f, axis_name='data')
  x = x.reshape((4, -1) + x.shape[1:])
  k = jax.device_put_replicated(k, jax.local_devices())

  with mesh:
    start_time = time.time()
    y = pmap_f(x, k)

    for _ in range(100):
      y = pmap_f(x, k)
    print(time.time() - start_time)

Running with 4 GPUs gives the following timing results:
CUDA_VISIBLE_DEVICES=4,5,6,7 python script.py pjit
12.549862623214722
CUDA_VISIBLE_DEVICES=4,5,6,7 python script.py pmap
2.7941601276397705

I don't know why the speed difference is so huge. Could anyone give some explanation? If this is just my coding's problem, please point it out; otherwise, it seems that some operations are not well supported by jax.Array to efficiently handle data/model parallelization.
Thanks,
What jax/jaxlib version are you using?
jax/jaxlib: 0.4.2
Which accelerator(s) are you using?
4 GPU
Additional system info
python=3.8
NVIDIA GPU info
No response

This is unfortunately expected. The PRNG JAX uses by default interacts badly with the automatic partitioning in XLA. We're working on rectifying that issue, but the fix is still in progress. In the meantime you could use the jax_default_prng_impl config to switch to one of the implementations that are more friendly to automatic partitioning. See the relevant docs here.

I found a better reference actually. There's a flag jax_threefry_partitionable that might help you.

Thanks, @apaszke. Yeah, adding this flag works!

I'm quite curious of what data is communicated among devices when the flag is False?

@mattjj Thx for the quick answer and sorry for bring back the unhappy memory ;-)
To summarize, the old impl has reshape and concatenate calls which introduce the extra communication, and the new impl doesn't have them but each device simply doing threefry hash locally on the count array (which is sharded). Do I understand correctly?


Config being overwritten

There seems to be a bug when using the -c parameter to specify your own location for a customized config file. The file keeps being overwritten each time the drive is remounted. Why is that?

The configuration file is rebuilt every time you remount your drive. That's the strategy I use to migrate configuration when you upgrade the application to new versions (so you get the new options).

There seems to be a bug because each time the drive is remounted the configuration file is overwritten with the default template. I understand that the configuration file is rebuilt every time but should't the tweaks to the original template be migrated to the rebuilt config each time the drive is remounted? If not, then this is a huge logic issue.
For example, in the original template, the "stream_large_files" setting is set to false but in my tweaked config I have this set to true as well as many other tweaks to other settings as well. I have a script which I run on cron to check if google-drive-ocamlfuse is still mounted and if it isn't then I remount it. The problem arises when the drive is remounted because the modified config I am using gets overwritten. Therefore, once the drive is remounted the performance is horrible making it unable for my needs. But when I am using my tweaked modified config file the performance is excellent.
That being said, what would you recommend to fix this? Am I doing something wrong? Settings in the config file shouldn't need to be re-entered each time the drive is remounted, they should be persistent. Please advise, thanks.

There seems to be a bug because each time the drive is remounted the configuration file is overwritten with the default template.

This should not happen. The config file is regenerated from default values only if the file is not present, otherwise previous values should be preserved.

Why would the original config get overwritten? I can assure you the file is/was present but every so often I find the values get overwritten. It doesn't happen every time the drive is re-mounted but it does happen every so often for some reason...

Why would the original config get overwritten?

It is overwritten, because if I add new config options, you get them for free with their default values after the upgrade.


Render map and its markers and paths

I got map to be rendered and to display its markers and paths.

Coverage increased (+0.1%) to 29.582% when pulling dcf69797e8505e106277eea66a96b34cd1d17c9e on mapa into f6172f065b25ae999666b5ff9c9123ab66f1db50 on master.

Coverage decreased (-0.5%) to 29.582% when pulling 3b111f937d09971c7dd5bba51c9c4c0e0522d5ab on mapa into 4786edd60bb4000e6f70697b7783200208c85208 on master.

Coverage increased (+1.4%) to 31.511% when pulling 962840bfab697c64c39b5f5eb1fe12e4571aa421 on mapa into 4786edd60bb4000e6f70697b7783200208c85208 on master.


get rid of magic number in accessibilityTree

Was looking through data-grid and noticed a magic constant that was introduced in this PR: https://github.com/glideapps/glide-data-grid/pull/121 and this commit: https://github.com/glideapps/glide-data-grid/commit/5ee2a7a0aaea31cd83fc5599f893612b38eda75d
Seems that we can replace it with accessibilityHeight but not exactly sure.

It's definitely a hack but it works pretty well. The "width" in this case is just the pixel width of the grid. I guess technically that means any grid under 50px wide is not accessible but lots of things start breaking down at that size for this library.


Reproduce of issue #111

Run SignalRSimpleChat, open http://localhost:5001/subpath/ with F12, no error log in Console output. Open http://localhost:5000/subpath/ with F12, Console output shows WebSockets fail, fallback to LongPooling. Uncomment the change in WebSocketProxyMiddleware.cs fixes.

Sorry, I don't know why it has conflicts and how to resolve. Those conflicts are all my modifications and should be kept.

Ok will take it from here, ty.

@ChrisTorng

Uncomment the change in WebSocketProxyMiddleware.cs fixes.

I've reproduced this locally. Going to add some tests around this....

Merged your work and fix via https://github.com/damianh/ProxyKit/commit/2fb417f41c067ba0da88a56682d96eebe8376f08
Thank you taking the time to do the repro.

Package should be available at https://www.nuget.org/packages/ProxyKit/2.1.0-beta.2 shortly. If you could take it for a spin and let me know how it goes, then I'll release shortly after.

Sorry, I can't check it until Thursday. Then I'll check and report.

No worries.

I've update to beta 2 and have no problem. But actually my project had been changed to use root directory, not /subpath anymore, so I'm not checking it on the reported issue's scenario. But I believe it should be OK, because you use exactly my suggested way to fix it. But in fact, I don't think the TrimStart('/') is the best way to fix this issue, and have no other better idea. Should you raise Exception when calling ForwardTo without trailing back slash, especially when it has /subpath?

Considered the exception / bett-pit-of-success but am happy to get this version out with this approach. I've spotted and edge case regarding trailing slashes #121 and there is an issue with with .MapWhen() #66 that ultimately means I need to do my own url matching which will be a breaking change. So I will address this more completely in a future release.


Remove hardcoded apiKeys and instead use a flag

This way the developer who wants to test the functionality of the SDK can put their own apiKey as follows:
go test . -apikey=xxxx the request access key for the specified bot using the SDK
I think this is overall a better idea than hard-coded keys. Might look into refactoring the tests later on also which may bring other possible changes.
@JulienBlancher , @ftriquet what do you think?

@saifabid
Thank you for your PR and your interest in the SDK but we are currently working on an new version of it and the tests will be rewritten and we will mock all the requests.

@ftriquet no worries! Would love to help out with that too!


Add documentation for slices

I've spent a long time working on this (more than I initially expected). I would appreciate any feedback on whether anything is confusing, or if you spot any typos.
You can see a build of the page at https://quansight.github.io/ndindex/_docs-slice-docs/slices.html.
Full list of changes in this PR:

Add a document that thoroughly explains the Python/NumPy slice semantics https://quansight.github.io/ndindex/_docs-slice-docs/slices.html.
Move the documentation from recommonmark to MyST. Both are tools that allow using Markdown in Sphinx, but MyST has more features and better support.
Enable Travis docs deploys via doctr on branches.
Move the doctr deploy key to only the Travis build that needs it.
Rename the COVERAGE environment variable in Travis to CODECOV.
Add a documentation style guide https://quansight.github.io/ndindex/_docs-slice-docs/style-guide.html
Replace the "fork me on GitHub" ribbon in the docs with a pure CSS version.
Fix a font name typo in the docs CSS
Extract the doctests into a separate script, ./run_doctests. This allows the doctests to work properly in Markdown. Otherwise they fail if the doctest is in a code fence. It also allows the library doctests to not use the module namespace. This closes #4.
Modified a test so that integer inputs to Slice.reduce() is tested directly.

CC @pearu. This is the document I mentioned to you in Slack the other day.

Thanks @asmeurer for this detailed description of slices!
There is one thing that is perhaps missing and would be worth discussing: the composition of slices is a slice. See https://github.com/Quansight-Labs/rfcs/tree/pearu/rfc0005/RFC0003-sparse-roadmap#slicing for the mathematical background.

Thanks for taking a look @pearu.

There is one thing that is perhaps missing and would be worth discussing: the composition of slices is a slice. See https://github.com/Quansight-Labs/rfcs/tree/pearu/rfc0005/RFC0003-sparse-roadmap#slicing for the mathematical background.

This is a bit more technical than what I am going for in this document. The aim of this is to help people understand the very basics of Python's slicing semantics, since they are very confusing to even expert Python users. But there may be a place for that discussion elsewhere in the documentation, especially when we do implement slice composition, which is a planned feature (#27).

Extremely well written @asmeurer! Thanks so much!

Thank you @scopatz and @melissawm for the review!

Also, not the minor conflicts now

I have addressed the comments here. If there are no more comments at the end of the day I will merge.

Thanks for merging. The live version of this page is at https://quansight.github.io/ndindex/slices.html. I'm going to delete the dev docs build for this branch.


Map doesn't render correctly for zoom meetings

I have to put in a rough address for zoom meetings otherwise the meeting doesn't appear in the list but then it shows a grey box where the map should be. I don't want to put an actual address in because then people might think it's a face to face meeting.
Example: https://debtorsanonymous.org.au/?meeting=carlisle-perth-da
Data source: https://docs.google.com/spreadsheets/d/1YRpUph8Xfw-hX-2IegFx_S4YQUprFTqLPYxfL42Pb98/edit#gid=0

that's right. if there is no exact address the map does not show. some groups like to show a static image there, for example
i had thought to perhaps show a general area map when it sees four coordinates like your sheet has, but once i implemented it it was just confusing. it looked like there was an error and the pin was missing because of some technical glitch rather than intentionally

That image would work. How do I configure that using the JS version?

ok great try adding this CSS code
https://github.com/code4recovery/12-step-meeting-list/discussions/922#discussioncomment-3646436
#tsml-ui .meeting.online:not(.in-person) .map::after {
  background-image: url(https://images.unsplash.com/photo-1588196749597-9ff075ee6b5b?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=1440&ixid=MnwxfDB8MXxhbGx8fHx8fHx8fHwxNjIyMTIzODkw&ixlib=rb-1.2.1&q=80&utm_campaign=api-credit&utm_medium=referral&utm_source=unsplash_source&w=1920);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  bottom: 0;
  content: '';
  left: 0;
  opacity: 0.25;
  position: absolute;
  right: 0;
  top: 0;
}

Nice one thanks.

@joshreisner The above CSS is not working for me.  When I inspect the meeting page I can see the div with id tsml-ui and it has classes meeting and online but there is no descendant with class map.  Has something changed in the design or am I missing something?

Ah, but then again I'm not seeing the maps next to in-person meetings either.  So apparently my configuration is off.

Yep, when I use a Mapbox API key rather than a Google API key everything works great.  Sorry for the noise.


Add optional ssl implementation switch to 's3' executable

Default to not use openssl and add a flag to switch between the two. Have come across some issues from using openssl that require further investigation before it can be the default
! @markhibberd @raronson @jystic

👍


Embedded Ergo expressions and/or backticks fail to execute/render

Describe the bug
Attempting to use backticks within an Ergo expression within a grammar.tem.md.  However, when draft command executed, the syntax is passed through to the output.md file in raw, intact form.
Cicero version 0.21.0
To Reproduce
data.json
  "agentPriceEstimateLow" : {
    "$class" : "org.accordproject.money.MonetaryAmount",
    "doubleValue" : 10000,
    "currencyCode" : "AUD"
  },
  "agentPriceEstimateHigh" : {
    "$class" : "org.accordproject.money.MonetaryAmount",
    "doubleValue" : 0,
    "currencyCode" : "AUD"
  }

grammar.tem.md
{{%
    if agentPriceEstimateHigh.doubleValue = 0.0
    then `Agent Single Price: {{% agentPriceEstimateHigh.currencyCode %}} ${{% agentPriceEstimateHigh.doubleValue as "0,0.0" %}}`
    else `AgentLow Price: {{% agentPriceEstimateHigh.currencyCode %}} ${{% agentPriceEstimateHigh.doubleValue as "0,0.0" %}}`
%}}

Execute cicero draft command.
No error thrown. Simply fails to process syntax.
Expected behaviour
String to be rendered according to syntax.
Screenshots

Thanks @martinhalford . It is an issue with the new parser which does not like % inside a formula (due to a wrong / too constrained regular expression in the template plugin). I'm looking into it.

This is going to be a slightly tricker issue than expected. For the time being, the work around is to use string concatenation ++ inside Ergo formulas.


docs: Fix various typos.

Fixes typos in:

tutorials/new-feature-tutorial.md
subsystems/sending-messages.md

Testing Plan:
GIFs or Screenshots:

Merged, thanks for another nice typo cleanup PR :)


Add sha256sum template function

This is intentionally named and implemented to match the one in Sprig: https://masterminds.github.io/sprig/crypto.html
I need this so that https://github.com/docker-library/meta-scripts/pull/16 can calculate sourceIds in pure bashbrew formatting (and thus be really fast): :sweat_smile:
...
	{{- $sum := $.ArchGitChecksum $a . -}}
	{{- $file := .ArchFile $a -}}
	{{- $builder := .ArchBuilder $a -}}
	{
		"sourceId": {{ join "\n" $sum $file $builder "" | sha256sum | json }},
		"reproducibleGitChecksum": {{ $sum | json }},
...

Codecov Report
Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (0b38175) 75.21% compared to head (1a4c6e8) 74.89%.

Files
Patch %
Lines

pkg/templatelib/lib.go
0.00%
4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   75.21%   74.89%   -0.33%
==========================================
  Files           8        8
  Lines         920      924       +4
==========================================
  Hits          692      692
- Misses        173      177       +4
  Partials       55       55

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Gah, forgot to refresh.


OOP version of rainbow circles

Here is my version of rainbow circles. I doesn't change any logic, just rewrote it using OOP-techniques.

"Thanks for taking such a detailed look at my project! I really appreciate your much-needed improvements to my code. However, I'd like to keep all the code in this repository self-written, as this is very much a learning project for me too! I'm learning from you as well, and I like your organized style, so don't take it personally :)" (c)


Feature/parallel migrations

Using just IsolationLevel.Serializiable is not sufficient when running migrations in parallel.

For Postgres the simplest solution seems to be using and advisory transaction lock.
For SqlServer using Serializable is dangerous  with regards to executed statements in the migration scripts
Using with (SERIALIZABLE) and a retry mechanism worked in a stable way
Not sure if parallel migrations is relevant with SqlLite

@Nagelfar @danielweller-swp still relevant?

Relevant as in 'there is a problem with concurrent execution' - then I assume yes.
But not sure it needs to be solved technical wise or if updating the readme suffices.


Querying values of an instance

Following on the example of the teacher from the documentation, I haven't been able to query specifically the age or any other values attached to the teacher instance.
Am I missing something here?
I tried:
"What is the age of Mrs Smith?"
"What is the value of age of Mrs Smith?"
"What is Mrs Smith's age?"

Hi @gmarty,
I'm sorry you've had problems with the library. As mentioned in the documentation, one of the key aims is to be a lightweight implementation of a much more robust system, and therefore some functionality is not available! We aim to provide a research-grade prototype to fulfil a decent level of CE-parsing and understanding, rudimentary NL-processing, and responses to simple questions.
In particular, in your case, the CENode library is not, in its current form, able to respond to NL/Ask inputs of the form you specified. Generally, users are able to query things like
"what is Mrs Smith?"
"what is a teacher?"
And also things like
"where is Mrs Smith?"
But that's about it for now.
The JavaScript interface is more complete, however, and should allow you to obtain the information you need:
node.instances.mrs_smith.age

will return the age property of an instance named Mrs Smith.
If you're using the library in an application, then I suggest you try to embed this kind of approach somehow into your workflow to support querying of specific properties. Otherwise, the library itself could be modified to allow the agent to answer more complex questions!


PrePersist event doesn't fire on subsequent persist

I am not sure if this is a bug or a limitation or mistunderstood feature. It just works in a different way than I expected.
Let's assume I want to validate field of a document and set isInvalid field to TRUE if certain criteria is not met.
/**
 * @ODM\Document
 * @ODM\HasLifecycleCallbacks
 */
class Foo {
	/** @ODM\Field(type="string") */
	public $bar;

	/** @ODM\Field(type="boolean") */
	public $isInvalid = FALSE;

	/**
	 * @ODM\PrePersist
	 * @ODM\PreUpdate
	 */
	public function validate() {
		$this->isInvalid = FALSE;

		if (empty($this->bar)) {
			$this->isInvalid = TRUE;
		}
	}
}

I would assert that this test would not fail. But the second persist obviously doesn't fire PrePersist event.
$f = new Foo;

$this->getDm()->persist($f);
Assert::true($f->isInvalid);

$f->bar = 'baz';
$this->getDm()->persist($f);
Assert::false($f->isInvalid); //Fails

I am sure that by looking into code I would find out that it is designed like that intentionally. But isn't it incorrect behavior? I would understand that the second persist will not fire PrePersist as the second persist can be considered an update, but PreUpdate isn't fired either.
Would someone please clarify this or correct my assumptions and propose a solution?
Thank you.

The second call to persist is a no-op since the entity is already managed by the entity manager. It only has relevance if you're using an explicit change tracking policy, in which case it marks the entity for changeset computation.
Changes like these should be done in an onFlush handler since they require changeset recomputation.

I resolved this by skipping doctrine events altogether and implemented custom DocumentManager that looks a bit like this:
class DocumentManager extends \Doctrine\ODM\MongoDB\DocumentManager {
	public function persist($document) {
		if ($document implements TValidation) {
			$document->validate();
		}
		parent::persist($document);
	}
}

Oh, one more thing: this is The ORM repository, not ODM. Please open issues against doctrine/mongodb-odm in the future.


Dcos-cli can't update jobs or create jobs with force-pull or privileges set to True

What version of DC/OS + DC/OS CLI are you using (dcos --version)?
dcoscli.version=fbd767d6f55c15c2f9dcf7d1ba56734fdd79963d
dcos.version=1.13.3
dcos.variant=open
dcos.commit=450f27d17908e25c54a5ac4d861d522d6363e85c
dcos.bootstrap-id=258e1f02d00700ee1ba03cf500d050476b44e28c
Centos 7.6
So i was trying to create a job with dcos-cli that both needed privileges set to True and force-pull set to True.
Dcos job add job.json
job.json:
{
  "id": "job",
  "description": "run",
  "run": {
    "cpus": 1,
    "mem": 1024,
    "disk": 0,
    "cmd": "sleep 20",
    "env": {},
    "placement": {
      "constraints": []
    },
    "artifacts": [],
    "maxLaunchDelay": 3600,
    "volumes": [],
    "restart": {
      "policy": "NEVER"
    },
    "secrets": {},
    "docker": {
      "image": "myimage",
      "privileged": true,
      "forcePullImage": true
    }
  },
  "schedules": []
}

But DCOS dose not read the privileged or force-pull tag and instead set them to the default value of false.
same happens if i try to use the "dcos job update job.json" it will just ignore the setting or if the settings where set to true in another way override them with false.
If possible please provide a recipe for reproducing.
1, create a job with forcepull set to true
2, dcos job show "created job"
3, update the settings of a already existing job and try to set them to true
4, look to see if they are set and see that both are reverted back to false even if they where set to true previously.

Hi @karlohrn
Thanks for the report, we fixed forcePullImage in https://github.com/dcos/dcos-core-cli/commit/de3f9cbabcad82d2b29695137a7739162a6684c2
I'll be working on syncing our Go type with the schema in https://github.com/dcos/metronome/blob/master/api/src/main/resources/public/api/v1/schema/jobspec.schema.json


Error while installing requirements

ansible-galaxy commands expects a different syntax. I get this kind of errors when running sudo ansible-galaxy install -r provisioning/requirements.yml:
 downloading role '---', owned by
Sorry, --- was not found on galaxy.ansible.com.
 downloading role 'memcached', owned by -%20src%3A%20geerlingguy
Sorry, - src: geerlingguy.memcached was not found on galaxy.ansible.com.

What version of Ansible are you running? the yaml syntax has been supported since at least 1.7 or so

I've tested the requirements.yml file with Ansible 1.9.4 and <IP_ADDRESS>/1 (just released today), and it seems to be working fine.

I'm using ansible 1.7.2
I think I remember reading somewhere in the docs about using 1.8, but I couldn't find it right now.


Ensure self.config is always initialized in SentinelHubClient()

minor fix, if I'm not mistaken

Well spotted, thanks!


Fix typo in dowhy_causal_discovery_example.ipynb

signficant -> significant
Signed-off-by: Ikko Ashimine<EMAIL_ADDRESS>

@all-contributors please add @eltociear for docs.


ci(now): autodeploy with a fork of now-travis

Really wanna get this working!

Codecov Report

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

@@           Coverage Diff           @@
##           master      #36   +/-   ##
=======================================
  Coverage   92.42%   92.42%
=======================================
  Files          16       16
  Lines          66       66
  Branches        5        5
=======================================
  Hits           61       61
  Misses          4        4
  Partials        1        1

Continue to review full report at Codecov.

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


Update-PSModuleManifest is destroying nested hashtables in PrivateData

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.

Steps to reproduce
Running Update-PSModuleManifest on a manifest with nested hashtables in PrivateData is replacing the hashtables with the string representation System.Collections.Hashtable.
For example, with:
PrivateData = @{

	MemberA = @{
		One = 'one'
		Two = 'two'
	}

	PSData = @{

            ExternalModuleDependencies = @(
                'AWSPowerShell'
            )

    } # End of PSData hashtable

} # End of PrivateData hashtable

Running Update-PSModuleManifest with any value (even something that doesn't affect PSData like ModuleVersion, the resulting PrivateData will have non-PSData members replaced:
PrivateData = @{

    PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        # Tags = @()

        # A URL to the license for this module.
        # LicenseUri = ''

        # A URL to the main website for this project.
        # ProjectUri = ''

        # A URL to an icon representing this module.
        # IconUri = ''

        # ReleaseNotes of this module
        # ReleaseNotes = ''

        # Prerelease string of this module
        # Prerelease = ''

        # Flag to indicate whether the module requires explicit user acceptance for install/update/save
        # RequireLicenseAcceptance = $false

        # External dependent modules of this module
        ExternalModuleDependencies = 'AWSPowerShell'

    } # End of PSData hashtable

    # MemberA
    MamberA = 'System.Collections.Hashtable'

} # End of PrivateData hashtable

Expected behavior
The original hashtable members of `PrivateData` are preserved.

Actual behavior
The original hashtable members of `PrivateData` are replaced with the single string `'System.Collections.Hashtable'`.

Error details
No response
Environment data
ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.2                 Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Ubuntu 22.04.4 LTS
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

### Visuals

_No response_

Hi @SydneyhSmith wondering if there's been any movement on this

Seems this is caused by Microsoft.PowerShell.Core\New-ModuleManifest. So by PowerShell, not PSResourceGet. Issue was reported in 2018 but never fixed:

https://github.com/PowerShell/PowerShell/issues/5922

Seems this is caused by Microsoft.PowerShell.Core\New-ModuleManifest. So by PowerShell, not PSResourceGet. Issue was reported in 2018 but never fixed:

New-ModuleManifest -PrivateData does not work with nested hashtables PowerShell#5922

thankfully it looks like it was just reopened for investigation 🙏


bitwise operators

Description
Give a brief description of different bitwise operators.
also explain some bitwise techniques
Domain
C/CPP
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign

Closing this as #3969 got merged !


s

it the s. please fix s immidately !

oh no... how can we fix this awful bug ?

with the j !
пт, 8 апр. 2022 г., 02:16 fofl12 @.***>:

oh no... how can we fix this awful bug ?
—
Reply to this email directly, view it on GitHub
https://github.com/fofl12/gamebot/issues/1#issuecomment-1092207113, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AQY4LW2ZZTYPQH6IT6YPZI3VD5GDXANCNFSM5S2AOK2Q
.
You are receiving this because you authored the thread.Message ID:
@.***>

with the j !

with the j !


File T-Display-S3-main Not unzipping correctly

When unzipping the file the following messages are displayed, and the files are not all extracted:
C:\Users\I-7\Downloads\T-Display-S3-main.zip
Unexpected end of data
Data error : T-Display-S3-main\doc\esp32-s3_technical_reference_manual_en.pdf

Maybe it's a network problem. Please download again.

Thank you, it worked today.


Fix shortcut processing when schema fails validation

This fixes shortcut processing so that if a schema fails validation, no child nodes are checked.  Only applies to calls to schema.Authorize() or schema.AuthorizeWithRoles() -- not schema.AuthorizeWithPolicy() and not to any graph or field type.  Without this fix, an entire request is always checked, resulting in no less security; hence this is only a performance improvement.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.003%) to 95.962%

Totals

Change from base Build<PHONE_NUMBER>:
0.003%

Covered Lines:
1607

Relevant Lines:
1641

💛  - Coveralls


Clarifying required url parameter format

Although I think the current text does imply to use this format - it is easy to miss. The POST request will still return a 201 so you don't hit any issues until you try to configure a policy.

@jjcollinge,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@jjcollinge : Thanks for your contribution to the Azure documentation! The author, @vturecek, has been notified to review your proposed change.

#sign-off


ENH: Add new method in order to perform a balanced cut tree

A new function (and its corresponding test) was added to the
scipy.cluster.hierarchy module. This new function looks recursively
along the hierarchical tree, from the root (single cluster gathering
all the samples) to the leaves (the clusters with only one sample),
retrieving the biggest possible clusters containing a number of
samples lower than a given maximum.

Reference issue

Balanced cut tree method for hierarchical clustering #10448
What does this implement/fix?

It implements a new function in order to perform a balanced tree cut, i.e. where the number of sample points within each cluster is lower than a given maximum.
Additional information

For a more detailed explanation, as well as a graphical explanation of the results, please visit https://github.com/vreyespue/cut_tree_balanced
The initial problem was the following: if you perform a standard cut on a tree (i.e. the result from a hierarchical clustering), probably you will end up having a few big clusters (where the number of data samples is high), and many small clusters (each containing very few data samples). Thus, the resulting clustering is unbalanced, i.e. it contains clusters of very variable size.
The proposed function looks recursively along the hierarchical tree, from the root (single cluster gathering all the samples) to the leaves (i.e. the clusters with only one sample), retrieving the biggest possible clusters containing a number of samples lower than a given maximum. In this way, if a cluster at a specific tree level contains a number of samples higher than the given maximum, it is ignored and its offspring (smaller) sub-clusters are taken into consideration. If the cluster contains a number of samples lower than the given maximum, it is taken as result and its offspring sub-clusters not further processed.
Since all output clusters contain no more than a given maximum number of samples, the resulting clustering is considered to be more balanced than a standard tree cut. Note however that the number of samples per cluster might still have a considerable variability, since the splitting of a big cluster can result in sub-clusters with very variable number of samples. This variability should be smaller as the given maximum of samples per cluster is closer to 1 (being the variability equal to 0 when the maximum is at its limit, i.e. 1).
The function returns two results:

List of integers containing for each input sample its corresponding cluster id. The cluster id is an integer which is higher for deeper tree levels.
List of integer arrays containing for each input sample its corresponding cluster tree level, i.e. a sequence of 0s and 1s. Note that the cluster level is longer for deeper tree levels, being [0] the root cluster, [0, 0] and [0, 1] its offspring, and so on. Also note that in each cluster splitting, the label 0 denotes the bigger cluster, while the label 1 denotes the smallest.

Dependencies and Example Script
Before running the example script, please ensure you have installed the scipy and numpy packages in your Python environment.
In order to run the example script you can use the following command.
$ python3 cut_tree_balanced.py

By running the example script you should run commands and get printed outputs similar to the following.
First, a numpy array of 100 rows x 4 columns is randomly generated using a gamma distribution. Note that we perform such a random sampling from a gamma distribution so that the resulting standard clustering is unbalanced (see below). Similar results are obtained when varying the random seed.
    np.random.seed(4)
    X = gamma.rvs(0.1, size=400).reshape((100,4))

In order to check the validity of the input data, the type, shape and the first 10 rows are printed.
Type of the input data sample: <class 'numpy.ndarray'>
Shape of the input data sample: (100, 4)
First 10 rows of the input data:
[[1.28573793e-03 8.12672961e-06 1.26520704e-03 2.07729574e-03]
 [1.16397414e-01 2.06534197e-03 1.91044478e-02 5.35127859e-01]
 [5.81563428e-02 5.92302950e-06 1.90433024e-02 2.87155777e-02]
 [3.98932109e-08 5.37862343e-02 4.38562255e-02 1.27557329e-04]
 [3.57028885e-04 2.88945299e-05 3.40388733e-05 9.90278888e-06]
 [3.91282036e-06 4.61803593e-02 2.75652111e-08 1.66504104e-09]
 [2.60630428e-10 3.89770028e-04 8.52159994e-03 5.83321506e-09]
 [6.37325763e-10 3.41859809e-04 4.51815091e-02 2.83600476e-06]
 [1.14654357e-03 1.12808821e-02 1.61202749e-04 1.56459197e-11]]

Next, the linkage matrix is computed by using the ward method (or any other method using the linkage function), and a standard tree cut is performed (with a specific number of output clusters = 20).
    Z = ward(X)
    standard_cut_cluster_id = cut_tree(Z, n_clusters=[20])

As shown below, the output is a numpy array of 100 elements, assigning one cluster ID to each input vector (of 4 dimensions, see above). Note that the ID of the resulting clusters go from 0 to 19 in this case. The resulting clustering is unbalanced, i.e. containing a big cluster (where the number of data samples is 48), and many small clusters (each containing very few data samples, 9 of them containing a single data sample). As result, the range of cluster sizes goes from 1 to 48, showing a standard deviation of 10.17 data samples.
Type of the standard clustering result: <class 'numpy.ndarray'>
Shape of the standard clustering result (one cluster id per data sample): (100, 1)
First 10 rows of the standard clustering result (one cluster id per sample):
[0 1 0 0 0 0 0 0 0 2] ...
Total number of resulting clusters = 20
For each resulting cluster: Cluster ID
[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19]
For each resulting cluster: Count of data samples
[48  4  1  2 10  8  1  6  2  2  1  1  1  1  3  1  4  2  1  1]
Count of data samples per cluster: mean = 5, max = 48, min = 1, std = 10.17

The following figure illustrates visually the resulting clustering by using the standard tree cut. The black line shows the height at which the cut (i.e. pruning) is performed (which is identical for all clusters). The resulting cluster IDs are depicted within the black squares (i.e. numbers in white represent the obtained cluster IDs). As result, the cluster ID 0 contains 48 elements (almost half of the data samples), an issue which we try to address with our proposed method.
Dendrogram Standard Cut
A more balanced clustering is then attempted by using the balanced cut tree method, in which the maximum number of data samples within each cluster is set to 10.
    [balanced_cut_cluster_id, balanced_cut_cluster_level] =
        cut_tree_balanced(Z, 10, verbose=False)

We get two results from the new function: (1) a list of integers containing for each input sample its corresponding cluster id, and (2) a list of strings containing for each input sample its corresponding cluster tree level (see above section for further information). Note that the ID of the resulting clusters go from 1 to 20 in this case, i.e. the number of resulting clusters (20) is identical to the previous one. Importantly, the resulting clustering is more balanced than the standard one (for an equal number of resulting clusters), since the range of cluster sizes goes from 1 to 10, showing a standard deviation of 2.68 data samples.
Type of the balanced clustering result (id): <class 'numpy.ndarray'>
Shape of the balanced clustering result (one cluster id per data sample): (100,)
First 10 rows of the balanced clustering result (one cluster id per sample):
[19  4 10 12 20 12 14  9 15  2] ...

Type of the balanced clustering result (level): <class 'numpy.ndarray'>
Shape of the balanced clustering result (level) (one array per data sample): (100,)
First 10 rows of the balanced clustering result (level) (one array per sample):
[array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
 array([0, 0, 0, 1]) array([0, 0, 0, 0, 0, 0, 0, 0, 1])
 array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
 array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
 array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
 array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
 array([0, 0, 0, 0, 0, 0, 0, 1])
 array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) array([0, 0, 1, 0])] ...

Total number of resulting clusters = 20
For each resulting cluster: Cluster ID
[ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20]
For each resulting cluster: Count of data samples
[ 2 10  2  7  7 10  6  8  8  3  4  4  3  3  3  1  4  3  4  8]
Count of data samples per cluster: mean = 5, max = 10, min = 1, std = 2.68

The following figure illustrates visually the resulting balanced clustering. Again, the resulting cluster IDs are depicted within the black squares (i.e. numbers in white represent the obtained cluster IDs). Now the tree level at which the clusters are selected (i.e. pruned) is different for each cluster ID, since the cluster search method is not only driven by the heigth (i.e. distance between clusters), but also by the number of samples contained within the clusters. Note for instance that cluster ID 1 is smaller (2 data samples) than cluster ID 17 (4 data samples), although the heigth at which it was pruned is much higher. As result, all clusters contain less or equal than a number of specific data samples (in this case 10), and therefore their size is less variable.
Dendrogram Balanced Cut
In conclusion, here we describe and implement a method which generates (for a similar number of resulting clusters) a more balanced outcome, i.e. building clusters of less variable size.
Related Work
There are several implemented methods following the same or a similar idea, i.e. performing a tree cut in which the resulting clusters are at different tree levels.

Implementation of the same method within the scikit-network package (see source code of the cut_balanced function).
The CRAN R package dynamicTreeCut (see GitHub repo and the paper) implements novel dynamic branch cutting methods for detecting clusters in a dendrogram depending on their shape.
Translation of the dynamicTreeCut method to Python.
The web based MLCut tool (see GitHub repo and the paper) provides interactive methods to cut the branches of the tree at multiple levels.

Closes #10448

And of course I should have started with: this looks like a nice addition, thank you for working on this!

I made a first pass through the code, made some detailed comments (haven't tested yet). There's a few more things to do when adding a new function:

add the function name in the function listing in the module docstring of hierarchy.py. this will add the function to the html docs

Done.

add it to the __all__ list around line 140 of hierarchy.py. this adds the function to the public API.

Done.

A few more tests seem in order as well, for example:

check that the parameter check >=1 you're doing for max_cluster_size raises a ValueError (use assert_raises)

Done.

check hardcoded numbers for a very small linkage tree, where it's easy to see what the expected values are. this will prevent the output changing - I think the current test doesn't do that.

I included to examples based on a very small (but unbalanced) linkage tree. Please let me know if they are helpful, and if you want me to extend these with further tests.

It would also be nice to take the content in the README of your repo and add it to the PR description. That will be easier for readers, and then we won't rely on a repo that may disappear at some point.

Hi @rgommers, just a couple of short questions.

I saw that one of the checks (travis-ci) did not pass. Is this something related to my code? I did not understand the infos and logs related to the test.
There is a minor conflict at the file THANKS.txt. I would however repair this by making a rebase on upstream/master after the next revision round. Is this ok? Or should I proceed otherwise?

Many thanks,
best regards,
@vreyespue

I saw that one of the checks (travis-ci) did not pass. Is this something related to my code? I

Unlikely, CI has been flaky. Feel free to ignore those that look unrelated.

There is a minor conflict at the file THANKS.txt

I see you solved it, thanks.

It may take a little time to re-review, it won't happen before the release branching later this week.

Unlikely, CI has been flaky. Feel free to ignore those that look unrelated.

Dear @rgommers, I resolved the issues related to the pycodestyle and doctests.
Now all checks have passed.
Many thanks and best regards.

Thanks @vreyespue, I'll try to re-review soon.

@rgommers Looks like you have been the primary reviewer here so far--any chance this will be merge-ready in ~1 week for the 1.5.x branching?

@rgommers Looks like you have been the primary reviewer here so far--any chance this will be merge-ready in ~1 week for the 1.5.x branching?

Yes I was planning to come back to this. CI had a terrible time with unrelated failures, let's re-trigger here.

Hi @rgommers @tylerjereddy @mdhaber @Kai-Striega @josef-pkt @pv @grlee77 😄
do you know if this PR (older than one year now) is going to be reviewed in a foreseeable time period?
There has not been too much progress until now, and therefore I wanted to offer my support if I can do anything to improve the situation.
In the meanwhile, I have started the process of writing a small paper to cover the method. I think it would be a nice add to the paper if I could cite the function within SciPy, but this is not going to be possible if the PR has not been merged.
Otherwise I will simply cite some other repositories / implementations of the same algorithm.
Please let me know what you think.
Many thanks & best regards.

This is pretty far outside of what I normally work on, so I'm afraid I can't help with this. It looks above like @rgommers was planning to come back, though.

@vreyespue Sorry it is taking a while; we're obviously short on reviewer bandwidth, and we're also trying to deal with a problem where one of our CI providers (Travis CI) has stopped working in the midst of release-related activity.

@vreyespue Sorry it is taking a while; we're obviously short on reviewer bandwidth, and we're also trying to deal with a problem where one of our CI providers (Travis CI) has stopped working in the midst of release-related activity.

Dear @tylerjereddy, many thanks for your answer. Please let me know if I can support you with the review process in any way. Many thanks and best regards.

Hi @tylerjereddy @rgommers, I have merged all new commits from master into my branch. Now all checks have passed 👍 I think the continuous-integration/travis-ci/pr check (which was problematic) was fixed / substituted / removed, right? 😄 many thanks and best regards

I think the continuous-integration/travis-ci/pr check (which was problematic) was fixed / substituted / removed, right?

It's not running currently because TravisCI started requiring credits this week.
All is green here though, and other jobs can be verified locally. The TravisCI issue shouldn't block merging PRs.

I will proceed to close this PR if it is not reviewed within the next few days/weeks (i.e. within the present milestone). This PR has been open now for ~15 months without any serious review. In my personal opinion, it does not make too much sense to merge old / unreviewed code into a great repo like this. Many thanks for your understanding. Best regards.

Yes, I totally understand the frustration. I still have this on my radar for the 1.6.0 release. cluster is unfortunately one of several modules that doesn't have a dedicated maintainer, so it's always hard to review new algorithmic methods.

I will proceed to close this PR if it is not reviewed within the next few days/weeks (i.e. within the present milestone). This PR has been open now for ~15 months without any serious review. In my personal opinion, it does not make too much sense to merge old / unreviewed code into a great repo like this. Many thanks for your understanding. Best regards.

Yes, I totally understand the frustration. I still have this on my radar for the 1.6.0 release. cluster is unfortunately one of several modules that doesn't have a dedicated maintainer, so it's always hard to review new algorithmic methods.

Hi @rgommers, many thanks for your answer. It would be great if this function can be reviewed for the 1.6.0 release. Otherwise we can consider whether we want to try it again in the next release, or if we simply give up because of its low priority. Best regards.

@vreyespue if you are making multiple fixes, can you please push multiple commits at once rather than one by one? Otherwise you're triggering new CI jobs for each commits, which is unnecessary (and our CI is currently not in great shape, we're in the process of migrating off of TravisCI).

@vreyespue if you are making multiple fixes, can you please push multiple commits at once rather than one by one? Otherwise you're triggering new CI jobs for each commits, which is unnecessary (and our CI is currently not in great shape, we're in the process of migrating off of TravisCI).

Sorry for that, I was not aware of this. Actually I am done with the fixes for today 😄  But I will take this for sure into consideration for the next round.
BTW, I saw that the Lint test failed, but I guess it does not have anything to do with my PR, right?
Many thanks and best regards.

BTW, I saw that the Lint test failed, but I guess it does not have anything to do with my PR, right?

Indeed, please ignore that.

Hi @tylerjereddy @rgommers, some of the checks were not successful, but those errors are not related to this PR, right?
Please let me know if you have further comments or suggestions about the last amends and fixes.
Many thanks and best regards.

@tylerjereddy @rgommers is there any progress on this issue? I already applied all the requested changes, so I assume this PR is good to be merged, right? Many thanks and best regards.

What would be really nice is if we had someone who has developed or at least uses this part of the SciPy codebase regularly chime in. @pmla is this in your domain of expertise? I should look through myself, I think so far my checks here have only been fairly superficial, though it seems Ralf has been a bit more thorough.

The refguide (documentation) check failure looks real. That's not why I'm bumping the milestone though--I just can't tell if this is ready to be merged just yet (review bandwidth is a massive problem for us, and this is very specialized work).
If Ralf wants to override and merge before I branch soon-ish that's fine, I'm just a bit nervous to do so.

@tylerjereddy I fixed the refguide_asv_check error, now all checks have passed. Many thanks and best regards.

@tylerjereddy @rgommers I proceed to close this PR and the related issue due to its low priority. Many thanks for your consideration and best regards.

Hi @vreyespue, I'm sorry we didn't get this over the finish line. I want to thank you, not only for your contribution but also for closing this PR in a friendly way.


Gets stuck “downloading EPG data”

Hello,
I seem to get to this point and can not find a way around it, am using http://<IP_ADDRESS>:9981/xmltv/channels as the epg directory and it polls and matches the channels correctly. Running using node v16.14.2

Many thanks for any assistance provided

Hey, sorry to hear it's not working out well. Are you running it through npx or Docker?


⏩ stop fetching collection stats for every single item

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Refactoring

Needs QA check

@kodadot/qa-guild please review

Context
Performance improvement
stop fetching collection stats for every single nft
Did your issue had any of the "$" label on it?

[x] My DOT address: Payout

Copilot Summary

🤖 Generated by Copilot at 7d2758f
Added floorPrice field to NFT collections to show the lowest price of the NFTs in the collection. Simplified listing cart item mapping by using floorPrice from GraphQL queries. Removed unused code and imports from ItemsGridImage.vue and useItemsGrid.ts.

🤖 Generated by Copilot at 7d2758f

To show the lowest price of NFTs
We added floorPrice to queries
For each subsquid endpoint
We used the same logic to implement
And cleaned up some code redundancies

Canary:

This PR:

Please target the nuxt branch :)

uwu on spot
pay 50 usd

😍 Perfect, I’ve sent the payout
💵 $50 @ 4.14 USD/DOT ~ 12.077 $DOT
🧗 1cAsKZYNRb8dkSCpn4eVkEn6ycNZTGoDo5dGDgB8J1UUWK8
🔗 0x259a2563a8f7e5e423b9af9760a4fdc295f8093be7f5626f06529816e33ce51e
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Adds toggle to switch between percentages and raw numbers

Works the same way as old Zotistics

Maybe instead of having a "raw numbers" switch we could have a toggle between percentage and student count?
Then, if a user adds more than one query, we would disable the student count option and default back to percentages?
Also, I think we should probably try to come up with a more intuitive name. I feel like raw numbers and student count are both kind of confusing.

On second thought, we could also have a drop down list for chart "views". This list could then contain the change over time graph when it's implemented.


Mention minimum version of rust in README?

Description
I'm submitting a feature request (I guess?)
Expected Results
Synopsis: I think the minimum version of Rust should be posted somewhere for newbs like me.
I'm a first-time user of both yew and rust. I installed rust using the suggested bash command, curl https://sh.rustup.rs -sSf | sh and it installed rustc version 1.28.0. I then went to install the cargo-web prerequisite: cargo install cargo-web and it sent several errors to the console:
error[E0494]: cannot refer to the interior of another static, use a constant instead
   --> /Users/duane/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.14/src/lib.rs:928:42
    |
928 |     variant: VariantEncoding::SingleByte(&data::SINGLE_BYTE_DATA.ibm866, 0x0440, 96, 16),
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

...

(28 total errors, very similar to above)
It turns out that the encoding_rs dependency requires at least rust 1.29.0 according to their changelog.
I did a rustup update and it installed rust 1.32.0. After a second cargo install cargo-web, everything went fine.
Should a minimum rust version be added to the README?

I've added Rust 1.30 as the minimum version in the readme, thanks!


Update Balsamiq to 3.1.3

Thank you for the contribution. It was merged directly as 9bbac9d607efa9052da4c7c0455da14ff11b56f3 to keep commit history cleaner. Your contribution is still credited to you.


Feature/rgd parser

Description
RGDParser ported and adapted from core repo. I've added a few extra tests and improved the POD a bit for good measure
Use case
Rat Xrefs
Benefits
Happy rats
Possible Drawbacks
Still adds unattached xrefs, a legacy behaviour.
Testing
Tests created, found working. Should not have any impact on other code

I'm done fiddling with this. Merge at discretion


feat(CODE): ADDON-58172 Version bump all the deps

Version bump for the dependencies and the dev dependencies. (It contains the major version change)
I have found a few issues after upgrading the libraries. Listed bugs in the Google sheet - https://docs.google.com/spreadsheets/d/1s0NGiTdAkE4M8VPLQjIV2qqDfirAoMPHKLrNmZ2jrsU/edit#gid=0

Done in #175


Create fancy modern UI

Currently the web UI, even if its working, is a spaghetti serving of JS and Go HTML templating because I have no idea what I'm doing. Need to implement new fancy UI using some modern technology like React, Vue or whatever

Not that fancy but a new React UI was implemented and is work in progress


[AutoPR batch/data-plane] Fixed SpecPath batch

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

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


Qubits should not be clickable (when my mouse hovers over them, the pointer hand should not appear).

          Before this point, qubits should not be clickable (when my mouse hovers over them, the Mickey Mouse hand should not appear). Can we change that?

Originally posted by @smburdick in https://github.com/QCHackers/tqec/pull/193#discussion_r1523712320

This issue is not relevant anymore. Closing it. See #323 for more details.


Add Documentation about the Project

[x] Documentation Preparing.
[x]  Install mkdocs.
[x] Configure mkdocs in the current project.
[x] Add Get Started.
[x] API Reference.

Done. Project Completed.


Runme fails in CI

When trying to run Runme in CI (e.g. GitHub Action running Ubuntu) the commands fail:
Run runme --filename DEVELOPMENT.md run source-env
  runme --filename DEVELOPMENT.md run source-env
  shell: /usr/bin/bash -e {0}
  env:
    ANDROID_HOME: /usr/local/lib/android/sdk
    ANDROID_SDK_ROOT: /usr/local/lib/android/sdk
/bin/sh: 1: set: Illegal option -o pipefail
failed to run command "source-env": exit status 2
Error: Process completed with exit code 1.

Hi @christian-bromann, at which file is this error occurring? Recent GitHub Action workflows looking fine to me.
Btw just by looking at this error, looks like the shell isn't set to bash as the error happening in the sh, and only bash supports the pipefail option, maybe change the shebang line at the beginning of the script to:
#!/usr/bin/env bash

Should be solved by #171
Long term it would be nice to harden this, see #172


MongoDB, call fetchRows() without $indexBy

Hi all,
In yii\mongodb\ActiveQuery we have method all():
public function all($db = null)
{
    $cursor = $this->buildCursor($db);
    $rows = $this->fetchRows($cursor);

    return $this->populate($rows);
}

Why we don't use indexBy as it used in yii\mongodb\Query? For example:
public function all($db = null)
{
    $cursor = $this->buildCursor($db);
    $rows = $this->fetchRows($cursor, true, $this->indexBy);

    return $this->populate($rows);
}

Because there is no need for it.
It will be applied at createModels():
https://github.com/yiisoft/yii2/blob/master/framework/db/ActiveQueryTrait.php#L119


Please support pasting in the password field

It appears that you don't allow pasting in the password field when setting up the MQTT broker. I know that this is perceived a security feature by some, but the reverse is true. Secure passwords are very long and real random values that can't be remembered and typing them is almost impossible. In other words, passwords are stored in password managers and should be pasted into the relevant fields from those vaults.
Could you please offer that too or am I doing something wrong?

You set your broker username and password in the MQTT settings of the application.   This is already enabled in the application.  So I am not sure exactly what you are requesting?

Well, when trying to input the password in the MQTT settings, pasting from the clipboard wasn't available. That was back in October but there is an updated version from November, where this is now working. Thanks.


SAS OnDemand for Academics connection profile option

It's possible to connect to ODA via saspy (https://support.sas.com/ondemand/saspy.html).
Would it be possible to add an ODA connection profile for the vscode extension?

Please refer to
https://communities.sas.com/t5/SAS-Communities-Library/How-to-use-VS-Code-with-SAS-OnDemand-for-Academics/ta-p/914928


Allows connect to server version <IP_ADDRESS>

Hello,
This PR brings backward compatibility with ClickHouse version <IP_ADDRESS>.
This query won't work because readonly field doesn't exit.
SELECT name, value, readonly FROM system.settings LIMIT 10000
Consequently, clickhouse-connect can't connect to the server.
I suggest including common setting "readonly" to be able set it in runtime and change query to
SELECT name, value FROM system.settings LIMIT 10000
for server version less than 22.3.
So, client could set "readonly" setting before connecting to the server like so:
import clickhouse_connect
from clickhouse_connect import common

common.set_setting('readonly', 1)
client = clickhouse_connect.get_client(host='localhost', user='default', port=9123)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.4 out of 6 committers have signed the CLA.:white_check_mark: genzgd:white_check_mark: wabscale:white_check_mark: mshustov:white_check_mark: reijnnn:x: Aleksey Astafiev:x: aastafievAleksey Astafiev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for your submission!  A couple of general comments --

If possible, please start your branch from a more recent version so there aren't so many merge commits
In your IDE, please set your line wrapping to 120 characters so not so many existing lines get reformatted

As for your main change, it seems fine to allow backward compatibility.  I think you could simplify the code quite a bit though by keeping just one query for system.settings, something like this:
if self.min_version('22.3'):   # We should check this version, when was the readonly flag introduced?
     read_only = 'readonly'
else:
     read_only = common.get_setting('readonly')
server_settings = self.query(f'SELECT name, value, {readonly} as readonly FROM system.settings LIMIT 10000')

Hello,
Thank you for your feedback.
I've taken into account your commets and passed through all tests starting server version <IP_ADDRESS>.

Thanks for backporting all those tests!  That's awesome.  We can't merge this until you sign the CLA though.  Also if you could remove the flake8 comments (I see a couple of # noqa comments) that would reduce the noise a bit.

Will do it asap.
I don’t understand how to sign CLA. Could you give me instructions on it?

Sincerely yours,
Aleksey Astafiev

On 6 Mar 2023, at 01:19, Geoff Genz @.***> wrote:

Thanks for backporting all those tests! That's awesome. We can't merge this until you sign the CLA though. Also if you could remove the flake8 comments (I see a couple of # noqa comments) that would reduce the noise a bit.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.

I've signed the CLA but for some reason aastafiev marked as signed but Aleksey Astafyev not. Is it critical?

Thank you for acceptence.
Could you reveal when to expect a new release with this feature?

Is it something you need available for install soon?  We can do a release if you need it, but otherwise I would probably wait until there's a new feature or important bug fix before cutting another release, since I can't imagine many folks are running ClickHouse 19.x :)

If it wouldn't take more than month I could wait :)

It's never that long :).   If there's not anything else to add in the next week or so I'll cut a release.


Documentation: QueryBuilder should be FluentQueryBuilder

There are a couple of instances in the readme using QueryBuilder instead of FluentQueryBuilder, e.g.:
var q = cn.QueryBuilder()
    .SelectDistinct($"ProductId, Name, ListPrice, Weight")
    .From("Product")
    .Where($"ListPrice <= {maxPrice}")
    .Where($"Weight <= {maxWeight}")
    .Where($"Name LIKE {search}")
    .OrderBy("ProductId");

True. Fixed. Thanks for reporting!


Change occurrences of 'python2.7' to 'python'

Occurrences of 'python2.7' in shebangs and shell and subprocess calls have to be changed to 'python' to support python 3.

Automated message from Dropbox CLA bot
@sharmaeklavya2, it looks like you've already signed the Dropbox CLA. Thanks!

After accepting this pull request it is necessary to announce to developers to use python instead of python2.7 in shebangs, subprocess calls, etc from now on.

Cool, merged, though I redid the last commit to be more clear!  I'll send the announcement to the developers list.  Thanks @sharmaeklavya2 !  I think the move to hardcode python2.7 in the #! lines was a mistake in the first place (it broke some editors' code highlighting, too!), so I'm glad we're getting rid of this.


[BugFix] fix NPE in sort downgrade chunk

What type of PR is this：

[x] bug
[ ] feature
[ ] enhancement
[ ] refactor
[ ] others

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

for https://github.com/StarRocks/StarRocksTest/issues/498

@Mergifyio backport branch-2.3


Implement rm_file and rmdir for AzureDatalakeFileSystem

Implement rmdir and rm_file for AzureDatalakeFileSystem
No need to implement rm method, it will use AbstractFileSystem's implementation and end up to rm_file.
#233

To be honest, I didn't implement any test case, which is not good. But the reason is the whole AzureDatalakeFileSystem doesn't have any unit test case, so it's a bit hard to do so for add these two small methods.

Thanks @scott-zhou.  I'll merge this in.  Azure Blob Storage (Gen2) went GA shortly after this was created, and Gen1 has since been deprecated by Azure, so not much work has gone into that implementation.  Appreciate the PR!


Allow wiping log dir from Apple client

In the event something goes wrong with connlib's log roller (such as #2327), log files can quickly consume the entire drive and crash the user's computer:

Unfortunately, it's not obvious to find out where these are stored. I checked ~/.cache, ~/Library/Caches, and /Library/Caches to no avail. Furthermore, uninstalling the application does not remove its logs on macOS (as it should).
To prevent these UX issues:

[x] #2329
[ ] #2330

Closing in favor of #2330


CryptoProviderFactory.CreateSignatureProvider call graph should obtain CacheKey once.

The call graph CryptoProviderFactory.CreateSignatureProvider results in GetCacheKey(SignatureProvider signatureProvider) being called three times.
We could obtain the CacheKey once and pass it as a parameter to a potential new method.

This is old an stale....


Throw an error when trying to open a page on a closed browser instance

Here is an example (simplified) when I try to open a new page on an already closed browser instance:
const browser = await puppeteer.launch()
await browser.close()
await browser.newPage()
console.log('this message is never printed')

The problem is that my console.log statement will never be reached. Also, no error is thrown during this program execution.
After small research I found out the following. If I create a promise which is never resolved neither rejected, the NodeJS is not able to track it whenever I try to await for it's result and exits. Example:
(async () => {
  const promise = new Promise((resolve, reject) => {
    if (false) resolve(13)
  })

  await promise
  console.log('we never print this')
})()

This is exactly what is happening in my example. This promise:
await browser.newPage()

is neither resolved nor rejected after browser instance is closed. I believe that the problem lies here:
https://github.com/puppeteer/puppeteer/blob/950ae334ca9c4c37b5a34dc61596a89596fd2bc6/src/common/Connection.ts#L81-L96
After I call newPage method, the Connection.send method is invoked. It creates a Promise which I receive (the one that never resolves). This promise's resolve and reject callbacks are assigned to internal _callbacks map.
Then, there is _onMessage callback:
https://github.com/puppeteer/puppeteer/blob/950ae334ca9c4c37b5a34dc61596a89596fd2bc6/src/common/Connection.ts#L128-L137
It checks if a received message is an error or not and invokes either resolve either reject
This message is received through the transport:
https://github.com/puppeteer/puppeteer/blob/950ae334ca9c4c37b5a34dc61596a89596fd2bc6/src/common/Connection.ts#L61
The problem is that this message is never received since the browser connection is closed. Since message is never received, the _onMessage callback is never called. And since it's not called, we never call neither resolve nor reject and I can't await for my Promise since my NodeJS application exits.
Is it the desired behaviour? IMO, trying to open page on the closed/disconnected browser instance should lead to the error (like it was, actually, before).
puppeteer v2.0.0 throws an error in this case
puppeteer v3.0.0 is not throwing it already

It seems like Connection.send should check if it is closed and reject.  I tired that by adding this as the first thing in Connection.send():
if (this._closed)
            return Promise.reject(new Error(`Protocol error (${method}): Target closed.`));

This seems to work, and seems like the right thing to do to me.


Debugging with IntelliJ

How can we configure IntelliJ to debug revel apps?

Did you get a chance to see this IntelliJ plugin wiki? Please give it try.

@jeevatkm It's not helpful because revel apps don't have a main entry point. They are invoked by the revel command. What command line would I pass to the plugin?

Revel does have main entry point, $GOPATH/src/<import-path>/app/tmp/main.go gets generated during a build.
Can you please try revel run command or output from run command?
revel run <import-path>

When you run revel run, it builds a revel app and creates a binary here $GOPATH/bin/revel.d/<import-path>/<app-name>.
That binary takes following params to run the application.
$GOPATH/bin/revel.d/<import-path>/<app-name> -importPath <importPath-value> -srcPath <sourcePath-value> -runMode <runMode-value>

If you turn on the trace logging in revel (app.conf - log.trace.output = stderr), you can relate my description from logging output.

@jeevatkm Thanks! That worked perfectly. I had no idea about tmp/main.go.

@mrichman I'm glad it worked.
I would like to ask a favor from you. Whenever you get a chance; can you please document (How to debug revel with IntelliJ Go plugin) your steps here, it would be great.
Community will get benefit from your effort and findings :)

Just for other people with the same question.

Create your project, for this example i will be using canonical "revel new github.com/myaccount/my-app"
"revel run github.com/myaccount/my-app" to generate tmp/main.go - this file is needed by intellij
Shutdown the running server
Create project in intellij from existing sources
Create run configuration and in "Program arguments" add "-importPath github.com\myaccount\my-app -srcPath \src -runMode dev"
In "before launch" add "Run external tool". There:
Program: \bin\revel.exe
Paramerets: build github.com/myaccount/my-app
Thats all, it works for me!

Re-opening so this can be added to the documents @pedromorgan

Edited my post to be more clear

Moved to webpage


Improve the curve editor rendering

Fix grid rendering when using a light theme
Enable anti-aliasing for the main curve line (only applies when using the GLES3 renderer)
Swap the main line and edge line colors for better visibility
Scale some line widths on hiDPI displays (not all of them could be scaled due to rendering bugs)

Preview
100% editor scale (dark)

200% editor scale (dark)

100% editor scale (light)

Thanks!


Static variables in MIDI modules

OS (if applicable): All
Version (or "dev" if compiling from source):
I've noticed some odd use of static variables in some of the core MIDI modules.
It looks like you've already addressed one of them on your 2017-10-bontric-midiCC-fix branch, so I was wondering if this is the best place to report/discuss them, rather than the main repo?

Hey,
Yeah you are absolutely right.
I'm still getting used to c++ and for some stupid reason my twisted brain thought static variables are individual for every instance of a class.. :octopus:
That is on me, I'll have to fix them asap, caused me a lot of trouble yesterday when I was debugging the midi clock..

OK, great :smile:
Happy to review once you're done...

Happy to review once you're done...
I'd really appreciate that. Things have been going quite fast in the past weeks and it's always good to have another eye on the code.

Btw. if you are interested in helping with development, there is a lot of things! Check the issues and see if there is something you can do. Unfortunately there is no real planning going on right now, but from what I have seen Andrew is really responsive and thankful for all the help he can get.

@DrChrisBoucher I fixed the misuse of static variables, feel free to either comment on the pull request or here for anything related to the midi modules.

@bontric I made a few comments on the pull request, hope they're OK. Which compiler are you using?
There are a couple more statics I noticed:
In MIDIClockToCVInterface::step() I don't think message needs to be static, although it's not a problem with the current threading model.
In  QuadMIDIToCVInterface::processMidi() I think gate should probably be a member variable, otherwise it will be shared between instances.

@DrChrisBoucher gcc 7.2
I'll take another look tomorrow, it's getting late.

@DrChrisBoucher Thanks

In MIDIClockToCVInterface::step() I don't think message needs to be static, although it's not a problem with the current threading model.

True, I'll remove it, it's just confusing and based on a misunderstanding anyway.

In QuadMIDIToCVInterface::processMidi() I think gate should probably be a member variable, otherwise it will be shared between instances.

Doesn't need to be a member, the gates are stored for each MidiKey in activeKeys. I removed the static however.

OK, but I think gate should be initialized to false, otherwise it's only set from note on and off messages.
Other than that, looking good 8-)

Actually, I'm not sure what it should be initialized to - I don't quite follow how the whole things works, and can test at the moment, but it's currently uninitialized which is certainly wrong.

OK, but I think gate should be initialized to false, otherwise it's only set from note on and off messages.

That's also what it's supposed to be doing :) Look at the switch. Only for note on/off the cases break at the end. Otherwise it will return since the handling after the switch is related to the polyphonic midi  and modes which is only relevant for note ON/OFF :)

Ah, you're right, of course. Never read code before coffee 8-)


Parallel2.js to Parallel.js

Parallel2.js is now coming back to Parallel.js.
There is nothing more I can see which has not been moved over or superseded in code corrections and updates.
I will leave Parallel2.js up for now, but I might decided to privatise the repository in the future.

This is really awesome. Good work.
@amilajack how is progress with the work making the code pass linting? Inputs on weather this should be merged before or after?

@mathiasrw been really busy recently. It may take a month or so.

@amilajack fair enough - but dont you think its better to get the changes from this PR merged first then?

Sure


Weird file name issue?

Perhaps it could be there's some weird limit on the filenames character length, I'm not too sure. Enumeration.ay seemed to break the entire compiler as a filename. Also, I've prefixed every file with __gen_ and now to _gen_. This is because I attempted to compile expression.ay, which would generate the header successfully, i.e __gen_expression.h, however the source file would be generated as .c. Really weird, kinda hard to explain..
@vnev

WIll look into it first thing tomorrow (if you haven't fixed it by then that is).

Sure thing, just wanted to let you know. I've got a small fix, but I can see it being a problem in the future.

@vnev get on irc ima delete this after so dont reply kk

Fixed.


Prepare for release 2.5.0

Would it be desirable to not self-accept and merge pull requests as a good pratice? Otherwise there's really no difference between this and "pushing to master" directly, except for the unwarranted noise.

I thought that 1) you were on vacation and 2) no one else would care enough.
Therefore either I would have to either:

A) wait for you to return from your vacation (as it turns out, a fictional one) and freeze a bunch of work for a change that's very difficult to get wrong (and therefore whose review is of minute value), or
B) go ahead with the release (which is what I did.)

except for the unwarranted noise.

I thought that this "noise" was desirable (albeit I don't care of it myself) in that it's better to have some information than to have none.

I'm on vacation from work, not GitHub, where I use my personal time.

I'm on vacation from work, not GitHub, where I use my personal time.

Ah! I do it on a per-repo basis (including the email account where notifications end up.) This would never have occurred to me... 😄

Nevertheless, I stand by my decision process, I just got the facts wrong.

I use GitHub notifications.

Well, forget what I said. I'm not the only owner of these repo.s, and if nobody else's interested in these things I really won't care by myself either. It's just confusing that sometimes there is a process and sometimes there isn't one.

It's just confusing that sometimes there is a process and sometimes there isn't one.

We're talking about a one-line change in auxiliary materials which would have to wait for almost week (if you had indeed been unavailable.)
Not all changes are equal in impact, consequence or range. Come on. I'm trying to be reasonable, here. Rules can't cover every possible situation, and that's why we bend them when needed.


Is it possible to do something similar in iOS?

I realize that Apple have more limitations so was wondering if it is possible to do something like this in iOS, if you know that is. Cool project btw. Will be helpful on the android side of things for sure. thanks.

Thanks for you comment, I have zero experience with iOS to be honest, but I think that it should be possible to so something similar in iOS.
Basically, you just need a way (API) to send an SMS message (which includes the verification code) on behalf of the user (after she/he has granted the permission to your app, of course), and then a way (API) to read that message once is received on the same phone (the user should have granted also permissions to your app to read the SMS messages). All of that should be doable in iOS, but using different APIs.

Doesn't seem to be possible due to limitation on being able to read SMS messages.
https://stackoverflow.com/questions/21300138/how-can-we-read-incoming-sms-by-using-application-in-ios
Unfortunate.

Wow! iOS is more limited indeed.


ResultOperatorHandler.HandleDistinct Failing for IAsyncEnumerable<IAsyncGrouping<...>>

In enabling the NorthwindAsyncQueryTests for Redis the test GroupBy_Distinct() had to be commented out. This was because ResultOperatorHandler.HandleDistinct() was constructing an expression which expected a parameter of type IAsyncEnumerable< IGrouping<...>> but the GroupBy was leaving the EntityQueryModelVisitor.StreamedSequenceInfo.ResultItemType as IAsyncEnumerable< IAsyncGrouping<...>>.
Assigning to @anpete as agreed.

Closing as Redis is not currently in working code base