asdl syntax generation

Implementation of #1279
Asdl parser is implemented here. It's not quite robust in cases of invalid asdl input right now but valid asdl is ok. I will fix this issues later.
I have completely removed ast section from the gramma.ron and split it to syntax.asdl and traits.ron. I'm not pretty sure about traits.ron. We can move this traits implementations from the generation process to the separate rs file. It's rather compact in the rust code as in ron notation.

Cool!
I definitely like how syntax.asdl looks like. I think there's a real value in using a language-independent tool here.
I am somewhat worried about complexity here: asdl is not exactly a well-known technology... Additionally, we now have one more crate that we need to update once rowan changes (and I think I want to make another API-breaking change soon...)
In terms of traits, I wonder if we should just infer them?
StructDef = visibility? name? body?

VisibilityOwnerTrait = visibility?

Then, at the generation time, we automatically implement VisibilityOwner for all types with visibility?

Yeh, asdl is not well-known but is simple and straightforward. To be honest current solution with  gramma.ron is not bad at all. Using of ASDL will reduce the amount of duplications in notation but it's not astonishing. ASDL is more compact and observable to my mind.
About rowan. I can postpone this PR until this rowan API-breaking change and I will fix it according this changes. Or do you mean I should not use rowan at all?
About traits. I had the same thought but this will complicate template logic. We must to distinguish at the template what fields(asdl notation) will be simple methods and what fields will be traits implementation. I can reimagine of my crate model to simplify it some how. Before this it will be good to know will this work helpful or asdl will not be used anyway?

Cool!
I definitely like how syntax.asdl looks like. I think there's a real value in using a language-independent tool here.
I am somewhat worried about complexity here: asdl is not exactly a well-known technology... Additionally, we now have one more crate that we need to update once rowan changes (and I think I want to make another API-breaking change soon...)

I'm going to support asdl-rs crate. So I will make changes with new rowan as quick as possible.

In terms of traits, I wonder if we should just infer them?
StructDef = visibility? name? body?

VisibilityOwnerTrait = visibility?

Then, at the generation time, we automatically implement VisibilityOwner for all types with visibility?

Ok. I've made something like this in last changes. Please, take a look. Additionaly I've added comment support to asdl-rs and wrote some comments in syntax.asdl

Sorry for letting this slip for a whole! I'll try to come back to this soon.

About traits. I had the same thought but this will complicate template logic. We must to distinguish at the template what fields(asdl notation) will be simple methods and what fields will be traits implementation.

This could be done in a simpler way I think: always treat fields as inherent methods, and, for traits, generates code that just forwards to inherent method:
trait VisbilityOwner {
    fn visibility(&self) -> Option<Visibility>
}

impl VisibilityOwner for StructDef {
     fn visbility(&self) -> Option<Visibility> { self.visibility() /* calls inherent method */ }
}

About rowan. I can postpone this PR until this rowan API-breaking change and I will fix it according this changes. Or do you mean I should not use rowan at all?

Yeah, I think that maybe not using rowan will be a good choice for a lightweight codegen-oriented library. It would be both simpler and more convenient to produce a traditional AST.

And yeah, I think it's best to postpone this work at least until the rowan refactoring is completed (https://github.com/rust-analyzer/rowan/pull/22). I am still on the fence about needing this at all, but, if it is possible to move all trait stuff in asdl and completely kill ron, I am leaning towards yes.

And yeah, I think it's best to postpone this work at least until the rowan refactoring is completed (rust-analyzer/rowan#22). I am still on the fence about needing this at all, but, if it is possible to move all trait stuff in asdl and completely kill ron, I am leaning towards yes.

gramma.ron will keep holding some token information anyway. There is not way to move this to asdl I guess.
For now I'm going to follow your suggestion to get another parser.

And yeah, I think it's best to postpone this work at least until the rowan refactoring is completed (rust-analyzer/rowan#22). I am still on the fence about needing this at all, but, if it is possible to move all trait stuff in asdl and completely kill ron, I am leaning towards yes.

So I've made some changes.

Reimplemented parser using nom crate. You were right. It's quite easier than with rowan.
I've reimplemented the way of generating traits implementation in template.
It's like a duck typing right now. If some type has the same fields like in trait declaration I generate implementation.
In fact we can generate traits declaration from asdl as well. But we have some traits with additional logic implemented (e.g. DocCommentsOwner) I don't know right now how to get rid of it.
With changes it traits implementation there are become many unused imports in project. I've fixed it in the separate commit to make review easier.

gramma.ron  still contains token parts of gramma. May be we should rename  it to tokens.ron or something.

So, I think we should do that, but I hate to say that we need more work to do before I feel comfortable switching off from grammar.ron :) I also want to do several unrelated refactorings of ast generation, and they will conflict with this work.
My primary concern is that asdl-rs does not seem fully finished and polished crate at the moment. @pasa let's put this PR on hold for a moment, and I'll create several issues on the asdl repo to make sure that it's an 1.0 quality crate!

So, I think we should do that, but I hate to say that we need more work to do before I feel comfortable switching off from grammar.ron :) I also want to do several unrelated refactorings of ast generation, and they will conflict with this work.

My primary concern is that asdl-rs does not seem fully finished and polished crate at the moment. @pasa let's put this PR on hold for a moment, and I'll create several issues on the asdl repo to make sure that it's an 1.0 quality crate!

I agree that is looks more like prove of concept. And some work is need to be done.
It would be great to have an external view to asdl-rs. Thanks.

FWIW, I've opened a bunch of issues at https://github.com/pasa/asdl-rs/issues :)

FWIW, I've opened a bunch of issues at https://github.com/pasa/asdl-rs/issues :)

See it. Will do my best.

So, I think we should do that, but I hate to say that we need more work to do before I feel comfortable switching off from grammar.ron :) I also want to do several unrelated refactorings of ast generation, and they will conflict with this work.
My primary concern is that asdl-rs does not seem fully finished and polished crate at the moment. @pasa let's put this PR on hold for a moment, and I'll create several issues on the asdl repo to make sure that it's an 1.0 quality crate!

So. I have closed opened issues in asdl crate and reimplemented codegen according resent changes in rust-analyzer.
Please have a look.

@pasa I've looked at the ASDL crate, and it looks just right at the moment! I've left only a couple of small comments

Let's switch this to the published version of ASDL, and I think it should be good to go?

@pasa I've looked at the ASDL crate, and it looks just right at the moment! I've left only a couple of small comments

Thanks for comments. I've made corresponding changes.
Am I right that I need to publish asdl crate to the crates.io first?

right, I think it's important for reproducibility that we only use crates
from crates.io
On Mon, 9 Sep 2019 at 13:40, Sergey<EMAIL_ADDRESS>wrote:

@pasa https://github.com/pasa I've looked at the ASDL crate, and it
looks just right at the moment! I've left only a couple of small comments
Thanks for comments. I've made corresponding changes.
Am I right that I need to publish asdl crate to the crates.io first?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rust-analyzer/rust-analyzer/pull/1469?email_source=notifications&email_token=AANB3M54WPM3ZEK4G37RORDQIYRYTA5CNFSM4H4ZDXU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6HCOII#issuecomment-529409825,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANB3M37OYA6E4W7AQTEANTQIYRYTANCNFSM4H4ZDXUQ
.

right, I think it's important for reproducibility that we only use crates from crates.io

Yeh. Did it.
This is my first crate on crates.io :tada:

Ok, now that with WASM PR merged, I am getting closer to reviewing this finally. However, with the recent work on the AstBuilder, I've stumbled upon one more open question. At some point, we'd want to generate AST builders and editors as well. That is, with the API like
let fields = RecordFieldList::new()
  .field("foo", TypeRefBuilder::new_unit())
  .field("bar", TypeRefBuilder::new_i32())
  .build();

we should get
{
  foo: (),
  bar: i32,
}

Note that we don't specify {} explicitly, but they are present in the result. This means that we somehow should add info about terminal in the source for generation....

we need to check how Swift libsyntax handles this

we need to check how Swift libsyntax handles this

As I can see in Swift SyntaxFactory API they use tokens like {, } or = explicitly.  LIke this one:
// A 'typealias' keyword with one space after
auto TypeAliasKeyword = SyntaxFactory::makeTypeAliasKeyword({}, Trivia::spaces(1));

// The identifier "Element" with one space after
auto ElementID = SyntaxFactory::makeIdentifier("Element", {}, Trivia::spaces(1));

// An equal '=' token with one space after
auto Equal = SyntaxFactory::makeEqualToken({}, Trivia::spaces(1));

// A type identifier for "Int"
auto IntType = SyntaxFactory::makeTypeIdentifier("Int", {}, {})

// Finally, the actual type alias declaration syntax.
auto TypeAlias = SyntaxFactory::makeTypeAliasDecl(TypeAliasKeyword,
                                                  ElementID,
                                                  EmptyGenericParams,
                                                  Equal,
                                                  IntType);
TypeAlias.print(llvm::outs());

Take a look at Equal.
I guess we can add tokens or maybe subset of tokens to the asdl and map them to syntax kinds at code generation. For example:
recordFieldList = (lCurlyToken, recordField* fields, expr? spread, rCurlyToken)

In this case we can generate expected builder Api I guess. But may be there are more complex examples where this approach doesn't work.

@matklad what AstBuilder you are talking about?

It was renamed to Make earlier today:
https://github.com/rust-analyzer/rust-analyzer/blob/bb467b857eabb0c930316ff066b30c395d7fa63b/crates/ra_assists/src/ast_builder.rs
On Wed, 25 Sep 2019 at 16:41, Sergey<EMAIL_ADDRESS>wrote:

@matklad https://github.com/matklad what AstBuilder you are talking
about?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rust-analyzer/rust-analyzer/pull/1469?email_source=notifications&email_token=AANB3M6SXGZXJGGGLJY7P2LQLNTBNA5CNFSM4H4ZDXU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7R6H2A#issuecomment-535028712,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANB3M225MEUBCTTHNSN7RTQLNTBNANCNFSM4H4ZDXUQ
.

It was renamed to Make earlier today: https://github.com/rust-analyzer/rust-analyzer

@matklad Am I understand your idea correctly?
You are going to replace this Make code with some generated builders and replace ast_node_from_file_text with direct using of SyntaxTreeBuilder?

Yes, that is something I'd love to do, but I still don't have a clear idea
how, or wether it's a good idea in the first place!
On Wed, 25 Sep 2019 at 17:40, Sergey<EMAIL_ADDRESS>wrote:

It was renamed to Make earlier today:
https://github.com/rust-analyzer/rust-analyzer
@matklad https://github.com/matklad Am I understand your idea correctly?
You are going to replace this Make code with some generated builders and
replace ast_node_from_file_text with direct using of SyntaxTreeBuilder?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rust-analyzer/rust-analyzer/pull/1469?email_source=notifications&email_token=AANB3M52YDCV5Q2IC5KXJX3QLNZ37A5CNFSM4H4ZDXU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7SEYGQ#issuecomment-535055386,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANB3M5PIW5M4UOPSCX25BTQLNZ37ANCNFSM4H4ZDXUQ
.

Yes, that is something I'd love to do, but I still don't have a clear idea how, or wether it's a good idea in the first place!

Ok. I will make some proof of concept right here. May be it will looking good.

@matklad I've implemented builders generation close to your suggestion.
It looks like this
 let fields = RecordFieldDefList::new()
            .field(RecordFieldDef::new().name(Name::new("foo")).ascribed_type(TypeRef::new_unit()))
            .field(RecordFieldDef::new().name(Name::new("bar")).ascribed_type(TypeRef::new_i32()))
            .build();

You can see an example in this test
The main idea is to specify tokens in asdl like this:
recordFieldDef = (visibility?, name?, colon, attr* attrs, commentIter doc_comments, typeRef? ascribed_type)
recordFieldDefList = (l_curly, recordFieldDef* fields, comma*, r_curly)

I have a special case here as well. We should separate each recordFieldDef by comma. Asdl do not support tuples so I decided to handle the pair of node and followed token with the same arity as a implicit tuple. Like this recordFieldDef* fields, comma*.
There are many nodes in current ast structure that doesn't have any children specified. I have implemented noop builders for them right now here. We can specify theirs structure in asdl or implement builders by hand like i've made for Name or Label
The main issue of this implementation I see that builders structure is allocated in heap via Box. Structure is recursive and rustc doesn't compile it without Boxes.
May be there is much more clever way to handle this.
Please, take a look of this stuff on a spare time.
Thanks.

I've reimplemented builders without heap allocation. It's more like iterator chains in std. Looks promising.
Here are a couple of tests with example of usage
One disadvantage of this approach that I can't check fields arity and order of nodes at API level at compile time. It's up to user right now. I could implement some runtime check but I'm afraid it's impossible without heap allocations. I'm not sure that we need such checks. This is not a public API and can be not foolproof.

Just a sad note that i am falling behind reviewing this PR, as more high priority work keeps coming in :(

Not a problem. I will keep it up to date from time to time.

I've decided to pursue a different approach in the end. In https://github.com/rust-analyzer/rust-analyzer/pull/2743/, I removed all generic tree generation in favor of a generation from a hard-coded rust-datastructure (which is delcared by a macro). This removed ron and serde dependencies from cargo xtask install, which should make the installation procedure somewhat faster.
Sorry for going back and forth on this one!

Not a problem. I had a feeling that asdl is not fit for this task too. Anyway, thanks for reviewing my code. I learned a lot.


Mac (native) TextField missing characters and other native targets have character spacing issues

Describe the bug
When rendering TextFields on native Mac sometimes lines are truncated, other times characters are just missing and on other native targets (tested iOS, Android and Mac) there are certain characters such as 'T' that have extra trailing space that makes it look odd within a word. This is useing the latest development branches of OpenFL and Lime - but other earlier branches exhibited similar issues. This is using the _sans font but _serif and other fonts show the same problem.
To Reproduce
Example code:
package;

import openfl.display.Sprite;
import openfl.events.Event;
import openfl.events.MouseEvent;
import openfl.text.Font;
import openfl.text.FontType;
import openfl.text.FontStyle;
import openfl.text.TextField;
import openfl.text.TextFormat;
import openfl.text.TextFormatAlign;
import openfl.Assets;

class Textty extends Sprite {

	var format:TextFormat;

	var X = 50;
	var Y = 50;
	var STEP = 30;

	public function new () {

		super ();

		// format = new TextFormat(Assets.getFont("fonts/Roboto-Regular.ttf").fontName);
		format = new TextFormat("_sans");
		// format = new TextFormat("_serif");

		createTF( "FONT = "+format.font );
		createTF( "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;'\\[]`§~±" );
		createTF( "abcdefghijklmnopqrstuvwxyz!@£$%^&*()-=_+{}:\"|<>?" );
		createTF( "ABCDEFGHIJKLMNOPQRS TUVWXYZ0123456789 ,./;'\\[]`§~±" );
		createTF( "abcdefghijklmnopqrs tuvwxyz!@£$%^&*() -=_+{}:\"|<>?" );
		createTF( "GHIJKLMNOPQRSTUVWXYZ0123456789,./;'\\[]`§~±" );
		createTF( "ghijklmnopqrstuvwxyz!@£$%^&*()-=_+{}:\"|<>?" );
		createTF( "TUVWXYZ0123456789,./;'\\[]`§~±" );
		createTF( "tuvwxyz!@£$%^&*()-=_+{}:\"|<>?" );
		createTF( "TEXTTEST © texttest" );
		createTF( "SPACE ©" );
		createTF( "space ©" );
		createTF( "NOSPACE©" );
		createTF( "nospace©" );
		createTF( "THIRD Third third" );
		createTF( "SECOND Second second" );
	}

	function createTF( txt:String, size:Int = 20, color:Int = 0 ):TextField {
		var textfield = new TextField();
		textfield.embedFonts = true;
		format.size = size;
		format.color = color;
		textfield.defaultTextFormat = format;
		textfield.text = txt;
		textfield.x = X;
		textfield.y = Y;
		textfield.width = textfield.textWidth + 20;
		textfield.height = textfield.textHeight + 5;
		textfield.background = true;
		textfield.backgroundColor = 0xe0e0e0;
		addChild( textfield );
		Y += STEP;
		return textfield;
	}
}

Expected behavior
HTML formatting seems fine and can be seen on the left of the screenshot. In the middle is Android that shows some of the character spacing issues - especially 'T' both upper and lowercase. The right-hand side shows the Mac version. I've highlighted in red the missing texts/characters.
Screenshots

OpenFL Targets
Mac (native) mainly but other native targets such as iOS and Android.
Additional context
None

Can you add the following to your project.xml, after where you include openfl?:
<haxedef name="openfl_trace_text_layout_groups" />
This will trace some text metrics that will be helpful for us in debugging the issue. It'll be easiest if you reduce your text to the minimum that still shows an issue, like tf.text = "THIRD Third third;.

Sorry my brain is processing this in streams. Mac currently doesn't support Unicode (#2450), and I don't have a Mac to try to figure out a solution with. That's probably borking up your test there at least.

Thanks for getting back to me. As requested, here are the outputs from the layer group metrics:
For HTML5
LG 0,line:0,w:130.595703125,h:24,x:2,y:2,"FONT = _sans",0,12
LG 0,line:0,w:546.640625,h:24,x:2,y:2,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;'[]`§~±",0,48
LG 0,line:0,w:156.689453125,h:24,x:2,y:2,"THIRD Third third",0,17
For native Mac
LG 0,line:0,w:132.640625,h:23,x:2,y:2,"FONT = _sans",0,12
LG 0,line:0,w:688,h:23,x:2,y:2,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;'[]`§~±",0,48
LG 0,line:0,w:161,h:23,x:2,y:2,"THIRD Third third",0,17
Note: there were a few more duplicates of these lines for both.
In terms of the font kerning, when using an embedded font, the same problems with kerning are apparent on native but not HTML5 - so it should be the same font being used on all targets and not a font specific problem that I can see.
Yeah - looking at some of the situations where the text seemingly get chopped - it may be likely due to subsequent multibyte UTF8 chars and stopping a couple a chars previous - e.g. §, £ or the copyright symbol.

I will say, our Harfbuzz text shaper is several years and at least hundreds of commits behind the latest. The fact that the kerning isn't happening on Android either means the kerning info isn't present in the loaded font OR there's a bug in that library on Android or something to that effect. The first still seems more likely to me tbh, but we can't rule out the latter.
On an experimental target, we found that loading a font left out the height info, and it was a problem at the SDK level. That's why I'm leaning that way. We can prioritize updating Harfbuzz, since we're more than a major version behind now.

I am having the same problem with Windows, Mac and Android targets

Oh y'know what, this might be caused by a recent change. I'll look into it.


CRI server miss handling ESRCH error

Description
Currently, when the cri server kills a task, it doesn't handle the ESRCH error. Instead, it expects the shim to translate it to IsNotFound. However, kata shim currently doesn't translate the ESRCH, which sometimes causes shim fail to exit, as describe in this issue. We can add the translation logic into the kata-shim, but we wonder if it's more correct behavior to have the cri server check ESRCH error instead.
cc @egernst
Describe the results you received and expected
The containerd cri server should handle ESRCH error when killing a task.
What version of containerd are you using?
containerd github.com/containerd/containerd 1.4.12+azure-2 7b11cfaabd73bb80907dd23182b9347b4245eb5d
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response

The error should be handled in shim plugin side. The runC shim has ignored such error. I think the Kata-Agent also should handle it.
And one more thing is that if there is ESRCH error, it means that the target process is dead and kata shim should return exit event from Wait API.
So I don't think it should be handled in containerd side.

I saw it has been fixed in kata-container side https://github.com/kata-containers/kata-containers/pull/3875
Closing


Data corruption due to source-of-truth mismatch

When the client and the server disagree about the value of a ref, and the node has a $timestamp value newer than what the server provides, it is possible to cause cached data to be overwritten with atoms of undefined.
Although setting refs with a $timestamp value on the client is not explicitly supported, we want to avoid corrupting cached data.
More investigation is needed to define reproducible steps to trigger.

We don't understand that

🗣BP official spokesman: We are about to be exposed to an explicit attack by an organizer E5

🗣Zero Trust Team With a tweet in the program X
(No one can break the system’s protection. We are right here. There is no law that deters us, and no one can do that.”)
BY:E5


Images don't display without human input

Describe the bug
When having images on the marque they don't display after some time until there is input form a human. The images also do not show the alt tag. It happens both on mobile phones and on desktops.
To Reproduce
<template>
 <vue3-marquee :duration="images.length * 2" direction="reverse" >
          <div v-for="image in images" style="height: 10rem; width: 10rem">
            <img
              :src="image.url"
              :alt="image.alt"
              width="10rem"
              height="10rem"
            />
          </div>
        </vue3-marquee>
</template>

<script>
export default {
  name: "ImageMarquee",
data() { return {
   images: [
{ url: "https://i.scdn.co/image/ab67616d0000b273582e9468816fb5c756af2e57", alt: "See the Light" },
{ url: "https://i.scdn.co/image/ab67616d0000b273d10aa62551fcacbfcbf080e6", alt: "I Feel Love" },
{ url: "https://i.scdn.co/image/ab67616d0000b27360d6fa857326b42347a02f2f", alt: "Honolulu" },
{ url: "https://i.scdn.co/image/ab67616d0000b273355bf68fa788b6d401195b43", alt: "Birthday" },
{ url: "https://i.scdn.co/image/ab67616d0000b273790ed852cb7ff16f747f1cb0", alt: "Put Your Records On - Extended" },
{ url: "https://i.scdn.co/image/ab67616d0000b27359518e073a73c42b539c016e", alt: "Drug" },
{ url: "https://i.scdn.co/image/ab67616d0000b2733a298c3616105dc74f25f44e", alt: "Spliff Break" },
{ url: "https://i.scdn.co/image/ab67616d0000b273758a3b6adc50476dbf3d854c", alt: "Satellites" },
{ url: "https://i.scdn.co/image/ab67616d0000b273aaf9b6f079044a34219c3f6d", alt: "Insight" },
{ url: "https://i.scdn.co/image/ab67616d0000b273808911b13ac4a9f2767b0327", alt: "You See" },
{ url: "https://i.scdn.co/image/ab67616d0000b273ca430ba8cd161c0b99c555c7", alt: "Virtual Connectives" },
{ url: "https://i.scdn.co/image/ab67616d0000b273fe9c5fb6e783d2e912b8b0e6", alt: "Microwave Love (feat.  Aloe Blacc)" },
{ url: "https://i.scdn.co/image/ab67616d0000b273a59b7f91e32078ab2015ac1e", alt: "Up All Night - Marlin Remix" },
{ url: "https://i.scdn.co/image/ab67616d0000b2734ba905686e42400b51a64964", alt: "Promises - Delusion Remix" },
{ url: "https://i.scdn.co/image/ab67616d0000b273eeaf53d6704e7f2cc10cdfe1", alt: "Yep (DJ Greem Remix)" },
{ url: "https://i.scdn.co/image/ab67616d0000b27306e542a76d9d025ecd441fc0", alt: "I Know" },
{ url: "https://i.scdn.co/image/ab67616d0000b273afe4f3225228970213f04ed4", alt: "Butterfly - HotSix Remix" },
{ url: "https://i.scdn.co/image/ab67616d0000b27333cb38e569c02a7e256d0567", alt: "Bucket" },
{ url: "https://i.scdn.co/image/ab67616d0000b273d390959718fdaab2d460f705", alt: "The Rubberband Man" },
]
}
}
}
</script>

Expected behavior
I expected the images to stay visible.
Screenshots

Desktop (please complete the following information):

OS: Windows
Browser: Vivaldi
Version: 5.2.2623.41 (Stable channel) (64-bit)

Additional context
It is not like the browser could not fetch the image it just decides not to for some reason. There is no alt tag which would indicate that the browser did not fetch the image. Do you think this is an issue with your component?

Your images should not be affected by the marquee. This component is just a container so it should not be affected. I see two potential issues with your img component.

Your img tag width and height attribute should be a number. It seems like you are using a CSS unit that would not work in this case. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-height
You might not have enough content to fill the space. For something like this, you can use the :clone='true' attribute if needed.

Adding a sandbox link here for you: https://codesandbox.io/s/dreamy-hooks-3sq7qo?file=/src/App.vue
All the alt attributes work here as well.

Thank you for the really quick reply! I will let you know if it is not working for me. I had no idea you couldn't use css units in the image props.

It seems like it was indeed the css. It might have also had something to do with the v-img I was using from vuetify. Thank you so much for the jsfiddle that really helped me out!


Add Accordion Component

Not Ready
In light of the discussion around accordions in #243, this PR begins fielding the <Accordion /> component.
Fixes #189

[Current coverage][cc-pull] is 87.38%

Merging [#246][cc-pull] into [master][cc-base-branch] will decrease coverage by 0.92%

@@             master       #246   diff @@
==========================================
  Files            62         64     +2
  Lines           821        848    +27
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            725        741    +16
- Misses           96        107    +11
  Partials          0          0

Powered by Codecov. Last updated by [8cad5a9...465c14a][cc-compare]
[cc-base-branch]: https://codecov.io/gh/TechnologyAdvice/stardust/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/TechnologyAdvice/stardust/compare/8cad5a9c0538996418109cb4100695410217cc21...465c14af007729155730f2f1d7278dac01f52d5d
[cc-pull]: https://codecov.io/gh/TechnologyAdvice/stardust/pull/246?src=pr


fix: Do not send None arguments to uvicorn when reloading.

Pull Request Checklist

❓  New code has 100% test coverage
[x] Pre-Commit Checks were ran and passed
[x] Tests were ran and passed

Description

Fixed a bug resulting in a FileNotFoundError when invoking litestar run with --reload, but without SSL cert or key files.

Close Issue(s)

Fixes #2613

I believe tests/unit/test_cli/test_core_commands.py will need its tests updated

Thanks @sykloid for your contribution! Unfortunately we need to change some things about this and get a hotfix out soon so I created #2616 which supersedes this PR. Hope you don't mind

@all-contributors add @sykloid for bug

@all-contributors add @sykloid for code


fix dependencies badge  which shows out of date

The dependancies badge looks out of date on the main page, only eslint was out of date so I took a look to see if I could update it.

[x] Verified migration doc (nothing to be done) http://eslint.org/docs/user-guide/migrating-to-2.0.0
[x] fixed the eslint errors

Looks good to me, thanks for fixing all the eslint warnings!


MUMUP-1522 : Fix redirect & point at /portal/web

Related : https://github.com/UW-Madison-DoIT/uPortal/pull/318
This is the changes to /web that make the related PR work.
Also cleaned up the redirect if someone has an invalid session.
Note that I would rather https://github.com/UW-Madison-DoIT/angularjs-portal/pull/132 merged before this is merged. This is much easier to cleanup than the other.

:+1: , holding merge until #132 which should now be fast-tracked for this morning. :smile: :racehorse:

:+1:


Terminal only clears with "clear" but doesn't allow "cls"

because it was coded like this:
terminal.py - line: 131
...
if cmd == 'clear':
    return self._clear()
...

if you want to clear the screen also with 'cls' command, you have to add this condition to that line: or cmd == 'cls'.


Connect-IC connect to Central function added

Added Switch -Central (and corresponding -Key) to fetch auth key & api base URI for instances of inContact utilizing Central instead of userhub
Maintains existing functionality of first iteration of function unchanged (though I wasn't able to test the actual connection to userhub as I don't have access to a userhub instance)

Looks good, but I want to make sure I'm understanding. You're still asking for credentials when connecting to a Central instance, but you also have a "$Key" parameter, which you're using as a basic auth header in the "login" call. Is that right? You're not using the $Credential parameter for the login auth?

Yeah - Central requires two components for auth to do admin function whereas Userhub requires just one.
Central requires actual central creds "eg<EMAIL_ADDRESS>with an associated pwd (which is what i'm using the -Credential param for as it's a conventional username and password). This is passed in the body, not as the basic auth header
The second is an "API Authorization Key" which can be used independent of admin function (eg: to spawn a call from a webform). This API auth key is considered insecure as it's also 'commonly' passed in Jquery on a local machine.
The workflow for gathering that API Auth key:

register api application
Concatenate info from api application registration to be used as basic auth. No actual secure passwords here. Concatenated "usename" is not intuitive if we ask for params: $apiVendorName@$apiApplicationName. Similarly with the "password" being the business unit number.
Base64 Encode "$apiVendorName@$apiApplicationName:$businessUnitNumber" and pass as basic auth header

Happy to refactor if you'd like - just need some help in how you'd like the switches handled with this context.

I think given the limited number of users we likely have, this'll be fine.
While we've got this channel of communication open - do you have more coming before we push version 0.4? I'll wait for your answer before accepting/closing this pull request. It'll just be the decider as to whether I push 0.4 straight away or wait for your next batch of changes.

This is what I've got for now - working on building out more of their API Endpoints in the next month or so with a guy I work with. My guess is it'll be at least a week before I get anything else built.

OK knowing you have more to come, and knowing that in isolation just the ability to connect to Central doesn't really add much value, I'll hold off on v0.4 until your next push. Looking forward to it!


Google Tag Manager - variables

[ ] :beetle: Bug Report
[ ] :rocket: Feature Request
[x] :scroll: Documentation Request

Which version of Redux Beacon are you using?

2.0.3

Which target(s) are you using?

[ ] Google Analytics
[ ] Google Analytics (gtag)
[ ] React Native Google Analytics
[x] Google Tag Manager
[ ] React Native Google Tag Manager
[ ] Amplitude
[ ] Segment
[ ] Other/Third Party: ...(please specify here)

:rocket: :scroll: What's missing from Redux Beacon that you'd like to add?
Possibility to add a variable instead of event via target of Google Tag Manager.
Can you help out?

[x] :star2: I am a legend and can get started on a pull request right away given the go-ahead.
[ ] :star: I am a superstar and would like to help out given some guidance.
[ ] :disappointed: I won't be able to help out on this one.

@karolisgrinkevicius Here's the docs file: https://github.com/rangle/redux-beacon/blob/master/docs/targets/google-tag-manager.md

@ttmarek I also cannot see any typescript typings for google tag manager. Afais types are defined in google analytics target.

Yes that's correct. If you like you're more than welcome to add types. But, I'm not sure how useful they'd be. You can pretty much pass anything to the data layer.
By the way, I've merged your docs changes. They should be live on the site now. Thanks again!
⭐ 🎉

Regarding ts types I've ended up using already defined type in redux-beacon. Please see code snippet below:
import { EventsMap } from 'redux-beacon';

export const variables: EventsMap = {
  MY_ACTION: action => ({
    myVariable: action.payload.myValue,
  }),
};

Can you add an example on how it would look a case were events, variables and page views are all mapped in the same EventsMap?


Added Localize HOC

Please review.
Details

Created a HOC named WithLocalize which set the preferredLocale to a list of functions and passes curried methods down to WrappedComponent.
Created one method numberFormat which uses default Browser Intl to convert the number.
Added polyfills for Intl.numberFormat for mobile platforms.

Fixed Issues

Fixes #2176
Tests / QA Steps
Wrap any component with newly created HOC and use the method as props.translations.method(params). Switch the preferred locale for the user(I am not sure How to change the Locale in App) and see this method call should give you output based on the new Locale.
Tested On
I just tested it using console output and manually updating the locale on Onyx.

[x] Web
[x] Mobile Web
[x] Desktop
[ ] iOS
[x] Android

. Switch the preferred locale for the user(I am not sure How to change the Locale in App) and see this method call should give you output based on the new Locale.

So you did not really test this? Right now there's no UI to change the locale, can you do some tests by changing it via code or something like that?

@iwiznia I tested it by loading one other locale file. tried these examples from MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat.
So for simple testing.

Load another locale file. and then call the method with that locale and see the output changes.

Updated. Please review.

To clarify, did you manage to test on iOS? Seems like you did not?

@iwiznia I commented it above.

Ok, I tested it on IOS. You are right. IOS does have Intl support. Check the snap here

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.


Build fails on using typescript version 2.5.3

Versions
Angular CLI: 1.6.1
Node: 8.9.1
OS: win32 x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.1
@schematics/schematics: 0.0.11
typescript: 2.5.3
webpack: error

Repro steps

Step 1
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
Step 2: Global package
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
Step 3: Local project package
rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @angular/cli@latest
npm install

Observed behavior
<EMAIL_ADDRESS>requires<EMAIL_ADDRESS><2.5.0' but 2.5.3 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install<EMAIL_ADDRESS><2.5.0'

To disable this warning run "ng set warnings.typescriptMismatch=false".

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2017-12-19T09:20:43.452Z
Hash: 48fe1adfdd95b36f3f8c
Time: 8233ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 3 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered]
chunk {scripts} scripts.bundle.js (scripts) 156 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 536 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 857 kB [initial] [rendered]

ERROR in Error: No NgModule metadata found for 'AppModule'.
    at NgModuleResolver.resolve (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler
\bundles\compiler.umd.js:20247:23)
    at CompileMetadataResolver.getNgModuleMetadata (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_module
s\@angular\compiler\bundles\compiler.umd.js:15216:60)
    at visitLazyRoute (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler\bundles\c
ompiler.umd.js:31061:104)
    at AotCompiler.listLazyRoutes (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compil
er\bundles\compiler.umd.js:31029:20)
    at AngularCompilerProgram.listLazyRoutes (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@ang
ular\compiler-cli\src\transformers\program.js:156:30)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_m
odules\@angular\compiler-cli\src\ngtools_api.js:44:36)
    at AngularCompilerPlugin._getLazyRoutesFromNgtools (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_mo
dules\@angular\cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:248:66)
    at Promise.resolve.then.then (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\cli\nod
e_modules\@ngtools\webpack\src\angular_compiler_plugin.js:562:50)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

webpack: Failed to compile.

Desired behavior
ng serve should build and execute without any warnings and errors.
Mention any other details that might be useful (optional)
Previous issues created regarding typescript version were closed after creating PRs. Seems like angular-cli does not support typescript 2.5.3 yet. Kindly need the support since Angular version 5.1.0 supports typescript 2.5.3

The typescript warning is off once I downgraded typescript to version 2.4.2. But I still get build error as:
ERROR in Error: No NgModule metadata found for 'AppModule'.
    at NgModuleResolver.resolve (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler\bundles\compiler.umd.js:20247:23)
    at CompileMetadataResolver.getNgModuleMetadata (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler\bundles\compiler.umd.js:15216:60)
    at visitLazyRoute (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler\bundles\compiler.umd.js:31061:104)
    at AotCompiler.listLazyRoutes (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler\bundles\compiler.umd.js:31029:20)
    at AngularCompilerProgram.listLazyRoutes (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler-cli\src\transformers\program.js:156:30)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\compiler-cli\src\ngtools_api.js:44:36)
    at AngularCompilerPlugin._getLazyRoutesFromNgtools (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:248:66)
    at Promise.resolve.then.then (C:\Users\arun-awnics\Documents\workspace\ng2-samples\mm-coming-soon\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:562:50)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Also I get error with webpack installation:
ng --version

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.1
Node: 8.9.1
OS: win32 x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.1
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: error

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

Having same issue after upgrading my project from CLI 1.4.5 to latest

Removing package-lock.json and reinstalling npm packages fixes this issue

@filipesilva I think it would be useful to add this step to CLI upgrade notes :)

@filipesilva I updated angular-cli version to 1.6.3 and typescript version 2.5.3. Its building successfully now. I think they have fixed the issue in latest update. I don't see the warning, neither the error which I was getting before. Thank you for your time. You may close the issue.

@arun-awnics you can close your issue yourself if it is resolved ;)


torch.cuda.OutOfMemoryError: CUDA out of memory

作者您好，我在使用8卡3090，batch_size=1，使用自己的数据集（图像大小为960×768）对huge模型进行训练，出现如下问题：
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1024.00 MiB (GPU 3; 23.70 GiB total capacity; 21.89 GiB already allocated; 116.56 MiB free; 22.27 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
我在程序开头设置了os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:128'，依旧没有解决问题。
在之前的issue中，看到你们的回答，使用4卡3090即可进行训练。
是否是我这边的设置或者参数错误，我该如何解决这个问题呢？

买大显卡

买大显卡

我理解是，其它GPU还有空余的显存，那不应该爆单卡内存呀，它为什么执着在单卡上申请内存。这里不是太明白，大佬能说下这是为什么吗？

In previous simple validations, training the vit_h model requires over 40GB of memory even with a batchsize 1. This is because the batchsize setting in the config refers to the batchsize per GPU other GPUs will not help.

In previous simple validation, training the vit_h model requires over 40GB of memory even with a batchsize 1. This is because the batchsize setting in the config refers to the batchsize per GPU other GPUs will not help.

Thank you for your reply. If I use two 3090 GPUs connected via NVLink, can I train the 'vit_h' model with a batch size of 1?

Sorry, I haven't used NVLink. If the GPU memory can reach 40G, you can also consider reducing the max_nums in config or changing the number of LoRA layers.

Sorry, I haven't used NVLink. If the GPU memory can reach 40G, you can also consider reducing the max_nums in config or changing the number of LoRA layers.

Thank you for your suggestion


Improvements

Various improvements:

PADRs as a separate collection, allow an ADR to reference the PADR(s) which it applies
Colour each tag differently, so it's easier to see ADRs applying to a specific component/service
Avatars for authors

Done only technical/render review. did not checked padr content

@wtrocki the .md/.adoc duplication now fixed.
@pmuir let me know if you're happy with the PADR aspect.

Let's see that in action!


Update play-json to 2.7.3

Updates com.typesafe.play:play-json from 2.7.2 to 2.7.3.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention @scala-steward in the comments below.
Have a nice day!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [{ groupId = "com.typesafe.play", artifactId = "play-json" }]

Codecov Report

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

@@           Coverage Diff           @@
##           master      #52   +/-   ##
=======================================
  Coverage   98.47%   98.47%
=======================================
  Files           8        8
  Lines         131      131
=======================================
  Hits          129      129
  Misses          2        2

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 4f7a117...029c5f1. Read the comment docs.


CLOUDP-70028: mongocli atlas integration(s) describe

Proposed changes

Jira ticket: CLOUDP-70028

Checklist

[x] I have signed the MongoDB CLA
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have added any necessary documentation (if appropriate)
[x] I have run make fmt and formatted my code

Further comments

waiting for https://github.com/mongodb/mongocli/pull/419


feat(all): add socket timeouts

Methods added to Client and Server to control read and write
timeouts of the underlying socket.
Keep-Alive is re-enabled by default on the server, with a default
timeout of 5 seconds.
BREAKING CHANGE: This adds 2 required methods to the NetworkStream
trait, set_read_timeout and set_write_timeout. Any local
implementations will need to add them.

Adding this in anticipation of bumping the minor version to 0.7, so including other breaking changes.

@seanmonstar I'm trying to use set_write_timeout on client, but the client doesn't disconnect after the timeout. I'd like to run bunch of POST requests with big payloads to check the throughput of the connection. When the connectivity is really poor I don't want it to run all the tests. I was wondering if I can set the timeout using this method to close/drop connection after it pushed for X number of seconds?

@opensourcegeek No, this makes use of TcpStream::set_write_timeout. That sets a socket option to allow blocking on the write (and read for the other timeout) up to the amount of time specified. The time is not tracked between writes.

@seanmonstar Thanks - I got around by using custom type implementing Read trait and passing it to ChunkedBody. Now I track the time in my custom type which seems to work Ok so far.

@seanmonstar I'd written a small post on how I'm doing chunked body POSTs using hyper, if you could look into it when you get a chance and give me any feedbacks it would be really useful for me. Thanks.

@opensourcegeek that looks correct to me!

@seanmonstar great - thanks.


How to get access to the JSONString in mapping

I would like to return the native JSON String to store in Realm, since Realm can't store collections of native objects.
Example JSON:
 { "root": { "id":1, "name":"name", "array":["a", "b", "c"] }}
func mapping(map:Map) {
    id <- map["id]
    name <- map["name"]
    array <- map["array"].JSONString  // array = "[\"a\", \"b\", \"c\"]"
}

Is this possible?

Unfortunately, ObjectMapper does not store the JSON string representation of objects during mapping. You could use ObjectMapper to generate the JSON string you wish to store after the property has been mapped.
array <- map["array"]
let JSONString = Mapper<Type>().toJSONString(array)


Use json-ld @base keyword instead of 'this' prefix

The json-ld @base keyword can be used to replace the 'this' prefix.

Fixed with #39

Fixed with #39


Skipped hooks should be visible in the Action Run view

When some hook fails during an Action Run, the next hooks are not executed.
The view should explicitly mention the those hooks were skipped. Currently, the view simply doesn't display them.

If no one has taken this yet, I would like to work on it :)

All yours @tshradheya .
To understand more about hooks, check out our docs
For code references see this package, this is where the hooks are skipped.

Sorry for the delay on getting started on this. From the code I see that currently it only supports two statuses failed and passed.
For a CI usually two other statuses are possible waiting (since done in sequence in our case it just lists future steps) and skipped (when one fails and we dont run the future.
From my understanding waiting is not a possible scenario cause we only save run status into DB after the complete Action is run. @itaiad200 could you confirm this?
And this story is to support skipped so that we can show the user which are the future Hooks for that Action.

@tshradheya , I can confirm that. We'll have better support for skipped & waiting actions while we implement #3020 , which will allow long running actions, so a DB representation of it is a prerequisite.
#3359 looks like a good implementation given that constraint, I'm in favor of supporting skipped hooks before we complete the long running hooks task.


Java 11 support

Hello,
The javassist library needs to be updated to the 3.25.0-GA version to avoid an NPE with Java 11.
Just want to throw that out there in case of a dependency upgrade.

Thanks for raising - fixed in 0.7.0-RELEASE2.


Document fork as replacement for juxt in Ramda?

ref:

https://ramdajs.com/docs/#juxt
https://samhh.github.io/fp-ts-std/modules/Function.ts.html#fork

Thanks for the reminder! That slipped my mind.
https://github.com/samhh/fp-ts-std/commit/d3d6440f6bd77986b721270b736ef20fb24d40dc


Rename CodeMap and FileMap to SourceMap and SourceFile.

Those types were renamed in https://github.com/rust-lang/rust/pull/52953.
Note: nightly-rustc was not updated since the change was merged. We might to wait for that to happen before merging this PR to avoid having broken links in the meantime.

r=mark-i-m

r=@mark-i-m


Add a button for re-checking authentication status for providers

Addresses a part of https://github.com/ManageIQ/manageiq/issues/8643.
While the other major UI changes mentioned in https://github.com/ManageIQ/manageiq/issues/8643 for the ems editors are still underway, we can move forward with this particular change which basically adds a Re-check Authentication button in the EMS Summary screen to update the Authentication status.

@Fryguy @jrafanie Please review the new method authentication_check_queue in authentication_mixin https://github.com/ManageIQ/manageiq/pull/8912/commits/7486a143a8fbfdbf35637214c17eea0a49d968df. It's pretty much based on one of the existing _queue methods in that mixin.

/cc @Ladas @juliancheal

@miq-bot add_label wip,ui,providers

@Ladas Can you review this?
I've added the 'Re-check Authentication' button for ems_cloud, ems_infra and ems_container.
As discussed, also updated the alert message - https://github.com/ManageIQ/manageiq/pull/8912/commits/dd94f8b03b02615291a244bb195cf3e5d3165127

@AparnaKarve hm one question, does this recheck authentication of all attached endpoints? E.g. for OpenStack you can have default and events endpoint there, while only amqp can be rechecked
If ^ is working, it looks good to me, though I don't have a space to actually try this now.

@Ladas It rechecks authentications of all attached endpoints.
Basically, whatever authentications you see on the Summary page, those will be rechecked.
For e.g - There could be a situation where an OpenStack provider has both default and amqp endpoints defined, so for that provider, both authentications will be rechecked.
Likewise, there could be an OpenStack provider with only the default endpoint defined, in which case only the default authentication will be rechecked.
So just to clarify the above, you cannot "cherry-pick" (for the lack of a better word) what authentication type to recheck.
Does that sound OK to you?

@AparnaKarve yeah, that sounds good. In that case looks :+1: to me :-)

@Ladas Thanks for the confirmation above.
Now if only I could get a volunteer to test this PR :) -- I would think we do this for darga.
@Ladas, tbh, you are the perfect candidate to test this... just saying 😉

@miq-bot remove_label wip

@AparnaKarve middleware provider seems out of scope for this feature and PR - any reason why?

@abonas The main reason would be this feature was targeted for Darga.
I can create a separate PR for middleware for this feature.

@abonas The main reason would be this feature was targeted for Darga.
I can create a separate PR for middleware for this feature.

thanks @AparnaKarve , it can definitely be a separate PR.


Roll engine 3236b49ceac5..162b2e98c036 (1 commits)

https://github.com/flutter/engine/compare/3236b49ceac5...162b2e98c036
git log 3236b49ceac5..162b2e98c036 --no-merges --oneline
162b2e98c Roll src/third_party/skia a944142412cd..3b79aa3a5ad0 (15 commits) (flutter/engine#6671)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

@liyuqian : New roll has been created by https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Auto-roller completed checks. About to merge.


Test Data for the data driven test not displayed and only one test log details displayed when collapsed the test in the dashboard.htm in QAF version 3.2.0

QAF Version

3.2.0

TestNG Version

7.1.0

Steps To Reproduce
1.Create a data driven test as follow:
   @Test(dataProvider = "createAndApplyProfilesDataProvider", dataProviderClass = DeviceSettingsDataproviders.class)
public void testSampleDataDriven(TestDatabean testData) {
               System.out.println("Inside Test");
	}

Create  the testng configuration file such as testSampleDataDriven_testrun.xml

3. Right click on testSampleDataDriven_testrun.xml and run as Testng Suite.
4. Open the dashboard.htm in firefox browser.
5. Click on the Overview.
I had two data driven tests executed.

Check the screenshot below:

Expected behavior
dashboard.htm should display the passed Test Data from the data provider also and display log details for all the data driven tests.
Actual behavior
Testdata for the data driven test not displayed and only one test log details displayed when collapsed the test in the dashboard.htm in QAF version 3.2.0
Is the issue reproducible on runner?

[ ] Maven
[ ] Gradle
[] Ant
[x] Eclipse

Test case sample

Please, share the test case (as small as possible) which shows the issue

will you be able to share code of DeviceSettingsDataproviders and TestDatabean classes?


Adjust Drawer Format for Home to be the First Item

Adjust Drawer Format for Home to be the First Item

Related: #188


Listening to the beforeload event

Not sure if this is a bug, a feature request or just a question.
I'm trying to identify ads on pages loaded by phantom. In Safari, this is doable using the beforeload event, which needs to be injected before the page starts rendering. The event is still present in qtwebkit.
I tried to listen to the event at several points in the page's life cycle, don't seem to be able to receive any notifications, though. I would appreciate any help to get this working.

Have you looked at documentation? You can examine and abort any unwanted resource request using onResourceRequested callback http://phantomjs.org/api/webpage/handler/on-resource-requested.html.

Yes, I saw onResourceRequested, but it lacks in two ways: First of all, the type of content that's requested isn't visible, so there is no way to distinguish between requests from eg. included resources or XHRs. Secondly, I want to identify the section of a page consisting of ads, without removing the content (for a thesis – there is probably no way this is useful for everyday users). The beforeload event would do exactly what I need.
There doesn't seem to be a way to communicate with the phantom context in a synchronous way (as provided in Safari by safari.self.tab.canLoad), but for my use-case at least, browserify will do the job.

Are you testing version 2.0? The edition of Webkit in 1.x is very old and buggy.
This is probably a matter of needing to hook some events up properly, and we'd be happy to work with you to make that happen, but we're not developing 1.x anymore and we have limited time for development so we might need you to take the lead on coding up the necessary changes.  Sorry.

$ phantomjs -v
2.0.0

My current solution is to preprocess all loaded pages to add a script tag as the first child of the head, which listens to the event and then removes itself immediately. Quite cumbersome, appears to be working, though. It would be great if phantom could do this for me & I'd be happy to help with the implementation.

OK.  I think the way we would expose beforeload in PhantomJS is as a WebPage.onBeforeLoad callback function.  Look at how the existing onXXX callbacks are implemented to see how to do that.  The relevant code is in webpage.cpp, I think.

The primary uses for beforeload would be the .target property and the .preventDefault method, both presumably not thread-safe. A possibility to inject scripts into pages before the page is loaded would probably be of more use, although I currently don't understand page life cycles well enough to implement something.

If a page already has a script tag on it, then you can leverage the WebPage#onInitialized callback, which is executed immediately before the first script is evaluated.
http://phantomjs.org/api/webpage/handler/on-initialized.html

That's how that event works? The documentation suggests it fires at the point where Safari would inject start scripts, when the page was created, but before the HTTP request for the page itself was made (which is what I'm looking for). The current implementation doesn't help, as the first request isn't necessarily a script. Manually inserting a script, as I'm doing it right now, would of course be a solution, although the status quo wouldn't be improved.
Phantom seems also to be lacking the ability to inject scripts into frames (eg. iframes), which should probably also be covered by a solution.


How is DataGenerator working ?

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
Hi ,
I wonder what all sub-tools are used by DataGenerator and should be defined in ServiceContext ?
For example , I saw this snippet below and looks like it's possible to define custom llm
documents = SimpleDirectoryReader('./data').load_data()
from llama_index.evaluation import DatasetGenerator
data_generator = DatasetGenerator.from_documents(documents, service_context=service_context)
eval_questions = data_generator.generate_questions_from_nodes()
But ServiceContext can contain other sub-definitions : SimpleNodeParser, Embed Model and etc.
How I know what should be define for DataGenerator ? Any reference is more than welcome.
Thanks

After searching on https://github.com/run-llama/llama_index/blob/main/llama_index/indices/service_context.py and  llama_index/evaluation/dataset_generation.py it looks like only llm and node parser from ServiceContext actually used by DatasetGenerator ...

@snassimr Yeah, only LLM and node parser are used as internally we use SummaryIndex for generating questions which does not need any embedding model.


Resolve geolocation apiview.dev comments

Applied customization for IpAddressToLocationResult model (upon generating model using autorest method getIpAddress is replaced with new method that is using InetAddress instead of regular String). Method is throwing com.azure.core.util.logging.ClientLogger.logExceptionAsError which is required by the mvn checkstyle.
Related review comments: https://apiview.dev/Assemblies/Review/b9ff9dfdcf1d433c8813d7997c304aa0

API change check
APIView has identified API level changes in this PR and created following API reviews.
com.azure:azure-maps-geolocation


fix show all link color

This PR fixes #11549
use the same css class as other links on this page. tested 3 themes, looks good.

Pull Request Test Coverage Report for Build 271845947

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 38.076%

Totals

Change from base Build 271824035:
0.0%

Covered Lines:
19146

Relevant Lines:
45874

💛  - Coveralls


Define QC flag values and meanings

Adds the util.change_qc_flags function to allow users to define own flag_values and flag_meanings, provided they meet the NCAS-General requirements.
Also change the MacOS runner from macos-latest to macos-latest-large, avoiding the arm64 architecture (for now) - closes #139

Well the change to macos-latest-large failed, revert to macos-latest but don't test on python 3.8


Slow QR detection. SQLite Event store & JobInfoScheduler

When i try to scan a QR-code, it sometimes scans in like a second and sometimes it takes almost 1,5 min. When it take a long time, i see in de log a message from SQLite and JobInfoSchedular that an upload is already returning. Im wondering if there is something that i have done wrong. Is there a settings that i need to change?
D/TransportRuntime.SQLiteEventStore(22609): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct  D/TransportRuntime.JobInfoScheduler(22609): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
This is the code that i use:
_openDialog() {
    if (MediaQuery.of(context).orientation == Orientation.landscape) {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.landscapeLeft,
        DeviceOrientation.landscapeRight,
      ]);
    } else {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
        DeviceOrientation.portraitDown,
      ]);
    }
    showDialog(
        context: context,
        builder: (BuildContext context) {
          bool _qrFound = false;
          MobileScannerController cameraController = MobileScannerController();
          qrContext = context;
          return Dialog(
            key: dialogKey,
            child: cameraPermission == true
                ? MobileScanner(
                    key: qrKey,
                    allowDuplicates: false,
                    controller: cameraController,
                    onDetect: (barcode, args) {
                      if (barcode.rawValue != null) {
                        print(barcode.rawValue);
                        setState(() {
                          qrText = barcode.rawValue!;
                        });
                        Navigator.of(context).pop();
                      }
                      cameraController.dispose();
                    })
                : Column(
                    children: [
                      Padding(
                        padding: const EdgeInsets.all(8.0),
                        child: Row(
                          children: [
                            Text(
                              "No camera access",
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
          );
        }).then((value) {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
        DeviceOrientation.portraitDown,
        DeviceOrientation.landscapeLeft,
        DeviceOrientation.landscapeRight,
      ]);
    });
  }

Same problem

Also, if you rotate phone to landscape orientation, problem is gone

Any updates on this issue? I'm experiencing the same thing except rotating the phone doesn't solve it for me.

Im closing this because im cleaning out the issues. If this is still a problem please comment.

its still an issue on web, I'm not sure if i get the log message though


Avoid using worldwide api helpers in integration tests

Stubbing WorldLocation.all and WorldLocation.find, instead of using the GdsApi::TestHelpers::Worldwide helper methods, appears to shave about 50-60 seconds off the time it takes to run rake (i.e. all but the regression tests) on my machine.
We're still using the GdsApi::TestHelpers::Worldwide methods in the country_and_date_questions_test, the regression tests and a couple of unit tests. I had hoped that making a similar change to the regression tests would give us a similar performance improvement but that doesn't seem to be the case based on my initial investigation. I plan to dig into this further at another time.

I noticed that you've remove a bunch of calls to worldwide_api_has_organisations_for_location which were loading organisation fixture data. It looks as if this has been replaced by stubbing WorldLocation#fco_organisation to always return nil. I think it would be worth explaining somewhere why the organisation data previously being made available is not needed. Presumably none of the tests were actually relying on it?

We're still using the GdsApi::TestHelpers::Worldwide methods in the country_and_date_questions_test, the regression tests and a couple of unit tests.

Why did you decide not to do the same in the remaining non-regression tests? If there's a good reason not to do it, I think you should explain the reason. If not, then I think we should probably do it in this PR to keep the code as consistent as possible.

I had hoped that making a similar change to the regression tests would give us a similar performance improvement but that doesn't seem to be the case based on my initial investigation.

One thing to be aware of is that in the regression tests (when run outside the default rake task), the setup of the stubs is only done once at the beginning of the whole suite. I wonder if this might explain the lack of a performance improvement.

Other than my comments above, this looks good to me. Good work! 👍

I noticed that you've remove a bunch of calls to worldwide_api_has_organisations_for_location which were loading organisation fixture data. It looks as if this has been replaced by stubbing WorldLocation#fco_organisation to always return nil. I think it would be worth explaining somewhere why the organisation data previously being made available is not needed. Presumably none of the tests were actually relying on it?

@floehopper: I tried to explain this in the commit notes of the commits that removed those calls (e.g. https://github.com/alphagov/smart-answers/pull/2532/commits/3b45bdbd646ad739ab7d38d68b38e57c9cd02ddc). I explained the removal of worldwide_api_has_no_organisations_for_location in the same way (e.g. https://github.com/alphagov/smart-answers/pull/2532/commits/aba724aba3a45902b8bfaec1ffe640060040911b). Did you see those? Do you think it'd be better to include this information in the PR description?

I had hoped that making a similar change to the regression tests would give us a similar performance improvement but that doesn't seem to be the case based on my initial investigation.

One thing to be aware of is that in the regression tests (when run outside the default rake task), the setup of the stubs is only done once at the beginning of the whole suite. I wonder if this might explain the lack of a performance improvement.

I suspect you're right, @floehopper. When updating the regression tests to use Mocha instead of WebMock I found that I had to instantiate the stubs at the beginning of each test, rather than at the beginning of the whole suite.

We're still using the GdsApi::TestHelpers::Worldwide methods in the country_and_date_questions_test, the regression tests and a couple of unit tests.

Why did you decide not to do the same in the remaining non-regression tests? If there's a good reason not to do it, I think you should explain the reason. If not, then I think we should probably do it in this PR to keep the code as consistent as possible.

I haven't updated the country_and_date_questions_test because making the same change caused the tests to fail. I didn't investigate in any detail but I think this might because of the JavaScript tests in that file. I didn't update the unit tests because I thought this was a good enough improvement to get merged without spending more time on the branch. I'll update the PR description with this information and add Trello cards to track the remaining tasks.

I've updated https://trello.com/c/T69SfCaC/86-stub-gds-apis-at-ruby-client-level-vs-net-http-webmock-level with a link to this PR, and a checklist of the remaining tests to convert.

Thanks for reviewing, @floehopper. I'm going to close this, rebase on master and get it merged.


Update create-monitored-service.md

Updated Change Source details for Harness CD Next Gen and added references to Custom Change Source.
Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[ ] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[ ] Tested Locally
[ ] Optional Screen Shoot.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app


YAML: strange behaviour with JSON path matcher and ChangeValue rule

While working with YAMLs, the JSON path matcher and the ChangeValue recipe I'm experiencing some strange behaviour.
While using the recursive descent operator (e.g<EMAIL_ADDRESS>== 'ServiceAccount')].kind), I get a stack overflow error:
java.lang.StackOverflowError
	at java.base/java.util.LinkedList.listIterator(LinkedList.java:872)
	at java.base/java.util.AbstractList.listIterator(AbstractList.java:311)
	at java.base/java.util.AbstractSequentialList.iterator(AbstractSequentialList.java:238)
	at org.openrewrite.yaml.JsonPathMatcher$JsonPathYamlVisitor.visitRecursiveDescent(JsonPathMatcher.java:148)
	at org.openrewrite.yaml.internal.grammar.JsonPath$RecursiveDescentContext.accept(JsonPath.java:272)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.openrewrite.yaml.JsonPathMatcher$JsonPathYamlVisitor.visitRecursiveDescent(JsonPathMatcher.java:151)
	at org.openrewrite.yaml.internal.grammar.JsonPath$RecursiveDescentContext.accept(JsonPath.java:272)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)

In other cases, such as<EMAIL_ADDRESS>== 'ServiceAccount')].kind, I don't seem to get any matches while that is to be expected.
According to the documentation here I expect my test cases to work, even if it currently is only a partial implementation.
I've made a commit in my fork containing a couple of unit test demonstrating the issues I have.

Hello @kevinvandervlist,
Thanks for identifying this issue and providing a link to your fork.
It looks like your recipe requires support for matching sequences in the JsonPathMatcher.
I will re-open #1252 Support matching sequences in JsonPathMatcher, and we'll have a look at fixing the StackOverFlowError.
Are you interested in creating a PR for the work you have done?

Hi @pway99, thanks for reopening the issue, but as you said that seems to be a different problem that I'm not running into. I also don't have time to make a contribution myself now, sorry about that.
@traceyyoshima, thanks for diving into it and fixing the recursion issue, much appreciated!
Regarding your question: to be honest I'm not 100% sure if the $..[...] is supposed to work. However, based on my interpretation of the JSONPath syntax, I'm guessing it should work because you can use recursive descent to search for specific properties of objects, and the [(...)] expressions can be used on any object. If my understanding is flawed, feel free to adjust the test case(s) accordingly :)

@kevinvandervlist you're welcome! Thank you for the clarification, I appreciate it!
I understood the description (included below) as a parent needs to be selected. I.E. $[..], $..*[..], or property[..]. But I may have overlooked something, I'll look into the syntax a bit more to be certain.
@pway99 will be fixing up the issues in the JsonPathMatcher that should be returning results.
Thanks again!
Expression: ['property']
Description: Selects the specified property in a parent object. Be sure to put single quotes around the property name.

@traceyyoshima I am experiencing a similar issue with the FindKey behavior. I would expect the following test in FindKeyTest to be successful, but it actually fails as the part<EMAIL_ADDRESS>== 'nothing')] seems to be ignored:
    @Test
    fun doNotFindKey() = assertUnchanged(
            recipe =<EMAIL_ADDRESS>== 'nothing')].name"),
            before = """
            apiVersion: v1
            metadata:
              name: monitoring-tools
              namespace: monitoring-tools
        """
    )


feat(tutorial): complete step 5

Closes #
{{short description}}
Changelog
New

{{new thing}}

Changed

{{change thing}}

Removed

{{removed thing}}

Here is the URL of my deplyed cloud foundry app
https://carbon-tutorial-reddibhatini.mybluemix.net/#/

@alisonjoseph Please look into above comment for the final URL


N-dimensional (pre-allocating) circular buffer

Hello,
I noticed that current implementation of circular buffer is only 1 dimension.
A generalized approach of this problem will be nice (especially for implementing streaming timeseries)
So, instead of pushing a single value in a 1D circular buffer,

it will be possible to push an Array{T,1} in a 2D circular buffer
it will be possible to push an Array{T,2} in a 3D circular buffer
it will be possible to push an Array{T,N-1} in a N-D circular buffer

I also noticed that current implementation of circular buffer is using a Vector with size increasing (until capacity is reached). Maybe pre-allocating array will be a more efficient approach ?
@tbreloff I noticed you are original author.
What is your opinion about this ?

WIP:

"""
New items are pushed to the back of the list, overwriting values in a circular fashion.
"""
type CircularBuffer{T, dims} <: AbstractArray{T, dims}
    capacity::Int
    first::Int
    buffer::Array{T, dims}
    used::Int
    colons::Array{Colon}

    function CircularBuffer(capacity::Int, others_dims...)
        a = Array{T, dims}(capacity, others_dims...)
        colons = Array{Colon}(others_dims)
        new(capacity, 1, a, 0, colons)
    end
end

function CircularBuffer(T, capacity::Int, others_dims...)
    n_dims = length(others_dims) + 1
    CircularBuffer{T,n_dims}(capacity::Int, others_dims...)
end

function _buffer_index(cb::CircularBuffer, i::Int)
    n = length(cb)
    if i < 1 || i > n
        throw(BoundsError("CircularBuffer out of range. cb=$cb i=$i"))
    end
    idx = cb.first + i - 1
    if idx > n
        idx - n
    else
        idx
    end
end

function Base.getindex(cb::CircularBuffer, i::Int)
    if ndims(cb) < 2
        cb.buffer[_buffer_index(cb, i)]
    else
        cb.buffer[_buffer_index(cb, i), cb.colons...]
    end
end

function Base.setindex!(cb::CircularBuffer, data, i::Int)
    cb.buffer[_buffer_index(cb, i), cb.colons...] = data
    cb
end

function Base.push!(cb::CircularBuffer, data)
    # if full, increment and overwrite, otherwise push
    if length(cb) == cb.capacity
        cb.first = (cb.first == cb.capacity ? 1 : cb.first + 1)
        println("xxxxx")
        cb[cb.capacity] = data
        #cb.buffer[cb.capacity] = data
        println("xxxxx")
    else
        cb.buffer[cb.used + 1, cb.colons...] = data
        cb.used += 1
    end
    cb
end

function Base.append!(cb::CircularBuffer, datavec::AbstractVector)
    # push at most `capacity` items
    n = length(datavec)
    for i in max(1, n-capacity(cb)+1):n
        push!(cb, datavec[i])
    end
    cb
end

Base.ndims(cb::CircularBuffer) = ndims(cb.buffer)
Base.length(cb::CircularBuffer) = cb.used
Base.size(cb::CircularBuffer) = (length(cb),)
Base.convert{T}(::Type{Array}, cb::CircularBuffer{T}) = T[x for x in cb]
Base.isempty(cb::CircularBuffer) = cb.used == 0

capacity(cb::CircularBuffer) = cb.capacity
isfull(cb::CircularBuffer) = length(cb) == cb.capacity

and test
using DataStructures
if VERSION >= v"0.5.0-dev+7720"
    using Base.Test
else
    using BaseTestNext
    const Test = BaseTestNext
end

#cb = CircularBuffer{Int}(5)
cb = CircularBuffer(Int, 5)
@test length(cb) == 0
@test capacity(cb) == 5
# throws ArgumentError on v0.4 and BoundsError on v0.5 (diverged at 0.5.0-dev+5230)
if VERSION >= v"0.5.0-dev+5230"
    @test_throws BoundsError first(cb)
else
    @test_throws ArgumentError first(cb)
end
@test isempty(cb) == true
@test isfull(cb) == false

push!(cb, 1)
@test length(cb) == 1
@test capacity(cb) == 5
@test isfull(cb) == false

append!(cb, 2:8)
@test length(cb) == capacity(cb)
@test size(cb) == (length(cb),)
@test isempty(cb) == false
@test isfull(cb) == true
println(convert(Array, cb))
@test convert(Array, cb) == Int[4,5,6,7,8]
@test cb[1] == 4
@test cb[2] == 5
@test cb[3] == 6
@test cb[4] == 7
@test cb[5] == 8
@test_throws BoundsError cb[6]
@test_throws BoundsError cb[3:6]
@test cb[3:4] == Int[6,7]
@test cb[[1,5]] == Int[4,8]

cb[3] = 999
@test convert(Array, cb) == Int[4,5,999,7,8]

cb = CircularBuffer(Int, 3, 4)
#println(convert(Array, cb))
#println(cb)
push!(cb, [10, 11, 12, 13])
push!(cb, [20, 21, 22, 23])
push!(cb, [30, 31, 32, 33])
push!(cb, [40, 41, 42, 43])
push!(cb, [50, 51, 52, 53])
println(cb.buffer)
println(cb.buffer[1, :])
println(cb[1])
#println(convert(Array, cb))

I'm facing an issue to display this N dimensional circular buffer but it seems to properly push data
julia> using DataStructures

julia> cb = CircularBuffer(Int, 3, 4)
0-element DataStructures.CircularBuffer{Int64,2}

julia> cb
0-element DataStructures.CircularBuffer{Int64,2}

julia> push!(cb, [10, 11, 12, 13])
1-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(1),)
  at index [2]
 in indices at ./abstractarray.jl:57 [inlined]
 in print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::DataStructures.CircularBuffer{Int64,2}, ::String, ::String, ::String, ::String, ::String, ::String, ::Int64, ::Int64) at ./show.jl:1390
 in print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::DataStructures.CircularBuffer{Int64,2}, ::String, ::String, ::String) at ./show.jl:1379
 in #showarray#330(::Bool, ::Function, ::IOContext{Base.Terminals.TTYTerminal}, ::DataStructures.CircularBuffer{Int64,2}, ::Bool) at ./show.jl:1618
 in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{Symbol("text/plain")}, ::DataStructures.CircularBuffer{Int64,2}) at ./REPL.jl:132
 in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::DataStructures.CircularBuffer{Int64,2}) at ./REPL.jl:135
 in display(::DataStructures.CircularBuffer{Int64,2}) at ./multimedia.jl:143
 in print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:154
 in print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:139
 in (::Base.REPL.##22#23{Bool,Base.REPL.##33#42{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:652
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at ./LineEdit.jl:1579
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at ./REPL.jl:903
 in run_repl(::Base.REPL.LineEditREPL, ::Base.##930#931) at ./REPL.jl:188
 in _start() at ./client.jl:360
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?

julia> cb.buffer
3×4 Array{Int64,2}:
                  10                   11                   12                13
<PHONE_NUMBER>759109985<PHONE_NUMBER>391109477<PHONE_NUMBER>860475233<PHONE_NUMBER>860021
<PHONE_NUMBER>806719532<PHONE_NUMBER>115964005<PHONE_NUMBER>385970017                 0

julia> push!(cb, [20, 21, 22, 23])
2-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(2),)
(skip)

julia> cb.buffer
3×4 Array{Int64,2}:
                  10                   11                   12  13
                  20                   21                   22  23
<PHONE_NUMBER>806719532<PHONE_NUMBER>115964005<PHONE_NUMBER>385970017   0

julia> push!(cb, [30, 31, 32, 33])
3-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(3),)
(skip)

julia> cb.buffer
3×4 Array{Int64,2}:
 10  11  12  13
 20  21  22  23
 30  31  32  33

julia> push!(cb, [40, 41, 42, 43])
3-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(3),)
(skip)

julia> cb.buffer
3×4 Array{Int64,2}:
 40  41  42  43
 20  21  22  23
 30  31  32  33

julia> push!(cb, [50, 51, 52, 53])
3-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(3),)
(skip)

julia> cb.buffer
3×4 Array{Int64,2}:
 40  41  42  43
 50  51  52  53
 30  31  32  33

This is some of my oldest julia code... I'm sure it's horrible. Please
improve/expand any way you see fit!
On Saturday, November 12, 2016, femtotrader<EMAIL_ADDRESS>wrote:

I'm facing an issue to display this N dimensional circular buffer but it
seems to properly push data
julia> using DataStructures
julia> cb = CircularBuffer(Int, 3, 4)0-element DataStructures.CircularBuffer{Int64,2}
julia> cb0-element DataStructures.CircularBuffer{Int64,2}
julia> push!(cb, [10, 11, 12, 13])1-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(1),)
at index [2]
in indices at ./abstractarray.jl:57 [inlined]
in print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::DataStructures.CircularBuffer{Int64,2}, ::String, ::String, ::String, ::String, ::String, ::String, ::Int64, ::Int64) at ./show.jl:1390
in print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::DataStructures.CircularBuffer{Int64,2}, ::String, ::String, ::String) at ./show.jl:1379
in #showarray#330(::Bool, ::Function, ::IOContext{Base.Terminals.TTYTerminal}, ::DataStructures.CircularBuffer{Int64,2}, ::Bool) at ./show.jl:1618
in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{Symbol("text/plain")}, ::DataStructures.CircularBuffer{Int64,2}) at ./REPL.jl:132
in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::DataStructures.CircularBuffer{Int64,2}) at ./REPL.jl:135
in display(::DataStructures.CircularBuffer{Int64,2}) at ./multimedia.jl:143
in print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:154
in print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:139
in (::Base.REPL.##22#23{Bool,Base.REPL.##33#42{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:652
in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at ./LineEdit.jl:1579
in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at ./REPL.jl:903
in run_repl(::Base.REPL.LineEditREPL, ::Base.##930#931) at ./REPL.jl:188
in _start() at ./client.jl:360
in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
julia> cb.buffer3×4 Array{Int64,2}:
10                   11                   12                13
7738702960759109985<PHONE_NUMBER>391109477<PHONE_NUMBER>860475233<PHONE_NUMBER>860021
8746382376806719532<PHONE_NUMBER>115964005<PHONE_NUMBER>385970017                 0
julia> push!(cb, [20, 21, 22, 23])2-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(2),)
(skip)
julia> cb.buffer3×4 Array{Int64,2}:
10                   11                   12  13
20                   21                   22  23
8746382376806719532<PHONE_NUMBER>115964005<PHONE_NUMBER>385970017   0
julia> push!(cb, [30, 31, 32, 33])3-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(3),)
(skip)
julia> cb.buffer3×4 Array{Int64,2}:
10  11  12  13
20  21  22  23
30  31  32  33
julia> push!(cb, [40, 41, 42, 43])3-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(3),)
(skip)
julia> cb.buffer3×4 Array{Int64,2}:
40  41  42  43
20  21  22  23
30  31  32  33
julia> push!(cb, [50, 51, 52, 53])3-element DataStructures.CircularBuffer{Int64,2}:
Error showing value of type DataStructures.CircularBuffer{Int64,2}:
ERROR: BoundsError: attempt to access (Base.OneTo(3),)
(skip)
julia> cb.buffer3×4 Array{Int64,2}:
40  41  42  43
50  51  52  53
30  31  32  33
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JuliaLang/DataStructures.jl/issues/223#issuecomment-260152332,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA492vj30VtQolWHblHWDM7FsA9vCwDKks5q9jtOgaJpZM4Kwiio
.

I still have to improve my Julia knowledges...
An other problem I'm facing, is that we will have to change 1D circular buffer construction...
So instead of
cb = CircularBuffer{Int}(5)

we should have to do
cb = CircularBuffer(Int, 5)

Maybe there is a workaround? Any idea? Or maybe we can live with this API change?

That sounds good.
On Sunday, November 13, 2016, femtotrader<EMAIL_ADDRESS>wrote:

I still have to improve my Julia knowledges...
An other problem I'm facing, is that we will have to change 1D circular
buffer construction...
So instead of
cb = CircularBuffer{Int}(5)
we should have to do
cb = CircularBuffer(Int, 5)
Maybe there is a workaround? Any idea? Or maybe we can live with this API
change?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JuliaLang/DataStructures.jl/issues/223#issuecomment-260175052,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA492qfspWXB_cuMKoVFnnKL4D8Pw0xbks5q9tZjgaJpZM4Kwiio
.

I've found an other room for improvement in _buffer_index  function
    idx = cb.first + i - 1
    if idx > n
        idx - n
    else
        idx
    end

can be replaced by a modulo (mod1 in fact)
    idx = mod1(cb.first + i - 1, n)

I didn't measure if it improve performance signifiantly but anyway it shouldn't hurt!
I'd prefer to have display fixed before submitting a PR.
Any idea what is going wrong ?
Pinging also @kmsquire who have been working on this file

So instead of
cb = CircularBuffer{Int}(5)
we should have to do
cb = CircularBuffer(Int, 5)

I'd prefer not to make this change, if possible.  The general direction of data structures in both Base and this package has been to move toward the first construction for consistency.
If you make a WIP pull request, I can try to make specific comments.

@femtotrader, I took a glance at #228, and I'm not sure I see the purpose of having an N-D circular buffer with N > 1.  Is there a reason the data needs to be stored contiguously?  For example, I can create a CircularBuffer of Vector{Int}s pretty easily:
julia> using DataStructures

julia> cb = CircularBuffer{Vector{Int}}(3)
0-element DataStructures.CircularBuffer{Array{Int64,1}}

julia> push!(cb, [1,2,3])
1-element DataStructures.CircularBuffer{Array{Int64,1}}:
 [1,2,3]

julia> push!(cb, [2,3,4])
2-element DataStructures.CircularBuffer{Array{Int64,1}}:
 [1,2,3]
 [2,3,4]

julia> push!(cb, [3,4,5])
3-element DataStructures.CircularBuffer{Array{Int64,1}}:
 [1,2,3]
 [2,3,4]
 [3,4,5]

julia> push!(cb, [4,5,6])
3-element DataStructures.CircularBuffer{Array{Int64,1}}:
 [2,3,4]
 [3,4,5]
 [4,5,6]

It's better to have data stored contiguously if you want to implement a kind of streaming TimeArray (from TimeSeries.jl). Use case https://github.com/femtotrader/TimeSeriesIO.jl/issues/5
Is there a reason the data needs to be stored uncontiguously ?
We could also ask a similar question
Why using Array{Int64,2} when there is Array{Array{Int64}, 1} ?
I really need some help:

Is it possible to do this without breaking 1D circular buffer constructor ?
How to fix printing N-D circular buffer ?

@femtotrader, sorry, I didn't mean to come across as critical.  If you have a use case that would benefit from contiguous access, that's fine--it just wasn't (and still isn't) totally obvious to me.
For example, when working with streaming TimeArrays, do you plan to treat the data as a multidimensional array and call LAPACK or BLAS functions (or perform other linear algebra-like operations) on them?  If so, then sure, it probably makes sense to have a multidimensional version of a CircularBuffer.
At the same time, it also seems pretty easy to implement such a data structure inefficiently (e.g., with a lot of data copying).
Not sure I'll have time, but I'll try to take a look and make more specific suggestions.

I think (but I can be wrong) that passing OHLCV data to TALib.jl should be more efficient with contiguous data

@femtotrader, I took a glance at #228, and I'm not sure I see the purpose of having an N-D circular buffer with N > 1. Is there a reason the data needs to be stored contiguously? For example, I can create a CircularBuffer of Vector{Int}s pretty easily:

Is there a way to do this without push!ing a new value? Like a copy! at the top, and move the pointer? I'd like use the circular buffer in a non-allocating way.

Is there a way to do this without push!ing a new value? Like a copy! at the top, and move the pointer? I'd like use the circular buffer in a non-allocating way.

Changing the code to be pre-allocating should be easy.  I'm unclear about how you want to use this, but if you already have a vector, then it would seem you might want to avoid the copy! all together, if possible (e.g., if you know you won't modify the vector again.).

I think pre-allocation can be added simply by implementing fill!(cb, value) method for an empty cb


feat(ref): all refs are now an async iterable

Refs can now be consumed with a for-await loop, or with other APIs, such as rxjs@7 that accept AsyncIterable.
After some discussion with @yyx990803, here is a small PR to add async iterable support to instance of RefImpl.
If this lands, then any API that accepts an async iterator will "just work" with a ref instance. For example, in RxJS, anything that accepts an Observable could now just accept a RefImpl from Vue. Similarly, updates to a ref can be consumed with for await loops, or perhaps even yield-ed within an AsyncGenerator (async function*). So there's a lot of interesting potential here.
It might also help create opportunities to right interesting code, or maybe even coroutines at some point, within the library itself.
Open Questions
One open question/concern I have, is this relies on watch. Since I don't understand the mechanics of watch yet, I assume it relies on some underlying global state that may or may not switch between given async contexts. So... if someone were to wait and create the iterable out-of-band with a setup or some other part of Vue's lifecycle, I'm not sure how they will behave.
Another concern I would have isn't necessarily about the feature, but more about for-await in general, and what we can add to this feature to keep people from shooting themselves in the foot. Since, in theory, a ref lasts for as long as someone has a handle to it, if someone uses for await to endlessly consume the ref, it's possible to end up with a single hung promise when a component unmounts. It may be prudent to add an onUnmount in the RefAsyncIterable initialization that flushes all pending promises when it's unmounted.
Example usage:
const myRef = ref(0);

async function someHandler() {
   for await (const value of myRef) {
      // triggered each time `myRef.value` is updated.
      console.log(value);
   }
}

// Later this would trigger the for await loop.
myRef.value++;

Example of it "just working" with another library:
import { from } from 'rxjs';
import { ref } from 'vue';

const myRef = ref(0);

from(myRef).subscribe(console.log); // will log on each change to `myRef.value`;

// later
myRef.value++;

Really thinking about all of the implications of this, some sort of Observable type is more ideal for this (not necessarily an RxJS observable), but a push stream that is lazy and cancellable. AsyncIterable, while cool because of for await, may not be the best way to go.


Correct code variable in CLI example

Correct code variable in CLI example

Learn Build status updates of commit 4dd5841:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/private-link/create-private-endpoint-cli.md
:white_check_mark:Succeeded

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

@asudbring,
Can you review the proposed changes?
IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#please-close


A GUI version with electron

It should have:

basic watching on repos
distributed issue and wiki sub modules
Other helpers function

I could write a basic demo in recent days.

@aseday Sounds great, feel free!

When i finish it, I hope you could create a repo and I will pr you .
That is better for everybody to join you!

I'd be interested in getting in on something like this as well. Mind linking it in the comments once you've created the repo?

I haven't thought about it much, but in theory the Electron code could just live in this repo too?

Hmmm, you could understand like this:

Your code will be core backend server but should be split into some little modules for better developed later.
Electron also use iojs but what we focus is GUI code.

Okay.  Maybe just go ahead and make repos in your own github namespaces and mention them in this bug, and when it looks like something's working well we'll figure out where else to put it.
I registered the gittorrent organization, so it could go under there too.

@aseaday Great idea! I'm also interested and willing to help.

What is the status of that?
I want to start working on it
But I'm willing to help if something is already started

@mastilver No-one's working on it at the moment, feel free! :)

@cjb cool, I've created: https://github.com/mastilver/gitTorrent-ui

@mastilver Are you planning on doing something with it? I could join in at some point too! :>

Electron? Does your git torrent client really need two gigs of ram and
thirty threads just for a front-end? On a desktop already running chrome,
Atom, and Slack, in not sure there's enough room for another heavy weight
RAM hog on the scene. :)
I will happily contribute gtk examples for a lighter approach if desired.

@iamale I was planning to...
But, I got sucks into a ton of work, I might resume my work in a month or two

But A GTK version means rewrite a lot of codes.

I'd suggest we keep it lean and limited in terms of functions. I am imagining a taskbar icon which displays peer information and daemon status. Other things can be left to git.

@thorsummoner The core of gittorrent is written in JS, so if you wanted to use GTK you'd probably be rewriting the core (distributed hash table, etc) in another language, which doesn't seem like a good use of time.
(Or maybe you have a JS-GTK binding handy, I don't know.)

There are js gtk bindings, but I'm not sure I would recommend them at this
time. Especially if you're used to developing for chrome as their all based
on other browsers, one is a WebKit based binding and the other a
spidermonkey based binding, and neither have great docs.

There's node-gtk, and also plain Gjs (which is not based on Node, so would likely require additional work).

(Disclaimer: I'm not really good at GTK/Node pairing. I've tried GTK/Python though.)

Also, if you choose to go with Electron, it would be great if you've considered my project, electron-deb, as a way to package it on Linux. It keeps the Electron core separate from the apps, so it is stored once on the disk (resulting in less disk usage) and can be updated separately. Basically, it's the way apps in the other (interpreted) languages are packaged in Linux.