How to change state from outside component

now I am using recompose to create HOC for my stateless component, and I use withState to hold the inner state in the HOC, and this state is initial from the pass in props. this is work fine in the mount period, but I don't know how to handle the state change from props at the update period, i just want to use lifecycle componentWillReceiveProps to handle that, but nothing happened. so anyone can help me on this?
the code just like below:
compose(
    withState('counter', 'updateCounter', ({ outerCounter }) =>outerCounter ),
    lifecycle({
       componentWillReceiveProps(nextProps) {
           if(this.props.outerCounter !== nextProps.outerCounter) {
                 this.props.updateCounter(nextProps.outerCounter);
           }
        }
     })
)({ counter, updateCounter } => (

{counter}

    <button onClick={
        () => updateCounter(counter++)
    }>Add counter</button>

));

we can see my purpose is to pass a counter the component, and click the button we can change the counter, but we also can change the counter from outside of component, it can also effect the inner value. I don't know how to implement it by using recompose. I know we can update state at  lifecycle method componentWillReceiveProps, but seems it hard to write it in recompose way

Hi,
At first I want to say that state dependent of props is not a good idea and always can be fixed by moving it upper in a tree. Sometimes can be fixed by using props and state to calculate anything you need on the fly without updating state itself.
Why it's not good idea:

Having such dependent state means that your app state can't be mapped directly to a view, as some of your component state depends not on data but on data change. (If it does not depend on data change you always can calculate it on the fly so you don't need to update it)
Easy to make a mistake as you need to track such state in a few places in a same manner - constructor, receiveProps etc

But, sometimes it's hard to move state upper in a tree, sometimes we need to encapsulate such logic inside component without affecting other components, and sometimes we just have no time, and even I wrote that it's not good idea, I can't say that it's very bad idea.
In recompose the only good way to work with such state is to use mapPropsStream enhancer, as all other ways have drawbacks, so in simplest form it will be something like this
mapPropsStream(props$ => props$.scan( /* here logic to update state */ ))

yes I agree with you, but sometime we need encapsulate the state with component that will make the component expose less api for other users( developers ), so this is why I need put the state into the component scope, right now i have no good idea to handle it.

I want to propose two way for this use case:
1. [Simple] Just pass outerCounter prop into the component
compose(
  withState('counter', 'updateCounter', 0),
)({ outerCounter = 0, counter, updateCounter } => (

{outerCounter + counter}

  <button onClick={
    () => updateCounter(counter++)
  }>Add counter</button>

));

2. [Prefer] The reactive way
It is very similar to counter example from docs, but we need to get latest props value:
const count$ = props$
  .pluck(['counter'])
  .combineLatest(delta$, (counter, delta) => counter + delta)

DEMO

@evenchange4 how should I implement it without Rxjs? do you have some idea

@dingchaoyan1983 Have you tried to use ++counter instead of counter++? It seems like fix your problem.
IMO always writing counter + 1 is a good practice.

I am going to close this issue now. Feel free to reopen it if you have further questions.

Greetings
i have doubts about how to use mapPropsStream or componentFromStream to update my state on props change. For example i have this:
const Item = withState('checked', 'setChecked', false)(
	({ checked, setChecked }) => (
		<Checkbox checked={checked} onChange={({ target }) => setChecked(target.checked)} />
	)
)

const App = withState('checkedAll', 'setCheckedAll', false)(
	({ checkedAll, setCheckedAll }) => (

			<Checkbox checked={checkedAll} onChange={({ target }) => setCheckedAll(target.checked)} />
			<List>
				<Item checked={checkedAll} />
				<Item checked={checkedAll} />
				<Item checked={checkedAll} />
				<Item checked={checkedAll} />
				<Item checked={checkedAll} />
				<Item checked={checkedAll} />
				<Item checked={checkedAll} />
			</List>

	)
)

the problem here is when i try to check all my  items it does not work, i have tried with mapPropsStream and componentFromStream according to comments above but it doesn't work.
Can you give me more explicit example about how to use mapPropsStream or componentFromStream in this case.
Thanks.


CPE Confidence field wrongly populated in CSV for 5.0.0-M3

CPE Confidence field is getting populated with<EMAIL_ADDRESS>in CSV report. Issue is applicable to all the minor version of 5. Tested 5.0.0-M1, 5.0.0-M2, 5.0.0-M3 Maven plugin.
<EMAIL_ADDRESS>reflects "Build Coordinates" CSV field of version 4.x report which is missing in 5.x

Issue is applicable to all the minor version of 5.
Tested 5.0.0-M1, 5.0.0-M2, 5.0.0-M3

@jeremylong any particular reason to remove  "Build Coordinates" CSV field from v5.x
In my opinion that was good way of knowing exactly which JAR is vulnerable as something we have different GAV parameters for same JAR. I understand one can deduce value of GAV from "Identifiers" field but it needs some processing. As an example<EMAIL_ADDRESS>needs some processing whereas previous v4.x value of 'com.google.guava:guava:21.0' was much easy to consume.

In 5.0 we started using Package URL (see purl-spec). Dependency-check scans more than just JAR files and the GAV coordinates do not exist in other package managers.

Thanks, that makes sense.


Add shared linking options

Add cmake options WITH_SHARED_LIBUV and WITH_SHARED_LUAJIT to locate and link against a shared libuv resp. LuaJIT library.
You can use the these options with make:
WITH_SHARED_LIBUV=ON WITH_SHARED_LUAJIT=ON make
Based on the wiki CMake:How To Find Libraries:
http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries

Sorry for the radio silence, I was super busy last week.  This looks good.

+1


Sergey

Added buttons and give them custom shape and colors. to the group view, only invided groups have it

 List of invited groups need to have buttons for join or decline Invitation


Question: Is 'pubsub' command supported?

Looking for the "pubsub" command, http://redis.io/commands/pubsub
PUBSUB  ... args ...
Is it supported in node_redis?

Yes, as the bold part in the second sentence in the Readme states.


Testing robot movements

The code for moving to the left or right and rotating is 90% complete but testing is required for the autonomous phase.

[ ]  Added movement for left and right
[ ] Added rotation

Lateral movement for the robot is completed and fully calibrated. At first the robot only ran forward even though the left_right() function was called. After some inspecting we found out that the distance was always a positive number and setting the power to a negative value did not work as expected. To fix this, we deleted the function run_to_position() since it was redundant to be there  because we would need to set for each motor a positive or negative value and added a new function set_power() to set power to all motors .
After debugging this and made the robot move left and right we discovered that it didnt moved enough . We set the distance for 100 cm and after running the robot moved to the left 88 cm. We took those numbers and calculating what number we should put in the robot's code for it to move 100 cm and the result was 113.63 cm. In the end we divide this number by 100 and made a variable that will store this value and whenever we want to move left or right the distance will be multiplied by 1.1363. In final we have done some final tests and the accuracy for distance was significantly improve to around 99.2% (100% if we ignore that the center of gravity of the robot is not centered due to the battery not being fixed properly)

Added rotations for robot. The function rotate() takes as parameters degrees, power and direction . Since the robot does not understand what an angle is and how much to rotate, we converted degrees into distance. At first we defined a constant that defines how much to move for the robot to rotate 90 angle. The answer was 55 cm and we just divide degrees by 90 and then multiply with that constant. Now the robot, will turn exactly how much we want.


column "likes" does not exist

After I added the configs per the docs, i get this error on GET of my model:
{
  "error": {
    "name": "error",
    "status": 500,
    "message": "column \"likes\" does not exist",
    "length": 98,
    "severity": "ERROR",
    "code": "42703",
    "position": "30",
    "file": "parse_relation.c",
    "line": "2892",
    "routine": "errorMissingColumn",
    "stack": "error: column \"likes\" does not exist\n    at Connection.parseE (/Users/jakeforaker/dev/loopback/supergleu/node_modules/pg/lib/connection.js:539:11)\n    at Connection.parseMessage (/Users/jakeforaker/dev/loopback/supergleu/node_modules/pg/lib/connection.js:366:17)\n    at Socket.<anonymous> (/Users/jakeforaker/dev/loopback/supergleu/node_modules/pg/lib/connection.js:105:22)\n    at emitOne (events.js:77:13)\n    at Socket.emit (events.js:169:7)\n    at readableAddChunk (_stream_readable.js:146:16)\n    at Socket.Readable.push (_stream_readable.js:110:10)\n    at TCP.onread (net.js:523:20)"
  }
}

Hey @jforaker are you using a sql db? this was tested in nonsql db, I will add the property definition that should fix it


AS: fix build with rvps features

Before this commit when we only enable restful-bin,rvps-grpc features, the attestation service cannot be built.
This patch fixes this issue. Also, this commit deletes the rvps-builtin feature as the code of rvps does not bring in any new dependencies.
Related configurations are updated to make it more robust, together with the documents.

Let's mark this as draft because there is some overlap to #514

cc @lmilleri @spotlesstofu this might influence operator side i am not sure

cc @lmilleri @spotlesstofu this might influence operator side i am not sure

@Xynnn007 thank you for the heads-up!


Add Akeyless provider

Add Akeyless provider
support getting your secrets from akeyless

@knelasevero @moolen
can you please take a look at my PR
thanks :)

/ok-to-test

/ok-to-test

/ok-to-test

Can you rebase with main branch please?

/ok-to-test

/ok-to-test

/ok-to-test

/approve

When is this expected to be merged?

I want to manually test the workflow on the docs one time before merging. I did not have the time to do that yet.

@knelasevero I can help you test it (with credentials and secret-name). you can PM me for details

@renanaAkeyless thanks a lot for the contribution, I think we are all good with this working like a charm.
Can you also add the docs in https://github.com/external-secrets/external-secrets/blob/main/hack/api-docs/mkdocs.yml?
you can check docs locally with make docs, and make serve-docs

@knelasevero thanks :) i have updated the documentation.

The CRDs in the helm chart dont appear to be fully updated. The Cluster Secret Store and Secret Store Providers dont look like they have AKeyless listed, however the external secret does

@adyb-fj-cns it hasn't been released yet, CRDs will be up to date with the next release.

Ah ok. Perhaps that should be noted in the live documentation as it gives the impression it was released, particularly as some of the CRDS have already been updated


Printing error when the number of retries is 0

An exception will be thrown when StopStrategies.stopAfterAttempt is set to 0.
Exception in thread "main" java.lang.IllegalArgumentException: maxAttemptNumber must be >= 1 but is %d [0]
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:190)

It should be
Exception in thread "main" java.lang.IllegalArgumentException: maxAttemptNumber must be >= 1 but is 0
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:190)

Since this project has not been maintained for a long time, I fork this project and fix the problem
https://github.com/itning/guava-retrying3


Add ability to color log outputs

Hi @jakeleventhal,
Thanks for reaching out.
Would you mind sharing some more details?
How do you imagine coloring output would work? Would you want to see colorful output in terminal? Or would you like to configure and see different colors in Live tail?
Let me know your thoughts. 🙏
Simon

Hi @jakeleventhal
Better Stack Logs supports some ANSI codes in log message, so you can them to make parts of your log different color, bold etc. Not everything is supported out of the box though (eg. because of different contrasts in light/dark mode):
logger.info("Logs can be \033[1mbold\033[0m, \033[31mred\033[0m, or \033[1;32mbold green,\033[0m.");

Result in Better Stack:

Result in console with { sendLogsToConsoleOutput: true }:

I suppose what I'm not getting is how you are styling the log type automatically

@jakeleventhal level fields (level, severity, message.level, log.level, or outcome) are automatically colored by Better Stack based on their severity. In JS, it really just depends on whether you use for example logger.info or logger.warn

Is there a recommended library for logging colors? I'm using chalk with some hex colors, and they're not rendering in BetterStack i.e.
import { randomBytes } from 'crypto'
import chalk from 'chalk'

const randomHex = randomBytes(20).toString('hex').substring(0,6)

logger.info(`Here is a message with some ${chalk.hex(randomHex)('color')}`)

I got the following to work:
import styles from 'ansi-styles'
import { randomBytes } from 'crypto'

const hex = randomBytes(3).toString('hex')
const ansi = styles.hexToAnsi('#' + hex)
const random = styles.color.ansi(ansi)

const message = `Here is some ${styles.red.open}red${styles.reset.close} and ${random}random hex #${hex}${styles.reset.close}`

logger.info(message)

Also it seems chalk and default styles.color.close in ansi-styles escapes differently than what BetterStack wants. Need to do a full reset after each color.


[752] Fix nationality autocomplete bugs

Context
https://trello.com/c/W6wJfWMc/752-nationality-autocomplete-cleanup
Changes proposed in this pull request
This PR:

Focuses the newly added autocomplete input when you press the 'Add another nationality' button
Focuses the prior autocomplete when you press 'Remove'
Prevents the page from jumping to the top when you press 'Remove'
Makes hidden text on 'Remove' link lowercase

Guidance to review

Head to /trainees/:id/personal-details/edit
Check the above four things!

Looking great!


Making graphview work with existing flutter directed/weighted graph data structures

I have seen the issue of every flutter graphview functionality comes with its own graph data structure and they all lack in crucial functionalities.
GraphView is one of the best I have seen. But rather having a custom graph data structure, if GraphView supports existing directed graph data structures in flutter like https://pub.dev/packages/directed_graph, and add functionalities of weighted edges with arrow thickness, it will be of great help.
I can join the party for this implementation, I know it is a big task. I can put my hand if someone is interested.

I think its quite easy to map from one data structure to another, like how I shown to convert from json to the Graph Nodes. I am more curious if the above packages have implementations for layouting the nodes, which is primarily what this package is focused on.

Got it. I realised it when trying to replace the graph last night. Makes sense. Especially updating the layout needs functionality which cannot be implemented in standard graph data structures.
Is there a way to implement edge thickness and edge weight here? Just curious.


Unable to set roleAssignments scope to subscription

According to the documentation, you can specify either Subscription, Resource group, or Resource when specifying the scope of a roleAssignment.  However, when I try to use the subscription().id, it fails but it works when specifying resourceGroup().id.
example of it working:
{
"apiVersion": "2017-09-01",
"type": "Microsoft.Authorization/roleAssignments",
"name": "[variables('roleAssignmentName')]",
"dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/', 'mdw1')]" ],
"properties": {
"roleDefinitionId": "[variables('contributorRoleDefinitionId')]",
"principalId": "[reference('Microsoft.Compute/virtualMachines/mdw1', '2018-06-01', 'Full').identity.principalId]",
"scope": "[resourceGroup().Id]"
}
}
Change scope to subscription().id and it fails with this:
Deployment failed. Correlation ID: 0e5ba110-680c-4618-b920-90ece00d9c8a. {
"error": {
"code": "InvalidCreateRoleAssignmentRequest",
"message": "The request to create role assignment '3cb08ef2-f61a-5aa7-95b5-4b48efc78ba8' is not valid. Role assignment scope '/subscriptions/c4abbaed-7ec3-43a2-8640-bf46dbbb7659' must match the scope specified on the URI '/subscriptions/c4abbaed-7ec3-43a2-8640-bf46dbbb7659/resourcegroups/tue-02'."
}
}
Is this a documentation problem or is this a problem with the resource?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1e974af9-501a-8eac-b9c1-d3252120abbb
Version Independent ID: 8f659349-3ae6-1c39-faf4-49b70cb0db02
Content: Manage access using RBAC and the REST API - Azure
Content Source: articles/role-based-access-control/role-assignments-rest.md
Service: role-based-access-control
GitHub Login: @rolyon
Microsoft Alias: rolyon

@pivotalguru Hi, can you please tell us which document you are referring to? Thanks a lot!

@YutongTie-MSFT Do you still need more information?

@pivotalguru I apologize for the delay. After getting the document this issue is linked to we accidentally assigned it to the wrong person. I have assigned the issue to the content author to evaluate and update as appropriate.

Hi @pivotalguru
A couple of questions for you. Are you using the subscription resource function in your request?
https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#subscription
If so, have you tried to specify your subscription id in your request instead to see if that succeeds?
Are you able to list role assignments at the subscription scope?
thanks

Hi @pivotalguru
I used the Try It feature on the Role Assignments - Create page and I was able to successfully create a role assignment at the subscription scope:
https://docs.microsoft.com/en-us/rest/api/authorization/roleassignments/create
You might be able to use this feature to help troubleshoot.
thanks

Yes, I've tried using the subscription resource function.  I tried "subscription().id" but that fails.
In my template file, I've gotten this to work:
"scope": "[resourceGroup().Id]"
But using "subscription().id" or "subscription().subscriptionId" fails.
Error message:
The request to create role assignment 'xx' is not valid. Role assignment scope 'xx' must match the scope specified on the URI '/subscriptions/xx/resourcegroups/mon-02'.
Note: I replaced my actual GUID with xx.
I'm using "az group deployment create" to create a deployment and in the template file, I am creating the roleAssignment resource.  This appears to be a requirement in how Azure works.  I need the CLI to be working in the deployed VMs without any user intervention.  I can get this to work but the account has a limited scope to the Resource Group rather than the entire Subscription.

@pivotalguru
az group deployment create is for resource groups. I think you need to use az deployment create instead for a subscription.
https://docs.microsoft.com/en-us/cli/azure/deployment?view=azure-cli-latest#az-deployment-create
https://docs.microsoft.com/en-us/azure/azure-resource-manager/deploy-to-subscription

Hi @pivotalguru
It appears that you want to deploy to a resource group, but set permissions at the subscription scope. I'm not sure how to do that using a template. Unfortunately I dont have a lot of experience creating templates. To get technical assistance, I recommend creating a support request in the portal. They are better equipped to handle technical questions.

Thank you.  This did help me understand what the problem is better.  I really appreciate it.

Sure, hopefully they can help you.
Let us know if you have any suggestions for the docs.

@MicrosoftDocs/azure-cxp-triage
#please-close

For further reference: https://docs.microsoft.com/en-us/azure/templates/microsoft.authorization/2017-09-01/roleassignments which links to https://docs.microsoft.com/en-us/azure/azure-resource-manager/deploy-to-subscription#assign-role-at-scope:

The scope must be at or below the level of deployment.

"at or below" is misleading as it only applies to two levels; subscription and resource group. RBAC assignment by ARM template requires a different syntax:
https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template#assign-role-to-resource


Windows 7 error

Hey sir! I've gotten a windows 7 error and screenshot is below

Also sir I love your project!
Suggestion: can you add PearOs Catlina/Thicc sur??
Iso link:
Catilina: https://cdn.pearos.xyz/iso/catalina/
Thicc sur: https://cdn.pearos.xyz/iso/thiccsur/
Screenshots:
Catlina

Thiccsur:

These are copy of MacOS but it's linux , thanks if you add them! Or guide me how to add them!

I also have the same issue


Force push front end

i am the greatest force push front end dev of all time
add front end ui for force push of global vars / structs / functions

@realdonkey good work so far! There are still a few bugs and bad programming practices that I see in this PR, which I will fix; however, I will still write comments on all the locations so that you know not to do them in the future :).


Cherry pick #9341 to mrtk_dev

Overview
Brings over the contents of #9341 from @polar-kev

/azp run

/azp run

/azp run mrtk_docs

@polar-kev is this still needed and/or good to go?


update just one specific marker

Hello,
Context :
I have a nodejs server to serve tiles with .mbtiles file and I use MarkerClusterGroup on my client to display markers with a .geojson file which represent a state of communication. Markers are .png red or blue according to their state of communication. I try to have an interactive map which display markers and show if the communication is OK (blue.png) or if the communication is down (red.png).
Issue :
I want to be able to get one specific marker by his geographic coordinates or by his name (in .geojson file and on popupText) and change the color of it by changing the .png (red or blue). On cascade, I wish to change the color of cluster parent of this marker in red for example.
Is it possible to do that without removing layer with all markers and add again this layer with function "removeLayer" and "addLayer" ? I just wand to change one specific marker.
Thank you !
Quentin

Hi,
It looks like many people start using MCG for real-time status data! :-) (referring to #561, #555 and #535)
Obviously the marker should reflect the new status, even if the latter changed while the marker was clustered.
Furthermore, in many cases you would like a cluster to reflect somehow the status of its children markers, so you need a way to re-draw its icon (as also referred to in #498).
Definitely +1 for me as well.

All,
Seems to be quite simple to implement.
Please try to add the following method to your Marker Cluster Group:
/**
 * Changes the class of all supplied markers and updates the clusters.
 * @param aMarkers array|L.LayerGroup|L.MarkerClusterGroup of markers to be modified.
 * @param sNewClassOrFn string|function new class to be applied on markers,
 * either as a string or as a function that receives the old class as argument.
 */
updateMarkersClass: function (aMarkers, sNewClassOrFn) {
	if (aMarkers instanceof L.MarkerClusterGroup) {
		aMarkers = aMarkers.getAllChildMarkers();
	} else if (aMarkers instanceof L.LayerGroup) {
		var array = [];
		for (var j in aMarkers._layers) {
			array.push(aMarkers._layers[j]);
		}
		aMarkers = array;
	} else if (!(aMarkers.length)) {
		aMarkers = [aMarkers];
	}
	// Make a function that returns always the same string if needed.
	if (typeof sNewClassOrFn !== "function") {
		sNewClassOrFn = function () {
			return sNewClassOrFn;
		}
	}

	var marker,
		i = 0,
		icon,
		parent;

	for(; i < aMarkers.length; i += 1) {
		marker = aMarkers[i];
		icon = marker.options.icon;

		// Update icon class.
		icon.options.className = sNewClassOrFn(icon.options.className);

		// Force Marker redraw.
		marker.setIcon(icon);

		// Set parent clusters' icon dirty, all the way up.
		parent = marker.__parent;
		while (parent) {
			parent._iconNeedsUpdate = true;
			parent = parent.__parent;
		}
	}

	// Refresh visible markers.
	this._featureGroup.eachLayer(function (c) {
		if (c instanceof L.MarkerCluster && c._iconNeedsUpdate) {
			c._updateIcon();
		}
	});
}

If looks good I will try to make a PR when I have time.

@ghybs Do not copy-paste patches into comments, do pull requests instead. Right now it's nearly impossible to see the diff against the old code.

Thanks for your responses. I don't understand what this method do. I try to add this code to my MarkerClusterGroup but getAllChildMarkers() is unknown.
You will find below my code to display the map and markers :
var map,
    BlueIcon,
    RedIcon,
    markers;

function init() {
  var mapBounds = new L.LatLngBounds(
    new L.LatLng(-85.0511, -180),
    new L.LatLng(85.0511, 180));
  map = L.map('map').setView([30,0], 3);

  L.tileLayer('{z}/{x}/{y}.png', {
    minZoom: mapMinZoom,
    maxZoom: mapMaxZoom,
    bounds: mapBounds,
    opacity: 0.70,
  }).addTo(map);

  BlueIcon = new L.icon({
    iconUrl: '../../images/marker-icon-blue.png',
    ...
  });

  RedIcon = new L.icon({
    iconUrl: '../../images/marker-icon-red.png',
    ...
  });

  function onEachFeature(feature, layer) {
    var popupText = 'Label : ' + feature.properties.name;
    if(feature.geometry.type == "Point"){
      layer.bindPopup(popupText);
      var markerIcon = new L.icon({
        iconUrl: '../../images/marker-icon-' + feature.properties.color + '.png',
        iconAnchor: [12, 42],
        popupAnchor: [0, -41]
      });
      layer.setIcon(markerIcon);
    }
  }

  var geo = L.geoJson(geojson, {
    onEachFeature: onEachFeature
  });

  markers = new L.MarkerClusterGroup();
  markers.addLayer(geo);
  map.addLayer(markers);
}

function clickBtn() {
 //Simulate an event
 //Change .png of one specific marker and color of marker cluster parent
}

This is a part of cluster :

This is 3 markers under a part of cluster :

On my map I have got 22 markers under some clusters.
I try to change just one specific marker under one cluster and change color of this cluster.
Do you think is possible to do that ?
Thank you !

Hi,
@IvanSanchez thanks for your comment, I certainly understand your point.
The fact is this does not change any previous code, it is just an extra method. I should probably add it through L.MarkerClusterGroup.include({updateMarkersClass}) by the way, as it is more like a comfort feature, not a core one…
I will certainly make a PR when I have time.
@Quentin22, your need is certainly doable, you should be able to modify my code to change the iconUrl of your standard L.Icon, instead of my code modifying the class of an L.DivIcon.
Hope this helps.

My bad, line 3 after comments:
aMarkers = aMarkers.getAllChildMarkers();

should have been:
aMarkers = aMarkers._topClusterLevel.getAllChildMarkers();

I tried to tidy up and split the code in PR #564. Hopefully it should be easier to understand and use.
See: https://github.com/Leaflet/Leaflet.markercluster/pull/564/files

Thank you for you code ! But I don't how to use it, sorry...
For now I create a geographic coordinates of one marker present on my map and change his color with an event by removing layer and adding layer again with juste one marker updated :
var lat = 10.574222078332806,
    lng = -68.62060546875;

function clickBtn() {
  console.log(markers._topClusterLevel._childCount();
  map.removeLayer(markers);

  var geo = L.geoJson(geojson, {
    onEachFeature: function (feature, layer) {
      var popupText = 'Label : ' + feature.properties.name;
      layer.bindPopup(popupText);
      if(feature.geometry.type == "Point"){
        if(feature.geometry.coordinates[0] == lng && feature.geometry.coordinates[1] == lat) {
          layer.setIcon(RedIcon);
        }
        else {
          layer.setIcon(BlueIcon);
        }
      }
    }
  markers = new L.MarkerClusterGroup();
  markers.addLayer(geo);
  map.addLayer(markers);
}

But I still don't know how to change color of cluster which contains this updated marker.

Hi,
All right, in fact you seem to need first basic instructions on how to update a marker in a layerGroup, independently from MarkerClusterGroup, or even from L.GeoJSON.

Use the following method to loop through the "layers" (in fact, your markers) in your layerGroup (in your case: MCG markers):
http://leafletjs.com/reference.html#layergroup-eachlayer
…instead of re-creating your entire MCG.

Next, what you actually want is to customize the style of clusters.
See the option iconCreateFunction on how to do that:
https://github.com/Leaflet/Leaflet.markercluster/tree/master#customising-the-clustered-markers
Within your function, use cluster.getAllChildMarkers() to get the array of contained markers, loop through them to look for possibly updated markers and style accordingly.

Only once you have done the 2 above steps, you will be interested in the above code. Copy the code from this file into your script:
https://github.com/Leaflet/Leaflet.markercluster/pull/564/files
Then use the method markers.refreshClustersOf(layers) with layers being the array of updated markers, or your entire MCG itself to keep it simple: markers.refreshClustersOf(markers).

If you need further help, I recommend you using Stack Overflow. You would probably get help quicker for what you need.

Thank you so much for your response. I'm going to focus on that and I will let you know if I can do something, or not =).

It's ok for the first step, I can get all markers and test it to change or not the marker with setIcon function in red or blue depending of their state.
But for the second step I try to change only one cluster (only change the color) If one or more childMarker is in red. However if I use iconCreateFunction I will customize all cluster because I create only one MarkerClusterGroup.
I don't understand why you have to refresh markers when you use setIcon, I used it and I didn't have to refresh anything.
For now, I just only have to customize the color of clusters which have some child markers in red. And change again in green if all child markers are in correct state.
Like this example, one cluster with 2 markers in correct state and another cluster with some markers with an incorrect state :

Zoom in :

Zoom in :

Zoom in :

This is exactly what I try to do.

Hi @Quentin22, please can you kindly close this issue, now that you seem to have succeeded in making it work?
https://groups.google.com/d/msg/leaflet-js/Vropa26ykPA/7hDXcqfIEgAJ
Thanks!


Logo proposal

Hi, i like this adblock idea for clickbait. I am a graphic designer and i would like to contribute a logo for this project. I think your projects readme could look more nice with a logo for the project. What do you think? job is free.

Hi @dee-y! A project logo would be cool! What did you have in mind? Something abstract or more literal?
Since Outbrain/Taboola ads are often laid out in a 4x1 or 4x2 grid at the bottom of a page (like on cnn.com or msn.com), maybe the logo could use a grid with squares that appear to be blocked (such as being red, having X's, or empty outlines)?


Control the naming of metaflow output

It didn't look to me like there already was an issue related to this question so hopefully I'm not duplicating anything. Currently we're using metaflow to help train hundreds of thousands of different time series models concurrently, and the results are written to S3.
My question has to do with whether or not its possible to tell metaflow how you want it to name the files as they are written out to S3. One challenge I'm seeing is that the results appear to be written out such that the files are named according to the corresponding run_id / step_id / task_id. This makes it challenging to figure out, once all the models have been fit, which results correspond to which files.
For example: If I identify 100,000 models by the business segment it focuses on, each business segment has a segment_id (1, 2, .... n). When I use metaflow to fit models across all of these segments, the results are written out such that they files aren't named results_1, results2, .... results_n. Instead they're written out such that the files have somewhat mysterious names.
Has anyone worked on a way to either:
a) obtain a mapping from the segment_id that the results correspond to and the name metaflow assigns to the results?
or b) overwrite the default name metaflow assigns to the results with something based on the segment id, so when a user manually logs into S3 they can easily find and download the result for a segment of interest?
Hopefully this question makes sense. Happy to clarify further if not.

Hi @Veganveins,
There are a few different ways to achieve your objective -

You can write your data to S3 explicitly by using the metaflow.s3 client
You can also use the metaflow client to identify the s3 location of a data artifact -

Run('MyFlow/42')['start'].task.artifacts.name._object['s3_location']

@Veganveins Please re-open the issue in case you need more clarification :)


Zones do not adapt to taskbar state anymore and extend placed application windows behind the taskbar

Microsoft PowerToys version
0.79.0
Installation method
WinGet
Running as admin
Yes
Area(s) with issue?
FancyZones
Steps to reproduce
For some reason I got the bug (again?) that Fancy Zone layouts ignore that the taskbar is not in autohide mode and therefore the space covered by the taskbar is not accessible. Still the layout / zones resize the windows behind the taskbar as can be seen in the screenshot.
PowerToysReport_2024-03-17-18-49-05.zip

✔ Expected Behavior
Zones adapt their size at the bottom depending on the taskbar state (always visible vs autohide)
❌ Actual Behavior
Zones do not adapt their size and windows placed in zones stretch behind the taskbar.
Other Software
No response

Can confirm issue persists in 0.80.1 using the same steps.
In addition:

Disabling/enabling (toggle) fancyzones did not help
Creating new templates or switching did not help
Removed NVIDIA Desktop Manager (which is always been disabled and caused no issues before) which did not help

/dup https://github.com/microsoft/PowerToys/issues/17697


Use DataDreamer for text-only dataset?

Hi Datadreamer's team,
I've been looking into datadreamer for augmenting one of my datasets, and it seems that this project focuses mostly on images. I'm mostly work with text extraction (NER, RE) and I'm wondering whether it's possible to apply datadreamer to a purely text-based dataset with text and annotations.
Thank you in advance

Hi @lfoppiano,
It's certainly an interesting idea, and we might implement it in the future; however, as it would require a lot of time and our focus is on images, such an extension is not planned for the moment.
Kind regards,
Jan

I understand. Thanks for the clarification 👍


Nonprofit List Page - Display & View Detail [Due 2/29]

Web Path
Home Page -> Nonprofits

Requirement

1.Organization Count
"xxx organizations found" : make it left aligned. See sample below.

Organization Logo
Organization Logo is retrieved from: \C4SGWeb\app\images\project. Choose any dummy images from there.
Refer to how it is implemented in: Home Page -> Projects

Organization Name
Make it a hyper link. See wireframe.
When the link is clicked, redirect to Organization Detail page.
Refer to how it is implemented in:  Home Page -> Volunteers
Note: your task is to redirect to Organization Detail page, don't worry about what is display in that page. That will be another task.

Timeline
We implement weekly sprint. This task is given a default of one week. You don't have to finish all requirements in this task, but please submit a Pull Request with whatever code change you have by 2/29. This helps us get the latest development status and plan the next sprint efficiently.

Source Code
\C4SGWeb\app\organization\list\

Reference
Please refer to the implementation of: Home Page -> Volunteers

Wireframe

Current Look of the Page

Close the PR. We will create tasks for individual web components instead of for the whole page.


typo in line 13 of medium/6. Pyest with Background Threads/source_code/test_example.py

typo in line 13 of medium/6. Pyest with Background Threads/source_code/test_example.py
with example_server as tcp_server:
# should be:
with tcp_server as example_server:

Thanks for catching that :+1: :)


Added Limitations of SPN

Updated the limitations with Gateway and data source for SPN

@jayendranarumugam : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Hi @jayendranarumugam, I'm checking your request with the development team and will respond shortly.

Hi @jayendranarumugam,
According to the development team you can add a service principal as a user to gateway datasources.
However, the service principal can’t be a gateway admin.
Perhaps you thought that you couldn’t do that, because it's not supported in the UI (it's only possible via the API).
Thanks,

Hi @KesemSharabi , Thanks for getting back to me. I think spn now can be a gateway admin also, see this official announcement and I tried to add the spn for the data source but couldn't able to get any link/API which you are referring here that is possible. could you please share the link here? that would be much helpful!
All I can see that this spn is possible only for Analysis Service and not the other datasoruces like sql , excel etc., which is on-prem
Thanks !
Jay

@jayendranarumugam : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Hi @jayendranarumugam,
I'm checking whether service principal can be a gateway admin or not, and will get back to you soon.
Thanks,
Kesem

@jayendranarumugam : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@jayendranarumugam : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@davidiseminger : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Fulltext search 404 page not found

Describe the bug
I guess the new update caused the paths in the documentation to change yet the fulltext search is still indexing the old paths therefore 404 page not found...
To Reproduce

Go to https://vue3datepicker.com/
Click on CTRL+K
Search "input" (for example) & click on a result
See error 404

Yeah, let's give it a few days to update the indexes. Tnx for the notice.

The search is working again now.


Carry on, Dynamic Lights, Shulker Boxes

Removed carryon due to a major exploit, potential source for corrupted block entities in the future and issues moving trains
Removed lambdynamiclights and create dynamic lights due to significant lag caused near spawn
Re-worked the Shulker Box and Toolbox recipes to be cheaper

Ok so I might be able to just blacklist the accumulator block instead


[docs] Revise Joy UI "Input" page

Hi @samuelsycamore,
I did a few edits on this one to make it (what I assume) is similar to what you had mentioned previously in the Typography doc. It looks like this one was already pretty much good to go - whoever originally wrote it did a great job at following your template!
I added a few things that I think may help with clarity for people reading the document. I did have one question, however. When looking at the component, I'm not sure if there is a way to determine what type of input is being used. For example, if you wanted to use this component in a form and the user was to input a password, would the developer have to pass a prop into the inner HTML element to specify the type? I was thinking about adding something to clarify this point, just because it was a question I had myself.
Let me know if there's any changes / edits I need to make!

[x] I have followed (at least) the PR section of the contributing guide.

Thanks for taking on another one @LadyBluenotes ! It looks like many tests are failing. Whenever you submit a new PR, make sure that it runs and builds locally first. This will help prevent failing tests and broken deploy previews.
In this case, it looks like we have a few issues:

the <p class="description"> has a missing bracket, causing the page to break
the standard "cleanup" checks are failing. Based on the tests above, you need to run:

yarn prettier
yarn markdownlint
yarn docs:typescript:formatted

I make it habit to run all three pretty much every time I commit changes

Once you get this bad boy building and passing tests, then I'll circle back with a line-by-line review. 👍

🤦 I was wondering why the checks were failing. Thank you for pointing them out!

It worked! When in doubt, run the command twice I guess. 🤷♂

Woohoo! I'll make sure to run it at the end before pushing next time. Hopefully it was just this once it decided to be fussy :')

Is there anything I need to update/edit for this page?

Thanks @LadyBluenotes ! I made some copy edits throughout, mostly all stuff that's easier for me to just do myself than to try to explain and then make you do it. You can click on my copyediting commit up above to see what I changed. Mostly tweaking words to conform to standard copy we've established on other pages. In a few instances I reworded some kinda awkward passive sentences to make them active.
Let's wait for a final review from @danilo-leal or @siriwatknp but I'd say this is probably good to go.


make check hangs after all tests are complete

make check hangs and it seems the cause is lost processess:
vt_b1     380755  0.0  0.0   3332  1248 ?        SN   14:08   0:00 /bin/sh -c VAR='Hello, world!'; sleep 600; true
vt_b1     380756  0.0  0.0   2652   956 ?        SN   14:08   0:00  \_ sleep 600

We run make check w/o /proc mounted. (There is different test-rules error if /proc is mounted.) This is v4.2.0 on ALT Linux.

Ah, after some investigation, it seems that RPM spec %check section hangs because of that lost processes, while make check itself does not hang,

Well, second comment was too much guess and incorrect.
make check sometimes hangs, sometimes it isn't, perhaps it's race condition, and yes there are several lost sleep 600 processes (which affect our rpmbuild system too).
It seems we are forced to not run make check when building yara package for ALT Linux.

It seems we are forced to not run make check when building yara package for ALT Linux.

Yet, there is still a way:
make -j32 check — hangs
make check — does not hang.
So make check became not usable with parallel build (using -j) (in contrast to v4.1.3).

Please re-test now that #1683 is merged.

#1683 doesn't seem to fix the issue with make -j32 check hanging, quite the contrary, it introduced the followed warning:
tests/test-rules.c:3304:44: warning: unknown escape sequence '\$' [-Wunknown-escape-sequence]
      "VAR='Hello, world!'; sleep 600& PID=\$!; trap \"kill \$PID\" EXIT; "


Added known dynamic privileges

Getting a general STRING rule to work without running into shift/reduce errors proved too time consuming, so I just added all known dynamic privileges according to MySQL's documentation.

Supersedes https://github.com/dolthub/vitess/pull/221


Code Release

Dear Authors,
The work is amazing. When do you intend to make the code available?
Cheers.

When will u guys release the code?  Beautiful work!

The code is now available.
#2 #3 #4 #5 #6 #7 #8

The code is now available.


Javascript Formatter mistakes < in Flow's Generics for a Binary Operator

ESLint Version: 1.4.7
VSCode Version: 1.20.1
OS Version: 10.11.6

Steps to Reproduce:

Enable the following setting: javascript.format.insertSpaceBeforeAndAfterBinaryOperators
Write the following code:

// @flow

const middle: number = 5;

export function range(beggining: number): number => Array<number> {
  return function _range(end: number): Array<number> {
    return [beggining, end];
  };
}

Format document.

Expected
The code in the page to stay the same.
Actual
// @flow

const middle: number = 5;

export function range(beggining: number): number => Array < number > {
  return function _range(end: number): Array<number> {
    return [beggining, end];
  };
}

Notice how the formatter changed the Generic in line 5. Eventhough the type is identical to the one in line 6, the formatter treats it differently.
By flipping the setting, that problem is solved, but another one emerges:
// @flow

const middle: number=5;

export function range(beggining: number): number => Array<number> {
  return function _range(end: number): Array<number> {
    return [beggining, end];
  };
}

The equal sign in line 3 has the surrounding spaces removed, so flipping the setting is not a desired solution.

Putting parentheses around the type ((Array<number>)) solves the issue, but I still find it odd that the formatter treats the same type differently.

@cjduncana this repository is about the VS Code ESLint extension. The JavaScript formatter is provided by VS Code itself. Please file the issue here: https://github.com/Microsoft/vscode

The reason why I posted the bug here is because the formatting only occurs when this plug in is enabled. Should I still report the bug in the other repo?

Hmm, that is strange. When you disable the VS Code formatter what happens then? Have you enabled any ESLint auto fixing?

If I set "javascript.format.enable": false, then no formatting happens. It technically fixes the problem, but then you lose the benefit of VSCode's auto-formatter.

I can't share the repo. It is private, but the code snippet above reliably demonstrate the issue.


Make git ignore .* files

The reason is that vim (my text editor) uses files starting with '.' for autosave and recovery, these files are hidden by default by 'ls' and most other Linux applications.

If you're using vim, you probably want this to ignore *.swp and *.swo files. Using .* is too broad. You can also set this up globally:
Add this to your ~/.gitconfig:
[core]
    excludesfile = ~/.gitignore

And then this to ~/.gitignore
*.swp
*.swo

Good point, thanks!


fix(indent): handle mixed spaces and tabs

Description

As far as I know, no-mixed-spaces-and-tabs does not provide auto-fix, I don't know when they would conflict. At the same time, this prevents the indent rule from fixing errors when tabs and spaces are mixed.
I tested it in my ESLint config, it works fine.
https://github.com/hyoban/eslint-config-hyoban/blob/5b6a5301b9c1db0f2daa8605e4c30f92b20f4abb/patches/%40stylistic__eslint-plugin-js%402.6.0-beta.0.patch
Linked Issues
Additional context

Sounds good. But we might need to wait until the next minor to have this


"inuse count was 0 but inuse bytes was X" when opening with pprof a HEAP_PROFILE_MMAP profile

I was trying to use the heap profiler to collect some data on mmap usage in Node.js. I used this tiny program as the node input (save it to a test.js file):
var l = [];
while (true) {
  l.push("x");
}

Then I ran command
LD_PRELOAD=/usr/local/lib/libtcmalloc.so HEAPPROFILE=/tmp/mybin.hprof HEAP_PROFILE_MMAP=true HEAP_PROFILE_TIME_INTERVAL=1 node test.js

I used Node.js version 8.9.4 in this run:
$ nvm version
v8.9.4

After some profiles were generated, I killed the program and tried to open the resulting profile using github.com/google/pprof, but got an error:
$ pprof -top /tmp/mybin.hprof.0004.heap
/tmp/mybin.hprof.0004.heap: parsing profile: inuse count was 0 but inuse bytes was 536870912
pprof: failed to fetch any source profiles

Searching for 536870912 in the profile output, I can see the line that pprof considers problematic:
     0: 536870912 [     1: 536875008] @ 0x014763c2 0x00eee369 0x00ea95d8 0x00f4dfcb 0x0110e93d 0x00b0eba8 0x0122b5ed 0x01224d03 0x7f4ccd82d2b1 0x008aee41

Is this expected here that the inuse count is zero while the inuse size is not? This seems unexpected on the surface.
There are other lines, with -1 in the count field, that appears strange as well:
    -1:   524288 [     1:  1048576] @ 0x014763c2 0x00eeed66 0x00ef03d6 0x00ef810e 0x00ef85ce 0x00ef8848 0x00ef8978 0x00ef8aaf 0x00e4aa6a 0x00e89ee9 0x00e91d84 0x00e9238e 0x00e4b4ba 0x00f8c82f 0x00fca4ac 0x00fcadf3 0x00f0c0df 0x00f0ceb9 0xc9e3c78463d 0xc9e3c86cce4 0xc9e3c83f9ce 0xc9e3c875022 0xc9e3c83f9ce 0xc9e3c785d1b 0xc9e3c874c04 0xc9e3c83f9ce 0xc9e3c8744e9 0xc9e3c83f9ce 0xc9e3c874ef2 0xc9e3c83f9ce 0xc9e3c785d1b 0xc9e3c874c04

or with -2:
    -2:  1048576 [     2:  2097152] @ 0x014763c2 0x00eeed66 0x00ef03d6 0x00ef810e 0x00ef8c04 0x00efa72d 0x00efa7ef 0x00e8c6de 0x00e8c7ba 0x00ea7755 0x00e4b192 0x010c8810 0xc9e3c78463d 0xc9e3c7d5ea2 0xc9e3c87461c 0xc9e3c83f9ce 0xc9e3c874068 0xc9e3c83f9ce 0xc9e3c87476a 0xc9e3c83f9ce 0xc9e3c87476a 0xc9e3c83f9ce 0xc9e3c87461c 0xc9e3c83f9ce 0xc9e3c875022 0xc9e3c83f9ce 0xc9e3c874068 0xc9e3c83f9ce 0xc9e3c892229 0xc9e3c83f9ce 0xc9e3c874dc1 0xc9e3c83f9ce

The full profile is attached as mybin.hprof.0004.heap.gz

Thanks for report. Frankly, it is unlikely that I can find time to have serious look at this any time soon. And I am not super-familiar with this aspect. Does perl pprof work? Diving into possible difference between golang pprof and perl pprof could be helpful maybe. Or maybe it is just some bug in heap profiler.

I didn't try the perf pprof. It could be some difference between the two pprofs, though the -1 and -2 values looked suspicious.


[9.x] Manually populate POST request body with JSON data only when required

This fixes a 6 year old bug introduced in #7052 where GET requests would have GET data populated in the POST body property leading to issues around Request::post() and $request->getParsedBody() returning GET values when called on GET requests.
This is a resubmit of #17087 & #36708, and fixes #22805. Credit to @dan-har for the initial solution and @mixlion for updating it for >=6.x.
The original PR was meant to support POST requests where their content-type was set to application/json (instead of the typical application/x-www-form-urlencoded), but it introduced a subtle and dangerous bug because while $request->getInputSource() does return the JSON data for JSON requests, it also returns the GET data for GET requests. This commit solves the underlying issue without breaking compatibility with the original functionality.
This PR is submitted as a direct result from a security issue reported to me by users of @wintercms & @octobercms and was submitted after a discussion with @taylorotwell via email.
I request that this fix also be backported to 6.x @driesvints

Okay, I just went through the code and this indeed seems okay to me. There's one small concern though:
Both json and getInputSource are returning an instance of Symfony\Component\HttpFoundation\ParameterBag while $newRequest->request requires an Symfony\Component\HttpFoundation\InputBag instead. This is already happening at the moment so it might not be too big of a problem. But still wondering if we should assign the proper type here.
@LukeTowers I'm afraid we cannot make this change on 6.x as I can definitely see apps break over this while expecting the current behavior. But it seems reasonable to do this on the next major release.
Would be cool if you could add a test as well.

@driesvints InputBag was only added 15 months ago in 5.1 (https://github.com/symfony/http-foundation/commit/5fa0a07a06fa3841bc11320c3342d8a4dc16de5c) and extends ParameterBag. If there's a need for $request->json() to be an InputBag instead then I would say that's a recent change and one that should happen regardless.
I'm not sure I can see how existing apps could break over this change in a negative way, could you provide me an example of what came to your mind? The whole reason I want this backported is because it "breaks" apps in that it fixes potential security issues (I don't think a single developer out there expects Request::post() to return GET values during a GET request).

@LukeTowers okay, I guess that the type thing is fine then.
So, the reason I think this is a breaking change is because before this PR you could do the following for a GET request:
$request->request->all();

And that would give back the params from the query string. I definitely agree with you that this needs fixing but there might be people relying on the current behavior.

While a bit less obvious that it's a bad idea to use $request->request->all() for GET parameters than Request::post() I'm not seeing anyone that does use it in that way from a quick code search over GitHub.
I am however seeing lots of usage of how it's intended to be used, for POST parameters; along with a few that could be impacted by not realizing that its including GET params.

@LukeTowers let's see what Taylor says.

Why not just change the post method to always return null if the HTTP method isn't POST?

I still am not sure this fixes your "vulnerability" - can a malicious user not simply send a Content-Type header of application/json to trick the framework into populating request?

@taylorotwell

Why not just change the post method to always return null if the HTTP method isn't POST?

Already doing that in our projects as a stop gap.

I still am not sure this fixes your "vulnerability" - can a malicious user not simply send a Content-Type header of application/json to trick the framework into populating request?

The main concern is CSRF attacks triggered unintentionally. AFAIK you can't make a users browser send a different content type header for GET requests for things like regular links and img sources.

Can we make the change to have post always return null if the HTTP method isn't POST instead of the change currently in this PR?

@taylorotwell while it could possibly solve my specific problem, I'm not sure that's all that helpful overall given the amount of people out there using $request->request->all() to access POST values instead of $request->post() (see https://github.com/search?q="request->request->all()"+language%3APHP+language%3APHP&type=Code) since it would still leave those users at risk and fundamentally would still be an incorrect implementation at a deep level of the framework.

@driesvints will we be able to get this backported to 6.x as well?

Hey @LukeTowers. No we won't be backporting this one. We're not super confident that it won't break anything so this one will only target the next version.


Unable to delete topic when both consumer (subscription) and reader has been connected

Describe the bug
After connecting and closing one subscription and one reader it's not possible to delete a topic through the java admin client. The bug will not manifest if either only subscriptions or only readers are connected, only if a combination of them are.
To Reproduce
Steps to reproduce the behavior:

Start a local standalone pulsar and make sure the admin and broker ports in the test code below match
Run the following java code to reproduce the error:

package sample;

import org.apache.pulsar.client.admin.PulsarAdmin;
import org.apache.pulsar.client.admin.PulsarAdminException;
import org.apache.pulsar.client.api.Consumer;
import org.apache.pulsar.client.api.MessageId;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.Reader;
import org.apache.pulsar.client.api.SubscriptionInitialPosition;
import org.apache.pulsar.client.api.SubscriptionType;
import org.apache.pulsar.client.impl.auth.AuthenticationDisabled;
import org.apache.pulsar.common.policies.data.TenantInfo;
import org.testng.annotations.Test;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;

public class ConsumerAndReaderCombinationTest {

    void deleteTenantIfPresent(PulsarAdmin admin, String tenant) throws PulsarAdminException {
        if (admin.tenants().getTenants().contains(tenant)) {
            for (String namespace : admin.namespaces().getNamespaces(tenant)) {
                List<String> existingTopics = admin.namespaces().getTopics(namespace);
                for (String topic : existingTopics) {
                    admin.topics().delete(topic);
                }
                admin.namespaces().deleteNamespace(namespace);
            }
            admin.tenants().deleteTenant(tenant);
        }
    }

    @Test
    public void provokeBug() throws Exception {
        final String adminUrl = "http://localhost:8080";
        final String brokerUrl = "pulsar://localhost:6650";

        final String tenant = "delete-topic-test-magic48295";
        final String namespace = "ns";
        final String topic = "the-topic";
        final String qualifiedTopic = "persistent://" + tenant + "/" + namespace + "/" + topic;

        /*
         * Ensure a clean tenant
         */
        try (PulsarAdmin admin = PulsarAdmin.builder().serviceHttpUrl(adminUrl).authentication(new AuthenticationDisabled()).build()) {
            deleteTenantIfPresent(admin, tenant);
            Set<String> allowedClusters = new LinkedHashSet<>();
            allowedClusters.add("standalone");
            admin.tenants().createTenant(tenant, new TenantInfo(Collections.emptySet(), allowedClusters));
            admin.namespaces().createNamespace(tenant + "/" + namespace);
        }

        /*
         * Open and close both a consumer on a subscription and a reader on the same topic
         */
        try (PulsarClient client = PulsarClient.builder().serviceUrl(brokerUrl).build()) {
            try (Consumer<byte[]> consumer = client.newConsumer()
                    .topic(qualifiedTopic)
                    .subscriptionType(SubscriptionType.Exclusive)
                    .consumerName("testng")
                    .subscriptionName("s1")
                    .subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
                    .subscribe()) {
                // no need to do anything with the consumer, just close it again
            }
            try (Reader<byte[]> reader = client.newReader().topic(qualifiedTopic).startMessageId(MessageId.earliest).create()) {
                // no need to do anything with the reader, just close it again
            }
        }

        try (PulsarAdmin admin = PulsarAdmin.builder()
                .serviceHttpUrl(adminUrl)
                .readTimeout(3, TimeUnit.SECONDS)
                .authentication(new AuthenticationDisabled())
                .build()) {

            /*
             * When bug is present, this call will throw a TimeoutException (read-timeout) after 3 seconds
             */
            admin.topics().delete(qualifiedTopic);
        }
    }
}

Observe lines similiar to the following in the broker log.

16:48:45.579 [pulsar-web-57-3] INFO  org.apache.pulsar.broker.service.persistent.PersistentSubscription - [persistent://delete-topic-test-magic48295/ns/the-topic][s1] Unsubscribing
16:48:45.579 [pulsar-web-57-3] INFO  org.apache.pulsar.broker.service.persistent.PersistentSubscription - [persistent://delete-topic-test-magic48295/ns/the-topic][s1] Successfully closed subscription [ManagedCursorImpl{ledger=delete-topic-test-magic48295/ns/persistent/the-topic, name=s1, ackPos=10:-1, readPos=10:0}]
16:48:45.583 [pulsar-web-57-3] INFO  org.apache.bookkeeper.mledger.impl.MetaStoreImplZookeeper - [delete-topic-test-magic48295/ns/persistent/the-topic] Remove consumer=s1
16:48:45.592 [ProcessThread(sid:0 cport:2181):] INFO  org.apache.zookeeper.server.PrepRequestProcessor - Got user-level KeeperException when processing sessionid:0x10000f989b00009 type:delete cxid:0xe3 zxid:0xba txntype:-1 reqpath:n/a Error Path:/ledgers/00/0000 Error:KeeperErrorCode = Directory not empty for /ledgers/00/0000
16:48:45.591 [bookkeeper-ml-workers-OrderedExecutor-2-0] ERROR org.apache.bookkeeper.common.util.SafeRunnable - Unexpected throwable caught
java.lang.IllegalArgumentException: inconsistent range
	at java.util.concurrent.ConcurrentSkipListMap$SubMap.<init>(ConcurrentSkipListMap.java:2620) ~[?:1.8.0_212]
	at java.util.concurrent.ConcurrentSkipListMap.subMap(ConcurrentSkipListMap.java:2078) ~[?:1.8.0_212]
	at org.apache.bookkeeper.mledger.util.RangeCache.removeRange(RangeCache.java:132) ~[org.apache.pulsar-managed-ledger-original-2.4.0.jar:2.4.0]
	at org.apache.bookkeeper.mledger.impl.EntryCacheImpl.invalidateEntries(EntryCacheImpl.java:151) ~[org.apache.pulsar-managed-ledger-original-2.4.0.jar:2.4.0]
	at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$7.operationComplete(ManagedLedgerImpl.java:776) ~[org.apache.pulsar-managed-ledger-original-2.4.0.jar:2.4.0]
	at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$7.operationComplete(ManagedLedgerImpl.java:764) ~[org.apache.pulsar-managed-ledger-original-2.4.0.jar:2.4.0]
	at org.apache.bookkeeper.mledger.impl.MetaStoreImplZookeeper.lambda$null$13(MetaStoreImplZookeeper.java:308) ~[org.apache.pulsar-managed-ledger-original-2.4.0.jar:2.4.0]
	at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) ~[org.apache.pulsar-managed-ledger-original-2.4.0.jar:2.4.0]
	at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.9.2.jar:4.9.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-all-4.1.32.Final.jar:4.1.32.Final]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
16:48:45.610 [BookKeeperClientWorker-OrderedExecutor-5-0] INFO  org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [delete-topic-test-magic48295/ns/persistent/the-topic][s1] Deleted cursor ledger 11
16:48:47.557 [pulsar-web-57-11] INFO  org.eclipse.jetty.server.RequestLog - <IP_ADDRESS> - - [12/Aug/2019:16:48:47 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 813 "-" "Pulsar-Java-v2.4.0" 5

Expected behavior
it's always expected to be possible to delete a topic that has no connected clients.
Desktop (please complete the following information):

OS: macOS

may be related - cannot unsubscribe (delete a subscription) via the admin tool:

I can confirm this is an issue:  once a Reader as been seen on a topic, it is not possible to delete any Consumer subscription.
This is a massive issue because it means that we basically cannot use Readers and Consumers combined on a topic, because we will never be able to clean that topic and it will be amassing data forever (until quotas are hit).
Here's minimal replication case:

subscribe with a Consumer, then stop the Consumer
delete the subscription with admin tool -- this will work
bin/pulsar-admin topics unsubscribe public/test-seqid/topic-3 -s failover-subscription
subscribe with a Reader, then stop the Reader
subscribe with a Consumer, then stop the Consumer
delete the subscription with admin tool -- this will NOT work (timeout)
bin/pulsar-admin topics unsubscribe public/test-seqid/topic-3 -s failover-subscription

Client code:
    pulsar =
        PulsarClient.builder()
            .serviceUrl(pulsarUrl)
            .connectionsPerBroker(1) // default: 1
            .connectionTimeout(10, TimeUnit.SECONDS)
            .enableTcpNoDelay(true)
            .keepAliveInterval(999, TimeUnit.DAYS)
            .maxBackoffInterval(5, TimeUnit.SECONDS)
            .startingBackoffInterval(1, TimeUnit.SECONDS)
            .statsInterval(60, TimeUnit.SECONDS)
            .ioThreads(1) // default: 1
            .listenerThreads(1) // default: 1
            .maxConcurrentLookupRequests(5000) // default: 5000
            .maxLookupRequests(50000) // default: 50000
            .maxNumberOfRejectedRequestPerConnection(50) // default: 50
            .operationTimeout(30, TimeUnit.SECONDS) // default: 30 sec
            .build();

Consumer code:
        Consumer<Test> consumer = pulsar
            .newConsumer(Schema.PROTOBUF(Test.class))
            .consumerName("consumer1")
            .subscriptionInitialPosition(SubscriptionInitialPosition.Latest)
            .subscriptionType(SubscriptionType.Failover)
            .subscriptionName("failover-subscription")
            .topic("persistent://public/test-seqid/topic-3")
            .subscribe();

    while (true) {
      Message<Test> message = consumer.receive();
      ...

Reader code:
        Reader<Test> reader = pulsar
            .newReader(Schema.PROTOBUF(Test.class))
            .readerName("reader1")
            .topic("persistent://public/test-seqid/topic-3")
            .startMessageId(MessageId.earliest)
            .create();

    while (true) {
      Message<Test> message = reader.readNext();
      ...

(Another separate(?) issue is why the Reader is seeing any previously published data, when retentions on the namespace are zero (both time and size), and all messages were acknowledged. This is confusing.)

@sijie - I think this is not a component/client issue (since the subscription cannot be deleted through the admin cli either)

The problem (inconsistent range) has been fixed as part of fixing #5621.

why the Reader is seeing any previously published data, when retentions on the namespace are zero (both time and size), and all messages were acknowledged. This is confusing.

@youurayy the data is deleted segment by segment. unless the whole segment is deleted, the reader will see the messages of the segment that is not deleted.

@sijie - please is it known when should 2.4.2 proper be out (image pushed)?  There's no new commits on the milestone for last 7 days.

@youurayy the 2.4.2 is under voting. once it passes voting, it will be released. I would expect it is going out around Friday. You can follow the process by subscribing to<EMAIL_ADDRESS>mailing list, or you can read community weekly updates (https://streamnative.io/weekly/2019/2019-11/2019-11-22-pulsar-weekly/) as well.


Add reply_broadcast argument to files_upload

The chat.postMessage method has both thread_ts and reply_broadcast arguments, but the files.upload method has only reply_broadcast argument. Could you add reply_broadcast to files.upload?
Category (place an x in each of the [ ])

[x] slack_sdk.web.WebClient (sync/async) (Web API client)
[ ] slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
[ ] slack_sdk.models (UI component builders)
[ ] slack_sdk.oauth (OAuth Flow Utilities)
[ ] slack_sdk.socket_mode (Socket Mode client)
[ ] slack_sdk.audit_logs (Audit Logs API client)
[ ] slack_sdk.scim (SCIM API client)
[ ] slack_sdk.rtm (RTM client)
[ ] slack_sdk.signature (Request Signature Verifier)

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Hi @henry0312! Thanks for raising this request. 🙂
This is actually a change that would need to be introduced on the platform/product side of things -- not within the SDK. Though we'd love to be able to resolve this ourselves, as we can't, I'm going to close this issue but I'll be sure to pass on the request to the responsible team!


HTMLHint doesn't seem to work in Atom

Nothing shows up. Maybe related to this?

I'm using VS Code instead of Atom nowadays.


Requirements

Hello,
Can you please add in documentation the information regards license requirements.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0d40ac52-6f02-b0f3-0c45-9f359473703b
Version Independent ID: 108355a9-05a3-4d17-c417-c4d5664a4506
Content: Use sensitivity labels with Microsoft Teams, Office 365 groups, and SharePoint sites (public preview)
Content Source: microsoft-365/compliance/sensitivity-labels-teams-groups-sites.md
Service: o365-seccomp
GitHub Login: @KCCross
Microsoft Alias: krowley

This might help you: https://docs.microsoft.com/en-us/microsoft-365/compliance/sensitivity-labels-office-apps#subscription-and-licensing-requirements-for-sensitivity-labels

Thanks!


feat: summarise 'charmcraft analyse' results

New summary script that:

Packs the charm
Runs charmcraft analyse on the resulting charm files
Summarises the output

Oh also I know namespaces are a honking great idea, but it might be nice to import Path, defaultdict and Counter directly. Just a personal taste thing though

Oh also I know namespaces are a honking great idea, but it might be nice to import Path, defaultdict and Counter directly. Just a personal taste thing though

I think we discussed this elsewhere but my personal taste is very much the opposite :)


[BUG] Rewarded Ads do not work on Android but Interstitial Ads do

Describe the bug
Running from Godot 3.3
Calling show_rewarded() does not display an ad
when I call load_rewarded() the rewarded_loaded variable never changes to true.
I connected the rewarded_ad_failed_to_load signal and have a print() command in the function and that signal never fires.
Interstitial ads load just fine.
I am using the android-standard-template-v3.3.zip for my project.
To Reproduce
Steps to reproduce the behavior:

Unzip android-standard-template-v3.3.zip and put files into res:// of my project
Install plugin to res://android/plugins
Add Project ID to AndroidManifest.xml
Add MobileAds as a singleton
Call MobileAds.load_rewarded() when player character dies
Call MobileAds.show_rewarded() when player pushes the rewarded ad button

Expected behavior
I expect a rewarded ad to work, like it works on iOS when I press the button.
Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Device: Google Pixel 3
OS: Android 11
Version

Additional context
I have disabled all other plugins while I try to debug this issue.

@Tekuzo , you van change inside MobileAds.tscn or MobileAds.gd

Thank you very much. I got it working.


runtime: mTreap corruption in go1.13.10

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

$ go version
go version go1.13.10 darwin/amd64

Does this issue reproduce with the latest release?
It's very hard to reproduce. We have not yet reproduced it with the latest release.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPRIVATE="*.qima-inc.com"
GOPROXY="https://goproxy.cn,direct"
<EMAIL_ADDRESS>GOSUMDB="sum.golang.org"
GOTMPDIR=""
<EMAIL_ADDRESS>GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3h/68msm91n7z9dvjhlxz5ms_z00000gn/T/go-build802857650=/tmp/go-build -gno-record-gcc-switches -fno-common"

The go info above is the development and compile environment. We build the binary for linux amd64 platform by cross compiling. And below is the runtime environment.

$ go uname -a
Linux hostname 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

What did you do?
We deployed Istio Pilot on our product environment (Virtual Machine). It ran for about a month or two after we used go1.13.10 util we met this problem. There is no special operation, no large load. And only one instance had this problem.

What did you expect to see?
The process responded normally.
What did you see instead?
The process was unresponsive.
The initial phenomenon was that all client requests timed out. We got high CPU usage alert after a few minute, and we found one CPU core utilization rate was close to 100 on the abnormal node.
We used dlv to find there was one goroutine that was looping in a for loop.
Below is the stack.
0  0x000000000041d97a in runtime.(*mTreap).insert
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/mgclarge.go:449
1  0x000000000045d6b0 in runtime.systemstack_switch
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/asm_amd64.s:330
2  0x00000000004267ca in runtime.(*mheap).freeSpan
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/mheap.go:1328
3  0x0000000000417d38 in runtime.(*mcentral).freeSpan
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/mcentral.go:246
4  0x00000000004234b6 in runtime.(*mspan).sweep
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/mgcsweep.go:366
5  0x0000000000422c85 in runtime.sweepone
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/mgcsweep.go:136
6  0x000000000042294a in runtime.bgsweep
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/mgcsweep.go:73
7  0x000000000045f601 in runtime.goexit
   at /usr/local/Cellar/go@1.13/1.13.10_1/libexec/src/runtime/asm_amd64.s:1357

Below is the corresponding code(the first for loop).
// insert adds span to the large span treap.
func (root *mTreap) insert(span *mspan) {
	if !span.scavenged {
		root.unscavHugePages += span.hugePages()
	}
	base := span.base()
	var last *treapNode
	pt := &root.treap
	for t := *pt; t != nil; t = *pt {
		last = t
		if t.key < base {
			pt = &t.right
		} else if t.key > base {
			pt = &t.left
		} else {
			throw("inserting span already in treap")
		}
	}

	// Add t as new leaf in tree of span size and unique addrs.
	// The balanced tree is a treap using priority as the random heap priority.
	// That is, it is a binary tree ordered according to the key,
	// but then among the space of possible binary trees respecting those
	// keys, it is kept balanced on average by maintaining a heap ordering
	// on the priority: s.priority <= both s.right.priority and s.right.priority.
	// https://en.wikipedia.org/wiki/Treap
	// https://faculty.washington.edu/aragon/pubs/rst89.pdf

	t := (*treapNode)(mheap_.treapalloc.alloc())
	t.key = span.base()
	t.priority = fastrand()
	t.span = span
	t.maxPages = span.npages
	t.types = span.treapFilter()
	t.parent = last
	*pt = t // t now at a leaf.

	// Update the tree to maintain the various invariants.
	i := t
	for i.parent != nil && i.parent.updateInvariants() {
		i = i.parent
	}

	// Rotate up into tree according to priority.
	for t.parent != nil && t.parent.priority > t.priority {
		if t != nil && t.span.base() != t.key {
			println("runtime: insert t=", t, "t.key=", t.key)
			println("runtime:      t.span=", t.span, "t.span.base()=", t.span.base())
			throw("span and treap node base addresses do not match")
		}
		if t.parent.left == t {
			root.rotateRight(t.parent)
		} else {
			if t.parent.right != t {
				throw("treap insert finds a broken treap")
			}
			root.rotateLeft(t.parent)
		}
	}
}

This stack trace is from an OS X machine, to the best of my knowledge istio is only deployed on linux. Are you sure this stack trace is from the affected machine.

This stack trace is from an OS X machine, to the best of my knowledge istio is only deployed on linux. Are you sure this stack trace is from the affected machine.

Sorry, I didn't describe it clearly. We used cross compiling. The runtime environment is Linux x86_64. Description already updated, and please take a look again.

Thank you. Have you raised this issue with the istio developers?

Thank you. Have you raised this issue with the istio developers?

Not yet. I’ll do later.

It seems that the treap structure of mheap.free was corrupted.

In cases like this the most appropriate line of investigation is to ensure the program is completely free of data races. As the OP is running software written by a third party, I think it is appropriate that they seek assertions from the istio developers that there are confident that no data races exist in the version in question.

It may be worth mentioning that in Go 1.14 and later mheap.free no longer exists and has been replaced with an entirely different mechanism. That would explain why you cannot reproduce it.
It's not totally clear to me how a data race at the application level could lead to corruption of mheap.free which is pretty far removed from user code and protected by a runtime lock. I don't want to write off the possibility that it's a data race in Istio Pilot, but it wouldn't be my first guess (memory corruption caused by garbage data (perhaps created due to a data race) in C is always a possibility, but I don't know if Istio uses any C).
It's also possible (but I don't know how) that mheap.free is corrupting itself due to a bug. We don't have any stress tests for it, only basic functional tests. Maybe a smaller-scale stress test in the runtime would reveal the problem? It's kind of a moot point now that it isn't even in the runtime at tip anymore, but Go 1.13 will continue to be supported, so this should probably be fixed nonetheless.

@tokers can you provide more detail? Were you able to look at a core dump?
And thanks @luckyxiaoqiang for the report.

It may be worth mentioning that in Go 1.14 and later mheap.free no longer exists and has been replaced with an entirely different mechanism. That would explain why you cannot reproduce it.
It's not totally clear to me how a data race at the application level could lead to corruption of mheap.free which is pretty far removed from user code and protected by a runtime lock. I don't want to write off the possibility that it's a data race in Istio Pilot, but it wouldn't be my first guess (memory corruption caused by garbage data (perhaps created due to a data race) in C is always a possibility, but I don't know if Istio uses any C).
It's also possible (but I don't know how) that mheap.free is corrupting itself due to a bug. We don't have any stress tests for it, only basic functional tests. Maybe a smaller-scale stress test in the runtime would reveal the problem? It's kind of a moot point now that it isn't even in the runtime at tip anymore, but Go 1.13 will continue to be supported, so this should probably be fixed nonetheless.

Thanks for your reply @mknyszek .
In my opinion, if a data race happens at application level that results to corruption of runtime data, the most possible result may be a panic instead of an infinite loop. And it's very hard to analyze from application level, because Istio uses lots of 3rd party packages. What's more, we do lots of internal development based on the official Istio with an old version.
We are trying to analyze the core dump, and trying to find some useful info to report here.

Yet another weird thing is that this scenario happened for several times but all in one machine (Linux VM). I don't know whether there are some environment-dependent factors that will influence the runtime memory allocator.

In cases like this the most appropriate line of investigation is to ensure the program is completely free of data races. As the OP is running software written by a third party, I think it is appropriate that they seek assertions from the istio developers that they are confident that no data races exist in the version in question.

Thanks @davecheney . We do lots of internal development based on the official Istio with an old version which no longer maintained by community, so maybe it's hard to get help from Istio developers. We'll try to find data races at application level by ourselves.
Thanks for your advice again.

 Closing this issue as essentially complete.


Project Overview doesn't get active when I click on my service

Description:
See below

Fixed with https://github.com/ballerina-platform/ballerina-lang/commit/2618f80a909f2abeb185eb519f1395d644ba8cb9


contract test does not work since James have not updated the solidity code yet to work with the BN256 and Pedersen commitments

This line in TestPoK.java
  assertTrue(sc.testEncoding(pok));

I have not had this issue so far, but the code running this test is written by @JamesSmartCell as it is the code that integrated with the blockchain. Maybe you can have a look at this @JamesSmartCell ?

Closed by #111


Vulnerable cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA (SWEET32) still exist

Vulnerable cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA (SWEET32) still exist - could the VPN developers share any information how to fix the issue
Prerequisites

[yes] Can you reproduce?
[yes] Are you running the latest version of SoftEtherVPN?

SoftEther version: 4.43
Component: Server
Operating system: Linux
Architecture: 64 bit
Description
Vulnerable cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA (SWEET32)
Expected behavior: not using of that cipher
Actual behavior: using of that cipher
Steps to reproduce

checking the listen 443 port with network vulnerability scanner

Wait till you find out the user can simply elect not to encrypt at all


Gradle task is skipped when added as a dependency

I have these two gradle tasks in my build.gradle file  one to archive a folder and another to push it to a remote server.
task tarTask(type: Exec) {
    commandLine 'tar', '-czf', 'javadocs.tgz', 'javadocs/'
}

If I execute tarTask alone with gradle tarTask and with the publish task commented out,  the build succeeds.
I am using this task as a dependency in the publish task.
task publish(dependsOn: tarTask) {
    ssh.run {
        settings {
            knownHosts = allowAnyHosts
            fileTransfer = 'scp'
        }

        session(remotes.webServer) {
            from: 'javadocs.tgz', into: 'publishingHouse/'
        }
    }
}

But when i execute gradle publish it fails saying that it is not able to find the tgz file which should have been created if the previous task is executed.

java.io.FileNotFoundException: javadocs.tgz

Being new to gradle i am not really sure what I am missing here. Any ideas on what I can do?
I am on a Windows environment  and I am running the commands on Babun (cygwin) Terminal.

Very likely your path is incorrect. You are just referring to the file name without a path. I'd recommend using tarTask.archivePath instead.

What path are you referring to? And where should add the tarTask.archivePath, In the task definition?

What path are you referring to?

The path to javadocs.tgz in your from statement.

And where should add the tarTask.archivePath, In the task definition?

Instead of the String javadocs.tgz.

I don't think path is the issue because if the tar file exists the build succeeds. But when the tar file doesn't exist, which should have been come from the tarTask, then the publish task fails.

Please provide a reproducible example project on GitHub so I can have a look.

I don't have anything else in my project or in my build.gradle file that can interfere with  these two tasks. So, as far as I can check it should be reproducible with this.

You will need to provide us with the full build script. Otherwise, I do not know what actually creates the directory javadocs. Also I am sure you are applying various plugins.

javadocs is  just a directory that is already present on the file system. But I'll try to create a sample project.

Okay, I found out the cause for the problem. As Stanislav has expalained here, publish task was looking for the file at configuration phase while that file will not be available until the execution phase of the tarTask.
So, If I add doLast like this, It works.
task publish(dependsOn: tarTask) {
    doLast {
        ssh.run {
            settings {
                knownHosts = allowAnyHosts
                fileTransfer = 'scp'
            }
            String destinationDirectory = "publishingHouse/"

            session(remotes.webServer) {
                put from: 'javadocs.tgz', into: destinationDirectory
                put from: 'swagger.json', into: destinationDirectory
                put from: 'swagger-spec.html', into: destinationDirectory
            }
        }
    }
}

You are right @durgaswaroop. Without the doLast the code will be executed at configuration time. This means the ssh.run will be executed all the time even if the publish task isn't executed. The doLast add an action to execute only when the task will execute. I will close this issue as not actionable.


CSS updated

changed the css of the header ,  the buttons, the event window and the back to the top button.Changed HTML code a little.
Please consider this PR.

Conflicting files
assets/css/style.css
index.html
Please see the conflicts highlighted in the image above. Resolve the conflicts in the mentioned files. Ensure you pull all the latest changes before pushing your feature/bug fixes to the main branch. After resolving the conflicts, please open a new PR for review.
Thank you!


Document namespaceConfig flags for gs template app command

This PR adds documentation to upcoming changes to gs template app flags.
We want to allow users to specify an App CRs namespaceConfig through flags. The kubectl-gs code changes will be merged before merging this PR.

Are we going to add info somewhere regarding when/why it would make sense to apply these flags and add labels/annotations to a namespace? Will that be part of the other app platform docs?

Are we going to add info somewhere regarding when/why it would make sense to apply these flags and add labels/annotations to a namespace? Will that be part of the other app platform docs?

Seems https://docs.giantswarm.io/app-platform/namespace-configuration/ documents the namespaceConfig field in App CRs

That's nice! Maybe you can work in a link to that article in the flag descriptions? Or add a "Read more" section in the end with that link.


Improvement of lateral support

#983 was closed without any comment mistakenly.
Thank you again for the amazing query builder! It would be nice if the following query were supported:
-- mysql
select *
from customer c,
lateral (select 6371 * distance_formula) as distance
where longitude is not null;

This means:

Supporting fromLateral.
Supporting selectNoFrom in laterals.

Currently, I am using the following workaround. Please also pay attention to sql`dual` as any to overcome typings.
.innerJoinLateral(({ selectFrom, val, ref }) =>
	selectFrom(sql`dual` as any)
		.select(sql`(6371 * distance_formula)`.as('distance'))
		.as('distance'),
	join => join.onTrue()
)

Hey @koskimas , any comment?


Error color makes text unreadable

Describe the bug
I cant read errors using the default console colors for windows 10.

I expect to be able to read the error messages when displayed using the defaults for windows 10 console without having to resort to using screenshots and MS Paint's paintbucket to read them (like this)

Environment summary
Windows 10, usual updates.
Additional context
Its also caused everything else typed into this prompt to now be unreadable, but I see that is a different bug reported here already.

On the Windows console, you can reset the color if it doesn't revert by typing color 7.

@tjprescott  - is the DarkRed color that is being displayed (that is not in my console's settings for errors) coming from this utility or from Python?

Well, the colors are set from within the Knack library's logging methods. The implementation there uses the colorama library. There may be some platform differences there in how each color is interpreted (for example, the color for errors is designated as RED, not dark red). However, raw errors might be set by Python itself or otherwise be a property of the shell.
We could explore making the colors customizable in the config file. In the meantime, my suggestion would be to tweak your shell's background color to something that shows better contrast.

@tjprescott - found the Knack lib and piggybacked the issue.

Yes, we also maintain knack, so thank you for opening the issue there. I'm not certain that that fix alone will address everything, but it should be a step in the right direction.

Conceptually, maybe we can add an option to az configure to update logging error / warning colors.

Duplicate of #6080

Duplicate of #6080

This issue has been fixed. Please see https://github.com/Azure/azure-cli/issues/6080#issuecomment-763294594 for the solution.

This issue has been fixed. Please see https://github.com/Azure/azure-cli/issues/6080#issuecomment-763294594 for the solution.


Ignore fields missing in schema when normalizing containers

Fixes #177.

a test would be great.
you could also use a generator comprehension:
for field in (x for x in mapping if x in schema):

Oh boy, this is quite weird, I get the TestValidation.test_unknown_keys_list_of_dicts test failing on master, but no longer failing in my branch (test_unknown_keys_list_of_dicts is pretty similar to the test I was about to write). Can you reproduce this? This is weird, this test wasn't failing before.

i'm not sure what you mean exactly, but both the master branch and your's do pass tests.

Oh, sorry, was my mistake, I had an issue with my local environment.

Amended.

Thanks!


Problem about "perf-factor" hyper-parameter for 2080ti

Following the  instructions in this guide, i obtain this baseline on a 2080ti GPU, for Mask RCNN FPN R50 with input scale 1.0, using given configs and pretrained weigth, start_toolkit.sh is ran with default settings followed by start_det_baseline.sh and results are as follows:
Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.130
Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.272
Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.112
Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.045
Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.094
Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.193
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.098
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.225
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.233
Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.100
Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.220
Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.329

To provide a runtime scaling factor to compensate for difference in hardware,i set perf-factor as 0.8324324 which is suggested in this guide. However, the worse result is got:
Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.042
Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.077
Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.041
Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.012
Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.021
Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.061
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.031
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.096
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.099
Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.036
Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.079
Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.137

There are my specific settings in start_toolkit.sh
dataDir="/home/server/GYX/sap/data"
methodName=mrcnn50_nm
scale=1.0
factor=0.8324324
# "nm" is short for "no mask"

python -m sap_toolkit.server \
        --data-root "$dataDir/Argoverse-1.1/tracking" \
        --annot-path "$dataDir/Argoverse-HD/annotations/val.json" \
        --overwrite \
        --out-dir "$dataDir/Exp/Argoverse-HD/output/${methodName}_s${scale}/val" \
        --eval-config "./config.json" \
        --perf-factor $factor

Hi, thanks for reaching out with your issue. We are looking into it and will get back to you as soon as possible.

This issue has now been resolved. Please update your sap_toolkit version to 1.0.0 by using the command pip install sap_toolkit --upgrade. The scripts start_det_baseline.sh and start_fs_baseline.sh have also been update and now require the --perf-factor argument.


image-smoother.py Space Complexity should be O(m*n)

The space compexity annotated here usually refers to the extra space used to solve the problem.
Otherwise, it will be always equal to or larger than the result space, and hard to check whether this solution is good or not.


Rename Microsoft.Proxy.Test -> Microsoft.Proxy.Tests

According to the guidelines https://github.com/aspnet/Home/wiki/Engineering-guidelines#solution-and-project-folder-structure-and-naming, we should rename the test project to Microsoft.Proxy.Tests instead of Microsoft.Proxy.Test

Hi @hishamco, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

See https://github.com/aspnet/EventNotification/pull/12#issuecomment-128427434.


SEO: Set canonical URLs

Describe the bug
All pages should specify a valid canonical URL to get more control over how duplicate URLs are treated by search engines. When a set of URLs on our site return duplicate or near duplicate content, search engines will select a single definitive URL for that content called the canonical URL*. This URL will be crawled more often, will take priority in search results over URLs with duplicate content and search rank boosting backlinks to the URLs with duplicate content will be viewed as linking to the canonical URL.
To Reproduce
(English)

Visit Canada: Optimization - Canada.ca
blog.canada.ca/2018/03/29/visit-canada-optimization/
(301 ) Visit Canada: Optimization - Canada.ca
blog.canada.ca/2018/03/29/Visit-Canada-Optimization/
Canonical URL redirects

Canada.ca is a trusted source - Canada.ca
blog.canada.ca/2020/08/10/canadadotca-trusted-source/
(301 ) Canada.ca is a trusted source - Canada.ca
blog.canada.ca/2020/08/10/CanadaDotCa-trusted-source/
Canonical URL redirects

Improving Canada.ca by focusing on COVID-19 top tasks - Canada.ca
blog.canada.ca/2020/09/24/covid-top-tasks/
(301 ) Improving Canada.ca by focusing on COVID-19 top tasks - Canada.ca
blog.canada.ca/2020/09/24/COVID-top-tasks/
Canonical URL redirects

(French)

Visiter le Canada : optimisation - Canada.ca
blogue.canada.ca/2018/03/29/visiter-le-canada-optimisation/
(301 ) Visiter le Canada : optimisation - Canada.ca
blogue.canada.ca/2018/03/29/Visiter-le-Canada-Optimisation/
Canonical URL redirects

Canada.ca est une source fiable - Canada.ca
blogue.canada.ca/2020/08/10/canadapointca-source-fiable/
(301 ) Canada.ca est une source fiable - Canada.ca
blogue.canada.ca/2020/08/10/CanadaPointCa-source-fiable/
Canonical URL redirects

Améliorer le site Canada.ca en se concentrant sur les principales tâches liées à la COVID-19 - Canada.ca
blogue.canada.ca/2020/09/24/taches-principales-a-la-covid-19/
(301 ) Améliorer le site Canada.ca en se concentrant sur les principales tâches liées à la COVID-19 - Canada.ca
blogue.canada.ca/2020/09/24/taches-principales-a-la-COVID-19/
Canonical URL redirects

Expected behavior
Note that *"self-canonicalizing" a page by setting its canonical URL to itself is both valid and useful as it can help eliminate potential duplicates such as when pages may be linked to with tracking URL parameters. To suggest the canonical URL for a page we can:

add a <link rel="canonical" href="..."> tag inside the page's <head> tag (most common) or
add a Link: <...>;rel="canonical" header to the page's response headers.

Google suggest giving absolute canonical URLs over relative ones. Search engines are likely to ignore our canonical URL suggestion if we:

include multiple canonical URL suggestions per page or
suggest a URL that is broken, redirects, isn't indexable or isn't itself canonical.

Keep in mind that for exact duplicates we should consider if it is more appropriate to use 301 redirects over canonical URLs to consolidate duplicates instead.

Fixed with 06c12b0d0df8f804486ee82faec010358a8341a9


Eventhough username started with not a letter, it returned true.

So fixed that issue, now it returns false when first letter of the username
is not a letter.
Closes: #1
Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!


Fix wrong generated code comment in spark Encoders

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)

Lang
SDK
Apex
Dataflow
Flink
Gearpump
Samza
Spark

Go

---
---

---
---

Java

Python

---

---
---

XLang
---
---
---

---
---

Pre-Commit Tests Status (on master branch)

---
Java
Python
Go
Website

Non-portable

Portable
---

---
---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@aromanenko-dev unrelated failure on kinesisIO: I opened a ticket https://jira.apache.org/jira/browse/BEAM-9470

Run Java PreCommit

@aromanenko-dev another flakiness in mongodbio: https://scans.gradle.com/s/564hipkl7uhju/console-log?task=:sdks:java:io:mongodb:test

Run Java PreCommit

Run Java PreCommit

@aromanenko-dev I also opened a ticket for flaky test in mongodb-io
https://jira.apache.org/jira/browse/BEAM-9480. Relaunching the build

Run Java PreCommit

@echauchot Thanks! The issue with KinesisIO test will be fixed soon (see #11090), it was introduced recently .
Regarding the issues with MongoDbIO - I don't know this IO well. Maybe @jbonofre, as initial author of this IO, could take a look on this?

thanks @aromanenko-dev !


Make PQ_SYSTEM_TYPES a NamedTuple

I am mostly curious if this will break anything.
NamedTuple look ups often compile away.
OTOH this is a very large namedtuple.
Creating it might be expensive.

I feel like the tuple size threshold heuristics probably prevent any of those namedtuple optimizations?

yeah propbably.
I am no longer interested in the result of this experiment