Support/refactor init method

Hello everybody,
it's been a while since I've submitted a refactoring PR, and this time I decided to try to break up and clean the logic that's happening in the Request.prototype.init function.
At the moment I've refactored a bunch of code into some well-meaning functions.
I also leveraged the constructObject function heavily, I do notice that's not necessary in every place I use it, but the I do feel that it's useful in most of the areas.
The biggest difference is that the init logic has been moved to another module.
This is more of a temporary refactor, there was just to much logic polluting the request.js file.
Another big difference is the way I'm doing some error handling, you'll see what I mean, but just know I'm not completely set on that implementation.
Overall this is still a work in progress, but I would like to hear some feedback.
Summoning: @simov @nylen @FredKSchott @mikeal

OK, I was about to be a bit harsh as usual, but generally I like the idea and I want to give this PR a chance, though there are a couple of striking issues that I want to see resolved first, before I give it another read.

lib/request/init.js - why is this in separate folder? Put it directly into lib
constructObject is really gross, it was not used in request.js at all! Just forget about it, really. I was about to show you examples on what I mean, but I'm pretty sure you know how to refactor all of the places to use a simple assignment operator.
No need for props in handleBaseUrl and probably the rest of the places too. You can just return new Error after that in the consumer you are checking for error anyway, so you can check for instanceof Error instead
Use consistent spacing between if( | function ( | function urlToUri( with the rest of the code base. I'm planning on updating eslint to the latest version, but in the mean time lets keep consistent with what we have atm. After that we can have a heated discussion on which eslint options should be enabled or not.
Commented out test - refactoring should not change application logic!
// Dirty Function - I really don't like silly comments in code

And of course there are a couple of things that I do like in your refactoring, so it's not all bad :) We should have a few more iterations on this, but for now this PR is a no go for me. I hope you find my comments constructive, @seanstrom

I put that file in a request folder in order to namespace the file. Ill just change that request-init.js and move it up a directory.
constructObject is just another helper in the helper.js I see no reason for it to not be used elsewhere in the code base. As far as it being gross I would disagree, but I am partially biased.
Props is just an implementation detail, the main idea here was that we're not mutating self directly all over the place. So when I refactored logic out to functions i didn't want to pass self if I didn't need to.
In the end I chose to return an object that has an error field, meaning that I don't need to check if it is of type Error or not.
The codebase has been inconsistent about whitespace for a while, but I'll tidy up my changes.
I had a good reason for commenting out this test. I believe that what this tests is proving isn't really important, before we added the BaseUrl logic, we would gladly accept a URI object as the first argument.
With the addition of the base url code it forced users to not pass that in as the first argument, which I believe to be a change in expected behavior. The reason any of this is important is because we should parse the URI at the beginning of the init method instead of mangling a string part of the way and then finally midway parsing it to some object, and then have everyone assume its an object afterwards.
That was for reference, forgot to remove it. It was just a marker on function that mutates this directly and returns no values.

I personally think that is PR is half finished work, there's plenty to be done and cleaned up and then conventionalized.

For constructObject I'll put it that way - you are introducing abstraction in places where it's not needed - you are not copying nor extending anything. The code was perfectly fine without that cool wrapper. Just take a look at the code how it looks too, where it should be just a simple assignment you have tons of nonsense like extend/done all over the place. If not doing it for yourself think about it that way - you shouldn't expect from our contributors to have deeper understanding of javascript or some weird parts of our code base, unless you want to carry the burden of maintaining it alone, or just with a few hand picked people that might, or might not be around for a while.
For props - same thing. Unneeded layer of abstraction, much less dangerous but still adds some clutter, because you are checking for errors in the consumer of these functions anyway - do not assume that instanceof should be slower than obj.property check.
For baseUrl reasoning see this https://github.com/request/request/pull/1469#issuecomment-78073749

The argument against constructObject is more of a knee jerk reaction of, "That's unusual".
And on top of that I haven't defended the use of constructObject in all of these areas I have used it.
I know it may not be appropriate to use it even for it's very purpose of existing and I even gave heads up to any/all reviewers that I wasn't set on the implementation.
As far as other contributors, I think expecting contributors to read the code base is a given.
Plus, this isn't black magic javascript, its just a simple function.
Whether it be needless abstraction is an opinion and nothing more.
As for props, that isn't even anything clever.
It's a simple object, I return an object in some functions. That's just apart of its signature.
I could have made it just return the Errors, but I wanted to make it more open ended for other types of Errors to be introduced without needing to add more instanceof checks.
I perhaps could also just assume that anything truthy that's returned from the function is an error.
Also I never mentioned anything about performance with instanceof vs obj.prop.
As for the reasoning about having the baseUrl throw if the uri is not a string, I'm not sure any explanation is given, just that you said to do that. It seems weird that baseUrl is throwing when uri isn't a string.
There's several places in the code that already emit/throw errors for uri isn't given. I think baseUrl should work off a URI object instead.
In any case Ill revert the commented out test, I'll patch the code to be backwards compatible since that's the proper thing to do.

I would also note that it would be probably more effective to ask me why I wrote the code in a certain way. There could be knowledge or thought process or context behind the way it's written.
This way we can share the same context and make decisions together, instead of on our own.

@seanstrom I told you in my first comment, I'm seeing the good sides of your refactoring work too. I'm talking only about the negative sides, and I'm trying to argument myself as good as possible.

Im not saying that you haven't given me enough praise, im just explaining that the reason I used constructObject and the props objects were for a good reason.
The goal being that we when we extract logic to functions we don't just mutate self directly but provide data for self to assign props to in the init function. I just abstract over the assignment process by using constructObject but that's really an implementation detail and not preference.

Also sorry if i'm being pushy too, I forget that things over the internet always read a bit harsher than they're meant. So I too know that I may not be very effective by just arguing.
And on that note, I've pushed up several clean up updates.
Ones on primarily removing some constructObject code that was doing more bloating of lines than really building objects. Check it out.

 Karma has decided to blow during test runs... :cry:

+1 to the idea, I always love refactoring & cleanup
I've said this in a few different places, but I'm against pulling something significant out of a function just to save lines of code. Conceptually, init is a good chunk of work on/belonging to request so to pull it out entirely into a separate file would be incorrect under that line of thinking. Additionally, I'll now have to jump between request.js and request-init.js and am more likely to miss something / less likely to understand what is going on.
So I love all the work and thought put into this, but I'd like to see the core "init request" logic remain in request.js, either in the request constructor or on a request.init() method.

(Having said that, I've been so busy with new job lately that I've been completely taken away from this project, so feel free to merge/not merge without me. Just wanted to pop in and add my usual "removing lines of code != removing complexity" reminder :)

@FredKSchott Im actually more on board with your line of thinking, given the current implementation.
I actually did most of my work inside request.js but at the end moved things out to another file.
I did that so it would be easier to refactor, but I hope to be able to move the new refactored function back. At the moment I'm trying to big movements of code, and I feel I can do that with more confidence when the refactoring is happening in another file. I thought of it as a sanitary environment for my surgery.

Thanks @seanstrom I will be able to review very early in the morning your time :) Also I think what happens in this thread is good for the project, though it might not be the most comfortable :)
@FredKSchott the same argument for jumping between files, can be applied to scrolling hundred of lines back and forth. I personally think what @seanstrom is doing with this PR is a good. Also I'm for keeping the init logic separated.

@seanstrom haha I like the surgery analogy, sounds good :)
@simov It's definitely subjective, but my main point was that removing logic blocks of code from a giant file (helpers, core modular units of request funcitonality, etc) is 1000x more effective than just moving around code for the sake of line numbers.

@seanstrom you & I have discussed similar issues before.  Don't pull too many things into functions, don't create cute/clever helpers.  Please listen to @simov's feedback instead of arguing with him, he's right.

@nylen, @simov aren't discussing method extraction.
We were discussing helpers, and i think saying they're cute/clever isn't a bad thing.
Those cute/clever helpers can also be useful. Deciding whether they're useful or not is a matter of opinion. Saying you're right, or they're right, or I'm right based on preference or bias is wrong.
I would rather they're be constructive feedback and strong arguments, aside from one's that come off as, "That's just what you do!". When someone gives off that vibe, it makes your opinion look like law, which it isn't.
Furthermore I refuse to be told, "Don't talk back and do what we say" as an reason to implement code a certain way. I've been pretty reasonable in the past to changes my code to match the ideals of the project. At this point I'm only suggesting alternative implementations, which aren't broken.
They just seem to strike a cord with some people in the JS community as to much abstraction.
I disagree with that mindset, I chose to explore a possible new way of doing things, while having good reasons for doing so. I'm trying to bring these alternatives to the project, and ask the question "Why not this?". Even though the conversation started off a little rough, doesn't mean @simov and I are beyond reasoning with each other as peers.

@seanstrom The problem with using a parsed URI for baseUrl is that the semantics become unclear.    The two are concatenated and that's your URL.  When either/both can be parsed URIs, then what happens with query parameters and anchors in the baseUrl?  Are they replaced by the uri?  Or added?  It's just not a useful enough feature to warrant a detailed explanation in the README when we can restrict the types to strings and concatenate them and we're done.  That's easy for users to understand.
I guess the alternative would be to throw on query parameters or anchor in the parsed URI baseUrl, and throw on scheme or host or auth in the uri.  I started out with an implementation like this, but again, it was looking very complicated, going through all the potential combinations, for such a tiny feature.

@froatsnook What I had implemented was URI was always an object and baseUrl was still a string.
At the moment I've worked around the baseUrl feature to still work with strings only.
Im not seeing the whole problem clearly at the moment, so I won't try to make any comments or changes until I think of some good questions/possible solutions.

@seanstrom  there are three constructObject references left. That's the first thing, honestly I have a hard time following all the props, done, and the tons of state variable assignments back and forth. This PR is still looking far from ready for merging to me, what I outlined yesterday were the first striking issues that I saw first, and I'm not seeing even them fully resolved.
So lets make it that way - once you remove the constructObject object wrapper, I can play around with your code, just to be a bit more comfortable with my further suggestions.
Also simple find and replace can fix the spacing issues if(

@simov I would try to ignore the references to constructObject. That's really just a way for me to do batched assignment. I don't want to manually type each thing to be assigned, I rather have something wrap that up for me. That's not necessarily constructObject but at the moment constructObject is still helping with the refactor, so I plan on keeping it there until I finish up the rest of the refactor.
What would be nice is if people looking at the code can point out possible flaws in behavior. Since this code is a pretty sensitive area.

quick update: I have moved around several pieces of code and restructured stuff.
Im still refactoring the callback functions for piping and nexttick stuff.
Would like some review here around the behavior, the tests at the moment but I don't think the tests are bullet proof enough to say I can trust that everything is working the way it should. Another set of eyes should take a look.

I'm glad you removed the extend/done stuff.
This is how you can handle errors without introducing additional layer of abstraction https://github.com/simov/request/commit/ccc95a8d495271e77b4d6350856b0343dfeedfda I hope it makes sense. I'll point out a few other things in the comment below, as I'm not sure you're going to pull this anyway.
Most of the variables on top of the init method (where the // Setup Initial Values comment is) are there just to make the code looks how you want, but it doesn't make the code easier to maintain. I'm giving you an example: var qsLib = self.qsLib || (options.useQuerystring ? querystring : qs) then self.qsLib = qsLib - just use self.qsLib = (options.useQuerystring ? querystring : qs) it's exactly the same! No need for indirection here.
You only need just a few separate functions, I can tell them by name if you want (don't ask me how I know, we discussed similar issues in your previous PR about refactoring). I'm giving you an example:
function urlToUri(uri, url) {
  if (!uri && url) {
    uri = url
  }

  return uri
}

Really? How is this supposed to be reused in any scenario? So I need to search for that function each time I read the code (400 lines above) just to be sure what is going on. (and that's just a single if statement)
As for checking the behavior - that's not the point of the refactoring, if our tests are not good enough we'll catch the error afterwards anyway. (similar thing happened when I refactored the auth logic)
Also can you rebase all of this commits into one when you feel you don't need them anymore, because they certainly doesn't make sense for anyone else.

Can you point out how returning an object with properties in an function is extra abstraction?
I can see it being a different convention but I don't see how it sits at a drastically different level of abstraction.
Also part of why I didn't use a try catch block was for a optimization purpose. That's not really a good reason if we don't care about that optimization though.
Also where did anyone learn that method refactoring only applies to duplication? There's been plenty of times I've seen it used for code clarity.
In the example you brought up, urlToUri is function that will get the correct property off self. I didn't want the Init function to care about how I got that data l, it justs calls function. The reader should be able to tell by the name function what it is doing.
If not they can search for the function and find out.
If you want I can move the function closer but I'm sure that wasn't your point.
That said I am I'm partial to inlining that function being that's only a single if. But my points should support the existence of that function and others.
My point about the behavior is that we probably have brittle tests.  In the context of TDD, refactoring happens as the last step, after we've written tests and code.
In this context it feels like we've written some tests and mostly code, and now we want to cleanup it up. Without strong tests the cleanup phase can effectively be normal changes, since we may not know if I'm making breaking changes.
I think we should take a little more time understanding the diff but we can also just make our users tell us if we have bugs from this.
As to your comment about the variable assignments, I agree it looks messy, and I considered changing the way I'm writing it.
I'll get back to you on that one, with either the change or a different proposal.
As for the commits, I was planning on rebasing them, but how about we take a quick pole to see if they're useful or makes sense for anyone? :)

You don't really need a try/catch either, I'm just refactoring your code, just pass self. Take a look at the rest of the modules that I refactored - they all use self, and as far as I can tell that was received well, because we already had a couple of contributions to these files.
Use functions to capsulate some meaningful amount of code, instead of making it look fancy.
Also feel free to close this PR, and open up another, hopefully everyone learned something from this thread, so a fresh start might be a better option instead of digging here.
Also here is how my remotes are looking atm
$ g remote -v
nylen	git@github.com:nylen/request.git (fetch)
nylen	git@github.com:nylen/request.git (push)
request	git@github.com:request/request.git (fetch)
request	git@github.com:request/request.git (push)
seanstrom	git@github.com:seanstrom/request.git (fetch)
seanstrom	git@github.com:seanstrom/request.git (push)
simov	git@github.com:simov/request.git (fetch)
simov	git@github.com:simov/request.git (push)

request is mostly for pulling, I very rarely push there
simov is for pushing only
nylen seanstrom and anyone else is for pulling and testing
remotes are cheap

So when I see a PR from you I expect to fetch the branch from your remote. That way you can keep record of all your branches while at the same time keeping the main repo clean. Very rarely we actually need additional branch in the main repo, and still the effort should be synchronized, so it's better to keep things separated in the first place. That doesn't apply for Mikeal ofc :)

So to address your concern about this branch being incorrectly started from master.
I agree, I didn't catch this on my dev, I just blindly made a branch, Im fine with moving this somewhere else.

You don't really need a try/catch either, I'm just refactoring your code, just pass self. Take a look at the rest of the modules that I refactored - they all use self, and as far as I can tell that was received well, because we already had a couple of contributions to these files.

Yeah I would believe that people would use self if they don't agree with why I don't want to mutate self in my functions, aside from initRequest.
Note: It may not be that your code is well received, but at the moment it's checked in, so we are more or less stuck with the way you did something because you put in the work.

Also feel free to close this PR, and open up another, hopefully everyone learned something from this thread, so a fresh start might be a better option instead of digging here.

Maybe others have learned something, perhaps its how stubborn I am. Or even how stubborn your are.
The only thing I have learned from this is that it feels your opinion is law. When to me its just opinion, and one that I disagree with. I think the fact that most of your comments are nitpicky coding conventions than commenting on the actual changes in behavior, between the initRequest function and the rest of the functions, shows how bent your are to having things your way (or some way).
The project shouldn't be locked down to a certain coding style or mindset.
I try to adhere to the current conventions, but I also try to evolve the standard.
Especially since the code itself may need another mindset/pov in order to progress well.
I personally think that it's hard for you to reason to me as a peer because you already think Im wrong.
And since your in a position of control, you can see to it that my contributions conform to your opinion.
Even though opinion here has mostly been about layers of abstraction and method extraction, which is far from actual behavior and true Architecture in the code base.
On top of that, most of the time you haven't properly responded to my questioning of your opinion and at best had straw man arguments to support yourself.
I take this quote of yours to be suggesting to throw away work, because we conflict in minor coding opinions? I would like others to chime in to if that's truly appropriate.
I wouldn't expect most of these behaviors or suggestions from this project, given its Open Governance model. In reality your actions seem to reflect something more closed off than open.

I kind of expected that response, but since you addressed it here, here is my response:
My refactoring suggestions were approved by at least two other contributors, while yours were not - not only by me, just check the comments from above.
Sean, whatever arguments I pull up, you always contra argument me. How can I suggest something without suggesting it? It's always too hard, it's always my way, and btw everyone else's opinion is wrong too, right?
You are taking everything too personally, my comments are about the project, not about you, it feels like I'm trying to attack you most of the time, which is silly.

I think my response properly reflects my frustration towards the review in this thread.
You've made plenty of suggestions, some I've agreed with, and some I haven't, and some I've argued against the reasoning for the sake that the reasoning was purely preference (not fact) and should be treated as such.
It seems like you're over exaggerating my position here, I'm only disagreeing with some of the things you've said and your overall attitude and review process.
I recall one person agreeing with you, @nylen, who I also have had similar discussions with.
It's no surprise that he would agree with your opinion since it seems he shares some of it.
I don't think your actively attacking me, I think you disagree with me to the point where I possibly won't be able to merge this in unless I make all the changes you want. Which I don't think is how the review process should be. It may seem silly to feel that way, but given the way this discussion is heading that seems like an accurate assessment.

It's about simplifying things, in your case clearly it's not. If that's not obvious to you, I can't help you, experience can't be learned from words, words carry only the meaning, not what I'm putting behind them. What can be learned though is to distinguish between attitude and competence but that's just some silly document right?

First of all, this thread/review has gotten unnecessarily hostile. This is disappointing and not productive.
Second, my apologies for not being involved earlier. This is not the first attempt to break this function out and this approach suffers from all the same problems previous attempts suffer from so I wish I could have stepped in earlier and saved everyone a lot of work.
As I've said elsewhere, moving a function in to a new file doesn't necessarily make it simpler. In fact, it can make it a lot more confusing if there isn't a natural separation between that function and the rest of what is going on in the file it was in. In this case, init is fundamental to the rest of the request object and moving it to another function moves a lot of information you need when reading the rest of the implementation. I'm all for breaking out certain features in to their own files because those features tend to stand on their own and reading their logic and state changes aren't fundamental to understanding other parts of "core request" but there is some set of functionality that is the base of request and that should live in a single file.
Furthermore, this approach makes a few additional attempts to abstract the logic but the end results is that the implementation is longer with the abstractions than without them which is hugely problematic.
And lastly, this is a bad time in the history of node.js/io.js to be abstracting code that can touch timers and nextTick() because there's a bunch of changes and even bugs in both 0.12 and io.js behavior in this area.

So it's been a little while since a last commented on this, and I've had plenty of time to relax and think about what I was saying and what I was hearing on this thread. Overall I feel I wasn't being constructive or collaborative. I feel that I should communicated my opinions better, and received criticism better. I'm sorry for how I acted.

@seanstrom :+1:
All - I'm closing this PR based on previous comments about it + the logic in index.js and helpers.js changed quite a bit since then :zap:


[documentation/ffi] Document marshalling/conversion behavior

https://api.dart.dev/stable/2.19.3/dart-ffi/FloatPointer.html
https://api.dart.dev/stable/2.19.3/dart-ffi/FloatArray.html
This uses the hardware float<->double conversion on storing on the properties and operators.
If Dart double value is larger than FLT_MAX this can lead to unexpected behavior.
Since the value getter and value setter share documentation, we would need to add this 'setter' documentation on the getter.
https://api.dart.dev/stable/2.19.3/dart-ffi/Uint32Pointer.html
For integers we truncate on setters, this is also not documented.

I'd say it leads to entirely expected behavior (I can't imagine any other behavior, so I wouldn't expect it).
It's just something the user needs to be aware of.
We could add a toFloat32() method on double, or in dart:typed_data, to allow you to do the conversion early.
Since all values of a float-32 can be stored in a float-64, nothing is lost in the other direction.


Hide tagged games from Library

An option to hide from my Library all games that are in my Backlog (in either category). This would make it easier to find games that are not yet in the Backlog, and I wouldn't have to manually look for the games that are not marked already.
Suggested by Makosipper via https://steamcommunity.com/groups/steam-backlog/discussions/2/1733210552672663706/

When this is implemented, I'll sure go back to using it. The other issues are a plus, but this is a must-have for me in particular =)
subscribes

Stremon has also asked for this via web Chat.
is there a way to hide from the main list the games that I put in my backlog?
I have a huge amount of games so it's very slow to figure out what is added or not :P
On the previous version, I was always hiding the games I put in my backlog, like that I
could see only the games I haven't sorted yet ;)

@MakoSipper
This feature will be implemented in a few days with another batch of changes.
I'd love to hear some feedback from you.

Nice to hear! "Show hidden games" will also be implemented? That's double awesome. I'll be sure to try it out, with great pleasure.


x/crypto/ssh: listening on remote address blocks indefinitely when address doesn't contain a host part

What version of Go are you using (go version)?

$ go version
go version go1.11.2 linux/amd64

What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/kanobe/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/kanobe/src/go"
GOPROXY=""
GORACE=""
GOROOT="/home/kanobe/download/go"
GOTMPDIR=""
GOTOOLDIR="/home/kanobe/download/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build496899549=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Created an SSH connection using ssh.Dial, and opened a Listener to listen on a port without specifying a host address. Then connected to that port (i.e. using telnet).
This program demonstrates the issue:

package main

import (
  "io/ioutil"
  "log"
  "os"
  "path"

  "golang.org/x/crypto/ssh"
)

func buildSshConfig(user, keyfile string) (conf *ssh.ClientConfig) {
  key, err := ioutil.ReadFile(keyfile)
  if err != nil {
    log.Fatal("unable to build ssh config: ", err)
  }

  signer, err := ssh.ParsePrivateKey(key)
  if err != nil {
    log.Fatal("unable to build ssh config: ", err)
  }

  conf = &ssh.ClientConfig{
    User: user,
    Auth: []ssh.AuthMethod{
      // Use the PublicKeys method for remote authentication.
      ssh.PublicKeys(signer),
    },
    HostKeyCallback: ssh.InsecureIgnoreHostKey(),
  }

  return
}

func main() {
  config := buildSshConfig(os.Getenv("USER"),
    path.Join(os.Getenv("HOME"), ".ssh/id_rsa"))

  conn, err := ssh.Dial("tcp", "localhost:22", config)
  if err != nil {
    log.Fatal("unable to connect: ", err)
  }
  defer conn.Close()

  // Request the remote side to open port 8080
  l, err := conn.Listen("tcp", ":8080")
  if err != nil {
    log.Fatal("unable to register tcp forward: ", err)
  }
  defer l.Close()

  log.Println("Calling Accept")
  l.Accept()
  log.Println("Accept returned")

}

What did you expect to see?

Calling Accept
Accept Returned

What did you see instead?

Calling Accept

Additional Info
It seems that if the local address is not specified in ssh.Client.Listen, the Accept call blocks indefinitely. For example this line fails in the above program:

  l, err := conn.Listen("tcp", ":8080")

But when changed to this it succeeds:

  l, err := conn.Listen("tcp", "<IP_ADDRESS>:8080")

The host may be omitted in net.Listen, so there is precedent for using no host. From net.Listen: "For TCP networks, if the host in the address parameter is empty or a literal unspecified IP address, Listen listens on all available unicast and anycast IP addresses of the local system."
I think at a minimum if host may not be omitted, the documentation should mention that it is not supported, and the Listen call should return an error.

/cc @FiloSottile

Hello, can you please confirm that the above CL fixes the issue? Thank you


web-ui: replace textarea tag with codemirror.

Hey if you guys are interested, I've added a web text editor to make viewing bearable, please note that I'm no html/css expert.
It looks like this:

Technical details:

Replace textarea with codemirror v5
Minor style changes to accommodate the editor

If this doesn't align with your goal feel free to close this pr.
Thank you for your amazing work.

Thanks, it looks much better with an editor indeed.
@davesnx do you have an opinion on this one?

Thanks for the cc @Khady. It's much more functional with an editor for sure.
I would try to remove the script as JS and avoid the eval_string, but that's something we can fix in further PRs!

it works indeed and looks nice. There's a small problem when the code in the editor becomes too large. The editor grows and pushes the right column out of the screen

I played a bit with the lineWrapping option of codemirror, something like this should help
patdiff -git a/bin/web-ui/index.html b/bin/web-ui/index.html
No newline at the end of  a/bin/web-ui/index.html
index fbfdb0a..c37d4b4 100644
------  a/bin/web-ui/index.html
++++++  b/bin/web-ui/index.html
@|-25,32 +25,37 ============================================================
 |      width: 100%;
 |      display: flex;
 |      flex-direction: row;
 |    }
 |
 |    .flex-column {
 |      display: flex;
 |      flex-direction: column;
 |      flex-basis: 100%;
 |    }
 |
 |    @media (max-width: 800px) {
 |      .flex-row {
 |        flex-direction: column;
 |      }
 |    }
+|
+|    .CodeMirror-wrap {
+|      word-break: break-word;
+|    }
+|
 |  </style>
 |
 |
 |
 |

 |

 |

 |        OCamlFormat configurator
 |

 |

 |        Made by Ahrefs -
 |        Check our job openings -
 |        Code available on github
 |

 |

 |

@|-66,25 +71,26 ============================================================
 |          OCamlFormat config
 |
 |          (documentation)
 |

 |        <textarea name="config" id="config" rows="8" cols="80" placeholder="profile=default"
 |          spellcheck="false"></textarea>
 |

 |

 |

 |

 |
 |
 |
 |

Applied your suggestion @Khady

There's an issue with the alignment of the highlighting when some code is selected. I've no idea where it comes from. The problem doesn't seem to appear on the codemirror website

I'm tempted to merge this PR as it is (it's already better than the original version and it seems to work fine). Fixes/improvements could then be delivered through other PRs when people have time. This way you aren't rushed and everyone benefits from your work right now

also may I know why you decided to go with codemirror 5 instead of 6?

I went for v5 instead of v6 purely out of familiarity and easy of use but I'm interested in porting this to v6 when i have time.

thanks a lot for the contribution!


Unable to compile BioGears due to "Unable to find CodeSynthesis which is marked REQUIRED" error

I've followed the compile instructions at https://github.com/BioGearsEngine/core/wiki/Compiling-on--Visual-Studio-2019-Win64, including the following:

XSD is shipped as a binary solution. To simplify the install
copy xsd-4.0.0-i686-windows/bin to C:/biogears/external
copy xsd-4.0.0-i686-windows/libxsd/xsd C:/biogears/external/include

Here's my C:/biogears/external directory:
PS C:\biogears\external> dir

    Directory: C:\biogears\external

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           4/12/2022  1:32 PM                bin
d----           4/12/2022  1:24 PM                cmake
d----           4/12/2022  1:33 PM                include
d----           4/12/2022  1:23 PM                lib
d----           4/12/2022  1:23 PM                share

PS C:\biogears\external\include> dir

    Directory: C:\biogears\external\include

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           4/12/2022 12:57 PM                eigen3
d----           4/12/2022  1:05 PM                log4cpp
d----           4/12/2022  1:23 PM                xercesc
d----           4/12/2022  1:33 PM                xsd
-a---           4/12/2022  1:28 PM          27456 dirent.h

When I try to compile Biogears, I get this error.
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- The CXX compiler identification is MSVC 19.31.31104.0
-- The C compiler identification is MSVC 19.31.31104.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
--
    Using the following search paths
    CMAKE_MODULE_PATH = C:/biogears/core/cmake;C:/biogears/core/cmake;C:/biogears/core/cmake/common
    CMAKE_PREFIX_PATH  = C:/biogears/external
    CMAKE_FIND_ROOT_PATH =

-- GIT_REV=7.5.0-60-gccc3ca06
-- VS_DEBUGGER_ENVIRONMENT_LIST=PATH=C:/biogears/external/bin;C:/biogears/external/lib;%PATH%
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Configuring biogears_common
CMake Warning at cmake/cmake-common_logic.cmake:43 (message):
  The following packages CodeSynthesis were not found.For native compilations
  setting CMAKE_PREFIX_PATH can solve this problemFor cross complilation try
  expanding your CMAKE_FIND_ROOT_PATH
Call Stack (most recent call first):
  projects/biogears/CMakeLists.txt:38 (verify_package)

CMake Error at cmake/cmake-common_logic.cmake:48 (message):
  Unable to find CodeSynthesis which is marked REQUIRED
Call Stack (most recent call first):
  projects/biogears/CMakeLists.txt:38 (verify_package)

-- Configuring incomplete, errors occurred!
See also "C:/biogears/core/build/CMakeFiles/CMakeOutput.log".
See also "C:/biogears/core/build/CMakeFiles/CMakeError.log".

I've attached my CMakeError.log and CMakeOutput.log files.
CMakeOutput.log
CMakeError.log
Can anyone help with this?

This boils down to this.  You must set your CMAKE_PREFIX_PATH to include the directy above bin/xsd.exe and include/xsd. They can be along separate paths or combined under a single tree, but CMake is simply finding and validating XSD is installed by the presences of bin/xsd.exe and include/xsd/cxx/version.hxx if these exist and Xerces-c_FOUND is true the XSD_FOUDN is set to true.

You can review the CMAKE search behavior  https://cmake.org/cmake/help/latest/command/find_file.html
I can help further but you will need to post the full path to xsd.exe and version.hxx to verify they are in the correct place along with xercesc/dom/DOM.hpp and your xercesc lib and dll.  A lot can go wrong with that as the xerces-c dlls have several names and we have to kind of brute force search all the common name variants
You can read all of logic used to find these packages in the following location <biogears_root>/cmake/common

As a note if you need real time help compiling any of this you should join us on slack
https://www.biogears.dev/
Just leave a post in support and we will try to walk you through it.

No problem.  @askmydog  I did update the instructions to include Visual Studio 2022

I just happened to look to try the build process again, and I saw that you
had.  Thank you!
On Fri, Apr 22, 2022, 3:38 PM Steven A White @.***>
wrote:

No problem. @askmydog https://github.com/askmydog I did update the
instructions to include Visual Studio 2022
—
Reply to this email directly, view it on GitHub
https://github.com/BioGearsEngine/core/issues/64#issuecomment-1106803629,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF5Q2NCHLFOSLY3LKI6MYTTVGL5ZXANCNFSM5TLMBGWA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Closing


Update the active simulator before updating the clock

This PR fixes incorrect behavior in clock updates for the breathing circuit simulator of the frontend. Previously, the Simulators::transform method was updating the clock before updating the pointer to the active simulator. However, the clock update method was returning early if there was no active simulator when it was called, which meant that a newly-activated simulator's transform method would be called with a stale clock in the first call. Calling the clock update method after updating the pointer to the active simulator should fix this problem.

@rohanpurohit The Github Actions checks have passed on this PR. I suspect the problems you're getting in #269 are related to some CMakeLists changes - I'll follow up on them there.

Test case currently failing:
https://github.com/pez-globo/pufferfish-software/blob/feature/firmware-test-driver/firmware/ventilator-controller-stm32/Core/Test/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L314
so here i'm testing transform_spo2 method in HFNCSimulator::transform
so in each test case to update the current time we need to call transform method in simulator https://github.com/pez-globo/pufferfish-software/blob/develop/firmware/ventilator-controller-stm32/Core/Src/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L168 twice as initial time is 0 ,
example: https://github.com/pez-globo/pufferfish-software/blob/feature/firmware-test-driver/firmware/ventilator-controller-stm32/Core/Test/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L42
before the suggested fix c33d11a3bb9a1af312f859a2ca62df732758c532, we were calling transform 3 times for the current time to update
which i think maybe causing the cases to fail randomly , maybe i should change the "then" statement please review and suggest any change if needed

I'm not sure I understand the intention of the first test you linked to at https://github.com/pez-globo/pufferfish-software/blob/feature/firmware-test-driver/firmware/ventilator-controller-stm32/Core/Test/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L314 (Given a hfnc simulator object, when SPO2 is calculated, then spo2 is less than spo2_min) or how it's related to the clock update.
As for https://github.com/pez-globo/pufferfish-software/blob/feature/firmware-test-driver/firmware/ventilator-controller-stm32/Core/Test/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L42 , it makes sense to me that we should just call simulators.transform twice; the first time to initialize the clock from 0 to a valid value (in the test it initializes to 12), and the second time to perform another update. If you check sensor_measurements.time between the two calls, do you get 0? Also, where are you seeing test cases fail randomly? What kind of randomness is this (e.g. is failure/success different each time Github Actions runs the tests?)?

I'm not sure I understand the intention of the first test you linked to at https://github.com/pez-globo/pufferfish-software/blob/feature/firmware-test-driver/firmware/ventilator-controller-stm32/Core/Test/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L314 (Given a hfnc simulator object, when SPO2 is calculated, then spo2 is less than spo2_min) or how it's related to the clock update.
As for https://github.com/pez-globo/pufferfish-software/blob/feature/firmware-test-driver/firmware/ventilator-controller-stm32/Core/Test/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L42 , it makes sense to me that we should just call simulators.transform twice; the first time to initialize the clock from 0 to a valid value (in the test it initializes to 12), and the second time to perform another update. If you check sensor_measurements.time between the two calls, do you get 0? Also, where are you seeing test cases fail randomly? What kind of randomness is this (e.g. is failure/success different each time Github Actions runs the tests?)?

in that particular test case i'm testing https://github.com/pez-globo/pufferfish-software/blob/develop/firmware/ventilator-controller-stm32/Core/Src/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L136 this method.
the test case in question fails/passes randomly, so if i run coverage multiple times it'll pass , therefore was wondering if that maybe linked to us calling transform multiple times , but yes the hotfix definetly fixes the behaviour where we had to call it thrice
i'll go through again why it fails and report back. meanwhile i think we can go ahead with the hotfix.

in that particular test case i'm testing https://github.com/pez-globo/pufferfish-software/blob/develop/firmware/ventilator-controller-stm32/Core/Src/Pufferfish/Driver/BreathingCircuit/Simulator.cpp#L136 this method.
the test case in question fails/passes randomly, so if i run coverage multiple times it'll pass , therefore was wondering if that maybe linked to us calling transform multiple times , but yes the hotfix definetly fixes the behaviour where we had to call it thrice
i'll go through again why it fails and report back. meanwhile i think we can go ahead with the hotfix.


Problem reading math expressions

So I tried making it say
 α + β = 30° dan sin α * cos β = 1/3
But it skips some signs like α,  β, and *
Is there a setting to make it say those symbols as is?

This is probably not a problem with the code library itself, but a problem with Bing TTS. The voice model likely isn't able to read those characters, so it doesn't.

Just checked with AvaMultilingual in MSEdge as a reference implementation and it does pronounce all of that correctly.

Just checked with AvaMultilingual in MSEdge as a reference implementation and it does pronounce all of that correctly.

Ah, good reference. Yes, it should work but how do we achieve this programatically?

I still have yet to wrap my head around the convoluted streaming API. 😅
My advice is just debug-print the string as it goes through the processing pipeline, beginning at the end — just before it's sent to the M$ API, to ensure it doesn't degrade the codepoints. Pay attention to encoding.


Vitest mock issue when running tests

Hello there,
i migrated the project from tsyringe, and it works perfectly fine.
When running vitest following occurs when i try to mock a dependency, which is normally injected in the constructor:
TypeError: Cannot read properties of undefined (reading 'provide')
 ❯ Container.bind node_modules/@needle-di/core/src/container.ts:92:73

Mentioned part of the code in test:
  const mockScenarioService = mockDeep<ScenarioService>();
  const mockSessionScenarioProgressProvider = mockDeep<SessionScenarioProgressProvider>();
  let sessionStepGuard: SessionStepGuard;

  beforeEach(() => {
    mockReset(mockScenarioService);
    mockReset(mockSessionScenarioProgressProvider);
    sessionStepGuard = new SessionStepGuard(mockScenarioService, mockSessionScenarioProgressProvider);
  });

Can this be due to some invalid or missing setting, like target of ES2022 or something like that?

Okay, so i found out, this happens, when test uses class which uses any kind of InjectionToken inside it in its injects, for example:
export const SCENARIO_REPOSITORY = new InjectionToken<ScenarioRepository>('SCENARIO_REPOSITORY');

  public constructor(
    private readonly scenarioRepository: ScenarioRepository = inject(SCENARIO_REPOSITORY),
  ) {}

which works in the app, but in the test its problematic, but i dont know why.
Trying string instead of token works for me:
private readonly scenarioRepository: ScenarioRepository = inject('ScenarioRepository'),

Thanks for reporting this issue. Let's see if we can reproduce it.
From your first comment, I'd say it's because SessionStepGuard is undefined somehow, but I am still figuring out why.
Can you clone this StackBlitz and try to reproduce it in there?

Sorry, i was little bit busy, i will try to do some more debugging later :).

Let me know, I am motivated to help you out here. ;)


Create Combinations.py

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner


Add new Blocs logo

Blocs (http://blocsapp.com/) has a new logo, it would be awesome if you could add it to this repo.

added 2d5429fae9fe9285b7b60a8ab15fc20dd4a047d2


Modernizr 3 has no more 'touch' property

In Modernizr 3, the touch property has been replaced by the touchevents property.
https://modernizr.com/news/modernizr-3-new-release-site
Foundation uses the touch property in several scripts which makes it impossible to use a custom build of Modernizr unless one re-maps the touch property to touchevents.
A possible quick solution would be to replace all occurences of if(Modernizr.touch) with if(Modernizr.touch || Modernizr.touchevents).

Foundation 5 won't be supporting Modernizr 3. We did make the mistake in our bower.json of allowing for Modernizr 3 to be installed, even though it's only compatible with 2. In version 5.5.3 we fixed the bower.json to lock to a specific version of Modernizr: 2.8.3.
Foundation 6 doesn't require Modernizr.


eslint-plugin: Add rule to check that makeStyles is not called inside a React component

(or just called at module root)
When migrating to Fluent v9 & Griffel I've seen some devs use makeStyles inside a React component, since they want to pass in JS variables like the old CSS-in-JS system. It would be nice to have a lint rule to ensure that makeStyles is only called at the root.

FYI: makeStyles will throw if it's called inside a component in development mode:

Note that Griffel will only throw that error if within the context of a React component. I wonder if it could throw if called from any place other than a module's root instead?

@swese44 maybe, but I have no ideas how to check this/verify in runtime.

It could be checked by a lint rule at least


gdb involves time anomaly

1. What version of Go and system type/arch are you using?
go 1.15.6, linux/amd64 and windows/amd64
2. What version of GoFrame are you using?
gf 1.14.5
3. Can this issue be reproduced with the latest release?
yes
4. What did you do?
model.Where("status=1 or create_at<",time.Now().Add(-60*time.Second)).Delete()
5. What did you expect to see?
normal operation
6. What did you see instead?
The statement is normal, but the database has not changed.
use gf1.14.4,The statement is normal,The database is normal.
use gf1.14.5,Change time.Now().Add(-60*time.Second) to gtime.Now(),The statement is normal,The database is normal .

@gbcsn That is because, from version v1.14.5, gf ORM dose not automatically set the local=Local parameter for underlying go-mysql-driver , which means the time.Time parameter will be directly passed to the underlying driver. The underlying driver will convert time.Time to UTC in default that differs from your passed parameter.
You can use gtime.Time or set the local=Local parameter in you database configuration.

OK, thank you

We can write model.Where("status=1 or create_at<",time.Now().Add(-60*time.Second).Format("2006-01-02 15:04:05")).Delete() like this


bug: fix ec2 2004 exponent in calculation of beta_ds

Thanks for finding and correcting the bug. On a more general comment (I already mentioned this in the original review of MC2010 code) I would split the function eps_cs (eq. 3.8) factoring out equations 3.9 - 3.10 - 3.13 - 3.12 - 3.11. I would consider this factoring out in the spirit of having a code equation covered by each function to permit better experimenting/research (for instance if the user wants to test an alternative definition of beta_as for instance he/she can use its own function and maintain the rest functions, while in the current approach he/she needs to rewrite the whole eps_cs function).
We could consider eventually this aspect in a separate PR.
I think the same correction done in #193 should be done here? (i.e. set t-ts = 0 when t is lower than ts).

Thanks! For the further changes, I am on it in #194 😃


Clsid is not found

Good time of day! In my telemetry project i use OPCDA-server of SOFREL_Lacroix.
OPCDA-server:
IP:<IP_ADDRESS>
User: OPC
Screenshot below.

Client:
IP:<IP_ADDRESS>
User: Admin
Screenshot below.

Error - "Clsid is not found."
Please help!!!!

For the first insight it might be because of the DCOM Setting of OPC Server.  You can find the DCOM configuration settings below
https://www.matrikonopc.com/support/docs/MatrikonOPC-Windows-XP-DCOM-Configuration.pdf

DCOM Setting of OPC Server is absolutely correct.

Can this work on Linux to connect to a windows OPC DA server over DCOM. I understand COM and DCOM use windows registry and class ids. Just curious

It can be connected from Linux Server. Could you please try to connect from Matrikon Explorer? If connection is successful, we can check it from our linux instances.

It can be connected from Linux Server. Could you please try to connect from Matrikon Explorer? If connection is successful, we can check it from our linux instances.

Good news! Can we communicate by e-mail?

You can see the details in code page of this node.

i coding with java, used the lib 'utgard' to connect  Matrikon simulator on linux, and it work fine!
But 'Clsid is not found' is show when i use node-red-contrib-opcda-client

Yes it can be.
4 Mar 2021 Per 12:16 tarihinde AnoojKrishnanR @.***>
şunu yazdı:

Can this work on Linux to connect to a windows OPC DA server over DCOM. I
understand COM and DCOM use windows registry and class ids. Just curious
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/emrebekar/node-red-contrib-opcda-client/issues/3#issuecomment-790460724,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC2NOAVAEFGITIP5U2OIASLTB5FXBANCNFSM4W5TFANQ
.


posibility to upgrade mysql

it would be nice to have the ability to upgrade mysql
this is not possible at the moment because when installing a newer version
dpkg want to know if you want to keep/change files

Are you trying to upgrade from a machine previously built with the mysql cookbook, or a random state?
What mysql/os versions, etc

trying to upgrade from a machine that was previously built with the mysql cookbook

This is a nightmare to automate. The big problem on RHEL based systems is the 'mysql-libs' package, and all the version specific packages from the community repository that replace it. Removing that package requires an "rpm -e --nodeps mysql-libs' or similar step with the relevant community mysql-community-libs RPM, and it will break all packages with dependencies on it. This particularly includes the nagios-plugins-check_mysql package and postfix.
So a separate "Revert to OS mysql" recipe might be workable, with those caveats, but it will break things while running and should be a one-off, not a normally run process.

For all Linux, the 6.x series mysql_service resource uses non-standard pathing to get out of the package manager's way.
For debian/ubuntu, things are are particularly weird because there is no way to stop the package post-inst from initializing the database, the debian-sys-maint, etc.
I just spot checked updating 5.5 -> 5.6 on ubuntu-14.04.
Indeed, it exploded on the modified /etc/init/mysql.conf... there's not really a good way around this because of the nature of the package manager. Manually upgrading should be easy enough, but I'd recommend rebuilding the box if you keep your data_dir on a separate partition / mount.
For centos,
I just spot checked upgrading 5.6 to 5.7 on centos via the version attribute. It updated the package repos and made 5.7 available.
You'll have to manually install the new version via yum upgrade mysql-community-server, but it worked.
Again, I'd recommend rebuilding the box if you keep your data_dir on a separate partition / mount.
-s


Update pipeline conf

solve all pipeline warnings

https://ci.woodpecker-ci.org/repos/8986/pipeline/88/errors ...


 The entire view application is currently waiting on the HTTP request to the Fort Collins city data API. This was done because the chart isn't yet a Vue component.
I'll try to do this in the next few weeks, but currently it's an open issue and the ugliest and worst in this project.
Roughly, that chart was previously interleved with a large number of the components of the application. I'm working to confine it so much that it can be a single Vue Component. But it currently is not one. I expect closing this ticket will require:

Further consolidating chart code so much so that a single function call is needed to draw the chart.
Making that single function call into the render function of a real Vue component.
Making that real Vue Component the route pointed to by a single tab.

That would also make it so the chart doesn't show at the bottom of every page, as it currently does.

Just fixed finally and completely with bd1889f8c5a546121b9f6d6379f3fdc3bd49d27d


I can't build the table with ajax

I was doing a simple form with a table, it consists in the following i create a button to load more rows and avoid DOM overload or too much load to the page, but i generate the rows and when i want to filter data or change the page size, my content is erased.
In your documentation you tell that if i want to build the table with HTML, then i need to set * data: undefined||false*, but this doesn't work.
Note: I build my HTML content with one request to my API.
Have you an idea about what is the problem?

If you set:
data: false

The plugin will use the current row of the table as its data, but it will not "link" the table to the data, in particular this means that:

you cannot add element to the datatable using DOM manipulator;
any content added to the table will be erased at the next refresh() of the table since the plugin completely re-draw the table at each refresh().

You have multiple possibilities to bypass this:

create the datatable after loading the data, i.e. something like - best option if what you retrieve using the API is a HTML table:

var data = get_data(...); // Your API call
$('#my-table').html(data);
$('#my-table').datatable();

create the datatable using the data retrieved from the API - good option if what you retrieve using the API is a JSON array:

var data = get_data(...); // Your API call
$('#my-table').datatable({
    data: data
});

create the datable using an empty HTML table, then add row using insert:

$('#my-table').datatable();
var data = get_data(...); // Your API call
$('#my-table').datatable('insert', data);

use the AJAX mode for loading data:

{
    data: {
        url: "http://site.com/get", // The service URL
        type: "get",                // The type of request (post or get)
        size: null | int,           // Number of entries (or null for async. calls)
        allInOne: true,             // Set to true to load all your data in one AJAX call
        refresh: false              // You do not want a refresh
    }
}

I cannot tell you which one is the best for your case, but feel free to ask if you want more details about these.

Hi, Holt59
I am really happy with your answer, and I am going to check my code and i'll figure out what's going on, but you gave me the next steep, thanks a lot.
Regards.

i am new to jquery and i wanted know how can i set the offset and limit values in ajax url

@anikettiwari009 You cannot customize these options, these are automatically deduced from the pageSize and pagingNumberOfPages options. What are you trying to do exactly to have to customize these?

Well @anikettiwari009 , i did the following.
I improve my tables with more code to set one offset and insert new data into my table, the steps that i follow:

Create one constructor to request to your table

function AjaxTableCreator(){
this.offset = 10; //load 10 rows when you click one button
this.initial_limit  = 0;
this.final_limit = this.offset;
}

AjaxTableCreator.prototype.moveForwards = function(){
  this.initial_limit += this.offset;
  this.final_limit = this.offset+this.initial_limit;
}

AjaxTableCreator.prototype.build(){
   //make your ajax request with jquery
   $.getJSON(url, {start:this.initial_limit, end:this.final_limit}, function(data){
        $("#my-table").datatable("insert", data); //insert your data with the format specified in documentation
   });
}

var table_maker = new AjaxTableCreator();

You need to add one EventListener to your button with jQuery.

$(document).ready(function(){
   $("#mybutton").click(function(){
      table_maker.moveForwards();
      table_maker.build();
   });
});

Regards, i did something like that with datatable plugin, thanks to @Holt59

Closing this issue since it looks like the problem is solved. Feel free to open a new issue if necessary.


Circular Reference in JSON

Describe the bug
I'm receiving a circular reference error after calling room.getStorage(), immediately after I create the room and initialize the data structure
TypeError: Converting circular structure to JSON -->
  starting at object with constructor '_LiveList' | property '_items' ->
    object with constructor 'Array' | index 0 ->
      object with constructor '_LiveRegister' | property '_parent' ->
        object with constructor 'Object' --- property 'node' closes the circle at JSON.stringify (<anonymous>) at ...

My call to room.getStorage()
const { room, leave } = client.enterRoom<Presence, Storage>(workbookId!, {
  initialPresence: { selectedItems: [] },
  initialStorage: {
    segments: new LiveList<EnsureJson<Segment>>(segments),
  },
});

const { root } = await room.getStorage();

I can successfully call JSON.stringify(segments)
[
  {
    "id": "0F673P86P70WN",
    "route": "MFRAMR07458**C",
    "beginMeasure": 0.0143,
    "endMeasure": 0.1221,
    "segmentLength": 0.1078,
    "attributes": {
      "crossRouteTo": "SHANNON GREEN DR",
      "year": "2024",
      "pavementTypeCode": "01HBSHN89S5F7S3B44148QGKFM",
      "crossRouteToOffset": 0,
      "crossRouteFromOffset": 0,
      "project": "0F673P69TJCCG",
      "pavementActivityCode": "01HBSHN899AQCP0ZSJJFYN0F8Y",
      "program": "0F673P6A6MHDX",
      "crossRouteFrom": "FITZPATRICK BLVD",
      "estimateCost": 525926.02,
      "group": "0F673P68FHNSA"
    },
    "street": "VILLAGE GROVE LN"
  },
  {
    "id": "0F673P88Z753K",
    "route": "MFRAMR00269**C",
    "beginMeasure": 0,
    "endMeasure": 0.1336,
    "segmentLength": 0.1336,
    "attributes": {
      "crossRouteTo": "Alley: AL-32858",
      "year": "2023",
      "pavementTypeCode": "01HBSHN89S5F7S3B44148QGKFM",
      "crossRouteToOffset": 0,
      "crossRouteFromOffset": 0,
      "project": "0F673P67ZBG2S",
      "pavementActivityCode": "01HBSHN89AHH6SHNACWV90RMVZ",
      "program": "0F673P68B2ANY",
      "crossRouteFrom": "Terminus",
      "estimateCost": 493644.62,
      "group": "0F673P66JBAW6"
    },
    "street": "BERRELL AVE"
  },
  {
    "id": "0F673P8APQT2P",
    "route": "MFRAMR06417**C",
    "beginMeasure": 0,
    "endMeasure": 0.13,
    "segmentLength": 0.13,
    "attributes": {
      "crossRouteTo": "CAPE HENRY DR",
      "year": "2024",
      "pavementTypeCode": "01HBSHN89S5F7S3B44148QGKFM",
      "crossRouteToOffset": 0,
      "crossRouteFromOffset": 0,
      "project": "0F673P69YJMJV",
      "pavementActivityCode": "01HBSHN899AQCP0ZSJJFYN0F8Y",
      "program": "0F673P6A6MHDX",
      "crossRouteFrom": "Terminus",
      "estimateCost": 691654.62,
      "group": "0F673P68VW796"
    },
    "street": "LUCCIS CT"
  }
]

To Reproduce
Steps to reproduce the behavior:
Live Example
Expected behavior
I expect that a call to room.getStorage() should succeed immediately after creating and initializing the room.
Environment (please complete the following information):
This is a Room with no existing document and no schema (essentially blank/new room)
<EMAIL_ADDRESS>Google Chrome: Version 123.0.6312.87 (Official Build) (arm64)

From this error
TypeError: Converting circular structure to JSON -->
  starting at object with constructor '_LiveList' | property '_items' ->
    object with constructor 'Array' | index 0 ->
      object with constructor '_LiveRegister' | property '_parent' ->
        object with constructor 'Object' --- property 'node' closes the circle at JSON.stringify (<anonymous>) at ...

it looks like it's somehow trying to call JSON.stringify() on a LiveList instance, which should never be happening. It looks like for some reason, the LiveList isn't recognized as such. Could you share a full example that would allow us to replicate the issue?
Also, can you check that all versions of your Liveblocks packages are on the same version? You can check with npm ls.

It must be caused by some debug logging I have enabled. Closing issue.


Doesn't work on Android. PullToRefreshViewAndroid.propTypes

I got this error on android.
undefined is not an object (... _reactnative.PullToRefreshViewAndroid.propTypes)

did you find any solution?

I am using React Native Refresh Control. works perfect for me.

@ruskid I had the same issue, use the github master branch directly in your package.json that should fix this issue for you.

@jasdeepsingh  Could you show details how to solve the problem ruskid encountered?

@zhangyahong In your package.json specify the dependency as follows:
"dependencies": {
   "public": "git://github.com/user/repo.git#ref"
}

Obviously, change the git link and package to appropriate ones that point to this repo.

I've updated this component to v2.1.0. Please try to use this one.


Ice Cube emoji

Frozen water would be well recognizable as an Ice Cube, perhaps melting.

Ice Cube is a Candidate for Emoji 12.0 (2019).


Migrate UI to Piranha Web Profile

Depends on #198

Closing for now. Once JGit is using the jakarta namespace we can do the work


Month and day of the week seems to be inverted.

After some try I discovered, according to fromCron, that the cron string is parsed as m h D w M y, but, according to crontab documentation, should be m h D M w y.
This generates weekly task which results in invalid cron.
The generated cron seems to suffer of the same issue.

@sfarfarini the cron output is [minute, hour, day of the month, month, day of the week] as specified in the sources below.
WIKI
Cron Tab
nnCron


[sentences/a 2-words sentence]  Periodically wrong stress in a word "Машина" in the exercise 18 in the mode "solve"

Preconditions:
1 Log in as an existing user. Open: groups/speech exercises/sentences/a 2-words sentence/18 exercise
https://brainup.site/groups/2/series/4/subgroup/29/exercise/1194/task/1186
2 The first 17 exercises are completed
Step:
Press the red button
Select the mode "solve"
Actuai result: ма́шина
Expected result: маши́на

corrected


Needs option to maintain aspect ratio

There is currently no way to keep the original aspect ratio of an image. Keeping the orientation of the image is a good start, but this is an important feature to make this a well rounded image optimization tool.
We should add --keep-aspect CLI parameter and a keep-aspect JSON config option. The CLI parameter should also be added to the multi-version method.

This feature has been added.


Deterministic runs

Hello,
I'm trying to reproduce runs and it works fine when there is no other traffic but when traffic is present the runs are not deterministic. Here's the code for reproducibility:
import random
import numpy as np
import matplotlib.pyplot as plt
from metadrive import MetaDriveEnv
from metadrive.examples import expert

rnd_seed = 123

RENDER = True

config = dict(
        use_render=False,
        manual_control=False,
        traffic_density=0.1, # or 0 to be deterministic
        traffic_mode="respawn",
        environment_num=1,
        random_agent_model=False,
        random_lane_width=False,
        random_lane_num=False,
        random_traffic=False,
        start_seed=0,
        force_destroy=True,
        map="SOT",
    )

env = MetaDriveEnv(config)
print("Starting the environment ...\n")

for episode in range(3):
    random.seed(rnd_seed)
    np.random.seed(rnd_seed)
    obs = env.reset(force_seed=0)

    obs_vec = []
    ep_crashes, ep_cost = 0.0, 0.0
    frames = []
    for t in range(1000):
        action = expert(env.vehicle, deterministic=True)
        obs, reward, done, info = env.step(action)
        obs_vec.append(obs)
        if(RENDER):
            frame = env.render(mode="top_down", track_target_vehicle=True)
            frames.append(frame)
        ep_crashes += info['crash']*1.0
        ep_cost += info['cost']
        if info['arrive_dest']:
            print(f'done after {t} steps')
            break

    all_data = np.array(obs_vec)
    print("The returned reward:\n {}.\n".format(info['episode_reward']))
    print("crashes:\n {}\n".format(ep_crashes))
    print("The returned information:\n {}.".format(info))

    plt.plot(all_data[:,0], label=f'episode {episode}')

env.close()

So as you can see, I'm comparing the first lidar ray throughout the simulation for 3 runs and they are not the same. What's more interesting, if you look at the figure or run the code, is that every odd iteration is the same, and every even iteration is the same (at least in the lidar ray).
I disabled random_traffic, the expert is deterministic, the seed is the same as well as setting the seed in random and numpy (I guess it wouldn't hurt), and setting a specific map.
What else could I be missing? Or ideas for a fix?

Hi,
Thanks for your feedback.
I run the code on the latest main branch and cannot reproduce it. Three runs have the same reward and episode length. Also, I add a simple asset for comparing the observation between three episodes:
    epi_len = len(obs_vec)
    assert len(episode_obs[0]) == len(episode_obs[1]) == len(episode_obs[2])
    for i in range(epi_len):
        assert all(episode_obs[0][i] == episode_obs[1][i]) and all(episode_obs[1][i] == episode_obs[2][i])

No errors are thrown.
Did you run on the latest main branch? Recently, I merged a new modification related to the reproducing problem into the main. You might miss it if you didn't update your local main branch.
Quanyi

Thanks for coming back to me!
I am running the latest main, I've only downloaded metadrive a few days ago. The only difference I would say,
is that I have Panda3D==1.10.13.
It's very consistent for me. If I record just the expert's commands on the first iteration and run them in the second
iteration, then I get the exact same runs. But if not, at some point they diverge. I've also tried to "fool it" and
reset it twice or just run a few steps, but that won't work, seems like I need to run until the end of the episode.

Using a string like SOT is enough I think. It is a shortcut for generating maps. The full configuration should be like:
map_config={
        BaseMap.GENERATE_TYPE: MapGenerateMethod.BLOCK_SEQUENCE,
        BaseMap.GENERATE_CONFIG: "SOT",
        BaseMap.LANE_WIDTH: 3.5,
        BaseMap.LANE_NUM: 3,
        "exit_length": 50,
    }

config = dict(
        use_render=False,
        manual_control=False,
        traffic_density=0.1, #10, #0.15,
        traffic_mode="respawn",
        environment_num=1,
        random_agent_model=False,
        random_lane_width=False,
        random_lane_num=False,
        random_traffic=False,
        start_seed=0,
        force_destroy=True,
        map_config=map_config,
        random_spawn_lane_index=False,
        success_reward=100.,
    )
env = MetaDriveEnv(config)


[FEATURE]: Implement insert ignore and replace statements for MySQL (upsert)

https://www.atlassian.com/data/admin/how-to-insert-if-row-does-not-exist-upsert-in-mysql

INSERT IGNORE is implemented but the documentation is not updated. https://github.com/drizzle-team/drizzle-orm/pull/305


add filter function in processor

add the functionality to filter the dataframe to a range of values.
closes #13
still needs tests

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 12 (16.67%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 89.835%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

sed/core/processor.py
2
12
16.67%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
5011

Relevant Lines:
5578

💛  - Coveralls

@rettigl @zain-sohail this is a simple addition. Ready for review.


Remove sharing

Forgive me if I've missed it.
Is there a way to remove sharing from files, currently it seems files are shared indefinitely and I worry that my link could get spread around and abused.

Edit the "db.json" and remove the link. Don't think there is another way atm.

It would be very useful to implement something that removes sharing files.


Added Catch Me If You Can Game

Subject: Pull Request - Addition of  Catch Me If You Can Game
Dear Project Maintainer,
I would like to submit a pull request for the integration of my game called "Catch Me If You Can" into your project. Additionally, I have made changes to the game's styling to ensure it aligns seamlessly with your existing design. Furthermore, I have ensured that the game is fully responsive, adapting to various screen sizes and devices.
To achieve this, I have followed the steps outlined below:

Forked the Project:

Created a fork of the project repository under my GitHub account.
2. Local Setup:
Cloned the forked repository to my local machine using Git.
3. Created a New Branch:
Generated a new branch named "catch_me_if_you_can" to isolate my changes.
4. Added and Modified Files:
Incorporated the Typo game files into the appropriate locations within the project structure.
Made necessary modifications and additions to ensure seamless integration.

Testing and Verification:
Conducted extensive testing to ensure proper functionality of the Typo game within the project.
Verified that the game performs optimally without any functional or integration issues.
Committed the Changes:

Added the modified files to the staging area.
Committed the changes with a descriptive message: "Add Typo game"

Pushed the Changes:
Pushed the committed changes to my forked repository.

I kindly request the project team to review my pull request and consider integrating the Catch Me If You Can into the project. I believe that the game's addition, along with the design changes to match your project's aesthetics and its full responsiveness, will enhance the overall user experience.
Thank you for your time and consideration. I look forward to any feedback or suggestions you may have.
Best regards,
Sujit Memane

Thank you @sujitmemane ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Hey @sujitmemane 👋!
@kunjgit here,
We have this annoucement to make 📢!!
During the time of PR don't alter main index file ! 🙂
In main Readme file just use * as a game number during the time we are merging we will add number !! 👀
Make sure you join our Discord🕹 if you haven't 😇
Thank you 💗!

Thank you  @sujitmemane , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀


SchedulableCores doubles unexpectedly

CPA Version
1.7.1.
Kubernetes Version
1.11.8
What happens?
During the normal course of operations, seemingly with no change to the environment, the number of detected SchedulableCores doubles (while the number of detected nodes remains the same). This results in the number of DNS pods doubling and then being chopped in half again (resulting in some occassional blips in DNS service).
Here's a sampling of the logs:
I0906 16:30:32.691040       1 k8sclient.go:277] Cluster status: SchedulableNodes[45], SchedulableCores[90]
I0906 16:30:32.691065       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 11 to 12
I0906 16:34:12.693949       1 k8sclient.go:277] Cluster status: SchedulableNodes[44], SchedulableCores[88]
I0906 16:34:12.693973       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 12 to 11
I0906 16:38:12.693949       1 k8sclient.go:277] Cluster status: SchedulableNodes[45], SchedulableCores[90]
I0906 16:38:12.693975       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 11 to 12
I0906 16:42:02.691179       1 k8sclient.go:277] Cluster status: SchedulableNodes[44], SchedulableCores[88]
I0906 16:42:02.691461       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 12 to 11
I0906 19:32:32.696697       1 k8sclient.go:277] Cluster status: SchedulableNodes[44], SchedulableCores[182]
I0906 19:32:32.696721       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 11 to 23
I0906 19:34:52.692216       1 k8sclient.go:277] Cluster status: SchedulableNodes[46], SchedulableCores[186]
I0906 19:34:52.692243       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 23 to 24
I0906 19:49:02.690834       1 k8sclient.go:277] Cluster status: SchedulableNodes[47], SchedulableCores[94]
I0906 19:49:02.690859       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 24 to 12
I0906 19:52:12.693694       1 k8sclient.go:277] Cluster status: SchedulableNodes[47], SchedulableCores[188]
I0906 19:52:12.693721       1 k8sclient.go:278] Replicas are not as expected : updating replicas from 12 to 24

I have not yet been able to reliably reproduce this issue but it does seem to happen a few times an hour, possibly coinciding with minor cluster scaling operations (initiated, in our case, by the cluster-autoscaler).

Is it possible to increase the log verbosity to 3 or 4? (-v command line flag)

I have temporarily disabled it while we debug other coredns crashing issues but I will get back to you on that.

/assign

Can't think of how can cores be doubled while nodes remain the same, unless node's ResourceCPU was manipulated in some sort:
https://github.com/kubernetes-incubator/cluster-proportional-autoscaler/blob/872b0a4e17b10aa43592e76634b739612483de71/pkg/autoscaler/k8sclient/k8sclient.go#L192-L203

@eherot What environment (or cloud provider) do you use?

That would be AWS

I wonder would it be related to the k8s client versions --- CPA 1.7.1 uses k8s 1.15.1 where as your cluster uses 1.11.8.

Is there a CPA/k8s compatibility matrix available somewhere?

As client-go is the only piece that may be incompatible, I would refer to https://github.com/kubernetes/client-go#compatibility-matrix. The latest CPA uses client-go 12.0, technically it should work with k8s 1.9+.


add yarnDedupeFewer

wdyt?

https://docs.renovatebot.com/configuration-options/#postupdateoptions

up to you. I think the fewer dependencies, the better. but happy to change

merge thisss

🏃 💨 👨💻 🏁 ✌


dynamic load test fails on master

Just cloned and repeated the steps in README.
$ make test
Running tests...
Test project /home/ror6ax/Development/opentracing-c/build
    Start 1: dynamic_load_test
1/2 Test #1: dynamic_load_test ................***Exception: Child aborted  0.23 sec
    Start 2: tracer_test
2/2 Test #2: tracer_test ......................   Passed    0.00 sec

50% tests passed, 1 tests failed out of 2

Total Test time (real) =   0.24 sec

The following tests FAILED:
	  1 - dynamic_load_test (Child aborted)
Errors while running CTest
make: *** [Makefile:107: test] Error 8

Thanks.

Can you add the output from Testing/Temporary/LastTest.log.

Start testing: Apr 03 16:31 CEST
----------------------------------------------------------
1/2 Testing: dynamic_load_test
1/2 Test: dynamic_load_test
Command: "/home/ror6ax/Development/opentracing-c/build/dynamic_load_test"
Directory: /home/ror6ax/Development/opentracing-c/build
"dynamic_load_test" start time: Apr 03 16:31 CEST
Output:
----------------------------------------------------------
dynamic_load_test: /home/ror6ax/Development/opentracing-c/test/dynamic_load_test.c:45: main: Assertion `error_code == opentracing_dynamic_load_error_code_incompatible_library_versions' failed.
<end of output>
Test time =   0.23 sec
----------------------------------------------------------
Test Failed.
"dynamic_load_test" end time: Apr 03 16:31 CEST
"dynamic_load_test" time elapsed: 00:00:00
----------------------------------------------------------

2/2 Testing: tracer_test
2/2 Test: tracer_test
Command: "/home/ror6ax/Development/opentracing-c/build/tracer_test"
Directory: /home/ror6ax/Development/opentracing-c/build
"tracer_test" start time: Apr 03 16:31 CEST
Output:
----------------------------------------------------------
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Passed.
"tracer_test" end time: Apr 03 16:31 CEST
"tracer_test" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Apr 03 16:31 CEST

@ror6ax any answers here?

Sorry, here are the gory details.
/usr/bin/cc --version
cc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)

Fedora 26 / 4.14.6-200.fc26.x86_64

Nothing exotic, really.

Can you try using CMAKE_BUILD_TYPE=Debug then run dynamic_load_test in gdb?

@isaachier - If you look at the LastTest.log output above, you can tell why it's failing. It has something to do with the version check:
----------------------------------------------------------
dynamic_load_test: /home/ror6ax/Development/opentracing-c/test/dynamic_load_test.c:45: main: Assertion `error_code == opentracing_dynamic_load_error_code_incompatible_library_versions' failed.
<end of output>
Test time =   0.23 sec
----------------------------------------------------------

@rnburn - accessing error_code.code() gives me error: request for member ‘code’ in something not a structure or union

Right, I mean print error_code, so you can see what it is if it's not the expected opentracing_dynamic_load_error_code_incompatible_library_versions

Ya I agree with @rnburn. Just error_code would be nice. If it is 0, then I'd need to see how the version is incorrectly considered the same.

@ror6ax any update?


Feature/adoption  flexipage

Critical Changes
Changes
Adding a flexipage with all the components to Get Started Page.
Issues Closed
Community Ideas Delivered
New Metadata
* Flexipage
    - NPSP_Get_Started

Deleted Metadata

W-7964391
W-8156830

@dcaballeroSf Does this PR need a new tab for the flexipage?


AuthorizeView tag in Blazor component throws if Roles param included

Describe the bug
In preview 9, I'm seeing a problem with AuthorizeView when using Windows Authentication. If I just use <AuthorizeView><Authorized>OK</Authorized><AuthorizeView> it works, but if I add the Roles parameter, I get: Win32Exception: The trust relationship between this workstation and the primary domain failed. Here's the changed markup: <AuthorizeView Roles="XXX"><Authorized>OK</Authorized><AuthorizeView> The call stack is listed below.
To Reproduce
I can repro this with a new prev9 blazor serverside app, add windows authentication, and add the above AuthorizeView markup to the bottom of the index.razor page and run.
Expected behavior
I'd expect the contents of the AuthorizeView to not display or at least see an error indicating that the XXX role is unknown.
Error displayed in browser...
An unhandled exception occurred while processing the request.
Win32Exception: The trust relationship between this workstation and the primary domain failed.
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, out bool someFailed)
Stack Query Cookies Headers Routing
Win32Exception: The trust relationship between this workstation and the primary domain failed.
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, out bool someFailed)
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, out bool someFailed)
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, bool forceSuccess)
System.Security.Principal.WindowsPrincipal.IsInRole(string role)
Microsoft.AspNetCore.Authorization.Infrastructure.RolesAuthorizationRequirement+<>c__DisplayClass4_0.b__0(string r)
System.Linq.Enumerable.Any(IEnumerable source, Func<TSource, bool> predicate)
Microsoft.AspNetCore.Authorization.Infrastructure.RolesAuthorizationRequirement.HandleRequirementAsync(AuthorizationHandlerContext context, RolesAuthorizationRequirement requirement)
Microsoft.AspNetCore.Authorization.AuthorizationHandler.HandleAsync(AuthorizationHandlerContext context)
Microsoft.AspNetCore.Authorization.Infrastructure.PassThroughAuthorizationHandler.HandleAsync(AuthorizationHandlerContext context)
Microsoft.AspNetCore.Authorization.DefaultAuthorizationService.AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable requirements)
Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.IsAuthorizedAsync(ClaimsPrincipal user)
Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.OnParametersSetAsync()
Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.HandleException(Exception exception)
Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToPendingTasks(Task task)
Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(ref DiffContext diffContext, int frameIndex)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(ref DiffContext diffContext, int frameIndex)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(ref DiffContext diffContext, int newFrameIndex)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(ref DiffContext diffContext, int newFrameIndex)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(ref DiffContext diffContext, int oldStartIndex, int oldEndIndexExcl, int newStartIndex, int newEndIndexExcl)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, int componentId, ArrayRange oldTree, ArrayRange newTree)
Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.HandleException(Exception exception)
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender()
Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(int componentId, RenderFragment renderFragment)
Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.HandleException(Exception exception)
Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToPendingTasks(Task task)
Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(int componentId, ParameterView initialParameters)
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.CreateInitialRenderAsync(Type componentType, ParameterView initialParameters)
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.RenderComponentAsync(Type componentType, ParameterView initialParameters)
Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext+<>c__11+<b__11_0>d.MoveNext()
Microsoft.AspNetCore.Mvc.ViewFeatures.RazorComponents.StaticComponentRenderer.PrerenderComponentAsync(ParameterView parameters, HttpContext httpContext, Type componentType)
Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperComponentExtensions.PrerenderedServerComponentAsync(HttpContext context, ServerComponentInvocationSequence invocationId, Type type, ParameterView parametersCollection)
Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperComponentExtensions.RenderComponentAsync(IHtmlHelper htmlHelper, RenderMode renderMode, object parameters)
BlazorApp3.Pages.Pages__Host.b__10_1() in _Host.cshtml
+
@(await Html.RenderComponentAsync(RenderMode.ServerPrerendered))
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
BlazorApp3.Pages.Pages__Host.ExecuteAsync()
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable statusCode)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|29_0<TFilter, TFilterAsync>(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Sorry, I just realized that I need to format the code from my original post so that you can see it.  Here are the snippets...
working:   <AuthorizeView><Authorized>OK</Authorized><AuthorizeView>
not working:  <AuthorizeView Roles="XXX"><Authorized>OK</Authorized><AuthorizeView>

Thanks for contacting us, @intiharj.
We are unable to reproduce this issue. Can you try to share with us as many details about your environment, as possible in a hope that there will be something to follow up on.

Hopefully it's my environment :).  I'll test on another machine to see if I can repro it there.  Will write back later today.  Thank you.

OK, I have more information.
I've tried this on 2 environments, both running preview 9
ENV_A:

the original environment mentioned above
windows 10 v1803 (OS Build 17134.590)
corporate image
VPN to corporate network with Active Directory

ENV_B:

personal (non-corporate) machine
windows 10 v1903 (OS Build 18362.329)

Notes:
I still see the original error on ENV_A if I use a role that is not a security group in Active Directory.  When I do use an actual security group that I am a member of, I no longer see the above trust relationship error, but the authorized content still does not display.  In the debug console in visual studio, I see the following two lines:
"Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Information: Authorization was
successful."
"Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Information: Authorization failed."
When I run the code with Roles="XXX" on ENV_B, the content is not displayed as expected because there is no "XXX" role on that environment.  If I change it to Roles="Administrator"  (which I am a member of), I see the same results as ENV_A, that is, no error message displayed, no content displayed, and the same two messages in the debug output in VS:  ("Authorization was successful"  followed by "Authorization failed" )

also, in both environments, I'm running debug builds in IIS Express

Thanks for the details, @intiharj.
So to confirm I understood your correctly: when the Roles=... is added to the AuthorizeView, even though the role exists and the user is a member of that role, nothing gets rendered, however you see the logs like the following in this case:
Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Information: Authorization was
successful.
Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Information: Authorization failed.

correct

@SteveSandersonMS this looks like a bug. Can you please look into this for 3.1?

I've investigated, and it doesn't look like this is something we control inside Blazor (or even ASP.NET Core).
I verified that Blazor's Windows Authentication template can successfully authorize visitors based on <AuthorizeView Roles="some-group-name">...</AuthorizeView>, where some-group-name is a group that you may or may not be a member of. So the basic scenario does work.
For the scenario reported here, i.e., a particular corporate Windows image on a particular domain triggering the error The trust relationship between this workstation and the primary domain failed, this is not something I have been able to reproduce. However:

Searching for that error message yields a lot of results suggesting it's something that happens internally to Windows if the machine is not adequately synced with the domain. I have personally experienced this in the past in a non-Blazor-related scenario (I was unable to log into a domain account) and had to rejoin the domain to fix it. As such it might be specific to the one machine being tested, and totally unrelated to .NET as a whole.
The auth implementation in Blazor simply uses the common authorization code from ASP.NET Core and isn't doing anything unique of its own. We rely on Windows authentication returning a yes/no response and not throwing. If the underlying Windows auth APIs do throw then I believe we are correct to surface the exception. As far as I'm aware, the same exception would occur if doing authorization in the same way on server-side ASP.NET Core (e.g., MVC/Razor Pages), since it's the same code paths.

As such I don't see that there's anything else we can do here. If @intiharj is able to provide steps for configuring a new Windows machine such that the problem is reproducible, we may be able to pass this on to a team that could confirm whether it's a bug or a misconfiguration. If anyone else is able to reproduce it too, please let us know in case we can identify something common to your scenario.
Given all this I'm going to close it as an external issue in the Windows configuration. I'm sorry that doesn't give you a clear solution @intiharj but it really does appear to be something happening inside your domain/auth setup and possibly even specific to one machine or the particular image used to join to the domain.
cc @blowdart in case he has seen this particular error before ("The trust relationship between this workstation and the primary domain failed") and has suggestions on diagnosis or resolution steps, or knows someone who might.

Thanks, @SteveSandersonMS.  I just tried to repro this on ENV_A (see above) upgraded to ASP.NET Core 3.0.0, and I no longer see the problem.  I'm on the road this week, but will try it on ENV_B this weekend with 3.0.0.  @blowdart, please let me know if you need any more info from me on preview 9.

None, that is a windows error from when a machine hasn’t been online and talking to a DC for ages. Not our error.

From: intiharj<EMAIL_ADDRESS>Sent: Tuesday, October 8, 2019 8:11:16 PM
To: aspnet/AspNetCore<EMAIL_ADDRESS>Cc: Barry Dorrans<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [aspnet/AspNetCore] AuthorizeView tag in Blazor component throws if Roles param included (#13789)
Thanks, @SteveSandersonMShttps://github.com/SteveSandersonMS. I just tried to repro this on ENV_A (see above) upgraded to ASP.NET Core 3.0.0, and I no longer see the problem. I'm on the road this week, but will try it on ENV_B this weekend with 3.0.0. @blowdarthttps://github.com/blowdart, please let me know if you need any more info from me on preview 9.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/aspnet/AspNetCore/issues/13789?email_source=notifications&email_token=AAGCNCX5HMGAZUJZGWRABRDQNVDVJA5CNFSM4IUO2V22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAWMAAY#issuecomment-539803651, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAGCNCUIY6GDMW37YYPRKADQNVDVJANCNFSM4IUO2V2Q.


Please document a rust client

How would a Rust crate access this DB? Can it just submit query strings and be done?

Hi,
AGE is an extension of Postgres. So the normal Postgres Crate (https://docs.rs/postgres/0.19.0/postgres/) should be compatible with the extension. Query strings should be in the format outlined here: https://age.apache.org/docs/Apache_AGE_Guide.pdf. Currently there is no custom rust client for AGE.

awesome! how do you like to deploy it?

I'm afraid i don't quite understand what you mean by how do we deploy it.  Do you mean how do we deploy AGE or how do we deploy applications written in Rust that use AGE?

@bionicles
Hi, are you asking how AGE is deployed or how to deploy a Rust application that uses AGE?

haha, I wouldn't expect you guys to figure out my devops problems! but it's interesting to think about how to deploy this.
an easy way to make this more available would be to add "AMI" to releases, built automatically with packer perhaps, then folks can run AGE on AWS with 1 click without even worrying about docker. ex https://aws.amazon.com/marketplace/pp/Jetware-PostgreSQL-96/B01MRYDTDD
but we can definitely also make some epic terraform modules for AGE

Hello @bionicles, we do have an Apache AGE AMI available. If you would like us to share it with we would need your AWS account number. We will consider adding "AMI" to releases, but we need to review all the licensing before taking any actions.

Cool, just mean to say, any easy ways to get a cloud hosted AGE service running, could definitely help newcomers feel more confident in the project

There is a plan to implement a visualization tool and query editor to access AGE server within the next couple of month.


Update CI/CD workflow

For example, linting as never been enabled.

Duplicate of #22

Duplicate of #22