text:
filter boolean always return false value.

env:
nestjs-paginate@8.1.3
typeorm@0.3.15
mysql community 8.0.19
@Entity()
export class YyyPaginate {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @Column({ nullable: true })
  lastName: string;

  @Column({ default: true })
  isActive: boolean;

  @VersionColumn()
  version: number;

}

Use boolean in filter:

It's working when I mapping [true,false] to [1,0]:

It's working when I mapping [true,false] to [1,0]:

You map query before passing to helper?

I still have this issue on nestjs-paginate 8.6. Filtering works when the boolean is expressed as an integer but not a true or false value. Using typeorm 0.3.17 and mysql 8.1.

I have the same issue and this is my solution:
    public findAll(query: PaginateQuery): Promise<Paginated<SubscriptionEntity>> {
        const queryBuilder = this.subscriptionRepository.createQueryBuilder('subscription')
        if (query.filter?.isActive) {
            const isActiveFilter: boolean = query.filter.isActive as string === 'true';
            queryBuilder.where('subscription.isActive = :isActiveFilter', {isActiveFilter})
        }
        return paginate(query, queryBuilder, {
          sortableColumns: ['id', 'name', 'days', 'createdAt', 'updatedAt'],
          defaultSortBy: [['createdAt', 'DESC']],
          searchableColumns: ['name',]
        })
    }

I think treating every string "true"/"false" as a boolean might be too aggressive. And detecting when something is a boolean based on either the TypeORM model, or nestjs-paginate configuration might not be waterproof either.
We could include either special tokens $true and $false, but it might be a hassle to convert the boolean values on the frontend. It would be similar to $null which already exists.
Another solution could be to add a new FilterOperator.BOOL and $bool:true, $bool:false as an alternative to $EQ?

Any workaround for this issue ? When I am using the equal filter operator $eq:true all the boolean equal to true are retrieves but when using $eq:false it's not working...
Any idea how for a workaround @Helveg ?

The workaround is to use 1 for true, and 0 for false

@Helveg in my case using 1 is still retrieving some records when using 0 I still don't have any records... The column value is "boolean" and the DTO also define the column as boolean.

can you show me the exact request URL you send, and the nested entity with its column definitions?

authors: Helveg Mike-Jia SpiritusDeos ctilley83 daviddang91 ppetzold

repo: ppetzold/nestjs-paginate


text:
Bug:(maybe) can't install by 'pip install -U git+https://github.com/ppwwyyxx/tensorpack.git'

I can not install tensorpack using
pip install -U git+https://github.com/ppwwyyxx/tensorpack.git
and
pip install -U git+https://github.com/ppwwyyxx/tensorpack.git --user
does't work.

Finally, I download zip format , and install it by
pip install /home/xxx/download/tensorpack-master.zip
It works.
So, it's a bug or I use this incorrectly?

It said cannot find git

Would you please update the link? Thanks
I follow the guide Tensorpack install page.

source: gharchive/issue

authors: erdollar ppwwyyxx

repo: ppwwyyxx/tensorpack

license_type: permissive

license_source: github-api


text:
Embed JetBrains' annotations assembly during dynamic compilation

Resolves ppy/osu#2656

JetBrains suggest that you can embed annotations in code by using the JetBrains.Annotations namespace. This leads to issues where our code may try to reference internal types from other assemblies instead of JetBrains'.
EF Core does this, as discovered in this comment, leading to osu!-side issues, however this is potentially not limited to EF Core. As such, I'm applying a universal fix at a framework level.

Since I also investigated this, I'll add here that this will almost definitely break if the JetBrains.Annotations package is removed from the framework-side nuget dependencies.
This is because all these attributes are not actually compiled into the assembly (and because of that, there will be no binary reference to JetBrains.Annotations.dll).
Just as a reference for the future, if there are thoughts about changing the approach to annotations.

There's no reason it would be removed (and if it was removed it will break this line of code, making it apparent that it may cause further breakage).

source: gharchive/pull-request

authors: FreezyLemon peppy smoogipoo

repo: ppy/osu-framework

license: MIT


text:
Add benchmarks project

Provides a permanent home for benchmarks so we stop throwing them away and are forced to keep the up-to-date with the current codebase. Can be run via nUnit (and will probably require exclude rules to be added so as to not run on CI for now).

[x] Depends on https://github.com/ppy/osu-framework/pull/3037
[x] Exclude from CI runs
Adds benchmarks for font loading, including adding back TimedExpiryGlyphStore for comparison purposes.

There should be documentation about how to run one benchmark with seeing console output. Running them via IDE may not show console.

Good point, will add.

To view console output from things executed by nunit in VS:
Go to Test Explorer, expand the "test", and select one in the inner-most level(should be a method-parameter group). Then click "Open additional output of this result" in the Test Detail Summary section.

Another consideration: use launch profiles of IDE, using console argument to specify which benchmark to run.
It increases maintenance work when adding new benchmark, but provides perfect availability to both console and IDE.
https://github.com/dotnet/performance/blob/17a1a8fd550733c1e0eea7e410cb503f8f41f5e4/src/benchmarks/micro/Program.cs#L35-42
Seems benchmarkdotnet provides some support of that.

Remarks for VS launch settings:
<project dir>/Properties/launchSettings.json
{
  "profiles": {
    "osu.Desktop": {
      "commandName": "Project"
    },
    "newProfile1": {
      "commandName": "Project",
      "commandLineArgs": "--arg1"
    }
  }
}

Updates pushed at https://github.com/huoyaoyuan/osu-framework/tree/benchmark-project .

Since Rider knows VS launch config now, can we convert to use VS ones? It looks much simpler.
Needs confirmation about Linux/Mac Rider.

Can they be defined as a tree?

I like our rider layout currently.

No, VS launch settings are associated with projects, not solutions.
Let's keep them and add VS ones for necessary.

authors: huoyaoyuan peppy


text:
Handle value rejection on binding to another bindable

This fixes an edge-case where a bindable would reject the given value of another bindable on BindTo(), causing them to be desynchronised.
This fixes it by changing the other bindable's value to the updated value of the current bindable, since they're bound to each other and therefore must be synchronised.

The above test failure should be irrelevant, it passes locally on my end:

On second thought, this fix (if it's deemed the proper direction, which I'm not yet 100% convinced of - maybe this edge case should just raise an exception?) should extend to every bindable property which raises change callbacks, which would make at least: Default, Disabled, MinValue, MaxValue, Precision and CollectionChanged.

Every event behaves regularly like that, and there are test cases for each TestValueChangedWithUpstreamRejection, TestDisabledChangedWithUpstreamRejection, etc..

Then why does this PR only handle Value by adding that special conditional you have in the diff there? Surely other aforementioned properties should also receive the same treatment?

Oh nevermind, I misread your comment, it would be pretty much easy to do with the PR'd BindableProperty class, but very messy when done as-is.
I guess this PR could wait for that class first before fixing.

I would probably rather have the "messy" but simple checks as done here than that BindableProperty stuff (that is hinging on exposing the bindings of a bindable as public, which I maintain should not be done).

Gonna close this one for now, there's nothing waiting on this PR so will return to it later once BindableProperty becomes a thing (one that doesn't require Bindings to be exposed, not sure why I even thought of doing that).

authors: bdach frenzibyte


text:
Reduce verbosity of STBI errors

Closes https://github.com/ppy/osu/issues/14417

Just hoping we don't dig these so deep we regress loading for all images but don't find out until someone one day posts a mobile device log file or something...

authors: peppy smoogipoo


text:
chore: fix copy for verification cluster endpoint

During copying the command on OS X I noticed that there were added a few symbols, the after pasting the output was:
curl --cacert ca.pem https://$\{KUBERNETES_PUBLIC_ADDRESS\}/version

Which will not work and I had manually remove \.

@prabhatsharma Can you review this PR?

I have not been able to replicate the problem that this PR solves. Do you have steps I can use to reproduce the problem. I have a mac.

Hello @prabhatsharma, thanks for the answer!
I just used the copy button from Github and Mac terminal. You can see there some additional '' after copy-pasting.
https://user-images.githubusercontent.com/22550335/151761447-0497b9c6-afd4-4395-9c8d-a692455b01b4.mov

authors: prabhatsharma vitaliimelnychuk


text:
Pythonic.requests.swift uses deprecated methods

These needs to be fixed:
Pythonic.requests.swift:24:48: warning: 'stringByAddingPercentEscapesUsingEncoding' was deprecated in OS X 10.11: Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.
            let encodedKey = (key as NSString).stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)
                                               ^
Pythonic.requests.swift:25:52: warning: 'stringByAddingPercentEscapesUsingEncoding' was deprecated in OS X 10.11: Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.
            let encodedValue = (value as NSString).stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)
                                                   ^
Pythonic.requests.swift:62:46: warning: 'sendSynchronousRequest(_:returningResponse:)' was deprecated in OS X 10.11: Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h
            let nsData = try NSURLConnection.sendSynchronousRequest(nsMutableUrlRequest, returningResponse: &nsUrlResponse)

This has been fixed.

license: mit

license_source: bigquery


text:
Added "make install"

For convenience, "make install" will copy the executable to /usr/bin

Hi!
Thanks for your contribution!
Could you split these into two separate PRs? One with the make install fix (minus the name change and use /usr/local/bin/) and one with the multi-line-fix.
Could you elaborate on in what contexts you would like ctrl-x removed? :-)
Closing this PR while awaiting the two new PRs!

Regarding the ctrl-x thing - please raise an issue about that under the issues tab.

repo: practicalswift/openemacs


text:
Criação de layout para card de divulgação de lives a serem feitas pelo PRACTICE

Esta issue possui como objetivo a criação de um card modelo para divulgação das lives que acontecerão dentro do canal do PRACTICE, sendo assim, deve possuir um padrão passível de modificações.
Será utilizado apenas para fluxos internos, e de divulgação no instagram do programa.
Alguém da @practice-uffs/con-conteudo poderia auxiliar criando o texto base que deve estar presente no card?
A parte gráfica será criada no figma

Criei as pastas dessa issue no Google Drive:

 Pasta da issue
🔽 Entrada
🔼 Saída

Boa noite @TaynaraCh,
Eu posso ajudar com o texto! Para quando é esta demanda?
Atenciosamente.

Oi Isa! Não temos um prazo concreto, mas ideal seria assim que possível finaliza-la kkkk

Finalmente achei essa issue!
A @MilenaPaz2020 pode me corrigir se eu estiver errada, mas essa divulgação seria realizada nos stories, logo pensei que para pouparmos tempo e material humano que seria necessário para criar uma imagem para a capa de live e outra para os stories enquanto o maker não fica pronto poderíamos apenas "recompatilhar" o que é postado no Instagram dos nossos solicitantes com eu sugeri nas issues (#771 e #770) uma vez que há um material pronto elaborado pelos proponentes do evento.
@TaynaraCh acredito que dessa maneira nos pouparíamos de mais esse desgaste e tornaria esse processo mais fácil e também menos oneroso, eu tenho percebido que cada vez mais solicitantes tem nos marcado em suas publicações de divulgação dos eventos no Instagram.

Em diálogo com a @TaynaraCh para  a resolução do problema que surgiu com a questão das divulgações de lives realizadas pelo programa, uma vez que não é viável, pelo menos não agora sem o Maker, criar>diagramar  algo além das capas de live.
Assim, uma opção futura, que vai demandar uma organização seria: a divulgação das lives que serão realizadas na semana, algo do tipo Se liga nas lives realizadas com o apoio o practice que vão acontecer nessa semana listando todas as lives num stories ou dois no máximo e posta uma vez por semana

Apenas para organização, a @brendaellen ficou responsável por essa issue para realizar o texto-base, tendo em vista que a Isa teve seu último dia oficialmente no PRACTICE.

@brendaellen, alguma novidade? Não precisamos de um texto não, a ideia é que seja analisadas as informações necessárias que devam conter na divulgação, como por exemplo data, horário, nome da palestra, palestrante (?), link do canal ou link da palestra (?), quais dados são relevantes, enfim, o conteúdo do card, deu pra entender? kkkkkkk

@TaynaraCh, muito obrigada pelos esclarecimentos, e desculpa a demora em realizar essa tarefa, é que eu realmente não havia compreendido o que era pra fazer kkkk Mas conforme solicitado, dei uma olhada no modelo do card, e deixei minhas considerações em um arquivo na pasta de entrada. Me coloco a disposição caso tenham alguma dúvida!

Luiz, acredito que já consiga passar para o figma esses dois modelos, gostei muito! Acredito que as ondas que adicionou precisam ser revistas, estão muito desconexas da id visual do programa, também evitar utilizar a fonte em itálico.

O projeto editável já está no Figma. @TaynaraCh veja se está conseguindo editar, não sei se copiei o link certo kk. Foi o primeiro projeto que fiz no Figma, então acredito que precisa de ajustes

Finalizei o modelo a partir do trabalho realizado pelo Luiz!
O modelo final está disponível no figma, as criações podem ser realizadas no mesmo arquivo do link, deixei também algumas orientações gerais, outras podem ser adicionadas conforme necessidades surgirem. Criei um modelo teste para exemplificar como ficaria.
Sendo assim, o arquivo já está disponível para uso, mas antes, preciso da aprovação final da queen @MilenaPaz2020 kkkk poderia nos dar um ok?

Finalizei o modelo a partir do trabalho realizado pelo Luiz! O modelo final está disponível no figma, as criações podem ser realizadas no mesmo arquivo do link, deixei também algumas orientações gerais, outras podem ser adicionadas conforme necessidades surgirem. Criei um modelo teste para exemplificar como ficaria.
Sendo assim, o arquivo já está disponível para uso, mas antes, preciso da aprovação final da queen @MilenaPaz2020 kkkk poderia nos dar um ok?

O material está lindo, gente! Parabéns! Acho apropriado que a @luizatonial também o revise.
Vamos começar a implementar em breve.

A partir de agora então, dentro da equipe de midia, alguém ficará responsável por adicionar as informações no layout criado, acredito que nas primeiras semanas alguém da con-design terá de fazer a revisão gráfica, depois acredito que a pessoa responsável pegará o jeito kkkk
Irei fechar a issue mas podemos reabri-la se necessário.

@annacarolis, aqui você encontra o link do figma. Pode abrir uma nova issue e fazer as alterações com base na agenda da semana que vem.

authors: GessicaZanon MilenaPaz2020 PracticeUFFSBot TaynaraCh brendaellen isabelirk luizdameda morgana-mo

repo: practice-uffs/programa


text:
Unable to load DLL 'sqlite3'

Full exception:
Unable to load DLL 'sqlite3': This operation is only valid in the context of an app container. (Exception from HRESULT: 0x8007109A)
All I want to know is, when the app runs, where is it looking for the SQLite dll? And, does it need some other file to run?
I've managed to get this working on UWP (God knows how I pulled that off in hindsight), but every time I go to a new platform I get stung by this. Right now, I'm trying to get it working in .NET 4.6.2. I've tried dumping the sqlite3.dll directly in the bin folder, but no luck. I just want to clear up the voodoo of how it is that .NET, or Mono, or whatever finds the DLL.
This thread has some advice but none of it works for me:
http://stackoverflow.com/questions/4744293/unable-to-load-dll-sqlite3-the-specified-module-could-not-be-found-exceptio

From what you've said, I'm guessing you are not using the sqlite-net-pcl nuget package, right?
If you were, then the finding of sqlite3.dll is up to SQLitePCL.raw, which I know a thing or two about.
But if I'm right, and you are using sqlite-net in some other way (like, you are including the source code, or using the non-PCL nuget package, etc), then, er, I don't really know.  But I assume it does something really simple, like "just pinvoke whatever sqlite3.dll is found first in the PATH".
BTW, the error message you're getting is weird.  I haven't seen that one before.  Which piques my curiosity a bit.
And yes, sometimes the sqlite3.dll file needs to load the C runtime lib DLL as well, which causes the DLL load to fail.  But when that happens, the error message is usually different.  And I don't have enough details about your context to say whether that is happening in your case.  My conjecture is "no", that's not the issue.
Sorry for the likely-useless reply.

No. Thanks heaps for the reply!

I'm guessing you are not using the sqlite-net-pcl nuget package, right?

No. In the past, I have taken the sqlite-net-pcl repo, and hacked the PCL library to work on UWP. I actually got that working, but I have no idea how I got it working.

If you were, then the finding of sqlite3.dll is up to SQLitePCL.raw, which I know a thing or two about.

Sounds intriguing. Tell me more about this SQLitePCL.raw that you speak of...

But if I'm right, and you are using sqlite-net in some other way (like, you are including the source code, or using the non-PCL nuget package, etc), then, er, I don't really know. But I assume it does something really simple, like "just pinvoke whatever sqlite3.dll is found first in the PATH".

In this case, I added the sqlite-net package for .NET. All it did was add the two source code files to my project. Actually, that's probably what I want. Perhaps there's some problem with my understanding of pinvoke. I added "[...]sqlite-net\lib\metro\x86" to my path, but the problem persists...

BTW, the error message you're getting is weird. I haven't seen that one before. Which piques my curiosity a bit.

I get it all the time, in sqlite-net-pcl and sqlite-net. Others get it too:
http://stackoverflow.com/questions/4744293/unable-to-load-dll-sqlite3-the-specified-module-could-not-be-found-exceptio

And yes, sometimes the sqlite3.dll file needs to load the C runtime lib DLL as well, which causes the DLL load to fail.

This is the crux of the voodoo for me. How does this work on all the different platforms?

I uninstalled sqlite-net and installed sqlite-net-pcl, and now it works. I'm still left in the dark as to why.

The "This operation is only valid in the context of an app container." error message is the weird one.  It makes me wonder about things like trying to use a WinRT version of sqlite when you're in a regular sort of app.
The error message in the stack overflow post you linked, "The specified module could not be found", is the much more common situation.  I see that one all the time.  Your situation appears to be different.
SQLitePCL.raw is a library I maintain which does nothing but try to handle all this voodoo across all kinds of platforms.  It does not present a friendly API to be used when writing an app.  Rather, it stays low level, and is designed to be used underneath something like sqlite-net.  It is used by several different higher level libraries.
Originally, sqlite-net simply did its own pinvoke calls to load the sqlite3 DLL.  Many folks still use it that way, but the more platforms you need, the more painful this gets.
But when you use sqlite-net-pcl (the nuget package containing the PCL form of sqlite-net), it brings in SQLitePCL.raw as a dependency, which handles all the ridiculous, arcane details of calling SQLite from .NET on lots of different platforms.
I don't mean to duck your question "How does this work on all the different platforms?", but, well, it's a very complex topic.  That's why SQLitePCL.raw exists.

Bottom line:  My best guess is that whatever you did to get things working on UWP resulted in a SQLite lib that is not compatible with a plain old net46 app, but you tried to use it that way, and pinvoke complained.  But that's just a guess.

authors: MelbourneDeveloper ericsink

repo: praeclarum/sqlite-net


text:
USSD registration add authentication functionality

[x] adapt/replace check_msisdn_hcp function in utils

[x] adapt/replace validate_personnel_code function in utils

@gsvr please review

George, are we assuming that a recognised/registered contact will always have a personnel code...?
Currently the initial flow from state_start in the ussd registration app gets determined based on whether the contact has a personnel code or not... so technically it's not based on the msisdn alone being recognised or not as it seems it should be according to the hw flow diagram

Yes, that's what we're assuming. Recognised msisdn as noted on the flow means 'recognised as a nurse', which means they have a personnel code saved to their contact.

Looking good so far, mostly just comments that need updating.

@gsvr 2nd pass review plz

:+1:

authors: NicolaasDieBaas gsvr

repo: praekelt/chms-jsbox


text:
Merge Sort Algorithm

Write an implementation of merge sort algorithm on an integer array with proper explanation through comments.

hey @prafulla-k-roy I can do this , please assign this to me.

I can do this in java @prafulla-k-roy , can you assign this to me for java

hello @prafulla-k-roy kindly assign this to me. I would love to write this code in cpp or java !!

Can you please assign this to me? I'll provide a good solution for this program.

repo: prafulla-k-roy/algo-education


text:
Front End: Netflix Clone (GsSOC '23)

Describe the project you want to add with tech stack
I would like to create a Netflix landing page clone using HTML, CSS and JavaScript.
Expected behavior
The login page will open and will be interactive just like the actual website.
Please assign this issue to me.

Hey @pranjay-poddar ,I would like to create Netflix clone using html, css, javascript .
I'm a contributor to GSSOC'23 please assign this issue to me as a part of GSSOC'23

please assign me this issue under GSSoC'23.

Project already present

Ok. Thank you.
On Wed, Jun 7, 2023, 00:21 Pranjay Poddar @.***> wrote:

Project already present
—
Reply to this email directly, view it on GitHub
https://github.com/pranjay-poddar/Dev-Geeks/issues/1405#issuecomment-1579285110,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A33X3Q4H7XXLM2NHEJFBQBLXJ53ZRANCNFSM6AAAAAAYOUJOKA
.
You are receiving this because you authored the thread.Message ID:
@.***>

authors: khadesamrudhi pranjay-poddar shellyverma sp9324

repo: pranjay-poddar/Dev-Geeks


text:
Externalize styled-components dependency

See https://styled-components.com/docs/faqs#i-am-a-library-author.-should-i-bundle-styled-components-with-my-library

Not using styled components anymore. Closing as out of scope

authors: VanishMax jessepinho

repo: prax-wallet/prax


text:
3 predicate handling

Fixes #3

Coverage increased (+0.9%) to 88.793% when pulling 5d1eea99c48daf7a06c085ba6d0612ebcfe38eba on 3-predicate-handling into 856944960224f1d1e2d2296e3be165f5becf7092 on master.

Coverage increased (+0.9%) to 88.793% when pulling 5d1eea99c48daf7a06c085ba6d0612ebcfe38eba on 3-predicate-handling into 856944960224f1d1e2d2296e3be165f5becf7092 on master.

Coverage increased (+0.9%) to 88.793% when pulling 5d1eea99c48daf7a06c085ba6d0612ebcfe38eba on 3-predicate-handling into 856944960224f1d1e2d2296e3be165f5becf7092 on master.

authors: coveralls prayerslayer


text:
Log support

Partially addresses #206
Specifically, log-axis their zoom functionality will be supported.
TODO:

[ ] tests for log axis and update sizes

Code ⬇  implementation which projects LTTB its buckets to equidistant log buckets.
import numpy as np
from plotly_resampler.aggregation.aggregation_interface import DataPointSelector
from typing import Union

class LogLTTB(DataPointSelector):
    @staticmethod
    def _argmax_area(prev_x, prev_y, avg_next_x, avg_next_y, x_bucket, y_bucket) -> int:
        """Vectorized triangular area argmax computation.

        Parameters
        ----------
        prev_x : float
            The previous selected point is x value.
        prev_y : float
            The previous selected point its y value.
        avg_next_x : float
            The x mean of the next bucket
        avg_next_y : float
            The y mean of the next bucket
        x_bucket : np.ndarray
            All x values in the bucket
        y_bucket : np.ndarray
            All y values in the bucket

        Returns
        -------
        int
            The index of the point with the largest triangular area.
        """
        return np.abs(
            x_bucket * (prev_y - avg_next_y)
            + y_bucket * (avg_next_x - prev_x)
            + (prev_x * avg_next_y - avg_next_x * prev_y)
        ).argmax()

    def _arg_downsample(
        self, x: Union[np.ndarray, None], y: np.ndarray, n_out: int, **kwargs
    ) -> np.ndarray:
        """TODO complete docs"""
        # We need a valid x array to determing the x-range
        assert x is not None, "x cannot be None for this downsampler"

        # the log function to use
        lf = np.log1p

        offset = np.unique(
            np.searchsorted(
                x, np.exp(np.linspace(lf(x[0]), lf(x[-1]), n_out + 1)).astype(np.int64)
            )
        )

        # Construct the output array
        sampled_x = np.empty(len(offset) + 1, dtype="int64")
        sampled_x[0] = 0
        sampled_x[-1] = x.shape[0] - 1

        # Convert x & y to int if it is boolean
        if x.dtype == np.bool_:
            x = x.astype(np.int8)
        if y.dtype == np.bool_:
            y = y.astype(np.int8)

        a = 0
        for i in range(len(offset) - 2):
            a = (
                self._argmax_area(
                    prev_x=x[a],
                    prev_y=y[a],
                    avg_next_x=np.mean(x[offset[i + 1] : offset[i + 2]]),
                    avg_next_y=y[offset[i + 1] : offset[i + 2]].mean(),
                    x_bucket=x[offset[i] : offset[i + 1]],
                    y_bucket=y[offset[i] : offset[i + 1]],
                )
                + offset[i]
            )
            sampled_x[i + 1] = a

        # ------------ EDGE CASE ------------
        # next-average of last bucket = last point
        sampled_x[-2] = (
            self._argmax_area(
                prev_x=x[a],
                prev_y=y[a],
                avg_next_x=x[-1],  # last point
                avg_next_y=y[-1],
                x_bucket=x[offset[-2] : offset[-1]],
                y_bucket=y[offset[-2] : offset[-1]],
            )
            + offset[-2]
        )
        return sampled_x

Code ⬇ example which creates a log plot:
from plotly_resampler.aggregation import NoGapHandler

n = 100_000
y = np.sin(np.arange(n) / 2_000) + np.random.randn(n) / 10

fr = FigureResampler(False)
fr.add_trace(
    go.Scattergl(mode="lines+markers", marker_color=np.abs(y) / np.max(np.abs(y))),
    hf_x=np.arange(n),
    hf_y=y,
    downsampler=LogLTTB(),
    gap_handler=NoGapHandler(),
)
fr.update_xaxes(type="log")
fr.update_layout(template='plotly_white', title='log axis demo')

Codecov Report

Merging #207 (dd57855) into main (e56cbc7) will decrease coverage by 0.09%.
The diff coverage is 85.71%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
- Coverage   97.15%   97.06%   -0.09%
==========================================
  Files          13       13
  Lines         983      988       +5
==========================================
+ Hits          955      959       +4
- Misses         28       29       +1

Impacted Files
Coverage Δ

plotly_resampler/figure_resampler/utils.py
96.49% <ø> (ø)

..._resampler/aggregation/plotly_aggregator_parser.py
93.47% <75.00%> (-0.97%)
:arrow_down:

...ler/figure_resampler/figure_resampler_interface.py
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

LGTM!

authors: codecov-commenter jonasvdd jvdd

repo: predict-idlab/plotly-resampler


text:
Pixi run completion for fish shells

Problem description
While pixi supports code completion for pixi shells, this only works for pre-defined commands and options.
It doesn't work if I'm inside a project and want to see the different tasks by typing pixi run and click tab.
I've taken a look at the code base and it seems like for other shells, pixi already have replacement functions to add this capability.
I think for fish we don't have to replace a line but just add an additional one at the end.
For the first iteration I think it's enough to just display the task itself. In a second iteration it would be great to include the descriptions as well.
Also, I would like to do this as my first contribution :)

just saw it's a duplicate

repo: prefix-dev/pixi


text:
feat: add downstream nerfstudio test

Attempts to add a downstream nerfstudio test

The changes to the lock file look mostly cosmetic. I'm not sure why we should allow it to change?

The changes to the lock file look mostly cosmetic. I'm not sure why we should allow it to change?

I don't understand, the original pipeline that did not change here uses a regular install not a '--locked' or '--frozen' this implies that the lock file may change. As the committed lock is a v4 and the newer pixi generates a v5 shouldn't changed be expected?

Sorry, I thought this might expose the problem that was discussed elsewhere about pixi changing the lockfile even though --locked is active.

Ah right! I think it would maybe be better to even delete the lock file for this test so that you know that the solve keeps working. Wdyt? A --locked test would be good for another test for sure.

Ok, I'm just going to remove the diff lock-file check and then we should re-introduce this specifically somewhere later, again an expanded setup-pixi that can reference a dev build would be great for this.

authors: tdejager wolfv


text:
Url encode filename

Encode filename to avoid problems with url encoding on S3 getObject/pubOject actions.
This fixes the Error { NoSuchKey: The specified key does not exist }.
A side effect is to have all the cache files in the same folder and maybe it is ugly for someone, but it is not a technical limitation.

Can you show an example of a URL that would cause a problem with S3 getObject/putObject actions? We haven't run into this problem .

I had problems with any single url, have it arguments or not.
Just cloned yesterday afternoon the repository and started to see NoSuchKey
issues.
Adding the URIEncondeComponent to the key value when setting or getting to
cache was enough to fix it.
--
Iván González Valiente
Systems Developer / AWS Certified Developer
2016-07-15 15:03 GMT+02:00 Todd Hooper notifications@github.com:

Can you show an example of a URL that would cause a problem with S3
getObject/putObject actions? We haven't run into this problem .
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/prerender/prerender/pull/329#issuecomment-232945404,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB-24ymlOlmq-f4M7L_7RG7ikGcuB08cks5qV4UtgaJpZM4JNKmr
.

I had issues with S3 cache with every single url until I added a fix to the
names.
Also I understand this is a change that would mess up an existent cache and
it should only be used on new installations.
Feel free to merge when ever you consider it necessary, if that ever
happens.
Thank you
--
Iván González Valiente
Systems Developer / AWS Certified Developer
2016-07-15 20:10 GMT+02:00 Todd Hooper notifications@github.com:

We haven't had these issues with any URLs. If you were able to provide an
example to reproduce it, that would help. This is a pretty big change that
would change current keys on a lot of caches so it's not something we'd
merge unless it was a big issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/prerender/prerender/pull/329#issuecomment-233026130,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB-24xmwvifBVTnWPeLsp9eMucGUbj7hks5qV80ngaJpZM4JNKmr
.

We'll need some examples of URLs that caused issues because we've saved tens of millions of URLs on our hosted service and haven't run into an issue. It might be that we have things set up differently but I'd like to see some examples before we consider this. Feel free to reopen if you want to share any URLs that cause issues.

authors: colegatron thoop

repo: prerender/prerender


text:
🛑 Seo Card with Content is down

In 2fab6ac, Seo Card with Content (https://og-image-green-seven.vercel.app/Kusama Bot 120.jpeg?price=&image=https://kodadot.mypinata.cloud/ipfs/bafkreiefbdznbjx7ixsdvezdtupj7xpdmgigm7uygl26mk2bozwolemodi&mime=image/jpeg) was down:

HTTP code: 500
Response time: 108 ms

Resolved: Seo Card with Content is back up in c095e15.

repo: preschian/kodadot-status


text:
Update of mysql cluster lead to problem with replication.

What is the problem
Update of the mysql cluster lead to problem with replication.
How I got this problem
My mysql cluster had worked about 20 days without problem. Yesterday I deployed an update for mysql and after this I got problem. I've updated mysql configuration.
Operator started updates from slave mysql node. After some time, about 3 minutes, slave node become master, and old master went to termination. But old master didn't become a slave.
Log of new slave node:
# kubectl -n ch-wordpress logs -f cluster-com-mysql-0 mysql
2020-07-14T16:09:46.240702Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-07-14T16:09:46.241535Z 0 [Note] mysqld (mysqld 5.7.26-29-log) starting as process 1 ...
2020-07-14T16:09:46.400346Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-07-14T16:09:46.400373Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-14T16:09:46.400376Z 0 [Note] InnoDB: Uses event mutexes
2020-07-14T16:09:46.400379Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-07-14T16:09:46.400381Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2020-07-14T16:09:46.400383Z 0 [Note] InnoDB: Using Linux native AIO
2020-07-14T16:09:46.400563Z 0 [Note] InnoDB: Number of pools: 1
2020-07-14T16:09:46.400642Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-07-14T16:09:46.545165Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-07-14T16:09:46.548452Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-14T16:09:46.550047Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-07-14T16:09:46.808392Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite
2020-07-14T16:09:46.886568Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-07-14T16:09:47.697355Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite, size 3932160 bytes
2020-07-14T16:09:55.466791Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-14T16:09:55.466877Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-07-14T16:09:56.921477Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-07-14T16:09:56.922189Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-07-14T16:09:56.922197Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-07-14T16:09:56.939436Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 10390ms. The settings might not  be optimal. (flushed=0, during the time.)
2020-07-14T16:09:56.939702Z 0 [Note] InnoDB: Waiting for purge to start
2020-07-14T16:09:57.040971Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.26-29 started; log sequence number 53846107422
2020-07-14T16:09:57.041143Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-07-14T16:09:57.041469Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-07-14T16:09:58.603350Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2020-07-14T16:09:58.603368Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2020-07-14T16:09:58.681490Z 0 [Warning] CA certificate ca.pem is self signed.
2020-07-14T16:09:58.681535Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2020-07-14T16:09:58.732461Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2020-07-14T16:09:58.732489Z 0 [Note] IPv6 is available.
2020-07-14T16:09:58.732496Z 0 [Note]   - '::' resolves to '::';
2020-07-14T16:09:58.732509Z 0 [Note] Server socket created on IP: '::'.
2020-07-14T16:10:00.526879Z 0 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=cluster-com-mysql-0-relay-bin' to avoid this problem.
2020-07-14T16:10:01.349463Z 0 [ERROR] Error during --relay-log-recovery: Could not locate rotate event from the master.
2020-07-14T16:10:01.427199Z 0 [ERROR] Slave: Failed to initialize the master info structure for channel ''; its record may still be present in 'mysql.slave_master_info' table, consider deleting it.
2020-07-14T16:10:01.427221Z 0 [ERROR] Failed to create or recover replication info repositories.
2020-07-14T16:10:01.427226Z 0 [Note] Some of the channels are not created/initialized properly. Check for additional messages above. You will not be able to start replication on those channels until the issue is resolved and the server restarted.
2020-07-14T16:10:03.869457Z 0 [Note] Event Scheduler: Loaded 0 events
2020-07-14T16:10:03.869601Z 0 [Note] Execution of init_file '/etc/mysql/conf.d/operator-init.sql' started.
2020-07-14T16:10:04.049402Z 0 [Note] Execution of init_file '/etc/mysql/conf.d/operator-init.sql' ended.
2020-07-14T16:10:04.049518Z 0 [Note] mysqld: ready for connections.
Version: '5.7.26-29-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Percona Server (GPL), Release 29, Revision 11ad961
2020-07-14T16:10:08.630735Z 26 [Note] Got packets out of order
2020-07-14T16:10:10.054908Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200714 16:10:10
2020-07-14T16:10:18.630782Z 36 [Note] Got packets out of order
2020-07-14T16:10:28.630729Z 90 [Note] Got packets out of order
2020-07-14T16:10:38.631478Z 121 [Note] Got packets out of order
2020-07-14T16:10:48.630487Z 149 [Note] Got packets out of order
2020-07-14T16:10:58.631484Z 176 [Note] Got packets out of order
2020-07-14T16:11:08.631532Z 203 [Note] Got packets out of order

This message xxxxx [Note] Got packets out of order writing to the log without ending. I've waited about 10 minutes but cluster didn't become ready.
Slave status
mysql> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State:
                  Master_Host: //cluster-com-mysql-1.mysql.ch-wordpress
                  Master_User: sys_replication
                  Master_Port: 3306
                Connect_Retry: 10
              Master_Log_File:
          Read_Master_Log_Pos: 4
               Relay_Log_File: cluster-com-mysql-0-relay-bin.000001
                Relay_Log_Pos: 4
        Relay_Master_Log_File:
             Slave_IO_Running: No
            Slave_SQL_Running: No
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 0
              Relay_Log_Space: 0
              Until_Condition: None
               Until_Log_File:
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File:
           Master_SSL_CA_Path:
              Master_SSL_Cert:
            Master_SSL_Cipher:
               Master_SSL_Key:
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 0
                  Master_UUID:
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State:
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp:
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set:
            Executed_Gtid_Set: 6b45a7cc-b6a5-11ea-b8ea-32ad1a075609:1-1361877,
d816fc29-b6a5-11ea-a57d-7e8cfea4061a:1-377385
                Auto_Position: 1
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.00 sec)

mysql> show master status;\G;
+------------------+----------+--------------+------------------+-----------------------------------------------------------------------------------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set                                                                             |
+------------------+----------+--------------+------------------+-----------------------------------------------------------------------------------------------+
| mysql-bin.000156 |   780098 |              |                  | 6b45a7cc-b6a5-11ea-b8ea-32ad1a075609:1-1361912,
d816fc29-b6a5-11ea-a57d-7e8cfea4061a:1-377385 |
+------------------+----------+--------------+------------------+-----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Deleting slave mysql node didn't helped.
What I did to make cluster work

on slave mysql node

stop slave;
slave reset;
CHANGE MASTER TO MASTER_HOST='cluster-com-mysql-1.mysql.ch-wordpress', MASTER_USER='sys_replication', MASTER_PASSWORD='GYTB7hegSVZ234sdfz6oM';
mysql> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: cluster-com-mysql-1.mysql.ch-wordpress
                  Master_User: sys_replication
                  Master_Port: 3306
                Connect_Retry: 10
              Master_Log_File: mysql-bin.000079
          Read_Master_Log_Pos: 132015898
               Relay_Log_File: cluster-com-mysql-0-relay-bin.000002
                Relay_Log_Pos: 833
        Relay_Master_Log_File: mysql-bin.000079
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 1032
                   Last_Error: Could not execute Update_rows event on table userdb.2Igai1gaW1_options; Can't find record in '2Igai1gaW1_options', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000079, end_log_pos 66005263
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 52804871
              Relay_Log_Space: 79212081
              Until_Condition: None
               Until_Log_File:
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File:
           Master_SSL_CA_Path:
              Master_SSL_Cert:
            Master_SSL_Cipher:
               Master_SSL_Key:
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 1032
               Last_SQL_Error: Could not execute Update_rows event on table userdb.2Igai1gaW1_options; Can't find record in '2Igai1gaW1_options', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000079, end_log_pos 66005263
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 101
                  Master_UUID: d816fc29-b6a5-11ea-a57d-7e8cfea4061a
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State:
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp: 200714 17:52:09
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set: d816fc29-b6a5-11ea-a57d-7e8cfea4061a:377386-377408
            Executed_Gtid_Set: 6b45a7cc-b6a5-11ea-b8ea-32ad1a075609:1-1373717,
d816fc29-b6a5-11ea-a57d-7e8cfea4061a:1-377386
                Auto_Position: 1
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.00 sec)

Because of this Slave_SQL_Running: No Relay_Log_Pos: 833 Relay_Master_Log_File: mysql-bin.000079 I have tried one more thing

slave stop;
slave reset;
CHANGE MASTER TO master_auto_position=0;
CHANGE MASTER TO MASTER_HOST='cluster-com-mysql-1.mysql.ch-wordpress', MASTER_USER='sys_replication', MASTER_PASSWORD='GYTB7hegSVZ234sdfz6oM', MASTER_LOG_FILE='mysql-bin.000081', MASTER_LOG_POS= 234;
               Slave_IO_State: Waiting for master to send event
                  Master_Host: cluster-com-mysql-1.mysql.ch-wordpress
                  Master_User: sys_replication
                  Master_Port: 3306
                Connect_Retry: 10
              Master_Log_File: mysql-bin.000081
          Read_Master_Log_Pos: 234
               Relay_Log_File: cluster-com-mysql-0-relay-bin.000002
                Relay_Log_Pos: 320
        Relay_Master_Log_File: mysql-bin.000081
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 234
              Relay_Log_Space: 541
              Until_Condition: None
               Until_Log_File:
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File:
           Master_SSL_CA_Path:
              Master_SSL_Cert:
            Master_SSL_Cipher:
               Master_SSL_Key:
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 101
                  Master_UUID: d816fc29-b6a5-11ea-a57d-7e8cfea4061a
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp:
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set:
            Executed_Gtid_Set: 6b45a7cc-b6a5-11ea-b8ea-32ad1a075609:1-1373717,
d816fc29-b6a5-11ea-a57d-7e8cfea4061a:1-377386
                Auto_Position: 0
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.00 sec)

After this attempt replication status look better, but mysql cluster stop working at all. K8s endpoints cluster-com-mysql-master and cluster-com-mysql become empty. So I had to delete cluster and recreate it again.
What is my question
How to deal with such problems. It's seems that operator not able to restore cluster. Can you please explain the algorithm, I do not want to recreate mysql cluster every time.
What is ENV
kubernetes 1.14.6
rook ceph 0.9.3/13.2.6
mysql operator 0.3.9
mysql version 5.7
mysql_conf:
mysql_cluster_mysqlconf_innodb_buffer_pool_size: "128M"
mysql_cluster_mysqlconf_innodb_buffer_pool_chunk_size: "128M"
mysql_cluster_mysqlconf_innodb_log_file_size: "16M"
mysql_cluster_mysqlconf_max_connections: "40"
mysql_cluster_mysqlconf_thread_pool_size: "20"
mysql_cluster_mysqlconf_expire_logs_days: "5"

Hi @DeamonMV, thank you for filling this issue.
Here are some tips that may help in the future:

Deleting slave mysql node didn't helped.

When a pod is deleted the PVC is not removed. So in order to reinitialize a node, you can scale it down to 1 replica and then back. By doing this it will delete the PVC for replica and it will reinitialize from node 0.
Also, can you tell me which was the master before the update? Because it seems that node 0 was slave and node 1 was master and after update node 0 become new master and node 1 new slave, is that correct? If yes then you set node 0 slave to node 1 so you made them co-masters.

Hello @AMecea
Sorry, but I can't tell for sure, but I remember that cluster-com-mysql-0 was a master.

When a pod is deleted the PVC is not removed. So in order to reinitialize a node, you can scale it down to 1 replica and then back. By doing this it will delete the PVC for replica and it will reinitialize from node 0.

Yes, I just deleted a pod, and do not touched the amount of replicas of mysql cluster.
Is here exist a way to do such reinitialization of mysql node without deleting a PVC? just to be sure that here no any other way.

I just experienced a similar issue (well it happened 3 weeks ago but now I just realized that my slave is out of sync :hand_over_mouth:).
2021-04-25T18:39:04.408564Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-04-25T18:39:04.410166Z 0 [Note] mysqld (mysqld 5.7.26-29-log) starting as process 1 ...
2021-04-25T18:39:04.428066Z 0 [Note] InnoDB: PUNCH HOLE support available
2021-04-25T18:39:04.428117Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-04-25T18:39:04.428123Z 0 [Note] InnoDB: Uses event mutexes
2021-04-25T18:39:04.428129Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-04-25T18:39:04.428133Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2021-04-25T18:39:04.428138Z 0 [Note] InnoDB: Using Linux native AIO
2021-04-25T18:39:04.428741Z 0 [Note] InnoDB: Number of pools: 1
2021-04-25T18:39:04.429387Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-04-25T18:39:04.434439Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1.25G, instances = 1, chunk size = 128M
2021-04-25T18:39:04.483808Z 0 [Note] InnoDB: Completed initialization of buffer pool
2021-04-25T18:39:04.498492Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-04-25T18:39:04.522930Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite
2021-04-25T18:39:04.525201Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2021-04-25T18:39:05.806990Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite, size 3932160 bytes
2021-04-25T18:39:06.135764Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-04-25T18:39:06.136194Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-04-25T18:39:06.355848Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-04-25T18:39:06.356944Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2021-04-25T18:39:06.356977Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2021-04-25T18:39:06.358679Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.26-29 started; log sequence number 295607608711
2021-04-25T18:39:06.359449Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-04-25T18:39:06.359758Z 0 [Note] Plugin 'FEDERATED' is disabled.
2021-04-25T18:39:15.885339Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2021-04-25T18:39:15.885378Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2021-04-25T18:39:15.888148Z 0 [Warning] CA certificate ca.pem is self signed.
2021-04-25T18:39:15.888204Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2021-04-25T18:39:15.889990Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2021-04-25T18:39:15.890088Z 0 [Note] IPv6 is available.
2021-04-25T18:39:15.890096Z 0 [Note] - '::' resolves to '::';
2021-04-25T18:39:15.890120Z 0 [Note] Server socket created on IP: '::'.

authors: AMecea DeamonMV elderapo

repo: presslabs/mysql-operator


text:
Extend Parquet timestamp support

Sets the Parquet logical type annotation for timestamp columns.

Merged, thanks!

repo: prestosql/presto


text:
Fix exception message when invoking ResultSet.getDate on TIME or TIME…

This is a fix for issue : 5313 .

IMO we should check the type before attempting to parse the value as date.
For example, should result set for a query
SELECT '1209-04-13'; -- a varchar

return a date upon ResultSet.getDate call?
What do other databases do? PostgreSQL and Oracle in particular?

'1209-04-13'

Yes, I was able to verify Postgres implementation of ResultSet and it converts String (VARCHAR) to date when it the string is a valid representation of a Date else it throws PSQLException . This is similar to what we have currently implemented here.

FWIW i also checked ResultSet.getDate behavior with Oracle JDBC driver

it works on varchar data when it is in dddd-dd-dd format
it throws SQLException: Invalid conversion requested when the value cannot be converted

but also:

it works also when the string value has spaces surrounding the value
it seems to work also when the date is prefixed with a minus, but does not seem to work correctly
it does not work for dates with a + sign for a year (default date formatting for dates beyond 9999)
it does not work correctly (aka works leniently) for months with fewer than 31 days. For example getDate on varchar '2018-02-31' returns 2018-03-03

i think we could replicate the first bullets (maybe we can find a better exc message, like including the offending value),
but we should not replicate the second group of bullets (at least not yet)

@findepi Issues with my git repo. Created a new pull request with the discussed changes : https://github.com/prestosql/presto/pull/5510 . Sorry for the inconvenience

authors: findepi jetsasank


text:
Workaround to Chrome Memory Leak

Old pretenders are retained after each shutdown().  Create a reference object we can detach instead of closing over pretender directly.
https://bugs.chromium.org/p/v8/issues/detail?id=4578

released as v1.6.1 🎉

authors: krisselden stefanpenner

repo: pretenderjs/pretender


text:
Multi-variable assignment is split over multiple lines

Found this issue in my codebase.
Input:
deck, created = Deck.objects.get_or_create_from_id_list(
	decklist,
	hero_id=player._hero.card_id,
	game_type=game_type,
	classify_archetype=True
)

Output:
(
	deck,
	created,
) = Deck.objects.get_or_create_from_id_list(decklist, hero_id=player._hero.card_id, game_type=game_type, classify_archetype=True)

This is wrong on two accounts: The multi-assignment should never be assigned to a tuple like that (even though it's syntactically correct, nobody does that). And the arguments to the method called on top of that shouldn't be rewrapped into a single line as that line ends up being too long. (Default params except tab, so 80 line length)

Looking at some other issues in my code it looks like prettier-python doesn't know how to intuitively split lines. For example:
influx_metric(
	"deck_prediction",
	fields,
	missing_cards=30 - deck_size,
	player_class=CardClass(int(player_class)).name,
	format=FormatType(int(global_game.format)).name,
	tree_depth=tree_depth,
	made_prediction=predicted_deck_id is not None
)

Gets converted to:
influx_metric("deck_prediction", fields, missing_cards=30 \
- \
 deck_size, player_class=CardClass(int(player_class)).name, format=FormatType(int(global_game.format)).name, tree_depth=tree_depth, made_prediction=predicted_deck_id is not None)

It knows that the line can be split before operators (which, although feasible, is almost never correct to do) and does it twice because that's how small it can get the line to be.
So I guess there's three issues but all boil down to the first one:

prettier-python should learn how to split function arguments on newlines when necessary
Multiline multi-assignment should be avoided
Operator newline splitting should be avoided

Yeah, there's a lot of formatting behavior that was roughed out just to get stuff printing, but it doesn't all wrap as one might expect. Two of the issues you highlighted here (wrapping function calls and how wrapping works after an equals sign) should both be improved by https://github.com/prettier/plugin-python/pull/52, and indeed both of your inputs remain unchanged when formatted by the code in that PR. I think the third point (operator newlines should be avoided) will come naturally as the other aspects are improved. The only reason it broke there was because nothing else offered to break farther up the print tree.

authors: FuegoFro jleclanche

repo: prettier/plugin-python


text:
Restarting development from today

Hi Everyone,
Just created this issue to let you all know that I have not been able to work on vim-prettier for the last month or so due to being close to having my 3rd baby and wrapping things up at work. From today I will resume work on vim-prettier and will try to address all open issues as well as finally release 1.0
Once again apologies for the delay

Already back on it :)

repo: prettier/vim-prettier


text:
Convert widgets to classes, primefaces/primefaces#12717

Convert all widgets to classes, required for primefaces/primefaces#12717.
Needs to be merged in tandem with the primefaces/primefaces#12717, which is currently scheduled for PF 16.
I only converted widgets to classes so that it's going to work with PF 16, I did not make any further changes, such as switching to ESBuild or adding TypeScript etc.
I clicked through the entire showcase and everything still seems to be working as it did before.

awesome!

authors: blutorange melloware


text:
24px - terminal

#162
https://www.figma.com/file/2rjsQp42uKvzPXzLZIqOeA/Octicons-v2-Source?node-id=746%3A2274

I think I prefer the left version. @colebemis what do you think?

authors: ashygee edokoa


text:
Codespaces environment doesn't load the local JavaScript bundle

Problem
When working on Codespaces, the primer_viewcomponents.js bundle is not properly loaded as it always tries to fetch it from localhost:4000 which is not available.
This is also an issue when modifying the bin/rails port on the Procfile in local environments (which can useful sometimes).
See the code with this logic here.
Related to https://github.com/primer/view_components/issues/1042
Proposed solution
Modify that logic so it is dynamically set and supports Codespaces and, ideally, running processes on different ports.

Related to https://github.com/primer/view_components/issues/1042

I think I addressed this in: https://github.com/primer/view_components/pull/1248, https://github.com/primer/view_components/pull/1259 🚀


text:
部署好了平台之后发现导入数据库类型源失败，提示链接url有问题，但是用navicat是可以连接上的

不要用127的地址，换成你机器的IP，127的地址在docker里不行

好的，感谢

@fuxingbit  选中了数据源之后显示请求异常是为什么呀

看下日志

authors: Handikang fuxingbit

repo: primihub/primihub-platform


text:
Training settings for RAFT-stereo realtime

Hi there, may I ask what's the number of training iterations for RAFT-stereo realtime? Thank you!

We trained RAFT-stereo realtime for 200,000 iterations

Hi @lahavlipson  sorry, I was not clear before. I was referring to the number of GRU updates here - https://github.com/princeton-vl/RAFT-Stereo/blob/main/core/raft_stereo.py#L70
As mentioned in the README, the corresponding valid_iters is 7, I am wondering if the train_iters is also 7? Thanks!

train_iters was also set to 7 for this model

Hi @lahavlipson I was able to reproduce your "raftstereo-sceneflow.pth" checkpoint with little differences.
However, there's a little bit gap for the realtime model I trained vs. your raftstereo-realtime.pth checkpoint.
Specifically, I constructed the realtime model per your suggestion above -
# model config
hidden_dims=[128] * 3,
shared_backbone=True,
corr_levels=4,
corr_radius=4,
n_downsample=3,
slow_fast_gru=True,
n_gru_layers=2,
train_iters=7,
valid_iters=7,
freeze_bn=False,

The training is set to be the same as the standard raftstereo setting. The total batch size is 8 on 2 GPUs. And I only trained on the Sceneflow dataset.
# lr scheduler
max_iter = 200000
lr = 1e-4
optimizer = dict(type="AdamW", lr=lr, weight_decay=0.00001)
optimizer_config = dict(grad_clip=dict(max_norm=1))

Anything I might be missing? Any suggestions are greatly appreciated!

Method
kitti15 (3px)
m-f (2px)
m-h (2px)
m-q (2px)
eth3d (1px)

raft-stereo realtime ckp
5.666
18.005
11.364
8.977
5.751

reproduced
6.249
17.354
11.492
9.846
5.725

Your settings seem fine; the evaluation datasets have few images or are fairly sparse, so fluctuations in performance between runs is pretty normal

Thank you for confirming!

Hi @lahavlipson I was able to reproduce your "raftstereo-sceneflow.pth" checkpoint with little differences. However, there's a little bit gap for the realtime model I trained vs. your raftstereo-realtime.pth checkpoint.
Specifically, I constructed the realtime model per your suggestion above -
# model config
hidden_dims=[128] * 3,
shared_backbone=True,
corr_levels=4,
corr_radius=4,
n_downsample=3,
slow_fast_gru=True,
n_gru_layers=2,
train_iters=7,
valid_iters=7,
freeze_bn=False,

The training is set to be the same as the standard raftstereo setting. The total batch size is 8 on 2 GPUs. And I only trained on the Sceneflow dataset.
# lr scheduler
max_iter = 200000
lr = 1e-4
optimizer = dict(type="AdamW", lr=lr, weight_decay=0.00001)
optimizer_config = dict(grad_clip=dict(max_norm=1))

Anything I might be missing? Any suggestions are greatly appreciated!
Method	kitti15 (3px)	m-f (2px)	m-h (2px)	m-q (2px)	eth3d (1px)
raft-stereo realtime ckp	5.666	18.005	11.364	8.977	5.751
reproduced	6.249	17.354	11.492	9.846	5.725

Hi, dilinwang820
I cannot reproduce the result of realtime model, my result is much worse than yours and released model. my eth3d d1 is 6.61, 'things' d1 is 15. I found you open batchnorm, is that the point? and about learning rate, I found the scheduler's max lr=2e-4, and div_factor is 25(default), final_div_factor is 1e4(default), did you use this settings? or you just use lr=1e-4 and did not change during the whole training process?
thank you

authors: dilinwang820 dypromise lahavlipson

repo: princeton-vl/RAFT-Stereo


text:
Suggestion: Friends

Add a command that lets players give access to all of their containers to a certain player. For example, if I did /keys friend add napalm1, any container I've placed or will place can be accessed by napalm1.
Similarly, entering the command /keys friend remove napalm1 would do the opposite, taking napalm1's access from anything I've locked.
/keys friend list could show a list of friends I've added to my keys. /keys friend exclude could exclude the specified container from any friends commands that I enter, while /keys friend include would reverse this effect. /keys friend clear would clear all friends from my list, maybe with a confirmation command.
Anyway, uh, friends! Great for players who join together, live together, or build together. Also nice for pesky friends that ask for access to everything.

This could possibly work well with https://github.com/prism/Keys/issues/2 .

repo: prism/Keys


text:
MariaDB mentions

Describe this PR
I have never used Prisma before, and it took me quite a lot of extra effort to figure out if Prisma supports MariaDB at all because the documentation was only mentioning MySQL. After some digging, I found that indeed Prisma uses both https://www.npmjs.com/package/mariadb for the connector and https://hub.docker.com/_/mariadb as part of the CI, and MariaDB support is actually excellent.
What issue does this fix?
The docs hide the fact that Prisma actually supports MariaDB. Sequalize has very clear MariaDB documentation, and if you merge this PR then Prisma will be much more clear about the MariaDB support situation.
Changes
Each commit is atomic and carefully documented - please review this PR by looking commit-by-commit looking at the message and the change at the same time.
Looking at git log in 500-databases and e.g. 4358a4169ef3ff042d70b825a9cf3e16bf71e48e seems you prefer to squash when merging. Please merge this PR as-is without squashing to avoid loosing the per-commit documentation.
Any other relevant information
I am also happy to iterate on the contents of this PR based on your feedback. I am also happy to rebase frequently.

Hi there @ottok , is this PR distinct from #5706 ?

Yes, I split this and also #5716 out from #5706 in hope that it is easier for you to review and to accept a few smaller PRs instead of one big one.

Thanks for the feedback! I have updated the PR following your guidance.

Thanks Jon for the feedback - I have updated the PR accordingly and also rebased on latest prisma:main.
Looking at git log in 500-databases and e.g. https://github.com/prisma/docs/commit/4358a4169ef3ff042d70b825a9cf3e16bf71e48e seems you prefer to squash when merging. Please merge this PR as-is without squashing to avoid loosing the per-commit documentation. Each commit is atomic and carefully documented.

Looking at git log in 500-databases and e.g. 4358a41 seems you prefer to squash when merging. Please merge this PR as-is without squashing to avoid loosing the per-commit documentation. Each commit is atomic and carefully documented.

@ottok is there any particular reason why this needs to be not squashed and merged? I appreciate the work you did here and am happy to merge, but we squash/merge as a default. Commits are still available in the respective PR.

Looking at git log in 500-databases and e.g. 4358a41 seems you prefer to squash when merging. Please merge this PR as-is without squashing to avoid loosing the per-commit documentation. Each commit is atomic and carefully documented.

@ottok is there any particular reason why this needs to be not squashed and merged? I appreciate the work you did here and am happy to merge, but we squash/merge as a default. Commits are still available in the respective PR.

If you care about linear history, or about being able to read git commits and the messages through tools like git blame etc, you should prefer linear history and normal merges or rebase+merge. But this is just a sidetrack for the doc change - git use is a topic for another day. Feel free to merge as you wish.
Thanks for the feedback rounds to get this polished, the result will now make the docs much better for MariaDB users. Thanks!

authors: jharrell ottok

repo: prisma/docs


text:
Fail gracefully when model missing ID

The following model leads to DMMF that nexus-prisma will crash on:
model User {
  id     String     @id @unique @default(cuid())
  posts  Post[]
  age    Int
  status UserStatus
}

model Post {
  id       String    @id @unique @default(cuid())
  author   User
  comments Comment[]
  rating   Float
}

model Comment {
  author  User
  post    Post
  content String
}

enum UserStatus {
  BANNED
  ACTIVE
}

/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/dmmf/DMMFClass.ts:130
      throw new Error(
            ^
Error: Could not find field field 'undefined' on type Query
    at OutputType.getField (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/dmmf/DMMFClass.ts:130:13)
    at /Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/mapping.ts:54:41
    at Array.map (<anonymous>)
    at Object.exports.getCrudMappedFields (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/mapping.ts:50:64)
    at renderNexusPrismaInputs (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/typegen.ts:114:25)
    at render (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/typegen.ts:43:3)
    at doGenerate (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/typegen.ts:26:25)
    at Object.generateSync (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/typegen.ts:12:3)
    at new SchemaBuilder (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/builder.ts:178:15)
    at Object.build [as nexusPrismaPlugin] (/Users/jasonkuhrt/projects/prisma/nexus-prisma/examples/hello-world/node_modules/nexus-prisma/src/builder.ts:98:19)

This change fixes it:
model Comment {
+ id      String @id @unique @default(cuid())
  author  User
  post    Post
  content String
}

Could Photon handle the bad model more gracefully?

We would rather want to support the use case where the column doesn't have an ID.
https://github.com/prisma/prisma2/issues/175
I would close this as a duplicate but feel free to reopen if you want us to improve the error message while this is been implemented.

repo: prisma/photonjs


text:
where field's value match model field definition but throws P2009 error

Bug description
when query string type field prisma throw P2009 error

How to reproduce

invoke findFirst method
Expected behavior
No response
Prisma information

model t_user {
  user_id    String @unique(map: "user_id") @db.VarChar(64)
  id         Int    @id @default(autoincrement())
  user_name  String @default("") @db.VarChar(255)
  user_phone String @default("") @db.VarChar(255)

  @@index([user_name], map: "user_name")
  @@index([user_phone], map: "user_phone")
}

prismaClient.t_user.findFirst({ where: { user_id: 'test_1' } })

Environment & setup

OS: CentOS
Database: MySQL
Node.js version: 16.13.0

Prisma Version
prisma                  : 3.6.0
@prisma/client          : 3.6.0

@Yuliang-Lee Did you ever figure it out?

authors: Yuliang-Lee bigvisionmalachibazar

repo: prisma/prisma


text:
Combining first + orderBy in create mutation results in internal server error

Describe the bug
Combining where.first + where.orderBy in create mutation = internal server error
Looks like #2786 (but this one is now solved)
To Reproduce
datamodel.graphql
type Foo {
    id: ID! @unique
    bars: [Bar!]!
}

type Bar {
    id: ID! @unique
    quantity: Int!
}

Query causing internal server error
mutation {
  createFoo(
    data: {
      bars: {
        create: [
          { quantity: 1 }
          { quantity: 2 }
        ]
      }
    }
  ) {
    id
    bars(first: 1, orderBy: createdAt_DESC) {
      quantity
    }
  }
}

Whoops
{
  "data": {
    "createFoo": {
      "id": "cjm0ms9ed01ty0b77x9hudsoc",
      "bars": null
    }
  },
  "errors": [
    {
      "message": "Whoops. Looks like an internal server error. Search your server logs for request ID: local:api:cjm0ms9e801tw0b77c4bm2ypq",
      "path": [
        "createFoo",
        "bars"
      ],
      "locations": [
        {
          "line": 4,
          "column": 5
        }
      ],
      "requestId": "local:api:cjm0ms9e801tw0b77c4bm2ypq"
    }
  ]
}

Expected behavior
no internal server error would be ncie
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):

Prisma Server: 1.16.1

I am able to reproduce this with prismagraphql/prisma:1.16-beta

May be related to https://github.com/prisma/prisma/issues/3040

Can you share the actual internal server error from your server logs?

@marktani as far as I can remember nothing was printed on stdout, where are prisma logs? anyway you can easily reproduce it, if not I can update reproduction steps.

Please see my comment on https://github.com/prisma/prisma/issues/3040 to see how to circumvent this problem until we release a fix.

We just released 1.16.5 which fixes this issue.

@do4gr thanks

authors: LawJolla brikou divyenduz do4gr marktani


text:
Mongo connector leaks connections

Describe the bug
MongoDB connector opens connection when under load but does not release them
To Reproduce
https://github.com/divyenduz/prisma-4165
Expected behavior
MongoDB should release unused connections
Screenshots
MongoDB Atlast connection dashboard

Versions (please complete the following information):

Connector: MongoDB
Prisma Server: 1.26.5 - Not tested on latest yet because https://github.com/prisma/prisma/issues/4151
prisma CLI: prisma/1.28.2 (darwin-x64) node-v10.4.0

The MongoDB connector is configured by providing the connection string uri. This allows you to also set its connection pooling behaviour.
Atlas provides you with a string that does not explicitly configure the connection pooling:
mongodb+srv://user:pass@db.mongodb.net/test?retryWrites=true
The MongoClient instantiated by Prisma then falls back to the defaults, a pool size of 100 and no timeout for the connections.
If you want different behaviour, you can attach options to your uri, see here https://docs.mongodb.com/manual/reference/connection-string/#urioption.connectTimeoutMS
The following string limits the MongoClient to 10 connections and forces a connection close after 60s.
mongodb+srv://user:pass@db.mongodb.net/test?retryWrites=true&maxIdleTimeMS=60000&maxPoolSize=10'
Prisma will instantiate a client for Deploys and one for API calls, so you might see up to 20 connections here from Prisma if you mix a lot of deploys and normal queries/mutations.

This shows the connection behaviour with default options (the first two plateaus), where Prisma will open a lot of connections and not close them (I manually shut down the Prisma container for the drops).
The later smaller peaks show the behaviour with the second connection string. Prisma will start fewer connections and close them after 60s of idle time.

I have a problem with every new connection takes too much time(a couple seconds from server), then the client can perform queries or mutations very fast. And after certain time users need to wait the same time to reconnect to mongoDB. Is this the same problem?

Hey @soqt, I think this is a different issue.
So this com.mongodb.MongoSocketException: mongo: System error indicates a networking related issue. See:  https://mongodb.github.io/mongo-java-driver/3.6/javadoc/com/mongodb/MongoSocketException.html
Since Prisma is able to pick up the connection I suspect that that is not a Prisma issue but that the network connection between Prisma and Mongo is somehow unstable.
You can of course also try to play around with the connection string settings for Mongo and see if that helps. See here: https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options
socketTimeoutMS and connectTimeoutMS are related to the connection.

authors: divyenduz do4gr soqt


text:
Connect 3rd party toggles in popup to their respective domains

the only outstanding issue on this is that the 3rd-party toggles generated in the popup connect to the 1st party domain for some reason. This can be sorted out at another time or when testing the whole extension.

OK, feel free to open an issue or keep track of it in another way.
Originally posted by @SebastianZimmeck in https://github.com/privacy-tech-lab/gpc-optmeowt/issues/175#issuecomment-1094087622

My last commit resolved this issue. I will go ahead and close this out as the changes are on branch issue-175 (tagging #175).

repo: privacy-tech-lab/gpc-optmeowt


text:
Fix Dependabot alerts

@asalia-1, @kalicki1, and @dknopf, I changed your permissions such that you should now can view the Dependabot alert. It would be good if you could fix those, @asalia-1. They do not necessarily need to be all implemented (although, if there is no version conflict or other breakage, such implementation would be my preferred choice). However, take a look at each of those going forward and make a call whether or not to fix. If you have any doubt, please let me know.

Sure thing. And I will keep an eye out for future alerts

Looked into the security risks associated with the dependencies that were flagged and found the risk involved is tolerable for our use case thus we can safely ignore these alerts. I will keep an eye out for any of these alerts going forward and analyze them case by case to make sure they do not cause issues.


text:
🆕 Software Suggestion | ImSter

Basic Information
Name: ImSter
Category: Encryption
URL: https://github.com/armytricks/ImSter
Description
Free and open source multi-platform image steganography software. Encryption is 256-bit AES.
Why I am making the suggestion
Lot's of software focuses on secure encryption. This one provides both secure encryption and a way to conceal the fact that secret data exists in the first place.

My connection with the software
I am the author of this software.

[X] I will keep the issue up-to-date if something I have said changes or I remember a connection with the software.

Not sure how this is of any help to the visitors of PTIO. Seems like a nice script you made but I don't think it qualifies for listing. I have seen many applications accomplishing this, how does yours stand out?

Not sure how this is of any help to the visitors of PTIO. Seems like a nice script you made but I don't think it qualifies for listing. I have seen many applications accomplishing this, how does yours stand out?

I'm yet to see such an application that uses AES with CBC encryption mode. As a result, I think this stands out by being genuinely more secure than other open source solutions out there. Furthermore, it is fully featured with both a GUI and CLI, and is multi-platform with a single binary making it very accessible and flexible.

Pretty sure this one for example uses AES:
https://github.com/guardianproject/PixelKnot
I don't undervalue your project, I just don't think it's that helpful to average visors looking for privacy friendly ways to communicate etc.

Pretty sure this one for example uses AES:
https://github.com/guardianproject/PixelKnot
I don't undervalue your project, I just don't think it's that helpful to average visors looking for privacy friendly ways to communicate etc.

The project you linked is no longer developed. If you look on the Play Store listing it has a 2.6/5 rating because of instability.
I understand what you're saying though. It doesn't have much general applicability, so I'll close this.


text:
Allow PRSS to generate randomness shared with only one helper

Builds on top of #1185
This closes https://github.com/private-attribution/ipa/issues/1029 by adding a method to PRSS implementation that allows callers to specify which randomness they want to obtain: shared with the helper on the right or on the left. This saves 50% of computation in cases where only one side of PRSS is required. https://github.com/private-attribution/ipa/issues/1029 lists the cases where it is useful.
Happy to bikeshed on naming, it gets harder and harder to find good names

Here is the link to the benchmark that forced me to implement custom iterator.
Using Zip to combine two iterators. Benchmark against the stable main. 15% regression

Using ChunksIter with inline calls. Benchmark against the stable main. No perf change

repo: private-attribution/ipa


text:
Added test JPG image for integration test

What's Changed?

Added test JPG image file

PR Checklist

[ ] Updated unit tests
[ ] Ran unit tests

@letmerecall Changed test_image.jpg to an image with dummy PII.

repo: privateai/pai-thin-client


text:
Query params are being encoded too early so cannot be effectively mocked

Describe the bug
Query params are being encoded too early so cannot be effectively mocked
To Reproduce
See full dialog in https://github.com/chassing/uplink-httpx/issues/6
Expected behavior
See full dialog in https://github.com/chassing/uplink-httpx/issues/6
Additional context
This seems to be an edge case when the characters are need percent url encoding

I found that if I set encoded=True then it is passing, though this seems a little sketchy :D as httpx seems to auto encode but other http clients might not
import httpx
import respx
from fastapi import FastAPI, Query
from uplink import Consumer
from uplink import Query as Q
from uplink import get, returns
from uplink_httpx import HttpxClient

### Given: Mock Server
BASE_URL = "https://mock.api/"

app = FastAPI()

@app.get("/user")
def get_user(select: str = Query(alias="$select")):
    return {"id": select}

mock_api = respx.mock(base_url=BASE_URL, assert_all_called=False)
mock_api.route().mock(side_effect=respx.ASGIHandler(app))

### When: Client
class BasicClient(Consumer):
    @get("user")
    @returns.json()
    def user(self, select: Q("$select", encoded=True)):
        ...

### Then: Should work with either raw client or uplink client
@mock_api
async def test_raw():
    client = BasicClient(base_url=BASE_URL, client=HttpxClient())
    resp = await client.user(select=123)
    assert resp.status_code == 200
    assert resp.json() == {"id": "123"}

@mock_api
async def test_uplink():
    resp = await httpx.AsyncClient().get(f"{BASE_URL}user?$select=123")
    assert resp.status_code == 200
    assert resp.json() == {"id": "123"}

All passing with the above

repo: prkumar/uplink


text:
List won´t render with preceding text

Version: 6.7.4
If a list is being preceded by a paragraph, then the list won´t render normally. If there is at least one empty new line between them, the list will render.
This will render normally:
[Markdown](http://daringfireball.net/projects/markdown/) lets you write content in a really natural way.

  * You can have lists, like this one
  * Make things **bold** or *italic*
  * Embed snippets of `code`
  * Create [links](/)
  * ...

But this won´t render the list:
[Markdown](http://daringfireball.net/projects/markdown/) lets you write content in a really natural way.
  * You can have lists, like this one
  * Make things **bold** or *italic*
  * Embed snippets of `code`
  * Create [links](/)
  * ...

Hey there - you need a newline between to denote that the first line is a separate paragraph per the markdown spec: https://daringfireball.net/projects/markdown/syntax#p

Sorry for kicking a dead issue, but I just bumped into this as well. I know what the spec says, but neither commonmark nor GFM require an empty line. Since all the cool kids wanna do what Github does, I'm starting to see this out in the wild more, sometimes from systems I don't control.
Since you've already forked simple-markdown, maybe this could be an optional render flag or something? That would prevent the need to preprocess.

authors: Rall3n dendrochronology probablyup

repo: probablyup/markdown-to-jsx


text:
Add dirty_detach option

Normally dropping a Session thoroughly disables the debug peripherals. If this option is enabled when the session is created, Session::drop will leave the debug peripherals running.
Closes #1610

Hey :) Do you intend to push this over the finishline? :)

authors: Yatekii nilfit

repo: probe-rs/probe-rs


text:
probe-rs-tools: support --ignored and --include-ignored libtest options

The libtest framework allows adding #[ignore] to a test, which a libtest compatible harness should list when getting the --ignored flag.
I found this when trying to wrap the runner with nextest.
This just needed wiring up to work (literally three lines, too bad I missed the release).
E.g., for this test, the output without --ignored becomes this:
❯ probe-rs run '--protocol=swd' --chip nrf52840_xxAA --preverify /home/kaspar/src/own/rust/ariel-os/examples/testing/../../build/bin/nrf52840dk/testing/cargo/thumbv7em-none-eabi/debug/deps/example_test-9af699a2b54d0715 --list --format terse
     Finished in 1.67s
tests::trivial_async: test
tests::trivial: test
tests::trivial_ignored: test

... and with added --ignored:
ariel-os/examples/testing on  pr/integrate-embedded-test took 2s140ms
❯ probe-rs run '--protocol=swd' --chip nrf52840_xxAA --preverify /home/kaspar/src/own/rust/ariel-os/examples/testing/../../build/bin/nrf52840dk/testing/cargo/thumbv7em-none-eabi/debug/deps/example_test-9af699a2b54d0715 --list --format terse --ignored
     Finished in 1.67s
tests::trivial_ignored: test

This corresponds to what nextest expects according to https://nexte.st/docs/design/custom-test-harnesses/.
Running without --ignored:

    Finished `test` profile [optimized + debuginfo] target(s) in 0.25s
     Running tests/example_test.rs (../../build/bin/nrf52840dk/testing/cargo/thumbv7em-none-eabi/debug/deps/example_test-9af699a2b54d0715)
     Finished in 1.67s

running 3 tests
test tests::trivial_async   ... ok
test tests::trivial         ... ok
test tests::trivial_ignored ... ignored

test result: ok. 2 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.54s

Running with --ignored:

    Finished `test` profile [optimized + debuginfo] target(s) in 0.22s
     Running tests/example_test.rs (../../build/bin/nrf52840dk/testing/cargo/thumbv7em-none-eabi/debug/deps/example_test-9af699a2b54d0715)
     Finished in 1.67s

running 1 test
test tests::trivial_ignored ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 0.29s

With --include-ignored:

```
    Finished `test` profile [optimized + debuginfo] target(s) in 0.25s
     Running tests/example_test.rs (../../build/bin/nrf52840dk/testing/cargo/thumbv7em-none-eabi/debug/deps/example_test-9af699a2b54d0715)
     Finished in 1.67s
running 3 tests
test tests::trivial_async   ... ok
test tests::trivial         ... ok
test tests::trivial_ignored ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.80s
</details>

A nice start of the new cycle, thanks :)

Pleasure! :) Shouldn't you be release partying?


text:
Boot from Live USB Hangs

Im trying to boot from a USB stick using the image FuryBSD-12.1-GNUSTEP-amd64.iso, but it stops after showing this error message:
kldload: can't load sysctlinfo: Not such file or directory
/etc/rc: WARNING: Unable to load kernel module sysctlinfo

The same thing happens if I boot from BIOS or UEFI modes.
Picture of messages from the boot process:

Facing the same issue, would love to try this OS as helloSystem is heavier and I actually prefer the LiveStep look.

Any luck on this yet?

authors: aliguzel gushtichudi jasaldivara

repo: probonopd/LIVEstep


text:
Valorant rootkit dislikes PH

I think others who play Valorant like me and use PH also noticed this that after starting PH any time Valorant cant be played anymore because Vanguard is not properly functioning and you need to restart the whole computer just because of this.

Vanguard is not properly functioning and you need to restart the whole computer

Vanguard forces the reboot so like any malware you should uninstall and refund. BattlEye and EAC don't have the same issue so it's only an issue for Vanguard's users.

I am interested in how ProcessHacker like tools can be used in games for cheating 🤣

can be used in games for cheating

The reason given was Data mining
Process Hacker shows information about what your machine does in realtime and indirectly what Vanguard does in realtime, so being able to view information about Vanguard is considered cheating.
The main issue  people don't understand about blocking Process Hacker... Process Hacker at its core is a lightweight parser of data provided by the NativeAPI and everything Process Hacker does and shows was provided by that same API. The NativeAPI has been built-into every version of Windows (https://en.wikipedia.org/wiki/Native_API) since around 1990 and updated to the latest Win10.
You don't block the NativeAPI by blocking the Process Hacker binary... You can still call the NativeAPI functions and get the exact same information and preform the exact same operations using the exact same source-code from a different binary.
There are hundreds of applications and projects here on Github using the exact same NativeAPI and have identical functionality and features as Process Hacker. Even competitor products and projects that were forked from Process Hacker using identical code are unaffected. This might be an issue for closed-source projects because that requires the company/developer releasing updates but Process Hacker is open-source and anyone can download the source and recompile the binaries🤣
All Vanguard are currently doing is effectively blocking the official Process Hacker binary while ignoring everything else including binaries compiled from the same Process Hacker source-code.
My best guess is that Riot are blocking Process Hacker because they're idiots and don't know Windows internals? I previously worked at BattlEye and Process Hacker is not an exploit vector.

You will not get banned for using Process Hacker with BattlEye or with Easy Anti-Cheat.
BattlEye and Easy Anti-Cheat (EAC) don't force reboot your machine.

You should refund products that blame Process Hacker for cheating and always refund products that force reboot.

repo: processhacker/processhacker


text:
bitton.mousePressed is not working

while running the code
on the line mousePressed this error is arising
Uncaught TypeError: Cannot read property 'mouseClicked' of null
at setupButtons (sketch.js:64)
at p5.p.setup (sketch.js:39)
at p5. (p5.js:48642)
at p5. (p5.js:48573)

Hi @thirukumars for coding help, please post a snippet of the program you are running along with your question here: https://discourse.processing.org
Thanks!

authors: lmccart thirukumars


text:
association scope

consider these models:
class Theme < ApplicationRecord
  # Relationships
  has_many :templates
end

class Template < ApplicationRecord
  # Relationships
  belongs_to :theme

  # Enums
  enum status: { active: 0, inactive: 1 }
end

and its blueprinter:
class ThemeBlueprinter < ApplicationBlueprinter
  fields :id, :page

  association :templates, blueprint: TemplateBlueprinter < -- how to define association scope here?
end

using blueprinter as:
ThemeBlueprinter.render_as_hash(@theme)

I'd like to call template scope active when its querying for templates association to get only active templates. is it possible?

I think you can try to do it within a block:
class ThemeBlueprinter < ApplicationBlueprinter
  fields :id, :page

  association :templates, blueprint: TemplateBlueprinter do |theme|
  	theme.templates.active
  end
end

However you can also define scoped association active_templates, which probably would be better, since query would be performed outside of the view logic.

repo: procore/blueprinter


text:
Update sbt to 1.3.5

Updates org.scala-sbt:sbt from 1.3.4 to 1.3.5.
Release Notes/Changelog
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.
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 = "org.scala-sbt", artifactId = "sbt" } ]

labels: semver-patch

You can close this. sbt version is 1.3.10 already.

authors: alexbalonperin scala-steward


text:
Where is web installer?

After successfully installing dokku, documentation says, visit server IP, and follow web installer. But when i visit the IP, it just displays Welcome to nginx on Debian! page.
I ran this command for dokku installation.
wget -qO- https://raw.github.com/progrium/dokku/v0.3.17/bootstrap.sh | sudo DOKKU_TAG=v0.3.17 bash

What happened to web installer?

Okay, i got it.
Searched through source, and found this.
if [ ! -f "/home/dokku/HOSTNAME" ]; then
  echo "\nTo avoid cli-based dokku configuration, use the web installer"
  echo "Debian-based installs should have this running and available"
  echo "on port 80. You can also install it via the following commands:"
  echo ""
  echo "  cd /root/dokku"
  echo "  sudo make dokku-installer\n"
fi

So i ran following command in dokku directory, and got it working.
sudo make dokku-installer

Thanks :)

I also had this issue, which was fixed by running the command manually (thanks!). But really, shouldn't this have been done automatically like the message says?

Yes, it should be included in make install because the documentation says that.

Closing as there is an open PR.

Did anyone updated docs? I cannot find it anywhere.

authors: harshjv josegonzalez sahilshekhawat sekjun9878

repo: progrium/dokku