Camera rotation resets after I release right gamepad joystick

Hi,
I am using aframe-extras v4.0.3, Aframe 0.8.2 and have tested it on Chrome 66, Firefox 59, Edge 41 on Windows 8 and Ubuntu using Red Gear gamepad.
The problem is camera rotation resets to 0 0 0 after I release the joystick. I rotates well while I have joystick pressed in any direction.
I am using movement-controls component on rig with camera as its child as:
<a-entity id="rig" movement-controls>
  <a-camera position="0 1.6 0" >
    <a-entity cursor position="0 0 -1" geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03" material="color: black; shader: flat"></a-entity>
  </a-camera>
</a-entity>

Test code https://pastebin.com/TfVUJBP5
Thanks (sorry for a lot of bug reports recently)

Having this same issue in all versions of 4.*.* with a gamepad. So far only texted with Xbox 360 controller. Mouse and keyboard seem to work fine.
There's another issue (#234) where you can basically roll your head between your legs and back around again. Haha. I'd like to see that in 3rd person. I'm not sure if that's related.
Both of these issues can be seen here: https://codepen.io/dansinni/pen/odLKMQ
Thanks, and keep up the excellent work, @donmccurdy.


Does the expression package support the size ConditionExpression ?

According to the dynamoDB documentation, there is a size operator that we can in a Condition Expression:
I haven't seen any trace of it in the package, is it supported ?

Any updates on that?


Live Reload is not Working in case of  tag in html

I'm submitting an issue regarding the live reload
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Other:
Current behavior
It is not reloading itself, I have to reload the page through reload button, in the case when I am using
frameset tag in HTML.
Expected behavior
It has to live reload when I save a file, and this is why I have installed this extension in vs code.
Environment
HTML
Browser:

[X] Chrome (desktop) : Version 90.0.4430.93 (Official Build) (64-bit)
[ ] Firefox version XX

For Tooling issues:

Live Server: v5.6.1
Platform: Windows
Visual Studio Code: Version: 1.53.2

## Code

Here is the code in which I'm facing this issue.

`<!DOCTYPE html>
<html lang="en">
<head>
    <frameset rows="50%,30%,20%">
        <frame src="test.html">
        <frame src="test2.html">
        <frame src="test3.html">
    </frameset>
</head>
<body>
</body>
</html>`

([Code.zip](https://github.com/ritwickdey/vscode-live-server/files/6388532/Code.zip))
(![image](https://user-images.githubusercontent.com/64619700/116333636-6b0e7a80-a7f1-11eb-9f5f-b2fc933c236e.png))

Well if I say the  tag was used in HTML 4 and not supported in HTML 5.
If you don't know than you can use  instead.
For more info see this link.

so how can i set the frame like  : 50% + 30% + 20%
previously I am using this

And it worked previously or not

And it worked previously or not

previously  i am using this.


Tests are failing on firefox with vjs6 and vjs7

Hi,
As the title says, the commands to test with video.js@6 and video.js@7 fail on firefox.

Hi @cristian-atehortua ,
Thank you for reporting this to us. Did you receive any error message from the plugin? I tested the Advanced sample  against the Firefox 60.8.0esr (64-bit) using vjs7.5.4 and the ad displayed successfully.

Maybe, I wasn't very accurate with the description. The ad is playing but the tests are failing.

Hi @cristian-atehortua,
We're already aware of this issue and the team is actively working on reviewing it. I'll get back to this thread once I have more information.

Thanks!

Hi,
I’m closing this issue because it has been inactive for more than a month. Please reopen if you still encounter this issue with the latest stable version
Thank you!


Support m3u playlists

It would be great if the app could also open and run m3u Playlists
m3u list
https://github.com/iptv-org/iptv
In order to play Playlist m3u, you need to install other player VLC kodi.
Their players also have problems with format decoding, consume more resources on the phone and have a complicated interface.

We don't have any plans to implement this (see https://github.com/google/ExoPlayer/issues/4066 for more discussion) - I will mark that as a duplicate of this (since it's on our old/deprecated issue tracker).


docs(gateway): redo and clarify Latency docs

Clarifies Latency::received's behaviour to no longer sound like it'll always be Some after having received the first heartbeat ACK.
Fixes Latency::recent documenting the reverse order
Replace "duration of the session" with "lifetime of the shard" as there's no connection to Session
Document how latencies are calculated

oh lol


Add full names to levels

It would be nice to display full, stylized names like "Getting started" instead of "intro committing". You'll need to add a parameter to the Challenge class, call it something like self.human_name. Then, go through the existing challenge and add fun/creative names to each of the levels and then output the human name of the challenge when loading it.

@TSSlade, are you planning on doing this? A lot has changed, so you'll need to make sure to start your work from ben/master. You can leave full_name() as is and just change the constructor to be __init__(self, name, human_name) and include human_name as a parameter to be accessed. You'll need to go back and change the usages of full_name() to human_name except when writing to the level file

@karywjh Does this look interesting to you?


give dug users context for missing search tiles

Some searches hide results that Dug deems irrelevant to the user. See screenshot for HIV where 13 results found, only 4 cards shown.
@mbwatson update search results text to read something like n results for "concept" (1 page) x results were removed because they do not contain sufficiently useful information.

I noticed (I think) this issue yesterday when searching for "Alzheimer".  The search claims 21 results, but only 4 show.  However, the pagination still is based on the 21, so it thinks that there should be 2 pages.
Is there a reason that we don't just say "4 results"?


Error

Our error logging picks up Cannot read property 'setChannelName' of undefined a lot.
Refers to https://github.com/cletusc/Userscript--Twitch-Chat-Emotes/blob/5fbf5076906840216590435146fc0a8034c3d3e6/src/modules/emotes.js#L208

fixed in #105


If route is named components model types are not inferred

If we have structure like:
templates/
  components/
    text.hbs
routes/
  components/
    text.ts

and the content of the route.ts:
import Route from '@ember/routing/route';

export default class ComponentsTextRoute extends Route {
 model() {
   return {
     message: 'Components Text Route',
   };
 }
}

we get the following glint error:

Anything outside of template/components folders works just fine.
I am guessing there might be some naming clash.
I can also publish repro if needed

this is an extra troll as well, because templates/components was the folder used for all component hbs files pre-Octane.
It'd be good to drop support for that pattern entirely in Glint so that this bug can be fixed.

I would be surprised if glint is the only thing that breaks when using a route named "components".
We're planning to drop support for components putting their template files into templates/components/*.hbs at ember 6.0, but before that point components very much might resolve template files there. In your example, if you happen to have a component named "text", ember will probably try to resolve your templates/components/text.hbs as its template.
It would be good to do a review across the whole stack to see what still treats templates/components as special, since those are all places that can get cleaned up at ember 6.0.


Feature overrides on imodel load not applied

Describe the bug
We are trying to apply FeatureOverrides via the EmphasizeElements api when the iModel is loaded.
However the overrides aren't applied.
If I delay the call to the EmphasizeElements api by approx 2 seconds, after model load they are correctly set.
I can see the call to addFeatureOverrides being made early in the sequence, but calling it later doesn't redraw.
We set them overrides in a sequence, so many calls with different elements are made to
this._emphasizedElements.overrideElements(elData.elements, vp, elData.color, FeatureOverrideType.ColorAndAlpha, false);
but I can see only one call to addFeatureOverrides is actually made, and subsequent overrides are not being applied.
I suspect I need some way to invalidate the view, or delay the calls, but haven't found the approriate api.
This appeared for us after moving to v3, but I cannot be certain it wasn't occuring on the previous version.
To Reproduce
Steps to reproduce the behavior:
When iModel is initially loaded, i.e. viewport.areAllTileTreesLoaded returns true
call this._emphasizedElements.overrideElements(elData.elements, vp, elData.color, FeatureOverrideType.ColorAndAlpha, false);
Expected behavior
overrides are applied.
Desktop (please complete the applicable information):

iTwin.js Version 3

Please show your code and specify what app template you used.
@kckst8 @aruniverse  wasn't there an issue with one of the react app templates recreating the viewport after initial load?

@deanmarcussen can you try upgrading @itwin/web-viewer-react to the latest version (2.0.7)? There were some fixes related to viewport rendering that may help here.

Looks like a package update resolved the issue thanks all.


Is it possible to write to WebAssembly.Memory in PHP that is exported to and read in JavaScript in parallel?

Summary
Consider
<?php
  if (isset($_GET["start"])) {
    header("Access-Control-Allow-Origin: *");
    header("Content-Type: application/octet-stream");
    echo passthru("parec -v --raw -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor");
    exit();
  }

where due to Chromium refusing to capture monitor devices when getUserMedia({audio: true}) is executed at Linux we use
php -S localhost:8000 to stream output of passthru() to Response.body (ReadableStream) from fetch() call.
let controller, signal;
const [start, stop] = document.querySelectorAll('button');
start.onclick = async e => {
  start.disabled = true;
  // set parameters as arrays for potential "infinite" input, output stream
  let { track, port } = await new AudioWorkletStream({
    latencyHint: 1,
    workletOptions: {
      numberOfInputs: 1,
      numberOfOutputs: 2,
      channelCount: 2,
      processorOptions: {
        codec: 'audio/wav',
        offset: 0,
      },
    },
  }).promise;

  console.log(track, port);
  controller = new AbortController();
  signal = controller.signal;
  fetch('http://localhost:8000?start=true', { signal })
    .then(r => r.body)
    .then(readable => {
      const reader = readable.getReader();
      reader
        .read()
        .then(function process({ value, done }) {
          if (done) {
            console.log(done);
            return;
          }
          console.log(value);
          return reader.read().then(process);
        })
        .catch(console.error);
    });
};
stop.onclick = e => {
  controller.abort();
};

Ideally we should be able to write the output from the shell script directly to a WebAssembly Memory instance, grow the shared array buffer if necessary, export that same Memory instance to JavaScript for the purpose of reading the shared memory in parallel to writing to and possible growing the single buffer, in this case, to stream audio in "real-time" using AudioWorklet, and finally flush the buffer once the stream closes.
Is this possible using the code in this repository?
Additional details
See https://github.com/WebAudio/web-audio-api-v2/issues/5#issuecomment-673831406

Why closing the issue? It starts getting fun!

@Hywan

Why closing the issue?

Some individuals and institutions do not prefer certain questions. Am not sure if writing to a single Memory instance in PHP or any other language actually solves the entire issue.
At the machine am currently testing, creating a WebAssembly.Memory() instance or SharedArrayBuffer or ArrayBuffer with bytes set to 512 * 344 * 60 * 60 (60 minutes of audio data) throws a memory allocation error, have to use 512 * 344 * 60 * 50 (50 minutes for maximum), unless create multiple Memory instances and try to potentially divide input Uint8Arrays across multiple buffers, the task becomes more complicated.
Achieved capturing data at localhost to a MediaStreamTrack. Now trying to perform signaling so that can create a WebRTC connection with localhost from any web page, similar to how am doing with dynamically setting permissions for Chromium app at  https://github.com/guest271314/captureSystemAudio/blob/master/native_messaging/file_stream/app/set_externally_connectable.js.
The question still stands, is it possible to write directly from passthru() to WebAssembly.Memory and read that same memory, (that grows when necessary without throwing RangeErrors) in JavaScript?

@Hywan

It starts getting fun!

That is the scientific state of mind that have been anticipating by asking these questions while carrying on nonetheless without waiting for answers. Current working code, where fetch() adds the element of CORS due to using localhost to get the data with passthru()
<doctype html>
  <html>
    <body>
      <button>start</button><button>stop</button>
      <script>
        if (globalThis.gc) {
          gc();
        }

        let controller, signal;
        // throws memory allocation error, use multiple Memory instances
        // const memory = new WebAssembly.Memory({initial: 8062, maximum: 9675, shared: true});
        const [start, stop] = document.querySelectorAll('button');
        start.onclick = async e => {
          class AudioWorkletProcessor {}
          class AudioWorkletNativeFileStream extends AudioWorkletProcessor {
            constructor(options) {
              super(options);
              this.byteSize = 512 * 344 * 60 * 50;
              this.memory = new Uint8Array(this.byteSize);
              Object.assign(this, options.processorOptions);
              this.port.onmessage = this.appendBuffers.bind(this);
            }
            async appendBuffers({ data: readable }) {
              Object.assign(this, { readable });
              const source = {
                write: (value, c) => {
                  if (this.totalBytes < this.byteSize) {
                    this.memory.set(value, this.readOffset);
                    this.readOffset = this.readOffset + value.buffer.byteLength;
                    this.totalBytes = this.readOffset;
                  } else {
                    console.log(
                      value.buffer.byteLength,
                      this.readOffset,
                      this.totalBytes
                    );
                  }
                  if (this.totalBytes >= (344 * 512) / 2 && !this.started) {
                    this.started = true;
                    this.port.postMessage({ started: this.started });
                  }
                },
                close() {
                  console.log('stopped');
                },
              };
              try {
                await this.readable.pipeTo(new WritableStream(source));
              } catch (e) {
                console.warn(e);
                console.log(this.writeOffset, this.totalBytes);
                this.endOfStream();
              }
            }
            endOfStream() {
              this.port.postMessage({
                ended: true,
                currentTime,
                currentFrame,
                readOffset: this.readOffset,
                readIndex: this.readIndex,
                writeOffset: this.writeOffet,
                writeIndex: this.writeIndex,
                totalBytes: this.totalBytes,
              });
            }
            process(inputs, outputs) {
              const channels = outputs.flat();
              if (
                this.writeOffset >= this.totalBytes ||
                this.totalBytes === this.byteSize
              ) {
                console.log(this);
                this.endOfStream();
                return false;
              }

              const uint8 = new Uint8Array(512);
              try {
                for (let i = 0; i < 512; i++, this.writeOffset++) {
                  if (this.writeOffset === this.byteSize) {
                    break;
                  }
                  uint8[i] = this.memory[this.cursor];
                  // ++this.writeOffset;
                }
                const uint16 = new Uint16Array(uint8.buffer);
                // based on int16ToFloat32 function at https://stackoverflow.com/a/35248852
                for (let i = 0, j = 0, n = 1; i < uint16.length; i++) {
                  const int = uint16[i];
                  // If the high bit is on, then it is a negative number, and actually counts backwards.
                  const float =
                    int >= 0x8000 ? -(0x10000 - int) / 0x8000 : int / 0x7fff;
                  // interleave
                  channels[(n = ++n % 2)][!n ? j++ : j - 1] = float;
                }
              } catch (e) {
                console.error(e);
              }

              return true;
            }
          }
          // register processor in AudioWorkletGlobalScope
          function registerProcessor(name, processorCtor) {
            return `${processorCtor};\nregisterProcessor('${name}', ${processorCtor.name});`;
          }
          const worklet = URL.createObjectURL(
            new Blob(
              [
                registerProcessor(
                  'audio-worklet-native-file-stream',
                  AudioWorkletNativeFileStream
                ),
              ],
              { type: 'text/javascript' }
            )
          );
          const ac = new AudioContext({
            latencyHint: 1,
            sampleRate: 44100,
            numberOfChannels: 2,
          });
          ac.onstatechange = e => console.log(ac.state);
          if (ac.state === 'running') {
            await ac.suspend();
          }
          await ac.audioWorklet.addModule(worklet);
          const aw = new AudioWorkletNode(
            ac,
            'audio-worklet-native-file-stream',
            {
              numberOfInputs: 1,
              numberOfOutputs: 2,
              channelCount: 2,
              processorOptions: {
                totalBytes: 0,
                cursor: 0,
                readIndex: 0,
                writeIndex: 0,
                readOffset: 0,
                writeOffset: 0,
                done: false,
                ended: false,
                started: false,
              },
            }
          );

          aw.onprocessorerror = e => {
            console.error(e);
            console.trace();
          };
          // comment MediaStream, MediaStreamTrack creation
          const msd = new MediaStreamAudioDestinationNode(ac);
          const { stream } = msd;
          const [track] = stream.getAudioTracks();
          aw.connect(msd);
          const recorder = new MediaRecorder(stream);
          recorder.ondataavailable = e =>
            console.log(URL.createObjectURL(e.data));
          aw.port.onmessage = async e => {
            console.log(e.data);
            if (
              e.data.started &&
              ac.state === 'suspended' &&
              recorder.state === 'inactive'
            ) {
              recorder.start();
              await ac.resume();
            } else if (recorder.state === 'recording') {
              track.stop();
              recorder.stop();
              aw.disconnect();
              msd.disconnect();
              await ac.close();
              console.log(track);
              gc();
            }
          };

          try {
            start.disabled = true;

            controller = new AbortController();
            signal = controller.signal;
            const { body: readable } = await fetch(
              'http://localhost:8000?start=true',
              {
                cache: 'no-store',
                signal,
              }
            );
            aw.port.postMessage(readable, [readable]);
          } catch (e) {
            console.warn(e);
          } finally {
            console.log('stream stopped');
          }
        };
        stop.onclick = e => {
          controller.abort();
          start.disabled = false;
        };
      </script>
    </body>
  </html>

Ideally, we can create a Transferable Stream directly from PHP (Go, C++, R, bash, etc.) to JavaScript where readable at
await this.readable.pipeTo(new WritableStream(source));

is STDOUT directly from native application or shell script https://bugs.chromium.org/p/chromium/issues/detail?id=1115640, however that concept requires some work to implement correctly without trying to squeeze use cases into API's that were no intended for that purpose.

To start from the base, what you're trying to do is:

Generic audio bytes from PHP on the server side
Send the audio bytes to the client
Audio bytes are received by JS
JS sends audio bytes to Wasm memory bytes

Is that correct?
You've to be careful regarding the security of all of this, but it's funny. So you don't need this php-ext-wasm extension to do that. Wasm on the server side and on the client side are two different instances, they don't talk between each others. Also, for what I understand, you've no Wasm on the PHP (server) side.
Is that corret?

To start from the base, what you're trying to do is:

Generate audio bytes from PHP on the server side
Send the audio bytes to the client
Audio bytes are received by JS
JS sends audio bytes to Wasm memory bytes

Is that correct?
You've to be careful regarding the security of all of this, but it's funny. So you don't need this php-ext-wasm extension to do that. Wasm on the server side and on the client side are two different instances, they don't talk between each others. Also, for what I understand, you've no Wasm on the PHP (server) side.
Is that correct?

No.

PHP, or any other programming language that is capable of executing the necessary code to stream raw bytes of system audio output (or the given use case) and is capable of creating WASM memory instance

Creates such a Memory instance
Exports that WASM Memory instance to JavaScript from PHP context
When user decides, commences to write the data from STDOUT to the WASM Memory instance in PHP, or any other programming language context
The WASM Memory instance grows when necessary (in this case user might decide to stream 1 minute of system audio, or 2 hours of system audio, WASM Memory growth is based on dynamic requirements of the use case)

The bytes written to WASM memory in real-time in PHP (C, bash, R, APL, Jelly, Python, Pyth, etc.) while JavaScript is reading the written bytes

The link to the Chromium bug requesting NativeTransferableStream (see https://bugs.chromium.org/p/chromium/issues/detail?id=89483; https://docs.google.com/document/d/1_KuZzg5c3pncLJPFa8SuVm23AP4tft6mzPCL5at3I9M/edit for description of Transferable Streams) takes the above described process a step further describing a ReadableStream <=> WritableStream between JavaScript in the browser and any programming language or shell at the OS.
For example, consider

// this creates a dynamic shell
// when writable writes from JavaScript that is STDIN to the program or script
const {writable, readable} = new NativeTransferableStream(options);
// this is STDOUT from the native program or shell script
const reader = readable.getReader();
reader.read().then(function processSTDOUT({value, done}) {
  if (done) {return await read.closed;}
  // do stuff with value Uint8Array which is a subarray of WASM Memory instance
  // alternatively, there could be no backing at all, just streams of STDIN and STDOUT
  // where STDOUT could then by written to a WASM Memory instance
  console.log(value); // Uint8Array(4) [116, 101, 115, 116]
  return reader.read().then(processSTDOUT);
}).catch(console.error);
// STDIN
const writer = writable.getWriter();
writer.write(`php echo "test"`);

"Security" is not an issue. Whatever code is being executed in the shell can only be performed with user permissions, similar to how Native Messaging and Native File System operate right now.

The above is description of the full context of what am trying to achieve. For this issue am trying to determine if it is even possible to create a WASM Memory instance in a given programming language outside of a JavaScript browsing context, export that single WASM Memory instance to JavaScript context, write to that shared memory in the native application or shell script, for example, raw audio bytes, grow the WASM Memory when necessary dynamically due to content length of binary data sent to STDOUT which is actually the WASM Memory, not a terminal, read that WASM Memory in JavaScript while the write is occurring.
There are two possible paths

Write data to single WASM Memory
Just stream the data without writing anything to WASM Memory, essentially a MessageChannel between native program or shell script and JavaScript in the browser that is a binary data stream from the program to JavaScript, and since no memory is stored, the pattern is truly a pass-through of raw  data

Am already able to achieve

Audio bytes are received by JS
JS sends audio bytes to Wasm memory bytes

within the limitations of WASM Memory and JavaScript implementations, at the code at https://github.com/wasmerio/php-ext-wasm/issues/121#issuecomment-674875152 by substituting, for example (3000 is arbitrary below, find the number that does not throw memory allocation error)
this.memory = new WebAssembly.Memory({initial: 3000, maximum: 3000, shared: true});
for
this.memory = new Uint8Array(this.byteSize);
though it is difficult to synchronize the write and read when AudioWorkletProcessor.process() executes between 344-384 times per second, and we need at least 512 bytes per process() call (which is synchronous) to convert raw PCM to 2 channels Float32Arrays from Uint8Arrays, hence we store at least 1/2 second of data
if (this.totalBytes >= (344 * 512) / 2 && !this.started) {
  this.started = true;
  this.port.postMessage({ started: this.started });
}

before starting audio output at JavaScript to keep the write ahead of the read.
Asked similar question at WASI repository https://github.com/WebAssembly/WASI/issues/307 where it appears interaction of WASI with JavaScript (in the browser; web platform) is off-topic.

Re "Security" all of the native applications or shell scripts that will be used in the procedure can be declared beforehand. All of the code that is to be used can be stored in a single directory which user grants read/write permissions for, similar to using Native File System, see https://github.com/guest271314/captureSystemAudio/blob/master/native_messaging/file_stream/app/captureSystemAudio.js for a version of the code that uses Native Messaging and Native File System to stream to one or more files and read the files instead of STDOUT directly
    // select app/data folder in extension directory
    const dir = await showDirectoryPicker();
    // set mode to readwrite for app/data directory
    const status = await dir.requestPermission({ mode: 'readwrite' });

Put together a minimal, verifiable, complete working example of streaming from fetch() to AudioWorkletProcessor via Native Messaging, including the observable restriction which lead to filing this issue, and those issues referenced above, specifically, RangeError being thrown, and limitations on the amount of memory that can be pre-allocated at an ArrayBuffer or SharedArrayBuffer.
Posting the code here as not infrequently crash the browser and, or the OS in the midst of ongoing experiments.
Flow chart

Create Native Messaging Chromium app (app)
At an arbitrary web page ynamically set permissions for the app using Native File System to re-write manifest.json in app/ folder by setting the property externally_connectable value
Connect to the backgound script, background.js, that passes messages between the Native Messaging host (in this case we use bash and execute PHP within the shell script) and the arbitrary web page
We do not use the Native Messaging protocol to pass STDOUT to background.js then to the web page, instead we begin PHP built-in server process, localhost, to handle the subsequent call to fetch() with AbortController set within object passed as send parameter where we read STDOUT as a ReadableStream, converting to and from JSON and Uint8Array
Create a MediaStreamAudioDestinationNode for the ability to record, perform other tasks with MediaStream, and MediaStreamTrack of live audio stream of system audio capture
Use Transferable Streams to post response.body (ReadableStream) to AudioWorkletProcessor, where we pipe the stream to WritableStream and write Uint8Arrays to a single Uint8Array pre-allocated to a set amount (344 * 512 * 60 * 60 throws cannot allocate memory, here)
Store minimal data before process() is started by resuming AudioContext
Pass message to background.js to kill PHP built-in server process
Close ReadableStreamDefaultController

Chromium Native Messaging extenstion.
app/
manifest.json
{
  // Extension ID: <id>
  "key": "<key>",
  "name": "native_messaging_stream",
  "version": "1.0",
  "manifest_version": 2,
  "description": "Capture system audio",
  "icons": {},
  "permissions": [
    "nativeMessaging", "*://localhost/"
  ],
  "app": {
    "background": {
      "scripts": [
        "background.js"
      ],
      "persistent": false
    }
  },

  "externally_connectable": {
    "matches": [
      "https://developer.mozilla.org/*",
      "http://localhost/*"
    ],
    "ids": [
      "lmkllhfhgnmbcmhdagfhejkpicehnida"
    ]
  },
  "author": "guest271314"
}

background.js
const id = 'native_messaging_stream';
let externalPort, controller, signal;

chrome.runtime.onConnectExternal.addListener(port => {
  console.log(port);
  externalPort = port;
  externalPort.onMessage.addListener(message => {
    if (message === 'start') {
      chrome.runtime.sendNativeMessage(id, {}, async _ => {
        console.log(_);
        if (chrome.runtime.lastError) {
          console.warn(chrome.runtime.lastError.message);
        }
        controller = new AbortController();
        signal = controller.signal;
        // wait until bash script completes, server starts
        for await (const _ of (async function* stream() {
          while (true) {
            try {
              if ((await fetch('http://localhost:8000', { method: 'HEAD' })).ok)
                break;
            } catch (e) {
              console.warn(e.message);
              yield;
            }
          }
        })());
        try {
          const response = await fetch('http://localhost:8000?start=true', {
            cache: 'no-store',
            mode: 'cors',
            method: 'get',
            signal
          });
          console.log(...response.headers);
          const readable = response.body;
          readable
            .pipeTo(
              new WritableStream({
                write: async value => {
                  // value is a Uint8Array, postMessage() here only supports cloning, not transfer
                  externalPort.postMessage(JSON.stringify(value));
                },
              })
            )
            .catch(err => {
              console.warn(err);
              externalPort.postMessage('done');
            });
        } catch (err) {
          console.error(err);
        }
      });
    }
    if (message === 'stop') {
      controller.abort();
      chrome.runtime.sendNativeMessage(id, {}, _ => {
        if (chrome.runtime.lastError) {
          console.warn(chrome.runtime.lastError.message);
        }
        console.log('everything should be done');
      });
    }
  });
});

set_externally_connectable.js
(async(set_externally_connectable = ["https://example.com/*"], unset_externally_connectable = true) => {
  const dir = await self.showDirectoryPicker();
  const status = await dir.requestPermission({writable: true});
  const fileHandle = await dir.getFileHandle("manifest.json", {create: false});
  const file = await fileHandle.getFile();
  const manifest_text = await file.text();
  const match_extension_id = /\/\/ Extension ID: \w{32}/;
  const [extension_id] = manifest_text.match(match_extension_id);
  let text = manifest_text.replace(match_extension_id, `"_": 0,`);
  const manifest_json = JSON.parse(text);
  manifest_json.externally_connectable.matches = unset_externally_connectable ? set_externally_connectable :
    [...manifest_json.externally_connectable.matches, ...set_externally_connectable];
  const writer = await fileHandle.createWritable({keepExistingData:false});
  await writer.write(JSON.stringify(manifest_json, null, 2).replace(/"_": 0,/, extension_id));
  return await writer.close();
})([`${location.origin}/*`]);

host/
native_messaging_stream.json ($ cp native_messaging_stream.json ~/.config/chromium/NativeMessagingHosts)
{
  "name": "native_messaging_file_stream",
  "description": "Capture system audio",
  "path": "/path/to/host/captureSystemAudio.sh",
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://<id>/"
  ],
  "author": "guest271314"
}

index.php
<?php
  if($_SERVER['REQUEST_METHOD'] == 'HEAD') {
    header('Vary: Origin');
    header("Access-Control-Allow-Origin: chrome-extension://lmkllhfhgnmbcmhdagfhejkpicehnida");
    header("Access-Control-Allow-Methods: GET, OPTIONS, HEADERS");
    header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers");
    header("X-Powered-By:");
    header("HTTP/1.1 200 OK");
    die();
  }
  if (isset($_GET["start"])) {
    header('Vary: Origin');
    header("Access-Control-Allow-Origin: chrome-extension://lmkllhfhgnmbcmhdagfhejkpicehnida");
    header("Access-Control-Allow-Methods: GET, OPTIONS, HEAD");
    header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers");
    header("Content-Type: text/plain");
    header("X-Powered-By:");
    echo passthru("parec -v --raw -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor");
    exit();
  }

captureSystemAudio.sh
#!/bin/bash
sendMessage() {
    # https://stackoverflow.com/a/24777120
    message='{"message": "ok"}'
    # Calculate the byte size of the string.
    # NOTE: This assumes that byte length is identical to the string length!
    # Do not use multibyte (unicode) characters, escape them instead, e.g.
    # message='"Some unicode character:\u1234"'
    messagelen=${#message}
    # Convert to an integer in native byte order.
    # If you see an error message in Chrome's stdout with
    # "Native Messaging host tried sending a message that is ... bytes long.",
    # then just swap the order, i.e. messagelen1 <-> messagelen4 and
    # messagelen2 <-> messagelen3
    messagelen1=$(( ($messagelen      ) & 0xFF ))
    messagelen2=$(( ($messagelen >>  8) & 0xFF ))
    messagelen3=$(( ($messagelen >> 16) & 0xFF ))
    messagelen4=$(( ($messagelen >> 24) & 0xFF ))
    # Print the message byte length followed by the actual message.
    printf "$(printf '\\x%x\\x%x\\x%x\\x%x' \
        $messagelen1 $messagelpen2 $messagelen3 $messagelen4)%s" "$message"
}

captureSystemAudio() {
  if pgrep -f php > /dev/null; then
    killall -9 php & sendMessage
  else
    php -S localhost:8000 -t /path/to/host/ & sendMessage
  fi
}
captureSystemAudio

at the arbitrary web page, in this case, MDN, where we previously set the matching URL pattern at externally_connectable for permission to communicate with the Chromium Native Messaging application
At web page
var id = 'lmkllhfhgnmbcmhdagfhejkpicehnida';
var port = chrome.runtime.connect(id);
var controller;
var readable = new ReadableStream({
  start(c) {
    return (controller = c);
  },
});
var init = false;
port.onMessage.addListener(async message => {
  if (message !== 'done') {
    if (!init) {
      init = true;
      class AudioWorkletProcessor {}
      class AudioWorkletNativeMessageStream extends AudioWorkletProcessor {
        constructor(options) {
          super(options);
          this.byteSize = 512 * 384 * 60 * 1; // 5 minutes of data
          this.memory = new Uint8Array(this.byteSize); // TODO: grow memory, dynamically
          Object.assign(this, options.processorOptions);
          this.port.onmessage = this.appendBuffers.bind(this);
        }
        async appendBuffers({ data: readable }) {
          Object.assign(this, { readable });
          const source = {
            write: (value, controller) => {
              console.log(globalThis.currentTime % 3);
              if (this.totalBytes + value.byteLength < this.byteSize) {
                this.memory.set(value, this.readOffset);
                this.readOffset = this.readOffset + value.buffer.byteLength;
                this.totalBytes = this.readOffset;
              } else {
                const last = value.subarray(0, this.byteSize - this.totalBytes);
                this.memory.set(last, this.readOffset);
                this.readOffset = this.readOffset + last.length;
                this.totalBytes = this.readOffset;
                console.log(
                  value.buffer.byteLength,
                  this.readOffset,
                  this.totalBytes
                );
                controller.close();

              }
              // await 250 milliseconds of audio data
              if (this.totalBytes >= (512 * 384) / 4 && !this.started) {
                this.started = true;
                this.port.postMessage({ started: this.started });
              }
            },
            close() {
              console.log('stopped');
            },
          };
          try {
            await this.readable.pipeTo(new WritableStream(source));
          } catch (e) {
            console.warn(e);
            console.log(this.writeOffset, this.totalBytes);
            this.endOfStream();
          }
        }
        endOfStream() {
          this.port.postMessage({
            ended: true,
            currentTime,
            currentFrame,
            readOffset: this.readOffset,
            writeOffset: this.writeOffet,
            totalBytes: this.totalBytes,
          });
        }
        process(inputs, outputs) {
          const channels = outputs.flat();
          if (
            this.writeOffset >= this.totalBytes ||
            this.totalBytes === this.byteSize
          ) {
            console.log(this);
            this.endOfStream();
            return false;
          }

          const uint8 = new Uint8Array(512);
          try {
            for (let i = 0; i < 512; i++, this.writeOffset++) {
              if (this.writeOffset === this.byteSize) {
                break;
              }
              uint8[i] = this.memory[this.writeOffset];
            }
            const uint16 = new Uint16Array(uint8.buffer);
            // https://stackoverflow.com/a/35248852
            for (let i = 0, j = 0, n = 1; i < uint16.length; i++) {
              const int = uint16[i];
              // If the high bit is on, then it is a negative number, and actually counts backwards.
              const float =
                int >= 0x8000 ? -(0x10000 - int) / 0x8000 : int / 0x7fff;
              // interleave
              channels[(n = ++n % 2)][!n ? j++ : j - 1] = float;
            }
            // console.log(channels[0]);
          } catch (e) {
            console.error(e);
          }

          return true;
        }
      }
      // register processor in AudioWorkletGlobalScope
      function registerProcessor(name, processorCtor) {
        return `${processorCtor};\nregisterProcessor('${name}', ${processorCtor.name});`;
      }
      const worklet = URL.createObjectURL(
        new Blob(
          [
            registerProcessor(
              'audio-worklet-native-message-stream',
              AudioWorkletNativeMessageStream
            ),
          ],
          { type: 'text/javascript' }
        )
      );
      const ac = new AudioContext({
        latencyHint: 1,
        sampleRate: 44100,
        numberOfChannels: 2,
      });
      ac.onstatechange = e => console.log(ac.state);
      if (ac.state === 'running') {
        await ac.suspend();
      }
      await ac.audioWorklet.addModule(worklet);
      const aw = new AudioWorkletNode(ac, 'audio-worklet-native-message-stream', {
        numberOfInputs: 1,
        numberOfOutputs: 2,
        channelCount: 2,
        processorOptions: {
          totalBytes: 0,
          readOffset: 0,
          writeOffset: 0,
          done: false,
          ended: false,
          started: false,
        },
      });

      aw.onprocessorerror = e => {
        console.error(e);
        console.trace();
      };

      const msd = new MediaStreamAudioDestinationNode(ac);
      const { stream } = msd;
      const [track] = stream.getAudioTracks();
      aw.connect(msd);
      const recorder = new MediaRecorder(stream);
      recorder.ondataavailable = e => console.log(URL.createObjectURL(e.data));
      aw.port.onmessage = async e => {
        console.log(e.data);
        if (
          e.data.started &&
          ac.state === 'suspended' &&
          recorder.state === 'inactive'
        ) {
          recorder.start();
          await ac.resume();
          setTimeout(_ => {
            port.postMessage('stop');
            controller.close();
          }, 1000 * 60 * 1);

        } else if (recorder.state === 'recording') {
          recorder.stop();
          track.stop();
          aw.disconnect();
          msd.disconnect();
          await ac.close();
          console.log(track);
          gc();
        }
      };

      aw.port.postMessage(readable, [readable]);

    }
    if (readable.locked)
      controller.enqueue(Uint8Array.from(Object.values(JSON.parse(message))));
  } else {
    if (readable.locked) controller.close();
  }
});

port.postMessage('start');

A version using WebAssembly.Memory.grow() to dynamically grow memory
during the stream. The expected result is 30 minutes of audio being written to
SharedArrayBuffer. An error is thrown at
Testing at a legacy 4.15.0-20-lowlatency 32-bit kernel attempted to grow memory to 30 minutes of data, with maximum set to 1 hour of data
An error was thrown when calling grow(1) when current offset is 177143808
before grow 177012736
after grow 177078272
before grow 177078272
after grow 177143808
before grow 177143808
e4056867-5209-4bea-8f76-a86106ab83af:75 RangeError: WebAssembly.Memory.grow(): Unable to grow instance memory.
    at Memory.grow (<anonymous>)
    at Object.write (e4056867-5209-4bea-8f76-a86106ab83af:26)
appendBuffers @ e4056867-5209-4bea-8f76-a86106ab83af:75
async function (async)
appendBuffers @ e4056867-5209-4bea-8f76-a86106ab83af:73
177111040 177139656
{ended: true, currentTime: 1004.0308390022676, currentFrame: 44277760, readOffset: 177139656, writeOffset: 177111040, …}
MediaStreamTrack {kind: "audio", id: "e0958602-f0ea-4565-9e34-f624afce7c12", label: "MediaStreamAudioDestinationNode", enabled: true, muted: false, …}
blob:https://developer.mozilla.org/f9d716ff-c65e-4ddf-b7c7-5e385d0602ec
closed

resulting in 16 minutes and 43 seconds of data being written to memory, observable at recorded audio

Asked the question if 1GB is the maximum the underlying memory can grow at 32-bit architectures at https://bugs.chromium.org/p/v8/issues/detail?id=7881.
if (globalThis.gc) gc();
var id = 'lmkllhfhgnmbcmhdagfhejkpicehnida';
var port = chrome.runtime.connect(id);
var controller;
var readable = new ReadableStream({
  start(c) {
    return (controller = c);
  },
});
var init = false;
port.onMessage.addListener(async message => {
  if (message !== 'done') {
    if (!init) {
      init = true;
      class AudioWorkletProcessor {}
      class AudioWorkletNativeMessageStream extends AudioWorkletProcessor {
        constructor(options) {
          super(options);
          this.initial = (384 * 512) / 65536; // 1 minute
          this.maximum = (384 * 512 * 60 * 60) / 65536; // 1 hour
          this.byteSize = this.maximum * 65536;
          this.memory = new WebAssembly.Memory({
            initial: this.initial,
            maximum: this.maximum,
            shared: true,
          });
          Object.assign(this, options.processorOptions);
          this.port.onmessage = this.appendBuffers.bind(this);
        }
        async appendBuffers({ data: readable }) {
          Object.assign(this, { readable });

          const source = {
            write: (value, controller) => {
              if (
                this.totalBytes + value.byteLength >
                  this.memory.buffer.byteLength &&
                this.totalBytes + value.buffer.byteLength < this.byteSize
              ) {
                console.log('before grow', this.memory.buffer.byteLength);
                this.memory.grow(1);
                console.log('after grow', this.memory.buffer.byteLength);
              }

              const uint8_sab = new Uint8Array(this.memory.buffer, this.readOffset);
              // console.log(this.totalBytes, this.totalBytes % 65536, this.totalBytes / 65536, this.memory.buffer.byteLength);
              if (this.totalBytes + value.buffer.byteLength < this.byteSize) {

                for (
                  let i = 0;
                  i < value.buffer.byteLength;
                  i++, this.readOffset++
                ) {
                  uint8_sab[this.readOffset] = value[i];
                }

                this.totalBytes = this.readOffset;
              } else {
                const lastBytes = value.subarray(0, this.byteSize - this.totalBytes);
                // const uint8 = new Uint8Array(this.memory.buffer, this.readOffset);
                for (
                  let i = 0;
                  i < lastBytes.buffer.byteLength;
                  i++, this.readOffset++
                ) {
                  uint8_sab[this.readOffset] = value[i];
                }
                this.totalBytes = this.readOffset;
                console.log(
                  value.buffer.byteLength,
                  this.readOffset,
                  this.totalBytes
                );
                this.readable.cancel();
              }
              // accumulate 250 milliseconds of data before resuming AudioContext
              if (this.totalBytes >= (512 * 384) / 4 && !this.started) {
                this.started = true;
                this.port.postMessage({ started: this.started });
              }
            },
            close() {
              console.log('stream closed');
            },
          };
          try {
            await this.readable.pipeTo(new WritableStream(source));
          } catch (e) {
            console.warn(e);
            console.log(this.writeOffset, this.totalBytes);
            this.endOfStream();
          }
        }
        endOfStream() {
          this.port.postMessage({
            ended: true,
            currentTime,
            currentFrame,
            readOffset: this.readOffset,
            writeOffset: this.writeOffset,
            totalBytes: this.totalBytes,
          });
        }
        process(inputs, outputs) {
          const channels = outputs.flat();
          if (
            this.writeOffset >= this.totalBytes ||
            this.totalBytes === this.byteSize
          ) {
            console.log(this);
            this.endOfStream();
            return false;
          }

          const uint8 = new Uint8Array(512);
          const uint8_sab = new Uint8Array(this.memory.buffer, this.writeOffset); // .slice(this.writeOffset, this.writeOffset + 512)

          try {
            for (let i = 0; i < 512; i++, this.writeOffset++) {
              if (this.writeOffset === this.byteSize) {
                break;
              }
              uint8[i] = uint8_sab[this.writeOffset];
            }

            const uint16 = new Uint16Array(uint8.buffer);
            // https://stackoverflow.com/a/35248852
            for (let i = 0, j = 0, n = 1; i < uint16.length; i++) {
              const int = uint16[i];
              // If the high bit is on, then it is a negative number, and actually counts backwards.
              const float =
                int >= 0x8000 ? -(0x10000 - int) / 0x8000 : int / 0x7fff;
              // interleave
              channels[(n = ++n % 2)][!n ? j++ : j - 1] = float;
            }
            // console.log(channels[0]);
          } catch (e) {
            console.error(e);
          }

          return true;
        }
      }
      // register processor in AudioWorkletGlobalScope
      function registerProcessor(name, processorCtor) {
        return `${processorCtor};\nregisterProcessor('${name}', ${processorCtor.name});`;
      }
      const worklet = URL.createObjectURL(
        new Blob(
          [
            registerProcessor(
              'audio-worklet-native-message-stream',
              AudioWorkletNativeMessageStream
            ),
          ],
          { type: 'text/javascript' }
        )
      );
      const ac = new AudioContext({
        latencyHint: 1,
        sampleRate: 44100,
        numberOfChannels: 2,
      });
      ac.onstatechange = e => console.log(ac.state);
      if (ac.state === 'running') {
        await ac.suspend();
      }
      await ac.audioWorklet.addModule(worklet);
      const aw = new AudioWorkletNode(
        ac,
        'audio-worklet-native-message-stream',
        {
          numberOfInputs: 1,
          numberOfOutputs: 2,
          channelCount: 2,
          processorOptions: {
            totalBytes: 0,
            readOffset: 0,
            writeOffset: 0,
            done: false,
            ended: false,
            started: false,
          },
        }
      );

      aw.onprocessorerror = e => {
        console.error(e);
        console.trace();
      };

      const msd = new MediaStreamAudioDestinationNode(ac);
      const { stream } = msd;
      const [track] = stream.getAudioTracks();
      aw.connect(msd);
      const recorder = new MediaRecorder(stream);
      recorder.ondataavailable = e => console.log(URL.createObjectURL(e.data));
      aw.port.onmessage = async e => {
        console.log(e.data);
        if (
          e.data.started &&
          ac.state === 'suspended' &&
          recorder.state === 'inactive'
        ) {
          recorder.start();
          await ac.resume();
          setTimeout(_ => {
            port.postMessage('stop');
            controller.close();
          }, 1000 * 60 * 30);
        } else if (recorder.state === 'recording') {
          recorder.stop();
          track.stop();
          aw.disconnect();
          msd.disconnect();
          await ac.close();
          console.log(track);
          gc();
        }
      };

      aw.port.postMessage(readable, [readable]);
    }
    if (readable.locked)
      controller.enqueue(Uint8Array.from(Object.values(JSON.parse(message))));
  } else {
    if (readable.locked) controller.close();
  }
});

port.postMessage('start');

Ideally, in this case, we should be able to stream directly to AudioWorkletProcessor.process() instead of writing to memory, i.e., the gist of the proposal at Chromium: Use Streams API for STDIN and STDOUT, flushing memory as we proceed.
One approach to reduce memory usage would be to write Opus audio to memory and decode to raw PCM as Float32Array values at outputs channels, which have not yet tried.

Why closing the issue? It starts getting fun!

@Hywan
One issue with WebAssembly.Memory.grow() is that eventually an exception will be thrown when memory reaches implementation maximum.
I solved the use case using existing web platform technologies https://github.com/guest271314/NativeTransferableStreams.
Thanks!

:-)


(gom-player) Package has > 5 AV detections

Chocolatey Version
1.2.0
Chocolatey License
No response
Package Version
<IP_ADDRESS>46
Current Behaviour
Package is failing Package Scanner with 6 AV detections.
Expected Behaviour
Package should either have < 5 AV detections or include a note in the description with why it would be expected to have > 5 AV detections.
Steps To Reproduce
N/A
Environment
N/A

Chocolatey Log
N/A

Anything else?
I checked the Gom Player website to see if there was anything on this and I couldn't find it.

It seems it was only that specific version that was detected with viruses, a later version that was pushed didn't trigger anything. So I'll say it is not anything to worry about, so I'll be closing the issue now.


os-freeradius: Error processing template "sites-enabled-inner-tunnel". Leads to empty file "inner-tunnel"

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[X] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[X] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
[X] The title contains the plugin to which this issue belongs

Describe the bug
EAP Radius-Authentication (for Wifi-Interface) fails with "TTLS and PAP". This worked for ~2 years with OpnSense before version 22.1.
To Reproduce
Steps to reproduce the behavior:

Install os-freeradius
Do all setup for TTLS for a WiFi-Interface (Client with Shared secrets, Certificates, User+Password etc.)
Start radius-Service
Look file /usr/local/etc/raddb/sites-available/**inner-tunnel** --> has size=0
Look into Backend-Logs (via Web-UI) and you see Error while processing OPNsense/Freeradius OPNsense/Freeradius/sites-enabled-inner-tunnel: 'collections.OrderedDict object' has no attribute 'ldap'

Expected behavior
A properly generated "inner-tunnel" file and a working EAP-Authentication with TTLS-PAP
Relevant log files
2022-03-13T15:00:46 | Error | configd.py | [a0091e7c-6524-4d52-8c23-a96e4d244358] Inline action failed with OPNsense/Freeradius OPNsense/Freeradius/sites-enabled-inner-tunnel 'collections.OrderedDict object' has no attribute 'ldap' at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/template.py", line 267, in _generate content = j2_page.render(cnf_data) File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 925, in handle_exception raise rewrite_traceback_stack(source=source) File "/usr/local/opnsense/service/modules/../templates/OPNsense/Freeradius/sites-enabled-inner-tunnel", line 158, in top-level template code {% if helpers.exists('OPNsense.freeradius.ldap.innertunnel') and OPNsense.freeradius.general.ldap.innertunnel == '1' %} File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 474, in getattr return getattr(obj, attribute) jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute 'ldap' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 506, in execute return ph_inline_actions.execute(self, inline_act_parameters) File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 51, in execute filenames = tmpl.generate(parameters) File "/usr/local/opnsense/service/modules/template.py", line 344, in generate raise render_exception File "/usr/local/opnsense/service/modules/template.py", line 335, in generate for filename in self._generate(template_name, create_directory): File "/usr/local/opnsense/service/modules/template.py", line 270, in _generate raise Exception("%s %s %s" % (module_name, template_filename, render_exception)) Exception: OPNsense/Freeradius OPNsense/Freeradius/sites-enabled-inner-tunnel 'collections.OrderedDict object' has no attribute 'ldap'
Additional context

imported a config.xml from OpnSense 21.7

Environment
OPNsense 22.1.2_1-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1m 14 Dec 2021
running on APU2

https://github.com/opnsense/plugins/pull/2881 ?

Yepp. Know idea why I didn't find it. Will close this here. Thx and Sorry

Note: applied patch from #2881 with opnsense-patch -c plugins 1354e23397812cd3d51054b715411d2c2e1f114b - it now works like a charm. Thx guys :-)


NameError: name 'your_custom_storage_is_empty' is not defined

I tried to come in into your Really nicht piece of Code, but i get following error, running this code:
http://schnippsel.de/paste.php?id=4467

This is somehow expected.
your_custom_storage_is_empty is designed to be replaced by your own custom function to retrieve/store the token given by the TV. You need to adapt the code.
PyWebOSTV is a library for communicating with the TV, it's up to you to choose what you want to do with the token, store in a file, store in a database etc ...


Listening for errors

How can one catch errors thrown by eye-js? It seems they are directly logged using console.warn but I'd like to show them to the user.
eyereasoner.n3reasoner(
    "abc",
    undefined,
    { output: 'derivations' }
)
.then((success) => console.log(success))
.catch((error) => console.log(error)); // not catching anything

Thanks for reporting; I agree that in this instance throwing errors rather than logging them would be the best behavior.
The reason for the current behavior is that under the hood SWIPL is programmed to write to stdout.err which is mapped to a console.warn. What we should be doing is hooking into the printErr event here and throwing when an error occurs.
Since this is a breaking change I'll try and release the change with https://github.com/eyereasoner/eye-js/pull/110 if I can see any notable breaking changes coming out of that PR.

I had the exact same question/request as the OP before 😄

Do you see any reason to also provide access to this error-via-logging behavior (perhaps via an options parameter).

Well, as it is now, it is easier to just report the error the same way as the output is passed, e.g. in https://reasoner.smessie.com the error is also printed to the user with no extra work for the developer. However, this should not necessarily mean that this is the best way to do. Nevertheless, having the possibility might always be nice, for example for this use case.

@jeswr maybe I'm misunderstanding something, but I'm pulling in the latest eye-js version (using https://eyereasoner.github.io/eye-js/2/latest/index.js) and errors are still being printed using console.warn:
https://n3-editor.herokuapp.com/n3/editor/s/1hgaJfON (select eye-js in dropdown below execute button)

The warn was changed to an error in v3.0.0. The link you have points to the latest in the v2.x.x version range.
So https://eyereasoner.github.io/eye-js/3/latest/index.js or https://eyereasoner.github.io/eye-js/latest/index.js will work.
I recommend the first one so your app doesn't suddenly break when we make a new major version.


CLI DEBUG NodeJS: environment variables added in the .env file are concatenated during debugging (since 1.

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.82.2,  1.82.1, 1.82.0
OS Version: win 10
language: nodejs
it worked perfectly before the last updates
works fine under 1.81.1 and below

Steps to Reproduce:

create a nodejs project
add .launch configuration
{
"name": "Node: test:debug",
"port": 9229,
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"envFile": "${workspaceFolder}/.env"
},
add .env file: with some variables in .env and .bash_profile
FOO_BAR=fooBar
start debug, with cli
node_modules/env-cmd/bin/env-cmd.js node_modules/mocha/bin/mocha.js -c --exit --recursive test/foobar.spec.js --inspect-brk=localhost:9229
and inspect process.env.FOO_BAR
expect: process.env.FOO_BAR=fooBar
actual: process.env.FOO_BAR=fooBarfooBar

But It works fine when I run debuging from vscode, since env variables will be read from bash_profile

It works when I remove "envFile": "${workspaceFolder}/.env"
The env variables will be picked from bash_profile and will ,not be concatenated
Is there any bug ?

Kk

https://github.com/microsoft/vscode/issues/193551#issuecomment-1728013182

Fixed in https://github.com/microsoft/vscode-js-debug/pull/1832

@connor4312
I have the followin version of ms-vscode.js-debug-nightly 2023.10.2317
Last updated => 2023-10-24, 13:36:13
Identifier => ms-vscode.js-debug-nightly
Version: 1.84.0-insider
Commit: 7dff07893ac160244db210e574eccc05f1cba2cb
Date: 2023-10-24T05:44:16.118Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 23.0.0
However I can still see actual: process.env.FOO_BAR=fooBarfooBar

I'm not able to reproduce that @DonJayamanne. Can you please collect a log file?
/jsDebugLogs

Please collect trace logs using the following instructions:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.
⚠ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to<EMAIL_ADDRESS>

vscode-debugadapter-d9375233.json.gz

It appears you are still using js-debug stable. Please follow the steps here to enable the nightly extension: https://github.com/microsoft/vscode-js-debug#nightly-extension The version will also be bumped in tomorrow's Insiders
Closing for verification.


Add feature of 0.10.0

Ah nice @LucasColas thanks for this. I'll use this branch to release the official 0.10.0 that's been in alpha. There's a few spots that have to change but I'll loop you in so that you can have that knowledge too

Here's the PR with your wording: https://github.com/SirRender00/texasholdem/pull/205

You could have merged it...


crash at start

i tried with latest 4.16 and with 4.15 version but even after successfull installation BCU wont start..
portatble version result the same..
i am on winows 8.1.
folllowing details i can get for crash
Problem signature:
Problem Event Name:	CLR20r3
Problem Signature 01:	BCUninstaller.exe
Problem Signature 02:	<IP_ADDRESS>993
Problem Signature 03:	5e2ca792
Problem Signature 04:	System.Configuration
Problem Signature 05:	4.8.3761.0
Problem Signature 06:	5c9c7002
Problem Signature 07:	28f
Problem Signature 08:	28
Problem Signature 09:	System.TypeInitialization
OS Version:	6.3.96<IP_ADDRESS>.256.48
Locale ID:	1033
Additional Information 1:	6cd4
Additional Information 2:	6cd458e8d3a8156eab014cd5e8b92198
Additional Information 3:	0439
Additional Information 4:	0439a291985b7c7aef45e679cccb41e0

I'll need more details to fix this, at least a stack trace.
I'm currently porting BCU to .NET 5 and modernising parts of it, so your issue could be fixed by this in the next version. I'll close the issue for now, and if you still get the crash with the new version when it comes out, reopen this issue or start a new one.


transfer leader too slow when inject one of tikv io delay with “evict-slow-trend-scheduler” or “evict-slow-store-scheduler”

Bug Report

What version of TiKV are you using?
./pd-server -V
Release Version: v7.6.0-alpha
Edition: Community
Git Commit Hash: 744e51d33acf6132b7a741486648ae8bb8ce9bba
Git Branch: heads/refs/tags/v7.6.0-alpha
UTC Build Time:  2023-10-27 11:36:01
2023-10-30T19:27:26.200+0800
What operating system and CPU are you using?
8c/32g
Steps to reproduce
1、run tpcc with 2000 warehouse and 32 threads
2、schedule add evict-slow-trend-scheduler
3、inject one of tikv io delay 50ms
What did you expect?
qps can recover within 5mins
What did happened?
1、qps drop during one of tikv io delay

2、transfer leader too slow

Root cause：too much cost on transferring leader, resulting in too-long scheduling.
Referring:

PD scheduler details:

PD logging on slow transferring leaders:

FYI, in general, in synchronous I/O mode (when store-io-pool-size is set to 0), the slowness in data transfer is often caused by the Raftstore leader being stuck in writing previous Raft logs. This leads to a delay in processing the "transfer leader" message until the preceding writes have been flushed to disk. The duration of this delay, whether it is long or short, depends on the number of Raft logs waiting in the Raftstore's queue to be written at that moment.

Async IO can help this issue. @LykxSassinator


Revert "bump version to 0.18.1; semver-trick scripts and keys"

Reverts rust-bitcoin/rust-bitcoin#325

(Not quite a revert because I changed the version to 0.18.2 rather than back to 0.18.0.)

I checked the only diff with the 0.18.0 tag is the 0.18.0->0.18.2 bump


2nd Capstone project review

https://github.com/users/MattGomb/projects/2

Hi Team, 👋🏻👋🏻
Good job so far! 🔥😊🙏🏻🚀💯💪🏻
There are some issues that you still need to work on to go to the next project but you are almost there!

Highlights

Great job on set up the kanban 💪🏻

Required Changes ♻
Check the comments under the review.

[ ] I think you forget to add information in your issue to tell who is working on this project so kindly according to the requirements kindly add it in your issue. 💪🏻💯

[ ] I think you forget to assign the tasks to each member so please assign it between you and your partner in your kanban board

You can do it through the issues just press on assigners and select the student 💯💪🏻🚀🙏🏻

Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Hi!
Thanks for the comments, you are completely right, i forgot to add these things, i was in a hurry to join a call..! :)
All issues are now fixed!

Hi @Reem-lab @Oklukeok,
I'm Santiago your reviewer for this PR. :wave: :wave:
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉

Highlights
:heavy_check_mark: Applied changes suggested by the last code reviewer.
:heavy_check_mark: Good kanban board.
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


segfault when running basic example on Alpine (musl)

Initializing gtk seems to crash on Alpine Linux (which uses musl).  The segmentation fault can be reproduced by running the basics example (or any other).
To reproduce, use an Alpine Docker container:
docker run --rm -ti alpine:3.14

Run the following commands to build examples:
apk --no-cache add build-base curl git bash gtk+3.0-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
source $HOME/.cargo/env
cd /tmp/
git clone https://github.com/gtk-rs/gtk3-rs.git
cd gtk3-rs/examples/
cargo build

And run the basics example:
export RUST_BACKTRACE=full
../target/debug/basics

You get the following crash:
Program terminated with signal SIGSEGV, Segmentation fault.

GDB backtrace from generate core:
#0  0x0000000000000000 in ?? ()
gtk-rs/gtk3-rs#1  0x00007f339858d155 in gtk::auto::application::Application::new (application_id=..., flags=...) at gtk/src/application.rs:18
gtk-rs/gtk3-rs#2  0x00007f33985899d7 in basics::main () at examples/basics/main.rs:20

Also any of the gtk-rs-core examples are segfaulting the same way.

The problem seems to be related to no shared libraries having been loaded automatically at that point and instead all functions from shared libraries pointing to NULL.
$ gdb /tmp/gtk-rs-core/target/debug/gio_futures_await
(gdb) r
Starting program: /tmp/gtk-rs-core/target/debug/gio_futures_await
warning: Error disabling address space randomization: Operation not permitted

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ff5f3496dba in glib::auto::main_context::MainContext::default () at glib/src/auto/main_context.rs:107
#2  0x00007ff5f34828b5 in gio_futures_await::main () at examples/gio_futures_await/main.rs:9
(gdb) info sharedlibrary
No shared libraries loaded at this time.

However it is linked to the corresponding shared libraries
$ ldd /tmp/gtk-rs-core/target/debug/gio_futures_await
	/lib/ld-musl-x86_64.so.1 (0x7f98cf664000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x7f98cf575000)
	libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x7f98cf3cc000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x7f98cf2c2000)
	libffi.so.7 => /usr/lib/libffi.so.7 (0x7f98cf2b7000)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f98cf664000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x7f98cf2b2000)
	libz.so.1 => /lib/libz.so.1 (0x7f98cf298000)
	libmount.so.1 => /lib/libmount.so.1 (0x7f98cf245000)
	libintl.so.8 => /usr/lib/libintl.so.8 (0x7f98cf238000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x7f98cf1dc000)
	libblkid.so.1 => /lib/libblkid.so.1 (0x7f98cf192000)

This is some fallout from https://github.com/rust-lang/compiler-team/issues/422 . If you build with RUSTFLAGS="-C target-feature=-crt-static" it will work fine, but there's not much we can do here really. See also the linked other issues at the bottom of that issue.

See https://github.com/rust-lang/rust/issues/82912 for more info on this, TLDR things blow up when using a static musl version and dynamic libraries that are linked against a different dynamic musl. This may be fixed by rust in the future by using dynamic musl on musl systems.

Thanks for the details!
Interestingly, when installing Rust from the Alpine repository, the crash cannot be reproduced.  For example, when compiling with the official 1.56.1 version, the binaries crash, but when installing the same version from the Alpine repository, they don't crash.  So it seems that they fixed Rust issues on their side.
See https://git.alpinelinux.org/aports/tree/community/rust?h=master

Yes, rust from Alpine’s repos is patched to use -crt-static by default.


nifi.py [Errno 111] Connection refused

Hi ,
Can you please give me suggestion for this error, how to fix it?
08-29-2022 08:23:00.141 -0400 INFO  ExecProcessor - message from "/cs/splunk/search/bin/python3.7 /cs/splunk/search/etc/apps/nifi_TA_monitoring/bin/nifi.py" ########## STREAMING EVENTS ##########
08-29-2022 08:23:00.142 -0400 INFO  ExecProcessor - message from "/cs/splunk/search/bin/python3.7 /cs/splunk/search/etc/apps/nifi_TA_monitoring/bin/nifi.py" auth type: basic
08-29-2022 08:23:00.142 -0400 INFO  ExecProcessor - message from "/cs/splunk/search/bin/python3.7 /cs/splunk/search/etc/apps/nifi_TA_monitoring/bin/nifi.py" Started Nifi Get Data for input: nifi://hostname.local
08-29-2022 08:23:00.166 -0400 ERROR ExecProcessor - message from "/cs/splunk/search/bin/python3.7 /cs/splunk/search/etc/apps/nifi_TA_monitoring/bin/nifi.py" There was an error when encrypting/masking the password: An error occurred updating credentials. Please ensure your user account has admin_all_objects and/or list_storage_passwords capabilities. Details: [Errno 111] Connection refused
thank you

Just a note:
in my scenario I'm not using username/password authentication ...I'm using only certificate authentication ,this solutions is not yet available in the actually  nifi.py script

done


Fix bug with unclosed resources in serializers

h5py file open and load do not close / flush their buffers, causing resource leak and causes intermittent bugs depending on program behavior.

Thank you! It looks good.


Update unsupported Win32 code for Android

These changes are necessary-but-nowhere-near-sufficient for eventual support of generating Kivy Android files from native Windows. They have no visible effect on currently supported platforms.

Support experimental access to Android target on Win32, via an (unpublished) environment variable.
Support sdkmanager installer having a different name (.bat extension) on Windows.
Correct trivial formatting error in Exception text.
Update references from _winreg to winreg (Built-in module was renamed in Python 3.)
Correct download URL to Android NDK for the Windows platform

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 8 (25.0%)  changed or added relevant lines in 1 file are covered.
181 unchanged lines in 5 files lost coverage.
Overall coverage decreased (-6.0%) to 33.079%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

buildozer/targets/android.py
2
8
25.0%

Files with Coverage Reduction
New Missed Lines
%

buildozer/jsonstore.py
1
62.16%

buildozer/init.py
3
40.9%

buildozer/target.py
18
20.19%

buildozer/targets/osx.py
34
2.02%

buildozer/targets/ios.py
125
12.89%

Totals

Change from base Build<PHONE_NUMBER>:
-6.0%

Covered Lines:
945

Relevant Lines:
2644

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 8 (25.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 39.035%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

buildozer/targets/android.py
2
8
25.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1126

Relevant Lines:
2644

💛  - Coveralls

Failed tests are (unsupported) Python 2, and not getting a runner for apple-silicon-m1 (which is unrelated to the change.
I think this is ready for review.


Add story feature

This is a new feature that allows the bot to create and post stories.

Submitted Pull request: #6 for this issue


Appstudio update test-component-pac-ujmr

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-ujmr-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
19 seconds
init

✅ Succeeded
18 seconds
clone-repository

✅ Succeeded
1 minute
build-container

✅ Succeeded
20 seconds
sanity-inspect-image

✅ Succeeded
19 seconds
deprecated-base-image-check

✅ Succeeded
3 minutes
clair-scan

✅ Succeeded
2 minutes
clamav-scan

✅ Succeeded
18 seconds
sbom-json-check

✅ Succeeded
6 seconds
sanity-optional-label-check

✅ Succeeded
7 seconds
sanity-label-check

✅ Succeeded
6 seconds
show-summary

Pipelines as Code CI/test-component-pac-ujmr-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
6 seconds
init

✅ Succeeded
15 seconds
clone-repository

✅ Succeeded
33 seconds
build-container

✅ Succeeded
1 minute
clamav-scan

✅ Succeeded
7 seconds
clair-scan

✅ Succeeded
11 seconds
sanity-inspect-image

✅ Succeeded
13 seconds
deprecated-base-image-check

✅ Succeeded
7 seconds
sbom-json-check

✅ Succeeded
9 seconds
sanity-label-check

✅ Succeeded
9 seconds
sanity-optional-label-check

✅ Succeeded
4 seconds
show-summary


fix minor typo in writing tutorial

Issue: tiled client is defined as client but referenced subsequently as c.
Fix: changed all references to client.

CI failure is unrelated, and fixed in #542.


Deprecate remote_file feature

Closes #1679

PR for the documentation: https://github.com/capistrano/documentation/pull/193

@mattbrictson I added the version here and in the documentation, and appended the commit.

Thanks for your help! 🙇


RP2350 FPU compiler flags

See https://github.com/earlephilhower/arduino-pico/issues/2535
According to this it seems like it is using softmp mode for floating point operation for the RP2350.
SoftFP (soft floating point): Use hardware floating-point operations, but function calls pass parameters via general-purpose registers (compatible with non-FPU systems).
HardFP (hard floating point): Pass floating-point values in floating-point registers during function calls (which is faster but requires hardware FPU support).
Is there any reason for this and would hardfp make floating point performance better (I am using the FPU primarely for Audio DSP).

I was testing that and hard instead softfp was initially a bit faster, but my test code was using atan2f() and it happened to spit out some garbage when hard. Some regular hard multiplication and divisions turned out to be equally fast as softfp.

...was using atan2f()...

That's not going to work with the standard SDK setup.  Many FP functions are wrapped, such as atan2f and sin to use ROM routines.  If you change the ABI of your code you can't call those ROM routines.  If you disabled the --Wl,--wrap=xxxxx from the build process you might be able to get everything running.  run make VERBOSE=1 to see the final link stage which will have these --wrap options.
That said, if you're doing any reasonable amount of FP ops in a function, and not just one or two, I don't imagine any gains to be very large.  Moving from FP regs to normal ones is only a 1-cycle OP, I'd imagine...

...was using atan2f()...

That's not going to work with the standard SDK setup. Many FP functions are wrapped, such as atan2f and sin to use ROM routines. If you change the ABI of your code you can't call those ROM routines. If you disabled the --Wl,--wrap=xxxxx from the build process you might be able to get everything running. Run make VERBOSE=1 to see the final link stage which will have these --wrap options.
That said, if you're doing any reasonable amount of FP ops in a function, and not just one or two, I don't imagine any gains to be very large. Moving from FP regs to normal ones is only a 1-cycle OP, I'd imagine...

Roughly what i was going to say :smile:

Sadly GCC does not have a separate setting for single-precision vs double-precision, and double-precision is always software (so softfp is better for that)
As @earlephilhower says the overhead of softp for single-precision is only with non-inlined functions that take single-precision floating point args/returns... any single precision floating point ops within a function will remain in FP registers.

Upshot is that we decided that the benefit of hard-fp is minimal
More importantly, using it is currently not supported as noted, as all the assembly functions in pico_float and pico_double assume softfp (this is something we plan to fix in an upcoming SDK release)
You can probably use hardfp if you set pico_float_implementation and pico_double_implementation to compiler (though I haven't tried)


add "rename-cloud" command

mracek rename-cloud src dest
Renames cloud from src to dest.

$ mracek rename-cloud src-cloud dest-cloud

can be achieved by:
$ mracek copy-cloud src-cloud dest-cloud
$ mracek delete-cloud src-cloud


Wrapping units

Fixed with https://github.com/mfikes/impedance-converter/commit/7443bdee12c2f445427f9649ac690ba499da030e


brillo: init at 1.4.3

Motivation for this change
I wanted to use the brillo tool for backlight control on wayland but i could not find it.
Things done
Added brillo to nixpkgs/pkgs/os-specific/linux/brillo and added myself as a maintainer of it.

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

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

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

I have not tried to add a nix package before so please let me know if I have messed something up.

Have just realised this is not putting the udev rule in the correct location. Will try to fix soon

Please add an entry for this in nixos/module-list.nix otherwise the NixOS module isn't available for use! :)

And it looks like 1.4.4 is out, so might want to bump to that :).

And it looks like 1.4.4 is out, so might want to bump to that :).

I have bumped up the version number though for some reason I cannot work out it seems to be accepting the old sha256 hash. I don't think it should be doing this as if I purposefully break it then it says it is wrong and that it was expecting a hash which is not the one it is currently using. I've just checked and both hashes work in the derivation. Any idea what is causing this to happen and is it a problem @dtzWill

I believe my above observation was due to caching on my laptop, it is now fixed.

@dtzWill @jtojnar @symphorien is there anything else I need to do for this to be merged?

I've made the changes you suggested and I think I've managed to rebase everything @aanderse though can't see how to mark as resolved

LGTM :)

@alexarice I'm testing this out on a laptop but can't seem to get anything to happen...
brillo -L lists intel_backlight, but when I run any of the commands nothing seems to happen. Do you have a set of test commands you used that I can try?

brillo -A 0.5 and brillo -U 0.5 works for me. Do you get an error message or does nothing happen? I have also just realised I've been running wayland and haven't tested it on X

@alexarice I made a mistake and it turns out running pkexec brillo -A 0.5 does work. If I run the command unprivileged (though my user has been added to the video group, logged out and back in), the command does not work and gives the following error:
brillo -A 0.5 -v 1
!ERR: src/file.c:191    file_read():    fopen: No such file or directory: '/home/andersea/.cache/brillo/backlight.intel_backlight.mincap'
!ERR: src/file.c:161    file_open():    open: Permission denied: '/sys/class/backlight/intel_backlight/brightness'
!ERR: src/main.c:24     main(): Execution failed

Interesting, I've done a bit of investigation and I think the following is happening:

I believe you are getting a permission denied as you don't have services.udev.packages = [ brillo ]; in your configuration.nix. This should be set by the module but I don't know of a way to test modules without rebuilding my configuration off my local nixpkgs
I looked at what was happening on mine and if I delete the file that doesn't exist on yours then It throws an error but works anyway
I had set that file using brillo -rc -S 1 but I had done this on 1.4.3 where it worked correctly
I now have an error about failing to write to that file when running the same command
If I manually do 'echo 1 >> backlight.intel_backlight.mincap` Then everything works correctly.
The code throwing the error has changed from 1.4.3 to 1.4.4, Maybe this is an upstream bug?

I have looked over the code and believe there could be an upstream error, should I revert this to 1.4.3 and submit an issue there?

I have had a bit more of an investigate and have submitted a merge request upstream, though I believe at the moment the only functionality which doesn't work is the minimum brightness setting and this can be manually set

* I believe you are getting a permission denied as you don't have `services.udev.packages = [ brillo ];` in your `configuration.nix`. This should be set by the module but I don't know of a way to test modules without rebuilding my configuration off my local nixpkgs

I installed the brillo module that you have here. I also tried bumping the version down to 1.4.3 and same error.
brillo -A 0.5 -v 1
!ERR: src/file.c:192    file_read():    fopen: No such file or directory: '/home/andersea/.cache/brillo/backlight.intel_backlight.mincap'
!ERR: src/file.c:163    file_open():    open: Permission denied: '/sys/class/backlight/intel_backlight/brightness'
!ERR: src/main.c:27     main(): Execution failed

I feel like I'm doing something wrong?

Just for a new data point-- we also have light (which brillo forked)
which you may want to try.
On Wed, 17 Apr 2019 01:01:04 +0000 (UTC), Aaron Andersen<EMAIL_ADDRESS>wrote:

* I believe you are getting a permission denied as you don't have `services.udev.packages = [ brillo ];` in your `configuration.nix`. This should be set by the module but I don't know of a way to test modules without rebuilding my configuration off my local nixpkgs

I installed the brillo module that you have here. I also tried bumping the version down to 1.4.3 and same error.
brillo -A 0.5 -v 1
!ERR: src/file.c:192    file_read():    fopen: No such file or directory: '/home/andersea/.cache/brillo/backlight.intel_backlight.mincap'
!ERR: src/file.c:163    file_open():    open: Permission denied: '/sys/class/backlight/intel_backlight/brightness'
!ERR: src/main.c:27     main(): Execution failed

I feel like I'm doing something wrong?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/NixOS/nixpkgs/pull/58173#issuecomment-483897216Non-text part: text/html

That is very strange, I just built my system against this fork with nixos-rebuild -I ~/nixpkgs switch and added only hardware.brillo.enable = true and I get the following output:
brillo -A 5 -v 1
!ERR: src/file.c:191	file_read():	fopen: No such file or directory: '/home/alex/.cache/brillo/backlight.intel_backlight.mincap'

But my screen gets brighter.
For the error above I am trying to get a fix upstream https://gitlab.com/cameronnemo/brillo/merge_requests/4

Upstream issues have been fixed and I have moved this to 1.4.6.
@aanderse did you every figure out what was giving you permission errors?

It looks like you might want to nudge upstream on that 1.4.6 release...
~> brillo -V
brillo 1.4.5

https://gitlab.com/cameronnemo/brillo/blob/v1.4.6/src/light.h#L8
The issue persists. I have to assume I'm doing something wrong at this point. As a KDE user I don't actually need this program... so I'm going to leave it up to someone else to say whether the program works or not. It would be nice if at least one person other than @alexarice could confirm this works under X11 as expected.

Did you try if the program light works for you as that has near identical module definition. Have asked for the version to be bumped upstream

Did you try if the program light works for you as that has near identical module definition. Have asked for the version to be bumped upstream

@alexarice I have not and as I mentioned at this point I'm happy if someone else can confirm.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/48


understanding...

i get why you wrote this i think. Make alot of sense, and allows you to serialise the data in different formats at different layers of your stack (GUI, DB, etc).
I am curious why you did not go for dart-lang/dart-protobuf ?
pat of the reason i am asking is because its not gettng allot of love from google, but in the golang world is taking off like crazy ?
Or maybe your thinking that you can add protobuf as a serialisation format later to this lib ?
Dont take this the wrong way. This repo is a well thought out idea, but i am asking for my own learning in this area..

Thanks for the input.
Protobuf is certainly a great add. The plan is to create a format (json, xml, protobuf, mongo, etc) and platform (server, client) agnostic serializer. jaguar_serializer produces Dart primitives. One can easily add other formats on top of this.
Our goal is to statbilize Jaguar and hence jaguar_serializer asap. We will probably add protobuf at some point after stabilizing the core.
Do send in a pull request for protobuf support for jaguar_serializer, if you would like to help out. Contributions are always welcome :). Also it would be a good test of the serializer core.


Transactional email

You can generate docs with ./gradlew docs

One comment, maybe we can make the email implementation beans @Named in case users want to use more than one in the same application.

Good idea. I have annotated them with @Named and added a test.

Nice work, I just could not find way to use EmailTemplateSender and use attachments, am I missing something?

@morki

I just could not find way to use EmailTemplateSender and use attachments, am I missing something?

You are right. It is still something pending. I may add attachments to EmailHeaderbut the name of that class looks weird.  I think we should rename it. Not sure if I should rename to:

EmailHeader to Email

Email to CompleteEmail

EmailHeader to EmailSkeleton

Email to Email

Any naming suggestions, ideas or other feedback is welcome.
We need to define a POJO as a return type.

@morki

I just could not find way to use EmailTemplateSender and use attachments, am I missing something?

You are right. It is still something pending. I may add attachments to EmailHeaderbut the name of that class looks weird. I think we should rename it. Not sure if I should rename to:

EmailHeader to Email
Email to CompleteEmail
EmailHeader to EmailSkeleton
Email to Email

Any naming suggestions, ideas or other feedback is welcome.
We need to define a POJO as a return type.

you still have an option to do it as I suggested earlier 😄
EmailTemplateSender would take and  Email and render its body and text using the particular internal renderer and send the result.

see some usability recommendations. if Groovy is still one of the languages it might be nice if you also provide Closure support for the Consumer<X.Builder> methods
see https://medium.com/p/99bd118538b4

EmailTemplateSender would take and Email and render its body and text using the particular internal renderer and send the result.

What if there will be only one Email class, which can contain arbitrary context: Map<String, Any> and EmailTemplateSender was just a one of registered EmailMappers of that Email class.
This can open door to some situations (we are dealing now with similar home grown solution):

users can make customization with only creating new simple class
we for example use this to populate subject from parsed HTML template
internationalization of all parts like subject, text, html
adding FROM in one centralized place

see some usability recommendations. if Groovy is still one of the languages it might be nice if you also provide Closure support for the Consumer<X.Builder> methods
see https://medium.com/p/99bd118538b4

I don't really understand your remark about Groovy being still one of the languages. Yes, Groovy is supported in the framework as much as we can. I don't think any other framework apart from Grails supports Groovy more than Micronaut.
I will be happy to have a email-groovy module with enhancements to the API to have a better experience for Groovy users. PRs are welcomed against this branch.
Thanks for your other suggestions. I have added them all.

@musketyr @morki I have changed the APIs and I think it is now easy for the users. I have created an Email builder in different packages with the same API. They have always a Email builder api for both plain emails or emails with templates only with the methods applicable for each of these use cases.  Let me know what you think.

users can make customization with only creating new simple class

io.micronaut.email.Email is a public class  which users can extend.

we for example use this to populate subject from parsed HTML template

internationalization of all parts like subject, text, html

We have to improve the APIs for internationalization but I am not sure this should be in the email module.  I expect users to localize their subject and models and then call EmailSender::send with localized strings.

adding FROM in one centralized place

I think this is possible with the current implementation.
I expect people to have a singleton in their applications where they inject a configuration with the common from, an EmailSender and they will do logic with the response type. I am not sure we need to implement this logic in this module. It seems to me it will vary from application to application.

Thank you @sdelamo for your cool work. Just one last thing: FROM is now @NonNull, but using single FROM centralized in configuration is common practice (maybe only for us). What do you think?

@morki

Thank you @sdelamo for your cool work. Just one last thing: FROM is now @NonNull, but using single FROM centralized in configuration is common practice (maybe only for us). What do you think?

I think from needs to be required. However, I see your use case and others (always bcc an address, prefix subject). Thus, I have added a feature EmailDecorator to achieve this. Generate documentation in this branch  ./gradlew docs, check Decorators section and let me know what you think.

Really nice @sdelamo, this is exactly what we needed :+1:  Maybe remove @NonNull from from in both Email classes. Again, thank you very much for your work.

Really nice @sdelamo, this is exactly what we needed 👍 Maybe remove @NonNull from from in both Email classes. Again, thank you very much for your work.

I cannot remove @NonNull. At least not in io.micronaut.email.Email. I am relying on that constraint to ensure TransactionEmailSenderis only invoked with valid emails. See EmailValidatedSpec

@jameskleeh Could you check this PR. I would like to get it release for Micronaut 3.3. ?

We should change
https://github.com/micronaut-projects/micronaut-email/blob/075214a299f3115a1030fccd51af23b2175b5645/.github/workflows/gradle.yml#L22
to [8, 11, 17] as well instead of [8, 11, 16]

@jameskleeh I have included your PR, can you please review (approve / request changes) again?


Logical Flows: Allow export of filtered flows at app level

Currently the export functionality ignores any filters, probably best to show another option to export filtered flows, if any filters have been applied.

Think it's better that we ensure all data a user may wish to filter over is exported so they can recreate filters in excel (or similar)


SMIRNOFF: Specifying "PME" as a non-bonded method is somewhat ambiguous

The spec currently states

PME - particle mesh Ewald should be used (DEFAULT); can only apply to periodic systems

without going into more detail. Different users, engines, and possibly hardware are each unlikely to get the same electrostatics energies for identical configurations (positions, partial charges, executions, etc.).
PME is fraught with implementation details. I don't have the expertise to enumerate and discuss them, but I feel comfortable saying that it's something of a rabbit hole that's not implemented 1:1 across engines.

https://manual.gromacs.org/documentation/2021/reference-manual/functions/long-range-electrostatics.html#using-pme
http://docs.openmm.org/latest/userguide/theory.html#coulomb-interaction-with-particle-mesh-ewald
https://docs.lammps.org/kspace_style.html
Section 19.7.2 of the Amber20 manual has two pages of settings
CHARMM probably has its own

and the list goes on. I'm not sure if the complexity of LJPME settings is similar to electrostatics PME, but it's another layer to consider.
Even in its best case, PME is an approximation. There is not really a "ground truth," whereas (in principle) other energy terms could be computed exactly or to some arbitrary precision.
I'm not sure how to resolve this. @peastman presents an opinion here that a force field spec should specify the potential energy function (i.e. Coulomb's Law) but not the implementation (PME vs. alternatives).

This, also, is difficult; even within PME (e.g. with GROMACS) various PME settings can be altered which will affect performance and accuracy.
I am with Peter Eastman in that what we really mean here when we say PME is something like this:

Compute all possible interactions between all possible periodic copies of particles, no matter how far apart.

It could be the best way to do this is to settle on a name for this, perhaps "lattice-sum" or similar. Note that this is not "Coulomb's law", though Coulomb's Law could be the name for things with no lattice and no cutoff...
So I suppose I'm coming down on the side of changing away from "PME" to something more generic which tries to incorporate all methods in that general category.

Some relevant suggestions in portions of this comment: https://github.com/openforcefield/standards/issues/29#issuecomment-1046067143


Footer Icon (Github & Calendar) not visible on hover on play.meshery.io

Current State of the Meshery.io site

The calendar & github icon in footer on play.meshery.io are not visible on hover.

Desired State of the Meshery.io site
they should be clearily visible like the footer icons in meshery.io

Contributor Guides and Handbook
The meshery.io website uses Jekyll and GitHub Pages. Site content is found under the master branch.

📚 See the Contributing to Meshery.io Website section of the readme.md and other contributing instructions, too.
🎨 Wireframes and designs for Meshery UI in Figma
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

I will like to work on this can you assign it to me

@ranjanmangla1 Actually on hover calender & github icon change its state from light mode to highlighted mode and that is fine according to me there is no issue with the icons.

I haven't work on any Meshery issue,and, I am interested in this issue. Can I work on this, if it is assigned to me.

@ranjanmangla1 Actually on hover calender & github icon change its state from light mode to highlighted mode and that is fine according to me there is no issue with the icons.
@TheOjasSingh, there is, look closely on play.meshery.io

@leecalcote @Chadha93 @vishalvivekm can you assign this to me

Hello everyone, I think this issue should be raised in https://github.com/meshery/play repository.


Updated Azure Backup URL

Currently the doc specifies that the Host should be the container name - this isn't correct. This URL:
'azure://foo.blob.core.windows.net/employees.sql?AZURE_ACCOUNT_KEY=12345&AZURE_ACCOUNT_NAME=foo'; will throw an error from Azure since we attempt to conect to foo.blob.core.windows.net/foo.blob.core.windows.net. There should not be a host at all in the azure:// string.

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/acde60129988b202f860e6d1dbbac9ee270d6ed7/

@lhirata, since you're on the ops and tools writer, would you mind verifying this change?


access group in interface not capturing all arguments

Example configuration:
interface Vlan3
 ip access-group 10 in

The code has a capture line:
                    # ip access_group
                    access_group = match_single(j, '^ ip access-group (\S+) (\S+)$', False)
                    if access_group:
                        interface_dict['ip']['access_group'] = access_group

So this is ignoring the in section.
Use match_collection?

Fixed