Improving API responses

As I am working on the client-side UI, I think there are few improvements can be done on API for developer use.

/api/pools

Instead of providing "coin": { "type": 5 },, give the coin symbol instead. In this case, it is XMR. It is not friendly for integrations.
"payoutScheme": 1,, which is better to give PPLNS. same problem as above
networkHashRate, poolHashRate unit? H/s? kH/s? MH/s?
It is weird to put poolFeePercent, donationsPercent inside poolStats. I think they belongs to paymentProcessing or a brand new item.
lifetime pool shares received/ blocks founds?

The API should avoid hardcoding definitions into the UI, especially UI shouldn't need to update their coding once MiningCore added new coinType/ changed coinType numerical value.

/api/pool/{poolid}/stats/hourly

is it possible to provide the networkHashRate, connectedMiners as well?
same as 3.

/api/pool/{poolid}/blocks

what is status here? same problem as above

/api/pool/{poolid}/payments

same as 1.

Other issue:

there isn't an endpoint for miner list.
miner minute stats

I will continue update this issue while I am implementing the UI.

I believe the following stats is very useful for making UI.

the estimated shares of each round.
the progress of each round
the confirmations of each block.
the 1H,24H,7D,all time progress/luck

This is draft code on my github.
@shtse8 1,2,3,4 requires the API changes for providing such info.

Good Job! Changes are coming tommorow.

@calvintam236
Most of the requested changes have been implemented by a3a71c09f9d2406a3b9f1e7fa50835cc524bdc7c
/api/pools remarks:

networkHashRate, poolHashRate: is always the raw hashrate value in H/s. It's up to the front-end to transform this into something better suited for human consumption.
poolFeePercent, donationsPercent: have been moved up one level

Thank you, @oliverw, for the API changes.
Just a summary of requests that are not yet implemented.
By Me:

lifetime pool shares received/ blocks founds?

networkHashRate

miner minute stats

user would want to see a chart of previous hashrate of your miners and the network, right?
By @shtse8

the estimated shares of each round.
the progress of each round
the confirmations of each block.
the 1H,24H,7D,all time progress/luck

What is the miner list supposed to return. Top Miners?

list of all miners. something like here

Note to self: List of miners including share counts will require a materialized view
SELECT MINER, COUNT(miner) AS count FROM shares WHERE poolid = 'xmr1' GROUP BY poolid, miner ORDER BY count DESC;

@oliverw I made some changes on the UI. Welcome to check it out.
Just a few notes.

I think it should be blockHeight, not blockheight. I notice you use both notations in the coding.
Be consistent to use either object or array in JSON. In stats and miner, it is an object. In payments and blocks, it is an array. Personally, I prefer to have a named object - less complicated for certain language.

@calvintam236

Fixed

Just let me know when you feel the front-end is approaching readiness for public consumption. If you wish we could add it as a new repo "miningcore-portal" or "miningcore-web".

@oliverw I think it is not ready yet.

the hourly networkHashRate is not available yet from the API (for the chart)
no luck, share progress data (maybe here can help how they are calculated and implement into MiningCore)
no miner list in API
total and per worker stats per minute (for chart) is necessary to have - API cannot provide anything about current hashrate, shares submitted
and more... few pages are not even implemented

Understood, I will turn my full focus on the API once I'm done with the Ethereum work which shouldn't take long anymore.

@oliverw Any updates?

@calvintam236 Now that work on the blockchains is feature complete (ZCash postponed), focus will be on the API.

@oliverw great to hear that.
let me add one more request on API while I was working on the UI.

per account payment history
webhooks for notification
is miningcore stored price of the coin while running? if so, providing it helps to make a profitability calculator

@calvintam236 Its not yet fetching coin scores but I was planning to do that anyway.

@oliverw is the donationsPercent same as devDonation? Maybe it is better to use the same config name in the config.json and API.

What also can be a nice thing is info about the coin in the API like difficulty, net hash-rate.

@mario1987 Both values you've mentioned are already returned by /api/pools

just an idea. I think miningcore has the wallet address validation included. any chance to include a regex in the API so the UI can use it directly?

Here is the summary for the API changes.

per account payment history
stored price of the coin while running? if so, providing it helps to make a profitability calculator
the hourly networkHashRate is not available yet from the API (for the chart)
list of miners
auth for certain API methods
total and per worker stats per minute (for chart) is necessary to have - API cannot provide anything about current hashrate, shares submitted
average efforts of blocks mined within last hour in hourly stats (for the efforts chart)
the progress of each round

I also notice you renamed infoLink in the API. However, there is still one infoLink left in the wiki page. Did you miss it or it is supposed to stay that, @oliverw ?

I'm not sure if by "list of miners" you meant this. But what I have been hoping for is on the "/api/pools/POOL/miner/WALLET/stats" response to return a list and count of the miners connected to that specific wallet/user.

@seansch A list of all miners (wallet addresses) on the particular pool.

Would a list, or at least a count of the miners attached to specific wallet be out of the question? Being able to quickly see how many miners are running would be very helpful to the end user.

@seansch I think you are referring to list of workers. Worker is the name you named your miner program and report to the pool. It is different than miner.

Just two more improvements:

fix the inconsistency on hashRate in API?
/api/pools/<poolid>/miners/<miner-wallet-address>: some use hashRate and some use hashrate?
possibility to add an API revision identifier in the JSON? (it is easier to keep trace revisions, and easier to restrict which API revision UI can support)

The "hashRate" inconsistency was fixed a couple releases ago.

Several requests have not implemented, such as:

average efforts of blocks mined within last hour in hourly stats (for the efforts chart)
possibility to add an API revision identifier in the JSON? (it is easier to keep trace revisions, and easier to restrict which API revision UI can support)
the hourly networkHashRate is not available yet from the API (for the chart)
average efforts of blocks mined within last hour in hourly stats (for the efforts chart)

@calvintam236 @oliverw
Hi, Is it possible to be working with Miningcore via Geth? We are facing with some troublies working via Parity.
@oliverw Please check your email box

how about this:

miningcore-ui : Error: No response from API.
(loadDashboardWorkerList),Error: No response from API.
(loadDashboardChart)
miningcore screen:
[2018-10-24 09:54:02.9543] [E] [ApiServer] Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'task' with type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[Miningcore.Api.Responses.WorkerPerformanceStatsContainer[],Miningcore.Api.ApiServer+d__21]'. Path 'stateMachine.<>t__builder'.
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Miningcore.Api.ApiServer.SendJsonAsync(HttpContext context, Object response) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 169
at Miningcore.Api.ApiServer.GetMinerPerformanceAsync(HttpContext context, Match m) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 608
at Miningcore.Api.ApiServer.HandleRequest(HttpContext context) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 196 Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'task' with type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[Miningcore.Api.Responses.WorkerPerformanceStatsContainer[],Miningcore.Api.ApiServer+d__21]'. Path 'stateMachine.<>t__builder'.
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Miningcore.Api.ApiServer.SendJsonAsync(HttpContext context, Object response) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 169
at Miningcore.Api.ApiServer.GetMinerPerformanceAsync(HttpContext context, Match m) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 608
at Miningcore.Api.ApiServer.HandleRequest(HttpContext context) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 196    at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Miningcore.Api.ApiServer.SendJsonAsync(HttpContext context, Object response) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 169
at Miningcore.Api.ApiServer.GetMinerPerformanceAsync(HttpContext context, Match m) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 608
at Miningcore.Api.ApiServer.HandleRequest(HttpContext context) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 196
[2018-10-24 09:54:02.9543] [E] [ApiServer] Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'task' with type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[Miningcore.Api.Responses.WorkerPerformanceStatsContainer[],Miningcore.Api.ApiServer+d__21]'. Path 'stateMachine.<>t__builder'.
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Miningcore.Api.ApiServer.SendJsonAsync(HttpContext context, Object response) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 169
at Miningcore.Api.ApiServer.GetMinerPerformanceAsync(HttpContext context, Match m) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 608
at Miningcore.Api.ApiServer.HandleRequest(HttpContext context) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 196 Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'task' with type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[Miningcore.Api.Responses.WorkerPerformanceStatsContainer[],Miningcore.Api.ApiServer+d__21]'. Path 'stateMachine.<>t__builder'.
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Miningcore.Api.ApiServer.SendJsonAsync(HttpContext context, Object response) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 169
at Miningcore.Api.ApiServer.GetMinerPerformanceAsync(HttpContext context, Match m) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 608
at Miningcore.Api.ApiServer.HandleRequest(HttpContext context) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 196    at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Miningcore.Api.ApiServer.SendJsonAsync(HttpContext context, Object response) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 169
at Miningcore.Api.ApiServer.GetMinerPerformanceAsync(HttpContext context, Match m) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 608
at Miningcore.Api.ApiServer.HandleRequest(HttpContext context) in F:\win_stratum\miningcore-40\src\Miningcore\Api\ApiServer.cs:line 196


Publishing to user from server creates empty notification

Issue
Chrome and Firefox are showing undefined as title, no body, and no icon in the notification.

even though I made sure that I did pass those values correctly to the backend API:

Replication
/api/push/send API
// Packages
import PushNotifications from '@pusher/push-notifications-server'

const PagesApiPushSend = async (req, res) => {

  const { title, message, userId } = req.body

  const beamsClient = new PushNotifications({
    instanceId: process.env.NEXT_PUBLIC_PUSHER,
    secretKey: process.env.PUSHER
  })

  const response = await beamsClient.publishToUsers([userId], {
    web: { notification: { title, body: message } }
  })

  return res.json({ data: response })
}

export default PagesApiPushSend

Hi @heymartinadams
You will need to add the title to the payload correctly:
const response = await beamsClient.publishToUsers([userId], {
    web: { notification: { title: title, body: message } }
  })

This should show the notification title correctly. If you continue to see 'undefined' could you share any custom notification handling set on the client?
Here is the notification as displayed on my machine.

Hi @benw-pusher thank you for your response. I believe I added the payload correctly using ES6’ property value shorthand:
this...
const response = await beamsClient.publishToUsers([userId], {
  web: { notification: { title, body: message } }
})

...is the same as...
const response = await beamsClient.publishToUsers([userId], {
  web: { notification: { title: title, body: message } }
})

Just to be safe, I tried it without the shorthand, to the same effect. Also, I made sure that title and message contained the correct values (they did). So pretty sure that the issue isn’t on client-side, although let me include client code below to be sure.

Here’s how I’m handling push registration on the client:
// Packages
import { useState, useEffect } from 'react'
import * as PusherPushNotifications from '@pusher/push-notifications-web'

// `token`, `user` provided by app
const HooksPushInit = ({ token, user }) => {

  const [pushEnabled, setPushEnabled] = useState(null)

  useEffect(() => {
    if (user) {
      ;(async () => {
        const beamsClient = new PusherPushNotifications.Client({
          instanceId: process.env.NEXT_PUBLIC_PUSHER
        })

        const beamsTokenProvider = new PusherPushNotifications.TokenProvider({
          url: `/api/push/register`,
          queryParams: {
            userId: user?.userId
          },
          headers: {
            Accept: 'application/json',
            'Content-Type': 'application/json',
            ...(token ? { Authorization: `Bearer ${token}` } : {})
          }
        })

        beamsClient
          .start()
          .then(() => beamsClient.setUserId(user?.userId, beamsTokenProvider))
          .then(res => {
            console.log(res)

            setPushEnabled(true)
          })
      })()
    }
  }, [user])

  return { data: pushEnabled }
}

export default HooksPushInit

And push sending:
// Packages
import { useEffect } from 'react'
// Functions
import fetchApi from '#/fetch'

const HooksPushSendWelcomePushMsg = ({ pushEnabled, user }) => {
  useEffect(() => {
    if (pushEnabled) {
      ;(async () => await fetchApi({
        path: `/api/push/send`,
        data: {
          title: `Congratulations 🎉`,
          message: `${
            user?.nameFirst ? `Hi ${user?.nameFirst}` : `Hey`
          }! You’ve successfully enabled reminders. This is how reminders appear.`
        }
      })
      )()
    }
  }, [pushEnabled])
}

export default HooksPushSendWelcomePushMsg

Could you try manually constructing the notification content in your push api endpoint to ensure the issue is not with the payload generation there?
import PushNotifications from '@pusher/push-notifications-server'

const PagesApiPushSend = async (req, res) => {

  const { title, message, userId } = req.body

  const beamsClient = new PushNotifications({
    instanceId: process.env.NEXT_PUBLIC_PUSHER,
    secretKey: process.env.PUSHER
  })

  const response = await beamsClient.publishToUsers([userId], {
    web: { notification: {
      title: `Congratulations 🎉`,
      body: `Hey Martin! You’ve successfully enabled reminders. This is how reminders appear.` } }
  })

  return res.json({ data: response })
}

export default PagesApiPushSend

My testing hasn't been able to replicate the undefined issue you are experiencing so the library looks to be behaving ok.

Hi @benw-pusher, apologies for not replying sooner, was busy completing a sprint.
After doing further digging, it looks like this error is caused because I’m using a third-party service worker (progressier.com). Will work it out with that service and will post here if we find a solution to this issue.
Thanks again!


DashboardModule TopReturnedRecordsIn Designer

Hi,
if we are using the eXpand Dashboard Module, the property TopReturnedRecordsInDesigner is not working.
Here you can see that we will get all (4) records when we use the xpand version.
In standard dashboard module the property is working and we will get 2 records.

#902
A sample will speed up bug fix works

Here is a smple
Sample.zip

I am sorry but u posted a sample using Reference and not PackageReference  of DevExpress 20.2 how would u expect me to run it? Please do the following install only the latest DevExpress version and try to run your package.
Note: eXpandFramework packages ages now only support the PackageReference format, no Refrence so we can communicate better.

Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.


[#96998072] create demo environment

Create a demo environment
What
Create full stack environments on AWS and GCE for doing a demo
Once we are happy that the platform does everything that we want a platform to do then we want to create a separate environment that we can simply keep for demos. This environment will not be kept up to date with the latest releases.
How this PR should be reviewed
This PR has been created to be reviewed in the following context:

I need to two variables that I need to use as parameters:

demo_environment_name - The name of the demo environment
reference_name - The default git ref name i.e. master

I want to create a new Jenkins job for the demo environment will supply custom parameters and trigger the terraform-deploy Jenkins job
I need to install a new Jenkins plugin that will allow me to pass parameters to downstream jobs
I need to make the DEPLOY_ENV a parameterised variable so I can set it dependent on the environment
I need to make the REF_NAME a parameterised variable that we can use as the git branch reference
I need to change the way the downstream jobs are now triggered since the current method does not allow parameters to be passed in from upstream jobs
I want to create the new job from the default job dsl Jenkins job

How to test this PR

You can use vagrant to generate the environment and create the jobs; using make vagrant
This will give you a local Jenkins instance that you can view on https://localhost:8443 that will allow you to verify and test the job creation.
You can also generate an environment from the Jenkins vagrant box but if you do this remember to destroy the environment (terraform-deploy with destroy option) before you destroy the Jenkins vagrant box

Who should review this PR

Any one on the core team can review and merge this PR with the exception of @dhilton who I paired with.

Note

We need to have a conversation about how we tag our releases across repositories, in this implementation you will need the same git tag name to be used in the tsuru-ansible and tsuru-terraform repositories.

There are a few errors but they are due to terraform.

This has a regression when applied to an existing environment as there is a clash between installing the Github auth plugin and installing more jenkins plugins. Thus this passed all tests when deployed to a clean instance, but rerunning this on an existing box will fail as we found today.


Update scripts in automl folder

Signed-off-by: dongyang0122<EMAIL_ADDRESS>Updated scripts in automl folder
Description
Updated copyright sections in the following script:
decode_plot.py
download_msd_datasets.py
install.sh
search_dints.py
search_dints.sh
train_dints.py
train_dints.sh
Checks

[ ] Avoid including large-size files in the PR.
[ ] Clean up long text outputs from code cells in the notebook.
[ ] For security purposes, please check the contents and remove any sensitive info such as user names and private key.
[ ] Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the ./figure folder
[ ] Notebook runs automatically ./runner.sh -t <path to .ipynb file>

Hi @dongyang0122 , I think the PR #1182 has added copyright info in the automl folder. Please feel free to reopen this if there are anything I misunderstood. Thanks!


Update import statement for prairie_view_loader

The following tasks have been / will be completed by merging this PR: (see here for relevant details)

[x] Update import statement to reflect recent naming changes in element_interface/prairie_view_loader.py v.0.6.0.
[x] Verify that the ScanInfo and ScanInfo.Field dictionary key / value pairs do not need updating in light of the changes above.
[x] Update CHANGELOG
[x] Update version.py
[ ] Update tag and release to PyPI

I bumped the element-interface version in #154.


feat(react): extend native props

I've noticed that all the custom web-components are extending HTMLElement, so we should treat them as well as HTMLElement when passing props(native events, attributes and more...), NOT just limited incomponentBaseInterface.
So this PR did two things:

Make componentBaseInterface extend HTMLElement props.
An useful typescript util function ReactifyProps that transforms web-component props to the corresponding react props. (so we don't need to write/change/add in two places)

And, with an example usage in the Dialog component.

thank you for suggestion，the web-components  custom event  in react is alse as a prop, how to deal with this situation

We will refer to your suggestion, thank you

thank you for suggestion，the web-components custom event in react is alse as a prop, how to deal with this situation

It's already handled by 'on${Capitalize<K>}' in ReactifyProps type, which transforms event names like click to onClick.
And those custom events defined in web-components will have higher priority if it's overlapping native events.

thank you for suggestion，the web-components custom event in react is alse as a prop, how to deal with this situation

It's already handled by 'on${Capitalize<K>}' in ReactifyProps type, which transforms event names like click / confirm to onClick / onConfirm. And those custom events defined in web-components will have higher priority if it's overlapping native events.

such as in picker, custom event close is not a key of picker。
but you suggestion is also usefull， we well refactor type code with extends React.DetailedHTMLProps<         React.HTMLAttributes<HTMLElement>,          HTMLElement         >

Okay, I'am getting your idea now.
I thought that events / props types are already defined in the quark web-component module, but it's not. Only Dialg did.
As a suggestion, in my opinion a idea type structure would be:

Define state and event type in web-component.
Frameworks specific type derives from them. ( React、Vue、Angular...)

I've made A simplified show case online.

As a suggestion, in my opinion a idea type structure would be:

Define state and event type in web-component.
Frameworks specific type derives from them. ( React、Vue、Angular...)

we will reference your suggestion, thank you


rollback to ci.yaml mac software for release testing

We recently updated the mac ios and mac android testbed software versions (macos, ios, xcode). And need to do some testing of today's release on older versions. Rollback the versions in .ci.yaml to accomodate the testbed.

This shouldn't be necessary from the ci.yaml as it's versioned by the repo. The underlying issue is there are no bots of that type in the prod pool due to the migration to MacOS 12.


Add to MemoryCacheOptions the CustomCompactOnMemoryPressureDelegate.

Add to MemoryCacheOptions the CustomCompactOnMemoryPressureDelegate.
The reason of adding  the custom compact delegate:

I have tried the feature MemoryCacheOptions.CompactOnMemoryPressure = true and found that it is a good concept to trigger of revising the memory cache size when the GC collects generation 2 .

However, the compact implementation is to reduce the cache every time by 10%, it is a weird solution. By the short time it will remove everything from the cache. In the real working .net core rest web service, the cached elements have disappeared before it will be reused.  So, I don't have a cache.

I propose to introduce in the MemoryCacheOptions the CustomCompactOnMemoryPressureDelegate as
 	public Action<MemoryCache> CustomCompactOnMemoryPressureDelegate { get; set; }
a. If you don't set this delegate the old Compact(0.10) will be invoked.
b. If setup you setup the delegate, it will be invoked instead.

For example when the Memory Cache is reached the dedicated number 110000 only in this case the compact method will be called.
Example of the custom delegate:
 private void CustomDelegateCompact(MemoryCache cache)
	        {
	            if(cache.Count > 110000)
	            {
	                cache.Compact(0.1);
	            }
	        }

Hi @Wallsmedia, 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;

We actually have concerns about this trigger mechanic. See https://github.com/aspnet/Caching/issues/221. I don't think we can evaluate your PR until we've resolved our concerns with the trigger.

I came through the thread #221.
My solution has been addressed to solve the similar case.
I had the similar issues in my web rest service.
Good in triggering:

The idea of  triggering mechanic  had been borrowing from Gc.ReRegisterForFinalize  , see example.
The calling of garbage collector for generation #2 and collecting  elements from generation #2 it is the best moment to review the size of the memory cache.

Issues in implementation of triggering:

The calling of collect generation #2 can be happened more often in case an ASP Web service. Chances are very high to have non cached objects which are  survived to generation #2 and released and collected.
The compact  has  a hard coded compress ration  of 10%
The compact triggers after every generation #2 collection.
The triggering mechanism of compacting can be called very often.
By other words, the ratio may be "1 added to cache" : "> 1 call of compact "

Solution to the issues:
( Not sure if you don't want support backward compatibility by adding features  that are not destroy current contract. )

Add ability to define the custom delegate that will be called by triggering mechanism . In this custom delegate you can define a required logic when to call compact and how match to remove.

If you check the test cases in my pull request, you will see the solution to the #221 issue.

Best to close this issue. We're making some design changes that will allow this and we're moving away from this mechanic in general

We decided to remove the GC based eviction trigger in #221. We will revisit the design of MemoryCache in #289.

It is very nice and fair decision. I will be happy to take part in the pre-re-view  coming changes. I will subscribe on further news/changes.


Function findById was ineffective in current version 1.0.0

After upgrade loopback-connector-couchbase5 to loopback-connector-couchbasex, something goes wrong. Method fo model findById always returns an instance without _case.
We found that findById in CouchbaseAccessor was never called. The debug trace show that all of the findById function in the model finally go to CouchbaseAccessor.findByIds.
refer to the call trace: #86
https://github.com/Wiredcraft/loopback-connector-couchbase3/issues/86#issuecomment-506649845
model.findById -> Juggler findById -> Juggler findOne -> findAll with limit 1
-> nosql findByIds --> accessor.findByIds ? accessor.findByIds :  map(ids => accessor.findById)

In earlier versions there wasn’t findByIds method,  findById play the role.
The implementation of findByIds in the current version has some issues which make lose _case field(without  unpackRes). It is necessary to modify the implementation of findByids to compatible the earlier version.

findByIds or findById should return same instance
findId should be called when ids with single item(just as before)

@xavierchow @makara @CCharlieLi

wechat-connector uses it
https://github.com/Wiredcraft/omni-wechat-connector/blob/master/package.json
tag too https://github.com/Wiredcraft/omni-tag/blob/master/package.json
scrm too https://github.com/Wiredcraft/omni-scrm/blob/master/package.json
https://github.com/search?q=org%3AWiredcraft+"loopback-connector-couchbasex"%3A+"^1.0.0"&type=Code

@CCharlieLi pls revisit those repos and try to upgrade the connector after the fix completes.

I would say, just use unpackRes, to keep consistency.

I would say, just use unpackRes, to keep consistency.

The unpackRes could be added for keep data consistency but currently the findById eventually hits the multiple get with single id, I'm not sure if it's efficient but I'd like to revert it to the original implementation(get) for the sake of safety. @makara

I think unpackRes in Accessor is useless.  Function unpackRes only used in findById, so I would like to move to utils and strip away Promise wrapper.

#105

Landed in v1.1.0, closing
cc @superbogy


Remove filter key instead of set to empty string.

I am working with an ng-table with filterable columns. Once a user enters input, ngtable params are updated with the entered text string. When a user clears the text box, the params.filter() still shows the key as a filtered key, but the value is an empty string. I would like to remove the key all together. Any ideas on how to do this?
something like the following...
var filts = params.filter();

            if(filts.length > 0) {
                for (var i in filts) {
                    if (filts[i] == '') {
                        delete params.filter()[filts[i]];  <-- would like to delete from params.filter(), how though?
                    }
                }
            }

http://ng-table.com/api-docs/classes/ngtableparams.html#filter


csr_matrix cannot take int64 indices and indptr even when assigned

Description
Hi CuPy Team, I am trying to assign int64 for indices in csr, but was not successful. It gives int32 when I print(A.indices.dtype). Below is a minimal example. Any advice?
Thank you! Btw, lovely software!
To Reproduce
import cupy
from cupyx.scipy import sparse as cupysparse
A = cupysparse.csr_matrix(
            (   cupy.arange(32,dtype=cupy.float64),
                cupy.arange(32,dtype=cupy.int64),
                cupy.arange(32,dtype=cupy.int64)),
            shape = (31,1),
            dtype=cupy.float64 )
print(A.indices.dtype)

Installation
Conda-Forge (conda install ...)
Environment
OS                           : Windows-10-10.0.22621-SP0
Python Version               : 3.8.13
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 1.21.2
SciPy Version                : 1.7.1
Cython Build Version         : 0.29.32
Cython Runtime Version       : None
CUDA Root                    : C:\Users\Jordy\anaconda3\envs\Inching2
nvcc PATH                    : None
CUDA Build Version           : 11010
CUDA Driver Version          : 11060
CUDA Runtime Version         : 11010
cuBLAS Version               : (available)
cuFFT Version                : 10300
cuRAND Version               : 10202
cuSOLVER Version             : (11, 0, 1)
cuSPARSE Version             : (available)
NVRTC Version                : (11, 1)
Thrust Version               : 100910
CUB Build Version            : 100910
Jitify Build Version         : <unknown>
cuDNN Build Version          : 8401
cuDNN Version                : 8401
NCCL Build Version           : None
NCCL Runtime Version         : None
cuTENSOR Version             : 10500
cuSPARSELt Build Version     : None
Device 0 Name                : NVIDIA GeForce RTX 3060 Laptop GPU
Device 0 Compute Capability  : 86
Device 0 PCI Bus ID          : 0000:01:00.0

Additional Information
No response

I think it is the same as https://github.com/cupy/cupy/issues/3513? And, I am still on cupy 11.5.0. Will upgrade to v12.0 help? Seems no. Sorry about the messy logic here.

duplicate of 3513


Bug: Access Denied (error 404) when we Refresh Restart Workload in AppGroup

📜 Description
After Selecting some apps in the App Group when we click on restart workload, we can see the files but the moment you refresh the Page, it shows Access denied & error 404.
👟 Reproduction steps

Select an App Group.
Select the Apps and Click on Restart Workload.
Check the details of the Page.
Now Refresh the page.
The URL remans the same but the page goes blank and shows Access denied.

👍 Expected behavior
After Refresh, the Restart Workload page shall remain the same like the URL.
👎 Actual Behavior
After Refresh, the Restart Workload page goes blank and shows access denied.
☸ Kubernetes version
.
Cloud provider

.
🌍 Browser
Chrome
🧱 Your Environment
QA
✅ Proposed Solution
.
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

AB#10009

Closing this as completed!


fix graph, align badges

Codecov Report
Patch and project coverage have no change.

Comparison is base (537ccfe) 79.08% compared to head (d448967) 79.08%.

:exclamation: Current head d448967 differs from pull request most recent head ff6037e. Consider uploading reports for the commit ff6037e to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #276   +/-   ##
=======================================
  Coverage   79.08%   79.08%
=======================================
  Files          22       22
  Lines        1712     1712
=======================================
  Hits         1354     1354
  Misses        358      358

Flag
Coverage Δ

unittests
79.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


how to use SyncBN?

how to use SyncBN when i training model in multi GPUS

refer to https://github.com/open-mmlab/mmclassification/blob/d2e505415040bf5329ab218bb6fe3d899f176cd5/configs/resnet/resnet50_8xb256-rsb-a1-600e_in1k.py#L11

thank you ,i can use SyncBN now.but i have a question ,when i train a model with single gpu and multi gpus, the result of multi gpus accuracy is less than single gpu about 5 scores, i think the differences is very big , how to solve this question?

Do you use the same config? Can you provide your config and commands to test?
And run ```pip list | grep "torch|mmcv|mmcls" to see the environment. I will check that.
Try to turn off the grad of SyncBN:
norm_cfg=dict(type='SyncBN', requires_grad=False),

I mean run
CUDA_VISIBLE_DEVICES=7 python tools/est.py /home/leinao/zhangzhiyong/mmclassification/class_test/resnet-18.py xx.pth

and
CUDA_VISIBLE_DEVICES=6,7 ./tools/dist_test.sh /home/leinao/zhangzhiyong/mmclassification/class_test/resnet-18.py 2 xxx.pth

Is there difference?

yes,the result is same

@Ezra-Yu

Now, the problem is that the acc is lower when using SyncBN, since SyncBN has no effect when using only one GPU.
This may be caused by your lr setting, try to scale your lr when trying on multi GPUs. In your case:
1 GPU
optimizer = dict(type='SGD', lr=0.002, momentum=0.9, weight_decay=0.0001)

N GPU
optimizer = dict(type='SGD', lr=0.002 * N, momentum=0.9, weight_decay=0.0001)

Now, the problem is that the acc is lower when using SyncBN, since SyncBN has no effect when using only one GPU.
This may be caused by your lr setting, try to scale your lr when trying on multi GPUs. In your case: 1 GPU
optimizer = dict(type='SGD', lr=0.002, momentum=0.9, weight_decay=0.0001)

N GPU
optimizer = dict(type='SGD', lr=0.002 * N, momentum=0.9, weight_decay=0.0001)

yes,i tryed,when i use single gpu, i set lr=0.001,batch_size=32,when i use 2 GPUs, i set lr=0.002,batch_size=64, norm_cfg=dict(type='SyncBN', requires_grad=False)
but  result is not changed

How about using normal BatchNorm?
I think I can not solve your question, Maybe, Next, you need to design your own experiments to verify.

normal BatchNorm is also can not solve the question
thank you ,may be i need to search other solutions


I'm hoping for each given question to have a better chance at getting many possible responses.

My basic setup.
chatterbot = ChatBot("Charlie",
    response_selection_method=get_random_response,
    storage_adapter='chatterbot.storage.MongoDatabaseAdapter',
    logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch'
        },
        {
            'import_path': 'chatterbot.logic.LowConfidenceAdapter',
            'threshold': 0.90,
            'default_response': 'OhNo'
        }
        ],
        database='Chat_Questions'
    )
chatterbot.set_trainer(ChatterBotCorpusTrainer)

corpus = 'favorites.corpus.json'

chatterbot.train(
    corpus
)

Every time this python file run, the database would fill up more basic on what's in that corpus file that's listed. Here's a small sample of that json file.
    [
      "what's your favorite band",
      "Nine Inch Nails"
    ],
    [
      "whats your favorite band",
      "Nirvana"
    ]

So lets say the question to answer was "what's your favorite band". Too often, I think it would give the answer "Nine Inch Nails", all because that's the exact wording, character for character. I'd hope for an equally likely chance that it would get the "Nirvana" response. If I worded similar questions to be exactly the same in this json file, there would be many duplicate entries, making it inefficient.
I hope that my concern makes sense. Can anyone suggest anything.
Another thing. If the bot comes across a question like "what is your favorite brand", it might end up thinking it's asking what your favorite band is, because most of the letters are the same. It could end up giving some pretty funny answers.. can anyone recommend a good way to address this problem?

Try using the repetive response filter:
logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch'
        },
        {
            'import_path': 'chatterbot.logic.LowConfidenceAdapter',
            'threshold': 0.90,
            'default_response': 'OhNo'
        }
        ],
        filters=[
        'chatterbot.filters.RepetitiveResponseFilter'
        ],

That should keep the bot from saying the same thing every time. However, when you think of it, you might want it to say the same band, in this case. Like, if you gave me a diff band every time I asked you what your fave band was, I'd be very confused.
Anyway, try it out and lemme know what you think.


Fast differentiable sorting and ranking

Following this discourse post, here is a Julia implementation of Fast differentiable sorting and ranking (see here for the original Python implementation).
This includes:

soft_rank and soft_sort differentiable methods
Two new custom optimization mayers:SoftRank <: AbstractRegularized and SoftSort <: AbstractOptimizationLayer compatible with the InferOpt ecosystem

TODO:

[ ] proper testing of all new features
[ ] currently, only the quadratic regulariization is implemented, we should at least add the entropic regularization, and maybe a way to provide a custom regularization
[ ] docstrings

Codecov Report
Patch coverage: 96.00% and project coverage change: +1.70% :tada:

Comparison is base (bb37b1a) 85.42% compared to head (a4315bf) 87.12%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   85.42%   87.12%   +1.70%
==========================================
  Files          19       21       +2
  Lines         391      466      +75
==========================================
+ Hits          334      406      +72
- Misses         57       60       +3

Files Changed
Coverage Δ

src/InferOpt.jl
100.00% <ø> (ø)

src/regularized/soft_rank.jl
66.66% <66.66%> (ø)

src/utils/isotonic.jl
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Screen saver won't disengage

If the screen saver engages (High Sierra), it often won't shut off when the mouse or keyboard is activated. The only method to escape it is to put the Mac laptop to sleep and wake it again.

@gjbaxter That's weird. Does it happen with other screensavers?
What kind of Mac do you have? And what mouse/keyboard are you using?
Also, are you using the latest version? https://github.com/JohnCoates/Aerial/releases

Hello John,
I, of course, don’t use any other screen savers but yours!  And yes, running 1.2.
But.. I’ll give running a different screen saver a test.
I have a macbook pro 13” running High Sierra (which was the recent change, so I chalked it up to that).
Keyboard is an apple bluetooth keyboard or the laptop keyboard itself.
The behavior is odd.  It does respond to, say, the app switch (cmd tab) and the screen ‘resizes’ for a second, but still stays locked in and running.
Thanks,
George

On Nov 23, 2017, at 01:54, Alistair McMillan<EMAIL_ADDRESS>wrote:
@gjbaxter https://github.com/gjbaxter That's weird. Does it happen with other screensavers?
What kind of Mac do you have? And what mouse/keyboard are you using?
Also, are you using the latest version? https://github.com/JohnCoates/Aerial/releases https://github.com/JohnCoates/Aerial/releases
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/JohnCoates/Aerial/issues/423#issuecomment-346572946, or mute the thread https://github.com/notifications/unsubscribe-auth/AQxB0shtCOdx6hf4Y285YZQZtP5nwNBQks5s5UC4gaJpZM4QoMO_.

Good news!  Well.. good for you.. it happened for another screen saver.  Not your problem.  Sorry about that.
Thanks,
George

On Nov 27, 2017, at 14:20, George Baxter<EMAIL_ADDRESS>wrote:
Hello John,
I, of course, don’t use any other screen savers but yours!  And yes, running 1.2.
But.. I’ll give running a different screen saver a test.
I have a macbook pro 13” running High Sierra (which was the recent change, so I chalked it up to that).
Keyboard is an apple bluetooth keyboard or the laptop keyboard itself.
The behavior is odd.  It does respond to, say, the app switch (cmd tab) and the screen ‘resizes’ for a second, but still stays locked in and running.
Thanks,
George

On Nov 23, 2017, at 01:54, Alistair McMillan<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
@gjbaxter https://github.com/gjbaxter That's weird. Does it happen with other screensavers?
What kind of Mac do you have? And what mouse/keyboard are you using?
Also, are you using the latest version? https://github.com/JohnCoates/Aerial/releases https://github.com/JohnCoates/Aerial/releases
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/JohnCoates/Aerial/issues/423#issuecomment-346572946, or mute the thread https://github.com/notifications/unsubscribe-auth/AQxB0shtCOdx6hf4Y285YZQZtP5nwNBQks5s5UC4gaJpZM4QoMO_.

Good to hear. I'm not John btw. :)

and I'm just dumb.  Sorry Alistair!


The editor's smart prompts overlap and cannot be displayed properly.

Issue Type: Bug
The editor's smart prompts overlap and cannot be displayed properly.
Same as the one shown in the screenshot below.But when i reload window or reopen the VS Code ,this situation will disappear.
 What are the steps?

@joaomoreno
I may not be able to reproduce this problem.This happend by chance,and it disappeared when i reloaded window or restarted the VS code. But I have not encountered this problem in the latest version .

Alright, let me know if you encounter it again.

Alright.

@Microsoft/vscode This was the first occurrence of an issue due to different semantics between WinJS and cancellable native promises.
Basically, the execution of then callbacks is different in a cancel situation:

When using WinJS promises, the then callbacks will be called in the same execution frame as .cancel(). Once cancel returns, all then callbacks that were attached to that promise have executed.
When using cancellable native promises, the then callbacks will be called in the next execution frame as .cancel(). First, .cancel() returns, the execution frame ends and all then callbacks will run on the following execution frames.

Please refer to the following 4 test cases which demonstrate the behavior:
https://github.com/Microsoft/vscode/commit/a486f518d62d5cbc3c46536f73c45e659f48301e
Keep this in mind when migrating to native promises.


Cknieling/support dependent attributes

generate dynamic default values that depend on user set attributes
add functionality to query dynamic default values for enums
minor improvements for setting attribute values
This PR depends on changes made in PR 103 and PR 104, therefore these should be reviewed first.
The first actual commit for this PR is b9b29f3

Applying our favela.rpk example to a 10x10 quad (switch scene to meters first), now produces this warning:
[error] maya status error at .../serlio/src/serlio/modifiers/PRTModifierAction.cpp:896: (kFailure): Object does not exist (code 1)
the model is still generated but it seems this PR introduces some unexpected side-effects

Nice find, I will investigate the cause.


Introduce IR nodes to wrap/unwrap JavaScript exceptions.

This makes me wonder: Barring optimizations, is there ever a case where we throw without unwrapping first and we catch without wrapping first?

Hum no, by spec, throw must unwrap js.JavaScriptException, and catch must wrap non-Throwables. Some optimizations determine that it's not needed in some cases, but they're only optimizations.

That said, I'm wondering if we should add primitives to js.special to throw and catch the JavaScript way, without wrapping/unwrapping, manipulating Any values.

I was more thinking about building it into the spec the Throw / Catch trees and optimize in the linker.
But OTOH, we'll need wrap / unwrap anyways so the user code can do something reasonable with it.
So yes, maybe the cleanest is to add all of these to js.special and implement everything in terms of them.

I think I addressed all the comments, except of course the discussion on whether UnwrapFromThrowable should accept Any or only Throwable.

Updated to restrict UnwrapFromThrowable only to Throwables.


Font not displayed correctly

Bug
The problem is on iOS, Android looks alright. Font family that is used is RyoGothicPlusN-EL
Fonts should be displayed correctly. However we have these problems in iOS:

We specify different fonts but they all look the same using svg text, see difference with normal react native text in screenshot
November is displayed as No. vember

iOS (Has the problem) vs Android (Looks alright)

Environment info
Run react-native info in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project
React native info output:
System:
    OS: macOS 11.5
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
    Memory: 402.86 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/ignacio/.rvm/rubies/ruby-2.6.3/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 29, 31
      Build Tools: 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0
      System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.76<IP_ADDRESS>86908
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.2 => 0.64.2
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 12.1.1
Steps To Reproduce
https://github.com/IPbianco/rnsvg-bug-repro

git  clone https://github.com/IPbianco/rnsvg-bug-repro.git
cd rnsvg-bug-repro
yarn
cd ios
pod install
cd ..
npx react-native start (start metro bundler)
npx react-native run-ios (start app)
Open CleanProject app on the simulator

Describe what you expected to happen:
Fonts should be displayed correctly. However we have these problems in iOS:

We specify different fonts but they all look the same using svg text, see difference with normal react native text in screenshot
November is displayed as No. vember

No solution, but I'd be interested in knowing how you get these fonts to display anyway. When I try using fontFamily I can get a serif and a sans-serif, but they look awful
(Android simulator Pixel 5)
<Svg height="100%" width="100%" viewBox={`0 0 100 100`}>
   ...
   <Text x='10' y='70' stroke='white' fill='white' fontFamily='sans-serif-thin' fontSize='10'  >0 kph</Text>
</Svg>

Note how blocky it is and no space between letters, horrible.
I've tried serif, sans-serif, sans-serif-thin, sans-serif-light
I tried your RyoGothicPlusN-EL, but no change (I assume this is some custom font or one you downloaded?)
Gordon

This is a bit odd. I just copied your code from the repo and tried on the android simulator, made a couple of adjustments to the positioning and didn't get any change in font style at all, unlike in your image above.

These are the installed fonts according to this https://www.exeideas.com/2016/02/list-of-default-fonts-in-android.html, but   RyoGothicPlusN-EL isn't one of them? I assume again that you have downloaded and installed this.
However, I have tried your code using some of the fonts in the link and get this:

Sorry, if this is obvious to some people, but I'm a bit new to React-Native and svg.
I realise it doesn't help with the ios issue as well.
And for completeness here is the code:
      <View style={styles.svgTextSection}>
        <Text style={styles.title}>******** SVG Text ********</Text>
        <Svg height="50" width="400">
          <SvgText
            fill="white"
            x="20"
            y="50"
            fontSize={20}
            fontFamily="sans-serif"
            fontStyle='normal'
            >
            sans-serif normal
          </SvgText>
        </Svg>
        <Svg height="50" width="400">
          <SvgText
            fill="white"
            x="20"
            y="50"
            fontSize={20}
            fontFamily="sans-serif"
            fontStyle='italic'>
            sans-serif italic
          </SvgText>
        </Svg>
        <Svg height="50" width="400">
          <SvgText
            fill="white"
            x="20"
            y="50"
            fontSize={20}
            fontFamily="sans-serif"
            fontWeight="bold">
            sans-serif-bold
          </SvgText>
        </Svg>
        <Svg height="50" width="400">
          <SvgText
            fill="white"
            x="20"
            y="50"
            fontSize={20}
            fontFamily="sans-serif-thin"
            fontStyle="normal">
            sans-serif thin
          </SvgText>
        </Svg>
        <Svg height="50" width="400">
          <SvgText
            fill="white"
            x="20"
            y="50"
            fontSize={20}
            fontFamily="sans-serif-light"
            fontStyle="normal">
            sans-serif light
          </SvgText>
        </Svg>
        <Svg height="50" width="400">
          <SvgText
            fill="white"
            x="20"
            y="50"
            fontSize={20}
            fontFamily="serif"
            fontStyle="normal">
            serif regular
          </SvgText>
        </Svg>
      </View>

So after a days work I discovered that my issue was due to the use of
<Svg height='100%' width='100%'  viewBox="0 0 100 100">

The use of viewBox really didn't work well with the fontSize and style. I don't know why.
I stopped using it and wrote my own mapping function:
  const dw = Dimensions.get('window').width  //don't forget to import Dimension in react-native
  const dh = Dimensions.get('window').height
  const aspect = dw / dh

 //convert x (0->100) to svg coords on screen, y follows aspect ratio for same
  const xs = (x) => { return x/100 * dw  }
  const ys = (y) => { return y/100 * aspect * dh }

//and now call xs(some number between 0 and 100) and ys(between 0 and probably much more than 100 for the y pos)

This seems to work really well in my use case. The text now displays clearly and properly.
Sorry that I have hijacked this thread somewhat :( but if anyone came here they might have wondered what a possible solution is to my use case and this was the only search result I found that even referenced the sort of problem I was having.)
However, it might point the way forward for the use of ios code, though your test case didn't use a viewBox, so maybe not? (I don't have a mac)
I hope that this issue gets some priority as obviously this is a pretty major problem.


Customize identifier of View within the OnboardingStack

Problem
The OnboardingStack identifies the individual views via the type name of the respective view (required for ordered navigation operations).
For trivial use cases, this identification method is sufficient. However, for more advanced onboarding flows that contain multiple instances of the same View, this mechanism begins to fall apart.
Solution
We envision a custom ViewModifier in combination with a protocol that can be applied to Views within the OnboardingStack. This enables to customize the identifier of the onboarding Views, enabling more complex onboarding flows. The default identifier should still be inferred from the type of the View.
The protocol enforces a get computed property (e.g., var viewIdentifier) that is able to fetch the identifier of a View set via a custom  ViewModifier (e.g. .onboardingIdentifier(_: String) on a View used in the OnboardingStack.
The public API would then look similar to this:
struct OnboardingFlow: View {
    var view: some View {
         OnboardingStack {
               TestView1()
                    .onboardingIdentifier("...")
               TestView2()
               TestView1()
                    .onboardingIdentifier("...")
         }
    }
}

struct TestView1: OnboardingView {
   var viewIdentifier: ID = "..."

    var view: some View {
           // ...
    }
}

Additional context
It might be a good idea to utilize the Identifiable protocol from Swift for the custom protocol enabling to get the View identifier.
Code of Conduct

[X] I agree to follow this project's Code of Conduct and Contributing Guidelines

Thank you for summarizing this @philippzagar 🚀


Create docker compose file

Created also Dockerfile
These files were created before SpringBoot was introduced. It could need some adjustment.

LGTM


Question : why do not used Daubechies in deepmc at wpd

Thank you for your research and code.
Micro-climate Prediction - Multi Scale Encoder-decoder based
Deep Learning Framework.
This paper using Daubechied wavelet function, but here code used bior3.5.
please tell me why.
Thank you

Hello, here is the answer from Peeyush Kumar, one of the authors of the paper.
The reason we use bior3.5 is to mitigate boundary effects in calculation of wavelets. For prediction tasks we are always operating at the boundary of the wavelets, therefore minimizing edge effects is key to a wavelet-based method performing well. Symmetric wavelets will have lesser edge effects than asymmetric, example see “Gogolewski, Damian. "Influence of the edge effect on the wavelet analysis process." Measurement 152 (2020): 107314.”
Practically, we experimented with various different wavelets and found bior3.5 to have, on an average, the best performance for various signals. Although, we would encourage experimentation with the wavelets for your specific tasks.

Thanks you for your reply!


Standardize use of terminology re: logID, shardID, treeID, tlog_id

I think these all refer to the same thing, so they should have one term. I propose TreeID, as that's what is used in the logRangesMap flag added by @dlorenc .

This is complete IIRC, it was standardized in the code
@priyawadhwa @lkatalin @asraa feel free to reopen if not


GoAlt not working correctly

Hello,
When using GoAlt it correctly moves from the test file to the source code.
However, when moving from the source code to the test file it opens a file called '~/git_test.go` instead.

moving from source to test depends on     alt_file = vim.fn.expand('%:r') .. "_test.go"
When you opened source, what is the output of echo expand('%:r') from vim cmd line? It is strange why would it be git. Also are you in the latest master and what is your operating system?

@ldelossa
Do you still see this issue? Could you share more info on how to reproduce it?


PSMove SteamVR Controller Mapping doesn't work

I used the example steamvr controller mapping and the only buttons that work are the trigger, move for trackpad click, and select for grip. although, the default has square set to grip, so i'm confused.

They are working on this issue presently. Hopefully it will be fixed soon. This issue has been persistent since back in march when the OpenVR api's were changed and psmove service hasn't been updated for that change yet.

The fix is coming down the testing pipeline now.

Version 1.6.0 of psmovesteamvrbridge has been released which fixes this issue. Check it out.

Closing this issue now that Version 1.6.0 is out.


update bottom plate file

Find and update .STL file for the bottom plate of the frame (with the holes for attaching the gimbal)

Find and update .STL file for the bottom plate of the frame (with the holes for attaching the gimbal)

New CAD file added, please

verify it's the correct one
Create sliced and ready to print files
Update repo

Updated bottom plate files in the repo


webpack should support publicPath with different port for testing on mobile devices

It's hard to integrate webpack-dev-server with an existing server like Meteor and then load the page on a mobile device connected to my dev machine via LAN.
The problem is that while publicPath: "http://localhost:8080/"  (or publicPath: "http://<IP_ADDRESS>:8080") works for testing the page on my dev box, they don't work for testing the page on a mobile device.
If Webpack simply supported config like this it would solve the problem:
output: {
  publicPath: "/",
  publicPort: 8080,
}

Meaning that if I load a resource doge.png with url-loader, the bundle will request it from <page base URL>:8080/doge.png and will load properly on a mobile device.

output: {
  publicPath: "//" + require("os").hostname() + ":8080/"
}

That's an interesting idea, I didn't think about trying that way.  I wonder if it will be possible to resolve my dev machine via hostname over a public WLAN though?

In any case thanks to getting websocket proxying to work, this isn't really a problem for me anymore

This is still a problem for me.  I thought all was dandy when I got going with publicPath: "http://<IP_ADDRESS>:8080" but I've hit this now that I am trying to test over LAN.  Your suggestion on the hostname won't work because my app dev server is a vagrant box and the hostname isn't resolvable off the host

Same problem here, @jedwards1211 could you give an example of what you did?

Can't remember...in any case is there a technical reason why having url-loader request an image as just /doge.png (letting the browser fill in the host being used) is unsupported?


Blank image on mobile with canvas.toDataUrl()

I am using getCroppedCanvas in the following manner:
var canvas = this.cropper.cropper('getCroppedCanvas', {
        width: 160,
        height: 160
      });

var image = canvas.toDataURL("image/jpeg");

$image.attr('src', image)

However, all i'm seeing is a empty 160x160 data url image. Am I doing something wrongly?
The problem only exists on mobile with pictures taken from my iPhone 6 camera (high megapixels). Desktop works perfectly fine.

I am having the exact same issue. I get a blank image on my iPhone 5 in Safari. Strangely it works with the front-facing camera (albeit rotated incorrectly but im aware of the exif issue) but when I try with the back-facing camera, I just get a blank image at the correct dimensions.
It works absolutely fine on the iPhone when using photos from my photo library and also fine on desktop.
What is causing this and is there a solution?
Thanks

I'm on iOS 8.1 btw

OMG lol. U are right it works on front facing camera but failed on back facing! I am using the same iPhone.
Sent from my iPhone

On 7 May 2015, at 1:26 am, jonnylevy<EMAIL_ADDRESS>wrote:
I am having the exact same issue. I get a blank image on my iPhone 5 in Safari. Strangely it works with the front-facing camera (albeit rotated incorrectly but im aware of the exif issue) but when I try with the back-facing camera, I just get a blank image at the correct dimensions.
It works absolutely fine on the iPhone when using photos from my photo library and also fine on desktop.
What is causing this and is there a solution?
Thanks
—
Reply to this email directly or view it on GitHub.

Sorry I am on iPhone 6. iOS V 8.3.
The same behavior happen on both mobile chrome and safari; back facing camera failed, front works. Lmfao
Sent from my iPhone

On 7 May 2015, at 3:04 am, jonnylevy<EMAIL_ADDRESS>wrote:
I'm on iOS 8.1 btw
—
Reply to this email directly or view it on GitHub.

I faced this issue with iOS devices has limited memory issue , when you are cropping an large Image ( IPhone camera resolution) a canvas will be generated with the dimensions of the crop area and then it will generate an image with the given cropped dimensions.
during this process the browser crash.
All you have to do is to resize the image (something below 1000px wide) before you apply the cropper on it.
https://developer.apple.com/library/mac/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html

Thank you @tareqlol . You are absolutely right, great solution!
FYI, I used this library: https://github.com/gokercebeci/canvasResize to resize the original photo and then applied the cropper and now it works!

(y) , canvas resize can cause losing image quality , i used a php resizer :) , good thing that it works now :D

Thank you for the research and coming up with a solution! This will help a lot since I was facing the same problem and had no clue where to start. @tareqlol, would you mind sharing your code here? That would really kickstart my efforts in solving this!

@jonnylevy @tareqlol It would be great if ou could share some of your code or give some more insights in how you solved the problem. That would be really appcreciated! :thumbsup:

All you have to do is to check if you are on mobile to send the image to an action to resize it.
Check if the width of the image is larger 1000 or the height is larger than 1000 and also you are
if($(window).width < 768 && ($(image).height() > 1000 || $(image).width() > 1000)){
// send the image to backend to resize it.
// once it is ready get it from the backend and apply the cropper on it
}

backend resize:
http://php.net/manual/de/imagick.resizeimage.php

Create 1 level of indirection by drawing the image on a small canvas. Then extract the image and apply it to cropper.

On 18 May 2015, at 5:08 pm, Tareq Hassan<EMAIL_ADDRESS>wrote:
All you have to do is to check if you are on mobile to send the image to an action to resize it.
Check if the width of the image is larger 1000 or the height is larger than 1000 and also you are
if($(window).width < 768 && ($(image).height() > 1000 || $(image).width() > 1000)){
// send the image to backend to resize it.
// once it is ready get it from the backend and apply the cropper on it
}
backend resize:
http://php.net/manual/de/imagick.resizeimage.php
—
Reply to this email directly or view it on GitHub.

@geekyme  it is a good solution but larger images on the iphone would break if you are using canvas resizing.

You guys rock! I'm having this exact same issue. So it sounds like re-sizing below 1000px prior to cropping is the best solution here. Much appreciated!

Hello guys.
Please I'd love to see a full script that works fine.
Just started front-end design.
Thanks

How do you guys feel about checking if it is an iOS system in addition to checking the image size and if on mobile. This way you dont need to lower the quality if not really needed.
if ( (/iP(hone|od|ad)/).test(window.navigator.platform) && ($(window).width < 768 && ($(image).height() > 1000 || $(image).width() > 1000)) ) {
	// send the image to backend to resize it.
}

Thank you for your sharing. I want to ask if there are any other ways.
canvas resize can cause losing image quality

@crown-cc  : you can use a php image re-sizer instead. http://www.imagemagick.org/script/index.php


AWS parameter advanced doesn't support

I would like to use AWS parameter advanced to store secret string as the dockerconfigjson length(in base64) is more than 4096, but i got below error in externalsecret
ERROR, Secret "dockercred" is invalid: data[.dockerconfigjson]: Invalid value: "": invalid character 'e' looking for beginning of value

closed, as it should use json format instead of base64


Why there is no ffmpeg binary library file in the WHL package I built?

version: 8.10.0
I built pyav using the following command:
source scripts/activate.sh /home/chao/FFmpeg
./scripts/build-deps
python setup.py bdist_wheel
A whl file was generated，there is no ffmpeg binary library file in the WHL file. However, the whl file I downloaded from pypi contains the ffmpeg binary. so file, which is located in the av.libs directory.
Can anyone tell me how to package ffmpge related so files into whl ？

auditwheel is greet

How do you do that? I want to know too


Itemize data to be collected from the reference paper

Check the reference paper in Papers/Climate-Change-and_Naturaldisasters.pdf and figure out what data the author used. Make a list of what data we need and where we can get it (FRED or whatever)

OECD - Laos
Vars:

Population density

https://data.worldbank.org/indicator/EN.POP.DNST

GDP per capita (constant 2005 $)

https://data.worldbank.org/indicator/NY.GDP.PCAP.KD?name_desc=false

Average precipitation deviation

Use 1 deg x 1 deg grid
Monthly,  Global Precipitation Climatology Centre (GPCC) Full Data Reanalysis (Version 7.0)
Departure from the average of its 30-year base period 1961-1990

Average temperature deviation

HadCRUT3v (variance adjusted version)
Departure from the 30-year base period 1961-1990

Population

Global vars:

$\text{CO}_2$ level

https://data.globalchange.gov/dataset/noaa-cmdl-co2_mm_gl

$\text{CO}_2$ deviation from level in 1970
Sea temperature deviation

Departure from the 30-year base period 1971-2000
I can’t find the exact file they use (no login to FTP)
I suggest using this: https://www.ncei.noaa.gov/access/global-ocean-heat-content/monthly_analysis.html#null

Data sources:
14
Data filters:

Reference paper: 1970 to 2013
Reference paper: used only EM-DAT events with at least 100 deaths and directly affecting 1,000 people, controls for reporting bias
I disagree with the logging, we should use log(x+1) instead so that a log of zero would not be undefined.

Questions:
What to do for countries that no longer exist/merged? (Soviet Union, West Germany, etc)

Merge this list into the Papers folder as a .md file and close it via PR please


jx secret edit fails on Azure Key Vault with error: failed to save properties key:

$ jx secret version
version: 0.0.221
$ jx version
version: 3.1.170

Full error:

error: failed to save properties key: test-document-db-postgresql properties: postgresql-postgres-password, postgresql-password on ExternalSecret test-document-db-postgresql: error setting azure key vault secret: error retrieving secret from key vault: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://XX-XXX.vault.azure.net/secrets/test-document-db-postgresql?api-version=7.1: StatusCode=0 -- Original Error: the MSI endpoint is not available. Failed HTTP request to MSI endpoint: Get http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01: context deadline exceeded

+1
I also have this problem, and my az cli is set up with enough privileges (I can edit that secret via az cli, but not via jx secret edit)

we noticed the jx secret edit code was using the old secret editor code and not this library https://github.com/jenkins-x-plugins/secretfacade we use for jx secret populate
its been fixed now - I wonder if you could retry with the latest jx CLI and see if its still an issue?


plugin-seo: Missing LICENSE file

I noticed the package.json file states the project uses the MIT License, however there is no LICENSE file. Can you add one such that github can include it into the about section?

This no longer seems relevant now that this plugin was moved into the monorepo.


Angular rc2 breaks dependencies

When trying to follow Angular 2.0 Meteor Tutorial I get an error when executing:
meteor npm install --save angular2-meteor @angular/platform-browser-dynamic
...
npm ERR! peerinvalid The package<EMAIL_ADDRESS>does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer<EMAIL_ADDRESS>wants<EMAIL_ADDRESS>npm ERR! peerinvalid Peer<EMAIL_ADDRESS>wants<EMAIL_ADDRESS>npm ERR! peerinvalid Peer<EMAIL_ADDRESS>wants<EMAIL_ADDRESS>npm ERR! peerinvalid Peer<EMAIL_ADDRESS>wants<EMAIL_ADDRESS>npm ERR! peerinvalid Peer<EMAIL_ADDRESS>wants<EMAIL_ADDRESS>

#302 Should fix it

What if you try to switch to rc2, would that work?
I would like to try out new angular router v3 that is dependent on rc2.

@mitjade You can use the new router with rc1 if you specify the alpha3 build instead of 6, that release only requires rc1. That's how I was able to play around with it, because rc2 still breaks all sorts of things for me.


Platform API returns true for tablet on Nokia 8 Device which is actually mobile.

Bug Report
Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.
Ionic:

   ionic (Ionic CLI)  : 4.0.6 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.0.1

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 6.4.0, ios 4.5.5

System:

   Android SDK Tools : 26.1.1
   ios-deploy        : 1.9.2
   NodeJS            : v9.4.0 (/usr/local/bin/node)
   npm               : 5.6.0
   OS                : macOS High Sierra
   Xcode             : Xcode 10.0 Build version 10A255

Environment:

   ANDROID_HOME : /Users/<company>/Library/Android/sdk

Describe the Bug
My app is designed to work in portrait only on mobiles and landscape only on Tablets. I have used Platform API from 'ionic-angular' to distinguish b/w a mobile and a tablet and locked the device to the required orientation using Cordova screen orientation plugin.
One of the customers reported that on his Nokia 8 device the app is launched and fixed to landscape orientation. We don't have access to the device Nokia 8.
Upon investigating our environments we found that the Platform API is returning the value 'true' for the platform check 'tablet' even though the device Nokia 8 is a mobile.
Our conclusion is based on the fact that we are saving the device type in our servers. Please find the code below.
Related Code
this.platform.ready().then(() => {       if (this.platform.is("mobile") && !this.platform.is("mobileweb")) {         if (this.platform.is("ipad") || this.platform.is("tablet")) {           this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);         } else {           this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);         }       } });
if (this.platform.is("iphone")) {         device = "iphone";       } else if (this.platform.is("ipad")) {         device = "ipad";       } else if (this.platform.is("tablet")) {         device = "tablet";       } else if (this.platform.is("mobile")) {         device = "mobile";       } else if (this.platform.is("mobileweb")) {         device = "mobileweb";       } else {         device = "mobileweb";       }
Expected Behavior
As Nokia 8 device is a mobile the Platform API should return false for 'tablet'
Additional Context
Device Nokia 8 TA-1004 (8.1.0) running Oreo version

Hi,
Our app has google analytics integrated. The Nokia 8 device resolution is registered in analytics portal as 2560x1440 instead of 1440x2560. The customer mentioned of installing a launcher app for custom home screen layout. I wonder if launcher apps can create such issues.


[OneExplorer] Reorder context menus

This comit reorders context menus
ONE-vscode-DCO-1.0-Signed-off-by: dayo09<EMAIL_ADDRESS>
For #1120

Differences
Before

After


Investigate about dill and cloudpickle

[ ] https://pypi.org/project/dill/
[ ] https://github.com/cloudpipe/cloudpickle

No longer in scope


Alternate Display for Username in Discord

Edit: This requires the bot to have the permissions manage Webhooks (I think I just gave it Admin xD)

It looks like this.
Idk if this fits the theme of devzat but I was bored :)

That's such a cool idea! I think this would be great as an optional thing in the discord integration config. It takes up more vertical space but I see the appeal.

I want to add a pfp depending on the color of the username and I have 3 idea how to do it but want your input @quackduck ...

open up a port on devzat to host the images
add a micro service on another machine/the same machine to generate/host the images
upload them to another channel on discord and then get a url from there (you can upload images to discord but can't use the in the pfp of a webhook...)

I don't really want to make Devzat, which is an SSH server, also an HTTP server but since this is an optional feature, maybe it's okay. I'm thinking that an implementation could work like this:

User sends message
Discord integration sets avatar_url to "/pfps/.png"
An HTTP server listens for connections to /pfps and uses the color description to send back a very minimal generated image to Discord

The hard part is keeping the terminal colors and discord colors the same, because the way messages work in Devzat means that they don't encode color information. So, I think we'd have to just make the color the result of some sender-name-based function. (eg. hash sender name, then convert hash into RGB values with math).
Ultimately the end result would be pfps with colors that don't match those in the terminal and are only sender-name-dependent (meaning that if someone changes their name, the color will change too), which is kind of not that big an improvement and now involves a whole HTTP server and PNG generating - all of which presents opportunities for holes and DoS attacks from @TAG-Epic. So yeah idk if we should do this. What do you and @Arkaeriit think?

oops, closed by mistake

Added Profile picture colors :)

That's awesome! Could you attach an example demo screenshot?

Profile pictures on Discord compared to Devzat usernames:

https://api.slack.com/methods/chat.postMessage
This is what I found looking through the slack api documentation maybe there'll be the same problem... i don't really know slack tho...

Can the inverse transform be applied to messages send on Discord and read from SSH? It would be nice if the name of Discord users on SSH mirrored the color of their profile pictures.
But this is probably out of the scope of this PR as this probably require quite a bit of work as far as image processing goes.

Can the inverse transform be applied to messages send on Discord and read from SSH? It would be nice if the name of Discord users on SSH mirrored the color of their profile pictures.
But this is probably out of the scope of this PR as this probably require quite a bit of work as far as image processing goes.

Maybe create a new issue?

This is such a cool feature that I think we should make this the default discord mode. Is there any extra set-up needed on the Discord side?

This is such a cool feature that I think we should make this the default discord mode. Is there any extra set-up needed on the Discord side?

It needs "Manage Webhooks" and "Message Content Intent".
Doesn't need "Send Message" anymore.

This is such a cool feature that I think we should make this the default discord mode. Is there any extra set-up needed on the Discord side?

It needs "Manage Webhooks" and "Message Content Intent".
Doesn't need "Send Message" anymore.

Might need an update to the docs in that case

Just tested, seems not to have broken anything!

Epic PR, thanks for this


feat: allow user set roleArn

Task linked: GHORG-34 Need assumeRoleArn param

Also, please rebase. Thx.


Configure 2/3 threshold multisig for Sudo on Mainnet

[ ] TODO : Add some documentation as described in #57
[ ] Close #57

Added a short document to explain the governance model around sudo-multisig, pallet-collective + pallet-motion. Request your review and feedback @peterwht @stiiifff

FYI - we debated on whether to keep codec dependency alias on my recent PR, but found it introduced build warnings unfortunately, hence using the actual dependency name instead.

It would be good to add some documentation highlighting that the multisig signatories MUST have funds.

It would be good to add some documentation highlighting that the multisig signatories MUST have funds.

Could you please elabore a bit more on that?

@weezy20 cfr. @peterwht remark, the Multisig account must be pre-funded (so be included in the endowed accounts of the balances pallet in the genesis). See here.

Worth adding a test?

To elaborate more. Yes, the multisig account must be funded. But each signatory must be funded as well otherwise they can not vote for something to be executed for the multisig account.
If the multisig is funded but the signatories are not, then the multisig is unusable and the chain is potentially bricked. The chain-spec's example will work fine, but I think it is worth adding some bold warnings for anyone wanting to do this.


Infer that left-hand side of claim is defined

Given a claim,
φ → ψ

we should immediately (at start-up) infer that ⌈φ⌉, that is,
φ ∧ ⌈φ⌉ → ψ

because the other possibility ¬⌈φ⌉ trivially satisfies the implication.
Attn: @yzhang90

I am re-opening this issue because we would like to make sure that the definedness SideCondition is used while evaluating functions.

Fixed in #1950


added a disableTLS Boolean flag

now you can use the optional attribute "disabletls" with true or false,
this is useful for dev environments that does not have a valid certificate.

I don't want to add this insecure flag to this provider.
Something that is acceptable is some fields to configure the root_ca to allow running with selfsigned certs, like discussed in #32


Condition base email

Hi,
I want to send email if there is exception. for that, I have write below setting in web.config file.
On CS side, I am creating event "EmailBody" and fill it when there is execution in CS code otherwise it's empty.
Here, I am trying if "EmailBody" is empty then no need to send email so, used condition tag. mentiond above.
How to check "${event-context:item=EmailBody}" is null?

Web.Config

<target xsi:type="Mail"
  name="Email"
  html="true"
  addNewLines="false"
  replaceNewlineWithBrTagInHtml="false"
  subject="Error Log"
<EMAIL_ADDRESS>  useSystemNetMailSettings="true"
  body="${event-context:item=EmailBody}" />

Below rules,
<rules>
        <logger name="*" minlevel="trace" writeTo="oracle" />
        <logger name="*" minlevel="trace" writeTo="file" />
        <logger name="*" minlevel="Debug" writeTo="Email">
        <filters>
               <when condition="length('${event-context:item=EmailBody}) > 0" action="Ignore" />
        </filters>
      </logger>
</rules>

CS CODE

public static void ErrorLog(NLogData nLogData)
{
      LogEventInfo theEvent = new LogEventInfo(LogLevel.Error, NLogManager._logger.Name, nLogData.Message);
      SetLogEventInfo(theEvent, nLogData);
      _logger.Log(theEvent);
}

function "SetLogEventInfo" contain below line.
theEvent.Properties["EmailBody"] = string.IsNullOrEmpty(nLogData.EmailBody) ? string.Empty : nLogData.EmailBody;
Suggection most welcome, any other alternative way to send email via nlog with current setup.
Let me know if you require more information.

shouldn't it be (==0)?
<when condition="length('${event-context:item=EmailBody}) == 0" action="Ignore" />

?
Ps you could create multiline code blocks with a triple backtrick. I've edited (partly) your post

@304NotModified Thanks for quick replay.. let me check your suggection.

Sorry its's not working. I have attached my code. might be help us.
Configration

EmailBody with html string

No EmailBody

at least there is something wrong with the quotes (also in my answer)
update:
 <when condition="length(${event-context:item=EmailBody}) == 0" action="Ignore" />

also please check the internal log on trace level: https://github.com/NLog/NLog/wiki/Internal-logging

see docs here https://github.com/NLog/NLog/wiki/Filtering-log-messages
I think it should be this: (quotes are required)

@304NotModified Thanks it's working

OK glad it has been resolved!


Merge with OS source

The most notable change is the removal of the unique_hglobal& constructor in unique_hglobal_locked (needed for a build break; the definition guards don't match up for the two - it's easy enough to work around by just calling .get())

Oh, right. Fixes #91


Support discovery of datalad datasets on dataverse

Sample dataset on demo node, in non-exported (key store) flavor of the special remote:

https://demo.dataverse.org/dataset.xhtml?persistentId=doi:10.70122/FK2/2ZPHY7

so it seems we need to search for datasets which have a file like XDLRA-2D--2D-refs, probably just starting with XDLRA- and ending with -refs.
JSON file which lists all current dataverse deployments (if we are greedy to search through all of them):

https://github.com/IQSS/dataverse-installations/blob/main/data/data.json

For now we could just go through https://demo.dataverse.org/ and https://dataverse.harvard.edu as "groups" (like organization for github) and not care about any other.
The search API example invocation to search for that exact filename (for now):

for "keystore" types: https://{hostname}/api/search?q=fileName:%22XDLRA-2D--2D-refs%22
for "exporttree" types: https://{hostname}/api/search?q=fileName:%22repo.zip%22  (ideally for full path which would include foder _.datalad/dotgit/ but it seems not work).

in the returned record we get
"dataset_name": "Alt",
"dataset_id": "2349618",
"dataset_persistent_id": "doi:10.70122/FK2/BUOCCS",

The "things" to record would be the

hostname
dataset_persistent_id

per each dataset.  Hyperlink for a dataset would be constructed as https://{hostname}/dataset.xhtml?persistentId=doi:{dataset_persistent_id}.
note:  for those URLs to become clonable, first datalad should be configured to load dataverse and next extensions via changes to ~/.gitconfig
[datalad "extensions"]
	load = next
	load = dataverse

Right, as we discussed at the Distribits hackathon, now that @yarikoptic has a published dataset in Harvard Dataverse that came from DataLad we can find it with this query:
https://dataverse.harvard.edu/api/search?q=fileName:"repo.zip"
Here's how the search result looks:
{
  "status": "OK",
  "data": {
    "q": "fileName:\"repo.zip\"",
    "total_count": 1,
    "start": 0,
    "spelling_alternatives": {},
    "items": [
      {
        "name": "repo.zip",
        "type": "file",
        "url": "https://dataverse.harvard.edu/api/access/datafile/10069635",
        "file_id": "10069635",
        "description": "",
        "published_at": "2024-04-08T11:44:45Z",
        "file_type": "Unknown",
        "file_content_type": "application/octet-stream",
        "size_in_bytes": 155736,
        "md5": "b83bbf83371526579887b5879c3dce1f",
        "checksum": {
          "type": "MD5",
          "value": "b83bbf83371526579887b5879c3dce1f"
        },
        "dataset_name": "OpenNeuro:ds000003 Rhyme judgment (trimmed)",
        "dataset_id": "10069469",
        "dataset_persistent_id": "doi:10.7910/DVN/VMSH8U",
        "dataset_citation": "Halchenko, Yaroslav, 2024, \"OpenNeuro:ds000003 Rhyme judgment (trimmed)\", https://doi.org/10.7910/DVN/VMSH8U, Harvard Dataverse, V1"
      }
    ],
    "count_in_response": 1
  }
}

As mentioned above, the dataset-level fields to focus on are these:
"dataset_name": "OpenNeuro:ds000003 Rhyme judgment (trimmed)",
"dataset_id": "10069469",
"dataset_persistent_id": "doi:10.7910/DVN/VMSH8U",
"dataset_citation": "Halchenko, Yaroslav, 2024, \"OpenNeuro:ds000003 Rhyme judgment (trimmed)\", https://doi.org/10.7910/DVN/VMSH8U, Harvard Dataverse, V1"

https://doi.org/10.7910/DVN/VMSH8U will resolve and redirect to the dataset at https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/VMSH8U
@yarikoptic and I talked about different ways to identify DataLad datasets. This "search for repo.zip" approach seems promising but could probably be refined. It's a good start!

I think we are now doomed to wait (hopefully just a little) for @joeyh to (re)implement support for "git remotes in git-annex special remotes" natively in git-annex -- that is the design project he worked on with @mih during distribits hackathon.


Tokenless files access

User A:
ALLOWED_BOT_IDS = 'botid1,botid2,botid3'

Can access files like hostUrl/files/botid:token/documents/file_0.txt

User B:
ALLOWED_BOT_IDS = 'botid1:bottoken1,botid2:bottoken2,botid3:bottoken3'

Can access files like hostUrl/files/botid/documents/file_0.txt, or
Can access files like hostUrl/files/botid:token/documents/file_0.txt (priority would be given to this token instead of in config vars)
Token part can be fetched from ALLOWED_BOT_IDS

Other info

API would still require id and token both for all the users (no matter what's in the ALLOWED_BOT_IDS)
Restrictions for public bots is still based on the bot-ids.

This PR is ready to be merged

Thus PR is ready to merge.