Help with array slice indices

Hey guys, I'm quite new to using this library and I'm a little stuck with array slice indexing. I understand that arrays are immutable and to update them, we have to use ops.index_update. But when it comes to accessing arrays, I admit I'm a little confused with how they work especially with a little more complicated array slicing as seen with:
storeStack.append(x[resMap[j, i + 1], st + dt:en + dt])
Here's my minimal reproducible code below.
import jax.numpy as np
from jax import grad, jit, vmap
from jax import random, ops, jit, lax
import numpy

def getFeature(featData, cc, x, wl, wi, dn, resMap, st, en, numwin):
    resMap = resMap.conj().T
    Fts = 6
    hts = [-dn, 0, dn]
    vts = [-dn, 0, dn]
    n = 0
    outSig = 161
    w = numwin - 1

    n = -1
    for j in range(0, (len(resMap[:, 0]) - 1)):
        for i in range(0, (len(resMap[0]) - 1)):
            n = n + 1

            storeStack = []
            incCounter = 1
            if i < len(resMap[0]):
                for dt in hts:
                    storeStack.append(x[resMap[j, i + 1], st + dt:en + dt])
                    incCounter = incCounter + 1

            else:
                for dt in hts:
                    storeStack.append(x[resMap[j, 1], st + dt:en + dt])
                    incCounter = incCounter + 1

            for dt in vts:
                storeStack.append(x[resMap[j + 1, i], st + dt:en + dt])
                incCounter = incCounter + 1

            Stacked = np.zeros((incCounter, en - st))
            ops.index_update(Stacked, ops.index[0, :], x[resMap[j, i], st:en])
            for val in range(0, len(storeStack)):
                ops.index_update(Stacked, ops.index[val + 1, :], storeStack[val])
            cX =  numpy.random.rand(192,138)

            for f in range(0, Fts):
                ops.index_update(cc, ops.index[f+1], np.sum(np.abs(cX[0, :] - cX[f + 1, :])) / wl)
                ops.index_update(featData, ops.index[f,n,w], cc[f + 1])

    return featData

data = numpy.random.rand(192,138)
windowLen = 128
windowInc = 64
stAF = 1+3-1
enAF = windowLen + 3 -1
i= 0
featData = np.zeros((6, 161, 1))
cc = np.zeros((7))

resVmap = np.array([])
for i in np.arange(1, 25):
    j = ((i - 1) * 8)
    stackThis = np.arange(j, 8 + j)
    resVmap = np.vstack([resVmap, stackThis]
                        ) if resVmap.size else stackThis

jitted= jit(getFeature, static_argnums=(0,1))
%timeit jitted(featData, cc, data, windowLen, windowInc, 1, resVmap, stAF, enAF, i+1).block_until_ready()

Any help or pointers would be greatly appreciated!

Hi - thanks for the question & the nice snippet demonstrating the issue!
When I run your code, I see this error:
IndexError: Array slice indices must have static start/stop/step to be used with NumPy indexing syntax. To index a statically sized array at a dynamic position, try lax.dynamic_slice/dynamic_update_slice (JAX does not support dynamically sized arrays within JIT compiled functions).

The issue here is that your slices are generating arrays of dynamic shape, which is not allowed in jitted JAX code. A quick fix to this is to mark all inputs that determine shapes of sub-arrays as static in the jit. This seems to do the trick:
jitted= jit(getFeature, static_argnums=(0,1,5,6,7,8))

Does that answer your question?

That answers my question. Thank you so much!

I hate to reopen the issue but I just realized one of the ops.index_update calls does not actually update the index.
For this line in particular: ops.index_update(Stacked, ops.index[0, :], x[resMap[j, i], st:en]).
I've disabled jit to debug further but I'm not sure why this is happening. Is it because I'm trying to update the index with another array containing multiple values?
Could you please have a look?

ops.index_update does not update arrays in-place; it returns a modified copy. So, e.g. rather than
ops.index_update(featData, ops.index[f,n,w], cc[f + 1])

you need to do
featData = ops.index_update(featData, ops.index[f,n,w], cc[f + 1])

That makes sense, thanks again!
So I have these index_updates within for loops, would it make sense to combine it with the vmap function for better performance?

Yes, compiling static for-loops will be very slow (the tracing will essentially unroll all the for loops and record the entire linear sequence of operations)
It will be much more efficient if you can express the logic in terms of matrix operations or vmaps. The overall logic of the snippet above is somewhat obscure to me without knowing what each of the parameters mean, but I suspect you'd be able to write this in a way that woudl execute more efficiently in jax.

So I've tried optimizing it with the usage of vmap but I'm not certain if my approach is all that optimal, I apologize for the chickenscratch of code :sweat_smile:
I do get an error with local variable featData being referenced before assignment. What I'm essentially trying to do is the commented out for loop where it iterates over the final variable and assigns a calculation to featData. I've tried doing a vmap version of this but with no luck.
I can get it to compile and run if I just comment out the last few lines and return the final variable as seen here: final = vmap(outerLoop)(new)
But after that point, I get errors or it just is too slow at compiling.
Here's what I have so far.
def getFeature(featData, cc, x, wl, wi, dn, resMap, st, en, numwin):
    resMap = resMap.conj().T
    x = jnp.asarray(x)
    Fts = 6
    hts = [-dn, 0, dn]
    vts = [-dn, 0, dn]
    n = 0
    outSig = 161
    w = numwin - 1

    def outerLoop(j):
    #for j in range(0, (len(resMap[:, 0]) - 1)):

        def innerLoop(i):
        #for i in range(0, (len(resMap[0]) - 1)):

            storeStack = []
            incCounter = 1
            storeStack+= [(x[resMap[j, i + 1], st + dt:en + dt]) for dt in hts]
            incCounter = incCounter + 3

            storeStack+= [(x[resMap[j + 1, i], st + dt:en + dt]) for dt in vts]
            incCounter = incCounter + 3

            Stacked = jnp.zeros((incCounter, en - st))
            Stacked = ops.index_update(Stacked, ops.index[0, :], x[resMap[j, i], st:en])

            for val in range(0, len(storeStack)):
                Stacked = ops.index_update(Stacked, ops.index[val + 1, :], storeStack[val])

            cX = numpy.random.rand(192,138)
            return cX #gives us n x features x values

        this = jnp.arange(0,(len(resMap[0]) - 1))
        calcCX = vmap(innerLoop)(this)

        return calcCX

    new = jnp.arange(0,(len(resMap[:,0]) - 1))
    final = vmap(outerLoop)(new)

    # for x in range(0, len(final)): what I'm trying to accomplish
    #     calcCX = final[x,:,:,:]
    #     for n in range(0, len(calcCX[:,0,0])):
    #         for f in range(0, Fts):
    #             featData = ops.index_update(featData, ops.index[f,n,w], jnp.sum(jnp.abs(calcCX[n, 0, :] - calcCX[n, f + 1, :])) / wl)
    #return featData

    def finaloop3(x):
        calcCX = final[x,:,:,:]
        def finalloop2(n):

            def finalloop1(f):
                featData = ops.index_update(featData, ops.index[f,n,w], jnp.sum(jnp.abs(calcCX[n, 0, :] - calcCX[n, f + 1, :])) / wl)
                return featData

            finalloop1It = jnp.arange(0, 6)
            loop1 = vmap(finalloop1)(finalloop1It)
            return loop1

        finalloop2It = jnp.arange(0, len(calcCX[:,0,0]))
        loop2 = vmap(finalloop2)(finalloop2It)
        return loop2

    finalloop3It = jnp.arange(0, len(final))
    loop3 = vmap(finaloop3)(finalloop3It)
   return loop3 #the final featData after all the index updates

Thanks - it's still hard for me to tell what this is doing, because of all the inner-loop indexing that happens. It looks a bit like some sort of convolution – you might try to express it in terms of JAX's built-in convolution operators.
In general, algorithms based on nested loops over inexpensive computations are not going to perform well in JAX, unless they can be re-expressed in terms of existing primitives.

As I understand the code, it's essentially doing what's highlighted in this section below.

Where,
MAD-L[i,j,dn] would correlate to this:
storeStack+= [(x[resMap[j, i + 1], st + dt:en + dt]) for dt in hts]
MAD-T[i,j,dn] would correlate to this:
storeStack+= [(x[resMap[j + 1, i], st + dt:en + dt]) for dt in vts]
and the final calculation of the summation and division taking place here:
featData = ops.index_update(featData, ops.index[f,n,w], jnp.sum(jnp.abs(calcCX[n, 0, :] - calcCX[n, f + 1, :])) / wl)

Yeah, that definitely looks like it could be expressed as a convolution. I'd suggest going that route rather than writing all the loops manually. You can construct a kernel that essentially encodes the sums that happen at each location, and do the whole thing in one operation.

Do you have any resources that I could look into to constructing kernels and expressing this as a convolution?

I don't know of any such resource, but a simplified version of what I have in mind is something like this:
import numpy as np
import jax.numpy as jnp
from jax.scipy.signal import convolve2d

def slow_convolve(M, k):
  result = np.zeros_like(M)
  for i in range(M.shape[0]):
    for j in range(M.shape[1]):
      for m in range(k.shape[0]):
        for n in range(k.shape[1]):
          if i + m < M.shape[0] and j + n < M.shape[1]:
            result[i, j] += k[m, n] * M[i + m, j + n]
  return jnp.array(result)

def fast_convolve(M, k):
  full_result = convolve2d(M, k[::-1, ::-1], mode='full')
  return full_result[-M.shape[0]:, -M.shape[1]:]

M = jnp.array(np.random.rand(10, 10))
k = jnp.array([
  [1, 2, 3],
  [4, 2, 1],
  [5, 1, 1]
])

result1 = slow_convolve(M, k).round(1)
result2 = fast_convolve(M, k).round(1)
np.allclose(result1, result2)
# True

In the same way that these nested loops can be replaced by a fast built-in convolution operation, I believe that the nested loops in your code can be replaced by a fast built-in convolution operation.

Thanks for the helper code for the convolution. I'm trying a different approach where I unrolled the double for loop into a single for loop. I'm trying to achieve it with a vmap operation but I'm running into an error stating list indices must be integers or slices, not BatchTracer. This error arises when I try to access the nth value of the newMap to obtain integers j and i. The nth value seems to be outputting the entire range as opposed to the individual integers the innerLoop should be iterating over.
I've attached the minimal reproducible code below.
def getFeature(featData, cc, x, wl, wi, dn, resMap, st, en, numwin):
    resMap = resMap.conj().T
    Fts = 6
    outSig = 161

    w = numwin - 1

    newMap = []

    for j in range(0, (len(resMap[:, 0]) - 1)):
        for i in range(0, (len(resMap[0]) - 1)):
            newMap.append([j,i])

    def innerLoop(n):
        Stacked = np.zeros((7, en - st))
        j,i = newMap[n] #n should be an integer

        Stacked = ops.index_update(Stacked, ops.index[0, :], x[resMap[j, i], st:en])

        Stacked = ops.index_update(Stacked, ops.index[1, :], x[resMap[j, i + 1], st -1:en -1])
        Stacked = ops.index_update(Stacked, ops.index[2, :], x[resMap[j, i + 1], st:en])
        Stacked = ops.index_update(Stacked, ops.index[3, :], x[resMap[j, i + 1], st+1:en +1])

        Stacked = ops.index_update(Stacked, ops.index[4, :], x[resMap[j + 1, i], st -1:en -1])
        Stacked = ops.index_update(Stacked, ops.index[5, :], x[resMap[j + 1, i], st:en])
        Stacked = ops.index_update(Stacked, ops.index[6, :], x[resMap[j  + 1, i], st+1:en+1])

        cX = normalizeM(Stacked)

        featData = ops.index_update(featData, ops.index[0, n, w], np.sum(np.abs(cX[0, :] - cX[0 + 1, :])) / wl)
        featData = ops.index_update(featData, ops.index[1, n, w], np.sum(np.abs(cX[0, :] - cX[1 + 1, :])) / wl)
        featData = ops.index_update(featData, ops.index[2, n, w], np.sum(np.abs(cX[0, :] - cX[2 + 1, :])) / wl)
        featData = ops.index_update(featData, ops.index[3, n, w], np.sum(np.abs(cX[0, :] - cX[3 + 1, :])) / wl)
        featData = ops.index_update(featData, ops.index[4, n, w], np.sum(np.abs(cX[0, :] - cX[4 + 1, :])) / wl)
        featData = ops.index_update(featData, ops.index[5, n, w], np.sum(np.abs(cX[0, :] - cX[5 + 1, :])) / wl)

    this = np.arange(0,161)
    vmap(innerLoop)(this)

    return featData

data = numpy.random.rand(192,138)
windowLen = 128
windowInc = 64
stAF = 1+3-1
enAF = windowLen + 3 -1
i= 0
featData = np.zeros((6, 161, 1))
cc = np.zeros((7))

resVmap = np.array([])
for i in np.arange(1, 25):
    j = ((i - 1) * 8)
    stackThis = np.arange(j, 8 + j)
    resVmap = np.vstack([resVmap, stackThis]
                        ) if resVmap.size else stackThis

jitted= jit(getAF, static_argnums=(0,1,5,6,7,8))
%timeit jitted(featData, cc, data, windowLen, windowInc, 1, resVmap, stAF, enAF, i+1).block_until_ready()

Hi - so the issue here is your assumption that n is an integer. JAX's jit works by feeding tracers into the function to determine what the function does. A shorter example of the issue you're encountering is this:
from jax import jit
L = [i for i in range(10)]
def func(n):
  return L[n]
jit(func)(0)

When you call the jitted function, JAX "compiles" the function by passing tracers to determine the operations that the function does; this results in the Python list indexing being passed a tracer, which results in
TypeError: list indices must be integers or slices, not DynamicJaxprTracer

If you want to jit-compile (or vmap, or grad, etc.) a function, that function must only use inputs in jax expressions. So, for example, this would work:
L = jnp.arange(10)
def func(n):
  return L[n]
jit(func)(0)

because jax array indexing knows how to respond when it sees a tracer.
Does that make sense?

Yeah that helps immensely!
Solved the error I'm facing but now I can't seem to get the right output out, I just get a 3D array full of 0s for some reason.
I suspect this is because of the way I'm passing in featData to the vmap partial function. Should I be returning the updated featData instead and collecting it after the innerLoop is complete?
import jax.numpy as np
import jax
from jax import grad, jit, vmap, pmap
from jax import random, ops, jit, lax
import numpy
from jax.config import config
config.update("jax_enable_x64", True)
from functools import partial

def innerLoop(featData, x, wl, resMap, st, en, newMap, n):
  Stacked = np.zeros((7, en - st))
  j,i = newMap[n]
  Stacked = ops.index_update(Stacked, ops.index[0, :], x[resMap[j, i], st:en])

  Stacked = ops.index_update(Stacked, ops.index[1, :], x[resMap[j, i + 1], st -1:en -1])
  Stacked = ops.index_update(Stacked, ops.index[2, :], x[resMap[j, i + 1], st:en])
  Stacked = ops.index_update(Stacked, ops.index[3, :], x[resMap[j, i + 1], st+1:en +1])

  Stacked = ops.index_update(Stacked, ops.index[4, :], x[resMap[j + 1, i], st -1:en -1])
  Stacked = ops.index_update(Stacked, ops.index[5, :], x[resMap[j + 1, i], st:en])
  Stacked = ops.index_update(Stacked, ops.index[6, :], x[resMap[j + 1, i], st+1:en+1])

  cX = numpy.random.rand(192,138)

  featData = ops.index_update(featData, ops.index[0, n, 0], np.sum(np.abs(cX[0, :] - cX[0 + 1, :])) / wl)
  featData = ops.index_update(featData, ops.index[1, n, 0], np.sum(np.abs(cX[0, :] - cX[1 + 1, :])) / wl)
  featData = ops.index_update(featData, ops.index[2, n, 0], np.sum(np.abs(cX[0, :] - cX[2 + 1, :])) / wl)
  featData = ops.index_update(featData, ops.index[3, n, 0], np.sum(np.abs(cX[0, :] - cX[3 + 1, :])) / wl)
  featData = ops.index_update(featData, ops.index[4, n, 0], np.sum(np.abs(cX[0, :] - cX[4 + 1, :])) / wl)
  featData = ops.index_update(featData, ops.index[5, n, 0], np.sum(np.abs(cX[0, :] - cX[5 + 1, :])) / wl)

def getFeature(featData, cc, x, wl, wi, dn, resMap, st, en, numwin):
    resMap = resMap.conj().T
    Fts = 6
    outSig = 161

    w = numwin - 1

    ithMap = np.zeros((1,161))
    jthMap = np.zeros((1,161))
    newMap = []

    for j in np.arange(0, (len(resMap[:, 0]) - 1)):
        for i in np.arange(0, (len(resMap[0]) - 1)):
            newMap.append([j,i])

    newMap = np.array(newMap)

    nth = np.arange(0, 161)
    vmap(partial(innerLoop, featData, x, wl, resMap, st, en, newMap))(nth)

    return featData

data = numpy.random.rand(192,138)
print(data)
windowLen = 128
windowInc = 64
stAF = 1+3-1
enAF = windowLen + 3 -1
i= 0
featData = np.zeros((6, 161, 1))
cc = np.zeros((7))

resVmap = np.array([])
for i in np.arange(1, 25):
    j = ((i - 1) * 8)
    stackThis = np.arange(j, 8 + j)
    resVmap = np.vstack([resVmap, stackThis]
                        ) if resVmap.size else stackThis

jitted= jit(getFeature, static_argnums=(0,1,5,6,7,8))
gotit = jitted(featData, cc, data, windowLen, windowInc, 1, resVmap, stAF, enAF, i+1).block_until_ready()
print(gotit.shape)
print(gotit[:,:,0]) #all zeros?

You pass in featData as an array of zeros, but getFeature never modifies the array before returning it. Perhaps you mean to return the result of the vmapped function?

Yep, that's exactly what I was missing. Just as a final note before I finally close this issue is there a faster way to perform the ops.index_update without having to do it in a for loop?
This is my current approach:
    got = vmap(partial(innerLoop, x, wl, resMap, st, en, newMap))(nth)

    for x in range(0,161):
        featData = ops.index_update(featData, ops.index[:, x, 0], got[x, :,0])

Could I somehow update multiple indices at the same time or collect this in a more efficient manner?

You should be able to do it in one step with something like this:
featData = ops.index_update(featData, ops.index[:, :, 0], got[:, :, 0].T)

That solves it, thank you so much for all the assistance and pointers! I'm starting to get the hang of JAX and the power it wields. Appreciate it!


dartfn updates

First step toward synchronizing templates/examples. Fixes #268

Want to bump the version number and add a changelog entry to dartfn?


Automate Greeting Workflow

Description:
I would like to propose the automation of our greeting workflow to streamline and improve the efficiency of our communication processes. Currently, greetings are manually sent, which can result in delays, inconsistency in messaging, and an increased workload for the team. Automating this workflow would ensure that greetings are sent promptly and uniformly, improving user experience and reducing manual effort.
Key Areas to Address:

Automated Triggers: Establish specific triggers for greeting messages, such as user registration, user login, or specific time-based events.
Personalization: Implement dynamic content to personalize the greetings, ensuring that the message feels relevant to the recipient.
Consistency: Ensure uniform messaging across different platforms, reducing potential inconsistencies caused by manual input.
Scheduling: Include a scheduling function to automatically send greetings at appropriate times, depending on time zones or business hours.
Monitoring & Analytics: Implement monitoring and analytics features to track the success rate of the automated greetings and make adjustments where necessary.

Expected Benefits:

Increased efficiency and reduced manual workload.
Improved consistency in greetings.
Enhanced user experience through timely, personalized messages.
Ability to track and measure the effectiveness of the greeting messages.

Please @kvcops assign me this issue with labels "gssoc-ext" , "hacktoberfest-accepted" and "level3".

Seems interesting...but what is the use case for the modifications that you have suggested?

Its like anyone dosent feel like they are not been responded

if you want i can create a autolable workflow greeting where the labels "gssoc-ext" and "hacktoberfest-accepted" will add to them as soon as they raise the issue and "levels" the admin can only assign it

Hmm..let's give it a try...so that I can understand

Do assign me this issue with labels "gssoc-ext" , "hacktoberfest-accepted" and "level3".


Lowercase query options

Hello, I've been using this tool for several days and I'm loving it so far!
However, there's one minor issue: the tool does not recognize query types in lowercase (a instead of A, txt instead of TXT, mx instead of MX, etc...). I'm not familiar with C# per se, but I think this can be fixed by converting all query types to uppercase.
It would be better if dug behaved like dig, which is parsing query types when they're specified in place of the "verbs" i.e. dug mx example.com, since dug by default run with the verb "run".
Thank you for creating this tool!

Hey @tk-nguyen , I created #15 to capture your second idea. Also thanks for the issue! :)

Hey @tk-nguyen , I created #15 to capture your second idea. Also thanks for the issue! :)

Thanks for being so quick in fixing it :+1: !

Thanks for being so quick in fixing it :+1: !


Update readme

Just a few updates to the repository README

I also reduced the image size slightly in the merge.


Different size of gaps_out on all sides

It would be nice if you could specify size of gaps_out on each side separately e.g. (gap_out left could be 20, gap_out down 10...).
In the config file you could do gaps_out=5,10,10,8

dupe of #148


-D external parameters Readme.md sample does not work

The example of using external_parameters.fetch shown in the Readme and in sample/t1.rb does not work with the -D switch.
Example:
cfndsl -D "description=a_test_description" ./t1.rb
raw code:1:in eval_file_with_extras: undefined local variable or method 'a_test_description' for CfnDsl:Module (NameError)

Interestingly this works
cfndsl -p -D "description=description" ./t1.rb
...
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "description",
  "Resources": {
    "machine1": {
      "Properties": {
        "ImageId": "ami-12345678"
      },
      "Type": "AWS::EC2::Instance"
    }
  }
}

When using the -D switch in legacy parameter mode, you need to quote your strings, like this:
-D "description='a_test_description'"

Otherwise you will get the error you got above. I would recommend, however, to disable the binding of parameters to constants by using the -b switch. This interpolates variables only in the external parameters hash, and it treats all values as strings. The above command will work as specified this way as well.
bin/cfndsl -b -p -D "description=a_test_description" sample/t1.rb

Thanks for the info - that works much better with the -b switch.
I'm not sure the -D switch alone is working as intended.
cfndsl  -p -D "description='my_test_description'" sample/t1.rb
contains the single quotes in the generated output
{                                             "AWSTemplateFormatVersion": "2010-09-09",   "Description": "'my_test_description'",     "Resources": {                                "machine1": {                                 "Properties": {                               "ImageId": "ami-12345678"                 },                                          "Type": "AWS::EC2::Instance"              }                                         }                                         }

PS. I've updated the Readme.md with a working example.

I can see how the behavior would be confusing, however, it is functioning as intended. The legacy behavior was to take the key-value pair from the -D flag and evaluate it as raw ruby code. This begets the need for quoting values twice, otherwise ruby won't compile the statement. In the new world, the behavior is to split the key-value pair at the equal sign, and create an entry in the external_parameters hash, with the value always being represented as a string.
The two behaviors don't play very nicely together, as you've seen. It's preferable to pick one over the other, and since the legacy behavior is deprecated, it is recommended that you use the newer behavior always (the -b invocation). Knowing that all values will become strings allows you to not worry about getting the quoting correct.
Knowing all this, I think it would be more beneficial to update the README with the newer behavior, and omit the quotation fixes. The example will be working again as specified, but will hopefully encourage utilizing the code in the new way.


update proto file

headers field in RpcHttp is updated to <string, object> pairs.  ToRpcHttp and FromRpcHttp methods in Converters.ts need to be  updated.

@mhoeger - functions host changes and nodejs worker changes need to be merged at the same time as we are updating existing field.


Access is denied

I tried to run it in command prompt with my home ip address and windows 10 interrupted it with the ‘This app can’t run on your PC’ pop up and and after clicking close it then said access denied. Either it can not run in windows 10 or it was incompatible. In case if you are wondering I am running Windows 10 22H2 or later.

its happening to me the same thing


Inserting a default .editorconfig file in the template folder.

Thanks for the PR @guastallaigor! Unfortunately, this is not an interest of electron-vue.


Is it possible to add a recurring task and a kanban view similar to schedule manager plugin?

Hi, I really liked this plugin and user experience. I feel that this plugin has better support and configuration options and has better english language support.
I just need these 2 features -

Recurring task creation/tracking
Kanban board

How difficult do you suppose this will be ?
This plugin does most of the job, but I find your plugin to be more polished. Is it possible to merge these features?

Thank you for your likes and suggestions about the plugin.
I will correct my English in the future.
Regarding the two features you mentioned:

The first point: Recurring task creation/tracking
I can modify the handle date of the task to a date range, but I cannot set up a recurring task because the task in the plug-in comes from the note's content, and when the task is completed, the task will be marked as finished. Currently, the status obtained by the plug-in is finished, so I think repeated tasks cannot be achieved.
Also, what track are you talking about? I don’t quite understand what you mean. What kind of effect do you want?

Second point: Kanban board
The Kanban view is a relatively large feature point. This can be implemented, but it will take some time. Please be patient and I will implement it as soon as possible.

Regarding these two features, if you have good specific ideas, please tell me, and I will think about them and see how to implement these features.

Can you create a notebook or a page with these API functions and add recurring tasks?
https://github.com/RogerHuHu/siyuan-plugin-schedule-manager/blob/1166e4d621b48df67405402e71c44d7c95d061a3/src/index.ts#L88C1-L99C1

I can create a notebook, but the task-list plugin is different. The task-list plugin obtains task data in the following way: SELECT * FROM blocks WHERE type = 'i' AND subtype = 't' ORDER BY created ASC LIMIT 2000. Tasks can only be data whose block subtype is 't' in the notes.
The completion status of the task is determined by the status of the "block subtype = 't'" in the notes. If Finished is checked, then the task is finished, so I think that there is no way to set a recurring task.
I can give you an example:
The date of a recurring task is to be executed every Monday. If Finished is checked on this Monday, then the task on next Monday will already be finished.

Makes sense. This would mean that either -

Every block needs to have more subtypes or a special subtype for a recurring task
Or we treat this as a special type of task (not registered as a regular block with type 't')... but this would altogether make it a big task to get this feature in place if we work with the binds of the SiYuan API/Block types

I get what you mean.... let me think about a solution for this.

Yes, as you say, I think the most difficult point is the recurring task status(todo or done).


[ZEPPELIN-6079] Fix Interpreter Configuration not working in new UI

What is this PR for?
There was an error in the new UI, that if dependencies of a interpreter was set in old UI, user could not see and edit the interpreter in new UI. More details about the issue can be seen in the comments HERE
Before
Congifuring interpreter in old UI:

Not being able to interact with the configured interpreter in new UI:

After
Successfully can view and edit the configuration in new UI:

(Please don't mind the logs starting with '#####' and 'EXCLUSIONS' - I forgot to remove it when taking the screenshot)
What type of PR is it?
Bug Fix
Todos

[x] - Fix error

What is the Jira issue?
ZEPPELIN-6079
How should this be tested?

Build and test - configure an interpreter via the old UI, and then switch to the new UI to verify that dependencies are now visible and editable.

Questions:

Does the license files need to update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

CI failure is irrelevant, merging to master


fix: cnpg-i instance manager plugins invocation

The instance manager should try to load only available plugins, as some of them declared in the Cluster spec might be available only to the operator.
closes #5648

I simplified your implementation @GabriFedi97, give it a look

Hey @leonardoce, thanks for the review. I agree, your implementation is certainly cleaner. I believe your implementation could behave slightly different though and there is an edge case which is worth to mention IMO.
Assuming to have a plugin running on both operator side, for registering itself as a operand sidecar, and operand side to handle WAL related hooks, with my implementation I tried to keep relying on the Cluster spec, instead of just relying on the available sockets in plugin path. I saw that we are not restarting/recreating the pg pods if the plugins change or get disabled in the Cluster spec, which means that if a plugin socket is present on the plugins path, with the current implementation it would be kept considered for WAL archiving invocation (or other related capabilities). In that case the pods should be deleted manually, to let the operator recreating it without the disabled plugin sidecar.

The main problem is that plugins are not being uninstalled, and this happens regardless of whether this patch is applied.
We certainly need to address that. Let me think about it.

Yeah right, they would just be ignored as the GetEnabledPluginNames function would not return them and the plugin would get uninstalled during the next pod recreation.

Yes, but with your implementation that was implied and buried inside the error handling, and not explicit.
I'm trying to make this clearer.

https://github.com/EnterpriseDB/cloudnative-pg/actions/runs/11073055607

/test limit=local


Add extension components to component status table in docs/quick-reference

There are additional components in the Navigation and Marketing extensions that are not listed on the component status page in quick-reference. Namely .image-switcher, .carousel in marketing and .pricing-table in e-commerce.
Would be nice to be able to see the status of these components there, especially . carousel since it still seems to be a work in progress.

Fair enough - we currently only show base library components and not any of our patterns / extensions. Feel free to add those in a PR, or we can try to look at updating that the next pass we do of the Quick Reference section.


encoding/json: unexpected result when json.Unmarshaling

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

$ go version
go version go1.14.1 windows/amd64

Does this issue reproduce with the latest release?
Yes, it reproduces with the latest release.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows

What did you do?
My struct has a string field with a json:"string" field tag. When this field contains escaped character, I get unexcepted result when doing roundtrip test.

type T struct {
	F1 string `json:"F1,string"`
}

t := T {
	"aaa\tbbb",
}

b, _ := json.Marshal(t)
if err := json.Unmarshal(b, &t); err == nil {
	fmt.Printf("%+v\n", t)
}else {
	fmt.Println(err)
}

What did you expect to see?
{F1:aaa	bbb}

What did you see instead?
json: invalid use of ,string struct tag, trying to unmarshal "\"aaa\tbbb\"" into string

I've confirmed this is a duplicate of #38105. I'll close this issue to consolidate into the other one, but I'll add this as a test case.

It seems that https://golang.org/cl/226218 has fix this issue. However, I still have a question.
type T struct {
	F1 string `json:"F1,string"`
}

t := T {
	"aaa\tbbb",
}

b, _ := json.Marshal(t)
fmt.Println(string(b))

Before go 1.14, its output result is
{"F1":"\"aaa\\tbbb\""}

Add after go 1.14, it changes to
{"F1":"\"aaa\tbbb\""}

It seems this change is introduced by this commit but may I ask why you change the encode behavior for string type struct field with ",string" option like this? Which of them excatly match the godoc's description?

The "string" option signals that a field is stored as JSON inside a JSON-encoded string

You're right, @AllenX2018, something is up with this change in behavior. Can you please file a separate issue? I'm already investigating a fix, but it's good to have an issue to track the bug.

I've created #38173 for track


Still alert for certificate expires, even if TLS/SSL errors for HTTPS sites are ignored

⚠ Please verify that this question has NOT been raised before.

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

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
When monitoring a site with a self-signed certificate over HTTPS, if you set to ignore TLS/SSL errors for HTTPS sites, you will not receive alert emails when the certificate expires.
📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23.7
💻 Operating System and Arch
windows10
🌐 Browser
Chrome
🖥 Deployment Environment

Runtime:
Database:
Filesystem used to store the database on:
number of monitors:

I don't quite get this question.
If you ignore TLS/SSL errors, this includes ignoring the certificate expires.
If you are asking how to register your custom CA, please consider using the NODE_EXTRA_CA_CERTS environment variable to add your self-signed ca certs. (e.g. /cert/path/CAcert.pem) Read more

I modify the file ecosystem.config.js:
module.exports = {
apps: [{
name: "uptime-kuma",
script: "./server/server.js",
env_production: {
NODE_ENV: "production",
NODE_EXTRA_CA_CERTS: "./cert/test.crt"
}
}]
};
restart :
node server/server.js
the error still exists: Certificate chain invalid

node server/server.js does not utilise any ecosystem.config.js.
ecosystem.config.js is a file used by pm2, see https://pm2.keymetrics.io/docs/usage/application-declaration/

when run command is  node server/server.js, how to config  NODE_EXTRA_CA_CERTS

How you configure environvent variables for commandline calls depends on your OS.
Given that you did leave this field (Runtime, Filesystem) empty above I can't quite help you with this.
On posix based systems, this would be
export NODE_EXTRA_CA_CERTS=value
node server/server.js

Ok, glad to know that that worked for you


export from R?

Can we export a plotly image from R with Kaleido? How to do this?

Hi @bigomics, I'm not sure whether the R-plotly library has kaleido support. Maybe @cpsievert could chime in?

No, the R package only has support for orca() at the moment

I believe that @cpsievert recently updated this?

Yea, the development version now has save_image(), which uses kaleido() under the hood.

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson


Auto-indent in Atom thinks one space is sufficient indentation

Prerequisites

[x] Can you reproduce the problem in safe mode?
[x] Are you running the latest version of Atom?
[x] Did you check the debugging guide?
[x] Did you check the FAQs on Discuss?
[x] Are you reporting to the correct repository?
[x] Did you perform a cursory search to see if your bug or enhancement is already reported?

Description
Atom thinks one space is sufficient indentation and promptly indents my code one space when I copy and paste or move code.
Steps to Reproduce

Get some code with comment docblocks:

/**
 * Lorem ipsum dolor.
 */

Copy some random code after a comment docblock:

while (true) {
	//
}

Expected behavior: Code is copied without being indented by once space.
Actual behavior: Code is copied and indented one space.
GIF showing behavior

Versions

Windows 7 Ultimate x64 – Atom 1.7.4

> atom --version

Atom    : 1.7.4
Electron: 0.36.8
Chrome  : 47.0.2526.110
Node    : 5.1.1

> apm --version

apm  1.9.2
npm  2.13.3
node 0.10.40
python 3.5.1
git 1.9.5.msysgit.1
visual studio 2012

Same problem here!
Also when selecting all and applying Auto Indent it messes the indentation:
  /**
  * Constructor.
  */

  constructor

😢
Mac OSX El Capitan 10.11.5 – Atom: 1.8.0
> apm --version

apm  1.9.2
npm  2.13.3
node 0.10.40
python 2.7.10
git 2.8.1


[Logistic] Get access to original Firebase server

According to original documentation:

The Firebase project can be accessed at:
https://console.firebase.google.com/u/0/project/jigsaw-25200/overview

We need to access that server, or at least its back-end code base, to extract useful pieces.
@profRic Could you help with this issue? I'm unsure what is the status of the server, but I get "Access denied" when I access the link above. This issue need to be fixed sooner than later to avoid blocking back-end development.

what Google ID are you using / want to use?  I can add you to the auth table if you are not already

what Google ID are you using / want to use? I can add you to the auth table if you are not already

My Google ID is the same as my gmail,

Try now

oops - didn't mean to close yet

Yep I can see the database now. Will dig more during the week.


Polymer Behaviors Not Compatible with Type Based Optimizations

I've yet to figure out how to create a simple repo, but the type based optimizations can break Polymer behaviors. The behavior literal keys are renamed in a conflicting manner:
/** @polymerBehavior */
var fooBehavior = {
  foo: function() { alert('foo'); },
};

/** @polymerBehavior */
var barBehavior = {
  bar: function() { alert('bar'); },
};

(function() {
  Polymer({
    is: 'foo-bar',
    behaviors: [fooBehavior, barBehavior]
  });
})();

Becomes something like:
/** @polymerBehavior */
var a = {
  b: function() { alert('foo'); },
};

/** @polymerBehavior */
var c = {
  b: function() { alert('bar'); },
};

(function() {
  Polymer({
    is: 'foo-bar',
    behaviors: [a, c]
  });
})();

I believe the way to fix this is to change the PolymerPass processing of behaviors such that a synthetic interface is created for each behavior. The behavior object literal will then be type cast to that interface and any Polymer elements using the behavior will be marked as implementing it.
I'm guessing this hasn't come up at Google because the Polymer-Renamer is already incompatible with type based optimizations. However https://github.com/banno/polymer-rename does support them.

AFAIU, you're saying that the root of the problem is that the two object literals appear unrelated to the type-based optimizations, but are combined in behaviors: [a, c], so their properties should have distinct names.
However, the way property disambiguation works, properties on object literals are the same as defining a property on Object, so they are related to all object types, and are never disambiguated. (Example)[https://closure-compiler-debugger.appspot.com/#input0%3Dvar%2520o1%2520%253D%2520%257B%2520mypropone%253A%2520123%2520%257D%253B%250A%250Avar%2520o2%2520%253D%2520%257B%2520myproptwo%253A%2520234%2520%257D%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3D1%26CHECK_SYMBOLS%3D1%26CHECK_TYPES%3D1%26CLOSURE_PASS%3D1%26DISAMBIGUATE_PROPERTIES%3D1%26GENERATE_PSEUDO_NAMES%3D1%26MISSING_PROPERTIES%3D1%26PRESERVE_TYPE_ANNOTATIONS%3D1%26PRETTY_PRINT%3D1%26PROPERTY_RENAMING%3D1%26TRANSPILE%3D1]
So, either the polymer pass rewrites them in some weird way (I'm not very familiar with the polymer pass), or the bug is in AmbiguateProperties. You can try editing the source to turn on/off individual passes and enable pseudo renaming, to see if you can narrow it down.

or the bug is in AmbiguateProperties

This appears to be the case. I created a custom build with ambiguateProperties turned off, but the other type-based optimizations enabled and the issue didn't occur.
Debugging further to find out why.

cc @jklein24 @rictic

/cc @justinfagnani

More info: while we avoid disambiguating properties on object literals, we currently do ambiguate them - thus the issue. This has worked well for a long time and I'd hate to change it outright.
I think I'd like to change the polymer pass such that polymer behaviors are marked as records and polymer elements marked as implementing those records. I believe that will fix the issue.

This was closed by #2143


When i use rollupConfig[external],the product will contain the import in index.js

Describe the bug
this is my code in src/index.js:

that is dist/index.js

where did the code come from？

Reproduction
https://stackblitz.com/edit/vitejs-vite-zds8xc?file=package.json
System Info

  System:
    OS: macOS 12.4
    CPU: (8) x64 Apple M1 Pro
    Memory: 248.41 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.19.1 - /usr/local/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 8.7.0 - /opt/homebrew/bin/npm
  Browsers:
    Safari: 15.5

Used Package Manager
yarn
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Actually I'm not sure about my comment, so I've opened https://github.com/rollup/rollup/issues/4564


solderer

Issue description: autocrafting back up
What happens:
when trying to autocraft items that are in the solderer it always inputs double the redstone
What you expected to happen:
not this
Steps to reproduce:

go to terminal
autocraft any processor
3.check solderer
...

Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge:
Refined Storage:

Does this issue occur on a server? [yes/no] yes
If a (crash)log is relevant for this issue, link it here:
no crash

refined storage version is 1.2b5
forgot to include that sorry

figured it out. it was a derp on my end


Document DistributedDataParallel Static Graph support

📚 Documentation
PyTorch 1.11 makes static graph a stable feature for DDP. https://pytorch.org/blog/pytorch-1.11-released/#distributed-training
There are no code changes needed to support this from the Lightning framework POV: all kwargs to the DDPStrategy are forwarded to the DistributedDataParallel constructor here: https://github.com/PyTorchLightning/pytorch-lightning/blob/3b4061f39a8af47a77e9dfa58256e818784b21ca/pytorch_lightning/strategies/ddp.py#L159
Users can enable this with the following
trainer = Trainer(strategy=DDPStrategy(static_graph=True))

This should be added to the DDP optimization sections in the docs here: https://pytorch-lightning.readthedocs.io/en/latest/advanced/advanced_gpu.html#ddp-optimizations

If you enjoy Lightning, check out our other projects! ⚡

Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.

Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.

Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.

Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

cc @borda @rohitgr7 @justusschock @kaushikb11 @awaelchli @akihironitta

@ananthsub let s get this for 1.6, seems quite simple to get in.


Issue with input

Input zoom in Drawer stop working
When we use noBodyStyles={true}

I have the same. It seems like noBodyStyles has no effect any longer. Can we please restore this functionality?


Foundation 6.0.4 utils/_selector.scss breaks form text inputs on gulp-sass

This issue is similar to #7204. Foundation 6.0.4 forms fail when compiling with gulp-sass. PR #7131 messed up the quotes in the text-inputs function. Reverting from escaped single quotes back to double quotes fixes the issue.
Why was PR #7131 approved in the first place? CSS style guides predominantly use double-quoted strings, not single-quoted strings.

Not seeing this behavior in gulp-sass 2.1.0, which points to Libsass 3.4.x, which is the version we support.
We prefer single quotes because they're easier to type. We do the same for JavaScript as well. Our scss-lint.yml file documents our preferred ways to write Sass.

I am using gulp-sass 2.0.4 with node-sass 3.3.3

You'll need to be on the newest version of Libsass to compile properly. The newest version is at full feature parity with Ruby Sass, which is why we require it.
Upgrade to gulp-sass 2.1.0 to get the newest version.


Please add the feature to ocr-translate text.

Please add the feature to ocr-translate text...
like how the android app "google translate" uses the camera to translate by overlaying the original text with the translated text but instead without having to use a camera & or external device to ocr translate text

...
Mode which would include change

[ ] General

This is something I'm looking into. Captured here #223


Fix mvp one

[X] Fixed #115 but need to center the image, @Shehanka can you help me?
[X] Fixed #117
[X] Fixed #119
[X] Fixed #127
[X]  Fixed #121
[X] Fixed #122

@ebonynon show me a screenshot

@ebonynon show me a screenshot

@ebonynon Have a look
https://stackoverflow.com/questions/16438173/center-text-in-fixed-height-div

@ebonynon Have a look
https://stackoverflow.com/questions/16438173/center-text-in-fixed-height-div

@ebonynon My heart is overflowing with gratitude. Thanks from the bottom of my heart!

My pleasure. Glad to contribute.

@ebonynon My heart is overflowing with gratitude. Thanks from the bottom of my heart!

My pleasure. Glad to contribute.


Update s3, sdk-core, sqs to 2.17.40

Updates

software.amazon.awssdk:s3
software.amazon.awssdk:sdk-core
software.amazon.awssdk:sqs

from 2.17.38 to 2.17.40.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "software.amazon.awssdk" } ]

labels: library-update, semver-patch

Superseded by #298.


Can't render PDF forms

Hello.
I'm trying to render some forms from .pdf file saved in the assets folder of the my project, and failing hard with it.
I've tried to use the .enableAnnotationRendering(true) notation, but seems it isnt working. I'm going very happy if you can help me.
Thank you, Renan.

Same here. Badly need that feature.


Add built-in autoformatting tool

The editor should maybe have a tool to tidy up the code's indentation and such.
Requirements:

It's never done automatically
It doesn't touch semicolons or quote styles, only spacing
Doesn't do weird line width normalization
Isn't too prominent in interface
It intuits indentation style?

I love the "tidy code" wording that the P5 editor uses!

Can I work on this issue?

@gptkrsh sorry for the delay response, go for it!

Closing this as not planned - if anything I think the platform code itself would benefit from additional linting/etc, not sprig games...  @leomcelroy be aware I am axing this, if you feel strongly about it and want to advocate for its existence plz reopen & ping me...


HOPSWORKS-570

Temporarily disable dataset set in cluster dataset listing.
This should once again make the listing usable.
Future work - consider immutable datasets and size save in db or mutable datasets with size being recomputed periodically in the db and providing this stale value on listings.

testing https://github.com/hopshadoop/hops-testing/pull/100


Gosip with latest PJSIP

Can we use gossip wrapper with latest pjsip version?

I use PJSIP version 2.4.0 and it works with Gossip, I assume it also works with the 2.4.5 version :)

@xdurand  Thanks for your reply
Hi, did you implemented Incoming call in your project or only outgoing call?

Sorry for the (very) late answer @Talha-Ghous!
We've done both incoming and outgoing calls, and it's now running with PJSIP newest version, 2.5

Thanks for your kind reply. its really helpful.l
Talha Ghous
E<EMAIL_ADDRESS>T +92<PHONE_NUMBER>
On Fri, Jun 3, 2016 at 2:24 PM, Xavier Durand<EMAIL_ADDRESS>wrote:

Sorry for the (very) late answer @Talha-Ghous
https://github.com/Talha-Ghous!
We've done both incoming and outgoing calls, and it's now running with
PJSIP newest version, 2.5
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/chakrit/gossip/issues/29#issuecomment-223532592, or mute
the thread
https://github.com/notifications/unsubscribe/AQgx6tfWt8hjFxsSio9PxnFiKtebaDj0ks5qH_LagaJpZM4Hc-xw
.

@xdurand could you please guide me step by step that how did you use latest PJSIP version with GOSSIP . It would be very helpful. Thanks

+1


Added transition effects for the destination card

Issue No. #193

adding hover effect in the destination card for a more user friendly interface.

Output Screenshots :

please check the pull request no- #232 and u can suggest your feedback.

@ANSHUMANDAS1506 nice transition
But you need to add that checklist according to contributing gudelines(which was present in original PR format).
Just add that checklist.

Hey can u check my latest pull request #250 and u can give your feedback on it.


[10.x] Check only for first key in JSON response

Based on issue https://github.com/laravel/framework/issues/46322
The developer can set a wrapper for response and we don't need to check if that wrapper exists on the responses keys. Only check for first key is enough.
So developer can make something like this simply:
{
    "test": {
        "id": "X",
        "test": "test"
    }
}

I kinda think you should just not reuse your wrapper key in your data if possible. It would be pretty confusing for API consumers.

@taylorotwell ,
I got it.
Thanks


Simplify C header parser

Parsing C headers to archives is a pain. A naive approach would be parsing headers in a folder (recursively in each subfolder) in every possible order (i.e. changing the sorting of headers) until succeeds. Backtracking could also be used. Command line options too could be handled this way.
This could be implemented as an option (it may require some time to complete)

This may not exactly be helpful, but at the moment I find it much more reliable and easier to pull the datatypes from the debug libraries and create datatype archives from the extracted dwarf information. Then again, this requires having access to the debug versions of the libraries.

If you just choose just the directory that has your set of header files to be imported, then an algorithm which attempts to select the root header files in the correct order is added to the set of files to parse.
Really it isn't much different than trying to find the correct order for include files to parse when writing code.
I agree with both comments, they are a pain to deal with, and if you have good debug information that can be a better source of data types information.
Parsing header files attempts to discover values of defines from macros and add them as enums which you lose from debug information.  There are some changes planned to better recover from multiple definitions.  Currently only the last definition for a define is kept.
An additional change to pull unknown datatypes from any open archive at the time of parse could help as well.  If you were to compile code that included a header file the correct pre-include files would be necessary as well.

A workaround that I found to parse c header file is to use intermediate files.
Intermediate files can be generated using the -S -save-temps gcc option. These intermediate .i filed are the result of the precompilation stage with all macro expended and all header files are merged in the right order within a single file with some debug comments added.
Steps for the workaround

create a .c file containing only #include statement that you would use if you were actually using the library in a c project.
use gcc again as if you were building a standard c project with this library plus the -S -save-temps option. This will generate a .i file.
from there you have two options:
3.1. Quick and dirty: you can use a script to remove debug comment lines starting with "#" from the intermediate file. Rename this file as .h and import it in ghidra as a regular header file. This will import everything including standard library types and all these types will be considered as coming from the same big header file.
3.2. A cleaner alternative is to use the file path contained in each debug comment to reconstruct the header import tree. From there you can create a new header file structure that matches the original one except all macros are expended so ghidra will import them way easily. What is interesting with this approach is that since you control the header import tree, you can alter it to include only header files from some directory (ie. exclude standard library files and import only user library's types). Also this preserves the actual header file names for each imported type in the final archive.
To get ghidra to create archives with only new types while reusing the existing types from opened archives I had to make the following changes cparsing-reuse-open-archive.txt.

Some issues I encountered
I still had to make some manual adjustment to my new header files for some edge cases:

The c pre-compiler leaves some directive intended for the compiler like __attribute__ in the intermediate files that ghidra's CPreParser don't like. So these need to be removed.
Parsing of inline function doesn't seems to work so they need to be removed as well.

(These issues aren't introduced by the workaround, they are the only remaining limitations of ghidra's CPreParser after using the workaround)
I used this workaround successfully to create archives for the fairly big GTK-2.0 library on Ubuntu 18.04.

I will say the current parser is not insufficient - it's unusable. I tried to import even partial headers of Linux kernel types and I gave up after 2 hours of fighting with errors like error in line -20.


[BUG] Python 3.11 Error >>> import timm  ValueError: mutable default <class 'timm.models.maxxvit.MaxxVitConvCfg'> for field conv_cfg is not allowed: use default_factory

import timm
Traceback (most recent call last):
File "", line 1, in
File "/home/ubuntu/.local/lib/python3.11/site-packages/timm/init.py", line                                                                                2, in
from .models import create_model, list_models, is_model, list_modules, model                                                                                _entrypoint,
File "/home/ubuntu/.local/lib/python3.11/site-packages/timm/models/init.py                                                                                ", line 28, in
from .maxxvit import *
File "/home/ubuntu/.local/lib/python3.11/site-packages/timm/models/maxxvit.py"                                                                                , line 216, in
@dataclass
^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 1221, in dataclass
return wrap(cls)
^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 1211, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 959, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 816, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'timm.models.maxxvit.MaxxVitConvCfg'> for fie                                                                                ld conv_cfg is not allowed: use default_factory

@makao007 will look at this, haven't tried w/ python 3.11 yet as there wasn't a torchvision build available, is there a 3.11 torchvision?

The fix should be relatively straightforward:
@dataclass
class MaxxVitCfg:
    embed_dim: Tuple[int, ...] = (96, 192, 384, 768)
    depths: Tuple[int, ...] = (2, 3, 5, 2)
    block_type: Tuple[Union[str, Tuple[str, ...]], ...] = ('C', 'C', 'T', 'T')
    stem_width: Union[int, Tuple[int, int]] = 64
    stem_bias: bool = True
    conv_cfg: MaxxVitConvCfg = field(default_factory=MaxxVitConvCfg) <--- we need field here
    transformer_cfg: MaxxVitTransformerCfg = field(default_factory=MaxxVitTransformerCfg) <--- and here
    weight_init: str = 'vit_eff'

Can confirm the fix does work, do also include 'field' in the "from dataclass import ..." statement

Can confirm the fix does indeed work, also include 'field' in the "from dataclass import ..." statement.
The script you need to place this in is located at "kohya_ss-22.1.0\venv\Lib\site-packages\timm\models\maxxvit.py"

For anyone who doesn't know an ounce or a pound of python (like me), this means that in addition to the code at the top that needs to be changed as stated, also at line 42 in the named file add the word field at the end. So it will look like  this:
from dataclasses import dataclass, replace, field
Don't give up. I struggled with how to interpret this and other advice all morning and finally got it to work thanks to the straightforward answers above.
I finally got captions to work! yay!

Thanks, works for me now also.

Perfect, works for me! For those who will find this later I would like to point out that conv_cfg and transformer_cfg don't only need the change of inner arguments - the whole rows look a bit different. Besides, as I am using python 3.11 the path is a bit different.
So, summary of how to apply this change (step by step) - on the example of Kohya.
Specifically for those who are unfamiliar with Python :)

Navigate to Kohya folder (for example, /opt/kohya):

cd /opt/kohya

Navigate to models in virtuan env:

cd venv/lib/python3.11/site-packages/timm/models

Edit maxxvit.py file (I prefer nano editor)

nano maxxvit.py

press Ctrl+W and type "dataclasses" (without quotes)
Append ", field" to the end of the found string. It has tol look like that after this:

from dataclasses import dataclass, replace, field

again press Ctrl+W and type "class MaxxVitCfg" (without quotes)
comment out strings starting with  "conf_cfg" and "transformer_cfg" by appending hash symbol at the beginning
append the following two strings afterwards:

    conv_cfg: MaxxVitConvCfg = field(default_factory=MaxxVitConvCfg) # <--- we need field here

    transformer_cfg: MaxxVitTransformerCfg = field(default_factory=MaxxVitTransformerCfg) # <--- and here

Please pay attention that there are 4 spaces at the beginning of the string. It is important!
Press Ctrl+O and then press Ctrl+X in order to save changes and close. Done!

Perfect, works for me! For those who will find this later I would like to point out that conv_cfg and transformer_cfg don't only need the change of inner arguments - the whole rows look a bit different. Besides, as I am using python 3.11 the path is a bit different. So, summary of how to apply this change (step by step) - on the example of Kohya. Specifically for those who are unfamiliar with Python :)

Navigate to Kohya folder (for example, /opt/kohya):

cd /opt/kohya

Navigate to models in virtuan env:

cd venv/lib/python3.11/site-packages/timm/models

Edit maxxvit.py file (I prefer nano editor)

nano maxxvit.py

press Ctrl+W and type "dataclasses" (without quotes)
Append ", field" to the end of the found string. It has tol look like that after this:

from dataclasses import dataclass, replace, field

again press Ctrl+W and type "class MaxxVitCfg" (without quotes)
comment out strings starting with  "conf_cfg" and "transformer_cfg" by appending hash symbol at the beginning
append the following two strings afterwards:

    conv_cfg: MaxxVitConvCfg = field(default_factory=MaxxVitConvCfg) # <--- we need field here

    transformer_cfg: MaxxVitTransformerCfg = field(default_factory=MaxxVitTransformerCfg) # <--- and here

Please pay attention that there are 4 spaces at the beginning of the string. It is important!
Press Ctrl+O and then press Ctrl+X in order to save changes and close. Done!

I have solved my problem with this help! Thank you very much! Remember to add [field] and then release the codes respectively 4 times!

Perfect, works for me! For those who will find this later I would like to point out that conv_cfg and transformer_cfg don't only need the change of inner arguments - the whole rows look a bit different. Besides, as I am using python 3.11 the path is a bit different. So, summary of how to apply this change (step by step) - on the example of Kohya. Specifically for those who are unfamiliar with Python :)

This didn't work for me but downgrading timm from 0.6.12 to 0.6.7 worked.


Unable to scroll in mitmweb flow-table or flow-detail panes

Currently its not possible to scroll either the in the flow-table or flow-detail panes. Observing the same behaviour in Chrome, Firefox and IE.
Been observing this in 0.12.0 and 0.12.1

Interesting bug - thanks for the report.
That being said - mitmweb is still work in progress and not an official feature yet. :wink:
I'm super happy to see how many people somehow discover it and play around with what's there already, but please keep in mind that it's still very incomplete. :-)
Cheers,
Max

Yep understood :)
I'm quite happy with its state at the moment, totally usable. Saves devs having to faff about with tcpdump/wireshark especially from systems where running them isn't feasible. Only thing not in it at the minute would be the ablity to export request/respones as a text file, that'd be awesome.

Interesting - works fine for me in Chrome 43, but both Canary and latest Firefox don't scroll.

I'm running Chrome 44 on OSX and Win8.1

Just tried Chrome 43 and yup its working fine there for me as well. I can see the scrollbars displayed (my hacky commit doesn't result in them getting displayed on 44 although you can indeed scroll).

Setting height: 0 works fine for me and displays scrollbars as well?


ExampleUnitTest.java Causes Rebuild To Fail On Android

Once removing this file my build passed
/Users/bdellarocco/apps/masstuning/node_modules/react-native-onesignal/android/src/test/java/com/geektime/rnonesignalandroid/ExampleUnitTest.java
Error:(3, 17) error: package org.junit does not exist
Error:(5, 24) error: package org.junit does not exist
Error:(11, 6) error: cannot find symbol class Test
Error:(13, 9) error: cannot find symbol method assertEquals(int,int)
:react-native-onesignal:compileDebugUnitTestJavaWithJavac FAILED
Error:Execution failed for task ':react-native-onesignal:compileDebugUnitTestJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Any way to reproduce this issue?

Not clear why is this happening,
Can you please post your build.gradle file here?

Sure, @avishayil
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$projectDir/../../node_modules/react-native/android"
}
}
}

Couldn't replicate, but the only solution I can think of is to compile junit in your project.

I just removed the file and the issue resolved

More stable solution would be to compile junit, but I'm happy you figured it out yourself.

I am getting this issue now with version 3.0.3. Please add compile junit in build.gradle of app itself.

i have same issue. plzzzz anybody help me i have attached pic for those errors occur in my project


Use Re-entrant locks instead of synchronized blocks to make driver loom friendly

Loom project: https://openjdk.java.net/projects/loom/
Using synchronized keyword pins the virtual thread on the platform thread degrading the performance. Using ReentrantLock should prevent it from happening.
Sample code:
void foo() {
  synchronized(this) {
     ... // performs IO or something blocking
  }
}

With code like:
// loom friendly ...

private final Lock lock = new ReentrantLock();

void foo() {
  lock.lock();
  try {
     ... // performs IO or something blocking
  } finally {
     lock.unlock();
  }
}

@mthakur77 thanks for bringing this to our attention, this was incorrectly added before I've removed this in PR #2337 so this should no longer be necessary. I've also checked there are no more synchronized  keywords in the driver after this.


Openssl 1.0.2k

Bump openssl, curl, and git to the latest releases.
Openssl has a fix for a medium vulnerability in Diffie-Hellman verification. Otherwise there's nothing critical for security here, it's just good to be up to date.
Be sure to build with --no-cache to pick up the Centos 5 update for CVE-2016-9147.

r? @brson
(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton How wedded are you to keeping gcc early in the build order? I had to lower security to work around a tls-incompatibility between the GNU mirrors and the stock curl.


Exception caught by services library

======== Exception caught by services library ======================================================
The following assertion was thrown during a platform message callback:
Attempted to send a key down event when no keys are in keysPressed. This state can occur if the key event being sent doesn't properly set its modifier flags. This was the event: RawKeyDownEvent#16c4c(logicalKey: LogicalKeyboardKey#00100(keyId: "0x200000100", keyLabel: "Control Left", debugName: "Control Left"), physicalKey: PhysicalKeyboardKey#700e0(usbHidUsage: "0x000700e0", debugName: "Control Left"), repeat: false) and its data: RawKeyEventDataWindows#cf173(keyCode: 162, scanCode: 29, characterCodePoint: 0, modifiers: 0)
'package:flutter/src/services/raw_keyboard.dart':
Failed assertion: line 682 pos 7: 'event is! RawKeyDownEvent || _keysPressed.isNotEmpty'

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2      RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:682:7)
#3      KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:878:30)
#4      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:197:49)
#5      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:387:35)
#6      _invoke2 (dart:ui/hooks.dart:186:13)
#7      _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5)
#8      _Channel.push (dart:ui/channel_buffers.dart:132:31)
#9      ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17)
#10     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:599:22)
#11     _dispatchPlatformMessage (dart:ui/hooks.dart:89:31)
(elided 2 frames from class _AssertionError)
====================================================================================================
Unable to parse JSON message:
The document is empty.
Unable to parse JSON message:
The document is empty.

Closing this as a duplicate of https://github.com/flutter/flutter/issues/99653


Generic compiler execution time measurement

One way to easily add (limited) support for GCC would be to measure compiler execution time instead of relying on internal profiling data. This could be useful to compare metaprogram performance scaling across a variety of compilers.
The main issues are:

How to measure compiler execution time from CMake
How to adapt current data wrangling code for a new kind of format

And so far my favorite solutions are:

Adding compiler execution time measurement to the clang time-trace wrapper
Use the wrapper to generate a file in the same format as time-trace files, but only with compiler execution time data

Ping @pkeir


4 4 0 prep

Summary
Prepares for 4.4.0 release and merges ign-rendering3 forward.
https://github.com/ignitionrobotics/ign-rendering/compare/ignition-rendering4_4.3.1...ign-rendering4
Checklist

[X] Signed all commits for DCO
[X] codecheck passed (See contributing)
[X] All tests passed (See test coverage)
[X] While waiting for a review on your PR, please help review
another open pull request
to support the maintainers

I'm working on fixing a test case in https://github.com/ignitionrobotics/ign-gazebo/pull/614. I haven't confirmed the source of the issue yet, but I believe it may be in https://github.com/ignitionrobotics/ign-rendering/pull/235. We can either make this release now and then follow it up with a potential patch release, or wait to make a release if I can confirm that https://github.com/ignitionrobotics/ign-rendering/pull/235 is the source of the issue I'm seeing in https://github.com/ignitionrobotics/ign-gazebo/pull/614.

I'm working on fixing a test case in ignitionrobotics/ign-gazebo#614. I haven't confirmed the source of the issue yet, but I believe it may be in #235. We can either make this release now and then follow it up with a potential patch release, or wait to make a release if I can confirm that #235 is the source of the issue I'm seeing in ignitionrobotics/ign-gazebo#614.

We have chatted in a side channel and agreed to make the release with a patch release in the future.


CREATE EXTENSION btree_gin; + ops: raw("text_ops") leads to endless migrations (and operator class is removed in Introspection)

Currently, Prisma can not handle the operator classes added by extensions (see issue for support: https://github.com/prisma/prisma/issues/17516). This means to create an index using such an operator class in e.g. a Gin index, you have to use  the raw("...") operator class escape hatch and then use migrate dev --create-only and then modify the migration file to make sure the extension is enabled:
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model A {
  id   Int    @id @default(autoincrement())
  data String

  @@index([data(ops: raw("text_ops"))], type: Gin)
}

Then add the first line to the migration file before the correctly generated SQL:
CREATE EXTENSION btree_gin;
CREATE INDEX "A_data_idx" ON "A" USING GIN ("data" text_ops);

This migration can be applied with migrate deploy, but any future migrate dev run will again create a useless migration like this:
-- DropIndex
DROP INDEX "A_data_idx";

-- CreateIndex
CREATE INDEX "A_data_idx" ON "A" USING GIN ("data" text_ops);

(Note how the index definition is exactly the same as the original index definition that was already run)
Running Introspection will also remove the raw("text_ops") operator class from the original Prisma schema.

Some background information from Introspection:
This is the query we use to get the index information from PostgreSQL:
    SELECT
        indrelid,
        indexrelid,
        indisunique,
        indisprimary,
        unnest(indkey) AS indkeyid,
        generate_subscripts(indkey, 1) AS indkeyidx,
        unnest(indclass) AS indclass,
        unnest(indoption) AS indoption
    FROM pg_index -- https://www.postgresql.org/docs/current/catalog-pg-index.html
    WHERE
        indpred IS NULL -- filter out partial indexes
        AND array_position(indkey::int2[], 0::int2) IS NULL -- filter out expression indexes
)
SELECT
    schemainfo.nspname AS namespace,
    indexinfo.relname AS index_name,
    tableinfo.relname AS table_name,
    columninfo.attname AS column_name,
    rawindex.indisunique AS is_unique,
    rawindex.indisprimary AS is_primary_key,
    rawindex.indkeyidx AS column_index,
    opclass.opcname AS opclass,
    opclass.opcdefault AS opcdefault,
    indexaccess.amname AS index_algo,
    CASE rawindex.indoption & 1
        WHEN 1 THEN 'DESC'
        ELSE 'ASC' END
        AS column_order
FROM
    rawindex
    INNER JOIN pg_class AS tableinfo ON tableinfo.oid = rawindex.indrelid
    INNER JOIN pg_class AS indexinfo ON indexinfo.oid = rawindex.indexrelid
    INNER JOIN pg_namespace AS schemainfo ON schemainfo.oid = tableinfo.relnamespace
    INNER JOIN pg_attribute AS columninfo
        ON columninfo.attrelid = tableinfo.oid AND columninfo.attnum = rawindex.indkeyid
    INNER JOIN pg_am AS indexaccess ON indexaccess.oid = indexinfo.relam
    LEFT JOIN pg_opclass AS opclass -- left join because crdb has no opclasses
        ON opclass.oid = rawindex.indclass
WHERE schemainfo.nspname = 'public'
ORDER BY namespace, table_name, index_name, column_index;

For the model above, this is the returned result:

It is currently unclear to me why another db pull run removes the operator class although this should be returned correctly by Introspection. Might be a bug.
(Introspection is also used under the hood to generate the SQL migration files when running migrate dev - so this might also be the cause for the endless migrations)

By a first internal check, it seems we react to the opcdefault boolean in the query result here, and do not render the operator class based on that. That explains why Introspection does remove the raw("text_ops").
It could also explain why we have an endless migration: When introspecting the shadow database that was created with the migration history (all migration files) it will introspect it, and get a "this is an index without an ops class" - so we need to drop it, and recreate it as definition in the schema file (which in this case still has the correct ops class).

(Actually, in my current understanding the operator class is removed from the Introspection result too early. It needs to still be present during the diffing [which might fix the endless migration], and should only be removed when rendering the Prisma schema to optimize for readability there - right now it seems to happen to early.)

@janpio Hi, hope you're still a member of Prisma. 😅 Sorry for reminding you but this is blocking my work, so I'm happy to help.
My current guess is that the migration engine treats SQLOperatorClassKind::TextOps and SQLOperatorClassKind::Raw("text_ops") unequal, even though they mean the same thing. So my PR added the logic to consider these as same. Hope this helps 🥲

Hello @janpio, sorry for mentioning you multiple times but I'm a little bit disheartened that you removed your assignment from this issue without further guidance, even though there is a proposed fix that is, at least, working.
I understand that adding proper support to Prisma is the best option, but actually I believe the proposal of mine is a reasonable fix as a workaround that can be done shortly.
Could you please guide me what I can do to move the situation forward? Thanks.

You can't, really. We will need to find the time to look at this again and right now this is not a top priority. Sorry.

gist_trgm_ops with no parameters works as expected:
@@index([name(ops: raw("gist_trgm_ops"))], type: Gist)

But Prisma starts re-generating migrations on each prisma migrate dev invocation when there are any options, like this:
@@index([name(ops: raw("gist_trgm_ops(siglen=32)"))], type: Gist)

endless migration observed within our project too, using GIN with array_ops
@@index([events(ops: raw("array_ops"))], type: Gin)

prisma version 4.10.1

I am using prisma in introspection mode - for exactly this sorts of reasons, prisma covers much less ground than postgres.
I have a btree_gin compound index (custom_enum_type, string[]).
Prisma generates this line:
@@index([featureType, value], map: "feature_feature_type_value", type: Gin)
which it also claims to be an error.
Manually changing it to:
@@index([featureType(ops: raw("text_ops")), value], map: "feature_feature_type_value", type: Gin)
clears the error but this of course gets replaced when using prisma db pull.
Is there a workaround? I wouldn't mind forcing prisma to ignore the index.


extra_vars in workflow error

hi
when using the extra vars in a workflow I got the error:
fatal: [localhost]: FAILED! => {"changed": false, "errors": ["The field extra_vars was specified but the workflow job template does not allow for it to be overridden"], "msg": "Parameters specified which can not be passed into workflow job template, see errors for details"}
It looks like it is not supported? in apiVersion: cluster.open-cluster-management.io/v1beta1

sorry had to check the overide checkbox


Support to PostgreSQL 12

Will this be ready when pg12 becomes stable, which is likely less than a month away?
I just tried run it against apg12beta3 test database noticed the relhasiods thing and other columns like adsrc for indexes.
All the best
pgaro

fyi: We have 12 RC 1 now. 12.0 is likely do be released next Thursday (October the 3rd).
All the best
pgaro

few pg 12 fixes commited, regarding removed columns pg_class.relhasoids, pg_attrdef.adsrc,
see pull request. works fine for me, not sure if there is more to do
regards sebastian

Hi @pgaro and @boethin ,
Today we have released OmniDB 2.17.0 with support to PostgreSQL 12. Also thanks for contribution from @boethin :)
We would appreciate your feedback on this.
Best regards,
William

GetPropertiesForeignTable fails
column c.relhasoids does not exist
LINE 17:                        c.relhasoids as "Has OIDs",

Hi @rkolka ,
Thanks for reporting. Fixing this.
Regards,
William

GetDDLProcedure script fails:
public.test() is not a function
--- a/OmniDB/OmniDB_app/include/OmniDatabase/PostgreSQL.py
+++ b/OmniDB/OmniDB_app/include/OmniDatabase/PostgreSQL.py
@@ -8983,7 +8983,7 @@ DROP COLUMN #column_name#
grants as (
select coalesce(
string_agg(format(

           	E'GRANT %s ON FUNCTION {0} TO %s%s;\n',

           	E'GRANT %s ON PROCEDURE {0} TO %s%s;\n',
               privilege_type,
               case grantee
                 when 'PUBLIC' then 'PUBLIC'

Thanks @rkolka .


fix(curriculum): Added a note on how the players are numbered for team cards

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #54118

Added a Note on How the Players are Numbered for team cards

Thank you 🤖🤝


Connection.disconnect() debug logging breaks Jest tests

Describe the bug
I'm implementing Kafka connection from within a NestJS app. When running Integration/E2E tests in Jest for Kafka module, the test cases succeeded, but there will be Cannot log after tests are done. error from Jest that make the test process eventually failed (with Command failed with exit code 1.)
I've checked that the consumers and producers are cleaned up using await Consumer.disconnect() and await Producer.disconnect() in the afterAll() block. But the logging that break tests comes from Connection.socket.onEnd() event handler, which somehow get triggered after all disconnect promises are complete.
Currently I'm applying workaround by setting a flag in Custom Logger to block debug logging after all tests are completed (in afterAll() block), but I suppose there should be cleaner way.
To Reproduce
Please provide either a link to a:

failing test in a KafkaJS fork
repository with an example project reproducing the issue

Expected behavior
Jest test process should exit without error.
Observed behavior
The Jest test process exited with error:
  ●  Cannot log after tests are done. Did you forget to wait for something async in your test?
    Attempted to log "[Nest] 8766  - 06/06/2023, 11:46:04 AM   DEBUG [Connection] Object:
    {
      "broker": "localhost:9092",
      "clientId": "test",
      "message": "disconnected",
      "stack": "Error: \n    at /Users/chakrit/Projects/test-kafkajs-jest-log/src/utils/loggers/my-logger.ts:26:19\n    at Array.forEach (<anonymous>)\n    at MyLogger.printMessages (/Users/chakrit/Projects/test-kafkajs-jest-log/src/utils/loggers/my-logger.ts:21:18)\n    at MyLogger.debug (/Users/chakrit/Projects/test-kafkajs-jest-log/node_modules/@nestjs/common/services/console-logger.service.js:72:14)\n    at /Users/chakrit/Projects/test-kafkajs-jest-log/src/providers/kafka/kafka.provider.module.ts:47:53\n    at /Users/chakrit/Projects/test-kafkajs-jest-log/node_modules/kafkajs/src/loggers/index.js:16:3\n    at Connection.logDebug (/Users/chakrit/Projects/test-kafkajs-jest-log/node_modules/kafkajs/src/network/connection.js:111:7)\n    at Connection.disconnect (/Users/chakrit/Projects/test-kafkajs-jest-log/node_modules/kafkajs/src/network/connection.js:280:10)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at Socket.onEnd (/Users/chakrit/Projects/test-kafkajs-jest-log/node_modules/kafkajs/src/network/connection.js:204:9)"
    }

    ".

      55 |             )
      56 |
    > 57 |             console.debug(formattedMessage)
         |                     ^
      58 |         })
      59 |     }
      60 | }

      at console.debug (node_modules/@jest/console/build/CustomConsole.js:102:10)
      at src/utils/loggers/my-logger.ts:57:21
          at Array.forEach (<anonymous>)
      at MyLogger.printMessages (src/utils/loggers/my-logger.ts:21:18)
      at src/providers/kafka/kafka.provider.module.ts:66:49

error Command failed with exit code 1.

Environment:

OS: Mac OS X 12.6 (Monterey)
KafkaJS version 2.2.4
Kafka version 7.3.0 (Docker image: confluentinc/cp-kafka:7.3.0)
NestJS version 9.4.2
NodeJS version 16.20.0 - 20.2.0
Typescript version 4.9.5

Additional context

Ref.: https://github.com/tulios/kafkajs/issues/1367

+1

+1


Fix the footer link to point to the 2024 photos instead of 2023

The current footer still points to the 2023 photos instead of the 2024 photos we have now.

Just want to have a second pair of eyes on this.


fix windows build (bump rocksdb to 5.7.1)

Fixes #132.
#132 was caused by facebook/rocksdb#2709 and fixed in facebook/rocksdb@6a9de434775abb2868132e2d438cfe932e225032. I've updated the submodule to rocksdb 5.7.1 (facebook/rocksdb@acf935e40f9d6f4c3d13c7d310def7064c1f1c95), which includes the fix. This is also the very next public release after the version that is currently being used (5.6.2).
However, just using rocksdb 5.7.1 doesn't completely solve the problem. env_posix.cc and io_posix.cc were moved from env/ to util/, so I changed this in build.rs. Also, 68f6a123df8c3e688642eb34919007a56d478773 added -Wno-unused-parameter as a global command line flag, which causes an error when building with MSVC. I've moved it up into the non-MSVC conditional.

Ping @spacejam. Needing this patch.

Thank you for this! I'll cut a release now that includes this. Sorry for the huge delay on merging, I've been underwater with the logistics of moving away from berlin and then back to berlin short-notice. Would not recommend double 0-net-distance moving.

0.8.2 has been published with these changes


FileCollection.singleFile alternative to track dependency

Expected Behavior
Given this:
task mergeTask(type: Zip) {
	from "src"
	baseName "lajos"
	destinationDir file("build/archive")
}

task copyTask(type: Copy) {
	from zipTree(mergeTask.outputs.files.singleFile)
	destinationDir file("build/copy")
}

mergeTask.baseName = "tibor"

I would expect Gradle to discover that copyTask depends on mergeTask, and for copyTask to find the output created by mergeTask.
This could be achieved by adding an alternative to FileCollection.singleFile that would return a RegularFile built by mergeTask. This would fix both the too eager evaluation of mergeTask.outputs.files.singleFile and the discovery of the dependency between the two tasks.
Given such an alternative we should probably deprecate FileCollection.singleFile, too.
(We would also need to make a change for FileResolver.zipTree() not to resolve its input eagerly, but that can be done separately.)
Current Behavior
Running copyTask fails, because mergeTask is never invoked. This is because mergeTask.outputs.files.singleFile evaluates during configuration time to a File object that does not track its origin, so Gradle cannot discover the dependency between copyTask and mergeTask.
Adding an explicit copyTask.dependsOn mergeTask fixes this problem, however the error is still not gone:
* What went wrong:
Cannot expand ZIP '/Users/lptr/Workspace/gradle/bugs/task-config-order/build/archive/lajos.zip' as it does not exist.

This time mergeTask gets invoked, but copyTask doesn't find the created tibor.zip. The problem is caused by the archive base name being changed after mergeTask.outputs.files.singleFile is already evaluated to lajos.zip. This can be circumvented by wrapping the value in a closure like this, so it gets evaluated later:
from { zipTree(mergeTask.outputs.files.singleFile) }

This now exists in the form of file properties. https://docs.gradle.org/current/userguide/lazy_configuration.html#sec:working_with_task_dependencies_in_lazy_properties


Move UnitTests

@peendebak
I moved the unittests in this PR as requested here. I have taken the structure from the demonstator repo's to have consistency.
I still should check whether readthedocs is still working and other additional stuff besides installing, running en unittesting.

@peendebak
All OK I think. There is one file (src/qtt/exampledata/misc/P5_y_P5_x.dat) which is changed according to the PR. Still, when I check for diff's there is nothing changed.

@CumulonimbusCalvus Merged. I create a new PR for additional cleanup of the test structure.


add sex_ratio is by area to report:47

Added Info in documentation to address #140.

This is mostly correct.   However, when there are time-varying biology parameters, we have no SS3 capability that creates equilibrium biology output from those parameters.  That is a needed capability.  The biology in endyr report is just reporting the time-varying biology output for endyr.

OK, I think I understand it better now. In the presence of time-varying growth, the length at age in that table of biology at age will reflect the sizes associated with each cohort in the end year, not the von Bertalanffy curve associated with the final parameters. That seems fine. The sex ratio curve could likewise be impacted by time-varying M. I suppose that if anyone wanted equilbrium patterns associated with the final time-varying biology, they could extend the end year of the model by one generation time without further changes to the biology.
But what the table doesn't show is any impact of fishing, right? So the sex ratio from that table won't match a sex ratio calculated from Numbers at Age table in the endyr?

Sex ratio in that table comes exactly from the numbers-at-age table, so is affected by anything that causes males and females to have different F-at-age.   Perhaps a good idea to add N-at-age to this table to make it more apparent to the users.
Hermaphroditism is implemented as the fraction of fish that change sex.  So any alternative way of presenting sex ratio would need to create a new simulation of the outcome of those transitions.

Am I correct in that there doesn't need to be anything further added to the documentation related to this?

@e-gugliotti-NOAA, thank you for trying to make sure this is resolved.
Now that @Rick-Methot-NOAA Rick has helped me understand what the output is, I think it's fine as it stands. That section of the manual doesn't seem like the right place for the details discussed in this thread.
I removed the word "equilibrium" from the r4ss figure showing the sex ratio. That was there from when that plot was first added about 6 years ago, so I think I just misinterpreted the nature of the sex ratio output when I first called it "equilibrium".

It was equilibrium before, but it was incorrect in some circumstances


Replace TravisCI with CircleCI

After TravisCI has been acquired and the company fired a lot of the awesome developers we should switch to CircleCI. Don´t want to support such behavior.

Maybe we can try Github Actions here?

Can give it a try :)
I am already permitted as single user ... but guess have not the beta feature for the organisation yet.

Thank you @Virtim for taking care. Just adjusted the settings to special branches. :)
But you could not know that :)


Resizing shared terminal window

Issue Type: Bug
It seems I can only have 6 lines of terminal as the guest when using a shared terminal. I would like for when i expand the terminal for it to load more lines into view at once.
Extension version: 1.0.1891
VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:34:57.037Z)
OS version: Darwin x64 18.7.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
16.00GB (2.93GB free)

Process Argv
-psn_0_61455

Screen Reader
no

VM
0%

Thanks for reporting this issue, @duxbuse. Right now, the shared terminal's height is affected by the person in the session whose terminal window has the least height. As a workaround, you can ask the person who has the terminal at the least height to expand their terminal. I'll label this as a feature request as well.

As a workaround, you can ask the person who has the terminal at the least height to expand their terminal.

I could not replicate this. No matter what I did the terminal was fixed to 6 lines. Resizing on both ends had no impact.

Hi, this is also quite an issue for us aswell. The suggested fix also does not work, resizing both sides still shows only ~4 lines on the guests side.
Extension Version: v1.0.2048
VSCode Version: 1.44.2
OS Version: Windows 10 (Version 2004)

Not sure if I need to open a new issue but resizing your (not host's) window a few times causes the terminal to not re-expand, making the host's terminal impossible to read/use.

Any progress on this? Its very annoying

VS:

I am not sure the reason but this is just my walkaround:

cmd+b to close the side menu before you type any commands in the shared terminal
run a command like ls to check if the width is normal, this will set the initial width for the terminal

I was thinking that is because of the display resolution difference, but it seems not, rather might be because of the first time when I run a command in the shared terminal, if the physical width is narrow when the first time I run a command, then it will keep that width during the session.
Still, I have problems when I try to amend some inputs, when I delete and retype the characters, the line will be broken and change to a new line for every single letter I typed which looks like:
a
ab
abc
abcd
abcde

Workaround that works:

Have participants resize the terminal window to what they would like it to be.
Close shared terminal
Create new shared terminal

Terminals will now be the right size. You'll have to re-do this workaround whenever folks change the size of their terminal again. :/

Here's another example when one host/participant has their terminal on the side and another has it on the bottom. The display is smooshed into a very narrow area.

It's a very annoying bug. The only workaround is to close the terminal (while leaving the container open) and then double clicking on it again in the LiveShare pane.

We’re not able to prioritize this issue over the other higher-impact issues we receive every week, based on the votes and comments from others in the community and our understanding of the issue. However, rest assured that we love your input. If you feel it deserves to stay open, then clarify your use case and contact us to let us know how severe it is for you.

Unfortunately this issue makes collaboration in vscode terminal sessions with ncurses-based UIs impossible. The fact that this issue has been reported multiple times (#3143, #3376, #3571, #4160, #4892, ...) seems to indicate that this issue indeed impacts a significant amount of users. I think it therefore deserves to stay open and hope it can be addressed.

I agree, closing the issue outright seems odd to me. Deprioritizing something is fine, but is there any assurance that this is in a backlog to fix at some point? How will folks who reported the issue be updated as to the status of that backlog item?

I read @derekbekoe's comment as a WONTFIX, is my understanding right?

still an issue regardless of OS

I am curious if it is a liveshare issue or a powershell issue.
If it is a powershell issue,
Can't this be resolved by changing the powershell version or configuration?


Added FPS Command

Added FPS Command
Command to run: "!fps" or "!framespersecond"
Admin Level: Player
Preview:

#880 vibes 😔

#880 vibes 😔

Mine works, idk about yours

i tested it says my fps is 0 but i have 60 fps

i tested it says my fps is 0 but i have 60 fps

skill issue

i tested it says my fps is 0 but i have 60 fps

Show me

go in studio do it yourself i dont have recording utility installed

go in studio do it yourself i dont have recording utility installed

A picture will work.
BTW I just tested it, this shows me the FPS

test again

test again

I've tested like 10 times

oh and you have to make renderstepped return 0

Nothing is wrong

https://github.com/Epix-Incorporated/Adonis/assets/90981615/e30c149e-d3b0-4f18-ad72-72f2bbc05395

Buh.

bnuhhhh

This is duplicated by Roblox's performance stats feature
And the OS or third party programs implement a better way to do this 2

Yeah but the average user doesn't want to have the performance menu open nor do they want to use third party programs

Also this only shows render FPS but not physics or network FPS

Most people won't know or care what any of those are; they just want a number


Update gemspec, bump version

This commit updates the gemspec to point towards to the repository,
and makes it clear that this is a Heroku gem.

Merging for now, we can deal with ownership later :)


Example in vscode-jsonrpc README not working

npm install vscode-jsonrpc

Copied this code into server.ts from the README.md exactly:

import * as rpc from 'vscode-jsonrpc';

let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(process.stdin),
	new rpc.StreamMessageWriter(process.stdout));

let notification = new rpc.NotificationType<string, void>('testNotification');
connection.onNotification(notification, (param: string) => {
	console.log(param); // This prints Hello World
});

connection.listen();

Run with ts-node server.ts

I get this error:

(3) attempt_vscode_rpc_again$ ts-node server.ts
/REDACTED_PATH/node/14.18.2_64bit/lib/node_modules/ts-node/src/index.ts:820
    return new TSError(diagnosticText, diagnosticCodes);
           ^
TSError: ⨯ Unable to compile TypeScript:
server.ts:5:10 - error TS2551: Property 'StreamMessageReader' does not exist on type 'typeof import("/REDACTED_PATH/node_modules/vscode-jsonrpc/lib/common/api")'. Did you mean 'AbstractMessageReader'?

5  new rpc.StreamMessageReader(process.stdin),
           ~~~~~~~~~~~~~~~~~~~
server.ts:6:10 - error TS2551: Property 'StreamMessageWriter' does not exist on type 'typeof import("/REDACTED_PATH/node_modules/vscode-jsonrpc/lib/common/api")'. Did you mean 'AbstractMessageWriter'?

6  new rpc.StreamMessageWriter(process.stdout));
           ~~~~~~~~~~~~~~~~~~~
server.ts:8:45 - error TS2558: Expected 1 type arguments, but got 2.

I already fixed this (see https://github.com/microsoft/vscode-languageserver-node/blob/d5334e8a5882fbd9c9ff4935a96f8bab7fe51b00/jsonrpc/README.md#L13)
The correct import is
import * as rpc from 'vscode-jsonrpc/node';
``

It's not fixed in the example server code, it's only fixed in example client code. Look at the second code block in the README from the master branch.
Fixing the import does make the code run, thanks.

Thanks fixed it as well.


The body of a for-in is now wrapped in an if statement to filter unwanted properties from the prototype.

Fixes #66
Checklist

[ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
[X] I have read the [Contribution Guide] and my PR follows them.
[X] I updated my branch with the master branch.
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation about the functionality in the appropriate .md file
[ ] I have added in line documentation to the code I modified

Short description of what this PR does:

Added an if-statement to only iterate the own properties

Closing all open issues and PRs. This repo is no longer maintained. Please use https://github.com/sendgrid/sendgrid-nodejs/tree/master/packages/client instead.


Rename math functions to strict_add/strict_sub

Turns out the Rust standard library add the functions from #2098 under a different name. See https://github.com/rust-lang/rust/issues/118260. Since this was not yet release, we can use those names too.

@mergify backport release/2.0 release/1.5 release/1.4