error[E0277]: Cell<usize> cannot be shared between threads safely

I am very new with Rust, so my problem is probably relative to my Rust code.
If someone can help me, I will be grateful.
Here is the FRB version I use
$ flutter_rust_bridge_codegen -V
flutter_rust_bridge_codegen 2.0.0-dev.38

Here is my crate :

use flutter_rust_bridge::frb;
use trace::trace;

use web_audio_api::MediaElement as XMediaElement;
use std::cell::Cell;
use log::Level;
use log::{info as i, trace as t, warn as w, error as e, debug as d};
use simple_log::*;
use flutter_logger::logger::log;
use crate::frb_generated::RustAutoOpaque;

thread_local! { static DEPTH: Cell<usize> = Cell::new(0); }

//#[derive(Debug)]
//#[frb(opaque)]
pub struct MediaElement
{
        my_media_element: XMediaElement,
}

impl MediaElement
{
        /// The constructor
        //#[frb(sync)]
        //#[trace (prefix_enter="-> ", prefix_exit="<- ", logging)]
        pub fn new(/*path: String*/) -> MediaElement
        {
                MediaElement
                {
                        my_media_element: XMediaElement::new("toto".to_string()).unwrap()
                }
        }
}

Here is my Cargo.toml dependencies:
[dependencies]
env_logger = "0.11.3"
flutter_rust_bridge = "=2.0.0-dev.38"
#web-audio-api = "0.45.0"
web-audio-api = { path = "../web-audio-api-rs" }

An here is what I get when I do cargo build
...
error[E0277]: `Cell<usize>` cannot be shared between threads safely
   --> src/frb_generated.rs:353:1
    |
353 | / flutter_rust_bridge::frb_generated_moi_arc_impl_value!(
354 | |     flutter_rust_bridge::for_generated::RustAutoOpaqueInner<MediaElement>
355 | | );
    | |_^ `Cell<usize>` cannot be shared between threads safely
    |
    = help: within `media_element::MediaElement`, the trait `std::marker::Sync` is not implemented for `Cell<usize>`, which is required by `std::sync::RwLock<MoiArcPoolInner<RustAutoOpaqueInner<media_element::MediaElement>>>: std::marker::Sync`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicUsize` instead
...

And here is the library struct that I try to use :
pub struct MediaElement {
    stream: Option<RTSStream>,
    current_time: Arc<AtomicF64>,
    sender: Sender<MediaElementAction>,
    loop_: Arc<AtomicBool>,
    paused: Arc<AtomicBool>,
    playback_rate: Arc<AtomicF64>,
}

impl std::fmt::Debug for MediaElement {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.debug_struct("MediaElement")
            .field("stream", &self.stream)
            .field("current_time", &self.current_time())
            .field("loop", &self.loop_())
            .field("paused", &self.paused())
            .field("playback_rate", &self.playback_rate())
            .finish_non_exhaustive()
    }
}

impl MediaElement {
    /// Create a new instance for a given file path
    pub fn new<P: Into<PathBuf>>(file: P) -> Result<Self, Box<dyn Error>> {
        // Open a read stream.
        ...
    }
    ...
}

Looks like that MediaElement  type is Send but not Sync.
One simple way is to wrap it inside a Mutex, such as pub struct MyMediaElement(Mutex<TheOriginalMediaElemenet>);, then it will be Sync.

Yea!!! 👍 . It compiles now. Thank you for the help.
(Rust is a very hard language for me. Actually I do copy and paste without really understand).

Yes it has a big learning curve; but if you understand C++, then it may be possible to learn Rust indeed.

I need some help :
Here what I am trying to do
use flutter_rust_bridge::frb;
use web_audio_api::AudioBuffer as XAudioBuffer;
pub use web_audio_api::AudioBufferOptions;

#[frb(opaque)]
#[no_mangle]
pub struct AudioBuffer
{
        myBuffer : XAudioBuffer,
}

impl AudioBuffer
{
        #[frb(sync)]
        pub fn new(options: AudioBufferOptions) -> Self
        {
                crate::api::buffer::AudioBuffer
                {
                        myBuffer: AudioBuffer::createXAudioBuffer(options)
                }
        }

        #[frb(sync)]
        fn createXAudioBuffer(options: AudioBufferOptions) -> XAudioBuffer
        {
                XAudioBuffer::new(options)
        }

}

I get this error :
   Compiling rust_lib_tau_core v0.1.0 (/Volumes/mac-J/larpoux/projmac/tau/rust)
error[E0412]: cannot find type `AudioBufferOptions` in this scope
  --> src/frb_generated.rs:96:32
   |
96 |             let api_options = <AudioBufferOptions>::sse_decode(&mut deserializer);
   |                                ^^^^^^^^^^^^^^^^^^ not found in this scope
   |
help: consider importing one of these items
   |
24 + use crate::api::AudioBufferOptions;
   |
24 + use web_audio_api::AudioBufferOptions;
   |

Here is the struct that I try to pub use :
#[derive(Clone, Debug)]
pub struct AudioBuffer {
    pub(crate) channels: Vec<ChannelData>,
    pub(crate) sample_rate: f32,
}

I think that FRB did not process my pub use web_audio_api::AudioBufferOptions;.
Is there any way to solve that, or must I declare my own structure, and move the data from it to AudioBufferOptions?

Hmm, could you please provide a link to your code, then I can have a look or debug it since it can have multiple reasons. e.g. Maybe frb wrongly processes pub use, maybe we explicitly say ignore, etc.

Help!
Is there someone who can help me ?
When I code this :
pub trait AudioNode
{
        #[frb(sync)]
        fn get_x_node(&self) -> &impl web_audio_api::node::AudioNode ;

        #[frb(sync)]
        fn connect<'a>(&self, dest: &'a impl AudioNode) -> &'a impl AudioNode
        {
                let toto = self.get_x_node();
                let titi = dest.get_x_node();
                toto.connect(titi);
                dest
        }
}

I get this :

import '../../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

// These functions are ignored because they have generic arguments: `connect`, `connect`

abstract class AudioNode {
  void getXNode();
}

Nothing about my connect function.
Have I problems with FRB or with RUST?


Fixed Zoom 5.6.7 version

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[X] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@OfficialEsco I might be missing something, but I think it was actually correct before the commit. The latest version is 5.6.7 (1016) which is also how it shows up in the programs list, not 5.6.1016.  Unless the parenthesis are causing issues.

@OfficialEsco I might be missing something, but I think it was actually correct before the commit. The latest version is 5.6.7 (1016) which is also how it shows up in the programs list, not 5.6.1016. Unless the parenthesis are causing issues.

Zoom's EXE and MSI installer sadly show different versions in the control panel.. The MSI installs 5.6.1016 while the EXE installs 5.6.7 (1016) which is why i haven't added the EXE InstallerType.
AnyDesk's EXE and MSI have different PackageName and PackageVersion which is why that is split up, however Zoom's PackageName is the same so i don't think there is a good workaround before we get support for alternative version https://github.com/microsoft/winget-cli/issues/980

@OfficialEsco I might be missing something, but I think it was actually correct before the commit. The latest version is 5.6.7 (1016) which is also how it shows up in the programs list, not 5.6.1016. Unless the parenthesis are causing issues.

Zoom's EXE and MSI installer sadly show different versions in the control panel.. The MSI installs 5.6.1016 while the EXE installs 5.6.7 (1016) which is why i haven't added the EXE InstallerType.
AnyDesk's EXE and MSI have different PackageName and PackageVersion which is why that is split up, however Zoom's PackageName is the same so i don't think there is a good workaround before we get support for alternative version microsoft/winget-cli#980

Ah I see, that's strange

I'm working on capturing all of the schema changes we're targeting for v1.1. We're going to add a section to the installers so we can have multiple ARP entries https://github.com/microsoft/winget-cli/issues/1073 as well as matching for Publisher, App name, and version. I'll also be adding UpgradeCode https://github.com/microsoft/winget-cli/issues/1145 to help with some of the MSI upgrade challenges, EULA https://github.com/microsoft/winget-cli/issues/1144, and a couple more once we lock on them.


Enable ResponseNativeFunctionNegativeTest cases

Purpose
$subject.

Codecov Report

Merging #15660 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master   #15660      +/-   ##
============================================
+ Coverage      8.66%    8.66%   +<.01%
- Complexity     2743     2746       +3
============================================
  Files          1833     1833
  Lines         85561    85561
  Branches      11826    11826
============================================
+ Hits           7412     7415       +3
+ Misses        76427    76426       -1
+ Partials       1722     1720       -2

Impacted Files
Coverage Δ
Complexity Δ

...nalang/net/http/nativeimpl/response/GetEntity.java
50% <ø> (+25%)
2 <0> (+1)
:arrow_up:

...ava/org/ballerinalang/mime/nativeimpl/GetJson.java
29.26% <0%> (ø)
4 <0> (ø)
:arrow_down:

...main/java/org/ballerinalang/net/http/HttpUtil.java
34.16% <0%> (+0.27%)
90% <0%> (+2%)
:arrow_up:

Continue to review full report at Codecov.

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


Strip any '+RTS ...' flags from command line options

Addresses #102
I had a version of this in addCmdOpts but decided this was more appropriate. I can move it back if it isn't.

Can you add a test please?

Yes

With respect to testing, I make new projects for each of stack/cabal and test against those, or add but I could also add a trivial +RTS -A1m -RTS to the existing ones. Is that sufficient?
I can also add some more extensive tests of the function itself with different inputs

Adding the options to the existing tests would be fine, adding a new test would also be fine, it doesn't matter too much which you choose.

I'm not at my computer at the moment, but as written i don't think this would work. The argument sequences also have other arguments in them besides the '+RTS...' bits which aren't necessarily at the beginning or end of the list.
If i'm understanding the proposal, I think your code will work with the addition of this case after your code.
removeRTS (y:ys) = y : removeRTS ys

I like the readability of what you wrote a lot and can change/test it again later. Thank you for having a look!
On December 19, 2019 4:58:37 PM EST, Jinwoo Lee<EMAIL_ADDRESS>wrote:

jinwoo commented on this pull request.

+-- Strip out any ["+RTS", ..., "-RTS"] sequences in the command
string list.
+removeRTS :: [String] -> [String]
+removeRTS  = snd . foldr processPath (False, [])

where processPath p (inRTS, paths) =

     case (inRTS, p) of

       (_, "+RTS") -> (False, paths)

       (_, "-RTS") -> (True, paths)

       (True, _)   -> (inRTS, paths)

       (_, p')     -> (False, p' : paths)

Sorry for a drive-by comment. Would code like this be simpler?
removeRTS :: [String] -> [String]
removeRTS [] = []
removeRTS ("+RTS" : xs) =
 case dropWhile (/= "-RTS") xs of
   [] -> []
   (_ : ys) -> removeRTS ys

--
Chris

Another drive-by comment :)
Per https://downloads.haskell.org/ghc/latest/docs/html/users_guide/runtime_control.html#rts-opts-cmdline, "No -RTS option is required if the runtime-system options extend to the end of the command line". It'd be good to add a test case like that too.

@jinwoo I looked at this situation and cabal doesn't seem to build anything without the -RTS. When I checked, it's because additional non-rts ghc options were being added after +RTS. In my test it was adding -hide-all-packages which according to the manual is always passed by cabal.
Even if GHC can accept the +RTS ... form on the command line, I don't think it makes sense in the context of a cabal file. I don't know of any way to control the order of options that cabal uses when invoking GHC, which would be necessary for the +RTS ... form to work reliably.
I couldn't think of what the test case for that would achieve then, since the cabal file seems to be unusable if you leave off the -RTS option. A cabal file where hie-bios works but cabal doesn't is maybe not an important case to support. But I want to hear if you agree with that, maybe there's a good reason for the additional test that I'm not thinking of. Or I could ask the cabal devs if that situation is valid or there's a way to mitigate it.

Oh I see. I had to do something similar in our environment and because we don't use cabal, I didn't realize it doesn't happen with cabal. Sorry about that.
I also realize that this change affects only cabal cradles. Why not make this change for all types of cradles? I guess it would benefit all of them.
Having said that, as I'm not the owner of this project, I'll just shut up now :)
Thank you for making this change!

@jinwoo I see what you're saying and realize that I ignored the bios cradle type when writing tests. To make sure I've gotten everything:

Stack: If you use stack then there's still a cabal file, and as far as I can tell it a stack cradle will still run things through cabalWrapperArgs. So stack cradles are supported by this code. Like regular cabal projects, stack won't build a project with +RTS ... form ghc-options in the cabal file.  There is a test as part of this PR for stack too.

Cabal: This is supported, and exhibits the behavior where a project won't build if ghc-options has a +RTS ... form argument. Since cabal doesn't support it, I didn't worry about this case.

BIOS: This one I didn't have a test for, so thank you for prompting me to check. I don't see that anything was broken if you add +RTS options to the the script for this one.

Can you let me know if there's a case here that isn't supported?

So the current status of this is that the appveyor tests failed because the test RTS opts were being passed into the wrapper, which was exiting with an error because the RTS options GHC defaults to are 'some'. I changed the wrapper compilation code to include -rtsopts=ignore which just passes RTS options unchanged into the wrapper. It works for GHCs > 8.2.2, 8.2.2 and below don't seem to have an 'ignore' option.
Setting rtsopts=all is wrong because it means the wrapper is eating the RTS options and not passing them to GHC underneath.

We can probably just remove 8.2.2 support if it's causing issues. I think h-i-e or ghcide support that version.

I think the simplest fix would be dropping support for 8.2.2 and using -rtsopts=ignore. I could turn on rtsopts=all for the cabal.hs program, but that would mean on windows the wrapper program catches those RTS opts and not the underlying call to HIE_BIOS_GHC which is what happens on linux.
Can you clarify if this is correct: cabal or the cabal.hs program is receiving the same ghc-options as whatever component it's building. I'm guessing that that's because maybe a user might want some warnings for some components and not others, and the checks can be made to match what cabal would do at build-time for a given component. This is where the appveyor tests are failing I think, because the windows wrapper program doesn't accept the full complement of RTS options while cabal and stack do.
Do you think that adding -rtsopts=ignore sufficient, or is that a bandaid?

I think dropping support for 8.2.2 and using -rtsopts=ignore is a good solution.
I don't understand your question sorry, cabal uses the compiled cabal.hs executable instead of ghc when invoked by hie-bios, this allows us to intercept the options it supplies to GHC to start a session.

I think dropping support for 8.2.2 and using -rtsopts=ignore is a good solution.

Sounds good, I will do that

I don't understand your question sorry, cabal uses the compiled cabal.hs executable instead of ghc when invoked by hie-bios, this allows us to intercept the options it supplies to GHC to start a session.

I think I was just chasing my tail. I have a better understanding of how things work thanks to your comment.

I think this is finished, but appveyor had a server error. I will try triggering a build again later.

Needs a rebase and squash.

@mpickering Let me know if there's anything I can do to further assist here. Thanks for your work on this project!


Slate - when panning with hand ray, the ray sticks to slate

Overview
When panning with hand rays, the rays should not stick to the pannable texture.
Expected Behavior

Actual Behavior

This is related to #5016, once that goes in we can update the slate to change the pointer's focus point so that the ray doesn't stick to slate. Then we should update Unity UI canvas to do the same thing.

Update: I'll try to get this in as part of #5016 after I finish my urgency-soon issues


Add support to returning har instead of saving it to the disk

Hi @abourget,
I made the following changes for get har result without saving it do disk and there was an issue with the bodySize not being added unless the content was return as part of the har.

any reason why you're closing this ? have you found another solution ?
The feature is interesting.. it's the implementation that needed rework.


[Autocomplete] Option highlighted event

[x ] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
<Autocomplete
   onOptionHighlighted={(option: T, reason: 'keyboardNavigation' | 'mouseOver' | 'automatic') => { ... }}
   ...
/>

This event would trigger when an option is highlighted (such that pressing Enter would then select that option). For instance, it would trigger upon using the arrow keys to cycle through the options and report which option is currently highlighted.
Motivation 🔦
Give context to the user on the highlighted option to allow him to make a better choice. Right now, we only know which option is selected after the user makes a choice; this would allow providing feedback proactively rather than reactively.

Give context to the user on the highlighted option to allow him to make a better choice.

How do you plan to implement this extra context?

Give context to the user on the highlighted option to allow him to make a better choice.

@aslupik How do you plan to implement this extra context? (assuming you have this callback available).

I'm using Redux, so the callback would trigger an action allowing the rest of the application to know which option is currently highlighted. Then, a separate control on the page can subscribe to that and display information related to the highlighted candidate. This control updates dynamically as the user cycles through the options in the dropdown.

@aslupik Ok sounds fair. What do you think of this API to anticipate for a future case when somebody will need to control the highlighted index (at the cost of harming performance, I imagine)
diff --git a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts
index 910be8d93..0dd380265 100644
--- a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts
+++ b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts
@@ -134,6 +134,18 @@ export interface UseAutocompleteCommonProps<T> {
    * @param {string} reason Can be: `"toggleInput"`, `"escape"`, `"select-option"`, `"blur"`.
    */
   onClose?: (event: React.ChangeEvent<{}>, reason: AutocompleteCloseReason) => void;
+  /**
+   * Callback  fired when the highlighted option changes.
+   *
+   * @param {object} event The event source of the callback.
+   * @param {T} option
+   * @param {string} reason Can be: `"input"` (user input), `"reset"` (programmatic change), `"clear"`.
+   */
+  onHighlighChange?: (
+    event?: React.ChangeEvent<{}>,
+    option: T,
+    reason: AutocompleteHighlightChangeReason
+  );
   /**
    * Callback fired when the input value changes.
    *
@@ -178,6 +190,12 @@ export type AutocompleteChangeReason =
   | 'remove-option'
   | 'clear'
   | 'blur';
+
+export type AutocompleteHighlightChangeReason =
+  | 'keyboard'
+  | 'mouseOver'
+  | 'auto';
+
 export interface AutocompleteChangeDetails<T = string> {
   option: T;
 }

@oliviertassinari  That looks good to me!

I Will create a PR with this feature soon :)

@oliviertassinari @marcosvega91
There seems to be an issue with this new feature when used alongside the filterSelectedOptions prop.
When navigating over the listbox options, the value argument passed to the onHighlightChange function doesn't take into consideration the options that have been filtered out by the input. As a result, value corresponds to the same index option as if there was no filter.
I made a small sandbox to show what I mean. The first option (Jaws) is correct, but starting from the second option (Avengers), the values are shifted by one position.

Hi @theGirrafish I will correct the issue :)


JS Error on Selection of pathbrowser component inside of Multifield

Using a pathbrowser component inside a composite multi field does not seem to be functioning as expected. This is in AEM 6.2, using acs-aem-commons-content-3.2.6.zip
Steps to replicate:

Add a pathbrowser as a required field to a composite multifield in a Touch UI dialog (my test also has additional text fields).
In Edit mode, edit the component. Add two (or more) items to multifield. Do not select anything for the first path browser. It will be marked as invalid.
Move to the second pathbrowser. Click the browse button and attempt to select a file.

Results:
The pathbrowser window does not close and store the selection.

This is also happening in 3.3.0

@quoo : If possible, could you attach a content package for the same..

Sorry for the delay, here's a cleaned up sample content package.
multifield_pathbrowser_sample.zip

@quoo : Unfortunately there seems to be an issue with the package.. "Zip File is not a content package. Missing 'jcr_root'."
Moreover after unzipping the file, it seems that the dialog contains 2 text fields but no pathbrowser and all fields are not mandatory.. Could you please check the package again...

I apologize, I was a little overzealous when cleaning up that component to upload. Please try this one. It should contain the relevant data.
multifield_pathbrowser_sample (2).zip

@quoo : I have created a PR for this.. Would you please take a look at that and give it a round of test.. Thanks!!

Your PR seems to fix my issue, thank you!

@justinedelson : Could you please take a look at my PR and see if can be merged.. Thanks!!

@quoo : PR has been merged. I believe this can be closed now.. Thanks!!


login example

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Example how to implement login

What is the current behavior? (You can also link to an open issue here)

You have no example for login

What is the new behavior (if this is a feature change)?

Login is mockedup

Other information:

Read changes

Hey @sielay thanks for your work! This looks great, though I'm not sure we are ready to force the API level and how it should be constructed in the apps based on this template. Let us think of it, anyway we can keep your PR as reference and example.

@nnixaa that was the idea :) enjoy :) In case of questions ask, next week I'm in BY so can respond slower (I say you had snow) ;)

@sielay  How do I write out the function? I tried the following code and it seems invalid.
Help me please!
file path://src/app/theme/components/baPageTop/baPageTop.component.ts

I would like to written logout function in the creation of your services folder, but I do not know how to call it from the button which in baPageTop so temporarily written in this file.

  public logout() {
    localStorage.setItem('ssid',null);
    // this.changeState(false);
    // return Observable.fromPromise(Promise.resolve(false));
    // console.log(this.profile.loggedIn);
    // this.profile.loggedIn = false;
    // console.log(this.profile.loggedIn);
    // console.log(localStorage.getItem('ssid'));
    // this.router.navigate(['/login']);
  }

@clh021 I added method
public signOut() {
}

with that in template

Sign out

Basing on my example you should then not only clear localStorage item, but also token stored in API service. But all depends how you align example to your code. Helps?

@sielay Thank you so much for your prompt reply and help.
Basing on your example,just change these code
diff --git a/src/app/theme/components/baPageTop/baPageTop.component.ts b/src/app/theme/components/baPageTop/baPageTop.component.ts
index 306d345..500c0ce 100644
--- a/src/app/theme/components/baPageTop/baPageTop.component.ts
+++ b/src/app/theme/components/baPageTop/baPageTop.component.ts
@@ -1,6 +1,8 @@
 import {Component, ViewEncapsulation} from '@angular/core';

 import {GlobalState} from '../../../global.state';
+import { ApiService } from '../../../services/api.service';
+import { Router } from '@angular/router';

 @Component({
   selector: 'ba-page-top',
@@ -14,7 +16,7 @@ export class BaPageTop {
   public isMenuCollapsed:boolean = false;
   public username:string = '';

-  constructor(private _state:GlobalState) {
+  constructor(private router: Router, private _state:GlobalState, private api:ApiService) {
     this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
       this.isMenuCollapsed = isCollapsed;
     });
@@ -30,4 +32,9 @@ export class BaPageTop {
   public scrolledChanged(isScrolled) {
     this.isScrolled = isScrolled;
   }
+
+  public logout() : void {
+    this.api.setToken(null);// clear localStorage and setToken null
+    this.router.navigate(['/login']);
+  }
 }
diff --git a/src/app/theme/components/baPageTop/baPageTop.html b/src/app/theme/components/baPageTop/baPageTop.html
index 79cd523..c8b88b0 100644
--- a/src/app/theme/components/baPageTop/baPageTop.html
+++ b/src/app/theme/components/baPageTop/baPageTop.html
@@ -17,7 +17,7 @@

我的

设置

-
退出

+
退出

but route after logout Form '/' redirectTo '/dashboard' still.
I am a newcomer, where I may be wrong. Sorry for trouble you.

@clh021 if that happens check route for login and dashboard and what AuthGuard is checking. It looks like from AuthGuard perspective you are still logged in, simply debug it line by line and see which value is not changed for him. Sometimes setting value is not enough (when you deal with observables) and you have to use subscription interface to notify about change (similar as it's done when you do login)

The get request is not committed.
my code update for your example.
diff --git a/src/app/services/api.service.ts b/src/app/services/api.service.ts
index 7f4b4e4..bd5bb80 100644
--- a/src/app/services/api.service.ts
+++ b/src/app/services/api.service.ts
@@ -6,7 +6,7 @@ import 'rxjs/add/operator/map'
 @Injectable()
 export class ApiService {
     public token: string;
-    private endpoint: string = 'https://example.com';
+    private endpoint: string = 'http://localhost/test.php?r=';

     constructor(private http: Http) {
     }
@@ -41,15 +41,20 @@ export class ApiService {
     }

     get(url) {
+        return this
+            .http
+            .get(this.endpoint + url, this.getHeaders())
+            .map(this.process)
+            .catch(this.processError);
         /*
         return this
             .http
             .get(this.endpoint + url, this.getHeaders())
             .map(this.process)
-            .catch(this.processError);*/
+            .catch(this.processError);
         return Observable.fromPromise(Promise.resolve({
             name: "me"
-        }));
+        }));*/
     }

     post(url, data) {

I tried to modify it, but it seems to cause more problems.
        return this
            .http
            .get(this.endpoint + url, this.getHeaders())
-           .map(this.process)
+           .toPromise().then(this.process)
            .catch(this.processError);

Sorry for trouble you. Wish you a happy life.

Sorry for trouble you. I do it very well. It's work fine.
Thanks for your help. Wish you a happy life. @sielay

@sielay
Hi dude! First of all, thanks for this great work 👍
Unfortunately, I'm facing some issues while modifying my files as you explained.
Even if I followed step by step your procedure, I have 2 issues:

when launching my dashboard via : http://localhost:3000/#/pages/dashboard
I only see the loading spinner and I don't get anything.. :(

Then, when relaunching my project via my terminal, I get this:
...
webpack: bundle is now VALID.
[default] Checking started in a separate process...
[default] /Users/Thomas/Desktop/Myproject/src/app/guards/loggedin.guard.ts:9:57
Cannot find name 'ProfileService'.
[default] /Users/Thomas/Desktop/Myproject/src/app/pages/login/login.component.ts:19:47
Cannot find name 'ProfileService'.
[default] Checking finished with 2 errors

Could you please help me on this?
Thanks a lot for your help and feedback.
TV


Does the paypal plugin register a hookup to which notifications arrive?

Does the paypal plugin register a hookup to which notifications arrive?

Hello @BartoszCoyote ,
Thank's for your message.
Can you be more specific on what do you want to manage as notification, and for what purpose?
Best regards,
202 team

My guess is that paypal must somehow communicate with the store that has the plugin installed, for example to change the payment status.
for this purpose presta has to have a registered url in (Traffic & SEO/SEO & URLs). My question is whether the plugin does this automatically or you have to manually add

Hello @BartoszCoyote
PayPal communicates with our module only in the latest version of the module which will be released soon, and only if the webhook functionality will be activated. To receive and manage PayPal messages, the module uses a special listener.
In other cases, the order status in Prestashop must be changed manually. However, when you change a status in Prestashop, the module automatically changes a status on PayPal (for example, refund or cancellation).
I hope this answered your questions,
Best regards,
Team 202


Use In-memory datastore when running in docker

This speeds up the functional tests by over 100 seconds running locally
How to review
Run the tests, are they faster?

I can see no reasonable gain in Travis


High Complexity for new Diagrams

Adding new diagrams and diagram parts is associated with a very high complexity. To have a reasonably working basis of a node / an edge, a lot of different files must be created. In the end, you always forget something and then have to debug for a long time until you really have implemented all files and required functions with the right types.
What would help here, for example, is if one could perhaps bundle more logic in one file instead of outsourcing any logic, no matter how small, to its own files. Example CRUD, for a single node / a single edge it needs for Create, Update and Delete 3 x 3 = 9 files. For 5 nodes and 5 edges that's 90 files. And this does not include any of the many other required files.

Thank you very much for the feedback @Pfingstfrosch!
I will focus on reducing the required complexity in the next release(s). Unfortunately, to allow flexibility, those files were necessary. However, to allow easier usage, I will provide new ways to abstract / hide those files and thus reduce the necessary file count.

@haydar-metin Thanks for the quick reply, looking forward to it.


Additional Config Options

Is your feature request related to a problem? Please describe.
There is a lack of configurability in the mod, and some of the features seem like they should be optional.
Describe the solution you'd like
Tree felling could have multiple options (Enabled/Disabled, Falling or just drop items, Require Axe) that would allow more usability.
Additional context
I started thinking about this while trying out the "Burnt" mod, and while I don't expect full compatibility, one of the features of this mod is it would turn logs on fire into burnt logs. With the default dynamic trees options, the tree simply falls down when this happens, meaning the fire cant continue to spread. If there were an option to just break that segment (and drop proportional items if done by a player etc?) then I could use these mods together. I'm sure there are other similar cases for other mods.

Mind being more specific about the behavior you expect vs the behavior you see?
I'm struggling to understand what is being requested


Adjust Idle culler settings and add internal culling

Fixes | Closes | Resolves #974
This PR adds come extra configuration to the Jupyterhub idle culling system, right now it's enabled by default from jupyterhub values.yaml helm chart. This PR includes a new block of config for the culling system under the same yaml file.
As the user Jupyterlab server has an odd behavior when running alongside Jupyterhub, the WebSocket connection created for the window browser access to the user server generates false positives of the connected server (affecting the idle state) (see related topic here). To fix this issue, I've enabled the internal culling system for the Jupyterlab user server, which will cull idle kernels and terminals (see relevant information about the kernel inability to be correctly tracked sometimes, here)
As extra information about this general process, I recommend this comment here, explaining why using both internal and external idle culling services is a good path to go (see).
Changes introduced in this PR:

Add explicitly configuration to adjust default behavior of idle culler
Add Jupterhub internal culler setting

Types of changes
What types of changes does your PR introduce?
Put an x in the boxes that apply

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds a feature)
[ ] Breaking change (fix or feature that would cause existing features to not work as expected)
[ ] Documentation Update
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build related changes
[ ] Other (please describe):

Testing
Requires testing

[x] Yes
[ ] No

In case you checked yes, did you write tests?

[ ] Yes

[x] No

I think this would need extra testing implemented alongside Qhub, any ideas on this would be greatly welcomed, p.s, we can add a config extension to easily change the idle timeouts configuration -- starting point https://github.com/jupyterhub/jupyterhub-idle-culler/blob/main/tests/test_idle_culler.py

Documentation
Does your contribution include breaking changes or deprecations?
If so have you updated the documentation?

[x] Yes, docstrings
[ ] Yes, main documentation
[ ] Yes, deprecation notices

Further comments (optional)

Needs further testing, just to confirm the timeouts max period until pod deletion

Extra outputs from user pod, internal idle culling system:

Because c.AppServer.... was used, the pod was terminated after the idle timeout was reached:

│ notebook [I 2022-03-01 08:06:11.171 SingleUserNotebookApp manager:91] [nb_conda_kernels] enabled, 2 kernels found
│ notebook [I 2022-03-01 08:06:11.191 SingleUserNotebookApp notebookapp:1593] Authentication of /metrics is OFF, since other authentication is disabled.
...
│ notebook [I 2022-03-01 08:06:12.514 SingleUserNotebookApp notebookapp:2075] Will shut down after 240 seconds with no kernels or terminals.                                                                                │
│ notebook [I 2022-03-01 08:06:12.518 SingleUserNotebookApp mixins:576] Starting jupyterhub-singleuser server version 1.5.0                                                                                │
...
│ notebook [I 2022-03-01 08:06:12.556 SingleUserNotebookApp mixins:556] Updating Hub with activity every 300 seconds
│ notebook [I 2022-03-01 08:06:20.643 LabApp] Build is up to date
│ notebook [I 2022-03-01 08:06:30.761 SingleUserNotebookApp kernelmanager:179] Kernel started: 089428ef-4e49-46c9-9e70-82ca723c9b11, name: python3                                                                                │
│ notebook [I 2022-03-01 08:06:30.762 SingleUserNotebookApp kernelmanager:442] Culling kernels with idle durations > 120 seconds at 30 second intervals ...                                                                                │
│ notebook [I 2022-03-01 08:06:30.762 SingleUserNotebookApp kernelmanager:447] Culling kernels even with connected clients                                                                                │
│ notebook [I 2022-03-01 08:06:31.821 SingleUserNotebookApp kernelmanager:222] Starting buffering for 089428ef-4e49-46c9-9e70-82ca723c9b11:619bced9-9cb3-45d2-b960-1d5761d5539d                                                               │
│ notebook [I 2022-03-01 08:06:37.725 SingleUserNotebookApp kernelmanager:179] Kernel started: a75e3125-02ef-4be6-acc3-a9d87f27fc02, name: conda-env-filesystem-dask-py                                                                       │
│ notebook CONDA_PREFIX=/home/conda/filesystem/envs/dask
│ notebook [I 2022-03-01 08:06:42.008 SingleUserNotebookApp kernelmanager:222] Starting buffering for a75e3125-02ef-4be6-acc3-a9d87f27fc02:81585be1-0c11-499c-973f-28c871a05940                                                               │
│ notebook [I 2022-03-01 08:06:46.027 SingleUserNotebookApp handlers:169] Saving file at /Untitled2.ipynb
│ notebook [W 2022-03-01 08:09:00.763 SingleUserNotebookApp kernelmanager:482] Culling 'idle' kernel 'python3' (089428ef-4e49-46c9-9e70-82ca723c9b11) with 1 connections due to 147 seconds of inactivity.                                    │
│ notebook [I 2022-03-01 08:09:00.764 SingleUserNotebookApp multikernelmanager:258] Kernel shutdown: 089428ef-4e49-46c9-9e70-82ca723c9b11                                                                                │
│ notebook [W 2022-03-01 08:09:00.989 SingleUserNotebookApp kernelmanager:482] Culling 'idle' kernel 'conda-env-filesystem-dask-py' (a75e3125-02ef-4be6-acc3-a9d87f27fc02) with 2 connections due to 137 seconds of inactivity.               │
│ notebook [I 2022-03-01 08:09:00.990 SingleUserNotebookApp multikernelmanager:258] Kernel shutdown: a75e3125-02ef-4be6-acc3-a9d87f27fc02                                                                                │
│ notebook [I 2022-03-01 08:11:12.516 SingleUserNotebookApp notebookapp:2069] No kernels or terminals for 263 seconds; shutting down.                                                                                │
│ notebook [I 2022-03-01 08:11:12.536 SingleUserNotebookApp notebookapp:2166] Shutting down 0 kernels
│ notebook [I 2022-03-01 08:11:12.536 SingleUserNotebookApp notebookapp:2181] Shutting down 0 terminals
│ notebook stream closed   .

Hub idle culling system when user log-outs:
│ [I 2022-03-01 14:14:44.037 JupyterHub proxy:289] Adding user bob to proxy /user/bob/ => http://<IP_ADDRESS>:8888
│ [I 2022-03-01 14:14:44.040 JupyterHub users:677] Server bob is ready
│ [I 2022-03-01 14:14:44.041 JupyterHub log:189] 200 GET /hub/api/users/bob/server/progress<EMAIL_ADDRESS>6401.87ms
│ [I 2022-03-01 14:14:44.228 JupyterHub log:189] 302 GET /hub/spawn-pending/bob -> /user/bob/<EMAIL_ADDRESS>3.59ms
│ [I 2022-03-01 14:14:44.770 JupyterHub log:189] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-bob&redirect_uri=%2Fuser%2Fbob%2Foauth_callback&response_type=code&state=[secret] -> /user/bob/oauth_callback?code=[secret]&stat │
│ [I 2022-03-01 14:14:44.992 JupyterHub log:189] 200 POST /hub/api/oauth2/token<EMAIL_ADDRESS>45.49ms
│ [I 2022-03-01 14:14:45.022 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret]<EMAIL_ADDRESS>23.19ms
│ [I 2022-03-01 14:14:46.743 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret]<EMAIL_ADDRESS>21.60ms
│ [I 2022-03-01 14:14:56.697 JupyterHub proxy:347] Checking routes
│ [I 2022-03-01 14:14:56.824 JupyterHub log:189] 200 GET /hub/api/users<EMAIL_ADDRESS>28.59ms
│ [I 2022-03-01 14:15:10.891 JupyterHub login:44] User logged out: bob
│ [I 2022-03-01 14:15:10.914 JupyterHub log:189] 302 GET /hub/logout -> https://qhubstages.qhub.dev/auth/realms/qhub/protocol/openid-connect/logout?redirect_uri=https%3A%2F%2Fqhubstages.qhub.dev%2Fhub%2Flogin (@<IP_ADDRESS>) 25.84ms        │
│ [I 2022-03-01 14:15:11.334 JupyterHub log:189] 200 GET /hub/login (@<IP_ADDRESS>) 12.80ms
│ [I 2022-03-01 14:15:56.698 JupyterHub proxy:347] Checking routes
│ [I 2022-03-01 14:15:56.814 JupyterHub log:189] 200 GET /hub/api/users<EMAIL_ADDRESS>17.92ms
│ [I 2022-03-01 14:16:56.681 JupyterHub proxy:347] Checking routes
│ [I 2022-03-01 14:16:56.818 JupyterHub log:189] 200 GET /hub/api/users<EMAIL_ADDRESS>22.15ms
│ [I 2022-03-01 14:17:56.681 JupyterHub proxy:347] Checking routes
│ [I 2022-03-01 14:17:56.814 JupyterHub log:189] 200 GET /hub/api/users<EMAIL_ADDRESS>17.72ms
│ [I 2022-03-01 14:18:56.681 JupyterHub proxy:347] Checking routes
│ [I 2022-03-01 14:18:56.815 JupyterHub log:189] 200 GET /hub/api/users<EMAIL_ADDRESS>18.92ms
│ [I 220301 14:18:56 __init__:192] Culling server bob (inactive for 00:03:45)
│ [I 2022-03-01 14:18:56.822 JupyterHub proxy:309] Removing user bob from proxy (/user/bob/)
│ [I 2022-03-01 14:18:56.825 JupyterHub spawner:2620] Deleting pod dev/jupyter-bob
│ [I 2022-03-01 14:19:00.304 JupyterHub base:1116] User bob server took 3.483 seconds to stop
│ [I 2022-03-01 14:19:00.305 JupyterHub log:189] 204 DELETE /hub/api/users/bob/server<EMAIL_ADDRESS>3487.17ms

Finished testing with the config below:

Kernel and Terminal timeout of 10m and culling period of 1m
Notebook server timeout of 10m

Note that kernel/terminal shutdown represents user activity, so the total timeout for the process -- pod deletion, corresponds to the proximity sum of the kernel/terminal timeout + server (approximately)

Spawned a default pod and launched a terminal and notebook instances (just some simple imports), then minimized the tab

hub      [I 2022-03-03 11:35:26.303 JupyterHub users:677] Server bob is ready
notebook [I 2022-03-03 11:35:39.624 SingleUserNotebookApp kernelmanager:179] Kernel started: 6ae0155b-7abc-4d85-b9f7-0893041d5ec2, name: python3
notebook [I 2022-03-03 11:35:43.907 SingleUserNotebookApp management:365] New terminal with automatic name: 1

After the timeout passed (plus extra culling period)

notebook [W 2022-03-03 11:46:39.626 SingleUserNotebookApp kernelmanager:482] Culling 'idle' kernel 'python3' (6ae0155b-7abc-4d85-b9f7-0893041d5ec2) with 2 connections due to 643 seconds of inactivity
notebook [I 2022-03-03 11:46:39.626 SingleUserNotebookApp multikernelmanager:258] Kernel shutdown: 6ae0155b-7abc-4d85-b9f7-0893041d5ec2
notebook [W 2022-03-03 11:46:43.911 SingleUserNotebookApp terminalmanager:160] Culling terminal '1' due to 654 seconds of inactivity.
notebook [I 2022-03-03 11:46:44.012 SingleUserNotebookApp management:382] Terminal 1 closed
notebook Websocket closed

Server shutting down

notebook [I 2022-03-03 11:57:23.850 SingleUserNotebookApp notebookapp:2069] No kernels or terminals for 638 seconds; shutting down.
notebook [I 2022-03-03 11:57:23.862 SingleUserNotebookApp notebookapp:2166] Shutting down 0 kernels
notebook [I 2022-03-03 11:57:23.862 SingleUserNotebookApp notebookapp:2181] Shutting down 0 terminals
hub      [I 2022-03-03 11:57:26.295 JupyterHub spawner:2620] Deleting pod dev/jupyter-bob
hub      [W 2022-03-03 11:57:26.349 JupyterHub base:1073] User bob server stopped, with exit code: 1
hub      [I 2022-03-03 11:57:26.349 JupyterHub proxy:309] Removing user bob from proxy (/user/bob/)

I will soon add docs to this


Notification sound not playing

Notification ringtone is not played when new mail is available.
LED blinks and phone vibrates as expected.
Relevant logs:
04-11 13:11:00.760  7780  7810 V ImapSync: About to notify listeners that we got a new small message N1:h24:41
04-11 13:11:00.762  7780  7810 D K9      : Broadcasted: action=com.fsck.k9.intent.action.EMAIL_RECEIVED account=N1 folder=h24 message uid=41
04-11 13:11:00.779  7780  7810 W Notification: Use of stream types is deprecated for operations other than volume control
04-11 13:11:00.779  7780  7810 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
04-11 13:11:00.790  7780  7810 D Notification: allPendingIntents
04-11 13:11:00.800  7780  7810 W Notification: Use of stream types is deprecated for operations other than volume control
04-11 13:11:00.800  7780  7810 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
04-11 13:11:00.802  7780  7810 W Notification: Use of stream types is deprecated for operations other than volume control
04-11 13:11:00.802  7780  7810 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
04-11 13:11:00.809  7780  7810 D Notification: allPendingIntents
04-11 13:11:00.809  7780  7810 D Notification: allPendingIntents

Environment:

K-9 Mail version: 5.600
Android version: 8.0.0
Device: Samsung S7
Account type: IMAP

K-9 Mail 5.800 uses new notification APIs. So this is probably no longer relevant.


Break immediately when inflate exactly reaches the end of the buffer.

This PR adds a extra Z_STREAM_END check for inflate status to break immediately when it exactly reaches the end of the output buffer.

Thank you!


[BUG] No pointcloud2 messages even after launching the stereo launch file on turtlebot4

Describe the bug
I get no messages when I echo /stereo/points topic.  Here is the bug report when launching ros2 launch depthai_examples stereo.launch.py .
**System information"
I am using ROS2 galactic on Turtlebot4 (ubuntu 20.04).
Attach system log

Hi,
stereo_inertial_node.launch.py output is as follows:

I launched mobile_publisher.launch.py. The outputs (rgb images) are fine.
However, yolov4_publisher.launch.py doesn't output any messages on topic /color/yolov4_Spatial_detections
I am using the latest depthai ros drivers for galactic. Is there a specific launch file I should use? rgb_stereo_node.launch.py also doesn't give pointclouds.

Hi, can you try running stereo_inertial_node or depthai-ros-driver to see if you get output on stereo topics via these launch files?

Hi, I wanted to add that I think depthai_ros_driver launch files are not available for galactic. I only have these.


Initial support for std::error_code

Initial support for error_code overloads.
@prince-chrismc Wanna take a quick look to check if I maybe missed something ?

Thank you for the invite firstly! I want to help make this project successful

Well since you already touched/wrote like half of the codebase and I never had any real complaints I think thats just fair.

I noticed the exceptions and now the error_codes for the "algorithms" are outside of that namespace, would you think they could be moved to that namespace?

I though about that, but if you have catch blocks moving it means users have to change their code. But thinking about it we have breaking changes for the next release anyway.

I though about that, but if you have catch blocks moving it means users have to change their code.

:100: it does not add to the UX either,

But thinking about it we have breaking changes for the next release anyway.

I don't actually see any API breaks, it might be worth reviewing to make sure. Very little test code changed.

I think its a good thing to keep all the error stuff together in its own namespace, rather than putting it in the algorithm namespace.

I am certainly in favor of that!

Maybe we could move all exception types to the error namespace and just typedef them in the jwt namespace ?

Maybe we could move all exception types to the error namespace and just typedef them in the jwt namespace ?

namespace error
{
    //rsa_expection...
    //ecdsa_expection...
}

using rsa_exception;
using ecdsa_expection;

:thinking:
That would be a great alternative!

Looking at the coverage the biggest missed count goes to failed openssl calls. which is not exactly easy to test.
Perhaps a few of them could be marks with these so they are not counted

Looking at the coverage the biggest missed count goes to failed openssl calls. which is not exactly easy to test.

I already have a unit test in the working to test those. However it's a bit hacky, so I'd like to clean it up a bit more and do it in a different PR. Basically what I do is I override all OpenSSL functions we use and have a bitmask which decides when it should fail. If it should fail I return one of the error codes as documented by Openssl and if not I call the original function. However this method only works on linux, which is fine I guess ?

However this method only works on linux, which is fine I guess ?

Absolutely, if we add windows tests, that can always be #ifndef _WIN32 to remove them

@prince-chrismc Think I can merge this ?


The authorization scheme for HTTP Basic Authentication should not be case sensitive

Description
Basic authentication in CouchDB expects auth-scheme in Authorization to be case sensitive and equal to "Basic".
According to HTTP Authentication RFC2617 it should be case-insensitive.
From section 1.2, emphasis is mine:

HTTP provides a simple challenge-response authentication mechanism
that MAY be used by a server to challenge a client request and by a
client to provide authentication information. It uses an extensible,
case-insensitive token to identify the authentication scheme...

Steps to Reproduce
This is from dev instance with temp creds:
$ curl http://localhost:15984/test1 -X PUT -H'Authorization: basic YWRtaW46YWRtaW4='
{"error":"unauthorized","reason":"You are not a server admin."}

$ curl http://localhost:15984/test1 -X PUT -H'Authorization: Basic YWRtaW46YWRtaW4='
{"ok":true}

 $ curl http://localhost:15984/test1 -X GET -H'Authorization: BASIC YWRtaW46YWRtaW4='
{"error":"unauthorized","reason":"You are not authorized to access this db."}

 # curl http://localhost:15984/test1 -X GET -H'Authorization: Basic YWRtaW46YWRtaW4='
{"db_name":"test1", ...

Expected Behaviour
Header Authorization for basic authentication should accept all  "Basic", "basic" and "BASIC" auth-scheme as valid.
Your Environment

CouchDB version used: HEAD of 3.x branch
Browser name and version: curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Operating system and version: Darwin 19.6.0 Darwin Kernel Version 19.6.0

Additional Context

The PR with a fix has been merged.


Relicense tinkering

Consider Relicensing from GPL, upcoming V5 and being 2 core devs is a good opportunity.
This is an open discussion.
Proposed options:

MIT like Nim :arrow_right:  https://tldrlegal.com/license/mit-license
PPL :arrow_right: https://tldrlegal.com/license/peer-production-license

Criticism for GPL3:

Viral by design.
Software can be Patented.
Source must be included with Binary.
If the core framework is GPL everything else should be GPL.
https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)

MIT description:
A short, permissive software license.
Basically, you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.
It may be harder or impossible to economically sustain in the long run compared to PPL.
PPL description:
The Peer Production License is derived from the Creative Commons ‘Attribution-NonCommercial-ShareAlike’ license.
However unlike CC-BY-NC-SA, PPL demands reciprocation (whether monetary or otherwise) from non-contributing commercial entities (AKA Big Corporations) whilst fostering "Open Cooperativism" on open source community.
Enables capital-accumulation for commons-oriented open peer production models
(Freelancers, Cooperatives, Independent Workers, Remote Workers, Small Businesses, etc).
Is a relatively new license, and a lot of people dont know it yet, but has a lot of potential for the future (much like Nim itself). Nim is older than PPL.
The Problem PPL solves:
How to ensure that the project doesn’t just become free development for private corporations?
The Peer Production License is a reciprocity-based license by which commons are freely accessible to those who contribute to create them,
while third party non-contributing entities profiting from these commons can be charged a license fee to sustain the project in the long run.
It helps protect digital, natural and biological resources ,
such as software, hardware, designs, seeds, plants, ancestral knowledge and more goods against the danger of privatization, while enable and incentive their wider use.
Developers can not earn a living from exclusivity of "intellectual property",
neither Copyleft licenses like the GPL, nor Copyright like Proprietary, can solve,
then PPL aims to create 'ethical' entrepreneurial coalitions, solidarity economy,
and similar real world best practices (the idea comes from open source software cooperatives).
As seen it covers beyond software as compared to MIT and older licenses.
My view:
I really like PPL, is like a more real-world MIT,
where people needs to pay rent but at the same time loves open source,
where big corporations may just rename your project when it becomes popular and sell it without giving back a cent.
Having said that, I also consider MIT to be pretty good, and have no problem on using it too.
What do you think @ThomasTJdev :grey_question:

The PPL is new to me, but it sounds really good. I'm well aware of the problems with GPL, but at the time, I thought it was my best option, to obtain the same possibilities as the new PPL.
1
Have you found any examples on other software using the PPL?
2
I'm having a hard to time understanding this paragraph from the PPL:
Who are the worker-owners - is it us? Is it the business developing?
c. You may exercise the rights granted in Section 3 for commercial purposes only if:
  i.  IANAL so I don't know, if he has a vote in this?
https://github.com/ThomasTJdev/nim_websitecreator/pull/5
https://github.com/ThomasTJdev/nim_websitecreator/pull/6
https://github.com/ThomasTJdev/nim_websitecreator/pull/7
https://github.com/ThomasTJdev/nim_websitecreator/pull/8

1
I dont know, I never found a search engine that indexes licenses properly,
even if you can search for BSD theres 0-clause BSD, 1-clause BSD, 2-clause BSD, 3-clause BSD, 4-clause BSD, 5-clause BSD, and they are different licenses (of the same family).
Some are here but barely as an example http://wiki.p2pfoundation.net/Peer_Production_License#Examples:_Directory_of_Adopters
Most people tends to just go with whatever the Git page chooses as default sadly.
2
Worker or owners is us. We work on the project.
Business or collective is the development.
The wording is because its meant to work for other stuff like open hardware, etc.
3
If he has Repo push permissions, Yes.
If he has No Repo push permissions, No.
Technically you do the merge on his behalf.
Hes a cool person anyways I dont think he will make drama.
:slightly_smiling_face:

Fixed on https://github.com/ThomasTJdev/nim_websitecreator/pull/39

License in nimwc.nimble and nimble packages are not the same:
https://forum.nim-lang.org/t/4703
"... The license for the nimwc module is incorrectly identified as "GPLv3" in nimble metadata, but it's actually the PPL as well. ..."

He just a Troll, he wastes time on Trolling and Boycotting all Projects on GitHub,
he dont even code Nim, I think Nim community is smarter than than that.

Going back to the point, is that a Cache somewhere :grey_question: I search on my IDE and cant find "GPL" :grey_question: Feel free to push the Fix directly if you know what it is.
:slightly_smiling_face:

It was in the nimble package.json - pushed a PR.

For Historical reasons:
IBM steals all Flickr user photos to train and sell Proprietary IA,
without permission from Flickr nor the users, including user classification by Race and Skin color,
uses may include facial recognition of "potential" threats (airports, borders, etc). Ok by its License.
https://www.theverge.com/2019/3/12/18262646/ibm-didnt-inform-people-when-it-used-their-flickr-photos-for-facial-recognition-training

Closing


I would like it if PowerToys could make it easier to write em dashes

Description of the new feature / enhancement
I would like the feature to make it easier to write certain characters such as "—".  The feature to set up such a shortcut ourselves, or an intuitive and easy-to-understand table of characters to pick from are some ways to achieve this. If not the ability to make intricate macros in the program, I would like to at least have some way to make shortcuts to the more hidden characters in computers.
Scenario when this would be used?
Quick access does work, but it is annoying and time-consuming to use it. Not only that, but it is hard to differentiate the different dashes. I don't care if it is a new table of shortcuts or just a way to make better shortcuts and macros, but I would like to have this as a feature in Microsoft PowerToys, as I feel it would be a good addition and I think it would fit the theme, whatever way you implement it.
╔╩╗
╚╦╝
╔╩╗
╚╦╝
╔╩╗
╚╦╝
The most important to me is the em dashes, but it would be interesting to see what other improvements can be made from this.
Supporting information
No response

Unless I'm mistaken, the em-dash should be available in Quick Accent, under the "normal' dash key. /needinfo

it is hard to differentiate the different dashes

In the Setting you can select to show the names of characters under the visual. Would that help?

/needinfo

In the Setting you can select to show the names of characters under the visual. Would that help?

Found it. This helps with the problem that I reached out for but still doesn't help with other characters that are not on my keyboard. Also, I don't understand why it always starts at the left when using space, as this alone makes it faster for me to use "alt 0151" than to move my hand to the arrow keys. I am getting nickpicky, and this did in fact satisfy most of what I need for what I am using it for. Thank you, Jay.


More general variant substitution

This change is in response to item #488
This changes visible behaviour and documentation
The following changes are proposed:

Variant substitutions have a short and variant form
The variant form always prepends variant_ before the variant identifier/key
The short form will only be added if the replacement key isn't already taken
A warning will be visible in the console output to notify the user that only the variant form will be available for substitution for that particular variant
For backward compatibility: The buildLabel replacement key will still be added, if a variant named buildType is detected
Behaviour is undefined, if the user defines a variant with the variant_ prefix

The purpose of this change
The previous implementation only added a special case for buildType collision. With that I mean, that if the user defined a variant also named buildType, the driver would add the replacement key as buildLabel, since buildType was already taken.
While this behaviour is correct, the implementation didn't account for other possible name collision that could occur, leading to possible overriding of the replacement value for the colliding replacement key.
The implementation in this PR tries to fix that, by providing a short and variant/long form for each defined variant. I decided to provide both, so that the user has the option to always use the variant form, since it will always be available.
Feedback for improvements are welcome!

This gets me thinking about maybe just dropping the short-form completely, and maybe using variant: as the replacement prefix instead of variant_. That would match the special-syntax for command: and env:. What do you think? It wouldn't be a ton of work for users to update their configs with the new syntax, and there would be minimal risk of naming collision.

That is a viable option to consider.

@vector-of-bool I have implemented your suggested syntax.


Add-nil-checks-for-sql-database-instance-flattening.patch

This patch adds nil checks on certain flattening functions.
Presumably, this is not necessary when the provider is run against terraform, indicating a bridge bug.
Tests
None
Recommendation
This patch seems safe to leave as is.
On an infinite time scale:
We should check if the nil check is still necessary. If it is not, we should remove the patch. If it is, we should open a bridge bug to run down the discrepancy, then remove the patch.

Here's a program to check if the behavior has improved:
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

// Create a new Google Cloud SQL Database Instance
const instance = new gcp.sql.DatabaseInstance("my-instance", {
    name: "my-instance",
    databaseVersion: "MYSQL_5_7",
    region: "us-central1",
    settings: {
        tier: "db-f1-micro",  // Choose an appropriate tier
        backupConfiguration: {
            enabled: true,
            startTime: "07:00",
        },
    },
    deletionProtection: false
});
//
// const inst = gcp.sql.DatabaseInstance.get(
//     "my-instance-gah",
//     "my-instance",
//     {project: <insert-project-name>}
// );
// export const version = inst.databaseVersion;

Build a provider without the patch
Run pulumi up using the local provider
Uncomment the .get function and re-run pulumi up

You should see an error or a success; not a panic.
Importantly, the {project: "foo"} line is responsible for this bug.


Tooltip flashes when search bar is focused

Go to NPC recipes view
Make sure search bar is focused
Hover over any item, it'll flash

This is no longer an issue


bigtable/bttest: make data stateful

Hi,
[this is feature proposal on bttest]
bttest implements table in memory,
https://github.com/GoogleCloudPlatform/gcloud-golang/blob/master/bigtable/bttest/inmem.go#L653
which works pretty well and fast.
Storing things in modern machines are not a problem, but we will lose them once we restart bttest server.
If we keep data in disk, here are pros and cons that I can merely think of:
Pros:
the data is more stateful. we won't lost any things unless the dumped file is corrupted.
Cons:
it could take time to dump table into disk, but mmap could be helpful.
how do you think about that?

I don't think that's a direction that bttest is going to take. It's always been an in-memory fake simulation. It isn't intended for actual use, only for testing.


Update CoherentContracts.netkan

Closes https://github.com/KSP-CKAN/NetKAN/pull/2858

Merging with my thanks

I should put that into a folder.. 1 sec


Use libp2p 0.6.0 instead of a custom branch

Most notably, this modifies the logic of Kademlia to be conforming to the libp2p Kademlia. Queries made by nodes-after-this-PR against nodes-before-this-PR and vice-versa may be flaky.
Because of this change, we also replace the Kademlia initialization process with more random queries.

The CI failure seems unrelated to this PR.

@tomaka Please merge master to fix CI.