node.elementHasClass arguments

What's going on here?
  function elementHasClass(Node, className) {
    return function(node) {
      return (node.nodeType === Node.ELEMENT_NODE && node.className === className)
    }
  }

  function isSelectionMarkerNode(node) {
    return elementHasClass(Node, 'scribe-marker')(node);
  }

  function isCaretPositionNode(node) {
    return elementHasClass(Node, 'caret-position')(node);
  }

  function isNotObservableNode(node) {
    return elementHasClass(Node, 'scribe-not-observable')(node);
  }

Why is Node being passed as an argument?
For the sake of testing?
The test is the only place that function is actually being called from outside - perhaps this was intended as an internal function supporting those other three functions? It's being exported though.

Yes exactly it makes the function work only on it's parameters rather than global state. The base function is the "general" case and the other three are specialisations designed for readability.

Yes exactly it makes the function work only on it's parameters rather than global state.

Not really - you're still grabbing the Node global in those three functions, so the net result is dependency on the Node global for all of the functions that are actually called from outside.
You might as well simplify:
  function elementHasClass(node, className) {
    return (node.nodeType === Node.ELEMENT_NODE && node.className === className)
  }

  function isSelectionMarkerNode(node) {
    return elementHasClass(node, 'scribe-marker');
  }

  function isCaretPositionNode(node) {
    return elementHasClass(node, 'caret-position');
  }

  function isNotObservableNode(node) {
    return elementHasClass(node, 'scribe-not-observable');
  }

This saves the overhead of creating and executing an extra function on-the-fly for every call to those three functions.

The base function is the "general" case and the other three are specialisations designed for readability.

There is no case where the "general" function is actually used from the outside - it's used only internally by those three functions, all of which depend on the Node global.
If you're concerned about accessing the Node global, perhaps the thing to do is to import it?
Just like you're doing for other global dependencies, such as MutationObserver.

It's a global dependency for the special-case functions not the underlying implementation.
I would generally trade readability for performance overhead. But feel free to attach some performance tests to illustrate the difference, I've been known to change my mind in the past!

IMO elementHasClass(Node, 'caret-position')(node) looks peculiar.
I find elementHasClass(node, 'caret-position') is much easier to read. (and understand.)
I guess that's a matter of opinion :-)

Learn to love the Curry! (Node)('caret-position')(node) would probably be better but I'm a bit lazy.

Learn to love the Curry!

Learn to KISS ;-)
  function elementHasClass(Node, className) {
    return function(node) {
      return (node.nodeType === Node.ELEMENT_NODE && node.className === className)
    }
  }

  /* delete redundant functions */

  return {
    isSelectionMarkerNode: elementHasClass(Node, 'scribe-marker'),
    isCaretPositionNode: elementHasClass(Node, 'caret-position'),
    isNotObservableNode: elementHasClass(Node, 'scribe-not-observable'),
    // ...
  }

At least then you're not recreating the functions on every call for no reason.

Yeah, that's a fair improvement.

Tried it today and I the reference to Node in the exports breaks compilation as Node needs to be resolved at compilation.
Lazy is actually better.


uAgents: Add example for interacting with the Agentverse agents

We decided that since this example just requires minor configuration changes to other examples, it's sufficient to add instructions for these changes to the docs: https://github.com/fetchai/uAgents/pull/95.


⚠ Minecraft has degraded performance

In e3e0be0, Minecraft (https://www.minecraft.net) experienced degraded performance:

HTTP code: 200
Response time: 1115 ms

Resolved: Minecraft performance has improved in cfdf672.


Getting Required parameter missing error in CCAvenue

Actually am developing web application using mean stack, in this application am trying integrate ccavenue payment gateway
Below is my code:
 ccavenue.setMerchant("*****");
    ccavenue.setWorkingKey("***********************");
    ccavenue.setOrderId("WHIZ0001");
    ccavenue.setRedirectUrl("http://localhost:7777/login");
    ccavenue.setOrderAmount('1000.00');

    var param = {
                  billing_cust_address: 'Chennai',
                  billing_cust_name: 'Kalaiselvan',
                  billing_cust_country: 'India',
                  billing_cust_state: 'Tamilnadu',
                  billing_cust_city: 'Chennai',
                  billing_zip: '600056',
                  billing_cust_tel: '9003321521',
                  billing_cust_email: 'kalai131192@gmail',
                  delivery_cust_name: 'Kalaiselvan',
                  delivery_cust_country: 'India',
                  delivery_cust_state: 'Tamilnadu',
                  delivery_cust_city: 'Chennai',
                  delivery_zip: '600056',
                  delivery_cust_tel: '9003321521',
                  delivery_cust_email: 'kalai131192@gmail',
         };
         ccavenue.setOtherParams(param); //Set Customer Info

// Server url where you want to send data to ccavenue
router.get('/make-payment', function(req, res) {
    ccavenue.makePayment(res); // It will redirect to ccavenue payment
});

router.post('/redirect-url', function response(req, res) {
    var data = ccavenue.paymentRedirect(req); //It will get response from ccavenue payment.
    console.log(data);
    if(data.isCheckSumValid === true && data.AuthDesc == 'Y') {
        console.log('Success' + res);
        // Success
        // Your code
     } else if(data.isCheckSumValid === true && data.AuthDesc == 'N') {
            console.log('UnSuccess' + res);
        // Unuccessful
        // Your code
    } else if(data.isCheckSumValid === true && data.AuthDesc == 'B') {
        // Batch processing mode
        // Your code
    } else {
        // Illegal access
        // Your code
    }
});

while am trying this am getting error as

Error Code:	90
Error Description:	Required+parameter+is+missing+or+Invalid+session.%3CB+style%3D%22color%3Ared%22%3EKindly+clear+cache+of+browser+and+re-initiate+your+transaction%3C%2FB%3E

Can you mail me your js file. So i can check on my system

Iam facing this same issue, how did you solved it?
I have tried adding access code as well, but still not working.

Check this https://github.com/KalaiselvanMahendran/ccavenue
This is ccavenue integration kit, you can get this on ccavenue login
Thanks & Regards,
Kalaiselvan Mahendran
+ 91<PHONE_NUMBER>
On Mon, Aug 1, 2016 at 4:37 PM, Tej Pratap Sngh<EMAIL_ADDRESS>wrote:

Iam facing this same issue, how did you solved it?
I have tried adding access code as well, but still not working.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nitishkumarsingh13/node-ccavenue/issues/5#issuecomment-236552375,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APEG-ceQZ-Nwph-7Hv_TeWXQs2dr6FOWks5qbdNggaJpZM4H_2eR
.


Rewrite compiler without eval

For Inkscape's extension subsystem, I was looking into a faster css evaluation method and came across cssselect2. I like the approach taken here, but I can't use eval from a security perspective. Luckily, it's not really necessary as the library can be easily rewritten using lambdas instead.
Most of the change is mechanistic. I've split the long _compile_node function into subfunctions that are mapped using a dict.
The unit tests pass unchanged. Speed differences between the two versions are small, usually less than 10% (see also the following diagram).
I know this is a somewhat drastic change, so no hard feelings if this doesn't make it into the library. ~Medium-term I plan to add a second implementation of CompiledSelector using a local xpath, where possible. So for div > p, we would get "self::p[parent::div]" (which is completely different from cssselect's output). Except for the simplest lookups (id, class, type), this is faster than a pure python function. The final CompiledSelector would then try to create an XPATH representation, if that bails out, use the existing _compile_node, and finally check whether the selector is so simple that _compile_node is expected to be faster. But maybe this should be its own library - probably depends on your plan with this project here.~
Edit: After mostly completing this second, xpath-based implementation, there don't seem to be clear speed advantages, those might only exist for objectified etrees which I tested originally. Obviously, and xpath based implementation would not need the construction of the ElementWrapper at all, which might be an issue in read-write workloads. So let me know whether you are still interested in it.
Here's the benchmark:

Hi!
That’s… interesting! Using eval was both easier and supposed to give faster results, but having a version of cssselect2 based on real functions would probably be cleaner.
Let me play a little bit with your implementation, to find out what are the results given by my benchmarks with other documents!

My results are actually better than yours, let’s merge this!!!
Thanks a lot 💜!

I’ve tried this new version with bigger documents, and unfortunately this PR has a bad impact on speed. 😢
I’ll give more information as soon as I get more solid results.

I have tried different documents of WeasyPerf, and the speed problems are very important with large stylesheets. For example, with "documentation", the match functions takes 34% of rendering time without eval, and 15% with eval.
Unfortunately, I’ll revert the commit and keep eval for now. If you find a better way to handle this, add a comment to this PR, I’ll be happy to talk about this!


SpanContextHolder::close looks suspicious

https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/trace/SpanContextHolder.java#L73
Is this really OK?
As current span never gets the function applied,
since in line L77 you already change current to its parent.

Everything is ok since look at the DefaultTracer - we've already applied the logStoppedSpan on the current span there

OK.
Imo, it would be nicer if logStoppedSpan would be all handled via function and SpanContextHolder::close, but that's minor detail, so np.

Thanks for reading the code and your comments. That's really great to have someone double check your work :)


This Plugin is not for Production? As it shows the field in localhost but not on deployment

Here is my Screenshoots

@azahid5555 I have used the plugin in production.  Can you send a screenshot of the browser console in Strapi, I think it may be CORS related or have something to do with your content security policy

Hi admin sorry for the delays. here is the screenshot of production admin panel of strapi and the location field is in this small space but didn't seen.

Have you tried npm run build?

Yeah obviously 😄

Hmm, not totally sure then, I've run this in production for several applications and it worked properly.
My first thought is that your .env doesn't have the GOOGLE_MAPS_API_KEY on the deployed server.
Or if your /config/middlewares.js wasn't properly configured

If neither of those work, I'm not sure.
If anyone else is having this issue please thumbs up this comment and I'll take a closer look.

Mine is showing up but the search doesn't work. I've updated the middleware to bypass CSP but the warning still keeps showing in the console.


feature: Add user token support

You also need to update the documentation to let people know how they can use this option.


fix: update tests for data structures challenges

Fix the test strings to run the functions as the challenge currently passes without any code changes (all languages)

Data Structures: Use .has and .size on an ES6 Set

Data Structures: Use Spread and Notes for ES5 Set() Integration

[X] I have read freeCodeCamp's contribution guidelines.

[X] My pull request has a descriptive title (not a vague title like Update index.md)

[X] My pull request targets the master branch of freeCodeCamp.

[X] None of my changes are plagiarized from another source without proper attribution.

[X] My article does not contain shortened URLs or affiliate links.

Is related to #17856

@cazyw Awesome!
@raisedadead can you verify all these tests look good?

@cazyw All tests pass locally. Thank you for your patience and contributions.

Thanks  @tbushman @scissorsneedfoodtoo for the QA.
:sparkles: :sparkles: AWESOME! LGTM. :sparkles: :sparkles:
Thanks @cazyw , for this pull request and contributing to the code-base for the first time.
We will be looking forward for more contributions in future.
Cheers and happy contributing!

@cazyw @tbushman I have removed some of your changes with
https://github.com/freeCodeCamp/freeCodeCamp/pull/28296/commits/32e15e45e18d8a0c38a413ee33b3a01054390441
These were breaking the tests. Also we have updated our test output to render better failure results.

@cazyw @tbushman I have removed some of your changes with 32e15e4
These were breaking the tests. Also we have updated our test output to render better failure results.

@raisedadead oh :(    what was failing? Actually I've realised what was wrong


Added code to support when_enabled

https://github.com/watir/watirspec/pull/72

:+1:
I'll merge this when watir/watirspec#72 is finished.

Fixed and tests are passing :)

Thanks for pull request and for a bunch of changes that I've asked you to apply!


Roadmap to 1.0

[x] Include Dwarf Fortress (0.42.06)
[x] Include Dwarf Therapist
[ ] Include dfhack
[x] Include soundsense
[ ] Include stonesense

[ ] Include code for texture packs.
[x] Include option for audio.
[x] Include various settings
[x] Display License

Notes

DFHack and stonesense are on hold due to a lack of a stable version for 0.42.06.

With release 0.2-alpha, the follwoing goals have been met:

Display License

With release 0.3-alpha, the following goals have been met:

Include option for audio

With release 0.4-alpha, the following goals have been met:

Include soundsense.
Include various settings.

Wrote the wikipage for graphics code. 1.0 is here!


Add Shattered Pixel Dungeon and Mindustry.

Shattered Pixel Dungeon
Mindustry

Right, sorry. I missed that one.


chore: set new documentation approach live

set the urls properly for the new page.
Update the github_branch to point always to the current branch, which netlify used for a build

the builds are failing, as the domains are not setup currently :)


[jvm-packages] fix return type of setEvalSets

Codecov Report

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

@@           Coverage Diff           @@
##           master    #4105   +/-   ##
=======================================
  Coverage   60.47%   60.47%
=======================================
  Files         130      130
  Lines       11780    11780
=======================================
  Hits         7124     7124
  Misses       4656     4656

Continue to review full report at Codecov.

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


Windows support?

I have a small script that runs fine on my Mac OSX but when trying to run the same thing on a Windows machine, I get the following error:
c:/Ruby21/lib/ruby/gems/2.1.0/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:164: warning: cannot close fd before spawn
Is this supported for a windows environment?

@TheKidCoder not sure if you're still interested, but for now I submitted an issue to fix cocaine's posix-runner, hopefully we can go from there. https://github.com/thoughtbot/cocaine/issues/81


DNS address not validated

Title: DNS addresses are not validated
Description:
When setting address in clusters config, the value only gets evaluated if type is set to use IPs.
DNS strings are not evaluated.
Thus it is possible to enter utter garbage and for envoy to start up without complaining.
Example:
 clusters:
  - name: payments
    type: STRICT_DNS
    load_assignment:
      cluster_name: load
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: http://thisismytotallygreatserver.com/create/you

What kind of validation and behavior are you expecting exactly?


Pin collection dependencies to single versions

Signed-off-by: Webster Mudge<EMAIL_ADDRESS>

Test runs for AWS, Azure, and GCP all successful.


Bug with the session page's title

When I open an existing session, the page title shows the session's title correctly. But then if I click 'New session', the page title does not update corectly and it shows the following:

Looks like this bug is being introduced in #202.
Can't replicate the issue in main.


Create utility module

Delete unnecessary file global from core and create new module by TODO in this file

Also, rhythm should be renamed, good examples is indent as a component or indented as a modifier. It may be combining with a utility modules such as block or inline-block

Done


Do migration for cfitso40

Solution to issue cannot be found in the documentation.

[X] I checked the documentation.

Issue
@conda-forge-admin please rerender
Installed packages
.

Environment info
.

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I rerendered the recipe in conda-forge/casacore-feedstock#70.

Guessing this can be closed in light of PR ( https://github.com/conda-forge/casacore-feedstock/pull/70 )?

Yes I believe that's correct.


az mysql | Incorrect default value for --storage-size in autogenerated help

This bug is in response to MicrosoftDocs/azure-docs-cli issue 3113.  This fix needs to be routed to the az mysql service team as this module is not owned by the Azure CLI engineering team.

route to CXP team

@dbradish-microsoft @rula88 This is the default set by the Azure CLI which is like the docs mentioned (since they are generated as mentioned in the other issue). Since you could always pass in your own value, I don't see why this has to be changed unless its an official decision to do so. Could you elaborate?


Make TSHttpTxnEffectiveUrlStringGet() normalize scheme and host in URI to all lowercase.

Can you please give a description of the problem you are trying to solve?  Why not lowercase when you parse the incoming request?

I replied to your email as well, so copying that here.
Well, other than I seriously question this use of template (how smart are compilers, will it optimize away the to_same_char() calls completely, I don’t know), there might be a real concern here:

	This changes the cache key as well, right?

If so, not only should the PR mention that, we also have to make sure the release notes for v9.0.0 are clear on this. Albeit unlikely, a particular app could get 0% cache hit at an upgrade, if for some reason they used non-normalized scheme or host names in their URLs (bad on them, but we don’t like surprises).

Question 1; Why isn’t the scheme parsed down to a WKS? E.g. URL_WKSIDX_HTTPS; / URL_WKSIDX_HTTP?

Question 2: Since this changes the url_print() method, doesn’t this change behavior for a lot more than just TSHttpTxnEffectiveUrlStringGet() ? url_print() is used by a lot of functions, including url_string_get(), which is used in even more code. If so, the PR title / subject ought to be more descriptive, and not focus on this just one API.

I think I’m ok with the general concept of normalizing these fields (better for cache hit ratios). Not stoked with the template.

@bryancall see my last comment in YTSATS-2640 .  The point is that, if two URLs are normalized in this way, knowing if they are equivalent is a simple matter of checking if the two effective URL strings are the same.  Otherwise, you have to parse them, do and case insensitive compare on the schemes and hosts, and a case sensitive compare on the remainder.

@zwoop I would guess that this is really a failsafe in practice, and that TS receives very few requests where the scheme and host are not already all lowercase.  So the caches misses would likely be minimal.  I am pretty sure the scheme is already normalized to lower case.  In the long run, to the extent that clients send host specifiers with inconsistent case, this change would reduce redundant objects in the cache.

@zwoop see this test:  https://godbolt.org/z/UwbOJi
I think we can feel confident the template generates the same object code as cutting and pasting would.  to_same_char() is inlined.  (I checked, it's true with g++ as well as clang.)
Drink the template kool-aid already it's yummy.

@zwoop see this test: https://godbolt.org/z/UwbOJi
I think we can feel confident the template generates the same object code as cutting and pasting would. to_same_char() is inlined. (I checked, it's true with g++ as well as clang.)

Cool. Compilers are better than zwoop.

Drink the template kool-aid already it's yummy.

Never! It's the quiche of C++, real men don't use / eat it.

@zwoop I would guess that this is really a failsafe in practice, and that TS receives very few requests where the scheme and host are not already all lowercase. So the caches misses would likely be minimal. I am pretty sure the scheme is already normalized to lower case. In the long run, to the extent that clients send host specifiers with inconsistent case, this change would reduce redundant objects in the cache.

Yeh, I'll buy that. But at a minimum, the description / Subject of this PR has to improve, because reading it, it sounds like you are limiting this change to only this one public API, which I'm fairly confident is not the case. This changes a lot.

Fake news even Viking descendants eat quiche.  https://www.instructables.com/id/Norman-Quiche/ .

I'm -1 on this with the current blank commit message.

@mlibbey don't understand what you mean the commit message is the same as the title of the PR.

@mlibbey don't understand what you mean the commit message is the same as the title of the PR.

What's the motivation for doing this? Probably something like taking your comment to Bryan about YTSATS-2640 and adding it to the description. Without it, if there is a problem around this area later, future developers will have a harder time figuring out what and why things happened.

REVISED:

Adds new TS API function TSHttpTxnEffectiveNormalizedUrlStringGet().
Adds 'normalized' parameter (defaults to false) to HTTPHdr::url_string_get().
Adds 'normalized' parameter (defaults to false) to url_print(), url_string_get(), url_string_get_ref().
Adds 'normalized' parameter (defaults to false) to URL::string_get(), URL::string_get_ref().

[approve ci autest]

To be replaced by a PR implementing<EMAIL_ADDRESS>