Save window state if the window is maximized, but not if it's in fullscreen mode

For a while, I've noticed that Beaker doesn't remember the window state when I resize the browser window to take the full width of my screen (in other words, when I maximize it). I have a large display with a resolution of 2048 by 1152, and by default, Beaker sets the width of the browser window to 1800 pixels (because of this line).
After digging in the source code a bit, I noticed that Beaker doesn't save the window state if the browser window is maximized (see this line). So this explains the issue I am having.
Instead of not saving the window state if the browser window is maximized, maybe it should not save it if the browser window is in fullscreen mode?
Let me know what you think 🙂 Cheers!

Ah right on, thanks 👍


Font: automatic font detection fails for strings containing Korean characters

Question: Korean is not displayed.
ScottPlot

ScottPlot 4.1.74
ScottPlot 5.0.36

var plt = WpfPlot1.Plot;

// sample data
double[] xs = Generate.Consecutive(51);
double[] sin = Generate.Sin(51);
double[] cos = Generate.Cos(51);

// plot the data
plt.Add.Scatter(xs, sin);
plt.Add.Scatter(xs, cos);

// customize the axis labels
plt.Title("탕후루");
plt.XLabel("좋아요");
plt.YLabel("후루후루");
plt.Font.Automatic();
plt.SavePng("quickstart_scatter.png" , 500 , 300);

Raw SkiaSharp
This was DrawText directly with SkiaSharp using SkiaSharp.Views.WPF (2.88.8)

MainWindow.xaml
<Window x:Class="ScottPlot4.X.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ScottPlot4.X"
        mc:Ignorable="d"
        xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF" xmlns:wpf="clr-namespace:SkiaSharp.Views.WPF;assembly=SkiaSharp.Views.WPF"
        Title="MainWindow" Height="450" Width="800">
    <wpf:SKElement x:Name="skia" PaintSurface="skia_PaintSurface"/>
</Window>

MainWindow.xaml.cs
private void skia_PaintSurface(object sender, SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e)
{
    var surface = e.Surface;
    var canvas = surface.Canvas;
    var tf = SKFontManager.Default.MatchCharacter('탕');
    // draw it

    //canvas.Clear(SKColors.White);
    using (SKPaint textPaint =
       new SKPaint
       {
           Typeface = tf,
           IsAntialias = true,
           Style = SKPaintStyle.Fill,
           Color = SKColors.Blue,
           TextSize = 25
       })
    {
        canvas.DrawText("탕후루후루", 120, 50, textPaint);
    }
}

Sorry, but I tested it on 8 PCs and the problem is the same on all of them.
Operating system: Window10, Window11

Hi @kimseeho, thank yo for your helpful code samples!
I modified them a bit and ran them on my machine and things look all right. I'm curious, what font is being selected automatically on your machine?
using ScottPlot;

Plot plt = new();
plt.Add.Signal(Generate.Sin());
plt.Add.Signal(Generate.Cos());

plt.Title("탕후루");
plt.XLabel("좋아요");
plt.YLabel("후루후루");
plt.Font.Automatic();

Console.WriteLine($"Title font: {plt.Axes.Title.Label.FontName}");
Console.WriteLine($"XAxis font: {plt.Axes.Bottom.Label.FontName}");
Console.WriteLine($"YAxis font: {plt.Axes.Left.Label.FontName}");

plt.SavePng("quickstart_scatter.png", 500, 300);

Title font: Malgun Gothic
XAxis font: Malgun Gothic
YAxis font: Malgun Gothic

FontName : Malgun Gothic
Dear Manager
Currently, I am using Malgun Gothic font, but it doesn't work at all. It doesn't work at all even if I use SetBestFont function or Automatic function.
However, if I use DrawText function using SkiaSharp in ScottPlot, it works very well.
var tf=SKFontManager.Default.MatchCharacter('탕');
using (SKPaint textPaint =
new SKPaint
{
Typeface = tf,
IsAntialias = true,
Style = SKPaintStyle.Fill,
Color = SKColors.Blue,
TextSize = 25
})
{
canvas.DrawText("탕후루후루", 120, 50, textPaint);
}
I wrote this on my phone, so it might be lacking.
It works fine if you write it with SkiaSharp, but please check if you are drawing it using SKPaint.
I created SKPaint and drew it, and it seems that all languages are supported.
var tf = SKFontManager.Default.MatchCharacter('탕');
Among the properties of the SKPaint class,

please answer me..

I find Font.Detect('汉')(Chinese) will return string.Empty in Blazor WASM too. The default font name is Noto Mono.
Do you know the reason? What can we do if the detect fails?

The cookbook shows a general purpose font detection strategy:
https://scottplot.net/cookbook/5.0/Internationalization/FontDetection/
Unfortunately I think this topic is outside the scope of ScottPlot (and more in the world of SkiaSharp and system font management) so I probably won't be putting more time into it myself in the short-term.
There hasn't been movement in this issue for a while so I'll close it, but if someone finds a better way to detect the ideal system font given a string, I would be happy to review a pull request that modifies ScottPlot to add this feature 👍

I've found a way to solve the font problem and it should be meaningful to add some intro on IFontResolver to cookbook.
SkiaSharp loads the default font from its environment. If the environment does not install or support the special font type such as C/J/K, the characters will all display as squares. So, the solution is that we have to import the font we want manually.
One easy way is just embedding the font. Take Blazor WASM and Microsoft YaHei as an example, firstly we should add the font file msyh.ttc to the client .proj file as an embedded resource.
  <ItemGroup>
	<EmbeddedResource Include="Fonts\msyh.ttc">
	  <CopyToOutputDirectory>Never</CopyToOutputDirectory>
	</EmbeddedResource>
  </ItemGroup>

Then it's related to ScottPlot. Write a font resolver as the following,
internal sealed class ChineseFontResolver : IFontResolver
{
    public const string DefaultFontName = "Microsoft YaHei";

    public static readonly FrozenDictionary<string, SKTypeface> Fonts = ImportChineseFonts();

    public SKTypeface CreateTypeface(string fontName, bool bold, bool italic)
    {
        if (!Fonts.TryGetValue(fontName, out var font))
        {
            return default;
        }
        return font;
    }

    public static void RegisterScott()
    {
        ScottPlot.Fonts.Default = DefaultFontName;
        ScottPlot.Fonts.FontResolvers.Add(new ChineseFontResolver());
    }

    private static FrozenDictionary<string, SKTypeface> ImportChineseFonts()
    {
        var asm = Assembly.GetExecutingAssembly();
        var resNames = asm.GetManifestResourceNames();
        if (resNames is not { Length: > 0 })
        {
            return FrozenDictionary<string, SKTypeface>.Empty;
        }
        List<SKTypeface> fonts = new(resNames.Length);
        foreach (var name in resNames)
        {
            if (name.EndsWith(".ttc", StringComparison.Ordinal))
            {
                using var fs = asm.GetManifestResourceStream(name);
                var font = SKTypeface.FromStream(fs);
                fonts.Add(font);
            }
        }
        return fonts.ToFrozenDictionary(f => f.FamilyName);
    }
}

Run the ChineseFontResolver.RegisterScott(); only once while app initializing. And we can see that all Chinese characters are  well displayed.

There're some other small issues during the solution investigation. But they're in another topic and I'll look into them when I have more free time.


rtsp stream (Room) message: Error subscribing to stream

Environment
Docker installed
Ubuntu20
Problem
when I push the rtsp stream, it show the error
(Room) message: Error subscribing to stream
Code
const serverUrl = '/';
let localStream;
let room;

window.onload = function () {

  const config = { audio: true, video: true, data: true, videoSize: [640, 480, 640, 480] };
  const config2 = { video: true, audio: false, url: "rtsp://<IP_ADDRESS>:8554/live/test" };
  const config3 = { video: true, audio: false, url: "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4" };
  const config4  = {video: true, audio: false, url: "file:///home/fengmao/output.mkv" };
var localStream = Erizo.Stream(config3);

const createToken = (userName, role, callback) => {
    const req = new XMLHttpRequest();
    const url = `${serverUrl}createToken/`;
    const body = { username: userName, role };

    req.onreadystatechange = () => {
      if (req.readyState === 4) {
        callback(req.responseText);
      }
    };

    req.open('POST', url, true);
    req.setRequestHeader('Content-Type', 'application/json');
    req.send(JSON.stringify(body));
  };

  createToken('user', 'presenter', (response) => {
    const token = response;
    console.log(token);
    room = Erizo.Room({ token });

localStream.addEventListener("access-accepted", function () {

    var subscribeToStreams = function (streams) {
        for (var index in streams) {
          var stream = streams[index];
          if (localStream.getID() !== stream.getID()) {
              room.subscribe(stream);
          }
        }
    };

    room.addEventListener("room-connected", function (roomEvent) {

        room.publish(localStream);
        subscribeToStreams(roomEvent.streams);
    });

    room.addEventListener("stream-subscribed", function(streamEvent) {
        var stream = streamEvent.stream;
        var div = document.createElement('div');
        div.setAttribute("style", "width: 320px; height: 240px;");
        div.setAttribute("id", "test" + stream.getID());

        document.body.appendChild(div);
        stream.play("test" + stream.getID());
    });

    room.addEventListener("stream-added", function (streamEvent) {
        var streams = [];
        streams.push(streamEvent.stream);
        subscribeToStreams(streams);
    });

    room.addEventListener("stream-removed", function (streamEvent) {
        // Remove stream from DOM
        var stream = streamEvent.stream;
        if (stream.elementID !== undefined) {
            var element = document.getElementById(stream.elementID);
            document.body.removeChild(element);
        }
    });

    room.connect();
    localStream.play("myVideo");
});
localStream.init();});
};

Console

Terminal
2022-07-26 09:02:18.254  - ERROR: RoomController - message: addSubscriber ErizoJS timeout no retry,  clientId: 45db2274-5a28-4d80-83c9-b7cddbc4c5fa,  streamId:<PHONE_NUMBER>98276000,  erizoId: ErizoJS_b1f827f4-c14e-b951-427d-c2edf0efba88,
2022-07-26 09:02:18.255  - ERROR: ErizoController - Client - message: addSubscriber timeout when contacting ErizoJS, streamId:<PHONE_NUMBER>98276000, clientId: 45db2274-5a28-4d80-83c9-b7cddbc4c5fa, _id: 62df90ca1a7da2071eb09852, userName: user 7, room: 62d92685c55f2b02949175c5, role: presenter, service: 62d92677b80d2722f0438c51, creationDate: 2022-07-26T06: 59: 22.566Z, mediaConfiguration: default, secure: true, host: <IP_ADDRESS>: 8080

I use a new computer.
2022-07-26 10:01:15.062  - WARN: Publisher - message: Adding ExternalInput, id:<PHONE_NUMBER>67148100_rtsp://<IP_ADDRESS>:8554/live/test, url: rtsp://<IP_ADDRESS>:8554/live/test
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [rtsp @ 0x4aad740] UDP timeout, retrying with TCP
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [rtsp @ 0x4aad740] Could not find codec parameters (Video: h264)
[rtsp @ 0x4aad740] Estimating duration from bitrate, this may be inaccurate
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [libvpx @ 0x4aed960] v1.8.2
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [libvpx @ 0x4aed960] Failed to initialize encoder: Invalid parameter
[libvpx @ 0x4aed960]   Additional information: g_w out of range [1..16383]

I use a new computer.
termianl
2022-07-26 10:01:15.062  - WARN: Publisher - message: Adding ExternalInput, id:<PHONE_NUMBER>67148100_rtsp://<IP_ADDRESS>:8554/live/test, url: rtsp://<IP_ADDRESS>:8554/live/test
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [rtsp @ 0x4aad740] UDP timeout, retrying with TCP
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [rtsp @ 0x4aad740] Could not find codec parameters (Video: h264)
[rtsp @ 0x4aad740] Estimating duration from bitrate, this may be inaccurate
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [libvpx @ 0x4aed960] v1.8.2
[erizo-516952bb-3344-e678-a6e6-1193416cd74d] [libvpx @ 0x4aed960] Failed to initialize encoder: Invalid parameter
[libvpx @ 0x4aed960]   Additional information: g_w out of range [1..16383]

Looking at the logs it seems like a problem with the codec used but I would need more information about the codec used and the configuration parameters.
I tried playing the public rtsp stream that you have in the config3 variable and its working for me. To play the stream you need to publish it with one client and open another tab to subscribe to it because Licode does not allow a client to subscribe to the stream it has published. There are ways to circumvent this restriction if needed.

I open two brower as two brower client. So I donnot need to open two different clients to debug.
I also can see the congfig3 to start a rtp process, but it lose pack and picture. I think it is because the rtsp stream address is too far from my region. So the terminal in ther vmware test show the timeout.
for the rtsp stream in local area network, I think it is because the tcp probem. I push the rtsp h264 stream to the server in the local are network by the way of tcp. Maybe licode need a udp h264 stream to accept.
ffmpeg -f alsa -i pulse -f x11grab -r 30 -s 800x600 -i :0.0 -acodec aac -ac 1 -ar 44100 -qscale 0.01 -vcodec libx264 -preset ultrafast -crf 0 -f rtsp -rtsp_transport tcp rtsp://<IP_ADDRESS>:8554/live/test

I can play all the two rtsp stream in the vlc in my computer which has the licode server.


Text should not store a flat list of sections

What problem does this solve or what need does it fill?
Currently, the Text component stores TextSection objects in a simple vector. Each entity with a Text component represents a contiguously laid out block of text that can be used to make a text node in the UI (or in your game): the distinct sections are required to be able to change the style within this block text.
This leads to very brittle, hard to read code, as seen in this real world example.
This uses a classic "retained-mode" pattern to initialize text, and then only update the segments that need updating.
There are three key problems here:

It is very hard to tell which section is being modified, without looking at a non-local initialiatization.
It's very easy to accidentally index out of bounds, causing a crash.
When we modify the order or number of text sections, any code that reads or mutates these fields will be silently broken.

This is particularly troublesome as automated testing of UI is unusually hard: both because of the visual nature and because of the large number of possible states to check.
Proposal: HashMap in Text
The simplest solution: just replace the Vec<TextSection> with a Hashmap<TextSection>.
This works reasonably well, but forces us to always store keys and may increase verbosity.
Hashmaps are also pretty silly to use for large numbers of objects with a median count of 2 or so.
Proposal: Text sections as entities
Text becomes a marker component. TextSection becomes a component, each stored on a distinct child of the Text entity.
Then use the Name component to differentiate these text sections.
Either use marker components or something like get_child_by_name to access the text sections.
Verbose, fragile, much more ECS.
Like all things in life, really would be easier and more reliable if we had #3742.
Additional context
We should consider how this fits in with #6874: the desire to name the text sections reminds me a lot of the element labels that AccesKit wants.
This "text sections" problem is commonly encountered when working with localization. We could force all text to be easily localized, and store a fluent-rs data type as part of our TextSection type, along with style data.
May be better tackled as part of or after #7616.

I think the current api makes sense as a low level construct and shouldn't be changed for high level needs.
I think the main issue is that all the text stuff is too low level. I believe this should be solved with something like a TextWidget that would be higher level with a nicer api. The text section stuff mostly only exist as an optimization for rendering just so you don't re-render text that hasn't changed (at least, that's what I remember, it's been a while since I looked at this part). This potential widget could also be able to keep track of which part of the text actually changed and only update that section accordingly. It would need some way to bind a value to a section, but updating the text should be done automatically.

I've agree with the proposal that sections/spans should be entities (the parent decides how to layout the children), but as you say you would need a better way to refer to a child from a parent. The parent itself doesn't need to know about text, just inline and/or reflowable child elements, which means you could support inline images for example.
While we're at it, rename TextSection to TextSpan; Span is more familiar terminology from the Web (the HTML <span> element). The reason Section was adopted was because it was ab_glyph terminology. Span also benefits from being less characters to type. :)

IMO TextSection shouldn't be storing string data at all. I think:

Text should store the entire text data as a single String (and/or a Rope or similar data structure
TextSection/TextSpan should consist of a style and start/end indexes into the underling Text

I concur with @tigregalis that a higher level API is required (e.g. a minimal subset of HTML, markdown or similar). It shouldn't be common to manually juggle text sections.
Regarding inline images and other embedded objects. I think it might be appropriate to push layout of these down into cosmic-text (cosmic-text wouldn't know about images, it would just know how to layout rectangles mixes in with text). At the Bevy level, I think support for this ought to be built in to the Text component if possible.

There's probably no point in fixing it now but Is the current Text implementation incorrect?
It seems to me the intention of the ab_glyph API isn't that you store the text in a Vec<String>. Instead, you put the text in a single contiguous String and then what you pass to ab_glyph is a Vec of slices that partition the string along with font information for each slice.

Not that its worth changing now, but Is the current Text implementation incorrect?
It seems like maybe the intent with the glyph_layout API is that you store your text in a single contiguous string and then what you pass to glyph_layout is a vector of slices that partition the string along with the font and scaling data.

Not that its worth changing now, but Is the current Text implementation incorrect? It seems like maybe the intent with the glyph_layout API is that you store your text in a single contiguous string and then what you pass to glyph_layout is a vector of slices that partition the string along with the font and scaling data.

I guess it depends how you interpret the example:
https://docs.rs/glyph_brush_layout/latest/glyph_brush_layout/#example
// Layout "hello glyph_brush_layout" on an unbounded line with the second
// word suitably bigger, greener and serif-ier.
let glyphs = Layout::default().calculate_glyphs(
    fonts,
    &SectionGeometry {
        screen_position: (150.0, 50.0),
        ..SectionGeometry::default()
    },
    &[
        SectionText {
            text: "hello ",
            scale: PxScale::from(20.0),
            font_id: FontId(0),
        },
        SectionText {
            text: "glyph_brush_layout",
            scale: PxScale::from(25.0),
            font_id: FontId(1),
        },
    ],
);

In the main example SectionText holds string slices, but these are 'static strs rather than slices of owned Strings. But you probably could just pass slices.
cosmic_text on the other hand is something like:
let buffer = Buffer {
    lines: vec![ // Vec of lines
        BufferLine {
            text: String::from("something"), // owned string for the current line
            attrs_list: AttrsList {
                spans: RangeMap::<usize, AttrsOwned>::new() // apply "attributes" (font, etc.) to slices of this line
            }
        }
    ]
}

In my integration of cosmic_text, because of the need for more than one style, I can't simply use Buffer::set_text as it only takes a single attribute. I construct each BufferLine independently:
        // all sections need to be combined and broken up into lines
        // e.g.
        // style0"Lorem ipsum\ndolor sit amet,"
        // style1" consectetur adipiscing\nelit,"
        // style2" sed do eiusmod tempor\nincididunt"
        // style3" ut labore et dolore\nmagna aliqua."

Maybe cosmic_text could expose a cleaner way to construct text with mixed styles, or "push" text with different styles, but what I've put together seems to work.

I'm curious, without treating each span as its own potentially mutable string, how you express "dynamic rich text" through code.
The DOM uses text nodes and/or spans for mutability, and spans for styling.
I think text spans as entities is probably a good low-level API which you could build a high-level API on top of. In theory it supports arbitrary nesting too, so it could map pretty well to the DOM, though I don't know if we'd want that, or perhaps we might explicitly not want it.
For a high-level API (for UI in general), I think you'd probably want something JSX-like for familiarity and flexibility. This would generate the relevant spans (and UI nodes) and provide the logic to somehow keep the UI in sync with whatever state you want the UI to observe (instead of mutating the text and UI entities directly, a bevy engine system(s) handles that for you).

Dynamic text requires some data structure that supports growing inner sections. Consider this:
The player has hit training dummy {dummy_hits} times.

Where we want to replace {dummy_hits} with an arbitrary number.
When we go from 9 to 10, we need to insert an additional character within the text. A single str for the whole text would require .inserting, a O(n) operation. The current impl and the proposed entity-based impl are a list of strings (also known as Iliffe vector), which perfectly supports inner extension. A rope would also supports inner extension. It breaks down on a large string.
Now consider styling in this. If the style is tracked separately from the text, it is now out of sync! Do I have to manually update this as well? That sounds fairly error-prone.
This is not an edge case, it's really the basic use case. An FPS counter falls into this already.
Regarding how "dynamic rich text" would look like, I've an answer, but I think it's out of scope for this issue :P

It's interesting to consider this issue in light of recent discussions about "UIs as scenes" and entity relationships.
The proposed syntax for defining a scene asset is likely going to be convenient for building node graphs of widgets and react-like components, but maybe not so friendly for spans of text. JSX, HTML, XML and similar SGML-derived markups all give text nodes special status in that it's the default node type - you don't need quotes or special markers to identify a text section. But if you're talking about any non-SGML-derived serialization format (JSON, RON, bsn, etc.), there's going to be quotes and possibly even explicit "this is a text node" syntax. This is fine, for the most part, because we're not trying to write a book, we just want things like button labels and lists of saved game titles. (In cases where we are trying to write a book - like help pages or quest descriptions - it's probably the case we're reading text in a different format, probably from a localized catalog asset.)
An advantage of having text-nodes be entities is that you can then intermix text blocks with other kinds of renderable UI nodes which are entities. However, traditionally games have not used this kind of inline layout much, most text displays in games contain only text, with possibly hyperlinks being underlined and colored. The only use case that comes to minds is inline icons and drop-caps. Still, I do like the idea of text spans being entities.
Inline layout is more complex than flex layout, and you only want to use it when you need to - that is, only when a 2d node has one or more inline children. This could either be detected automatically, or via an explicit hint (display: block).

An advantage of having text-nodes be entities is that you can then intermix text blocks with other kinds of renderable UI nodes which are entities.

I agree with this. The existing text.sections would be "not nice" (but still possible) to do this with.

Inline layout is more complex than flex layout, and you only want to use it when you need to - that is, only when a 2d node has one or more inline children. This could either be detected automatically, or via an explicit hint (display: block).

I think you only need to be able to layout arbitrary rectangles. Ideally the text layout (provided by glyph_brush_layout and soon cosmic-text) handles this. See https://github.com/pop-os/cosmic-text/issues/80 proposal, but it can be hacked around by passing an "invisible" glyph of your chosen size, then drawing the thing you actually want to render there at that location.

See also #9944.

@nicoburns @alice-i-cecile Ran into this issue again today, wanted to share my experiences.
I'm strongly in favor of a "text as entities" approach. This does not necessarily mean a "flat" list. Instead, I would follow the CSS/HTML approach:

Introduce a new layout type, Inline, which is exclusive from Flex or Grid layout.
Any container that has "inline" layout will position its children by wrapping/breaking the text content in it, as well as any non-text objects.
Inline layouts can be nested, in which case the result is "flattened" during rendering. This gives you tree-like abilities within the standard ECS parent/child framework. Inline containers can be used as interior tree nodes, in a manner analogous to SpatialBundle.

While I recognize that there will be challenges with this approach, it has some compelling advantages: It allows a unified approach to applying styles to text and non-text elements.
In the current system, the way that styles are applied to text sections is completely different than the way styles are applied to non-text elements. While this may not seem like a big deal - there's only so much overlap between the set of style properties relevant to text and non-text entities - consider what happens when we start to introduce animation or reactivity into the picture. In my case, there's a large reactive infrastructure that is predicated on the idea that styles are targeted at entities. In order to apply styles to text sections, I'd need to build a whole new kind of reaction infrastructure that was capable of targeting individual text sections.
Even without the complexity introduced by reactivity, consider what happens when want to animate something like text colors - for example a slowly pulsating / throbbing hyperlink, an idea that is not entirely inconceivable in the context of a game UI. Ideally, animation should be driven by components - attach an animation component to a UI node in order to animate it. But this won't work with text sections as they are represented today, you'd need to build an entirely different animation framework.
An additional advantage of this approach is familiarity: for people who are coming from the web/HTML world, this "just works" the way they would expect it to.


uncompressed bitmap length error

Hi, thanks for the library, but it doesn't work for all files. I've tried to convert several notes and some of them are failing with the mistakes like this:

DecoderException                          Traceback (most recent call last)
d:\Dropbox#PY\supernote-tool-master\supernote-tool.py in
25 for i in range(0, total_pages):
26     converter = sn.converter.ImageConverter(notebook)
---> 27     img = converter.convert(i)
28
29     html += ''
d:\Dropbox#PY\supernote-tool-master\supernotelib\converter.py in convert(self, page_number, visibility_overlay)
62         page = self.note.get_page(page_number)
63         if page.is_layer_supported():
---> 64             return self._convert_layered_page(page, self.palette, visibility_overlay)
65         else:
66             return self._convert_nonlayered_page(page, self.palette, visibility_overlay)
d:\Dropbox#PY\supernote-tool-master\supernotelib\converter.py in _convert_layered_page(self, page, palette, visibility_overlay)
88             if custom_bg:
89                 decoder = Decoder.PngDecoder()
---> 90             img = self._create_image_from_decoder(decoder, binary, palette=palette, blank_hint=all_blank)
91             imgs[layer_name] = img
92         return self._flatten_layers(page, imgs, visibility_overlay)
d:\Dropbox#PY\supernote-tool-master\supernotelib\converter.py in _create_image_from_decoder(self, decoder, binary, palette, blank_hint)
116
117     def _create_image_from_decoder(self, decoder, binary, palette=None, blank_hint=False):
--> 118         bitmap, size, bpp = decoder.decode(binary, palette=palette, all_blank=blank_hint)
119         if bpp == 32:
120             img = Image.frombytes('RGBA', size, bitmap)
d:\Dropbox#PY\supernote-tool-master\supernotelib\decoder.py in decode(self, data, palette, all_blank)
184         expected_length = fileformat.PAGE_HEIGHT * fileformat.PAGE_WIDTH * int(bit_per_pixel / 8)
185         if len(uncompressed) != expected_length:
--> 186             raise exceptions.DecoderException(f'uncompressed bitmap length = {len(uncompressed)}, expected = {expected_length}')
187
188         return bytes(uncompressed), (fileformat.PAGE_WIDTH, fileformat.PAGE_HEIGHT), bit_per_pixel
DecoderException: uncompressed bitmap length = 2618568, expected = 2628288

Hi,
There may be a problem with the handling of custom templates.
I will check the details so could you please send me the note file that causes the error?

Hi, I think you are right, the other notes with the plain template are working.
I've created a new note with the custom template, which the converter fails to convert. Here it is:
https://www.dropbox.com/s/gppj54q61ssvwvh/test.note?dl=0
and here is the template:
https://www.dropbox.com/s/2mn2qjslolas756/byjo.png?dl=0

Hi,
I found a strange metadata in your test.note and Work.note (received from email).
The metadata of a page generally has MAINLAYER and BGLAYER (and optionally LAYER1, 2, 3),
but the files that cause the error have two MAINLAYERs and no BGLAYER.  I don't know why.
$ python3 ./supernote-tool.py analyze test.note | jq .__pages__[0].__layers__
[
  {
    "LAYERTYPE": "NOTE",
    "LAYERPROTOCOL": "RATTA_RLE",
    "LAYERNAME": "MAINLAYER",
    "LAYERPATH": "0",
    "LAYERBITMAP": "16472",
    "LAYERVECTORGRAPH": "0",
    "LAYERRECOGN": "0"
  },
  {},
  {},
  {},
  {
    "LAYERTYPE": "NOTE",
    "LAYERPROTOCOL": "RATTA_RLE",
    "LAYERNAME": "MAINLAYER",       <--------- duplicated layer name; normally "BGLAYER"
    "LAYERPATH": "0",
    "LAYERBITMAP": "293",
    "LAYERVECTORGRAPH": "0",
    "LAYERRECOGN": "0"
  }
]

I added a workaround to treat 2nd MAINLAYER as BGLAYER and now I can convert them.
Please check latest code (commit d860016a37936465142380b3a8114a1cefa42e4b) helps you to convert your note files.  Thanks.

I submitted a new commit 566b29ce437db642ff37f14f8bad02aba857749e that fix bitmap length problem.
This fix solves conversion error you encountered with Trades.note (received from email).
This is the error message on trying to convert Trades.note with the tool before applying the patch:
supernotelib.exceptions.DecoderException: uncompressed bitmap length = 2613528, expected = 2628288

It is similar to your first report, so perhaps the first report was also due to this issue.

Thanks for your prompt fix.
On 11/22/21 0:00:38, jya @.***> wrote:
Closed #8 [https://github.com/jya-dev/supernote-tool/issues/8].
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [https://github.com/jya-dev/supernote-tool/issues/8#event-5651400140], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AGFDXAR2E7OWD3TIV5RLJ5TUNHE7LANCNFSM5HY7X4XQ].
Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub].

Hi, just wanted to let you know that the latest supernote beta 2.04 changed
the .note format, and the library not working anymore with it.
(UnsupportedFileFormat: unsupported file format)
I'm attaching a test .note from the new beta.
My understanding is that Ratta plans to release the new version in a couple
of weeks, maybe even next week.
If you would be able to update the library it would be amazing

Thank you for the notice.
Could you create a new issue on github?
Please also attach a test.note file as I am not beta program user.
Thanks.


[FIX][SERVER]9213

Purpose of the pull request

FIX #9213
Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

@nobolity Thank you very much for contribution, but it would be nice to describe what you do in the title.

Hi @nobolity Please add the right title of this pr.
BTW, UT run failed, please take a look.

@nobolity Thank you very much for contribution, but it would be nice to describe what you do in the title.
i  had marked a new pr to describe it

i had marked a new pr to describe it pr


Migration files out of order due to using local timezones

Environment
Knex version:^0.21.16
Database + version: Postgresql 12
OS: Ubuntu Linux
Experience level: Just starting with knex.
I couldn't find an existing issue on this topic, but I feel like there is a reason this hasn't been implemented / I've missed something.
Feature discussion / request

Explain what is your use case
Working with a team on a repository across multiple timezones, that uses knex migration files.

Explain what kind of feature would support this
knex make using UTC, rather than local timezone.

Give some API proposal, how the feature should work
Add configuration option to knex that allows the yyyymmddhhmmss() function in timestamp.js to use getUTCDate() etc functions.

Reasoning
Currently it uses the local timezone to generate the migration file's names. This causes issues when working in a repository across multiple timezones.
Right now I'm the only one of my team in a different timezone, so I'm just creating my filenames to match theirs so the ordering is correct. Would love to hear other solutions from anyone else who has run into same issue.

I think there was a pull request trying to implement this.

I think there was a pull request trying to implement this.

Oh, you are absolutely right: https://github.com/knex/knex/pull/4245

Will try to write a test for it today, merge and release a new preview version.

Released in 0.95.0-next2


symbols in 'shortened phrases' are ignored

at least on my machine <3 will be read as just "3" with <3=heart in the shortened phrases list
"<", ">", ":", and "" also don't seem to be working
windows 10, using the libritts voice pack

Thanks for letting us know! I think I might have an idea of what is causing this.

I have just pushed a pull request onto the plugin hub with a patch fixing this issue. The update will be with you once the runelite devs review and approve.

for housekeeping
Fixed in
Version: 1.2.4
Commit: 52d0915efe9e8ee14befc515f1ea75287cf8c165
PluginHub PR: https://github.com/runelite/plugin-hub/pull/5990

1.3.0 text-replacement improved (renamed from expandAbbreviations)

spaces in pattern ex:"multiple words=result with words"
special characters ex:"=_==squinty face" or "blush=blushing"
empty replacement ex:"delete me="

These changes will arrive with version 1.3.0


This project should be merged into the official WPF repo!

I want to congratulate with the author for being the only one to take this initiative for a feature that should be part of WPF sdk.
It works great, but over the time I found a severe limitation which makes the implementation pretty much unusable: unlike UWP versiom, the markup extension only accepts one parameter when binding to a function. With mostly of the framework ones we're kicked off since only a very small amount of functions takes one parameter. With custom functions is pretty much the same as long as we need to pass more than one parameter and there is no hack that works (tuples, class instance with its properties as parameters etc).
Is this something difficult to implement?
I also found big problems with async functions. The markup extension does not accept a return type of Task and I've not been able to find a way to run any async code. Regular Bindings deals with this through IsAsync property. Something like this would be good or, even better, the ability to accept "await" keyword.
Other improvements:

ability to instantiate an object through the "new" keyboard. It will open new and inifinite possibilities if this would be possible.
Binding.update(). I noticed that it is not generated and since I never played with UWP, I have no idea if this is something that really makes like easier.

Thanks

Thank you for your feedback!
Like in UWP, it is possible to bind to a function which takes many parameters. For example:
<TextBlock Text="{x:Bind system:String.Format('{0}  {1}', Quantity, Unit}"/>

The static function String.Format takes in the example three parameters: format string, as well as to values.
Maybe you misunderstood in my description binding to a function "as target", which is completely unavailable in UWP and WPF. Here is a bit modified above example:
<TextBlock m:SetText="{x:Bind system:String.Format('{0}  {1}', Quantity, Unit}"/>

In this example two functions are used. The first one on right side can take unlimited number of parameters. Instead of setting the right side expression to a property, like in “classic” WPF or UWP bindings, a function is called, which excepts the evaluated value of the expression.
As for Tasks and IsAsync. Actually, the Binding.IsAsync has nothing to do with Tasks. The property tells only that getting of the property should not block the UI thread. It should be only used if getting a property synchronously can take long time.
Binding to a property or a function, which returns Task<T>, with await, maybe an interesting feature and I will consider implementing it. The problem that I see here, is what to do with possible exceptions. Should they just be ignored?
The “new” keyword is already supported. I didn't describe it earlier, but now added it to the description. You can create objects like this:
<TextBlock Text="{x:Bind SomeFunction(Property1, new local:Class1(Property2)}"/>

I’ve considered implementing Bindings.Update method for explicitly applying bindings. In comparison to UWP, the problem here is, that there can be many Bindings classes. As I wrote in my description, you can change the DataType anywhere in XAML. For each “DataType” a correspoing Bindings class is generated.
I will consinder to implement this feature for bindings without explicit DataType.

Many thanks for your prompt response. Multiple parameters works. I must have messed up something with the m: Namespace. In addition to that, R# finds lot of errors and false positives ones can only be detected on compilation (I should disable inspection, but if I do I will also lose intellisense).
However, when the m namespace is omitted still happens what I have reported.
To reproduce:
// MainWindow.xaml.cs
public string InstanceFunction(int val1) => $"InstanceFunction({val1})";
public string InstanceFunction(int val1, int val2) => $"InstanceFunction({val1}, {val2})";

// MainWindow.xaml
 // works (how is this possible without m:namespace?):
<TextBlock Text="{x:Bind InstanceFunction(1) }" />
 // raise Error XLS0506 No constructor for type 'BindExtension' has 2 parameters:
<TextBlock Text="{x:Bind InstanceFunction(1, 2) }" />

I've been surprised to see that the new keyword works too! This is amazing! Should also work object initializer?
I tried, but I get a generic Syntax error '{'  (may be we need to escape braces?):
<TextBlock m:Text="{x:Bind SomeFunction(Property1, new local:Class1 { Val1 = 888 }) }" />

It would be great if this could work because it will save us from writing initialization code in code behind.
Regarding await, you could take a look at MVVM toolkit to see how they implemented their AsyncRelayCommand<T>. I can't find any info on how they handle exceptions. I think that ignoring is the best solution if the alternative is the inability to run any async code. The benefits we get from just adding a single "await" keyword are invaluable. I would just add an xml comment to warn users that their async code must handle any possible exception and return the expected data.
As of now the only way to run async functions is by calling them from within the previously mentioned async command provided from the toolkit (I'm not even sure if relies on reflection under the hood), but it seems to be that this just adds unneeded complexity when we could just call the same functions directly from xaml.
I'm not sure on how Bindings.Update() works. I always use the MVVM pattern and while playing with x:bind everything worked as expected in data binding (on both ways). If this is only useful for non MVVM scenarios, then I would leave its implementation as the last step if really makes sense (because sincerely, even in most simple projects, even the more primitive model view should be used by default since it still provides great benefits). Bindings without explicit DataType would certainly be a great thing, but if this is something that requires too much efforts as you say, than I am not sure at what point is worth. I'm at the beginning of a project where I'm basically switching to x:bind for the first time and until now, I don't see any problem to declare data type each time, but may be it's too soon to speak and I should wait until the binding model becomes more complex.
What I think should have higher priority is designer support. As of now, to preview data binding in the designer I'm forced to add an additional line of code for each call to x:bind:
<TextBlock Text="{x:Bind Name, Mode=TwoWay}" d:Text="{Binding Name, Mode=TwoWay}" />

Apart than making the code more difficult to read, I also expect this hack to work only for very basic binding since x:bind and Binding work differently. Do you think would be complicated to implement designer support?
I'm surprised that WPF guys have not yet asked you to merge your project in their repo! Unlike WinForms, wpf is more resources intensive and compiled bindings should be supported out of the box. I hope that this lack is not guided from the intention to convince people to switch to UWP because no one that know what wpf is and can do will do the switch unless they're forced to do through the lack of the new features.

I released a new Version 1.0.5.  Now it is possible to bind to asynchronous properties and functions. Please see Readme for more details,

I've been away for more than a week and now I see so many surprises in the ReadMe! I didn't had chances to play deeper with the new async feature, but at first look it is working really well. Thanks! You're amazing!

Yes, the designer support would be great. As long as Hot Reload. Because we at our firm mostly program Xamarin Forms (there is no Designer), Host Reload feature is more requested.


ReceivedMessage exports fields and a method which breaks mocking

Return types that mix exported fields and methods are not mockable and require a constructor.  We should avoid this.

We should audit all return types to ensure this invariant.

For further context:
ReceivedMessage is basically a wrapper over the top of an actual amqp.Message (from go-amqp). It matches the ReceivedMessage that exists in other languages, where the goal was just to have a simple message format that could take a []byte payload.
type ReceivedMessage struct {
   MessageID string
   To *string
   // many others...
}

func (rm *ReceivedMessage) Body() ([]byte, error) {}

This simplified message type does not map 1:1 with AMQP concepts - there are some payload types it cannot represent. To avoid having a potential silent failure the .Body field was turned into a .Body function, which allows us to return an error if we're in this state.
However, doing that makes it harder to write some mocks for customers, etc... So we'd like to eliminate this if possible.

Just to loop back on this - we're going to change the ReceivedMessage.Body() function back to a field. There were a small set of circumstances where it wouldn't work and the error that came back wasn't giving you much in any case.
In the cases where we can't convert it .Body will just be nil.


rsync exits in Windows mingw

I've cobbled together a windows/git/git-fat environment that generally seems to work. However, rsync aborts immediately after it is started by git-fat.
rsync: read error: Connection reset by peer (104)
rsync error: unexplained error (code 255) at /usr/src/rsync/rsync-3.0.8/io.c(760
) [Receiver=3.0.8]
The cobbled together environment is setup as:

Install msysgit using option 2 (all executables available from Windows).
Install mingw
install rsync using mingw-get install msys-rsync
Install Python for windows (Python 2.7)
Update the Windows system path to include C:\Python27.
Add git-fat to a directory on the path (i.e. /bin).

I can run all the pieces separately. Whenever git-fat executes rsync, rsync exits.

It seems that many have gone through this situation. I've managed to update for binary files. How can I get rsync to not exit?

@duanem @piinecone See this comment: https://github.com/jedbrown/git-fat/issues/43#issuecomment-69011567


Minor format correction

Missing space

@adrianwells : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Thanks @adrianwells


New theme for FlorisBoard

FlorisBoard
Since there were not any really good themes available, I turned to trusty old Count Dracula and decided to design a new theme.
Link here: https://github.com/Venem/dracula-florisboard
Thanks in advance

Looks great @Venem! I just sent you an invite to join the organization.
Once you accept it, you'll be able to transfer the repo and I'll take care of adding it to the site.
Thanks for building this! 🎉

I have transferred the repo! Thank you

https://draculatheme.com/florisboard 💥


coqtail-math: init at 20201124

Motivation for this change
Add https://github.com/coq-community/coqtail-math which I find to have useful theorems and lemmas missing from the Coq standard library especially regarding real analysis.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.


backup: Fix GCS backup plugin for refactored client API.

@michael-berlin
This addresses the issues remaining after the first pass at fixing it in #1348.

Add Close() method. This is not technically needed yet for HTTP-based GCS, but they plan to switch to gRPC later, which will require calling Close().
Add auth info back to the context passed to NewClient().
FYI, I renamed the getter method to just client() as recommended in the Go style guide.
I tested GCS backups in k8s manually. Once we have a CI framework for k8s, we can automate this.

LGTM
Thanks for doing this!
re: testing this. Alternatively, we could also have an end-to-end test for this plugin which would run against the actual GSC. Their Go client has such a test: https://github.com/GoogleCloudPlatform/gcloud-golang/blob/master/storage/integration_test.go

That could work, although we'd probably have to expand the auth options. Currently this plugin only supports "default" auth, which means it's automatically authorized by virtue of being run from within the same GCE project as the GCS bucket. So it wouldn't work from a workstation, for instance.


Cherry-pick PR #7502 into release-1.1: add RefundMetadata struct for generating types

This cherry-pick was triggerd by a request on #7502
Please review the diff to ensure there are not any unexpected changes.

Motivation
New RefundMetadata struct is proposed for refund transaction to store original transaction version.
Have you read the Contributing Guidelines on pull requests?
YES
Test Plan
Unit test

This is not a breaking change, server side does not require these change. Client side requires this for constructing p2p transaction.
Justification: A client connects to premainnet needs same version of data structure and move scripts for submit transaction, the RefundMetadata struct is used for constructing p2p with metadata script. Cherry pick it to release 1.1 for a client pinned to the release branch for same version of move script and data structures. The main reason we can use master is because recently move script changed on master branch, which means, pull in master branch to generate transaction with the scripts different with release-1.1 branch, will not be accepted by premainnet.
Workarounds: we need checkout release-1.1 and then patch this PR diff for building binary to generate client code.

Hi


Random crash in FEngine::loop

Describe the bug
Hi, I'm using https://github.com/ThomasGorisse/sceneform-android-sdk library to add ARCore support into my app. My use case includes user browsing a set of items. Each item has a details screen which includes a filament renderer but no ARCore functionality, just basic rendering. Clicking on a button then opens another activity with ARCore functionality.
I have noticed that, when user is on the ARCore screen, seemingly at random the app crashes with a native crash, which I'm not sure what might be the cause.
The logs are also not very helpful, but from the fault addr I guess something has been deleted from the memory that is still being used?
To Reproduce
Steps to reproduce the behavior:
I don't really have a way to reproduce this, since it seems to happens at random
Expected behavior
To not crash
Logs
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus7T_EEA/OnePlus7T:11/RKQ1.201022.002/2108182246:user/release-keys'
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: Revision: '0'
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: ABI: 'arm64'
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: Timestamp: 2021-10-05 09:26:15+0200
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: pid: 13602, tid: 6043, name: FEngine::loop  >>> [REDACTED] <<<
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: uid: 11366
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
2021-10-05 09:26:15.223 6527-6527/? A/DEBUG: Cause: null pointer dereference
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x0  b400006e8ec3de30  x1<PHONE_NUMBER>000000  x2<PHONE_NUMBER>000000  x3<PHONE_NUMBER>000040
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x4<PHONE_NUMBER>000010  x5  0000006e6eb2ab80  x6<PHONE_NUMBER>000002  x7<PHONE_NUMBER>f29fb0
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x8<PHONE_NUMBER>000000  x9<PHONE_NUMBER>000000  x10 ffffffffffffffff  x11<PHONE_NUMBER>000000
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x12<PHONE_NUMBER>000000  x13 0000006e51d4d168  x14<PHONE_NUMBER>000003  x15<PHONE_NUMBER>000000
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x16 0000006e51a47598  x17<PHONE_NUMBER>e84fdc  x18 0000006d8bb10000  x19 b400006faeb509b0
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x20 b400006e8ec3de30  x21 b400006d86a52300  x22 b400006d8f3c4938  x23 b400006e7eb709f0
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x24 b400006e7eb70a00  x25 0000006d8cdbdcc0  x26 0000006d8cdbdff8  x27<PHONE_NUMBER>0fc000
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     x28 0000006d8ccc5000  x29 0000006d8cdbdc70
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:     lr  0000006ddc865d0c  sp  0000006d8cdbda70  pc  0000006ddc865d38  pst<PHONE_NUMBER>000000
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG: backtrace:
2021-10-05 09:26:15.224 6527-6527/? A/DEBUG:       #00 pc<PHONE_NUMBER>0d7d38  /data/app/[REDACTED]/lib/arm64/libfilament-jni.so (BuildId: e2a98a8fd47b7add6ff1f05979c7e3863174059f)

Desktop (please complete the following information):

OS: Android
GPU: Adreno 640
Backend: OpenGL, I think

Smartphone (please complete the following information):

Device: OnePlus 7T
OS: Android 11.0

Additional context
Sorry, if this is a duplicate, I tried searching for a similar issue, but was not able to find one that would be the same as this one. Also note, I was using an earlier version of the library (1.19.4 - using filament 1.9.25) where crashes happened more often. After upgrading to 1.20.0 (using filament 1.12.0) they happen less often, but still happen from time to time.
Any help is much appreciated

We would need more information to solve this, at the very least an APK to reproduce the issue. Not knowing what your app is doing, it could be a problem in sceneform and not Filament (Filament doesn't destroy objects unless you tell it to).

Any solution here ?

I think the problem is in sceneform somewhere, it must be destroying some object twice. What would possibly help is an APK with a debug version of filament.

I resolved this issue by making sure that I do not create duplicate renderable on the same anchorNode.

@kevinylo can you show sample code of how you solve the problem?

@fvito are you solve the problem?


Create requirements.txt

for #2, not tested by me, taken from https://github.com/skorokithakis/python-fuse-sample/issues/2#issuecomment-236193313

Thank you! I hope it works :P


Remove "fs" feature in tokio dependency.

Heya, this allows indicatif to compile to WASM. I've checked and tokio::fs is not used in the project.

ah, it's used in doctests, let me update


Create a GEMA repertoire handler

The GEMA repertoire handler is fairly straightforward (there is only one agency code and one ISWC per work which has to be extracted) and works for the English and the German search. Pagination of the results does not cause problems, the mutation observer correctly catches all these events, except for the inital page load which might load the results of the last visit again and requires an inital handler.
It took me a while to figure out why the code of the first commit alone failed to work, although I've implemented it the same way as the CISAC handler. Then I found out that I have to drop the explicit JSON serialization of the "clipboard data" and directly feed the raw object into the GM storage function to make it work.
Violentmonkey and Tampermonkey already do the JSON serialization implicitly while
Greasemonkey v4 has never supported this userscript (which uses GM v3 API).
This is necessary because https://online.gema.de/werke/search.faces apparently overwrites JSON.stringify() with a custom implementation (try JSON.stringify({a:[]}) in a browser console on their page) which causes JSON.parse() to fail on MB.

Ugh, I need to fix that so that it doesn't deploy leftover skipped changes from a previous PR.


Modify DBAdapter related UT.

Modify TestRulesTable with dataPool.
Modify TestSqliteDB  with dataPool.
Modify TestCachedListFetcher with dataPool.
Modify TestRuleManager with dataPool.

Codecov Report

Merging #434 into trunk will increase coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           trunk     #434      +/-   ##
=========================================
+ Coverage   51.7%   51.78%   +0.07%
=========================================
  Files        185      185
  Lines       7528     7528
  Branches    1039     1039
=========================================
+ Hits        3892     3898       +6
+ Misses      3307     3300       -7
- Partials     329      330       +1


np.random.uniform() generate constant array

the code "np.random.uniform()" in method "sample" always generate a constant array, is it a problem or somehow it is just figured to be like this? And if there is no problem, I wanna know how to make it random. THX.

Are you sure? that can only be the case if you are sampling with the same low and high values1. If you are getting the same samples at test time then perhaps check issue #204
1 https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.random.uniform.html


[CAD-3718] Document how the current Mempool is working in the current design

PDF generated here: Mempool.pdf
Though it's just better to read this in Emacs where you can navigate between code and this text
.This document helped me to stay sane while constantly switching context between Mempool and other tasks that were poping out in the last 3 weeks. It explains how Mempool works and spots 3 places in code that will need to change with the new HD interface.
Next step will be quickly drafting changes that need to be done in the mempool and then jumping to actuall hacking those changes (the fun part :) ).

After internal discussion, I'm closing this PR. I have this document offline if anyone needs it. Though I doubt anyone will beside me :)


HSCAN in PHPRedis is not iterating properly

Laravel Version: 5.6.21
PHP Version: 7.1
Database Driver & Version: NA
Redis Extension Version: 4.0.2

Description:
The hscan and perhaps additional commands are broken when using phpredis vs predis.
Predis has a completely different return syntax, which includes the cursor and results.
PHPRedis returns only the results and seems to use the $cursor ($it in their examples) by reference rather than by value some something ends up getting lost. Additionally, predis starts with $it/$cursor of 0, wheras PHPRedis starts with null.
Steps To Reproduce:
Using laravel and it's redis facade:
for ($x = 0; $x < 100; $x++) {
    Redis::incrby('test_key', uniqid(), 1);
}

$it = null;
// Redis connection in Laravel already has the OPTs set shown in the readme.
do {
    $return = Redis::hscan('test_key'); // FAILS missing arg
    $return = Redis::hscan('test_key', 0); // Returns false
    $return = Redis::hscan('test_key', null); // Returns the same 10 records over and over forever
} while (!$empty($return));

Laravel uses Predis as a base line and it adjusts PhpRedis return values to same results in PhpRedisConnection.
If you can, please submit a PR to 5.6 to fix the return value HSCAN. I'd assume SCAN, SSCAN and ZSCAN are broken as well?

Great to hear. Whatever gets us the closest experience to Predis we can handle internally. if PhpRedis gets an update, we can always adjust.

Puh, yeah I'd assume the same, if the connection has a prefix, it should add it to the scan. I'd suggest you break up the PRs, one for fixing the SCAN methods, and one for prefix fixes. That way Taylor can decide whether or not to merge the prefix changes.

Would altering the assertions based on if the connection is prefixed be an acceptable bypass at this point to at least have the functions fixed and the unit tests pass? Either that or I could most likely just pass to the connections() method a param whether or not to test prefix. I'm guessing that committing default failed tests isn't the right way to handle this...

I'd test two separate connections.


Fix adding compilers to Windows PATH during installation

This extra flag commands vswhere to include any product, including VC build tools, in the search. People might not install a full Visual Studio, and this adds support for that.

@lefticus Could you take a look at the pull requests I have opened?

@lefticus Could you check my PRs?

@lefticus Could you check my PRs?


fix go lock

PR Details

Description

主要解决多多线程导出时的错误，添加的锁解决问题
Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

开启协程后，会报错

LGTM, thanks @hengmyj.


Cannot set a nested threshold key value

Description
The third level threshold cannot be set.  If the threshold value cannot be set there should be an error message that is displayed to the user.

Steps to reproduce
see above
Additional context
No response
Hedera network
other
Version
0.7.0
Operating system
No response

There are no keys in the threshold, giving the list a size of zero. Add keys and then the threshold will be editable


[Simulator] Add in simulator statistic counts

Add in statistics for simulator

Number of intersections or unions
Efficiency (word tokens / total tokens)
Ops (compares, adds, muls, loads, stores)
maximum FIFO depth
Number of each node type

Should be addressed with #56


Car docs: show more information about cars

Reference, old car docs: https://github.com/commaai/openpilot/blob/62bb43b7e279d81d03d1023ea24dc1f845fc3608/docs/CARS.md
Preview: https://github.com/commaai/openpilot/blob/bb-stars/docs/CARS.md

Let's also add a column for the harness name and ideally link to it on the shop.

Any blocker on this? Looks pretty good to me.

Still want the torque stars? If not I'll clean up

Let's do a star for now.


Onboarding legibility issue in Dark Mode

What

[ ] Onboarding legibility issue in Dark Mode on iPhone 6S

Part of

#561

Screenshot

@teolemon Just curious: are we talking about real people that launched the app for the very first time, or developers in dev mode? I ask that because I wonder if the app starts in light mode anyway:

is there a "dark mode for every app" set-up on iPhone?
does smoothie comply to that set-up?

Because if the app automatically inits in light mode, we could ignore issues regarding onboarding in dark mode.

Yeah, I also thought about this while coding the onboarding flow, the app
just starts in light mode.
On Fri, Jan 7, 2022, 08:57 monsieurtanuki @.***> wrote:

@teolemon https://github.com/teolemon Just curious: are we talking
about real people that launched the app for the very first time, or
developers in dev mode? I ask that because I wonder if the app starts in
light mode anyway:

is there a "dark mode for every app" set-up on iPhone?
does smoothie comply to that set-up?

Because if the app automatically inits in light mode, we could ignore
issues regarding onboarding in dark mode.
—
Reply to this email directly, view it on GitHub
https://github.com/openfoodfacts/smooth-app/issues/875#issuecomment-1007209569,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABZRHYRLHITJW3K5L7QFMBDUU2MILANCNFSM5LOGQWIA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Yes it starts in light + blue theme mode, the buttons also look bad for example with green theme. The theme shouldn't be a problem, but at some point we will switch to automatically identifying the system dark mode status and then this will also be on in onboarding.

opened #1257

Partly the same as #1356 which has a PR

Fixed by #1357

@M123-dev I believe we still have the top title legibility

Also the next page button has too less opacity

Tracked in #1386


Support for Warhammer Fantasy Roleplay

Please could you give support to Warhammer fantasy roleplay 4th edition. It could come super handy since we have many opposed rolls

I will look into it.


Feat: Reduce memory requirement for MOOSE during inference

Problem
MOOSE is based on nnUNet and the current inference takes a lot of memory on total-body datasets (uEXPLORER/QUADRA, upper limit: 256 GB). This is not a normal memory usage for most of the users. The memory usage bottleneck is explained here: https://github.com/MIC-DKFZ/nnUNet/issues/896
Solution
The solution seems to be to find a 'faster/memory efficient' resampling scheme than the skimage resampling scheme. People have already suggested solutions for speed, based on https://pytorch.org/docs/stable/generated/torch.nn.functional.interpolate.html and an elaborate description can be found here:  https://github.com/MIC-DKFZ/nnUNet/issues/1093.
But the memory consumption is still a problem. @dhaberl @Keyn34 : Consider these alternative options of Nvidia's cuCIM cucim.skimage.transform.resize in combination with Dask for block processing (chunks consume way less memory and I have used this for kinetic modelling).
Impact
This would result in a faster inference time and hopefully also obviates memory bottleneck for MOOSE and for any model inference via nnUNet.

@davidiommi : Also consider these options of Nvidia's cuCIM cucim.skimage.transform.resize

Here are some benchmark values I got for a CT with size (512, 512, 768) and spacing (1.5234375, 1.5234375, 2.0):
Resampled to size (520, 520, 1024) and spacing (1.5, 1.5, 1.5):
cucim.resize: 0.85 (0.09) s [on GPU]
SimpleITK.resample: 7.65 (0.12) s [on CPU with sitk.ProcessObject.SetGlobalDefaultNumberOfThreads(MAX_THREADS)]
skimage.resize: 54.85 (0.77) s [default as I could not find any multithreading option]
scipy.zoom: 61.59 (0.50) s [default as I could not find any multithreading option]
Values are mean (std) for n=10 runs
Interpolation type:
Bi-cubic (= order 3): cucim, skimage, scipy
sitk.sitkBSpline: SimpleITK

cuCIM it is!

sorted with dask!


Storage & Compute release 2024-10-25

Storage & Compute release 2024-10-25
Please merge this Pull Request using 'Create a merge commit' button

Reviewed for changelog


Errors in formatters and LegacyApi can give weird error symptoms

To illustrate this a added the explicit raising of an exception in Cucumber::Formatter::LegacyApi::Ast. The errors from one spec (junit_spec.rb) pinpoint this, but the errors from another (pretty_spec.rb) instead point to:
       undefined method `custom_profiles' for {}:Hash
     # ./lib/cucumber/formatter/console.rb:82:in `print_stats'

I guess that #831 is an expression of this too. The error that triggered the stacktrace of #831 is somewhere completely unrelated to the information in that stacktrace.

I'm confused @brasmusson. What do we need to do with this PR?

@mattwynne You should look at this as an Issue with an illustrating example, and not as an PR with a failing test. The problem is that you can't get from undefined method custom_profiles' for {}:Hashto theraise` in LegacyApi::Ast::DataTableRow::accept, can you?
I have seen this regularly when working on Formatters and LegacyApi. It is not that big problem when working with baby steps, when it occurs you just back down from the last baby step to get to a clean build and try again. But getting a undefined method 'custom_profiles' for {}:Hash, undefined method 'map' for nil:NilClass or undefined method 'after_test_case' for nil:NilClass isn't exactly helping you to realise "of course, I should use step_source.location.line not step_source.line" (or something).
We will never know what the root cause of #831 was, or if it is fixed. Even if we come across the exact stacktrace again, we will not know if it the same root cause of a different one.
Somewhere (one place high on my list of "the usual suspects", is somewhere close to the fan_out handling of formatters), exceptions are swallowed and the execution continued, instead of the failing fast that would have given an accurate error message and stacktrace.

@brasmusson do you mind if we close this to tidy up?

No, I do not mind closing this. This was meant as a reminder of that some issues may have backtraces that point to totally the wrong place compared to where the problem is located.


Unsupervised Images Dataset?

How do you think, would it be reasonable to have an "unsupervised" mode for DatasetFolder class? Now it expects each image to sit in its own folder but sometimes I would like to just load a bunch of images from the unlabelled test set, like:
dataset = DatasetFolder(path, loader=open_image, unsupervised=True)
image = dataset[i]  # or maybe (image, None), or (image, -1)

Hi,
I believe we can always create a folder with a single folder in it (for example via symlinks if we don't want to copy the data), which makes it possible to use DatasetFolder straight away.
Would that be a solution? It would return (image, 0), which you can discard

Or a very basic implementation:
import os
import glob

class BunchOfImagesDataset(object):
    def __init__(self, folder, transforms=None):
        self.folder = folder
        self.files = glob.glob(os.path.join(folder, '*.jpg'))

    def __getitem__(self, idx):
        ...
    def __len__(self):
        return len(self.files)

I think that the proposed solutions are simple enough, so that it might not be necessary to add one more level of complexity.


update: with-nextjs

📝 Changed routes:

/docs/with-nextjs.zh-CN

(view full size)

Commit 5b65dc2c0dbdce4c9896dd013d47f810daa3c061 (https://swr-site-bkhtux35v.vercel.sh).


El Salvador marriage abroad

https://trello.com/c/1hgTz2BQ/848-el-salvador-marriage-tool-opposite-sex-marriage-change-request-content-change-request
I've updated 6 outcomes: 3 opposite sex where the user is in El Salvador, and 3 opposite sex where the user is in El Salvador.
CHANGE 1
I've replaced references to the embassy with the Honorary Consulate.
CHANGE 2
Updated the consular fees table link.
CHANGE 3
Replaced the naturalisation of partner partials with flat content.
This doesn't affect the logic

Closing this PR.. #3214 Supersedes it.


我无法使用 CLI。 我已经尝试了很多天，但找不到任何解决方案。

Issues

[X] I have browsed through the Issues. 我已浏览过Issues，确定没有重复提问。

Umi-OCR version 程序版本
2.1.0
Windows version 系统版本
win11
OCR plugins Used 使用的OCR插件
PaddleOCR, RapidOCR
Reproduction steps 复现步骤
我按照链接 https://github.com/hiroi-sora/Umi-OCR/blob/main/docs/README_CLI.md 按照 CLI 教程进行操作
Problem screenshots or related files (optional) 问题截图或相关文件（可选）
我为可怕的中国人谦卑地道歉。 不幸的是，我仍在学习中，而且我处于非常基础的水平，能够传达复杂的信息，因此我将使用通用翻译器从葡萄牙语/英语翻译为简体中文。
CLI 可能没有问题，但不幸的是，我无法按照高级说明添加 PDF 文档和双层 OCR 文本。 我没有得到回复，或者如果他想要文件，我可以让他处理。 我试图按照（https://github.com/hiroi-sora/Umi-OCR/blob/main/docs/README_CLI.md）的说明进行操作，但是，我相信我一定做错了什么。 看，我正在尝试使用语法： Umi-OCR.exe --call_qml [name] --func [function] [..paras]
您能否向我展示一个简单的命令，用于添加一两个 PDF 文档，然后执行对它们应用双层 OCR 文本的过程？
谢谢！ 您的应用程序可能是免费甚至封闭的解决方案中最好的！

First of all, I apologize for the imperfections in our English documentation. In the future, we will continue to focus on providing convenience for users of multiple languages.
Below is the solution to your request:
Objective: Use CLI to add a PDF document task and generate a double-layer searchable PDF.
This task is not within the preset quick commands, so it is relatively cumbersome and requires multiple consecutive commands to achieve.
Procedure:

(Optional) If the Batch Documents OCR tab is not currently open, open it:

1.1. Query all current page templates:

./umi-ocr --all_pages

1.2. It is known that the template_index of the BatchDOC tab is 3. Create this tab:

./umi-ocr --add_page 3

1.3. Check if the BatchDOC module already exists:

./umi-ocr --all_modules

If BatchDOC_1 is found in Qml modules, then it is correct.

Input the paths of multiple documents into the software:

Suppose you want to add the following files:

C:\Users\My\Desktop\111.epub
C:\Users\My\Desktop\222.pdf

Use the following command to input the document paths (the \ in the path needs to be changed to /):

./umi-ocr --call_qml BatchDOC --func addDocs '[\"C:/Users/My/Desktop/111.epub\",\"C:/Users/My/Desktop/222.pdf\"]'

Note that the format of the addDocs parameter is: '[\"document path\",\"document path\"...]'. Also, backticks \ cannot be used in the path; / must be used instead.

Start the task:
./umi-ocr --call_qml BatchDOC --func docStart

Currently, it is not possible to change the file type to be saved via CLI (the default is layered.pdf Double-layer Searchable Document). To add other save types, you must check them in the software interface.

./umi-ocr --call_qml BatchDOC --func docStart

Thank you for the quick response and detailed step-by-step instructions! Problem solved! With your help I was able to process the documents despite having experienced some difficulties when using a more recent version of PowerShell (version 7.4.2); so to make it work I have to run the commands using Windows PowerShell version 5.1.22621.2506 (the default version preinstalled on Windows 11). If you are curious, please see how I proceeded below:

Initially, when running the commands as directed using PowerShell version 7.4.2, only the following commands appear to execute correctly: ".\Umi-OCR.exe --all_pages" and ".\Umi-OCR.exe --add_page 3". The above commands launch the application and open the Batch Documents OCR page respectively.

After running the previous commands using PowerShell version 7.4.2 the following commands DO NOT run or DO NOT appear to run: ".\Umi-OCR.exe --call_qml BatchDOC --func addDocs '["C:/Users /account/Downloads/example.pdf"]'" and ".\Umi-OCR.exe --call_qml BatchDOC --func docStart". Although they do not execute effectively the message 'Calling "docStart" in main thread.' is returned as if something where happening, but I can't see any CPU stress or memory usage and no document is created.

After failing to execute several attempts using the previous commands, I realized I was using the Windows Terminal which in turn was launching PowerShell (version 7.4.2); So, I tried launching the same commands in the same order however this time using Windows PowerShell version 5.1.22621.2506 and luckily everything worked correctly!
Thank you for your help! You're doing an awesome job and making my life easier so please wait for me to buy you some coffees or provide you with any help here if you need! Much love and affection from your friend in Brazil

commands DO NOT run or DO NOT appear to run

This issue is most likely caused by incorrect parsing of double quotes " by Windows PowerShell. Additionally, the parsing rules differ between PowerShell and Terminal, resulting in different formats for the paths array that we need to input:

In PowerShell, the outermost layer of the array should be enclosed in single quotes ', and there must be a space before each double quote. That is: addDocs '[■\"path_1\",■\"path_2\",■\"path_3\"]' (replace ■ with a space  ).
In Terminal, the outermost layer of the array should be enclosed in double quotes ". That is: addDocs "[\"path_1\",\"path_2\",\"path_3\"]".

The above commands have been tested and work on the latest Windows 11. There may be slight differences in other versions of the system.
Microsoft make something as simple as quoting strings a convoluted mess. 😂


SA1604 reported for non-exposed members even when documentInternalMembers is false

When the documentInternalMembers or documentPrivateElements option is set to false, SA1604:ElementDocumentationMustHaveSummary should never be reported for those non-public members which are exempted from the documentation requirement. As expected, there is no reported violation for:
private int Foo()

However, it is reported in the following examples:
///
private int Foo()

/**
 *
 */
private int Foo()

:memo: This was filed per a request in #2361.


enable_header should not be true by default

This feature is questionable at best to have in production, the thought of someone not noticing it's enabled makes me a bit uneasy.

I agree with this. I understand that some may want to have a client disable the logger but the default should be disabled. Will consider for a future release!


To support wildcard in MQTT topic in subscribe and public

I tried to use MQTT as a media between Mysensors and public MQTT broker.  It quite limited that we can only subscribe or publish to only one topic for one gateway.  That means we can have only one node and only one sensors at a time to use MQTT gateway.  If we can have wildcard such as '#' to select all the node  or all the sensors to be subscribed and distribute the data to the right Node and Sensors according to the incoming Topic it should be OK.

@onceuponatimeincyber Would you request to allow wildcard on MQTT gateway topic on MyController?
Currently it works as follows,

mysensors_out will be subscribed as mysensors_out/#
mysensors_in can publish on mysensors_in/#

Closing this. If you face any issue related this, kindly reopen this ticket.


socketman: add (optional) callbacks for certain events

The user should be able to set callbacks to some function when certain events in the socket manager happen (e.g., the user's app could set a callback for when the remote end disconnects). Set to an empty method by default.
Some starters:

[x] event: connected
[x] event: remote disconnected
[ ] ...

Preliminary support added in 59f1826090c25236f427c580004a1fba5245c60f

Closing since the initial callbacks have been implemented.


How to deal with the Property missing of ComponentPublicInstance?

Version
4.0.15
Reproduction link
codesandbox.io
Steps to reproduce
data() {
    return {
      isMounted: true,
    }
  },
beforeRouteEnter(to, from, next) {
    next((vm) => {
      if (to.meta.from.includes(from.path) || vm.isMounted) {
        vm.isMounted= false
        vm.fetch()
      }
    })
  }

What is expected?
Be able to access isMounted of vm
What is actually happening?
Property 'mount' does not exist on type 'ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>'.

Duplicate of https://github.com/vuejs/router/issues/701


Allow percentage width on sideNav

docs(side-nav): Adds an example with menuWidth option as percentage
chore(materialize css & js): Regenerates dist and bin files + templates
feat(side-nav): Allows percentage width
I have included some css and templates autogenerated with the release task because they weren't up to date

This seems to include many unrelated changes which makes it hard to review. Can you break the changes unrelated to the percentage width into separate PRs?

Hi, of course. I've made another pull request: https://github.com/Dogfalo/materialize/pull/694

Merged in #694


Writing own login

This is  a ** feature request**.

Prerequisites

[x] Are you running the latest version?
[x] Are you reporting to the correct repository?
(enso is made of many specialized packages: https://github.com/laravel-enso)
[x] Did you check the documentation?
[x] Did you perform a cursory search?

Description

I want to add some aspects in the login procedure, but I do not want to tweak in the Laravel/Enso configuration. (People can login with a name and number, and the credentials are validated by calling an API with another website)
How can I fix that my own login procedure is executed in stead of the Laravel/Enso function??
Seems that I have to set some config parameters,  but can not find exactly how.
Expected behavior

People enter their name and number.
Via an API with another website I get the data belonging to that number and validate the given name.
When correct the user is authenticated the regular way, else I show a error-message.

Another way to realise this is to change the fallback path to my own login procedure.
But how do I set the fall back path.

I think that the most easy way to achieve this is to update the projects app/Http/Controllers/Auth/LoginController according to your needs and also overwrite Enso's auth routes to point to the local controller
|        | POST          | api/login                                                | login                                   | LaravelEnso\Core\app\Http\Controllers\Auth\LoginController@login                                 | web,guest                                        |
|        | POST          | api/logout                                               | logout                                  | LaravelEnso\Core\app\Http\Controllers\Auth\LoginController@logout                                | web                                              |
|        | POST          | api/password/email                                       | password.email                          | LaravelEnso\Core\app\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail           | web                                              |
|        | POST          | api/password/reset                                       | password.reset                          | LaravelEnso\Core\app\Http\Controllers\Auth\ResetPasswordController@attemptReset                  | web

Overwriting the routes did the trick


How to use it in a form?

Hi,
I am sorry if this is not the right place to ask but I just couldn't figure out where to drop my question. I guess it must be simple but I couldn't find how to use this module outside of the admin creation of a page?
I would like to create a form, with a ckeditor powered textarea, for my visitors to use and submit.
What would be the prefered way to do this?
Sorry again if this isn't the right place.

Hello @Xosted,
You can use it like so:
from djangocms_text_ckeditor.fields import HTMLFormField

class YourForm(forms.Form):
    content = HTMLFormField(required=False)

Hope that helps.


Add home screen with a welcome message

Fixes #2559
Pull Request Checklist

[x] Privileged views and APIs are guarded by proper permission checks.
[x] All visible strings are translated with proper context.
[x] All data-formatting is locale-aware (dates, numbers, and so on).
[x] Database queries are optimized and the number of queries is constant.
[x] The changes are tested.
[x] The code is documented (docstrings, project documentation).


Move CI to a matrix, add ESP-IDF coverage

What are your thoughts on this CI matrix? Should check through everything the previous CI did plus with ESP-IDF, and since it's a matrix it runs in parallel, so it's faster than previous

Excellent work! Thanks for the idf coverage.

Thanks!


Unknown error when trying to access files from a camera that's offline in the Media library

Description
I get "Unknown error" when i try to access files from a camera that's offline in the Media library. I have "enabled media synchronisation". I have 2 cameras with media sync enabled and just one camera down at the moment. I can access the files with in the media library with no problem from the camera that is online.
I have the files locally on the home assistant. I can ses the files from both cameras locally when i list them in a ssh terminal.
Reproduction Steps
Turn off one camera
Go to the offline camera in the Media library in home assistant.
Expected behavior
View the recordings that is synced.
If applicable, add error logs.

Device Firmware
1.3.11
Integration Version
5.4.14
Using stream component
Yes
Does camera work via official integrations?
Yes
Camera has all attributes filled out in developer tools
Yes
HASS Environment
Generic x86-64
Search for similar issues
Yes
Additional information
No response

What is the error in the logs?

Recordings do not work when camera is offline by design. If you would like, please open new feature request, no promises on when it will be done though as by design, this is a sync, not a copy, so it always uses the latest information from camera and would require major rewrite.


Compile error by proper exported .gltf

Current Behavior
Point and Spot lights and exported from Blender 3.1 using 1.1.6 compile with no problems. If I compile the Object with fspackagetool I got some errors:
Compiling GLTF data file EDHK_Tower.gltf...
Node without Unique ID while using the unique_id extension, nodes[4] : 'PointFW1_Orientation'
Node without Unique ID while using the unique_id extension, nodes[7] : 'Point_Orientation'
Node without Unique ID while using the unique_id extension, nodes[26] : 'SpotFWR_Orientation'
Node without Unique ID while using the unique_id extension, nodes[30] : 'SpotFWL_Orientation'
GltfCompiler | Failed to load model data from file. I open the .gltf in Visualstudio Code serarch for PointFW1_Orientation and find this:
{
"name" : "PointFW1_Orientation",
"rotation" : [
-0.7071067690849304,
0,
0,
0.7071067690849304
]
},
If i insert the follow lines:
{
"extensions" : {
"ASOBO_unique_id" : {
"id" : "PointFW1_Orientation"
}
},
"name" : "PointFW1_Orientation",
"rotation" : [
-0.7071067690849304,
0,
0,
0.7071067690849304
]
},
the compiler error has gone.
Environment

OS: Windows 10 Pro
Blender:3.1 and 3.2.1
glTF-Blender-IO-MSFS:1.1.6

Hello !
I added a check for this option in the multiExporter view. You should see it in the settings view as shown in the image down bellow !
Thank you

Thank you


Default Presets?

so uhh i was wondering if you can like add an option in the config to make a preset for moderner beta default because i have no idea how to use datapacks

Sorry, but the official way to do it is to use a datapack. It'd quite easy to do really if you have experience with JSON: simply make a replacement for data/moderner_beta/worldgen/world_preset/moderner_beta.json. The original JSON can be found in the mod jar.


nix eval cannot evaluate any package

Describe the bug
Per the title, trying to nix eval any package from a Nixpkgs checkout errors out because fetchurlBoot doesn't support the hash argument. Adding hash alongside sha256 in pkgs/build-support/fetchurl/boot.nix then complains about postFetch, and adding an ellipsis complains about missing overrideAttrs.
https://logs.nix.samueldr.com/nixos/2020-10-17#1602958244-1602958423
To Reproduce
Steps to reproduce the behavior:

nix eval .#hello from within a Nixpkgs checkout
See the following:

trace: `mkStrict' is obsolete; use `mkOverride 0' instead.
trace: Warning: `showVal` is deprecated and will be removed in the next release, please use `traceSeqN`
trace: `lib.nixpkgsVersion` is deprecated, use `lib.version` instead!
trace: lib.zip is deprecated, use lib.zipAttrsWith instead
trace: warning: lib.readPathsFromFile is deprecated, use a list instead
error: --- TypeError ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
at: (26:6) in file: /nix/store/3zknvlb748m6jngn3qbxwgan211hi6q6-source/pkgs/development/interpreters/python/fetchpypi.nix

    25|     url = computeUrl (builtins.removeAttrs attrs ["sha256" "hash"]) ;
    26|   in fetchurl {
      |      ^
    27|     inherit url sha256 hash;

anonymous function at /nix/store/3zknvlb748m6jngn3qbxwgan211hi6q6-source/pkgs/build-support/fetchurl/boot.nix:5:1 called with unexpected argument 'hash'
(use '--show-trace' to show detailed location information)

Cry

Expected behavior
Don't error out.
Additional context
I can't debug further, because adding --show-trace just hangs.
Metadata

system: "x86_64-linux"
host os: Linux 5.8.13-zen1, NixOS, 21.03.20201014.ecc99cd-cosmere (Okapi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 3.0pre20201008_58dadf2
channels(vin): ""
channels(root): ""
nixpkgs: /home/vin/.config/nixpkgs/compat

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

This occurs in 2.3 as well. It looks like it is trying to recursively evaluate the derivation and eventually reaches something that fails. Note that the --raw option seems to prevent this and causes the output path to be printed.
What actually is the expected output here without the --raw option?
This is an example trace:
trace: lib.zip is deprecated, use lib.zipAttrsWith instead
trace: `lib.nixpkgsVersion` is deprecated, use `lib.version` instead!
trace: warning: lib.readPathsFromFile is deprecated, use a list instead
trace: Warning: `showVal` is deprecated and will be removed in the next release, please use `traceSeqN`
trace: `mkStrict' is obsolete; use `mkOverride 0' instead.
error: while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'stdenv' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:202:18:
while evaluating the attribute 'out' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:17:7:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'initialPath' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/default.nix:118:14:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'stdenv' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:202:18:
while evaluating the attribute 'out' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:17:7:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'defaultNativeBuildInputs' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/default.nix:118:14:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'stdenv' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:202:18:
while evaluating the attribute 'out' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:17:7:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'defaultNativeBuildInputs' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/default.nix:118:14:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'bintools' at /home/ben/Documents/Projects/nixpkgs/pkgs/build-support/cc-wrapper/default.nix:114:10:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'bintools_bin' at /home/ben/Documents/Projects/nixpkgs/pkgs/build-support/bintools-wrapper/default.nix:82:10:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'nativeBuildInputs' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:218:11:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'nativeBuildInputs' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:218:11:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'all' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:149:12:
while evaluating the attribute 'pkgs' at /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/perl/default.nix:115:7:
while evaluating the attribute 'version' at /home/ben/Documents/Projects/nixpkgs/pkgs/top-level/perl-packages.nix:23020:3:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'drvAttrs' at /nix/store/7rvp30nz4wissy497kyzjks04vgnlcrv-nix-2.3.7/share/nix/corepkgs/derivation.nix:12:14:
while evaluating the attribute 'buildInputs' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:221:11:
while evaluating the attribute 'out' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:153:11:
while evaluating the attribute 'all' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:149:12:
while evaluating the attribute 'pkgs' at /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/perl/default.nix:115:7:
while evaluating the attribute 'OpenGL' at /home/ben/Documents/Projects/nixpkgs/pkgs/top-level/perl-packages.nix:15350:3:
while evaluating the attribute 'outPath' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:164:7:
while evaluating the attribute 'buildInputs' of the derivation 'perl5.32.0-OpenGL-0.70' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'glu-9.0.1' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'buildCommand' of the derivation 'libGL-1.3.2' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'buildInputs' of the derivation 'libglvnd-1.3.2' at /home/ben/Documents/Projects/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'buildInputs' of the derivation 'libX11-1.6.8' at /home/ben/Documents/Projects/nixpkgs/pkgs/servers/x11/xorg/default.nix:706:5:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'xorgproto-2019.1' at /home/ben/Documents/Projects/nixpkgs/pkgs/servers/x11/xorg/default.nix:2682:5:
while evaluating the attribute 'out.outPath' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:156:13:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'meson-0.55.1' at /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix:110:5:
while evaluating 'chooseDevOutputs' at /home/ben/Documents/Projects/nixpkgs/lib/attrsets.nix:475:22, called from undefined position:
while evaluating 'optionals' at /home/ben/Documents/Projects/nixpkgs/lib/lists.nix:270:5, called from /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix:122:10:
while evaluating 'hasSuffix' at /home/ben/Documents/Projects/nixpkgs/lib/strings.nix:212:5, called from /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix:122:25:
while evaluating the attribute 'src.name' at /home/ben/Documents/Projects/nixpkgs/pkgs/development/tools/build-managers/meson/default.nix:14:3:
while evaluating 'makeOverridable' at /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:67:24, called from /home/ben/Documents/Projects/nixpkgs/pkgs/development/tools/build-managers/meson/default.nix:14:9:
while evaluating anonymous function at /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/python/fetchpypi.nix:23:21, called from /home/ben/Documents/Projects/nixpkgs/lib/customisation.nix:69:16:
anonymous function at /home/ben/Documents/Projects/nixpkgs/pkgs/build-support/fetchurl/boot.nix:5:1 called with unexpected argument 'hash', at /home/ben/Documents/Projects/nixpkgs/pkgs/development/interpreters/python/fetchpypi.nix:26:6

Still getting this on nix version: nix (Nix) 3.0pre20201020_e0ca98c
Adding --raw crashes with:
error: --- TypeError --------------------------------------------------- nix
cannot coerce a set to a string

Duplicate of #97176 ?

Indeed, thanks.


Add developer-facing namespaced resources to the "all" category

Add Workloads to the "all" category
Add Deliverable to "all" category as well.

Changes proposed by this PR
closes #448
Uses the controller-gen annotations to define categories for the Delivery and Workload resources.
Release Note

Namespace-level resources (Workloads and Deliverables) should appear in kubectl get all

PR Checklist
Note: Please do not remove items. Mark items as done [x] or use ~strikethrough~ if you believe they are not relevant

[x] Linked to a relevant issue. Eg: Fixes #123 or Updates #123
[x] Removed non-atomic or wip commits
[x] Filled in the Release Note section above
[x] Modified the docs to match changes

@evankanderson If you could rebase on main the validation tests should start passing (fixed here: #447)

Rebased.


CHG: Connection#initialize now accepts a lambda for making socket

so we could inject some duck type of TCPSocket into Connection, e.g. Proxifier::Proxy wrapped socket.

Object#try is a Rails (ActiveSupport) feature, so please use standard nil checking and conditional dispatching instead.

Thanks, this looks like a good way to solve it 👍
Can you please add a test? Once CI is green I’ll merge it.

group.try :terminate is not related with the subject "proxy" of this PR. So I removed it.
I met group is nil on my production environment, didn't figure out why. That's a quick and dirty fix which accidentally included in this PR.
I will add test later.

OK, test and README updated.

Ace! The build is showing 1 rubocop offence https://travis-ci.org/alloy/lowdown/builds/128844864
lib/lowdown/connection.rb:400:1: C: Trailing blank line missing.

Just add an extra newline at the end of that file and it should go green.

done :)

Awesome, thanks 👏

😄


remove annex F; update CRS CURIEs

closes #118

Meeting 2024-02-19: Merge once the three XML files with the CRS definition have been deleted, too.