Problem using 4-byte floats with EnsembleSampler

General information

emcee version: 3.14
platform: Ubuntu Linux, Python 3.11.5
installation method: pip

Problem description
For context, the reason I'm doing this at all is because I wanted to benchmark some code that uses a GPU likelihood function, in vectorized mode, to see if it gives a performance boost. 4-byte floats are better-supported on GPUs, and they tend to perform better.
Expected behavior
When the input state is given as a NumPy ndarray with dtype np.float32 (rather than the usual default np.float64), the parameters passed to the likelihood function on each iteration should also be 4-byte floats.
Actual behavior
On the first call to the likelihood function, everything is as expected: the input parameter array has the same dtype as the initial parameters passed to run_mcmc. On the second call, however, the parameter array has a different size (half the original on the zeroth axis) and the dtype is np.float64.
What I have tried so far
Inspired by the test for quad precision in the repo, I tried using a Backend(dtype=np.float32), but that doesn't seem to make any difference. I also looked for instances of explicit dtype=np.float64 in the codebase, but it rarely appears, and my quick attempt at a fix in the WalkMove class also didn't change the observed behavior.
Minimal example
import emcee
import numpy as np

sigma = 1.

def lhood(p):
    if p.dtype != np.float32:
        print(p.dtype, p.shape)
        raise ValueError
    return -0.5 * np.sum(p**2, axis=1) / sigma**2

nwalkers, ndim = 16, 4
sampler = emcee.EnsembleSampler(nwalkers, ndim, lhood, vectorize=True)
p0 = np.random.randn(nwalkers, ndim).astype(np.float32)
sampler.run_mcmc(p0, 100)

This will print, before raising a ValueError: np.float64 (8, 4). Same total array size, but reinterpreted as a different data type.

Thanks! I expect that what's happening here is that all the calls to numpy.random are producing float64 arrays which can be upcast to float128, but won't be downcast to float32. This means that every time a proposal is made, the coordinates will end up being cast to the higher precision. It would take some work to be explicit about the random dtype throughout the whole code base, so I'm not sure there's much I'd want to change about emcee's operation here. For your use case, would it be sufficient to just downcast the dtype at the top of lhood before evaluating your model on the GPU?

Okay, having fiddled with this a little more, I found a very simple fix, at least in the case of the Goodman & Weare WalkMove class. I had misunderstood why the shape was different after the first call to the likelihood function -- I wrongly assumed that the data had been reinterpreted to an array half the size with np.float64 elements, when the size change is actually just because of how RedBlueMove fundamentally works. Realizing that, I was able to modify my MWE to the following, which runs without error. (I realize downcasting was an option, too, but, for a performance-critical application, you'd prefer to eliminate the typecast and work with shallow copies when possible.)
import emcee
import numpy as np

sigma = 1.

def lhood(p):
    assert p.dtype == np.float32
    return -0.5 * np.sum(p**2, axis=1) / sigma**2

nwalkers, ndim = 16, 4

class MyWalkMove(emcee.moves.WalkMove):

    def get_proposal(self, s, c, random):
        c = np.concatenate(c, axis=0)
        Ns, Nc = len(s), len(c)
        ndim = s.shape[1]
        q = np.empty_like(s)   # <-- changed here
        s0 = Nc if self.s is None else self.s
        for i in range(Ns):
            inds = random.choice(Nc, s0, replace=False)
            cov = np.atleast_2d(np.cov(c[inds], rowvar=0))
            q[i] = random.multivariate_normal(s[i], cov)
        return q, np.zeros(Ns)

sampler = emcee.EnsembleSampler(nwalkers, ndim, lhood,
    vectorize=True, moves=MyWalkMove())
p0 = np.random.randn(nwalkers, ndim).astype(np.float32)
sampler.run_mcmc(p0, 100)

I don't think this breaks anything else in the code, though I haven't run any other tests. Happy to make it a pull request if you prefer, though it's literally a one-line fix.

Oh nice! Please do open a PR with that change. One liners are the best! :D Thanks.

Addressed (for two move types, at least) by PR #484.


post firmware update

I believe i have successfully updated the firmware on my RK1 using a USB, it flashed yellow for a while and then went to blue-green.
When i start FxBlox again it goes green blue white, green blue white, over and over, i don't see it turn off, or show red... or get to the blinking blue cyan as Wade shows. ( i am using MAC OS ) and will be using iPhone.
I have made a lot of progress in the past, but erased, removed started over?

Hi Kate! I believe I've had this issue before, @ehsan6sha hadn't confirmed with me the new light sequences when a bad power supply is used, but please make sure you are using a 25W PD2 or PD3 compatible power adapter.

Hi @kitty2121! I believe I've had this issue before, @ehsan6sha hadn't confirmed with me the new light sequences when a bad power supply is used, but please make sure you are using a 25W PD2 or PD3 compatible power adapter.


re initialize or destroy?

Using globe with vue. I have a route called globe that inits the globe on create.
when I change route and go back to globe route the globe re initializes and re adds scripts to my header.
Is there a way to re initialize an already created globe? or a way to destroy globe?
Or if there a specific way to handle this in vue?

the issue seems to be for requesting tile layers. once the globe container gets destroyed the tile layer still keeps calling for layers with broken url's. Is there a way to stop tile layer?

Hi, did you figure this out? Having same problem with tile layers.


GenerateCommand.java:26: implements generation of...

The puzzle 1-6101b0fb from #1 has to be resolved:
https://github.com/Madzi/sdkman-for-toolchains/blob/0101d9ae4770095f19d763b9ff8400402c66ebd9/src/main/java/madzi/toolchains/command/GenerateCommand.java#L26-L26
The puzzle was created by @Madzi on 05-Oct-22.
role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

The puzzle 1-6101b0fb has disappeared from the source code, that's why I closed this issue.

@0pdd the puzzle #7 is still not solved.

@0pdd the only puzzle #7 is solved here.


Alignment between spatial representations

We are currently not guaranteed to create and plot different spatial representations in the same orientation - meaning, for example, that computing and plotting a spatially binned firing rate map could end up in a flipped orientation as compared to plotting the raw position data.
ToDo:

step through the procedures here, to see where there are possible issues
make updates and or at least add options and flags, to make this consistent

Targets:

key steps to check here are compute_spatial_bin_assignment and plot_heatmap

note that plot_heatmap (using imshow) plots the data in a different orientation than standard plots (this could be it)

Done in #108


Title vars

Add references to "elementary" in page titles to fix #302

I think maybe "elementary" should always go at the end. If the tabs are not very wide you could end up with several tabs that just say "elementary" instead of "code of conduct" or other useful titles.

Alright, doing Title ⋅ elementary when it doesn't naturally come at the end, as we discussed in Slack.

Updated @danrabbit


Close LGVISIUM-63: Extraction of the groundwater logo using computer vision

Addition of template matching to the code. This should make it possible to find groundwater information without the respective keywords.
In this PR, I also tried to remove the keywords that were not used and to remove them if needed. Furthermore, I added a list of FP keywords. This list contains keywords that were leading to false positives in the detections.

I addressed the comments you raised @stijnvermeeren-swisstopo . Thank you very much for the review. I added the possibility of running the template matching on demand by editing the environment variable IS_SEARCHING_GROUNDWATER_ILLUSTRATION.
Even when not running the template matching, the metrics were improved:

main branch was run: vaunted-mink-342

@stijnvermeeren-swisstopo I do believe I implemented all the changes we discussed today. Main change, the template matching is now in an independent and separate file.

@stijnvermeeren-swisstopo thank you for your review. I add the groundwater_illustration_matching to the toml installation script.


Add Aqua.jl to test suite

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1074

Relevant Lines:
1180

💛  - Coveralls


Calorie Counter: Teach the for...of loop

Describe the Issue
The standard for loop was taught in the RPG challenge.
For this challenge, I would suggest replacing the standard for loop with a for...of loop. The for...of loop is less error-prone and lets you name your element. It is a cleaner solution to the required loops as the index isn't needed for anything other than the element access.
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-form-validation-by-building-a-calorie-counter/step-56
Your code
  for (const listItem of list) {
    const currVal = cleanInputString(listItem.value);
    const invalidInputMatch = isInvalidInput(currVal);

    if (invalidInputMatch) {
      alert(`Invalid Input: ${invalidInputMatch[0]}`);
      isError = true;
      return null;
    }
    calories += Number(currVal);
  }

  for (const container of inputContainers) {
    container.innerHTML = "";
  }

Expected behavior
Teach the for...of loop, the sooner the better.
Screenshots
No response
System

Device: [e.g. iPhone 6, Laptop]
OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
Browser: [e.g. Chrome, Safari]
Version: [e.g. 22]

Additional context
No response

yeah, that makes sense to me.
I am actually not sure when we teach the for...of loop. It might be one of the later projects 🤔
But it would be good to introduce it here.

Personally, I am happy with either approaches, provided both are taught. That said, a search through the new curriculum yields no result for a lesson teaching for...of. It is used/required in learn-intermediate-algorithmic-thinking-by-building-a-dice-game.
So, I suggest we teach it here.

It looks like the description text would be needed to be changed in the following places as well as the tests.
But anything thoughts, on the updated text before we open this up for contribution?
update  Step 56 description
# --description--

The `list` parameter is going to be the result of a query selector, which will return a `NodeList`. A `NodeList` is an array-like which contains the elements that match the query selector.

You'll need to loop through these elements, and you can use a <dfn>for...of</dfn> loop to do this. The `for...of` loop, is used to iterate over elements in an iterable object like an array. The variable declared in the loop represents the current element being iterated over.

updated step 57 description
# --description--

The `NodeList` values you will pass to `list` will consist of `input` elements. So you will want to look at the `value` attribute of each element.

Assign `item.value` to a `const` variable called `currVal`.

updated step 58 description
# --description--

Remember that you wrote a function earlier to clean the user's input? You'll need to use that function here.

Update your `currVal` declaration to be the result of calling `cleanInputString` with `item.value`.

updated step 90 description
# --description--

It is time for another loop. Use a `for...of` loop to iterate through the `inputContainers` array. For the loop's variable name call it `container`.

Inside the loop, set the `innerHTML` property of the `container` to an empty string. This will clear all of the contents of that input container.

@jdwilkin4 Wording looks good, but I would add an example to step 56:
for (const element of elementArray) {
  console.log(element);
}

Ok cool.  I updated my post to include the example. We can open this up for help wanted contribution 👍

Can I handle this task? I'm ready to work on it.

HI @aaqib605 !
We typically do not assign issues to anyone other than long-time contributors. This issue is open to anyone interested in working on it.
If you would like to contribute and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum

Can I handle this task? I'm ready to work on it.

Hi @aaqib605 👋🏽
Glad you've indicated your interest in working on this. As Jessica said, the docs contain everything you need to contribute to the codebase.
If anything confuses you, I'm here to help.

@Ksound22 @jdwilkin4 Thank you! I'll make sure to refer to the documentation, and I'll reach out if I need any help.
Excited to contribute!


bug: cairo-fmt fails to correctly format destructuring structs.

Bug Report
Cairo version:
2.2.0
Current behavior:
Destructuring structs is currently formatted as such:
let SomeStruct{a,
b,
c,
.. } =
    thestruct();

While this is a little funny, it's also quite broken.
Expected behavior:
I would expect something saner, at least more like
let SomeStruct{
    a,
    b,
    c,
    ..
} = thestruct();

fixed on main.


kline won't work for Stock_mix with different date index

known issue.

API can also be a reason, there can be missing date in certain stock_data.
To be figured out.

API can also be a reason, there can be missing date in certain stock_data.
To be figured out.

API can also be a reason, there can be missing date in certain stock_data.
To be figured out.

can be reproduced on m20 Stock_mix

API can also be a reason, there can be missing date in certain stock_data.
To be figured out.

can be reproduced on m20 Stock_mix

Figured out, it can be related to #23


Fixed a couple of minor typos

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@yagupta Please review these proposed contributions. Thanks.

#sign-off @jomolnar what is the difference between this repro and the azure-docs.pr repo ?

@yagupta External users can provide updates to docs in azure-docs. All pull requests must be reviewed by authors, no requests are merged automatically, and there's no validation. Authors cannot update their own content in azure-docs. Azure-docs-pr has auto-merge and validation. Azure-docs is designed as a vehicle for external users to help us improve and correct content.


crash: csv (or any other) output style possible ?

thanks

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/23021743-crash-csv-or-any-other-output-style-possible?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github).

Please take a look here: https://crate.io/docs/projects/crash/en/0.13.0/formats.html it is shipped with crate since 0.49.0

@mfelsche but this brings me to the question: where do i get notified about such (great) updates ?
is there anywhere a details changelog ? i am really missing this, since i had some very terrible bugs in the past, its important for me to get notified about important changes... or improvements like "format" at crash....


[QUERY] Migrating from .NET Core 3.1 to .NET 6, Functions v3 to v4, RenewLockAsync indicates "The supplied lock is invalid"

Library name and version
Azure.Messaging.ServiceBus 7.5.1
Query/Question
I might be missing something here as to how you cross migrate a "receiver" but the rest of the code appears to work up to this, where it always seems to fail to renew the message lock.
Looked at documentation regarding setting for host/startup options for MaxAutoLockRenewalDuration, but the documentation indicates that it is for batch message receivers (these handle one at a time), and should be set higher than the lock duration, where as we previously had to rely on a keep alive strategy because max lock duration setting we could achieve was a 5 minute lock, where as we can have functions that run atomic DB operations that can take over 15 minutes, so we have a task running to just ping the server to say "yeah, we're still working on it"
Appears to happen locally as well as in deployed to Azure (both communicate with the ServiceBus backing Queue in Azure)
3.1 / Microsoft Azure
        [FunctionName(FUNCTION_NAME)]
        public async Task Run(
            [ServiceBusTrigger(TOPIC_NAME, SUBSCRIPTION_NAME, Connection = SB_CONN_STR)]
            string mySbMsg,
            MessageReceiver messageReceiver,
            string lockToken)
        {

Renew
protected void SetupAutoLockRenewal(MessageReceiver messageReceiver, string lockToken)
{
    await messageReceiver.RenewLockAsync(lockToken).ConfigureAwait(false);
}

6 / Azure Messaging
Function
        [FunctionName(FUNCTION_NAME)]
        public async Task Run(
            [ServiceBusTrigger(TOPIC_NAME, SUBSCRIPTION_NAME, Connection = SB_CONN_STR)]
            ServiceBusReceivedMessage mySbMsg,
            ServiceBusMessageActions messageActions)
        {

Renew
protected void SetupAutoLockRenewal(ServiceBusReceivedMessage msg)
{
    var options = new ServiceBusClientOptions { TransportType = ServiceBusTransportType.AmqpWebSockets };
    await using var serviceBusReceiver = new ServiceBusClient(serviceBusConnectionString, options)
        .CreateReceiver(topic, subscription);
    await serviceBusReceiver.RenewMessageLockAsync(msg).ConfigureAwait(false);
}

Thrown Exception
 Azure.Messaging.ServiceBus.ServiceBusException
  HResult=0x80131500
  Message=The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. For more information please see https://aka.ms/ServiceBusExceptions . Reference:e486c410-a481-4804-af48-9073cce3c8ac, TrackingId:d4d5cdee-2f0a-4866-9275-b351bb7efa6f_B32, SystemTracker:*:Topic:*.func.import, Timestamp:2022-02-01T20:16:33 (MessageLockLost)
  Source=Azure.Messaging.ServiceBus
  StackTrace:
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.<RenewMessageLockInternalAsync>d__58.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.<>c.<<RenewMessageLockAsync>b__57_0>d.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.<RunOperation>d__21`2.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.<RunOperation>d__21`2.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult()
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.<RenewMessageLockAsync>d__57.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Azure.Messaging.ServiceBus.ServiceBusReceiver.<RenewMessageLockAsync>d__62.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Azure.Messaging.ServiceBus.ServiceBusReceiver.<RenewMessageLockAsync>d__61.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

Environment
Azure Function App
Visual Studio 2022

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

I'm not certain what the failure point is here, exactly, as we have evidence (still working on reproduction) that the message was unlocked and returned to the queue and picked up by another trigger instance which caused something to break.

It looks like you are trying to create a new client and a new receiver to renew the message lock, which won't work. We will be adding the ability to renew the message lock from the actions in an upcoming release.
https://github.com/Azure/azure-sdk-for-net/issues/26402

@JoshLove-msft Noted, but is there a mitigation strategy?  I was pointed to the setting mentioned above which does not sound like it does what is needed based on the documentation, both suggesting batch message handling and wanting it to be set higher than the lock duration.

@JoshLove-msft I've tried using the option to set the MaxAutoLockRenewalDuration and remove the manual method and I stll sometimes see this error, and there is evidence that the messages are being consumed multiple times instead of being retained.

It appears to be coming from
await messageActions.DeadLetterMessageAsync(msg, props).ConfigureAwait(false);
in our error handler

As stated in the docs, MaxAutoLockRenewalDuration doesn't apply

The primary page for host.json states

This only applies for functions that receive a batch of messages.

Our functions consume one message per triggered instance, and the topic / queue receives singular messages. Not certain what is or is not a batch in this context.

This is backwards - the setting applies only to functions that receive a single message, as noted in the ref docs - https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Config/ServiceBusOptions.cs#L75. I will get the host.json doc updated. Thanks for pointing this out.

It appears to be coming from await messageActions.DeadLetterMessageAsync(msg, props).ConfigureAwait(false); in our error handler
@JoshLove-msft The specific case this was just observed at is the exact case that we are trying to solve with the manual unlocking that the suggested fix does not appear to address.

Service Bus has message added
Function consumes message
Function calls SQL
SQL times out
Error handler catches timeout exception
Error handler attempts to deadletter the message
Deadletter is rejected due to lock expiration

And now the message is retried instead of put into our deadletter handler.

Since your function only accepts a single message, using the MaxAutoLockRenewalDuration should work. Are you seeing the error occur before this amount of time has elapsed?

I'm going to be taken away from this upgrade to work on bugs, so I can't
verify, but since it's a SQL call timeout, I'm assuming.
It's possible there are missing settings changes we need to implement,
because what we have now was the solution to long running SQL (not even
timeouts) over running the lock, and losing it.
I have the auto lock set to 1 minute, and I know the SQL timeout isn't that
short.
On Tue, Feb 1, 2022, 11:42 PM JoshLove-msft @.***>
wrote:

It appears to be coming from await
messageActions.DeadLetterMessageAsync(msg, props).ConfigureAwait(false);
in our error handler
@JoshLove-msft https://github.com/JoshLove-msft The specific case this
was just observed at is the exact case that we are trying to solve with the
manual unlocking that the suggested fix does not appear to address.

Service Bus has message added
Function consumes message
Function calls SQL
SQL times out
Error handler catches timeout exception
Error handler attempts to deadletter the message
Deadletter is rejected due to lock expiration

And now the message is retried instead of put into our deadletter handler.
Since your function only accepts a single message, using the
MaxAutoLockRenewalDuration should work. Are you seeing the error occur
before this amount of time has elapsed?
—
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-sdk-for-net/issues/26733#issuecomment-1027571890,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYR7GYG5JJZRFYGJ2QYHN3UZCY2LANCNFSM5NKH3SWQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

I have the auto lock set to 1 minute, and I know the SQL timeout isn't that
short.

If the timeout is longer, can you try setting the MaxAutoLockRenewalDuration to a larger value?

@JoshLove-msft I'll give this a try when I can, but am I intuiting correctly that the behavior of this setting is that "if this is set, automatically renew lock, and do so up until this duration" rather than it being an instruction of how often to auto renew?
I'm not sure if we determined there was any specific value to having a shorter renew period at this point (two years ago decision that went untouched afterward)

Okay, I assumed so and bumped it way up, coworker said he was going to try
to test it while I'm on stuff.
Is there any issue with having it set arbitrarily high?
On Wed, Feb 2, 2022, 12:57 PM JoshLove-msft @.***>
wrote:

@JoshLove-msft https://github.com/JoshLove-msft I'll give this a try
when I can, but am I intuiting correctly that the behavior of this setting
is that "if this is set, automatically renew lock, and do so up until this
duration" rather than it being an instruction of how often to auto renew?
Yes, the lock will be renewed up until that time.
—
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-sdk-for-net/issues/26733#issuecomment-1028204310,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYR7GZXHA73QB7MPXKTYSTUZFV7JANCNFSM5NKH3SWQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

The main risk with having it be arbitrarily high is that depending on your function's dependencies and how it is implemented, you could end having the message be locked for an arbitrarily long time, if some downstream dependency is taking an arbitrarily long time. If you have other consumers of the queue, they would not be able to process the message. If you don't have other consumers, then I don't think there would be much downside to setting it this way, as the lock renewal will stop once your function returns control.

Okay, cool, we will proceed with the understanding that this should solve
the problem.
Our function executions are largely atomic, so they need to handle their
own failure and not time out, so that seems like we would have no negative
interactions
On Wed, Feb 2, 2022, 1:11 PM JoshLove-msft @.***> wrote:

The main risk with having it be arbitrarily high is that depending on your
function's dependencies and how it is implemented, you could end having the
message be locked for an arbitrarily long time, if some downstream
dependency is taking an arbitrarily long time. If you have other consumers
of the queue, they would not be able to process the message. If you don't
have other consumers, then I don't think there would be much downside to
setting it this way, as the lock renewal will stop once your function
returns control.
—
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-sdk-for-net/issues/26733#issuecomment-1028216346,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYR7GZCDLQVH3ZVTAUJID3UZFXTPANCNFSM5NKH3SWQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

I am not certain how to isolate it, but it appears the locks are not being
honored.
One long running consumer has been shown to trigger a second instance of
the function, which is causing it to do duplicate work over top of itself
and fail.
Is there any way to debug this or any other steps to check?
I can solve this with good ol fashion elcode grease, but I feel like it
isn't working not that it needs fixing
On Wed, Feb 2, 2022, 1:56 PM Jeffrey Miller @.***> wrote:

Okay, cool, we will proceed with the understanding that this should solve
the problem.
Our function executions are largely atomic, so they need to handle their
own failure and not time out, so that seems like we would have no negative
interactions
On Wed, Feb 2, 2022, 1:11 PM JoshLove-msft @.***>
wrote:

The main risk with having it be arbitrarily high is that depending on
your function's dependencies and how it is implemented, you could end
having the message be locked for an arbitrarily long time, if some
downstream dependency is taking an arbitrarily long time. If you have other
consumers of the queue, they would not be able to process the message. If
you don't have other consumers, then I don't think there would be much
downside to setting it this way, as the lock renewal will stop once your
function returns control.
—
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-sdk-for-net/issues/26733#issuecomment-1028216346,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYR7GZCDLQVH3ZVTAUJID3UZFXTPANCNFSM5NKH3SWQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

@JoshLove-msft  This is a bit concerning.  In continuing testing by killing the duplicate function calls, I've gotten it to "keep going" but then this:
The function runs for 30 minutes and fails
[2022-02-03T00:42:45.220Z] Timeout value of 00:30:00 exceeded by function '*' (Id: '2c5ac0d3-dc9d-42f0-8f16-57999773da27'). Initiating cancellation.
Now, I am assuming I can increase this timeout value by some mechanism, but the problem is that this failure kills the entire debug instance (which is a web project + 2 function projections).  This is unrelated to the issue presented (so can spin off into anything else), but it seems like an extreme and ungraceful exception, and does not appear to allow for any handling to be done on part of the code.

Looking around for settings, it appears that a Topic Subscription's Max Lock Duration setting is capped at 5 minutes.
My coworker who did a bulk of the work fiddling with the functions before says that this setting stands for the maximum amount of times a message lock will stand before renewing, but we were using manual renewal to manage this.
How do we even investigate the "automatic behavior" before reporting any kind of bug?  Presentationally, it currently seems that the auto locking behavior specified by MaxAutoLockRenewalDuration either does not do anything, requires a paired setting to be abled, or ceases to auto renew as of the normal lock duration.

For a conventional client https://stackoverflow.com/questions/63585687/azure-service-bus-how-to-renew-lock/67837282#67837282 shows the inclusion of an async lambda, no idea if it is significant in any way, but I don't know that there's an analog here.
processor.ProcessMessageAsync += async arg =>
{
    //process your message
    await Task.Delay(Timeout.Infinite);
};

This auto lock renewal stuff is super fishy.  All the similar SO posts related to it are basically "it doesn't work" "oh wait okay it works now" with no known changes.  It was still happening today but then it seems to have stopped happening with no code changes to cause it to happen.
This unreliableness is extremely concerning.

One long running consumer has been shown to trigger a second instance of
the function, which is causing it to do duplicate work over top of itself
and fail.

Can you clarify what you mean here? Are you saying that the function is being triggered with the same message that you thought was already locked in another invocation? Do the messages have the same sequenceNumber?

Looking around for settings, it appears that a Topic Subscription's Max Lock Duration setting is capped at 5 minutes.

This is the max lock duration without any lock renewal. You can keep renewing the lock for as long as you'd like.

For a conventional client https://stackoverflow.com/questions/63585687/azure-service-bus-how-to-renew-lock/67837282#67837282 shows the inclusion of an async lambda, no idea if it is significant in any way, but I don't know that there's an analog here.
processor.ProcessMessageAsync += async arg =>
{
    //process your message
    await Task.Delay(Timeout.Infinite);
};

I think the post is just highlighting that you can set the max auto lock renewal duration to infinite, and providing this message handler is a way to verify that it is working. You wouldn't want to have this in your message handler in practice, but rather whatever your processing logic is.

One long running consumer has been shown to trigger a second instance of
the function, which is causing it to do duplicate work over top of itself
and fail.

Can you clarify what you mean here? Are you saying that the function is being triggered with the same message that you thought was already locked in another invocation? Do the messages have the same sequenceNumber?

I am debugging and testing with exactly one message through a pipeline of consumers that should basically hand off work as they complete it, and nothing else should happen.
After multiple failed debug sessions, I've put breakpoints at the start of the Run function so that I can be absolutely sure when things are triggered, and the function will trigger a second time while the first one is running.  I have not interrogated the messages for their own information, but they contain the same internal GUID we use, which implies either A) the message was generated twice (this has been verified as false in Azure for the subscription, it is shown to contain only one message) or B) that it is the same message.

As of somewhere around 1-2 PM EST, it seems to suddenly be working, and I'm only getting a duplicate trigger instance at basically the exact moment of function timeout (which is acceptable.
However, since this behavior has been implicitly observed in the deployed testing environment (errors produced that only happen when automatic lock renewal fails) it's going to be hard to sign off on that the upgrade to .NET 6 is stable.

host.json
functionTimeout setting set to -1 does not appear to work, still getting the default behavior of 30 minutes.
Is there some issue with the consumption of these settings to that there are cached values that are overwriting the programmatic/configuration settings that lead to these strange behaviors?

Continued oddities:
I added in a log for elapsed time to execute every 10 seconds so that I'd be able to better observe what was happening.
despite having an hour long timeout set in host.json, we're still seeing 30 second default being used...
But the function was only running for 21 minutes when the entire function host was violently terminated due to the Console App throwing its own unhandle-able exception outside of my code (as mentioned above).

Would you be able to share your host.json file (omitting any potentially sensitive information)?

@JoshLove-msft
This is as is, nothing to redact
{
  "functionTimeout": "01:00:00",
  "version": "2.0",
  "logging": {
    "logLevel": {
      "Azure.Messaging.ServiceBus": "Warning",
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Warning"
    }
  }
}

I'm being told by a coworker that the host.json setting hasn't ever worked and that the local.setting.json has to have the proprety
AzureFunctionsJobHost__functionTimeout

Okay, so, upside, whatever issues were being caused in either case regarding the auto lock appear to have all shaken out.  I'm not sure if there's anything to even look into for the team, but it is very suspicious that anyone that seems to have problems with the auto locking observes it, then it eventually resolves itself.
It is a bugbear of a problem because there's no way to really report it other than as described, and unless there's just glaringly obvious code that could cause it to happen, I cannot imagine trying to trace it down, as anyone trying to help anyone with the problem cannot reproduce it.


Lazy versus eager reflection

One concern still remaining with the current refactoring model is the assumption that [[ModuleSourceObject]] is pre-populated by the module system onto the module record.
My concern here is that this object is a JS object not an internal specification object so would require the JS host to create both a JS object and internal host object representation for every single module loaded.
We could possibly:

Explicitly note that [[ModuleSourceObject]] should not have any observable initialization since it is an ambient object, and therefore that internal optimizations could lazily create it
Have [[ModuleSourceObject]] can be populated by a HostEnsureReflection hook or similar.

This also brings up some questions about realms as well - as a JS object, this object will be specific to the realm, but I suppose that is true of the abstract module record itself. I'm still not clear on how this fits into the cross-realm transfer story though.

The best route for now is likely to add a specification note about observability of [[ModuleSourceObject]] population, to ensure that there is no observability and that hosts may optimize as necessary.

This has been solved with the new GetModuleSource() abstract method.


filter and format release events

[x] filter each release type
[ ] formatting for each case

#11 use the casewise formatting


lsp: Request textDocument/hover failed on Cyrillic characters

Hi, @a-h
I've encountered a bug in the VS Code extension (latest, v0.0.19).
If you drag the cursor over a string with Cyrillic characters (runes?) in *.templ file, an error pops up:
Request textDocument/hover failed.
Message: rune error
Code: 0

Any text in another language does not cause such trouble.
Look this small screencast to understand:
https://github.com/a-h/templ/assets/11155743/3c1aeaf2-add4-4eab-b493-8bfb8ebc841d
What can I do to prevent this error from appearing? 🤔

I can reproduce it with Chinese too.
Hovering over the Chinese text in var happyBirthday = "生日快乐" causes a "rune error" too.
Since the underlying error is a *jsonrpc2.Error and the message isn't in templ, I figured it must be deeper in the stack and tracked it to gopls: https://cs.opensource.google/go/x/tools/+/master:gopls/internal/golang/hover.go;drc=c3f60b7871c6c0f1f49094d63dcf73622a1d1ea0;l=630
From what I can see so far, it looks like our RangeWriter is using UTF8 positions, when the LSP expects "somewhat" UTF16 positions. Since we're using UTF8 positions, we have 3 bytes per rune, which means gopls starts grabbing weird slices of bytes and doesn't like it.
I think the RangeWriter is writing the "end" of its byte sequence position, rather than the start of its position, or something like that.

In Neovim, it's possible to enable additional logging with :lua vim.lsp.set_log_level("DEBUG").
With that in place, you can use :LspLog to see what's going on.
My test file is:
package main

var nihao = "你好"

var 你好 = "nihao"

I'm putting the cursor on 你 (ni) on the last line and using gr (go to reference).
Here's the log data:
[DEBUG][2024-04-22 10:48:10] .../lua/vim/lsp.lua:1391	"LSP[gopls]"	"client.request"	2	"textDocument/references"	{  context = {    includeDeclaration = true  },  position = {    character = 5,    line = 4  },  textDocument = {    uri = "file:///home/adrian-hesketh/lsptest/main.go"  }}	<function 1>	1
[DEBUG][2024-04-22 10:48:10] .../vim/lsp/rpc.lua:284	"rpc.send"	{  id = 3,  jsonrpc = "2.0",  method = "textDocument/references",  params = {    context = {      includeDeclaration = true    },    position = {      character = 5,      line = 4    },    textDocument = {      uri = "file:///home/adrian-hesketh/lsptest/main.go"    }  }}
[DEBUG][2024-04-22 10:48:10] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  id = 3,  jsonrpc = "2.0",  result = { {      range = {        ["end"] = {          character = 6,          line = 4        },        start = {          character = 4,          line = 4        }      },      uri = "file:///home/adrian-hesketh/lsptest/main.go"    } }}

The interesting bit is the rpc.send which shows where Neovim thinks my cursor is:
position = {      character = 5,      line = 4    }

The next character along is char 6, on line 4. So gopls is happily using cursor positions, not byte positions. I suspect then, that the RangeWriter needs to stop counting the size of bytes it's written out, and count the number of runes it has output instead.

I think I've resolved this in #712 - care to test out the branch and check that it properly resolves it for you @koddr?


Personal Projects

Personal projects require special handling. Currently many commands work on the assumption that this is an org and make calls as such. Most commands check to see if the current org is set. When the user has selected personal projects, the current org is set to "", hence these checks fail and the user is asked to set their org.
Also need to improve error messages for features that are not available for personal projects.

Maybe this will be something to come back to later but closing to prevent clutter.


cors working on localhost but not on production

Hello.
I'm having a strange issue with cors. My Cors config works fine on localhost but it isn't working on the production. I'm always getting this error.
Failed to load https://my-movie-db-backend-roberto.herokuapp.com/auth/login: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://my-movie-db-roberto.herokuapp.com' is therefore not allowed access. The response had HTTP status code 503. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

This is my cors configuration:
const corsConfig: cors.CorsOptions = {
	origin: ["https://my-movie-db-roberto.herokuapp.com", "http://localhost:3000"],
	credentials: true,
	methods: "GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE"
};

app.use(cors(corsConfig));

// add your routes
<MY-Routes>

// enabling pre-flight
app.options("*", cors(corsConfig));

I have been around this for some time now and I decide that it would be better ask for help, thanks ;-)

@RobertoMSousa Hey. I have the same problem how did you solve it?


Admin URL

I'm trying to setup the admin routing, but I'm running into some issues. In the config/twill.php file I've added this to override the default setup:
return [
/*
|--------------------------------------------------------------------------
| Application Admin URL
|--------------------------------------------------------------------------
|
| This value is the URL of your admin application.
|
 */
'admin_app_url' => env('ADMIN_APP_URL', env('APP_URL').'/admin')

];
The app URL is set to http://nin-twill.loc/ in the .env file. When I try to load the admin section by going to http://nin-twill.loc/admin, I get a NotFoundHttpException error. Am I missing something?

Is there an extra slash getting added between the APP_URL and /admin? I see that the APP_URL ends in a slash.

If not mistaken, you should be using ADMIN_APP_PATH instead (https://github.com/area17/twill/issues/5#issuecomment-403534753)

I've tried following the advice from that issue, but I'm stilling having problems. The ADMIN_APP_URL and ADMIN_APP_PATH were missing from the .env file, so I added them both in, set ADMIN_APP_URL to be the same as the APP_URL (both nin-twill.loc), and set ADMIN_APP_PATH to admin. I removed what I'd added to the config/twill.php file, it's returning an empty array. When I go to nin.twill.loc/admin I get the same error I was getting before. Do I need to add anything to the admin.php routes file? Right now I just have a module that I added called projects: Route::module('projects');

The Laravel welcome page and a route that I added to the web routes file loads without any problems, it's only the admin section that's proving to be tricky.

I got it to work finally by loading nin-twill.loc/admin/login instead of just nin-twill.loc/admin. Yay, I'm excited to start playing around with this CMS. It looks like fun.


Rename generic test trait

Depends on an supercedes #1039

'impl StoresFood for PizzaBox'
is a radically better pattern, using functional verbs.
'impl Box for PizzaBox'
is an object-oriented noun setup like in java. its misleading about what a Trait is

'impl StoresFood for PizzaBox' is a radically better pattern, using functional verbs. 'impl Box for PizzaBox' is an object-oriented noun setup like in java. its misleading about what a Trait is

I 100% agree.


Object state gets out of sync

*** CAN BE CLOSED *** => See comment below
Hi,
I have a tree that starts from many roots. When expanded to the leafs, each intermediate node has only one child. So when a root node is expanded, I wish to expand the entire path to the leaf.
Currently I achieve this by using the nodeExpanded event. Once the event arises, I expand the expanded node its children. See the code snippet and working example on plnkr below.
$('#treeview1').on('nodeExpanded ', function(event, node) {
        if (node.nodes && node.nodes.length > 0) {
            $(this).treeview(true).expandNode(node.nodes, {
                levels: 10,
                silent: true
            });
        }
});

plnkr example
Using the above technique works fine in the jonmiles version, so my guess is that this is the correct way of doing it. The pf version seems to have some state issue. It can be reproduced by doing the following actions in the provided plnkr example:

Expand "Parent 1" => Will expand the entire tree
Collapse "Child1" => Two clicks are needed, since somehow the state says collapsed. (The same applies for the intermediate levels, which causes some strange effects).

So am I using the wrong technique or is there a bug in the lib?
Thanks in advance!
*** EDIT ***
I added expand & collapse all behavior. These buttons work fine during first load but the following scenario also shows issue related to the expanding behavior (and the corresponding state management):

Make sure the plnkr preview window is clean (refresh)
Push "Expand all"-button
Collapse "Child 1"
Push "Expand all"-button

*** EDIT2 ***
I adapted the URL to the one in the develop branch to see if it was fixed there and the behavior is better. But the following reproduction still doesn't work as expected:

Make sure the plnkr preview window is clean (refresh)
Push "Expand all"-button
Collapse "Child 1"
Expand "Child 1"
Collapse "GrandChild 1" => Will require two click

Pretty new to javascript :)...
I didn't had a reference to the actual object, so after retrieve the node reference all was good.
$('#treeview1').on('nodeExpanded ', function(event, node) {
if (node.nodes && node.nodes.length > 0) {
var node2 = $('#treeview1').treeview('findNodes', ['^'+node.nodeId+'$', 'nodeId'])[0];
$(this).treeview(true).expandNode(node2.nodes, {
levels: 10,
silent: true
});
}
});
Same URL as above: plnkr


Outdated developer mode docs

I believe this content is outdated.
I looked but the sections I'm finding in settings don't talk about Sideload anymore. I only see two things:

Update & Security, For developers, has a single Developer Mode toggle, not multiple options.
Apps, Apps & features, Chose where to get apps has a Microsoft Store only option, but I think it's no longer on by default.

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

ID: 54f67548-9361-beab-49f8-7d604651c6a6
Version Independent ID: 6194efed-24aa-74f2-7687-3e368534b74a
Content: Enable your device for development - UWP applications
Content Source: windows-apps-src/get-started/enable-your-device-for-development.md
Product: uwp
Technology: get-started
GitHub Login: @QuinnRadich
Microsoft Alias: quradic

Indeed, these options have been changed in the most recent Windows 10 release. I've updated the alerts on the page, removed an outdated screenshot, and slightly changed the order of contents to reflect this (though the sideloading section is still present, for users who are not on the most recent version).


Add support for new API

Hey @joshcarty,
Google announced a new API for GSC: https://developers.google.com/search/blog/2022/01/url-inspection-api. Do you want to extend your package to support it or do you rather stick to performance reporting only?
Just asking before starting to work on it, because the structure is pretty different :)
Thanks!

Hey @joshcarty:
I don't know if you are interested in the new functionality I've mentioned some months ago or if you have time at the moment. I think it could enhance your library, though.
I've started to look into the logic, and with a simple new class , we could extract the information we need:
class IndexInspect:
  def get(self,urls):
    results = []
    for url in urls:
      request = {
          'siteUrl': domain,
          'inspectionUrl': url
      }
      results.append(account.service.urlInspection().index().inspect(body=request).execute())

    return results

In its current state, the code would output the following, but the idea is obviously to add a to_dataframe() method, as you did for the query class.

Should I make a PR adding this new class (and other relevant code) to allow you library to handle this new API functionality?

Thanks for this @antoineeripret - I'll review your PR this week!


NullPointerException in CacheStore with store-type=memory (DITA OT 3.6)

I have an XSLT stylesheet which tries to read a resource using the document() method without sending a context item, like:
 <xsl:variable name="jobContents" select="document(oxygen:makeURL($JOB_FILE))"/>

this ends up calling "org.dita.dost.store.CacheStore.resolve(String, String)" with a "null" base parameter and it ends up throwing a NullPointerException here:
org.dita.dost.store.CacheStore.toAbsolute(URI)

The processing issues a warning:
 [pipeline] Warning at char 24 in xsl:variable/@select on line 32 column 92 of collectIndexterms.xsl:
 [pipeline]   FODC0002: Exception thrown by URIResolver: Cannot invoke "java.net.URI.isAbsolute()"
[pipeline]   because "path" is null

The workaround is to pass "." as a context item to the document() function but in my opinion if I pass an absolute "href" this should work as well.

The workaround is to pass "." as a context item to the document() function but in my opinion if I pass an absolute "href" this should work as well.


Maven Co-ordinates out of date

I don't think the most recent fix has been pushed to Maven, the version that is in Maven still sits at 0.3m even though in your pom.xml file you have the version set as
<groupId>org.mindrot</groupId>
  <artifactId>jbcrypt</artifactId>
  <version>0.4</version>

Perhaps this needs to be pushed to maven @jeremyh ?

:+1: I would appreciate that as well

:+1:

+1

:+1:

:+1:

+1

+1
Just to keep the tradition going.

+1

Might I point out to those of you waiting for the push for security reasons,
<groupId>de.svenkubiak</groupId>
  <artifactId>jbcrypt</artifactId>
  <version>0.4</version>

appears to be the same package, don't hold me to that however.

+1

0.4 to Maven, please?

OK, it's months later and we are still at 0.3m in maven. Please update.

+1

The package @VanessaHenderson points out is a copy of the original code, with only a few aesthetic changes in some of the JavaDoc blocks. Use that if you can use Java 8 bytecode in your environment.
I have made my own private repackaged version of the original code because I am stuck with Java 7 for a bit, and de.svenkubiak insists on compiling the JBcrypt code for Java 8 (this is not necessary for the code itself, which works with Java 1.5 as well). I haven't shared it publicly because I don't expect there to be anyone else who needs it. Feel free to contact me if you do.

Above was insightful, didn't realize Java 7 is EOL as of April 2015. http://www.oracle.com/technetwork/java/eol-135779.html

:+1: (with apologies for nagging).
In many cases I'm ok with / in a habit of dredging maven details out of mvnrepository or whatever, but for security critical stuff this doesn't feel entirely right.

For those waiting for it in maven you can use this tool to pull it from this github and then it compiles it and makes it into a maven source you can use.
https://jitpack.io/#jeremyh/jBCrypt/jbcrypt-0.4


Fix RTL language padding on listing detail page

The left/right margin on the main listing detail section needs to swap in RTL.
There should be no margin on the right - the image should be flush with the browser.

QA Notes:
Entry Point: https://detroit-public-dev.netlify.app/listings

Click into any listing page in desktop view
Switch between English and Arabic and you should see that the paddings / margins around the main image and the Process section are consistent between the two views.


Built-in object and $window

If I use a built-in object, for example, Math within my controller or factory. What is the recommended way to use?
Math.random();
//or
$window.Math.random();

If it's something on window, I use $window.

If it's something on window, I use $window.


[RESOLVED] High ICMP ping response time

Problem started at 02:07:16 on 2023.07.17
Problem name: High ICMP ping response time
Host: ST-FG
Severity: Warning
Operational data: Value: 206ms
Original problem ID: 32664
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23135&eventid=32664

Problem has been resolved in 4m 0s at 02:11:16 on 2023.07.17
Problem name: High ICMP ping response time
Host: ST-FG
Severity: Warning
Original problem ID: 32664


Test plugin main file (outside of a class)?

In the plugin main file I have this
<?php
namespace My_Plugin;

require __DIR__ . '/vendor/autoload.php';

function activate() {
  Includes\Activator::activate();
}

register_activation_hook( __FILE__, __NAMESPACE__ . '\\activate' );

function init_plugin() {
  $plugin = new Includes\Main();
  $plugin->run();
}

init_plugin();

I'm kinda following the plugin boilerplate to an extent. Running phpunit makes require, the inside of activate() function, register_activation_hook and init_plugin red (untested).
But since they are outside any class, I'm not 100% sure how to test them :S
Especially require, since that is a language construct.
Should I use Filters\expectApplied on the register_activation_hook?

Hi @dingo-d,
sorry for late answer, just back from my vacation.
Main plugin files are by definition side-effectful and non-unit, as they connect stuff together, so it is not really something that you can test in a unit test.
If you write some integration test (loading WordPress) than you can test that the plugin main plugin works, by checking that on activation the activator does its job (whatever it is) and that bottstrapping procedure runs...
However, because all the code you posted could be summarized in these 3 lines:
require __DIR__ . '/vendor/autoload.php';

register_activation_hook( __FILE__, [My_Plugin\Includes\Activator::class, 'activate'] );

(new My_Plugin\Includes\Main())->run();

and because you can assume that both require and register_activation_hook work, if you separately unit-test Includes\Activator::activate() and Includes\Main::run()... that should be enough to ensure your main plugin will work...

Awesome, thanks! I'm running unit tests on methods that I can unit test - mostly methods that return something so I can mock and test the functionality, and I run separate integration tests on things that really cannot be mocked - like update_user_meta for instance, or similar functionality.
I'll just test this in the integration tests and find a way to combine my coverage.


Lighthouse symbol is incorrect - missing rays

The Lighthouse symbol is missing the 9 lines/rays at the top of the symbol. This is an issue with the symbol in the stylx files.
mil2525c_b2.stylx
MIL-STD-2525B w/CHANGE 2 and MIL-STD-2525C:
METOC >Oceanic > Hydrography > Aids to Navigation > Lighthouse
WOS-HALH--P----
mil2525d.stylx
MIL-STD-2525D:
Hydrography > Aids to Navigation > Lighthouse
Symbol Set 46, Code 120409
Current

Expected

Version
ArcGIS Pro 2.2 and Military Tools 3.1

https://github.com/Esri/joint-military-symbology-xml/blob/dev/svg/Appendices/METOC/Oceanographic/46120409.svg

This issue was moved to ArcGIS/military-symbology-styles#59


WdfDriverRetrieveDriverDataDirectoryString 'not found' and more

Hi i am apologize if you aren't interested about it ... but
browsing on the doc pages ....  qucly:

this function isn't resolvable/don't exist  (less than i am in error)
the word 'Retrive' and the description maybe the second parameter SAL descriptor __in is incorrect

bye.
[Enter feedback here]

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

ID: 50aa4190-a4f8-bc36-ed5a-6e89c5b2ea6c
Version Independent ID: a7ac0b0f-93b5-0cfb-3afe-a9041a35c322
Content: WdfDriverRetrieveDriverDataDirectoryString function (wdfdriver.h) - Windows drivers
Content Source: wdk-ddi-src/content/wdfdriver/nf-wdfdriver-wdfdriverretrievedriverdatadirectorystring.md
Product: windows-hardware
Technology: wdk-api-reference
GitHub Login: @tedhudek
Microsoft Alias: tedhudek

Hi @RobertoB74 this function is UMDF only, as indicated on the page, starting with version 2.27 (RS5).  The SAL annotations match the header.
For more about UMDF versioning, please see UMDF Version History.


FirebaseArduino: allow mixing stream and non-stream commands

With this change non-streaming operation will stop the stream and
reuse the underlying http client.
Call FirebaseArduino::stream again in order to reuse the stream.
This is similar to what @ed7coyne did in the contrib/modem
/cc @salqadri @kotl
Fixes: #48 #266

I have reviewed this change and it looks good to me. thanks.

Great solution Proppy, thanks for fix it.

However, after I make the Firebase.set() (that works and the new value is correctly store on the FirebaseDB ) I was unable to re-start the streaming listening loop.
Please can you give me an example of how to "Call FirebaseArduino::stream again in order to reuse the stream."
I can not find the correct command. Many thanks.ML

@Xmanu12 did you try calling ::stream again in loop?

thanks for your faster answer @proppy.
Do you mean ?
Firebase.stream("/listening_patch");
if I call again, let the stream function inoperative, dont return any value.

As I use Firebase.stream("/listening_path"); at beginning of the void loop every thing is working properly, though I use some non stream commands in loop. Thanks friends.

please @proppy tell us what do you mean by simple example
another question
why we use stream ?  is it to just listen to changes on a specific path and how to read the change?
my code crashes in>>>>> if (stream.available())
thank you for your effort

Hi friends, here is my code, working properly, though I use some non stream commands in loop.
BUT!!!!!
As my internet connection is interrupted firebase stream disconnected, and when internet connection will ok firebase stream will not automatically connected.
I gone through all (latest) comments/changes to reuse HTTPClient.
Please tell me what changes/additions should i made in my program.
#include <FirebaseArduino.h>
#include <ESP8266WiFi.h>
int led = 13;
void setup() {
pinMode(led, OUTPUT);
WiFi.begin("ssid", "pass");
Firebase.begin("abc.firebaseio.com");
Firebase.setInt("abc", 000);
}
void loop() {
Firebase.stream("/abc");
if (Firebase.available()) {
FirebaseObject event = Firebase.readEvent();
String eventType = event.getString("type");
eventType.toLowerCase();
if (eventType == "put") {
  String path = event.getString("path");
  String data = event.getString("data");
  if (data == "123")
   {digitalWrite(led, HIGH);
    Firebase.setInt("123/out", 111);}
  if (data == "456")
   {digitalWrite(led, LOW);
    Firebase.setInt("123/out", 000);}
   }
  }
 }

@milinddhanke  the same issue here

Hello friends please help me to resolve my problem


Mobile Front-end for Webforms

Is anyone willing to write the specs and the documentation so a totally new group at the PENN 'Hack the Change' hackathon can try and tackle this issue (mostly in webforms)?
Should include:

instructions to build touchforms + formhub
a sample xlsform they should upload
pointers to where they should start (ie, the enterall-ui.js file in touchforms) and how they would need to augment this.


I am Interested in Adding SOCKS Proxy Support

Hi, I maintaining a fork of socksipy-branch, called socksipy-x, which is at https://github.com/brendoncrawford/socksipy-x. Socksipy and Socksipy-Branch have not been updated for a while, so I intend to fix some bugs and try to maintain the codebase when needed.
Before I embark on the task of adding SOCKS support to urllib3, I wanted to see if this is even something you would be interested in merging in? If you were, it could either be referenced as a dependency/submodule, or I could just copy the entire socks.py file directly into urllib3, so no external dependency would be required.
Any thoughts?

This would be fantastic. People ask me for this on a very regular basis.

Excellent. I will begin work on it. Would you prefer the socks module to be directly copied into urllib3, or prefer it as a git submodule, or as a pip dependency?

If the module is mit/bsd licensed, copied in would be ideal.

Yes it is BSD. Sounds good. I'll keep you posted as things progress.

Keep in mind I'm not @shazow — I think he'd agree though ;)

As @kennethreitz said, there are a couple of options in order of preference:

We could vendor it in as we do with some other packages, see urllib3/packages/...
We could put it into urllib3/contrib/... and require an external dependency.

Also make sure to have a look at ProxyManager, would be ideal if you could extend that into some kind of SocksProxyManager. :-)

Ok, it will go in packages, and I will try your suggestion of using "SocksProxyManager". And yes, I will include tests. This is my weekend project, so I hope to make commits on Sundays.

Ok, it will go in packages, and I will try your suggestion of using "SocksProxyManager". And yes, I will include tests. You will probably see commits on Sundays.

I'm also maintaining a fork of that SocksiPy branch, with a few additional bug fixes that I'll commit shortly. I think I'll try and integrate it into the ProxyManager as well.
@shazow would you prefer 2 separate managers, such as ProxyManager or HTTPProxyManager for HTTP proxies and SocksProxyManager for SOCKS proxies?
Or would ProxyManager with an argument of the type of proxy to use (generally either SOCKS4, SOCKS5, or HTTP) be preferred? I personally think the latter would be cleaner.

@Anorov It depends on how much of the code is actually shared. If all the proxies are the same except for some core helper, then perhaps extending+overriding class makes more sense to me.
I don't have a very strong feeling here, just whatever makes more sense and is simpler. :-)


build(deps): update to itertools 0.11

Depend on itertools >=0.10, <0.12

@LucioFranco Thank you for your work on Prost! Could you please give this PR a review when you get a chance?

Seems like we need to bump the msrv to 1.63 :(

Thank you for merging, Lucio!


WIP: Add dark color scheme

Spoke with @sneamonitakis IRL about this…
It was fun to experiment with this, but we probably want to hold off for a bit on merging the dark mode specific changes, because it’s a bit of an “all or nothing” situation. If we merged that into Hub, the app would visually break in odd ways, with some components changing their appearance, while all of the custom CSS components in the app, not.
That said, this PR includes some move of variables over from Sass and into CSS Custom Properties, which is good and fine to do any time. So we can extract some of that good stuff into separate PRs merge-able today, and save the dark mode specific stuff for later.

Thinking out loud:

How might we allow consumers (applications using the system) opt-in to dark-mode?

It may be wise to also add the color-scheme property, which signals to the browser that we support both light and dark color schemes:
html {
  color-scheme: light dark;
}


Update archetypes

The archetypes is outdated, still uses TOML while the exampleSite contents uses YAML.
The metaDataFormat is deprecated, as it will now get the metadata format of your archetype files.

Hi @budparr @regisphilibert any update for this?

This looks fine to me.

Thanks!


Remove NumPy matrix class

This PR removes the use of the NumPy matrix class from python-control.  The main changes are:

The use_numpy_matrix function is no longer available.
The use of MATLAB-style matrix strings ("[[1 2; 3 4]]") is no longer supported.
The use_legacy_defaults function returns a warning if the version is pre-0.9 (since those versions used the np.matrix type for state space systems).
Unit tests and CI tests were updated to remove testing against np.matrix.
Docstrings and documentation were updated to be compatible with the above changes.

coverage: 94.613% (+0.006%) from 94.607% when pulling 77a75a64971a9bfbda15701eb1b7b93b05cb4265 on murrayrm:remove_matrix-10Jun2023 into 71bbce26d65aaf9509410a0ccdff2573e7a705ad on python-control:main.


NOISSUE - Add opcua-adapter conn route-map, use ServerURI and NodeID

Signed-off-by: Manuel Imperiale<EMAIL_ADDRESS>

Codecov Report

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

@@           Coverage Diff           @@
##           master     #975   +/-   ##
=======================================
  Coverage   83.78%   83.78%
=======================================
  Files          76       76
  Lines        5327     5327
=======================================
  Hits         4463     4463
  Misses        588      588
  Partials      276      276

Continue to review full report at Codecov.

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


Calling parser with backtick

Ahhhh - Javascript. The language that keeps surprising.
Never seen the
fntxt
notation before, but after a bit of googleling I realised that you want to use alasql as a tagFunction for a template string
I like the idea, even if im not sure its smart that its meant to return a string.
But...
Currently alasql is sync, and one way you can make it async is by providing an array as the first parameter
alasql(['select 1 as A', 'select 2 as B'])
=>
[
  [
    {
      "A": 1
    }
  ],
  [
    {
      "B": 2
    }
  ]
]

I cant see how I can seperate the two - so for now I will reject the PR. If you have a good idea let me know and we can talk about how we do it.

Let's step by step!
1º
The first is identify if the function has called by alasql("query here") or alasql`queryhere` .
We can do this with the .raw property (thank you for this). Apparently only the template string functions have this property

2º
Next step is format the query with values. I created a function to map every string to format (concat) with the corresponding parameter (value), like const userAuth = `user_id: ${user_id_variable}`

Example 2 breaking all keywords

And we have finally the parse.
Do you se it's as valid?

Still thinking about how best to use this interesting feature.

i think this would be a cool addition to alasql
I'm just  imagining being able to do things like:
sql`SELECT * FROM ${table} ORDER BY ${fieldName} ${direction}`

I really enjoy the convenience of this approach as well. However, we should be explicit about its usage. Consider this example:
let orderBy = `ORDER BY x desc, y asc`

alasql`
SELECT author
FROM ${items}
WHERE
AND type = ${type}_v2
AND name = ${item}
${orderBy}
`

If items is a string, it can be directly interpolated into the SQL template string or passed as a parameter. If it's an array, it should be passed as a parameter and represented as a ? in the query.

Since type is juxtaposed with another string, it must be directly interpolated into the query.

If item is a numeric value, it can be directly interpolated. If it's a string, it can be interpolated after being escaped. Alternatively, it can be passed as a parameter, which offers enhanced performance by allowing the SQL to be cached, independent of the name value.

orderBy should always be directly interpolated into the SQL as we can't replace it with a ?.

It seems we have a pattern where values surrounded by whitespace are to be converted into parameters. However, there are exceptions like orderBy, where users want to build the query, not just provide data. If it's intertwined with other text, we should always interpolate the string. For values with trailing or surrounding spaces, we have two options:
A) By default, convert it into a parameter, but provide a way to indicate when it should be directly interpolated.
B) By default, directly interpolate it, but provide a way to indicate when it should be a parameter.
I have a preference for option B, although it might clash with the intuitive use of template strings.
If we choose A, I propose we use a : in front of the parameter to indicate that it should be a parameter:
let orderBy = `ORDER BY x desc, y asc`

alasql`
SELECT author
FROM :${items}
WHERE
AND type = ${type}_v2
AND name = :${item}
${orderBy}
`

Alternatively, if we opt for B, we could introduce a ~ in front of the field:
let orderBy = `ORDER BY x desc, y asc`

alasql`
SELECT author
FROM ${items}
WHERE
AND type = ${type}_v2
AND name = ${item}
~${orderBy}
`

Thoughts? Suggestions?


Deprecation Warning

DEPRECATION WARNING: Setting custom parent classes is deprecated and will be removed in future versions. (called from parent_class_name at /Users/me/.rvm/gems/ruby-2.6.3/bundler/gems/acts_as_follower-c5ac7b9601c4/lib/acts_as_follower/follower_lib.rb:10)
I got this error. Can you fix it? I'm pretty sure it's because of this line:

I think you need to define the version.

https://github.com/tcocca/acts_as_follower/issues/91
Looks like a similar issue?


fix: ipAddressHelper uncatched error when running on raspberry pi, ha…

fix: ipAddressHelper uncatched error when running on raspberry pi, having interfaces without any ip.

I'm forcing the merge due to customers issue.


Segmentation fault (core dumped)

Caffe compiled successfully, but , when I was training, I was given an error：
Segmentation fault (core dumped)
Do you have any suggestions?
Also, can you tell me the version of the key dependencies?
protobuf opencv  numpy cython scikit-image  easydict...
Also, which python version？

@ppengtang Thank you very much, your installation method worked.


DSO-59 🔧 Add CodeQL workflow

Same as website - workflow has been updated to work on main branch, not master :)
Repo has to be public to enable CodeQL

Do not merge - I need to remove the java bit from the pre populated GitHub template!


AVL Tree Solution showing the wrong number to be deleted

Describe the bug
The exercise says that the 12 should be deleted, but when you scroll down to that step, it shows that the 11 should be deleted.

The 12 does actually get deleted and replaced with its predecessor, it's just saying that the 11 is the one that gets deleted. Everything else is correct, the next one is 16 as stated in the exercise head.

To Reproduce
Seed: 565237840

Generate:

Hashing w/ Chaining
(a,b) Trees
Floyd Warshall
Double Hashing
Binary Heaps
AVL Trees
BFS & DFS
Dijkstra

Scroll down to AVL Trees and that specific step

Expected behavior
It should say 12
Desktop (please complete the following information):

IDE Eclipse
Java 14
OS: Ubuntu 20.04

Also reproducible with seed<PHONE_NUMBER>.


Update mac_client link in podman tutorial

I fixed the mac_client tutorial link as it was returning a 404 error.
Signed-off-by: Dylan Pinn<EMAIL_ADDRESS>

/assign @giuseppe

/ok-to-test

@vrothberg I amended the commit and re-pushed.

Thanks @dylanpinn
/lgtm

/approved thanks @dylanpinn !

/approved

/approve

/lgtm

/retest


Copyright notice: One of your dependencies has violated copyright law

https://github.com/labteral/chatgpt-python/issues/7#issue-1484782172

fixed.
see commit
if it's okay, respond it and I will close the issue


Yamt_helper.skprx in ur0:tai/config.txt

The ur0:tai/config.txt has Yamt_helper.skprx under *KERNEL but the file itself it not there.
Should this happen?

Yes, this is intended to not break yamt when upgrading from lite to full


How to return null value in implementation?

Incase I want to return null value, I need to cast null to any, so we have any shortcut for avoid cast to any?
assemblyCsharp['class_name'].methods['method_name'].implementation = () => null as any

Hi, for some reason I didn't add null to Il2Cpp.Method.ReturnType. However, both undefined and NULL should be fine, an they don't require any cast

I will try with undefined.
Do you have paypal or something like that? I want to send you some :coffee:. :wink:

Nah man, I'm good thanks! Send them to frida instead :)


onNewBitrateRtmp(long bitrate) will show total bitrate and audio bitrate alternately

Hi:
I use RTMP to stream to server. I found a problem. Normally, onNewBitrateRtmp will always show total bitrates. However, I turn off the Wi-FI on the cell phone and use rtmpCamera1.stopStream() to stop stream and then use rtmpCamera1.startStream(StreamURL) to start streaming. I found onNewBitrateRtmp will show otal bitrate and audio bitrate alternately. The log is as the following, how should I do to disable showing audio bitrate?(version:2.0.5)
Normally:
Video:3.5Mbps  Audio:128kbs
6-15 15:17:02.381 14906 15024 E Felix   : RTMP bitrate:3405712
06-15 15:17:03.386 14906 15024 E Felix   : RTMP bitrate:3169300
06-15 15:17:04.399 14906 15024 E Felix   : RTMP bitrate:3215715
06-15 15:17:05.399 14906 15024 E Felix   : RTMP bitrate:3250864
06-15 15:17:06.407 14906 15024 E Felix   : RTMP bitrate:3236634
06-15 15:17:07.419 14906 15024 E Felix   : RTMP bitrate:3380395
06-15 15:17:08.420 14906 15024 E Felix   : RTMP bitrate:3214176
06-15 15:17:09.429 14906 15024 E Felix   : RTMP bitrate:3449673
06-15 15:17:10.439 14906 15024 E Felix   : RTMP bitrate:3225505
06-15 15:17:11.455 14906 15024 E Felix   : RTMP bitrate:3158440
06-15 15:17:12.484 14906 15024 E Felix   : RTMP bitrate:3195910
06-15 15:17:13.499 14906 15024 E Felix   : RTMP bitrate:3344859
06-15 15:17:14.500 14906 15024 E Felix   : RTMP bitrate:3112399
06-15 15:17:15.505 14906 15024 E Felix   : RTMP bitrate:3662049
06-15 15:17:16.521 14906 15024 E Felix   : RTMP bitrate:3414582
......
Strange:
Video:3.5Mbps  Audio:128kbs
06-15 15:01:27.290 13664 14286 E Felix   : RTMP bitrate:133597
06-15 15:01:27.829 13664 14285 E Felix   : RTMP bitrate:3428287
06-15 15:01:28.330 13664 14286 E Felix   : RTMP bitrate:137332
06-15 15:01:29.864 13664 14285 E Felix   : RTMP bitrate:3181686
06-15 15:01:30.469 13664 14286 E Felix   : RTMP bitrate:134392
06-15 15:01:30.890 13664 14285 E Felix   : RTMP bitrate:3100288
06-15 15:01:31.511 13664 14286 E Felix   : RTMP bitrate:135623
06-15 15:01:31.890 13664 14285 E Felix   : RTMP bitrate:3478600
06-15 15:01:32.589 13664 14286 E Felix   : RTMP bitrate:138087
06-15 15:01:32.920 13664 14285 E Felix   : RTMP bitrate:3154151
06-15 15:01:33.650 13664 14286 E Felix   : RTMP bitrate:134001
....
Video:3.5Mbps  Audio:256kbs
06-15 15:03:52.358 14607 14825 E Felix   : RTMP bitrate:3709624
06-15 15:03:52.445 14607 14824 E Felix   : RTMP bitrate:267973
06-15 15:03:53.383 14607 14825 E Felix   : RTMP bitrate:3457998
06-15 15:03:53.544 14607 14824 E Felix   : RTMP bitrate:265106
06-15 15:03:54.412 14607 14825 E Felix   : RTMP bitrate:3502561
06-15 15:03:54.584 14607 14824 E Felix   : RTMP bitrate:268481
06-15 15:03:55.416 14607 14825 E Felix   : RTMP bitrate:3620629
06-15 15:03:55.625 14607 14824 E Felix   : RTMP bitrate:267965
06-15 15:03:56.437 14607 14825 E Felix   : RTMP bitrate:3339659
06-15 15:03:56.725 14607 14824 E Felix   : RTMP bitrate:265106
06-15 15:03:57.466 14607 14825 E Felix   : RTMP bitrate:3691133
06-15 15:03:57.764 14607 14824 E Felix   : RTMP bitrate:268481
....

I will check it. Can you reproduce this problem with all devices?

I can see in your logs that the callback is called 2 times in a second but this only should be called a time each second.
This means that maybe the library is using 2 instances of BitrateManager but I only have one instance declared.

Did you modify the library?
Can you try add a log in BitrateManager class to know if it is called 2 times?

init {
    Log.e("Pedro", "BitrateManager initialized")
  }

This log should be called only a time when you create RtmpCamera1 class.

Yes. I rewrite RtmpCamera1 for external camera. I checked my program and I found I set rtmpCamera1=null, when WI-FI is error and new RTMPCamera1 again to restart connect when WI-FI is ready again. It will show total bitrate and audio bitrate. If I don't renew RTMPCamera1 it is ok. However, if I don't set rtmpCamera1=null and new RTMPCamera1 again(I startStream directly), the video will become strange (poor image (Mosaic...)). How should I do?( I stream to youtube.)

I do an experiment agagin. I found if I  stop stream and set rtmpCamera1=null and new rtmpCamera1 in the same activity. This situation will happen even I finish this activity,  enter the activity, start a new stream agagin. If I stop stream and set rtmpCamera1=null, quit the activity, enter the activity, and start a new stream, this situation will not happen.

First of all, I recommend you use examples provided in this proyect to know if you have any fail using it to discard custom implementations problems.
If all is working fine doing your test in my project. We can do the following:

Share a code example and I can help you find the problem.
Set rtmpCamera1=null is not necessary in most of cases. I recommend let java collector delete the instance and use rtmpCamera as singleton.

I found I made a mistake. I new rtmpCamera1 twice when I restart to stream so there are two instance to do encoder. I fixed it. Thanks for your kindly help.

This seems solved. Closing issue


how to fix this error when we add controller..

[Enter feedback here]

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

ID: 20264150-9ac7-2b21-3314-64ffa114410f
Version Independent ID: 3477519b-1bc2-73be-33e3-63067383d426
Content: Add a controller to an ASP.NET Core MVC app
Content Source: aspnetcore/tutorials/first-mvc-app/adding-controller.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

To report Visual Studio problems
Help > Send Feedback > Report a Problem


Fri verifier

Addresses #68

ah, actually I will need to have multiple initial_evals, for each input height, to properly handle input polys of different degrees. I will write some tests for that and figure out how to pass in dimensions in a new branch. this is still good to merge in the meantime, unless I should just do it here.

as discussed in discord, FRI should work without considering coset shift. will fix

shiftless FRI seems to work for PCS now.

uni-stark is happy, but keccak failing because of boundary constraints

Setting this aside until minpoly-quotient is done, I also want to rewrite the indexing for this so it works for multiple matrices

closing in favor of https://github.com/Plonky3/Plonky3/pull/189


Fix for issue #414

Simple fix by calling the onToggle callback function and changing the event listener

Thanks @LykorisR for the contribution - merged and it will be released for v1.6.3.


api_docs: Add explicit '-X GET' to curl examples.

Specifying the -X GET as the curl request type in the endpoints.

@eeshangarg Please review!

Nice, merged, thanks @sameerchoubey!


[DOC] Clarify that text embedding model will do truncation

What do you want to do?

[X] Request a change to existing documentation
[ ] Add new documentation
[ ] Report a technical problem with the documentation
[ ] Other

Tell us about your request. Provide a summary of the request and all versions that are affected.
What other resources are available? Provide links to related issues, POCs, steps for testing, etc.

Read more details https://github.com/opensearch-project/ml-commons/issues/2466

the trouble here is not whether it's configurable its about user understanding. If someone is new to vector search this is a really easy way to shoot yourself in the foot and never know what went wrong. I've talked to several people already who have completely abandoned vector search because they thought the relevancy was bad. Turns out their documents were just truncated because they didn't understand how vectorization worked.

@dtaivpp Could you raise a PR for this since you are familiar with this issue?


[AzureTools][Aspire] Fail to publish Aspire Test project (xUint)/Console project with an error 'ERROR CODE: InvalidParameterValueInContainerTemplate'

OS Version: Win11 23H2
Dev17 Build: 17.10 preview 3 main-[34718.169] | Enterprise
.NET Aspire: 8.0.0-preview.5.24168.3
Integrated 8.0 SDK: 8.0.300-preview.24122.6
Workload:  ASP.NET and web development/Azure development
Apply Nuget Feed
azd version: 1.8.0-beta.1-daily.3604026
REPRO STEPS:

Create a new Aspire Test project (xUint)/Console project -> Add .NET Aspire orchestrator support.
Right-click xxx.AppHost > Open in terminal.
Runing 'azd init', select 'Use code in the current directory' > Confirm and continue initializing my app > select frontend as deployment service > type a new environment name, press enter.
Running 'azd up'.

Expect:
No error.
Actual:
Fail to publish with an error.

There is a known bug Bug 1999018: [WebToolsE2E][Aspire] When creating Worker Service project and publishing it using CMD, there is no service that can be selected. Close this issue due to "Duplicate".


./bin/ysqlsh

@shohansp

``

[[services]]
internal_port = 8080
protocol = "tcp"
[[services.ports]]
handlers = ["http"]
port = "80"
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
flyctl auth signup
8080TCP 80/443 ⇢ 8080
https://web.facebook.com/help/111814505650678/?helpref=uf_share


Make sort() method an inplace method

I would like to know if possible to change the behavior of sort() in an array to make it an inplace method.
The expected behavior would be like:
var array = nm.NDArray[nm.i64](List[Int64](8, 3, 5, 7, 2, 1, 4, 6), shape=List[Int](8))
array.sort()
print(array)

[Output]:
[	1	2	3	...	6	7	8	]
Shape: [8]  DType: int64

I understand that there are times when you don't want to change the original array and the intention is to create a new array, but renaming the current sort() to sorted() may be an option.
Let me know what you think

@mmenendezg Thank you for the suggestion. We were planning to make this change to make it compatible with numpy where it's usually sorted inplace. What do you think about something like this,
import numojo as nj
var arr = nj.NDArray(3,3)
arr.sorted() # sorts the array in place
var arr_sort = nj.sort(arr) # returns a new sorted array

I think it makes sense to have the method in the NDArray that sorts inplace and one function that returns a copy of an array.
I was checking the Numpy documentation and I see that the ndarray method is called sort(). I think keeping the names will improve the adoption.

@mmenendezg Agreed! It's better to keep the same naming convention. I have made these changes and I will push it today.

Sort method has been changed to match the discussion above in this PR #91.


Parser and emit_forward_arg

I'd like to use the latest version of parser with emit_forward_arg turned on.
We could avoid this "hack" of redefining to_a as different from children
$ ruby-parse --legacy-forward-arg -e "def foo(...);end; def bar(*rest); end"
(begin
  (def :foo
    (forward-args) nil)
  (def :bar
    (args
      (restarg :rest)) nil))

$ ruby-parse -e "def foo(...);end; def bar(*rest); end"
(begin
  (def :foo
    (args
      (forward-arg)) nil)
  (def :bar
    (args
      (restarg :rest)) nil))

The later form is much improved as an argument signature is always inside an args node.
I doubt it would be much incompatibility, but v1 would be perfect for this.
Comments / objections?

Fine by me.


Broken URL in IPFS Gateway section

What section and page of the Curriculum is this on
IPFS: The IPFS Gateways
Describe the bug
URL on line 14 under subdomain-gateways is invalid. Current url looks like:
../concepts/content-addressing.md#identifier-formats -> https://github.com/protocol/launchpad/blob/gitbook/docs/concepts/content-addressing.md#identifier-formats
I don't know if the ipfs docs url for content addressing was meant to be inserted or was the launchpad url meant to be there for content addressing. I personally like the first link and think that one should be in place there.
Another broken URL is on line 126 under How to address ipfs on the web. Not sure what this one is supposed to link to.

@mrodriguez3313 feel free to close or improve

Resolved in PR #187


Request failed due to unknown method: Method is not implemented

An error occurred when I ran the demo at the following address：
https://github.com/truongsinh/appium-flutter-driver/tree/master/example/nodejs
The error:
2020-03-12T01:44:59.143Z ERROR webdriver: Request failed due to unknown method: Method is not implemented
at getErrorFromResponseBody (D:\Tests\Appium\node_modules\webdriver\build\utils.js:124:10)
at Request._callback (D:\Tests\Appium\node_modules\webdriver\build\request.js:111:64)
at Request.self.callback (D:\Tests\Appium\node_modules\request\request.js:185:22)
at Request.emit (events.js:311:20)
at Request.EventEmitter.emit (domain.js:482:12)
at Request. (D:\Tests\Appium\node_modules\request\request.js:1154:10)
at Request.emit (events.js:311:20)
at Request.EventEmitter.emit (domain.js:482:12)
at IncomingMessage. (D:\Tests\Appium\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:417:28)
(node:10144) UnhandledPromiseRejectionWarning: unknown method: Method is not implemented
at getErrorFromResponseBody (D:\Tests\Appium\node_modules\webdriver\build\utils.js:124:10)
at Request._callback (D:\Tests\Appium\node_modules\webdriver\build\request.js:111:64)
at Request.self.callback (D:\Tests\Appium\node_modules\request\request.js:185:22)
at Request.emit (events.js:311:20)
at Request.EventEmitter.emit (domain.js:482:12)
at Request. (D:\Tests\Appium\node_modules\request\request.js:1154:10)
at Request.emit (events.js:311:20)
at Request.EventEmitter.emit (domain.js:482:12)
at IncomingMessage. (D:\Tests\Appium\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:417:28)
flutter doctor：
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13, on Microsoft Windows [Version 10.0.18362.356], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.6)
[!] IntelliJ IDEA Community Edition (version 2019.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)
dart --version
Dart VM version: 2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "windows_x64"

automationName: "Flutter" should be add. like:
const opts2 = {
port: 4723,
capabilities: {
platformName: "Android",
platformVersion: "8",
deviceName: "one plus",
app: "D:/Tests/Appium/android-real-debug.apk",
automationName: "Flutter"
}
};


Cannot drag markers on touch devices

The following code:
this.positionMarker = marker(       [         this.map.getCenter().lat,         this.map.getCenter().lng       ], {         title: "MyPoint",         alt: "The Big I",         draggable: true,         icon: icon({           iconSize: [25, 41],           iconAnchor: [13, 41],           iconUrl: 'assets/icons/markers/marker-icon.png',           shadowUrl: 'assets/icons/markers/marker-shadow.png'         })}).addTo(this.map);
Works just fine on desktop, but on touch devices the marker moves just a few pixels then stops moving.
I can verify the issue on my phone (One plus), tablet (IPad pro) and using Chrome developer toolbar, simulating touch device.
Switching between touch and not touch device on chrome shows the issue is reproducable on touch and not on desktop.
The options are:
     this.options = {       layers: [this.streetMaps ? this.streetMaps : this.documentTiles],       doubleClickZoom: false,       center: latLng([0, 0]),       zoom: 1.5,     };
I've tried with tap: true/false
The map is set like this:
<div *ngIf="options" class="map" leaflet [leafletOptions]="options" leafletDraw      (leafletMouseUp)="releaseSelect()"      (leafletMouseMove)="moveSelect($event)"      (leafletMapReady)="onMapReady($event)"      (leafletMouseDown)="clickSelect($event)">
Any help would be much appreciated. Thanks in advance.
Versions:
"leaflet": "^1.7.1",
"@asymmetrik/ngx-leaflet": "^8.1.*",
Angular v 12.2.6

This is SO embarrassing, and totally my bad!
When placing the new marker that should be dragable, I also disabled zoom etc. and this was intentional.
But I also disabled draging!!
Sorry for wasting anyone's time on this. It works as a charm!


Show correct last-modified time in dandiset detail panel

The non-existent updated property was previously being passed to
momentjs as the last modified date. Since that value was always
undefined, and momentjs returns the current date and time when called
without arguments (or with undefined, apparently), this explains why
the frontend was always showing the current time for the last modified
value.
Closes #825.

@bendichter, take a look at https://deploy-preview-826--gui-dandiarchive-org.netlify.app/#/ to see the fix in action (on staging data, so you won't see your dandisets there).

lgtm, thanks @waxlamp

Looks like another bug introduced by a schema change that went unnoticed. LGTM

More reason to be adopting more TypeScript and Composition API in this project.


Configurable timeout value - merge histograms in  different scale

Configurable timeout value set is added and merging different histogram is done

I found a bug. I will look at night

Okay I fixed

(i have not reviewed all yet)
also there are probably more than 1 timeout: connect timeout, read timeout, ...
also see what the fast client is using
you can use the delay= to test

Hmm, I didn't release that I need to add http req timeout to basic client. Cool:). Btw at stats.go, while I was merging two histograms, I tried to maximize their values scope range. So that I choose to select highest divider and offset. Is this logic meaningful?


Unable to run googlephotos login, errors 'panic: Must provide a Google Photos API key'

Would love to give this a try, as it seems to be able to handle (and sync!) shared photo libraries, which nixplay itself isn't able to. And if you don't want to give them access to all your ~nudes~ cat pics, there is no nice flow how to handle this.
$ docker run --rm -ti gcr.io/picsync-build/github.com/andrewjjenkins/picsync:master-latest ./picsync googlephotos login
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Error reading config file, skipping config file
panic: Must provide a Google Photos API key

goroutine 1 [running]:
main.runGooglephotosLogin(0x129cda0?, {0xc6165b?, 0x0?, 0x0?})
	/go/src/github.com/andrewjjenkins/picsync/cmd/picsync/googlephotos.go:69 +0x2ea
github.com/spf13/cobra.(*Command).execute(0x129cda0, {0x12d93f0, 0x0, 0x0})
	/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x67b
github.com/spf13/cobra.(*Command).ExecuteC(0x129cb20)
	/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
main.main()
	/go/src/github.com/andrewjjenkins/picsync/cmd/picsync/main.go:41 +0x25

Not sure if I read something wrong, but even without a valid config ./picsync googlephotos login should work, right?

update: after digging through the code (no go dev here) i created a.picsync-credentials.yaml file, and added
googlephotos:
  api:
    key: 123345
    secret:  abcdef

which I obtained after creating my own app from here: https://developers.google.com/photos/library/guides/get-started

Max, Thank you for the report.
Yes you're absolutely right, you have to create your own key.  This is lightly alluded to in README.md's "Roadmap/Help Wanted" section:

Instructions on creating the Google Photos App API Client ID
Getting the app generally approved so that users don't have to bring their own API client ID

I think that I may be able to apply and get a key/"secret" permanently assigned, though before this I didn't know anyone aside from me found this useful.

as it seems to be able to handle (and sync!) shared photo libraries, which nixplay itself isn't able to.

Yes!  This is correct, I am using it for this purpose (though I have not tried the nixplay integration in earnest in years so I will take your word that it is missing from their implementation).
You may need this command to get the API ID for the shared albums (if you didn't already find it):
picsync googlephotos list --shared

I'm going to leave this one open until I either put up good instructions for how to get a secret/key, or get the app approved by google.  Thanks again!


refactor: remove all schema internal settings attribute and use the potential schema type

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[ ] N
[x] Y

Close #1060

2. What is the scope of this PR (e.g. component or file name):

kclvm/runtime/src/value/val_plan.rs
kclvm/runtime/src/value/val_schema.rs

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[x] Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

[x] N
[ ] Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

[ ] Unit test
[x] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
[ ] Other

test/grammar/**

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

-140 of 341 (58.94%)  changed or added relevant lines in 19 files are covered.
55 unchanged lines in 10 files lost coverage.
Overall coverage increased (+0.005%) to 71.824%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

kclvm/runner/src/lib.rs
1
2
50.0%

kclvm/runner/src/runner.rs
54
55
98.18%

kclvm/runner/src/tests.rs
3
4
75.0%

kclvm/runtime/src/context/api.rs
0
1
0.0%

kclvm/runtime/src/value/val_type.rs
0
2
0.0%

kclvm/runtime/src/value/val_clone.rs
1
4
25.0%

kclvm/runtime/src/value/val_json.rs
1
4
25.0%

kclvm/runtime/src/yaml/mod.rs
0
3
0.0%

kclvm/runtime/src/json/mod.rs
0
5
0.0%

kclvm/runtime/src/value/val_schema.rs
17
22
77.27%

Files with Coverage Reduction
New Missed Lines
%

kclvm/runner/src/runner.rs
1
94.95%

kclvm/runtime/src/_kcl_run.rs
1
0.0%

kclvm/runtime/src/value/val_get_set.rs
1
96.67%

kclvm/runtime/src/value/api.rs
2
0.0%

kclvm/runtime/src/value/val_json.rs
2
79.56%

kclvm/runtime/src/value/val_str.rs
4
2.15%

kclvm/runtime/src/value/val_is_in.rs
5
76.64%

kclvm/runtime/src/value/val_dict.rs
6
52.57%

kclvm/tools/src/LSP/src/request.rs
14
66.44%

kclvm/runtime/src/value/val_plan.rs
19
74.76%

Totals

Change from base Build<PHONE_NUMBER>:
0.005%

Covered Lines:
44290

Relevant Lines:
61665

💛  - Coveralls


URL with password not working.

When I use a URL with the password it fails.
https://us06web.zoom.us/rec/play/jX5hTS_42dpTloEGWseCIiXbYQzRIqqumRMYg_63FcA6-U34IRPR47WR4rRJ7bqVYOJc4NneFm6P9nsq.l9dvJogP5Q2NaKBF
I'm using ?pwd=xxxxxxxx  at the end of the URL
By the way it could be that the password also starts with a equal sign. So, in my case it would be
?pwd==xxxxxxxx
I can email you the password if I have your email address.
Thanks again.

Could you provide a minimum reproducible example - an example that can be shared publicly on GitHub issue?

There are two types of recording passwords - manual entry and URL embedded.
Only the latter is supported. Please reference the requirements documentation.

Should show a media player and a download button. Should not show an 'Enter the passcode to watch' message.

Thanks