How to add a copy button to a code block?

Is there an existing issue for this?

[X] I have searched the existing issues

The question
Hi all, I would like to ask if I add a copy button to the top right corner of the code block so that I can quickly copy the code inside, similar to the picture below:

The code block is not customizable, but it's possible to replace it with another widget, possibly a code highlighter / viewer that already has a copy button.

The code block is not customizable, but it's possible to replace it with another widget, possibly a code highlighter / viewer that already has a copy button.

Yes, the screenshot in my question was generated from CustomBlockEmbed in the documentation.
However, there are two issues I can't deal with when using CustomBlockEmbed:

in the demo of the document, it uses a popup window for editing and then updating to the content, whereas I want to edit directly in the editor, as if I were editing a block of code
when I use the toPlainText() method, the content customized with CustomBlockEmbed doesn't export the text and displays an empty content, toPlainText() allows to pass an Iterable<EmbedBuilder>?  parameter, but it doesn't seem to be working correctly at the moment, I'm still trying to find out why, my solution so far is to extract the custom from the json string before using toPlainText() to generate a new json content.

Yes, the screenshot in my question was generated from CustomBlockEmbed in the documentation.
However, there are two issues I can't deal with when using CustomBlockEmbed:

Please refer to #2146, and consider using the experimental property customLeadingBlockBuilder instead of CustomBlockEmbed to override the built-in code block instead of implementing a new custom embed.

allows to pass an Iterable?  parameter, but it doesn't seem to be working correctly at the moment, I'm still trying to find out why

Could you provide a minimal example code? The toPlainText() extracts plain text without attributes or rich output. What are you using it for?

@EchoEllet Hi, I've created a new demo repository on GitHub at https://github.com/yzxh24/quill_to_plain_text_demo.git.
This demo shows me using EmbedBuilder to insert a custom Note into the content and copying all the content with the button in the bottom right corner.

When I click the copy button, all I can get is:
content

And the content I expect should be:
content
Notes

This is the full code:
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_quill/flutter_quill.dart' as quill;

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  final quill.QuillController quillController = quill.QuillController.basic();

  @override
  void initState() {
    super.initState();

    quillController.document = quill.Document.fromJson(
      jsonDecode(r'[{"insert":"content\n"},{"insert":{"custom":"{\"notes\":\"[{\\\"insert\\\":\\\"Notes\\\\n\\\"}]\"}"}},{"insert":"\n"}]')
    );
  }

  @override
  void dispose() {
    quillController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
        actions: [
          IconButton(onPressed: () {
              _addEditNote(context);
            },
            icon: const Icon(Icons.add),
          )
        ],
      ),
      floatingActionButton: FloatingActionButton(onPressed: () async {
         /// Here, I pass the NotesEmbedBuilder to the toPlainText method
          var text = quillController.document.toPlainText([NotesEmbedBuilder(addEditNote: _addEditNote)]);
          await Clipboard.setData(ClipboardData(text: text));
          if (mounted) {
            ScaffoldMessenger.of(context)
              ..removeCurrentSnackBar()
              ..showSnackBar(const SnackBar(
                content: Text('Copy it'),
                duration: Duration(seconds: 1),
              ));
          }
        },
        child: const Icon(Icons.copy)
      ),
      body: Column(
        children: [
          quill.QuillToolbar.simple(controller: quillController),
          Expanded(child: quill.QuillEditor.basic(
            controller: quillController,
            focusNode: FocusNode(),
            configurations: quill.QuillEditorConfigurations(
              padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
              embedBuilders: [NotesEmbedBuilder(addEditNote: _addEditNote)],
            )
          ))
        ],
      )
    );
  }

  Future<void> _addEditNote(BuildContext context,
      {quill.Document? document}) async {
    final isEditing = document != null;
    final quillEditorController = quill.QuillController(
      document: document ?? quill.Document(),
      selection: const TextSelection.collapsed(offset: 0),
    );

    await showDialog(
      context: context,
      builder: (context) => AlertDialog(
        titlePadding: const EdgeInsets.only(left: 16, right: 16, top: 8),
        title: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text('${isEditing ? 'Edit' : 'Add'} note'),
            IconButton(
              onPressed: () => Navigator.of(context).pop(),
              icon: const Icon(Icons.close),
            )
          ],
        ),
        content: quill.QuillEditor.basic(
          controller: quillEditorController,
          configurations: const quill.QuillEditorConfigurations(),
        ),
      ),
    );

    if (quillEditorController.document.isEmpty()) return;

    final block = quill.BlockEmbed.custom(
      NotesBlockEmbed.fromDocument(quillEditorController.document),
    );
    final controller = quillController;
    final index = controller.selection.baseOffset;
    final length = controller.selection.extentOffset - index;

    if (isEditing) {
      final offset =
          quill.getEmbedNode(controller, controller.selection.start).offset;
      controller.replaceText(
          offset, 1, block, TextSelection.collapsed(offset: offset));
    } else {
      controller.replaceText(index, length, block, null);
    }
  }
}

class NotesBlockEmbed extends quill.CustomBlockEmbed {
  const NotesBlockEmbed(String value) : super(noteType, value);

  static const String noteType = 'notes';

  static NotesBlockEmbed fromDocument(quill.Document document) =>
      NotesBlockEmbed(jsonEncode(document.toDelta().toJson()));

  quill.Document get document => quill.Document.fromJson(jsonDecode(data));
}

class NotesEmbedBuilder extends quill.EmbedBuilder {
  NotesEmbedBuilder({required this.addEditNote});

  Future<void> Function(BuildContext context, {quill.Document? document})
  addEditNote;

  @override
  String get key => 'notes';

  @override
  String toPlainText(quill.Embed node) {
    return node.toPlainText();
  }

  @override
  Widget build(
      BuildContext context,
      quill.QuillController controller,
      quill.Embed node,
      bool readOnly,
      bool inline,
      TextStyle textStyle,
      ) {
    final notes = NotesBlockEmbed(node.value.data).document;
    final isDark = Theme.of(context).brightness == Brightness.dark;

    return Material(
      color: Colors.transparent,
      child: Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(6),
          // border: Border.all(color: Colors.grey),
          color: isDark ? Colors.grey[900] : Colors.grey[200],
        ),
        child: Stack(
          children: [
            Padding(
              padding: const EdgeInsets.all(16.0),
              child: Text(
                notes.toPlainText().trimRight(),
                overflow: TextOverflow.ellipsis,
                style: TextStyle(
                    color: Theme.of(context)
                        .textTheme
                        .bodyMedium
                        ?.color
                        ?.withOpacity(0.6)),
              ),
            ),
            Positioned(
              top: 6,
              right: 6,
              child: Row(
                children: [
                  Material(
                    color: Colors.transparent,
                    child: InkWell(
                      onTap: () => addEditNote(context, document: notes),
                      borderRadius: BorderRadius.circular(20),
                      child: const Padding(
                        padding: EdgeInsets.all(8.0),
                        child: Icon(Icons.edit, size: 16.0, color: Colors.grey),
                      ),
                    ),
                  ),
                  Material(
                    color: Colors.transparent,
                    child: InkWell(
                      borderRadius: BorderRadius.circular(20),
                      onTap: () {
                        final notesText = notes.toPlainText().trimRight();
                        Clipboard.setData(ClipboardData(text: notesText));
                        ScaffoldMessenger.of(context)
                          ..removeCurrentSnackBar()
                          ..showSnackBar(
                            const SnackBar(
                              content: Text('Copy it'),
                              duration: Duration(seconds: 2),
                            ),
                          );
                      },
                      child: const Padding(
                        padding: EdgeInsets.all(8.0),
                        child: Icon(Icons.copy, size: 16.0, color: Colors.grey),
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}


renamed series stat / debug log

return from rename_author deleted series names and show stat / debug log as "renamed series files"

https://github.com/andgineer/goodreads-export/commit/24876f3e2f1063a8512133b9b019bcee70cad16d


WebSocket connection to 'ws://...' failed: Error during WebSocket handshake: net::ERR_CONNECTION_CLOSED

Hello! I'd try your example and it's dont work.
Server starts successfully but when I try to initiate WS connection from your page (http://nodemcu.creationix.com/), and my (local) pages the result same
WebSocket connection to 'ws://...' failed: Error during WebSocket handshake: net::ERR_CONNECTION_CLOSED
But in serial Esp console says

New websocket client connected

I've changed the following at the bottom of websocket.lua and got it working;
if method == "GET" and key then
conn:send("HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: " .. acceptKey(key) .. "\r\n\r\n")
buffer = ""
conn:on("sent", function() callback(socket) end)


Add LSP version data to the meta model.

The meta model should have a version field indicating the version of the LSP

Agree.

Bonus points: change the type of since to SpecVersion!

IMO since is a well established name for this. And the meta model should always refer to the spec version.

I meant change the type to use the version type rather than a string. That would make it easy for tools to actually use and ensure it's always a version.

Sorry, misunderstood.
Some of the @since tags have additional text info if only a specific aspect got added for a version. So it would require more than simply SpecVersion.
So I am not sure if this is worth the effort

To give you an idea of where it would be useful: my Haskell library offers users "complete" capability objects for each version of the spec, so you can test with server/client capabilities that advertise "everything". This is currently done fairly manually, but if the introduction version was reliably reported in the metamodel we could probably do it automatically.


[release-4.12] OCPBUGS-15198: Surface cpms vs machines diff

Manual cherry-pick of #218 (originally https://github.com/openshift/cluster-control-plane-machine-set-operator/pull/180)

/jira refresh

/retest-required

/label cherry-pick-approved

/retest-required

/jira refresh

/skip
/tide refresh

/lgtm


#98: Add Array copying profile.

2.3.0

#98: Add profile for shallow array copying.
Automate Github release via CircleCI.
Update dependencies.
Lift required Node.js version from 8.14.0 to 10.12.0 to accomodate update dependencies.

@joshtch I went ahead and merged this for now. If you don't feel comfortable being mentioned as a contributor, please let me know. Thank you again for contributing we really appreciate it!

Looks great! Thanks! 👍


Add products taxonomy to improve findability

Adds docs products taxonomy to the repo to improve findability experiences (onsite search, recommendations and others)

Product Label
Products

Azure
https://authoring-docs-microsoft.poolparty.biz/devrel/68ec7f3a-2bc6-459f-b959-19beb729907d

Docs Build status updates of commit ae6ff58:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-Forbidden.GitAuthorization] Error occurred when accessing GitHub. Details: (Unauthorized) Bad credentials

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit ae6ff58:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-RepositoryOwnerReAuthorizeRequiredOnRepo] Repository owner wuhanyumsft's token is invalid, please ask the owner to login Docs portal 'https://ops.microsoft.com' with his/her GitHub account and re-authorize Docs service.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit ae6ff58:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 14daab7:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


[Navi21][COMGR][HIPRTC][WORKAROUND] W/A for warpSize issue when PCH is used.

This is W/A for #1431 which replaces #1436. :yellow_circle: It allows to reduce urgency of #1431 down to normal.

Reverted #1436.

:information_source: I recommend skipping the very first commit during reviewing.

Click here to see how it looks.

In all HIP kernels that use warpSize, the W/A is applied as described below.
:red_circle: Also fixes potential issue (applicable only to HIP builds via COMGR):

Device libs for wavesize 64 are used for gfx10 targets even if wavesize is 32.

:warning: How warpSize must be used in HIP sources
From now on (until the WORKAROUND_ISSUE_1431 macro is removed from MIOpen host code), any HIP kernel that uses predefined symbol warpSize must include the following code snippet:
#ifdef WORKAROUND_ISSUE_1431
#include "workaround_issue_1431.hpp"
#endif

No other changes needed.

@junliume Please assign reviewers and other attributes (can't do that, sorry).

@junliume If we are going to disable HIPRTC very soon, then we need to remove WORKAROUND_ISSUE_898 from tests/CMakeLists.txt.
Why: When PCH is disabled, the newly added regression test does nothing useful. WORKAROUND_ISSUE_898 disables PCH for HIP builds via COMGR. Right now this is not a problem, because we build HIP kernels via HIPRTC (and WORKAROUND_ISSUE_898 does not affect HIPRTC builds). But the regression test will be useless as soon as #1470 is merged in.
Please let me know if you would like me to remove W/A for issue 898 right in this PR or separately. See https://github.com/ROCmSoftwarePlatform/MIOpen/issues/898#issuecomment-1036629696 for more info.

@junliume If we are going to disable HIPRTC very soon, then we need to remove WORKAROUND_ISSUE_898 from tests/CMakeLists.txt.
Why: When PCH is disabled, the newly added regression test does nothing useful. WORKAROUND_ISSUE_898 disables PCH for HIP builds via COMGR. Right now this is not a problem, because we build HIP kernels via HIPRTC (and WORKAROUND_ISSUE_898 does not affect HIPRTC builds). But the regression test will be useless as soon as #1470 is merged in.
Please let me know if you would like me to remove W/A for issue 898 right in this PR or separately. See #898 (comment) for more info.

Could you help with the QA removal or let @DrizztDoUrden work on it? Thanks!

@qianfengz

I have tested the branch atamazov:workaround-warpsize-2 and verified that bin/test_reduce_test --all can pass on ROCM 4.3.1/gfx1030

Thanks for double checking this ;)

@DrizztDoUrden @junliume Can you please let me know CI status (and push this through CI if necessary), Thanks!

I have started it.

Code looks good. But CI is blocked by hip-tidy.
[ 70%] clang-tidy: Running clang-tidy on target solver/batchnorm/forward_inference.cpp...

[2022-03-25T18:23:23.375Z] /var/jenkins/workspace/MLLibs_MIOpen_PR-1469/src/comgr.cpp:841:28: error: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace,-warnings-as-errors]

[2022-03-25T18:23:23.375Z]                 optCompile.push_back("-DWORKAROUND_ISSUE_1431=1");

[2022-03-25T18:23:23.375Z]                            ^~~~~~~~~~

[2022-03-25T18:23:23.375Z]                            emplace_back(

[2022-03-25T18:23:23.375Z] src/CMakeFiles/tidy-target-MIOpen-comgr_cpp.dir/build.make:57: recipe for target 'src/CMakeFiles/tidy-target-MIOpen-comgr_cpp' failed

@atamazov  I cannot change the branch directly so could you suppress this warning?
        -hicpp-use-emplace -modernize-use-emplace
I have to do it in another PR https://github.com/ROCmSoftwarePlatform/MIOpen/pull/1504 too. Unless the perf gain is visible in a benchmark, I do not really think we should update/revise all of them.

Code looks good. But CI is blocked by hip-tidy.
[ 70%] clang-tidy: Running clang-tidy on target solver/batchnorm/forward_inference.cpp...

[2022-03-25T18:23:23.375Z] /var/jenkins/workspace/MLLibs_MIOpen_PR-1469/src/comgr.cpp:841:28: error: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace,-warnings-as-errors]

[2022-03-25T18:23:23.375Z]                 optCompile.push_back("-DWORKAROUND_ISSUE_1431=1");

[2022-03-25T18:23:23.375Z]                            ^~~~~~~~~~

[2022-03-25T18:23:23.375Z]                            emplace_back(

[2022-03-25T18:23:23.375Z] src/CMakeFiles/tidy-target-MIOpen-comgr_cpp.dir/build.make:57: recipe for target 'src/CMakeFiles/tidy-target-MIOpen-comgr_cpp' failed

@atamazov I cannot change the branch directly so could you suppress this warning?  -hicpp-use-emplace -modernize-use-emplace
I have to do it in another PR #1504 too. Unless the perf gain is visible in a benchmark, I do not really think we should update/revise all of them.

Ping @atamazov

Dear reviewers, can you please check CI status? Thanks!

Update all ROCm 5.2 targeted PR/issues as blockers.
this workaround has issues with comgr and may not land within time frame.

@junliume @shaojiewang @qianfengz Ready for review.


simulation results in invalid state

currently there is a redis lock around commits, but this doesn't seem to be sufficient
when running several simultaneous requests we can cause the storage to end up in an invalid state ( i.e. stored a negative value which is not allowed )
run the simulator in bitwrap-ui
App.session.simulation(['gir', 'zim', 'gaz', 'dib', 'tak']).run()

observe the invalid state on server
bitwrap@f60f2329e649:/repo/karmanom.com$ cat zim
[0,0,0,0,0,0,0,1,1,1,-1,1,1]bitwrap@f60f2329e649:/repo/karmanom.com$

Negative State storage; it might be useful to have.

@NDuma  the idea is to be able to easily validate valid transactions - you can't give a token you don't have - I may reconsider later if we find a better use case, but currently using tokens means sticking to natural numbers + 0

FYI this is being caused by race conditions when 2 processes write to storage around the same time - I may solve this by caching all values in  redis  - and execute in a block using 'multi' and 'watch'
http://stackoverflow.com/questions/15776955/redis-watch-multi-exec-by-one-client
Here's another example of a failure where 4 items are written while only 2 zim, gir should have been affected by this signal
From 5ef5b48e64825259f29f5a98892a286d5795403c Mon Sep 17 00:00:00 2001
From: zim <zim>
Date: Sat, 4 Jun 2016 06:18:12 +0000
Subject: [PATCH 01/21]
 {"sender":"zim","target":"gir","action":"deposit_system","payload":{"message_id":"14"}}

---
 dib | 2 +-
 gir | 2 +-
 tak | 2 +-
 zim | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dib b/dib
index 4f95204..576f7b4 100644
--- a/dib
+++ b/dib
@@ -1 +1 @@
-[0,0,0,0,0,0,0,1,1,1,1,3,1]
\ No newline at end of file
+[0,0,0,0,0,0,0,1,1,1,1,2,1]
\ No newline at end of file
diff --git a/gir b/gir
index e35f8eb..a7898f9 100644
--- a/gir
+++ b/gir
@@ -1 +1 @@
-[0,0,0,0,0,0,0,1,1,1,1,1,2]
\ No newline at end of file
+[0,0,0,0,0,0,0,1,1,1,1,2,0]
\ No newline at end of file
diff --git a/tak b/tak
index 3877ce8..eed2d19 100644
--- a/tak
+++ b/tak
@@ -1 +1 @@
-[0,0,0,0,0,0,0,1,1,1,1,0,1]
\ No newline at end of file
+[0,0,0,0,0,0,0,1,1,1,1,1,1]
\ No newline at end of file
diff --git a/zim b/zim
index 5d726a6..4f95204 100644
--- a/zim
+++ b/zim
@@ -1 +1 @@
-[0,0,0,0,0,0,0,1,1,1,0,2,1]
\ No newline at end of file
+[0,0,0,0,0,0,0,1,1,1,1,3,1]
\ No newline at end of file
--
2.1.4

this issue was resolved by adding a file system lock around each transformation event https://github.com/bitwrap/bitwrap-io/commit/20749b5399cdc5c536ca024fc0a5069d54082135
I'm going to add another ticket for caching state-vector values in redis as I believe that disk IO is the current bottleneck


Getting blank chart when trying to use ModelDataSource

I'm getting a blank chart when I'm trying to pull data from a Django model. Here is the relevant code:
views.py:
    queryset = HisCorOsCompliance.objects.filter(facility='ALL')
    data_source = ModelDataSource(queryset, fields=['server_compliance', 'date'],)
    chart = morris.LineChart(data_source)
    context = {'chart':chart}

    return render(request, 'portal/index.html',  context)

html:
        {% if chart %}
        {{ chart.as_html }}
        {% endif %}

I'm getting a large, blank chart as a result. I can verify that the query is working correctly. if I do a "print data" within the get_field_values function within model.py, the console prints all of the values that I'm trying to display.
I've been able to get a chart working by using the SimpleDataSource. I'm sure there's something really basic that I'm overlooking, but I'm having a really hard time figuring it out. Any help is appreciated!

@prophecy0 It seems like you haven't included morris.js in your html. Can you check your javascript console? Probably, you would see "Uncaught ReferenceError: Morris is not defined" on the console.
Your html file should look like:
<link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.3.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="http://cdn.oesmith.co.uk/morris-0.4.3.min.js"></script>
{% if chart %}
{{chart.as_html}}
{% endif %}

@prophecy0 I belive my last comment should resolve your issue, so closing this issue. Please feel free to reopen the issue if it is not resolved.


(PDB-4345) populate name column in resource_events

Add the name column to the terminus so it's sent to puppetdb
Populate the name column that was previously added to the database in
PDB-4315

Test PASSed

CLA signed by all contributors.

Test PASSed

CLA signed by all contributors.

Test PASSed


Make text checks case-insensitive in Slack suite

To prevent failures in the utility test due to case differences, updated string comparisons to be case-insensitive in utility functions for user tasks 4, 5, 8, 12, 13, and 14 of Slack suite.

I put these changes in #28 to introduce a new benchmark minor version and have everything in one PR. Please double check that they are correct!


Force web server in desktop mode

We need a way to force using web server, but still run Flet app with desktop UI, without using flet run.
It's needed for SSO/Auth/uploads working in desktop mode.

Thank you for your attention to this issue~

There seem to be some issues...


Uploading file with spdycat

I'm trying to upload a file using multipart request, but not able to do that with spdycat.
Here's how i'm uploading file with curl:
curl -X POST -F "file=@my-file" https://example.com/upload
This is how i tried it with spdycat:
spdycat --data my-file https://example.com/upload
It does not seem to work as nginx with spdy module returns with http 400 and in logs i can see that Content-Type header is missing.
What am i doing wrong and how to achieve file upload similar to curl?

spdycat does not support multipart uploading at the moment.  It just upload the content of the given file.
The workaround is create multipart data in advance in a file and upload it with -d option.

Thanks! This works.
However, i cannot seem to use stdin as a file like this:
gzip -c foo.bar | ./spdycat --data - https://server.com
It does send something with content-length of 0 if use - as an input.

This is a bug. --data - works with file only. We have a similar fix for nghttp client (https://github.com/tatsuhiro-t/nghttp2/commit/a8a66843db98377398edf6f65d3dabe35e82b98f) and can port here.

Fix committed via 6c17426

Thanks! Using - for stdin works now! I'm gonna close this issue, although multipart uploads are not supported, but i've managed to just upload the content of the file.


Feature request: different intervals depending on last status

For some checks it may be useful to have different interval-values depending on the status of the last check. Something like:
"intervals": {
    "ok": 3600,
    "warning": 1800,
    "fail": 90,
    "unknown": 90
}

The above will perform the check once an hour normally, but will try again in 30 minutes after a warning, and keep trying every minute-and-a-half in case of failure or unexpected result. This may help admins get their dashboards back to green sooner after they've corrected the problem :)
For example, I have a check verifying expiration of SSL-certificates. It normally runs once per day. But, if it begins alerting because a certificate gets too close to expiration, we are likely to respond the same day -- having Sensu calm down automatically shortly thereafter would be nice.

Sensu uses a pub/sub model, checks target one or more Sensu clients via subscriptions. Sensu DOES NOT target individual clients, so this feature could not be applied to standard checks. Standalone checks (client execution scheduler) are not aware of check result history, this feature would require local state.
The Sensu API has /request, which can be used to trigger another check run, immediately. Exposing the API /request functionality on Uchiwa events would be pretty slick.
I am not a fan of multiple check execution intervals as a feature, as it does not align with Sensu's design and introduces scheduler complexity.

@UnitedMarsupials thanks for taking the time to raise this issue and describe your use case, but I'm closing it as this isn't a feature we're ready to consider right now.


Remove Build Output from Repo

Why is the build output in the repo?  Makes it very hard to read PRs.  Example #210.

What are the real changes?
vs
What are the build output changes (I don't care about those...)

https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/200

@spottedmahn We are using the build output so we can refer to the files while writing dev apps for testing.

Oh, interesting.
This is not a common practice.  I can't think of any other libraries that put their build output in their source repo.  I hope you guys re-evaluate 😜

This really needs to be re-opened.  There should be no build output in the src repo. I'm struggling to understand why you need to refer to these output files for dev apps in testing?

@spottedmahn we are removing /dist in the upcoming release. We are working on a strategy for /docs, and they will have to remain for some time in github.

so, there's nothing wrong with the docs unless they're auto-generated. the /dist/*.js are all TSC emitted and non-sensical from a Git perspective to be within the repo.  However, they DO need to be in any NPM or other package manager assets.
The Docs imho probably are OK - unless there is a move shift all docs and the pr/change process within the repo to docs.microsoft.com

@cicorias Sure. Yeah, we took some time since we were working on removing a legacy dependency on /dist in the test code. We already made the separation in our dev now and hence yes, we are on track.
For now we are stabilizing the comments to make the docs more relevant, but the strategy is evolving in parallel for the /docs.


Update bitwasp/bitcoin dependency

It would be great to use a newer version of bitwasp/bitcoin.

Yes @flxstn I tried to update it but there was a change in the API and it's not a simple update in composer. It's something in the TODO list ;-)

Done in #111.


ViewLocalizer can only find resources in the main assembly

When using an assembly containing embedded views and resource strings, things Just Work:tm: if it is the application assembly. A ViewLocalizer in these views finds the correct resources and strings are correctly localized.
However when using the same assembly as a class library, ViewLocalizer still looks for resources in the main assembly. It cannot be reconfigured to find resources elsewhere let alone to use different locations for different views.
Note precompiled views do not avoid issues here. IRazorPage implementations are compiled into a different assembly than string resources are placed. The associated assembly could be found by reversing the naming convention (maybe) but we also have a layering problem here: Want the localization system to work regardless of the IViewEngine implementation and the interfaces do not expose the view's Type. And, use of a Type is an implementation detail of our IViewEngine implementation.
At least for embedded views using ViewLocalizer, we need a wire-up alternative to
var embeddedProvider = new EmbeddedFileProvider(typeof(Model).GetTypeInfo().Assembly);
services
    .AddMvc()
    .AddRazorOptions(options => options.FileProviders.Add(embeddedProvider))
    .AddViewLocalization();

The alternative could be automatic -- discover and use embedded views and string resources in ApplicationParts together. (ApplicationParts are not checked for embedded views at all today.)
Or we could provide something explicit that extends AddViewLocalization e.g.
public static IMvcBuilder AddViewLocalization(
    this IMvcBuilder builder,
    Assembly assembly)

and does everything necessary. Method should be callable multiple times.
Either of the above approaches (and likely any solution) requires additional context carried through the system as well as changes in our MVC infrastructure use of a single CompositeFileProvider instance (losing information about the original location of embedded files).

Found working with sample application at dougbu/Localized.1.1-preview. Execute the Localized.1.1-preview application and the user sees everything as expected. Execute the Wrap.Localized application and strings localized using a ViewLocalizer always display in English.

This works out of the box with Razor Class libraries. Since it's our recommended pattern for sharing views via class libraries (over embedded files), really nothing to do here.


PCF - vSphere - govc:  not found

Environment:
vSphere: 6.5
PCF: 2.0.13
Concourse: 3.14.0
Pipelines: latest

Issue
When trying to upgrade OpsManager, Concourse exits with the following error:
Running deploy of OpsMgr VM task...
{
  "DiskProvisioning":"thin",
  "IPAllocationPolicy":"dhcpPolicy",
  "IPProtocol":"IPv4",
  "Name": "OpsManager-2.0.14-20180609182502",
  "NetworkMapping": [{
    "Name":"Network 1",
    "Network":"VLAN-XXXX"
  }],
  "PropertyMapping":[
    {"Key":"ip0","Value":"<IP_ADDRESS>"},
    {"Key":"netmask0","Value":"<IP_ADDRESS>"},
    {"Key":"gateway","Value":"<IP_ADDRESS>"},
    {"Key":"DNS","Value":"XXX.XXX.XXX.XXX"},
    {"Key":"ntp_servers","Value":"ntp1.XXXXXXXXX.XXX,ntp2.XXXXXXXX.XXX"},
    {"Key":"admin_password","Value":"XXXXXXXXXXXXXX"}
  ],
  "PowerOn":false,
  "InjectOvfEnv":false,
  "WaitForIP":false
}
Importing OVA of new OpsMgr VM...
Running govc import.ova -options=opsman_settings.json /tmp/build/39dbd1bf/pivnet-opsmgr/pcf-vsphere-2.0-build.314.ova
[09-06-18 18:50:17] Uploading pivotal-ops-manager-disk1.vmdk... OK
Setting CPUs on new OpsMgr VM... /CGLAB/cflab02_vms/OpsManager-2.0.14-20180609182502
Shutting down OLD OpsMgr VM... <IP_ADDRESS>
govc: CFLAB02-CG not found

Context
Now, above, CFLAB02-CG is the resource group. So far, Concourse correctly identifies a resource group and uploads correctly OpsMan VMDK (into the resource group - CFLAB02-CG).
Here is my params.yml file:
# Copyright 2017-Present Pivotal Software, Inc. All rights reserved.
#
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##  http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
#
opsman_timeout_seconds: 3600 # time to wait for new OM VM to come up
#
## Either opsman_client_id/opsman_client_secret or opsman_admin_username/opsman_admin_password needs to be specified
## If you are using opsman_admin_username/opsman_admin_password, edit opsman_client_id/opsman_client_secret to be an empty value.
## If you are using opsman_client_id/opsman_client_secret, edit opsman_admin_username/opsman_admin_password to be an empty value.
opsman_client_id: ""
opsman_client_secret: ""
opsman_admin_username: "OpsMan"
opsman_admin_password: "XXXXXXXXXXXXX"

opsman_ssh_password: "XXXXXXXXX"   # ubuntu user ssh password
opsman_major_minor_version: ^2\.0\.[0-9]+$ # Ops Manager minor version to track (e.g ^2\.0\.[0-9]+$ will track 2.0.x versions)   # Ops Manager minor version to track
opsman_domain_or_ip_address: "opsmanager.XXXX.XXXXXXXXXXXX.XXX"
opsman_passphrase: "XXXXXXXXXXXXX"
# value must be a Pivotal Network legacy token; UAA API tokens do not work currently work
pivnet_token: "XXXXXXXXXXXX"
# Do not specify with a trailing slash.
vcenter_url: "vcenter01.XXXX.XXXXXXXXXXXX.XXX"
vcenter_username: "XXXXXXXXXXXXXX"
vcenter_password: "XXXXXXXXXXXXX
vcenter_datacenter: CGLAB
vcenter_datastore: "00-SIO-CFLAB02_Persistent_01"
vcenter_insecure: true
vcenter_ca_cert:
# vCenter Cluster or Resource Pool to use to deploy Ops Manager.
# # Possible formats:
# #   cluster:       /<Data Center Name>/host/<Cluster Name>
# #   resource pool: /<Data Center Name>/host/<Cluster Name>/Resources/<Resource Pool Name>
vcenter_cluster: Zone01
vcenter_resource_pool: CFLAB02-CG
om_vm_folder: cflab02_vms
opsman_ip: <IP_ADDRESS>
netmask: <IP_ADDRESS>
gateway: <IP_ADDRESS>
dns: XXX.XXX.XXX.XXX
ntp: "ntp1.XXXXXXXXXX.XXX, ntp2.XXXXXXXXXX.XXX"
opsman_network: VLAN-XXXXX
git_private_key:
opsman_disk_type: thin # use thick or thin disk provisioning

I tried to put vcenter_resource_poolin quotes and without it, makes no difference. Always fails at that step.

Now, using ‘fly hijack’  went inside the container and viewed  opsman_settings.json
{
  "DiskProvisioning":"thin",
  "IPAllocationPolicy":"dhcpPolicy",
  "IPProtocol":"IPv4",
  "Name": "OpsManager-2.0.14-20180609182502",
  "NetworkMapping": [{
    "Name":"Network 1",
    "Network":"VLAN-XXXX"
  }],
  "PropertyMapping":[
    {"Key":"ip0","Value":"<IP_ADDRESS>"},
    {"Key":"netmask0","Value":"<IP_ADDRESS>"},
    {"Key":"gateway","Value":"<IP_ADDRESS>"},
    {"Key":"DNS","Value":"XXX.XXX.XXX.XXX"},
    {"Key":"ntp_servers","Value":"ntp1.XXX.XXXXXX.XXX,ntp2.XXX.XXXXXXX.XXX"},
    {"Key":"admin_password","Value":"XXXXXXXXXXXXXXXXXXXX"}
  ],
  "PowerOn":false,
  "InjectOvfEnv":false,
  "WaitForIP":false

}

…but I do not see any reference regarding my resource group (e.g., CFLAB02-CG)
Is this a bug ? I don't understand how come Concourse correctly identifies vSphere resource group, uploads VMDK there and then bails saying it can't find a resource group.

Answering my own question: I had to provide a full path to the resource, such as ```/datacenter/host/cluster/resources/resource_group_name. Once provided it started working. Thank you.


fix(ui): fix builder event selector label

The label and value were inverted in the new event selector.

Hey don't worry I already fixed this, also noticed the $goToPage and fixed that too 🙏🏻 thank you though


data analysis with output

hi there!
thank you for creating an open-source version of the IAT. we have used the older version of the program that was located on sourceforge and have transformed the output into an excel file and an spss file, with one participant per line. we know what each of the variables is (block, round, etc.) but we're not sure how to use this data to obtain anything other than a simple IAT score comparing reaction times.
for commercial programs, we typically use SPSS syntax that comes with the program in order to analyze the data. is there a similar algorithm available for this program?
thank you!

Has anyone updated the code in accordance with the improved scoring algorithm outlined in Greenwald, Nosek, and Banjai (2003) (located here:  http://faculty.washington.edu/agg/pdf/GB&N.JPSP.2003.pdf).


enha: add global node mode

PR Type
Enhancement

Description

Introduced a global node mode system with Leader and Follower states
Implemented NodeMode enum and related functionality in src/globals.rs
Refactored src/main.rs to use the new node mode system for miner and consensus initialization
Updated src/lib.rs to export the NodeMode enum
Improved code organization and maintainability by centralizing node mode logic

Changes walkthrough 📝
Relevant filesEnhancement

globals.rsImplement global node mode functionality

src/globals.rs
Added NodeMode enum with Leader and Follower variants  Implemented IS_LEADER atomic boolean for node mode state  Added methods to set, get, and check node mode

+41/-0

lib.rsExport NodeMode enum

src/lib.rs

Added NodeMode to public exports

+1/-0

main.rsRefactor main to use global node mode

src/main.rs
Integrated NodeMode into main application logic  Updated miner and consensus initialization to use NodeMode  Replaced direct config checks with GlobalState::get_node_mode()

+24/-17

💡 PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

/describe

/describe


Cannot run main.py in /datagen/img_generation

when running the main.py file I het this error
Traceback (most recent call last):
  File "main.py", line 15, in <module>
    pose_sampler = PoseSampler(num_samples, dataset_path)
  File "/home/momo/Desktop/GP/datagen/img_generator/PoseSampler.py", line 55, in __init__
    self.configureEnvironment()
  File "/home/momo/Desktop/GP/datagen/img_generator/PoseSampler.py", line 88, in configureEnvironment
    self.tgt_name = self.client.simSpawnObject("gate", "RedGate16x16", Pose(position_val=Vector3r(0,0,15)), 1.5)
  File "/home/momo/miniconda3/envs/GP/lib/python3.7/site-packages/airsim/client.py", line 471, in simSpawnObject
    return self.client.call('simSpawnObject', object_name, asset_name, pose, scale, physics_enabled)
  File "/home/momo/miniconda3/envs/GP/lib/python3.7/site-packages/msgpackrpc/session.py", line 41, in call
    return self.send_request(method, args).get()
  File "/home/momo/miniconda3/envs/GP/lib/python3.7/site-packages/msgpackrpc/future.py", line 45, in get
    raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: function 'simSpawnObject' (called with 5 arg(s)) threw an exception. The exception is not derived from std::exception. No further information available.

I am using:
airsim-1.6.0
msgpack-python-0.5.6
msgpack-rpc-python-0.4.1
numpy-1.21.5
opencv-contrib-python-<IP_ADDRESS>
tornado-4.5.3
on KDE neon
The airsim binaries on google drive run fine.

I found out that I had an older version of the code.
The master branch version worked.


Update links to repository

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

My department restructured their gitlab and with that the link to the eodie repository changed and had to be updated

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Bug: Meltano UI fails to load schedules

Looks like a bug in controllers/orchestration.py.
  File "/usr/local/lib/python3.9/site-packages/meltano/api/controllers/orchestrations.py", line 497, in get_pipeline_schedules
    if schedule.job and jobs_in_list:
AttributeError: 'dict' object has no attribute 'job'

(poe-UJy2mlGs-py3.8) aj@ajs-macbook-pro aj-dataops-personal % docker run -v "$(pwd)":/project -w /project -p 5000:5000 meltano/meltano:SHA-2a4d5aea01443cdb161de1c7af9873d2c7189d1b ui
2022-06-10T20:53:44.598916Z [info     ] Environment 'dev' is active
2022-06-10T20:53:45.437809Z [info     ] All workers started.
[2022-06-10 20:53:46,191] [9|MainThread|gunicorn.error] [INFO] Starting gunicorn 19.10.0
[2022-06-10 20:53:46,197] [9|MainThread|gunicorn.error] [INFO] Listening at: http://<IP_ADDRESS>:5000 (9)
[2022-06-10 20:53:46,197] [9|MainThread|gunicorn.error] [INFO] Using worker: sync
/usr/local/lib/python3.9/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, *args, **kwargs)
[2022-06-10 20:53:46,202] [10|MainThread|gunicorn.error] [INFO] Booting worker with pid: 10
[2022-06-10 20:53:46,299] [11|MainThread|gunicorn.error] [INFO] Booting worker with pid: 11
[2022-06-10 20:53:46,342] [12|MainThread|gunicorn.error] [INFO] Booting worker with pid: 12
[2022-06-10 20:53:46,369] [13|MainThread|gunicorn.error] [INFO] Booting worker with pid: 13
Meltano UI is now available at http://localhost:5000
2022-06-10T20:53:52.973947Z [error    ] Exception on /api/v1/orchestrations/pipeline-schedules [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask_restful/__init__.py", line 271, in error_router
    return original_handler(e)
  File "/usr/local/lib/python3.9/site-packages/flask_restful/__init__.py", line 271, in error_router
    return original_handler(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/site-packages/meltano/api/controllers/orchestrations.py", line 497, in get_pipeline_schedules
    if schedule.job and jobs_in_list:
AttributeError: 'dict' object has no attribute 'job'

Context:
This occured on my personal dataops project: https://github.com/aaronsteers/aj-dataops-personal/blob/main/meltano.yml
I was testing the docker image when I discovered this.
Commenting out my schedules: entry resolved the issue.

Hello,
This is actually a reason we are not migrating to Meltano2.0
Even by using the documentation and creating the schedules and jobs, we can't make it work.
I also tried to add the job flag in my different schedules, but it didn't succeed.


Missing samples_descend.txt file of Full Tree?

The “samples_descendants.txt” file that downloads upon clicking Download All Descendants seems to be the same file whether I select Full Tree or Public Tree.
The first listed nodes from the two files are the same.
Full Tree:

Public Tree:

Also, I could not find Full Tree recombinant nodes on any of the two samples_descendants.txt files, but I can find Public Tree recombinant nodes on both of them.
Can the samples_descendants.txt file for the Full Tree be made downloadable? I was hoping to parse it using nodes from its matching final_recombinants_YYYY-MM-DD.txt file.

Hi @fgmp.  Sure, thank you for pointing out this issue, it should be fixed now with the latest update and you can download the full tree descendants by clicking the "Download All Descendants" button on the "Full Tree" tab.  Please feel free to let us know if you experience any issues with this, or have any other feature requests you would like to see.  Thank you!


feature: Extraction of the fit model and initialization of the Spark ML transformer with already available fit models

Feature Request

The model created upon calling the fit method on the pipelines should be transferred back to the Manager within the AlgorithmExecution object (which is in the AlgorithmExecutionResult) The fit_model attribute should be typed and implemented accordingly.
After receiving an AlgorithmExecutionRequest, if the fit_model is populated within the AlgorihtmExecution then the training should start on top of this already available fit model.

Implemented.


Add search support for Microsoft Fluent-Icons font

Mapping JSON can be found here:
https://github.com/microsoft/fluentui-system-icons/tree/master/fonts
(at some point this should be superseded by #145 but until then we should add this font to the search database)

Handled by #145


Need to specify group ID to group/workers

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "tutorial-cli-needs-worker-id" git@github.com:docker/infrakit.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.


Deno build

Full Deno build for JSPM Generator.

Landed in https://github.com/jspm/generator/pull/30 pending release.


Added layer diagram for embedded-hal use

Signed-off-by: Daniel Egger<EMAIL_ADDRESS>

@jamesmunns How about this?

CC: #65

@therealprof a couple thoughts, mostly about the diagram:

Do you want to include board support crates in the stack?
Additionally with drivers, you might want to include the difference between peripheral drivers and external hardware drivers, as I think peripheral drivers will be below the HAL line, and ext HW drivers are above the HAL line
Do you want to mention libraries/crates that are not specifically hardware related? For example something from the no_std crate list, like menu or smoltcp?

I see these as below the application, but above the embedded-hal line (usually)

Do you want to include board support crates in the stack?

Sure, will do.

Additionally with drivers, you might want to include the difference between peripheral drivers and external hardware drivers, as I think peripheral drivers will be below the HAL line, and ext HW drivers are above the HAL line

The situation here is a bit more tricky. We have drivers on both sides but also drivers which basically use a HAL impl and provide another HAL impl (like I2C multiplexers). Not sure how to express that.

Do you want to mention libraries/crates that are not specifically hardware related? For example something from the no_std crate list, like menu or smoltcp?
I see these as below the application, but above the embedded-hal line (usually)

No, not really. An application will usually use additional crates which are completely independent of what we're trying to express here.
Also I think we should be careful not to overload the picture since there're a lot more variants and we cannot really show them all. I think the diagram should convey the basic idea and not suggest it is required to be done that way.

@jamesmunns @thejpster Updated diagram. Let me know what you think.

LGTM

Looking good, will you approve and bors it if you are happy with it @jamesmunns ?

Yup, looks good!
bors r+


Need a session to get a JWT

Hello =)
First of all, apologies for my bad English, and thanks about such a wonderful module that waterlock is, you might rename it 'wonderlock' =)
I've been wondering one thing, and I feel like I'm the only one to do, so I came here just to ask it.
Is that possible, with Waterlock, to "authenticate" (true security meaning, like "proving I'm the one I pretend to"), and aquiring a JWT on the same process, without going through a session ?
I mean, I've been up to create user, login, and get a JWT, but I can't see the point of using JWT if it must be aquired via a session (I might be wrong, though).
I've been reading https://github.com/waterlock/waterlock/issues/23 and https://github.com/waterlock/waterlock/issues/39 but nobody asked the question this way, so...
Thanks =)

Yeh, this library would be a lot more useful if you didn't need a session to acquire a JWT.

+1

also see #41

see https://github.com/waterlock/waterlock/releases/tag/v0.1.0

I'm guessing includeUserInJwtResponse fixes this? Feel free to re-open if I'm wrong :)


Loading a CPM Avatar in a Singleplayer World with Vivecraft causes crashing issues.

This is just something I've deduced from a Modpack. People who made the modpack said to report it here. Here's the crash log.
crash-2023-10-26_18.23.59-client.txt

Update ViveCraft


http basic auth example

HTTP basic auth works with https://github.com/http-rs/http-types/pull/252; adding this as a WIP demo for now in case anyone wants to try it out. Probably shouldn't merge this though.

Talk is over; closing as well


Update for latest GitHub pages

This updates DOCter for the latest GitHub pages changes.

replace pygments with rouge for syntax highlighting
update Gemfile.lock

Review
@Scotchester or @contolini

This should fix #37.

Tested locally and working great. :+1:

Thanks @Scotchester!


average_temperature metric should only exclude cold sensors

As reported on discord

Verified with 22.11 build commit 6d5f6a48
customer shared sensor data matches current algorithm


Bit field implementation

Bit field implementation
Hello everyone,
From what I see it is not possible to set up a bit field when generating code. Especially since the int_size option of the .options could be used for this functionality.
Could a future implementation of this feature be realized?
Example of implementation
.proto
syntax = "proto2";

message Example{
	message SplittedValue{
		required uint32 value1 = 1; // uint8_t (size = 2 bits)
		required uint32 value2 = 2; // uint8_t (size = 3 bits)
		required uint32 value3 = 3; // uint8_t (size = 3 bits)
	}
	oneof Example_union{
		uint32 globalvalue = 1; // uint8_t
		SplittedValue value = 2;
	}
}

.options
Example.SplittedValue.value1 int_size:2
Example.SplittedValue.value2 int_size:3
Example.SplittedValue.value3 int_size:3
Example.globalvalue int_size:8

Output structure
/* Struct definitions */
typedef  struct  _Example_SplittedValue {
	uint8_t value1 : 2;
	uint8_t value2 : 3;
	uint8_t value3 : 3;
} Example_SplittedValue;

typedef  struct  _Example {
	pb_size_t which_union;
	union {
		uint8_t globalvalue;
		Example_SplittedValue value;
	} Example_union;
} Example;

There is no standard on how the bit fields are represented in memory, so it would be quite difficult to represent this in the descriptors for the encoder / decoder.
I'm not saying it is impossible, but it appears very difficult to do with the current architecture of nanopb, and in my opinion the benefit of saving memory would be quite small.


font request: generic linux

How about a simple penguin for generic linux?

For reference:
http://fontawesome.io/icon/linux/


Merge mojos pull and start

start without pull is not possible. So merge this goals.

will not be implemented


[DevToBridge] Allow subsribe to username

Hi
I needed a way to subscribe to user with dev.to bridge and decided to code this quickly.
I hope I don't miss something...

https://dev.to/feed/n3wt0n

Hi @dvikan
Thanks for pointing the rss feed available on dev.to but I find Rss bridge's version more useful:

you can choose to get full articles or not (dev.to rss feed has only full articles)
you get all the feed formats rss-bridge proposes, in particular json which is very convenient to be parsed by scrappers for example

And also, Youtube has its own RSS feeds, but Rss Bridge has its own bridge for youtube ... which is nice because the bridge brings some improvements over the youtube rss feeds.


Regarding to global variable in TS

Hi, Jeremy.
I looked around and exercised your great work. And I have a question about current ts2hx.
I don't know if here is proper place to ask some question to you.
My question is about the global variable in typescript.
In case where global variable exists in typescript, I found error on transpiling to haxe.
Is this remaining work in this project?

Hi Jaeman,
There are probably many cases that ts2hx doesn't handle yet but please provide an example of typescript file where you are having this issue and I will hopefully be able to update ts2hx to handle it. Thanks for the feedback!

Actually, I want to transpile TypeScript file to C++ file like follows.
=== TypeScript: test.ts ===
class Foo_class {
public prop2:number = 0;
public foo() {
for (var i = 0, len = 12; i < len; i++) {
console.log("for iteration #"+i);
}
}

constructor(public init:number) {
    this.prop2 = init;
}

}
class ExecutableFileName {
static main():void {
var sample_instance = new Foo_class(5);
sample_instance.foo();
console.log("end");
}
}
cmd: sudo ts2hx test.ts > ExecutableFileName.hx
=== Haxe: ExecutableFileName.hx ===
package;
class Foo_class {
public var prop2:Float = 0;

public function foo() {
    var i:Int = 0, len:Int = 12;
    while (i < len) {
        trace("for iteration #" + i);
        i++;
    }
}

public var init:Float;

public function new(init:Float) {
    this.init = init;
    this.prop2 = init;
}

}
class ExecutableFileName {
static public function main():Void {
    var sample_instance = new Foo_class(5);
    sample_instance.foo();
    trace("end");
}

}
cmd: haxe -main ExecutableFileName.hx -cpp Test
In above example, I could get proper cpp files and executable file with name ExecutableFileName.
However, when I added global variable to test.ts like follows, I failed to compile hax file to cpp file.
=== TypeScript: test.ts ===
var tmp:number = 1;
class Foo_class {
public prop2:number = 0;
public foo() {
console.log(tmp);
for (var i = 0, len = 12; i < len; i++) {
console.log("for iteration #"+i);
}
}

constructor(public init:number) {
    this.prop2 = init;
}

}
class ExecutableFileName {
static main():void {
var sample_instance = new Foo_class(5);
sample_instance.foo();
console.log("end");
}
}
cmd: sudo ts2hx test.ts > ExecutableFileName.hx
=== Haxe: ExecutableFileName.hx ===
package;
var tmp:Float = 1;
class Foo_class {
public var prop2:Float = 0;

public function foo() {
    trace(tmp);
    var i:Int = 0, len:Int = 12;
    while (i < len) {
        trace("for iteration #" + i);
        i++;
    }
}

public var init:Float;

public function new(init:Float) {
    this.init = init;
    this.prop2 = init;
}

}
class ExecutableFileName {
static public function main():Void {
    var sample_instance = new Foo_class(5);
    sample_instance.foo();
    trace("end");
}

}
cmd: haxe -main ExecutableFileName.hx -cpp Test
error_msg: ExecutableFileName.hx:3: characters 0-3 : Unexpected var
As I know, Hax does not support global variable but ts2hx changes "var tmp:number = 1;" to TypeScript syntax like "var tmp:Float = 1;".
I guess this is problem.
How do you think?
I am a starter of TypeScript and Haxe so that it is possible that I don't know basic knowledge on TypeScript and Hax.

I see. Ts2hx doesn't perform any check to say if the transpiled haxe code is valid or not because the haxe compiler itself can do this job. Global variable don't exist in Haxe and I don't plan to work on transpiling Typescript global variable into "something that works in Haxe".
However, you are likely to be able to do what you want by using a static property inside a class instead of using a global variable. Basically, because Haxe projects are mainly structured using classes, it is recommended to use classes in Typescript as well.

Thank you, Jeremyfa.
I will try to use static property as your commentl..: )


lxd should clear the interface volatile keys as part of Update()

Required information

Distribution: Ubuntu

Distribution version: 17.04

The output of "lxc info" or if that fails:
==========================
config:
core.https_address: '[::]:8443'
core.trust_password: true
api_extensions:

storage_zfs_remove_snapshots

container_host_shutdown_timeout

container_syscall_filtering

auth_pki

container_last_used_at

etag

patch

usb_devices

https_allowed_credentials

image_compression_algorithm

directory_manipulation

container_cpu_time

storage_zfs_use_refquota

storage_lvm_mount_options

network

profile_usedby

container_push

container_exec_recording

certificate_update

container_exec_signal_handling

gpu_devices

container_image_properties

migration_progress

id_map

network_firewall_filtering

network_routes

storage

file_delete

file_append

network_dhcp_expiry

storage_lvm_vg_rename

storage_lvm_thinpool_rename

network_vlan

image_create_aliases

container_stateless_copy
api_status: stable
api_version: "1.0"
auth: trusted
public: false
environment:
addresses:

<IP_ADDRESS>:8443
<IP_ADDRESS>:8443
<IP_ADDRESS>:8443
architectures:
x86_64
i686

driver: lxc
driver_version: 2.0.7
kernel: Linux
kernel_architecture: x86_64
kernel_version: 4.10.0-20-generic
server: lxd
server_pid: 2966
server_version: "2.12"
storage: dir
storage_version: "1"
root@LXD-QA-Server-04:~#
==========================

Issue description
When removing network interfaces via the "lxc network detach" command, the interface index presented to the container (ie: eth0, eth1, etc) does not get reset.  As a result, the static network configuration for the container is no longer valid, and the container can't get an IP address.
Steps to reproduce

Ensure no network interfaces are configured in the default profile

Launch a new Ubuntu container

Attach a new network interface via the command "lxc network attach eth0 <container_name>"

Run the command, "lxc config show <container_name> - taking note of the devices section.  Example:

devices:
eth0:
nictype: macvlan
parent: eth0
type: nic

Execute a shell inside the container and type "ip a s" - should see one interface at "eth0"

Stop the container, detach the interface, and attach a new interface:
lxc network detach eth0 <container_name>"
lxc network attach eth1 <container_name>"

Run the command, "lxc config show <container_name> - taking note of the devices section.  The device list should be correct, but the "volatile" information still shows eth0 and eth1.

Start the container again, get a shell, and type "ip a s".  This time, the interface index is eth1 instead of eth0.  Since this is the only interface configured for this device, I would expect to see eth0 only.

The same combination of events can also cause the old interface to retain its original id.  In the case above, if I remove "eth2", add eth3, then add eth2 back, the container retains the old eth2 details.
It seems the code that indexes the interfaces is not cleaning out the old values.  Thus, the container could end up with the wrong interfaces connected.
Real-world example:

We provision containers on eth0 to perform initial configs on our setup network.
Once the provisioning is done, we move the container to our production network by detaching the setup network interface and attaching the production network interface (eth0 and eth2 respectively) and applying the necessary IP addresses in the container's network configuration files.
The above scenario prevents our auto-setup scripts from working as the "eth0" interface is now "eth1".

The only way to fix this issue is to copy the container to a new container ID.  The copying process seems to fix the network index issue.

You have a point that we should try to cleanup the volatile keys better. I believe we do clean them up, but they need a container restart without any change for things to sync up.
But in your case, you really should use:
lxc network attach eth1 <container name> eth0 eth0

Which will ensure that LXD creates a device named "eth0" and have the interface name set to "eth0" in the container, this way the volatile keys aren't used to assign a non-conflicting name at all and things will be exactly the way you want it.

Thanks for the info.  I did not know about the "extended" attach command.
Also, is it possible to get the parent interface via the “lxc list” command?  In our use case, we use vxlan IDs; it would be great if we could run “lxc list <some_arg>” to see which parent network interface is used.  The only keys I could find were these:
lxc list -c abclnpst46
+--------------+--------------+----------------------+----------------------+---------+------+---------+------------+--------------------+------+
| ARCHITECTURE | STORAGE POOL |      CREATED AT      |     LAST USED AT     |  NAME   | PID  |  STATE  |    TYPE    |        IPV4        | IPV6 |
+--------------+--------------+----------------------+----------------------+---------+------+---------+------------+--------------------+------+
| x86_64       | local        | 2017/04/26 18:12 UTC | 2017/04/26 20:58 UTC | new-one | 4309 | RUNNING | PERSISTENT | <IP_ADDRESS> (eth2) |      |
+--------------+--------------+----------------------+----------------------+---------+------+---------+------------+--------------------+———+
Thanks.

On Apr 26, 2017, at 5:21 PM, Stéphane Graber<EMAIL_ADDRESS>wrote:
You have a point that we should try to cleanup the volatile keys better. I believe we do clean them up, but they need a container restart without any change for things to sync up.
But in your case, you really should use:
lxc network attach eth1  eth0 eth0
Which will ensure that LXD creates a device named "eth0" and have the interface name set to "eth0" in the container, this way the volatile keys aren't used to assign a non-conflicting name at all and things will be exactly the way you want it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@rkelleyrtp I don't think the kernel even tells us that :)
You can see what LXD configured with "lxc config show --expanded new-one" but the user in the container can rename the interface as they see fit and at that point there's not a lot of tracking we can still do.


Update 2017-11-09-osd-nyc-meetup-Recap.md

Fixed title :P

Thanks for being so patient on this @dmichl!

Thank you for taking a look and fixing everything for me @simonv3
https://github.com/simonv3, I so appreciate it!
On Wed, Dec 6, 2017 at 1:02 PM, Simon<EMAIL_ADDRESS>wrote:

Thanks for being so patient on this @dmichl https://github.com/dmichl!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/opensourcedesign/opensourcedesign.github.io/pull/161#issuecomment-349724297,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AfkgzkCw3DxAAOVbI7koprwjRE-Y1DT8ks5s9tbAgaJpZM4Q1koH
.


Hot Water Implementation faulty

Hi,
I am using your integration basically without any problems but one point -> Hot Water Temperature is just not working. It shows the wrong value and is not changeable.

It shows 35°C (Though 50 °C is set in the original Vaillant app or the control panel in my building).
If I want to change the setting I get the Error message
Cannot put https://smart.vaillant.com/mobile/api/v4/facilities/21221800202609620938024712N9/systemcontrol/v1/dhw/Control_DHW/hotwater/configuration/temperature_setpoint, status: 400, response: {"errorCode":"INVALID_PARAMS"},payload: {'temperature_setpoint': 36.5}

Hello,
35 as target temperature is normal. I read somewhere in the doc that it was the minimal target temperature. If you check your history, target temperature should change from 35 to 50 and vice versa according to your configured schedules.
What version of the integration are your running ? And also, is it multimatic or senso ?

Ah, OK I see now.
At the moment I am set to Auto (= Off at 22:26) so I see 35 °C. If I set it to manually On it changes to my desired temperature of 50 °C.

It´s a little bit confusing because when changing the value I am always changing the On value but it still displays only 35 °C because I am currently in Off Mode.
The Error message comes from the fact the .5 °C changes are not possible. So I can set it to 49 / 50 / 51 °C but not 49,5 °C. These give the Error message above and nothing happens.

Actually both 1) and 2) are not optimal. Don't know if they are possible to fix :-)
I am running the latest 1.14.0 with multimatic

It´s a little bit confusing because when changing the value I am always changing the On value but it still displays only 35 °C because I am currently in Off Mode.

Yes I agree, this is confusing. This is because of 2 things:

the target temperature changes in HA, in AUTO mode so HA can detect that the water heater is heating
There is no quick veto for water heater and the only configurable target temperature is the setpoint temperature (=target temperature when schedule is ON in AUTO mode).
-> I'm open to any suggestion for it to be more user friendly

The Error message comes from the fact the .5 °C changes are not possible. So I can set it to 49 / 50 / 51 °C but not 49,5 °C. These give the Error message above and nothing happens.

Nice catch, I'll provide a fix

version 1.14.1 is out with the fix ;)

Thank you. No Error message anymore.
Regarding 1)
For me it would be perfect if I only see the on-value (= 50°C in my case) even if I am in Off (or Auto-Off) mode, but I assume this is not possible because the control reports 35 °C.
If I understand it correctly these 35 °C do not really exist (I do not see them in the official App or wall mounted control anywhere). It´s just that the control reports the minimum number = 35 °C when in Off-Mode. But it would not even heat to these 35 °C even it the actual temperature would be lower.


Benchmarking with C++ Bindings

I'm trying to write a benchmark to evaluate performance improvement over the first iceoryx (version 2.0.5) using C++ bindings.
The benchmark consists in sampling repeatedly the time spent between the publish and the corresponding event notification on the consumer, running in two different processes (not two different threads of the same process). The iceoryx1 test uses WaitSet. After having studied the new examples of iceoryx2, I've found that the communication pattern that I would like to test is the 'event' one, so without having to explicitly poll for the new data.
I took cxx/event_multiplexing example as reference code, but I noticed that apparently I cannot send data through that mechanism, so the strategy I implemented is to first publish the data as in cxx/publish_subscribe example and then using the event communication pattern to wake up the consumer process that will poll only one time in order to get the published data (as explained in the cxx/publish_subscribe example).
The operations executed in the time lapse recorded are:
Publisher side:

the publish of the data struct
the event trigger

Subscriber side:

the wakeup from the trigger
the 1 time poll to get the data
the time needed to compute time diff with the timestamp recorded in the sent struct by the publisher

The results I got are comparable without substantial differences w.r.t the first iceoryx, as the following graphs show:

So I would like to as you if there's a smarter way to conduct the benchmark keeping the thing on two different processes and eventually if sending data through events is possible. If that's possible, an example would be very useful.
Thanks in advance,
Matteo

@CyberPoN-3 Awesome, this is a benchmark missing in iceoryx2. Would you be open to contribute the benchmark? The perfect place would be benchmarks/cxx and then I will later move the current benchmarks into benchmarks/rust.

eventually if sending data through events is possible

This will never be possible on that level. We explicitly separated the payload delivery (pubsub or request response) from the wakeup mechanism in iceoryx2. The reason for separation are

in an unseparated form the publisher will always trigger the other side with a syscall which can cause overhead
complex events are impossible to realize like: trigger other side only when 2 samples from service A and one sample from service B is delivered and its Friday

with classic iceoryx you would constantly wake up the other side, causing unnecessary scheduling overhead etc

ability to explicitly poll for data without any syscall when a higher executor instance woke you up

You realized it exactly like it was intended to be used. Yesterday we also added a more complex example describing this setup, take a look at: https://github.com/eclipse-iceoryx/iceoryx2/tree/main/examples/cxx/event_based_communication

So I would like to as you if there's a smarter way to conduct the benchmark

The benchmark we did was to measure a ping-pong setup.

You have two processes P1 and P2
A pubsub and event service S12 for communication from P1 to P2
A pubsub and event service S21 for communication from P2 to P1

For your benchmark you would do the following:

Send a sample from P1 to P2 via the publisher of S12
Send a notification from P1 to P2 via the notifier of S12
Wait on P2 until you received the notification
Send a sample from P2 to P1 via the publisher of S21
Send a notification from P2 to P1 via the notifier of S21
Wait on P1 until you received the notification
GoTo step 1

You repeat this cycle 1.000.000 times an measure the runtime T. Then you divide the measured runtime T by 1.000.000 times 2. Times 2 because you had here a two way communication, once from P1 to P2 and then back from P2 to P1.
The reason why we did this is, that the underlying system time call clock_gettime may have a huge overhead compared to the overall iceoryx2 communication. On some AMD systems, we observed a runtime of around 1us, which is hard when the latency of iceoryx2 is 100ns, so this call can increase the runtime by a factor of 10. But when you repeat the call 1.000.000 times the overhead influence of that call becomes irrelevant.

eventually if sending data through events is possible. If that's possible, an example would be very useful.

Btw. in the long-term we want to introduce something like a meta port which contains all ports and does the event notifications for you so that you can enjoy a much simpler API. But this port would have the disadvantages I described above. When ultra-low latency is not a requirement this becomes a nice alternative.

@CyberPoN-3 btw. What does the red dotted line in your graphics mean?

Hi, sorry for the late reply!

Would you be open to contribute the benchmark?

That's for sure, give me the time to get it written as good as I can, then I'll be pleased to share with you! Also feel free to edit the benchmark as you prefer, since I'm testing a use-case I need for my application, infact that 100us red dashed line was a reference I selected based on my previous benchmarks.

The benchmark we did was to measure a ping-pong setup.

I see, that's a great way to conduct the test and I agree with the strategy you adopted! In my case I would be interested also on benchmarking the readiness of the system when there is a delay between a ping-pong and the next one, in order to simulate what happens if, for example, I publish some data at a certain frequency, like 1Hz, 10Hz, 100Hz etc... That's one of the main focuses of the benchmark I'm doing. Infact, from the actual results I got, it looks like that the lower the frequency between publishes the higher the response time to wake up the subscriber process in front of an event. Before talking about numbers (actually ~50us difference from 100Hz and 1Hz), since I'm pretty new to Iceoryx, I would like to ensure myself to have done my best to get the benchmark written the fastest way possible.

The reason why we did this is, that the underlying system time call clock_gettime may have a huge overhead compared to the overall iceoryx2 communication....

That's really interesting, I'm working on a solution to benchmark the way I need, trying to exclude that huge overhead.
Thanks for sharing! Any advice would be appreciated!

@CyberPoN-3

from the actual results I got, it looks like that the lower the frequency between publishes the higher the response time to wake up the subscriber process in front of an event

What you observe here is a delay in the operating system. The lower the frequency is, the longer the receiving side sleeps, and the OS puts a process into a deeper sleep the longer it is inactive. Meaning, processes that are getting activated with a high frequency are getting more often rescheduled and are maybe in a higher priority scheduling queue and inactive process are rescheduled with a lower frequency and are moved to a low priority scheduling queue. Or maybe when there is a priority queue in place the priority of that process decreases over time - depending on the underlying scheduler of the OS.
To have a more responsive system, you could on linux compile your own kernel and configure it with the parameters:

https://cateee.net/lkddb/web-lkddb/HZ_1000.html
https://cateee.net/lkddb/web-lkddb/PREEMPT.html

This should increase the frequency with which the scheduler checks for process activities, at the slight cost of an increased CPU load.

Thank you for the advices @elfenpiff, I'll try them out!

@elfenpiff

To have a more responsive system, you could on linux compile your own kernel and configure it with the parameters:

I'm working on a NVidia Jetson Xavier AGX, actually I've finished right now checking both and it seems they are set by default as you suggested.
By executing uname -a I get: Linux tegra-ubuntu 5.10.216-tegra #1 SMP PREEMPT Wed Aug 28 01:46:00 PDT 2024 aarch64 aarch64 aarch64 GNU/Linux
In order to determine the timer interrupt frequency I followed that guide that gives a small test to unveil the setting (since I don't have a /boot/config- file to read on the NVidia Jetson...) and its result is:
kernel timer interrupt frequency is approx. 4016 Hz or higher.

The lower the frequency is, the longer the receiving side sleeps, and the OS puts a process into a deeper sleep the longer it is inactive.

Actually my setup sees publisher, subscriber and RouDi running on maximum real time priority level (99) on a round robin scheduling scheme (I used chrt for that and obv checked via htop that the priority was set correctly). Other than that I locked CPU frequency at maximum frequency for the Xavier (~2.2GHz, 8 cores) with Performance scaling governor applied and MAXN nvpmodel.  The board was completely left unload during the benchmarks and also a run varying roudi/subscriber/publisher priority in [99RT, 100CFS, 119CFS] trying all possible combinations of them has been done and the pattern showing the increasing response time with longer publish periods still shows on.
Is there anything else I can do to dig more on that?
Thanks in advance

@CyberPoN-3 I found this answer interesting: https://stackoverflow.com/a/13619750
It stated that round-robin is a suboptimal scheduling algorithm, especially when it comes to processes waiting for IO - exactly what you are doing here. Waiting for an event notification that is sent via a UNIX datagram socket.
Could you try other schedulers? Maybe deadline or CTF will provide better results - I am not an experts on schedulers so those are just wild guesses. I think I would explore schedulers and how they work to optimize the reaction time.
Maybe you are able to decrease the latency of waking up another process but it could come at a high price, higher CPU load and then the actual computation time increases which would then increase the latency of the overall system.
Waking up a process/thread that is in deep sleep always takes a bit longer, since the process and memory has to be reloaded. So the simplest way to avoid a deep sleep is a busy loop - but this will cost massive CPU time.

@elfenpiff
Thank you elfenpiff, I'll try more about schedulers in order to see the difference. As soon as I have the results I'll update you!

or CTF will provide better results

What about CTF? Actually I never heard about that and google didn't save me that time xD

@CyberPoN-3
Common Trace Format (i guess) https://diamon.org/ctf/

@CyberPoN-3

What about CTF? Actually I never heard about that and google didn't save me that time xD

My mistake, I mixed something up. I meant the CFS (completely fair scheduler)


Accesskeys ignored while editor focused

Probably related to #5253. This is about accesskeys effectively being ignored while the editor is focused. You can see on my fork of CodeMirror homepage with accesskey x on the select element for other demos - when the editor is not focused, it can be used to highlight the selector, when the editor is focused, it is ignored.
I'm trying some hacky workarounds where I focus on some element outside of the editor if there is Alt-$SomeSingleLetter on keydown, but it means I have to invoke the accesskey a second time to actually get to my destination. The commented code is stuff I've tried that doesn't seem to solve the problem.
editor.on('keydown', function (instance, event) {
  if (!event.altKey) {
    return;
  }

  if (event.key.length > 1) {
    return;
  }

  if (event.key.match(/\W/)) {
    return;
  }

  // event.codemirrorIgnore = true;

  // event.preventDefault();

  document.getElementById('SomeElement').focus();
  // document.body.dispatchEvent(new KeyboardEvent('keydown', event))
});

I'm hoping I haven't missed something obvious in the manual!

Which browser and platform are you using? On Firefox Linux, access keys work with alt+shift, and pressing alt-shift-x while the editor is focused in your demo does focus the select field. If there's some other command bound to a key combination that's also used as access key, then yes, the editor will preventDefault that event when handling the key combination.

Okay, I'm on macOS and it looks like only Safari is doing this - works fine on Firefox, Chrome, and two other Chromium browsers I tested. It looks like there might be some OS-level commands (see below) bound to Ctrl-Alt-… only in Safari.
I have another project that uses CodeMirror and the access key 1 works fine, so if you ever have a hunch on why this certain keys do this please let me know.

Slight tangent that might be related, but when I try Ctrl-Alt-N, these bright red dots get inserted in the editor:

When I copy and paste them into a plaintext editor, they appear as some kind of special invisible byte character  or <0x0e>. The shortcut creates the same character in the native RTF editor TextEdit, and this other web-based code editor (only in Safari) https://ace.c9.io .

macOS does some really strange character insertion on some key combinations. See also https://github.com/codemirror/CodeMirror/issues/2689


Update to go 1.22.2

Bumping to go 1.22 also forced us to bump our controller-gen and client-gen versions.
This, in turn, caused some changes in the generated code that is included in this PR.

Looks like you just need to update github workloads to use 1.22 and this should be good.


feature request: optional attribute array values

It would be nice if something like this could be possible:
html_build_attributes(
  [
    'id' => 'post'
    'class' => [
      'post',
      'post--no-sidebar' => ! $has_sidebar,
      'post--no-thumb'   => ! $has_thumb,
    ],
  ]
);

I mean, that it would be possible to set as an attribute value an associative array, where elements that are false, null, etc. are excluded.

Something like that works, but it's less elegant:
html_build_attributes(
  [
    'id' => 'post'
    'class' => [
      'post',
      ! $has_sidebar ? 'post--no-sidebar' : null,
      ! $has_thumb ? 'post--no-thumb' : null
    ],
  ]
);

I have been planning a rewrite of the PHP library based on the JS package I recently drafted: mcaskill/js-html-build-attributes. Hopefully I'll get it implemented soon.


docs(faq): clarify browser support

The info about supported browsers is taking from the Travis tasks.
/cc @petebacondarwin

Two small changes. Otherwise ready to merge. Good job @Narretz

:thumbsup:


[RESOLVED] High ICMP ping response time

Problem started at 07:48:29 on 2023.08.10
Problem name: High ICMP ping response time
Host: HP_iLO
Severity: Warning
Operational data: Value: 464ms
Original problem ID: 35217
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23268&eventid=35217

Problem has been resolved in 5m 0s at 07:53:29 on 2023.08.10
Problem name: High ICMP ping response time
Host: HP_iLO
Severity: Warning
Original problem ID: 35217


chore: add Relative CI to monitor the bundle size

Relative CI does “In-depth bundle analysis and monitoring” and could help us to keep an eye on our bundle size.
More and more users install our packages, and their users probably download the bundle probably a million times already. I think we should be careful with adding more dependencies, and should actively look for ways to reduce the bundle size.
Once the integration works, there are a few possibilities. I’m mostly looking forward to an automated PR comments with the bundle size changes. What I’ve configured for testing purposes:

New dependencies require approval
Duplicate dependencies, require approval.
If the bundle grows by more than 10 kb, require approval.
If the bundle grows by more than 2 %, the GitHub check will fail.
If the bundle grows by less than 2 %, or even shrinks, the GitHub check will be green.

Probably need to fine tune/deactive some of them eventually.
BTW it’s free for open source projects

Yeah, because the bundle size increased from 0 to 1.8mb. ;) We can ignore it for this PR.


Icons on the homepage not working

The icon font isn't loading and thus the icons are not showing up:

Whoopsie, it works locally but that's because fonts/ is being ignored in .gitignore. I'll fix that. Related to https://github.com/cfpb/capital-framework/issues/176.

This still isn't working for me. :frowning:


activity.username returning None

Heya! Today I've been working on checking if a user has set a variable, rather than the script.
But it seems to just return None, whether the user or the script set the variable.
Here's a simplified example:
import scratchattach as sa

id = "<id>"
user = "<username>"
project = "<projectid>"

session = sa.login_by_id(id, username=user)
cloud = session.connect_cloud(project)
events = cloud.events()

@events.event
def on_set(activity):
    test = activity.username, activity.user
    print(test)
events.start()

And here's the output, no matter who sets it:
(None, None)

Have I done something wrong, or is this broken?

During normal events, usernames are not collected. (This is due to Scratch specifications.)
If you want to access your username frequently, Use cloudlogevent.
events = cloud.events(use_logs=True)

Thank you so much for the quick reply <3
I'll adjust my script accordingly!

What are you making?

What are you making?

https://github.com/Fox595676/scratch2bash
As the name aptly suggests, this is Bash in Scratch!

Maybe this should be added to the docs
Fox Woodbury @.***> schrieb am Sa., 14. Dez. 2024,
02:56:

What are you making?
https://github.com/Fox595676/scratch2bash
As the name aptly suggests, this is Bash in Scratch!
—
Reply to this email directly, view it on GitHub
https://github.com/TimMcCool/scratchattach/issues/297#issuecomment-2542657011,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATCKMZQ4HOUEWCUIKBCJMZD2FOF4BAVCNFSM6AAAAABTSZ6OISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBSGY2TOMBRGE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Removal of API's Marked for 10.0.0 Removal

This pull request removes all API's that were flagged as "To Be Removed In v10.0.0".  There are a few notes and special items to consider as part of the review of this PR, changes/suggestions/updates welcomed to ensure that we do this properly.

DotNetNuke.Library.Common.Utilities.IPathUtils The method for user folder paths is obsolete, but removing it causes a big break, i didn't remove it
DotNetNuke.Services.Scheduling.SchedulingController the method overload that was flagged as Obsolete was the wrong one
DotNetNuke.Services.Search.SearchEngine I had to make some changes to swallow fallback errors to prevent uncontrolled "not implemented" exceptions.  Not sure that is the best way to do this
DotNetNuke.Framework.JavaScriptLibraries.JavaScript - A method was removed to support things for changes, want to be sure that it isn't a risk
DotNetNuke.Providers.AspnetClientCapabilityProvider.AspnetClientCapabilityProvider - I'm not confident that the removal of the "Capabilities" property was proper, as I believe this regresses functionality.
DotNetNuke.Framework.jQuery the properties Version, UIVersion - These also should have been marked as removed and managed by the package

My apologies for the larger pull request, but I couldn't find a better way to try and make this "granular" to review/approve.

@mitchelsellers if you rebase it should fix the build issue with the GA4 connector

https://github.com/dnnsoftware/Dnn.Platform/pull/5729 needs to be merged first, right @valadas  /cc @mitchelsellers

Well I rebased, but things looked funny, I think @bdukes knows why!

#5729 needs to be merged first, right @valadas /cc @mitchelsellers

Oh, right, I thought it was already, sorry... So @mitchelsellers if you want to review/merge the other, then it should fix the build here after rebasing...

This has been rebased

Build appears to be ok now @valadas @bdukes any other items we need to adjust?

I just pushed a commit which deleted the old ContentWorkflow classes, and a couple of others marked for v10. It's good to go from my perspective.

@valadas If looks good, lets get this one in.  I have a few other things I was going to work on but they would conflict with this PR so i want to get this one in if we can.

Yes, it looks about right to me, I wanted to get the artifact from this and test a clean install and an upgrade but it looks like we have a broken install on the release/10.0.0 branch due to some dependency bumps.


README references non existent pizza, Facts and Recipes folders

In the README under the "How to Contribute" section, there are references to folders that are non existent in the repo.
The issue lies within steps 3-5 here:

Inside the repository, navigate to the pizza folder.
Choose an appropriate subfolder (e.g., Facts, Recipes) to add your content.
Create a new markdown file in the chosen subfolder.

The repo currently does not have a pizza folder or Facts and Recipes subfolders.
Suggested fix
Add in the missing folders to the repo so contributors can add in their new recipes and pizza facts. 👍
OR
If the goal is to have contributors directly edit the pizza-facts and pizza-recipes files, then I would suggest the following changes to the README.

Fork this repository to your own GitHub account.
Clone the forked repository to your local machine.
Add a new pizza fact to the pizza-facts.md file or choose to add a new recipe to the pizza-recipes.md file.
Follow the existing markdown syntax to format your content. Feel free to add headings, bullet points, images, and links to enhance your contribution.

Submit a pull request to have your contribution reviewed and considered for merging into the main repository.
Engage with other contributors and maintainers through comments and discussions.

Hope that helps 😄

@jdwilkin4 Even I was looking for the 'Pizza' folder. When will the issue be fixed?

@Sanjay-shankar
I would wait to hear back from the maintainers of the project and they will let us know when the issue will be resolved.

@jdwilkin4 Alright, Thanks.

So sorry! I restructured the project and forgot to update the readme.
I can't make the changes now, but you just need to navigate to the markdown file and add your entry to the correct file.
So you should not be creating a new markdown file.

@BekahHW Alright, Thanks for clarifying.

Hey @BekahHW !
Thank you for your quick response 😃
If you would like, I would be happy to create a PR to update the README with the updated instructions

@jdwilkin4 I would really appreciate that.


Separate OpenFL samples and tutorials

We need to clearly separate OpenFL samples (which would just show how to integrate OpenFL and various use-cases) and tutorials or lifehachks (how to add your custom aggregation function/play with assigner/get_last_model(), get_best_model() and continue training, use data splitters or different agg functions like FedOpt/FedProx/etc.) just to have them in different places to avoid user's confusion.

I also suggest listing down links to OpenFL examples and hacks as a part of the front page documentation for a more user friendly experience.

A friendly UI with certain tips n tricks to get started will definitely help the academic use-cases.


Introduce RxJS to standardise and simplify Observables

This PR includes changes from https://github.com/GoogleChrome/audion/pull/111 as diffbase.
Introduce RxJS to replace custom Observables. Using a standardised, well-tested library like RxJS brings several benefits:

Code edge cases are well tested, e.g. currently WholeGraphButton stops emitting to an initial Observer when another Observer subscribes, filter silently ignores errors and Observable completion and other edge cases are largely undefined and untested.
RxJS Observables can be composed in a declarative manner through pipe, which makes code more readable.
RxJS uses well-understood names and paradigms.

This increases the bundle size from 179k to 188k. Bundle size will decrease slightly in the future, when custom Observable implementation is removed.
Diff for refactored WholeGraphButton logic:
- export class WholeGraphButton {
-   constructor() {
-     // ...
-     this._clickNext = null;
-     this._clickObserver = new Observer((onNext) => {
-       this._clickNext = onNext;
-       return () => {
-         this._clickNext = null;
-       };
-     });
-     this.click = this.click.bind(this);
-   }
-
-   observe(onNext, onComplete, onError) {
-     return this._clickObserver.observe(() => {
-       onNext({event: 'resizeView'});
-     });
-   }
-
-   click() {
-     if (this._clickNext) {
-       this._clickNext();
-     }
-   }
-
-   render() {
-     // ...
-     this.view.addEventListener('click', this.click);
-     // ...
-   }
- }
+ export class WholeGraphButton {
+   readonly click$ = fromEvent(this.view, 'click');
+   // ...
+ }
=
= // Usage:
- wholeGraphButton.observe(() => /* ... */);
+ wholeGraphButton.click$.subscribe(() => /* ... *./);

Diff for refactored panel worker logic:
- /** @type {Utils.Observer<PanelMessage>} */
- const receiver = observeMessageEvents(self);
+ const messages$ = fromEvent<PanelMessage>(self, 'message').pipe(
+   map((message) => message.data),
+ );

- let layoutOptions = {rankdir: 'LR'};
- const graphContextMessageFilterObserver = new Observer((onNext, ...args) => {
-   return receiver.observe((data) => {
-     if ('layoutOptions' in data) {
-       layoutOptions = data.layoutOptions;
-     } else {
-       onNext(data.graphContext);
-     }
-   }, ...args);
- });
+ const layoutOptions$: Observable<dagre.GraphLabel> = messages$.pipe(
+   filter((msg): msg is LayoutOptionsMessage => 'layoutOptions' in msg),
+   map((message) => message.layoutOptions),
+   startWith({rankdir: 'LR'}),
+ );

- const deserializedObserver = Observer.transform(
-   graphContextMessageFilterObserver,
-   deserializeGraphContext,
- );
-
- const receiverThrottle = Observer.throttle(deserializedObserver, {
-   key: (message) => message.id,
- });
-
- const updateGraph = Observer.transform(receiverThrottle, (context) => {
-   if (context.context && context.graph) {
-     context.graph.setGraph(layoutOptions);
-     dagre.layout(context.graph);
-   }
-   return context;
- });
-
- const serializedGraph = Observer.transform(updateGraph, serializeGraphContext);
-
- postObservations(serializedGraph, self);
+ messages$
+   .pipe(
+     filter((msg): msg is GraphContextMessage => 'graphContext' in msg),
+     throttleTime(16),
+     map((message) => deserializeGraphContext(message.graphContext)),
+     withLatestFrom(layoutOptions$),
+     map(([context, layoutOptions]) => {
+       if (context.context && context.graph) {
+         context.graph.setGraph(layoutOptions);
+         dagre.layout(context.graph);
+       }
+       return context;
+     }),
+     map(serializeGraphContext),
+   )
+   .subscribe((context) => {
+     self.postMessage(context);
+   });

Thanks! I'll review this once we have #111 merged.

Merged #111 and rebased this PR. PTAL.

You can ignore my comment above. The PR description explains everything I needed to know. LGTM.

What's the level of maintenance of RxJS?

I've been using RxJS for about a year in https://github.com/google/grr and encountered no maintenance churn. The API seems stable, conforms to semver, and upgrading from v6 to v7 was unproblematic. For the 3-year old v6, rxjs still pushed a new release this year, so the maintenance cycles seem acceptable.


[zh-cn]sync production-environment/_index.md

content/zh-cn/docs/setup/production-environment/_index.md

/approve