GCFB mode reset is incorrect after large data.

The GCFB mode calculates a new key and IV after every 1024 bytes processed.
If it is used to encrypt data that is greater than 1024 bytes in length then the subsequent reset (either explicit or implicit on doFinal()), will only reset to the most recent 1024 boundary rather than the original key and IV.
This can be seen via the following code
    /**
     * Data Length. (Anything above 1024 triggers problem).
     */
    private static final int DATALEN = 1025;

    /**
     * SecureRandom.
     */
    private static SecureRandom RANDOM = new SecureRandom();

    /**
     * Main.
     */
    public static void main(final String[] args) {
        try {
            checkCipher(new GCFBBlockCipher(new GOST28147Engine()));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * Check Cipher.
     * @param pCipher the cipher
     */
    private static void checkCipher(final BlockCipher pCipher) throws Exception {
        /* Create the data */
        final byte[] myData = new byte[DATALEN];
        RANDOM.nextBytes(myData);

        /* Create the Key parameters */
        final CipherKeyGenerator myGenerator = new CipherKeyGenerator();
        final KeyGenerationParameters myGenParams = new KeyGenerationParameters(RANDOM, 256);
        myGenerator.init(myGenParams);
        final byte[] myKey = myGenerator.generateKey();
        final KeyParameter myKeyParams = new KeyParameter(myKey);

        /* Create the IV */
        final byte[] myIV = new byte[16];
        RANDOM.nextBytes(myIV);

        /* Create the initParams */
        final ParametersWithIV myParams = new ParametersWithIV(myKeyParams, myIV);

        /* Wrap Block Cipher with buffered BlockCipher */
        final BufferedBlockCipher myCipher = new DefaultBufferedBlockCipher(pCipher);

        /* Initialise the cipher for encryption */
        myCipher.init(true, myParams);

        /* Encipher the text */
        final byte[] myOutput = new byte[myCipher.getOutputSize(DATALEN)];
        int myOutLen = myCipher.processBytes(myData, 0, DATALEN, myOutput, 0);
        myCipher.doFinal(myOutput, myOutLen);

        /* Re-Encipher the text (after implicit reset) */
        final byte[] myOutput2 = new byte[myCipher.getOutputSize(DATALEN)];
        myOutLen = myCipher.processBytes(myData, 0, DATALEN, myOutput2, 0);
        myCipher.doFinal(myOutput2, myOutLen);

        /* Check that the cipherTexts are identical */
        if (!Arrays.equals(myOutput, myOutput2)) {
            System.out.println("Encryption differs after reset!!")
        }
    }

I'm in 2 minds on this one, I'd agree it doesn't work with the JavaDoc but I'm wondering if we should follow the move with GCM to not allow re-use after doFinal. I'll admit I'm not an expert when it comes to GOST, but I can't shake the feeling that the original authors of the standard would regard this as unsafe usage.
Oh and, Happy New Year! I was wondering how far we'd get before the next bug report...


Failed to bind to address http://<IP_ADDRESS>:5000: address already in use

23.6.1. Thank you for the version!
I have a small NET 6 client app which connects to a NET Web service on other machine.
It works in Windows, ok.
I have build in Windows for Linux:

electronize build /target linux
ok, then copied bin\Desktop folder to Ubuntu.
In Ubuntu go to internal folder and run
~/Moomoo/Desktop/linux-unpacked/resources/bin$ ./MyClient

Finally received:
Unhandled exception. System.IO.IOException: Failed to bind to address http://<IP_ADDRESS>:5000: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
After a search I can say : I do not use this address and port. Also, why it busy - I have no clue.
What is ti and how to fix it?

It was my not started app, ok. I have killed  the process and run app again (in terminal)
But I do not see a GUI, the console output only:
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/xoleg/Moomoo/Desktop/linux-unpacked/resources/bin/

This is from ASP.NET Core. When it is launched in production, it has the default ports 5000 and 5001. You can also influence this yourself. Add the following line of code to your Program.cs:
webBuilder.UseUrls("http://<IP_ADDRESS>:<port>");
Please tell me if it worked.

Thank you Gregor, please read my and question here: why I see the console output only in Ubuntu instead of GUI?
In the same time I can build and run a desktop app in windows- OK!

To run a Linux desktop application in WSL2 (Windows Subsystem for Linux 2) with a graphical user interface (GUI), you need to install an X Window System server for Windows, which will act as a display server for the Linux applications. One of the popular options is VcXsrv. Here are the steps to run a Linux desktop application with a graphical user interface in WSL2:

Install WSL2 on your Windows system, if you haven't already. You can find instructions in the official Microsoft documentation: https://docs.microsoft.com/en-us/windows/wsl/install
Install a Linux distribution of your choice from the Microsoft Store (e.g., Ubuntu, Debian, Fedora Remix).
Install VcXsrv or another X Window System server. Here's the link to VcXsrv: https://sourceforge.net/projects/vcxsrv/
Launch VcXsrv and select your desired settings. Make sure to enable "Disable access control" to avoid connection issues.
Set the DISPLAY environment variable in your WSL2 shell to use the X server:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
Run the Electron.NET Linux application in the WSL2 shell:
electronize start

The application should now be displayed on your Windows desktop in its own window. Note that while this method works for many applications, some may experience performance or compatibility issues.
Alternatively, you can use Windows 11, which provides native support for WSLg (Windows Subsystem for Linux GUI). This allows for easy running of Linux GUI applications directly from WSL without needing to install a separate X Window System server. You can find more information here: https://aka.ms/wslg

Thank you. but in my case I have a physical machine with Ubuntu in a LAN And I wanted to do real experiment to build my Desktop app Windows for Linux, copy it to Ubuntu and run. All works but I do not see GUI. The same desktop app build for win works fine.

If you have a physical machine running Ubuntu in your local network and you want to run a Linux desktop application with GUI from your Windows machine, you can use a remote desktop protocol like VNC or X11 forwarding over SSH to display the GUI on your Windows machine. I'll explain both methods below.
Method 1: VNC

Install a VNC server on your Ubuntu machine. For example, you can use TightVNC:

sudo apt update
sudo apt install tightvncserver

Start the VNC server on your Ubuntu machine:
vncserver

Follow the prompts to set a password for remote access.

Install a VNC client on your Windows machine. For example, you can use RealVNC Viewer: https://www.realvnc.com/en/connect/download/viewer/

Launch the VNC client on your Windows machine and enter the IP address of your Ubuntu machine followed by the display number (e.g., <IP_ADDRESS>:1). Enter the password you set earlier when prompted.

The Ubuntu desktop should now be displayed on your Windows machine, and you can run the Linux desktop application with GUI.

Method 2: X11 Forwarding over SSH

Install an X Window System server on your Windows machine, like VcXsrv: https://sourceforge.net/projects/vcxsrv/
Launch VcXsrv with the "Multiple windows" option and enable "Disable access control" to avoid connection issues.
Install an SSH client on your Windows machine that supports X11 forwarding, like PuTTY: https://www.putty.org/
Launch PuTTY and enter the IP address of your Ubuntu machine. In the "Category" tree on the left, go to Connection > SSH > X11, and enable "Enable X11 forwarding."
Click "Open" to start the SSH session with your Ubuntu machine.
Once connected, run the Linux desktop application with GUI in the SSH terminal:
electronize start

The application's GUI should now be displayed on your Windows machine.
Please note that both methods may have some latency or performance issues depending on your network conditions. If you are building a cross-platform application, consider using a framework like Electron or Qt that allows you to build and test the application natively on both Windows and Linux.

How did you create your project for Linux? Do you have the .NET SDK and your project on the Linux? Electron.NET CLI installed and electronize start executed? Or on the Linux electronize build /target linux?

Hi,
I work in Windows 10. All NET SDK installed. The freshest Electron Cli installed too and i use in my project the freshest NuGet.
My tests: (build an app for Windows or Linux but working in Windows)

Windows:

electronize build /target win
Ok, I go to
D:\MyProjects23\Blazor\CAMS.Client.Deskop\bin\Desktop\win-unpacked
run CAMS.Client.exe
It started and works - OK!

Build for linux but working in the samw W10

electronize build /target linux
Ok, I go to
D:\MyProjects23\Blazor\CAMS.Client.Deskop\bin\Desktop
Copy it to Ubuntu folder
I go to Ubuntu machine.
Go to this folder
Home\sharedfolder\Desktop\linux-unpacked\resources\bin
run CAMS.Client (exectuable)
It started - but as console app only without GUI

I can send you my project zip.

Okay, the same directory on the machine for different platforms still has difficulties. I'll add support for that.
Please try the following steps:
1, Copy your project to a new directory
2, At the new directory, delete the obj directory
3, Now try electronize start from Linux from the new directory
Does this work?

What is interesting: again appeared disconnect etc... during the building.
Please see in attached file
eNET.txt

electron-builder wants to download the native Electron for bundling.. probably won't get access

For Mac build you need an Mac device

electron-builder wants to download the native Electron for bundling.. probably won't get access

Btw, yesterday I did not see this kind of messages.

For Mac build you need an Mac device
I.e. I can build for Win and Linux using Windows , but for MacOS - I should use MacOS. Correct?

Yes, MacOS... But according to the Apple license, the MacOS must also run on a Mac and only then can you create builds for it... It's a legal matter... Technically, everything would also work with a VM and MacOS ;)

Hi Gregor,
Its me again ;-)
I have made as you recommended above:

My working machine is W10
I have deleted /obj and /bin folders
I have build my Blazor app for windows :

electronize build /target win
run it - OK.

electronize build /target linux (it is in W10)
copied Desktop folder to Ubuntu
gave permissions
run executable from terminal - it starts as a console app
run executable from folder  - it does not start.
No any GUI in Linux (in W10 - It is)

Btw. I am still hoping to build Desktop app for linux working in Windows (as it was available some years ago in Electron.NET)

Desktop app for linux working in Windows

with WSL2?

I work in W10.
I develop a Blazor app. Finally I'd like to build it as a Desktop application - exe for windows and provide to users.
Ok, I do on my machine:

electronize build /target win

Copy the output folder and give it , user run exe on their Windows machine - OK. Desktop GUI works fine
Also, I have Linux users , I build the Desktop for linux on my machine

electronize build /target linux
Copy the output folder and give it , user run executable on their Ubuntu
machine - and see consoole output only
That is my question: I'd like to run Desktop app in Ubuntu and see the Desktop GUI but not console only as I have now:

and

electronize build /target win
what is in Windows

I have now tested it locally with Windows 11 - WSL2 + WSLg and Ubuntu 22.04.2 and the Electron.NET demo app opens.
But please try to install Node and .NET SDK on ubuntu and build from Linux. I couldn't build on Windows for Linux. I got an error.

Ah, I see. Some years ago it was possible: to build for win and linux on W10 and it worked.
I will try.
But do you have a plan to do it possible again: to build for linux on win?

Good question, I just noticed today that it probably doesn't work anymore?! Whereby WSL2 is a good compromise, which can also be tested straight away.

Great, I and many other wait it.  ;-)

we can't change anything about that, it comes from electron-builder. If so then you would need to contact the owner of it.

Hi Gregor,
I work in W10, I can build (electronize) an app for windows - OK.
Also, in the same W10 I can build (electronize) the same app for Linux using WSL2 and then copy/provide it for Linux users.
Is this correct?

Hi Gregor,
Is it in your plans^ to fix it?

Hi everybody, is any progress for this issue?


Ability to set reporter configuration options from Maven Surefire has been broken

TestNG Version
7.1.0
Expected behavior
Properties specified in the Surefire reporter configuration should be injected into the reporter object when it's instantiated.
Actual behavior
Specified properties trigger warnings about the inability to set their values.
Is the issue reproductible on runner?

[ ] Shell
[X] Maven
[ ] Gradle
[ ] Ant
[ ] Eclipse
[ ] IntelliJ
[ ] NetBeans

Test case sample
Create a Maven project that specifies the following Surefire configuration:
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactld>maven-surefire-plugin</artifactld>
  <version>2.20.1</version>
  <configuration>
    <testSourceDirectory>${project.build.directory}/surefire-reports</testSourceDirectory>
    <testFailureIgnore>true</testFailureIgnore>
    <suiteXmlFiles>
      <suiteXmlFile>TestNgXmlFiles/${suiteFile}</suiteXmlFile>
    </suiteXmlFiles>
    <properties>
      <property>
        <name>usedefaultlisteners</name>
        <value>false</value>
      </property>
      <property>
        <name>reporter</name>
        <value>org.testng.reporters.XMLReporter:generateTestResultAttributes=true,generateGroupsAttribute=true</value>
      </property>
    </properties>
  </configuration>
</plugin>

The specified properties [generateTestResultAttributes] and [generateGroupsAttribute] should be injected into the configuration of the XMLReporter, but these simply result in warning messages.
The problem appears to originate in the factoring out of the properties into a configuration object. The newReporterInstance() method expects that the reporter object will maintain the properties directly, using Java Bean conventions. This method was not updated to support population of a separate configuration object.

Hmmm... This may actually be a case where updated documentation is the right fix.
<property>
  <name>reporter</name>
  <value>org.testing.reporters.XMLReporter:config.generateTestResultAttributes=true,config.generateGroupsAttribute=true</value>
</property>

I think this might actually work as expected. Checking into this.

@sbabcoc - Its already documented in
https://testng.org/doc/documentation-main.html#logging-xml-reports
Quoting it for your reference.

TestNG offers an XML reporter capturing TestNG specific information that is not available in JUnit reports. This is particularly useful when the user's test environment needs to consume XML results with TestNG-specific data that the JUnit format can't provide. This reporter can be injected into TestNG via the command line with -reporter.

Here's a sample usage: -reporter org.testng.reporters.XMLReporter:generateTestResultAttributes=true,generateGroupsAttribute=true.

@sbabcoc - Is this what you were looking for? If yes, then please close off this issue and the PR associated with it as well.

No, the nested bean cannot be configured as currently implemented. I get this type of warning:
[PropertyUtils] [WARN] Cannot set property config.generateTestResultAttributes with value true. Property class could not be found

The implementation doesn't currently handle nested beans, which is how the configuration of XMLReporter is structured. I'm studying the Java Beans documentation to see if there's a way to support this structure through the standard Java Beans API without major revisions.


整合mybatis3.5.0报错

当前使用版本
mybatis-plus:3.3.2
mybatis: 3.5.0
该问题是如何引起的？
启动项目时报错
重现步骤
配置好启动就报错
报错信息
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder.getLanguageDriver(MybatisMapperAnnotationBuilder.java:371)
The following method did not exist:
com.baomidou.mybatisplus.core.MybatisConfiguration.getLanguageDriver(Ljava/lang/Class;)Lorg/apache/ibatis/scripting/LanguageDriver;
The method's class, com.baomidou.mybatisplus.core.MybatisConfiguration, is available from the following locations:
jar:file:/D:/Program%20Files/maven-3.6.3/repository/com/baomidou/mybatis-plus-core/3.3.2/mybatis-plus-core-3.3.2.jar!/com/baomidou/mybatisplus/core/MybatisConfiguration.class
The class hierarchy was loaded from the following locations:
com.baomidou.mybatisplus.core.MybatisConfiguration: file:/D:/Program%20Files/maven-3.6.3/repository/com/baomidou/mybatis-plus-core/3.3.2/mybatis-plus-core-3.3.2.jar
org.apache.ibatis.session.Configuration: file:/D:/Program%20Files/maven-3.6.3/repository/org/mybatis/mybatis/3.5.0/mybatis-3.5.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.baomidou.mybatisplus.core.MybatisConfiguration
Disconnected from the target VM, address: '<IP_ADDRESS>:6981', transport: 'socket'
Process finished with exit code 1

不要自己定义mybatis相关版本，jar版本冲突


Support skos:example

Requirement by IBI for "Klassifikation für interdisziplinäre Forschungsfelder", sent by V.P. via email (to @acka47 & @sroertgen) today (2021-01-28).

How do we want handle skos:example? I think SKOS allows multiple examples per language (which I guess makes sense). Though for other documentation properties, e.g. skos:scopeNote or skos:definition, we right now only support one value per language (where SKOS would also allow more than one).

How do we want handle skos:example? I think SKOS allows multiple examples per language (which I guess makes sense). Though for other documentation properties, e.g. skos:scopeNote or skos:definition, we right now only support one value per language (where SKOS would also allow more than one).

Good question. You mean whether we should use an array here, right? As skos::example is a subproperty of skos:note we should treat it the same. The use case comes from https://github.com/KDSF-FFK/KDSF-FFK/blob/main/FFK.ttl where several examples are listed in one string and not separate ones. This is in line with our current approach to skos:note.

Good question. You mean whether we should use an array here, right? As skos::example is a subproperty of skos:note we should treat it the same. The use case comes from https://github.com/KDSF-FFK/KDSF-FFK/blob/main/FFK.ttl where several examples are listed in one string and not separate ones. This is in line with our current approach to skos:note.

[...] You mean whether we should use an array here, right?

Yes.

As skos::example is a subproperty of skos:note we should treat it the same. [...] This is in line with our current approach to skos:note.

I think we currently only allow one language per value:
https://github.com/skohub-io/skohub-vocabs/blob/4bd7051d3cdb34d422a74d801ac45d264f8cfe6b/src/context.js#L45-L53
The only exception is skos:altLabel:
https://github.com/skohub-io/skohub-vocabs/blob/4bd7051d3cdb34d422a74d801ac45d264f8cfe6b/src/context.js#L42-L44
I just made a quick  test with two skos:definition of same language and it did not work, no definition at all showed up though it did build successfully.

[...] You mean whether we should use an array here, right?

Yes.

As skos::example is a subproperty of skos:note we should treat it the same. [...] This is in line with our current approach to skos:note.

I think we currently only allow one language per value:
https://github.com/skohub-io/skohub-vocabs/blob/4bd7051d3cdb34d422a74d801ac45d264f8cfe6b/src/context.js#L45-L53
The only exception is skos:altLabel:
https://github.com/skohub-io/skohub-vocabs/blob/4bd7051d3cdb34d422a74d801ac45d264f8cfe6b/src/context.js#L42-L44
I just made a quick  test with two skos:definition of same language and it did not work, no definition at all showed up though it did build successfully.

Ah sorry. I got it wrong. Yes, one long string per language is totally fine. And it is in line with the current approach.

Ah sorry. I got it wrong. Yes, one long string per language is totally fine. And it is in line with the current approach.

PR is merged, but this issue is not closed automatically, while I think it could be closed.
As it is unassigned, I hereby assign it to @acka47  who inititated the issue.


Update job application review page

Add things to the job application review page

Sign in as the fake jobseeker and go to /jobseekers/job_applications/6683c564-15e6-41af-ab44-7adf125f4c84/review if you're into that sort of thing

Review app deployed to https://teaching-vacancies-review-pr-2979.london.cloudapps.digital


The Future of Spectre

Spectre is still in Beta stage, and it's going to be like that for a while. With the 1.0.0 release which will likely be around a month or so from now, the following problems are on my roadmap.
Planned Features

General bugfixes / issues
Moderation module
Music module (still thinking about this, leaning towards no but it's possible)
Websearch module
Leveling - Paginate several commands, allow users to choose which background they use
More log functionality (ignore specific logs, people, channels)
Blacklist for guilds
Reminders
Possibly a website and in the distant future a dashboard
Better support for selfhosting (PM2, instructions, etc.)

spectre no longer has a future 😔

spectre no longer has a future 😔


Mobile support?

pls add mobile support the current ui library is only for desktop and i cant click anything on the loader

Currently working on a fix for this.


0.5.1 is a breaking upgrade from 0.5.0, please increment major or minor number instead of patch

0.5.1 introduced calls to the StatusBar API here and here which was introduced into RN with 0.20.0, effectively raising the minimum version required to run this module from 0.11.0 to 0.20.0.
This is a breaking change, and will break anyone using this module who is running RN < 0.20.0 and used the default npm install --save react-native-lightbox, as npm will install 0.5.1 automatically on the next install (e.g. on a CI machine) with the ^0.5.0 semvar check.
Please either increment your major number or minor number (following RN versioning schemes) instead of the patch number when you introduce breaking changes. Alternatively, you could wrap those StatusBar calls in RN version checks to make sure you have access to the API.

Fair point and I'll keep it in mind, but you should never rely on package.json for production dependencies; always use npm shrinkwrap which should solve your problem.

hah, using npm shrinkwrap is also a very fair point. :)


Investigate and upgrade Node from 16.14.2 to latest

We're currently locking Node version to 16.14.2, IIRC due to errors we encountered running npm i in GHA. Maybe it's time to revisit to see if the issues can be resolved with some affected package upgrades

We're pretty behind node versions (latest LTS is v20, and we're still on v16)
Newer versions of dependencies we use now require at least Node v18 (such as Next.js), so we should see if we can upgrade to the latest version now
https://nextjs.org/docs/getting-started/installation

Actually unsure how much effort this will be yet. Might need a tech spike first to investigate how gnarly it is to upgrade to the latest node version.

Timeboxing to 2 days


fix(Timers): show 2 minutes variation

Description

Screencast

Checklist

[ x ] I read the extension guidelines
[ x ] I read the documentation about publishing
[ x ] I ran npm run build and tested this distribution build in Raycast
[ x ] I checked that files in the assets folder are used by the extension itself
[ x ] I checked that assets used by the README are placed outside of the metadata folder

I did not see a reason to update the changelog in this case if it's okay

Good catch. I'm not sure whether @pernielsentikaer wants a changelog update or not - we'll wait on his response after the team break to see what the policy is for this. If you wish, feel free to PR to ThatNerdSquared/timers-for-raycast as well.
And thank you for using Timers :wink:


Schema detects tables without explicit order

The pgsql\Schema.findTables, pgsql\Schema.findConstraints and possibly Schema for other databases does not fetch table names with explicit order. Since the default order may change randomly, gii would produce different results for relations where numbers are appended to the name.

how is this a problem? you would not keep the name like that anyway, would you?

I hurried a bit with creating the issue, I'm going to verify it more thoroughly and reopen if necessary.

You got a point that relation methods should be corrected manually, but I still think it is an issue and table names should be returned sorted and consistent.

I found a bug in findConstraints where composite fkeys would be randomly assigned to table columns. This should be probably fixed for other schemas, not only PostgreSQL.

Found another one in mssql schema, composite fks are not supported at all. Should I try to fix it? I could only run it on sqlfiddle.


Make Binomial Distribution a %

Clean up the binomial distribution to be cleaner

Made it a percentage and fixed it for higher percentages.


Error in PostgreSQL connection: Error { kind: Io, cause: Some(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }) }

Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions

Name
Version

Node
v15.8.0

OS
linux-musl

Prisma Client
2.16.0

Query Engine
query-engine 854c8ba7f0dce66f115af36af24e66989a8c02a1

Database
undefined

Query
mutation {
  updateOneRecord(
    where: {
      id: 5
    }
    data: {
      recordId: "X"
    }
  ) {
    id
  }
}

Logs
prisma-client Prisma Client call:
engine stdout  Error in PostgreSQL connection: Error { kind: Closed, cause: None }
engine {
  error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: connection closed
      at NodeEngine.graphQLToJSError (/usr/src/app/node_modules/@prisma/client/runtime/index.js:27077:14)
      at NodeEngine.request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:26973:24)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:94:5)
      at PrismaClientFetcher.request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:78434:24)
      at Object.updateRecordId (/usr/src/app/data/src/repositories/record-repository.ts:321:3)
{
    clientVersion: '2.16.0'
  }
}
engine stdout  Error in PostgreSQL connection: Error { kind: Io, cause: Some(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }) }
engine {
  error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: connection closed
      at NodeEngine.graphQLToJSError (/usr/src/app/node_modules/@prisma/client/runtime/index.js:27077:14)
      at NodeEngine.request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:26973:24)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:94:5)
      at PrismaClientFetcher.request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:78434:24)
      at Object.updateRecordId (/usr/src/app/data/src/repositories/record-repository.ts:321:3)
{
    clientVersion: '2.16.0'
  }
}
engine {
  error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: connection closed
      at NodeEngine.graphQLToJSError (/usr/src/app/node_modules/@prisma/client/runtime/index.js:27077:14)
      at NodeEngine.request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:26973:24)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:94:5)
      at PrismaClientFetcher.request (/usr/src/app/node_modules/@prisma/client/runtime/index.js:78434:24)
      at Object.updateRecordId (/usr/src/app/data/src/repositories/record-repository.ts:321:3)
{
    clientVersion: '2.16.0'
  }
}

Client Snippet
export async function updateRecordId(
  id: Record["id"],
  recordId: string
): Promise<void> {
  await database.record.update({
    where: {
      id
    },
    data: {
      recordId
    }
  });
}

Schema
model Record {
  id               Int                      @id @default(autoincrement())
  createdAt        DateTime                 @default(now())
  recordId         String?
}

@pantharshit00 Postgre hosted on GCP SQL.
Issue is not yet appearing in last version. I'll give it more load tomorrow.

I am going to close this as you mentioned it is not reproducible in latest version. If this happens again, comment here and we can reopen.

Root bug is the same as https://github.com/prisma/prisma/issues/5976


Make journald emit map[string]interface{}

Description of Changes
It turns out our entry.Field doesn't handle iterating through map[string]string well. We ran into this because the journald plugin emits map[string]string. This PR changes the journald input to be more in line with the other plugins so that it emits a map[string]interface{}.
This seems to be part of a larger recurring issue with the types that are allowed in our pipeline. We should really consider locking down the types that are allowed into the record in the first place. It's impossible to handle every type, and if we don't have any standards, it's unclear what is and is not expected to be handled by each of the downstream plugins.
Please check that the PR fulfills these requirements

[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[x] Add a changelog entry (for non-trivial bug fixes / features)
[ ] CI passes

Log Files
Logs / Second
CPU Average (%)
Memory Average (MB)

1
1000
2.1207256
28.61382

1
5000
6.27594
34.85493

1
10000
10.776404
42.68669

1
50000
36.552372
133.93103

1
100000
63.795467
201.99489

10
100
3.6897166
28.608162

10
500
7.207053
33.779903

10
1000
11.03465
42.059807

10
5000
41.81191
94.1576

10
10000
71.46687
210.27061

Log Files
Logs / Second
CPU Average (%)
Memory Average (MB)

1
1000
2.1034644
25.33998

1
5000
7.1036634
34.573143

1
10000
10.983023
43.484375

1
50000
35.77656
124.873245

1
100000
63.863823
214.53786

10
100
3.672562
24.30738

10
500
7.689802
34.19437

10
1000
12.396833
44.464844

10
5000
41.777546
104.44693

10
10000
72.60613
197.57503

Log Files
Logs / Second
CPU Average (%)
Memory Average (MB)

1
1000
3.6379902
28.063173

1
5000
6.4311776
36.749462

1
10000
9.431189
43.473732

1
50000
35.484413
118.47549

1
100000
62.56923
192.38362

10
100
4.1379976
28.379715

10
500
6.9311438
32.389008

10
1000
11.086395
45.661232

10
5000
43.345715
86.875946

10
10000
79.983376
199.24582


Glowing is possible messing with real teams. (Of course it does...)

Should be fixed now. Keyword SHOULD


Add --color to Gulp tasks?

I'm not sure if this would cause any problems, but I was wondering if you'd consider adding the --color flag to the Gulp tasks called from the npm scripts?
E.g. instead of this:
"build.dev.watch": "gulp build.dev.watch",
It would be:
"build.dev.watch": "gulp build.dev.watch --color",
This way, you always see the color-formatted output. In my experience, without this, you don't see colors in the console output when running the command from within something like IntelliJ IDEA.
Obviously, this is minor. But if you don't think it would cause problems, it might be nice to include?

There will be no collisions with existing flags. Do you want to open a PR with that change?

Sure, I'll try to do that today.

@brian428 I added a wiki page here. Feel free to modify it if it doesn't sound good to you.


feat: FW-19 Implement auth token parse middleware

Description
Adds a middleware that reads the bearer token and adds it to the request context. We will use this middleware for all endpoints we are going to implement, as they will require a bearer token for authenticating with the Spotify API.

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


rename service file to match service purpose

Service name should indicate it's intent as a lifecycle manager for containerized microshift and to match the naming convention in the directory (script -> script.service).

/lgtm

I had the same thought when I tried it.


TraceId is missed in the log

I say most of the endpoints in this project use CompletableFuture.supplyAsync when override the method
CompletableFuture<ResponseInfo<O>>  execute(RequestInfo<I> request, Executor longRunningTaskExecutor,  ChannelHandlerContext ctx);
of StandardEndpoint<I, O>.
I test it locally and find the traceId is missed in the log . I use
AsyncNettyHelper.supplierWithTracingAndMdc( 					() -> doExecute(request, longRunningTaskExecutor, ctx) 					, ctx)
then the traceId is printed normally.
Do you have the same problem?

Hi @vicbell,
Yes, I see the same thing, traceId isn't showing up in our logs.  I'm guessing the traceId is related to the tracing features of Riposte which we haven't used and I'm not familiar with.
Also, it looks like we are not on the latest version of Riposte, so I'm not sure if this is a known bug with the version we're on.  @nicmunroe may be able to shed light.
Can you say more about the context of this problem?  Was this in relation to your usage of Cerberus?  Or were you just encountering the same thing on another Riposte project?
Thanks.

@tlisonbee, the problem is that the automatic trace ID showing up in the logs depends on the tracing context following you when you hop threads (it's ThreadLocal-based because SLF4J MDC is ThreadLocal-based). Doing a CompletableFuture.*Async(...) causes the lambda to be executed on a different thread, so without doing anything extra the tracing context is lost and trace IDs won't show up in the logs for any logging done during the lambda.
@vicbell is on the right track - rather than passing a basic lambda to the CompletableFuture, pass in a AsyncNettyHelper.supplierWithTracingAndMdc(() -> /* original lambda code */) instead. The AsyncNettyHelper.*withTracingAndMdc(...) are factory methods for creating lambdas where the tracing context will be propagated for you automatically when the lambda is executed.
So it should be a pretty straightforward refactor to find any place you're hopping threads (like CompletableFuture.*Async(...) calls) and wrap the logic in a AsyncNettyHelper.*withTracingAndMdc(...). Let me know if there's any more questions on this.

@tlisonbee I am using Riposte, I want to find a best practice of how to use Reposte and i found Cerberus. TraceId is very usefull for tracing problems, i think it should not missing in logs.
@nicmunroe If i use CompletableFuture.supplyAsync for every endpoint (Just like Cerberus is doing so) in my project, Netty is using three kind of thread for every request boss thread-> worker thread -> business thead, will this be a performance problem（Because of the frequent thread context switching）?

@vicbell you are correct that it is best to avoid unnecessary thread context switching. The boss threads and worker threads are just how Netty works - there's no need to worry about them. You do have control over when and where you hop threads when executing an endpoint however, and that's where things get tricky.
For maximum performance/throughput: if your endpoint's execution is "quick enough" then you should not do an async execution - you should just do your logic synchronously on the Netty worker thread you're on when the endpoint execution starts and return a CompletableFuture.completedFuture(...) at the end. If your endpoint has to wait for anything out-of-process (e.g. calling another microservice over HTTP, or calling a database), or if it will take "too long" then you should do the waiting or work asynchronously off the Netty worker thread.
The problem is that there's no one-size-fits-all rule for what "quick enough" and "too long" mean. It depends on many factors and requires experimentation on your part to learn when synchronous execution is appropriate. I generally find that if an endpoint will always return in under 1-2 milliseconds assuming you have available CPU and there's nothing happening during your endpoint that requires waiting on some out-of-process thing to return (like HTTP or database calls) then synchronous execution might be best for maximum throughput (although you should run some load tests against your endpoints to confirm synchronous execution is better - don't just assume it). Simple payload processing and using in-memory caches to build responses are likely candidates.
And when you do have out-of-process things to wait on like HTTP or database calls, you can see if there's an async nonblocking driver that returns a CompletableFuture or equivalent future, and chain your endpoint logic on those to avoid extra thread context switching (again, only if your chaining endpoint logic is "quick enough").
So squeezing maximum performance can be tricky and difficult, and can take lots of experimentation and experience before you instinctively do the right thing the first time. Because it can be so tricky and easy to do the wrong thing, it's not a bad idea to just always farm out to a CompletableFuture.*Async(...) method and use the given longRunningTaskExecutor as the CompletableFuture's executor. You may not get the best throughput that way, but it's safe and you should still get good throughput.

Fixed in version 0.18.3


Cannot read property 'Catalog' of undefined

Describe the bug
Does not get games any more, cron job is started, but issue reading the catalog
Screenshots or Logs
><EMAIL_ADDRESS>entrypoint-config /usr/app
> node dist/src/entrypoint-config.js

Setting timezone: Europe/Oslo
Run on startup: true
[2021-10-22 11:28:41.953 +0200] INFO (42 on 61a63620dc84): Checking free games for REDACTED
[2021-10-22 11:28:48.228 +0200] INFO (42 on 61a63620dc84): Successfully refreshed login
user: "REDACTED"
[2021-10-22 11:28:48.532 +0200] ERROR (42 on 61a63620dc84): Cannot read property 'Catalog' of undefined
TypeError: Cannot read property 'Catalog' of undefined
at Object.transform (/usr/app/src/free-games.ts:75:39)
at paginateEach (/usr/app/node_modules/got/dist/source/create.js:180:45)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at AsyncGeneratorFunction.got.paginate.all (/usr/app/node_modules/got/dist/source/create.js:213:26)
at FreeGames.getCatalogFreeGames (/usr/app/src/free-games.ts:62:19)
at FreeGames.getAllFreeGames (/usr/app/src/free-games.ts:243:24)
at redeemAccount (/usr/app/src/index.ts:24:20)
at async Promise.all (index 0)
at main (/usr/app/src/index.ts:58:5)
Run once: false
Setting cron schedule as 8 17 * * *

I don't have this issue any more


[Feat]: Add Bug report and Feature request templates

Closes: #2609.

Thanks @SoyDiego for approving 👍! Is there anything else I have to do before we can merge this?


encoding/json: Wrong []uint8 marshal

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?
go1.7

What operating system and processor architecture are you using (go env)?
darwin/amd64

What did you do?
play.golang.org

What did you expect to see?
[]uint8{42, 42} or at least "**"

What did you see instead?
[34 75 105 111 61 34] and "Kio="

Hello there @mr4x.
This isn't a bug, perhaps it is an misinterpretation of type equality and expectations.
TL;DR string([]byte{42, 42}) and []byte{42, 42} are not of the same type.
When a string value is marshaled or unmarshaled, its representation stays the same, this doesn't apply for other types always
Analysis
Your code sample at https://play.golang.org/p/gQ7NbCR7dQ, and inlined below:
package main

import (
	"encoding/json"
	"fmt"
)

func main() {
	b, err := json.Marshal([]byte{42, 42})
	if err != nil {
		fmt.Println("error:", err)
	}
	fmt.Println(b, string(b))
}

which when run gives
[34 75 105 111 61 34] "Kio="

[]byte(42, 42) != string([]byte(42, 42))
where string([]byte(42, 42)) == "**".

string([]byte{42, 42}) contains a read-only copy of the contents of []byte{42, 42} so content wise those two are the same. However, their types are different -- the JSON marshaler interpretes them differently too.
When the string value is marshaled, it still gives "**" which is what you were expecting, since the marshaled value of a string is itself and so is a directly converted string value, with no transformations. But that only applies when we are dealing with strings and not byte slices.
Therefore: if you then unmarshaled the originally encoded bytes as a []byte and printed out the value, you'd get back []byte{42, 42} and then if printed as a string gives "**". However, if you unmarshaled the originally encoded bytes to a string, you'd get the direct string conversion which is "Kio=".
Please see https://play.golang.org/p/cdXWIPD5ix or inlined below:
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
)

func main() {
	origB := []byte{42, 42}
	marshaledB, err := json.Marshal(origB)
	if err != nil {
		fmt.Println("error:", err)
	}
	fmt.Println(marshaledB, string(marshaledB))

	var liveB []byte
	var s string
	if err := json.Unmarshal(marshaledB, &liveB); err != nil {
		fmt.Printf("err: %v\n", err)
	}
	_ = json.Unmarshal(marshaledB, &s)
	if !bytes.Equal(liveB, origB) {
		fmt.Printf("failed to get back original value liveB: %v(%s) origB: %v(%s)\n", liveB, origB)
	}
	fmt.Printf("liveB:: raw: %v string: %s stringFromOriginallyEncodedBytes: %s\n", liveB, liveB, s)
}

Giving
[34 75 105 111 61 34] "Kio="
liveB:: raw: [42 42] string: ** stringFromOriginallyEncodedBytes: Kio=

@odeke-em thanks for the explanation


Refactor terrains rendering to not rely on hard-coded names.

Right now, imported games from non-English variants of Civ will not render the map correctly as the names are hard-coded to English.
Puppeteer and I have discussed this on the forum and have agreed that a key is a decent way to implement this, where the key may be the English name.  This still allows for a more user-friendly approach to editing scenario files than the integer approach that Civ uses.

For testing this, you can download RARR-Deutsch.zip from the bottom of the first post at https://www.civforum.de/showthread.php?108206-RARR-Deutsch; it isn't necessary to download the whole mod.  Then open it in the Firaxis editor and generate a random map and save it.  Now you can open it in C7, and see that there are no terrains or forests, and units are all over the map including barbarian camps on water, just like in the old days of Aztec.  If you right click on tiles, you'll see the German names are printed out to the console.
I know Civinator also had German versions of the Firaxis scenarios on civforum.de, which is what I'd planned to test with due to their being simpler mods in terms of add-ons to the game, but I've forgotten their link...


Player is invisible after death but can still move and get shoot at.

Read last commit message:

He is still invisible but can't move nor shoot.
This is due to his reference being alive in other places, just creating new player (restart whatever) will solve this.


Fix leshan demo client incorrect initialization of object 3442,

resources 120, 1120 #1352
updated public class LwM2mTestObject,
public static final Long INITIAL_INTEGER_VALUE = 1024l;

I've signed the ECA, not sure why the workflow still shows it...


Override configuration problem

The problem with FzfxLiveGrep <pattern> -- -g <file>.
Without any configuration in my configs, after lua require('fzfx').setup() in nvim all work properly.
If I try override some default settings (change vertical layout to horizontal) in my init files:
if utils.isModuleAvailable("fzfx") then
  local fzfx = require("fzfx")
  local GroupConfig = require("fzfx.schema").GroupConfig
  fzfx.setup({
    live_grep = GroupConfig:make({
        fzf_opts = {
            { "--prompt",         "Live Grep > " },
            { "--delimiter",      ":" },
            { "--preview-window", "top,75%,+{2}-/2" },
        },
    }),
  })
end

the live grep works without -- -g ..., but does not find anything when I add glob argument.
As I see in fzfx code, this config, seems, should just override some default settings.

@linrongbin16
I taken it as is, but with same result.
Without overrides works properly. In log I see that rg command with -g options is made correct.

Hi @damanis , thanks for your report, it looks like the root cause is the GroupConfig:make API, it affect the vim.tbl_deep_merge behavior, so the merged configs lost some data.

It looks the only way to fix this issue at once is: copy and paste the whole group config of live_grep, which is of course stupid...

#239 : drop 'ProviderConfig' class.

Hi @damanis , please add --disabled option to your config, then it will work.
See: https://github.com/linrongbin16/fzfx.nvim/pull/240/files#diff-390cfb09cd549ee50ecc1d31c004e6ec5b5000c3924f24ccc2d68d4c9c121bfd

@linrongbin16
It works! Thank you.

@linrongbin16
I added live grep in current buffer support.
May be you will find it useful (patch is not optimal, just copy/paste).
buffer_live_grep.zip

this is awesome, I think I can create a wiki page for advanced configuration, and add your case to it.

just double confirm: this patch is about to do live grep only on current buffer, correct?
Yes. It just limit live grep by current buffer.


Can't override default syntax highlighting.

Description of the problem or steps to reproduce.
I've been using custom highlighting for UNIX shell scripts since the beginning (the default one is not very accurate). Overriding the default worked fine on previous versions, but since I started using the nightly builds (to overcome issue https://github.com/zyedidia/micro/issues/1554).
But since I'm using those builds my custom highlighting file doesn't get loaded; the default one is used. To be able to use it, I have to name the highlighting different and load it manually with set filetype foo.
I don't know why this stopped working.
Specifications.
Commit hash: 943ea15.
OS: Linux.
Terminal: xterm.

I've reordered the way syntax files are read in a way that I hope solves this. Could you check at some point and write back here? Thanks!

Thanks for addressing this issue, @zyedidia. And, of course I can check this. I'm going to download a new binary and give feedback to you in a couple minutes. :blush:

I tested it. No more issues in the nightly build!


Not install-able through npmjs

Hello
Thanks for this, unfortunately it's not install-able using npm. Can you submit it to npmjs?
Regards

Added to NPM.
https://www.npmjs.com/package/css-checkbox-library


Make it possible to collapse refactoring changes in the diff window

[x] See DiffWindow and DiffRequestGenerator classes to understand how the plugin generates diffs for refactoring changes;
[ ] Differentiate refactoring and non-refactoring changes in files (check ranges);
[x] Close existing TODOs in refactoring-folding branch;
[x] Add information about the moved method to destination class as well;
[x] Check if a moved method was changed and add "moved with changes / with no changes" text to the description.

First, we should try to do it for one simple refactoring, for example, Move Method refactoring. Then, we will do it for complex refactorings that involve several files (like Extract Interface).

Done:
Folding Move/Pull Up/Push Down Method/Class refactorings in main diff
Add hint in main diff where Move/Pull Up/Push Down Method/Class/Field refactorings detected

Implemented in #81


Issue generating manifests

I am unable to run make generate.
Using the latest main, my environment seems to be stuck on generating code.
kehannon@kehannon-thinkpadp1gen4i:~/Work/jobset$ pwd
/home/kehannon/Work/jobset
kehannon@kehannon-thinkpadp1gen4i:~/Work/jobset$ make generate
test -s /home/kehannon/Work/jobset/bin/controller-gen && /home/kehannon/Work/jobset/bin/controller-gen --version | grep -q v0.14.0 || \
GOBIN=/home/kehannon/Work/jobset/bin go install<EMAIL_ADDRESS>cp -f<EMAIL_ADDRESS>/home/kehannon/Work/jobset/bin/
cp -f<EMAIL_ADDRESS>/home/kehannon/Work/jobset/bin/
cp -f<EMAIL_ADDRESS>/home/kehannon/Work/jobset/bin/
/home/kehannon/Work/jobset/bin/openapi-gen --go-header-file hack/boilerplate.go.txt -i sigs.k8s.io/jobset/api/jobset/v1alpha2 -p sigs.k8s.io/jobset/api/jobset/v1alpha2 --alsologtostderr
2024/04/12 15:11:11 OpenAPI code generation error: Failed making a parser: unable to add directory "sigs.k8s.io/jobset/api/jobset/v1alpha2": No files for pkg "sigs.k8s.io/jobset/api/jobset/v1alpha2"
make: *** [Makefile:243: openapi-gen] Error 1

Does anyone else have this problem?
I realize that I am not following best practices about making sure your code is in $GOPATH but that hasn't been an issue before.

I do not have any issues in Kueue with running make generate. Kueue doesn't use openapi-gen though.

Well, if I change v1alpha2 to v1alpha1, I can get everything to generate...

@ahg-g and @danielvegamyhre
I am at a loss on what is going on.
If I change v1alpha2 to v1alpha (rename the api folder), code generation works.
I could also bump this to v1beta1 and I can get the generation to work.
If I leave it as v1alpha2, it fails.
Maybe one of you can try on a fresh repo (make generate manifests) is all I am doing.
I noticed that I wasn't generating the CRDs anymore in a previous PR but nothing seemed work. Once I tried running this, it started failing.

https://github.com/kubernetes-sigs/jobset/pull/509 is my changings.
We probably don't want this as downgrading an API looks sus.

I could create a PR to bump our APIs to v1beta1 and that allows me to build again..

That's weird, I can't reproduce this issue so far

can you try this https://github.com/kubernetes-sigs/lws/issues/44#issuecomment-1985207696

Yea I just don't understand why if I change v1alpha2 -> v1alpha1 or v1alpha2->v1beta1 it works without issue.
My gopath is set (I use gobrew so it points to 1.22.2 version).
kehannon@kehannon-thinkpadp1gen4i:~/Work/jobset$ echo $GOPATH
/home/kehannon/.gobrew/current/go/bin

I did a quick test and I keep the same gopath and I am able to run make generate manifests for both kueue and lws without any issue.
For jobset, it seems to be around the v1alpha2. But we didn't change that so I'm wondering if something happened with codegenerator.

LWS, Kueue and JobSet all have a symbolic link to mock the GOPATH work. I have used this since I've developed for Kueue.
https://github.com/kubernetes-sigs/kueue/blob/main/hack/update-codegen.sh#L29
I have Kueue, LWS and JobSet (in $HOME/Work/REPO_NAME). Both Kueue and LWS work without issues on generation.
I also confirmed that the symbolic link is working for jobSet (if I uncomment the trap).

Not really sure what went wrong. I decided to give up on my golang environment (deleted cache, go environment) and redownloaded everything.
Once I did that I was back in action..

Ah that's annoying, glad you managed to sort it out though. So can we close this issue now?

/close


Query: How to handle database secure connection with Aeraki

Aeraki project is amazing, one impressing scenario is that "Manage authentication for other system, like databases". I would like to know how Aeraki handle database secure connection, like mySQL SSL connection, especially when the database certificate is issued by third party. Is there any example or guide?

Aeraki aims to support layer-7 processing, such as the auth settingof Redis proxy.. Your use case is actually SSL, which can be implemented directly with the native Istio egress gateway.


tweak line wrappings in /labels-annotations-taints/_index.md

Wrap long lines in this file:
content/en/docs/reference/labels-annotations-taints/_index.md

See preview please.

whoops, I was working on the same page today. #41540

well, seems this can be closed. PR #41540 covered much more changes there.


pipelineX Fix use-after-free in shuffling

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


React Native Google Places API restriction issue

I get the following error while using "React Native Google Places autocomplete".
"This IP, site or mobile application is not authorized to use this API key...".
I'm using a Google Places API Web Service key, which restrictions on Android-App. This one is restricted with the package name "com.xxx.xxx.debug" and "com.xxx.xxx.test". Another API key is restricted to "com.xxx.xxx". I've added the proper SHA-1 key.Anyone has a clue what I'am doing wrong or why it doesn't work?
I've checked the docs of Google and tried out many different things, still I cannot get it to work with a restriction.
Question also asked on SO

I think it was fixed by #170. It's available on version 1.3.0


Distinguish Shape and Bounds in Locatable

Bounds for quick intersection (visibility in viewport), Shape for click and interaction.

After multiple discussions, The following points became clear:
Location (a Point<?>) is a property of the simulation object. Only the simulation object knows where it is, how it is moving, and possibly what its direction vector is.
Bounds are in essence a property of the animation object. Only it knows how it is being drawn, and what the extent of is drawing is. Unfortunately, when bounds would be linked to the animation, they are not a property in world coordinates but in pixel coordinates. They would also lack a z-extension (a height) in a 2d-animation, which would result in not being able to draw objects that overlap with a 'height slice', e.g., the first floor of a building. Therefore, the Bounds remain linked to the simulation object.
Anything that has to do with clicking on an object or interacting with an object using the medium on which the object is presented, takes place in the 'rendered' world, in other words, in the animation object which is in our case a Renderable.

A Renderable object for a screen could in theory implement getClickableShape() or getClickableBounds() For a circular object, this is, however, not ideal. There, the distance to the center of the circle is the only thing we need, and not a 64-segment polygon resembling the circle with a contains() method.
A fast fail-method contains(x, y) for Renderable, where x and y are in unscaled screen coordinates, would be ideal to implement the functionality to test which objects have been clicked on a mouse-down or mouse-up event. The programmer can then also decide to allow a few pixels 'around' the object to still be clickable, or to return false when the zoom factor has resulted in an object to be too small to be seen on the screen.

Currently, the Renderable2dInterface has the method boolean contains(Point2d pointWorldCoordinates, Bounds2d extent);.  This is, however, a very difficult method to implement. It would better be replaced by a backcasted method using screen coordinates for the unscaled, non-translated and non-rotated drawn object.

So, the method that would be needed is translating back the mouse click position relative to the extent (viewport) to the unscaled object. This can be done using the following steps:

Obtain the mouse click in screen coordinates, relative to the Dimension of the viewport. Let's call this coordinate (sx, sy).
Transform the Location (wx, wy) in world coordinates of the source object to screen coordinates. For this, the method RenderableScale.getScreenCoordinates(final Point<?> worldCoordinates, final Bounds2d extent, final Dimension screen) can be used. Let's call this coordinate (ox, oy).
Translate the point (sx, sy) to a relative coordinate (sx', sy') using sx' = sx - ox, sy' = sy - oy. Now the point (sx', sy') is relative to the screen location of the location point of the object on the screen.
Rotate back the relative location of the point (sx', sy') to its drawing orientation, by rotating it with an angle -source.getRotZ(). The new location is (sx", sy")
Scale back the relative unrotated location of the point (sx", sy") to its also unscaled position, by calculating: mx = sx" / scaleX, my = sy" / scaleY. The point (mx, my) is the screen coordinate of the mouse, relative to the originally drawn object in the graphics2D.paint() method, and in pixel coordinates.
Offer the point (mx, my) to an abstract method Renderable.contains(mx, my) that will determine of the point (mx, my) is close enough to the drawn object (contained, on the edge, within a boundary) of the drawn object on the screen.
A default implementation of Renderable.contains(mx, my) compares the point (mx, my) with the projected bounds of the source object around (0, 0).

For clicking on the object with a margin, there is a difference between applying the margin on the screen coordinates or on the object coordinates. When it is applied on the screen coordinates, there is a margin of, say, m pixels around the object that translate to (z * m) pixels on the object coordinates, where z is the zoom factor. One could also take the object coordinates as the basis, e.g., having a margin of 10% around the object. When the object is zoomed in on the screen, this results in more 'pixels' around the object than when the object is zoomed out. Both methods can have their advantages and disadvantages:

when there are many very small objects on the screen, the screen-based method results in a lot of overlapping margins, and hence, multiple objects that appear to be clicked when clearly one of them is clicked. Clicking work well with the object-based method.
when there are few very small objects on the screen, the screen-based method works well, but the object-based method makes it hard to click on the object.
when an object is zoomed in massively, the object-based method results in a margin that is too large, whereas the screen-based method works fine.

In other words, it is situation dependent, and can therefore best be left to the modeler. What this analysis makes clear is that the method for clicking on the object needs to know the zoom factor.

The current method to test for a click is the contains method. The contains method makes the calculation in world coordinates (so, the mouse point click has already been transformed from screen coordinates to world coordinates).
public boolean contains(final Point2d pointWorldCoordinates, final Bounds2d extent)

It currently calculates the results purely based on the bounds of the object (source.getBounds()):
Bounds2d intersect = BoundsUtil.projectBounds(this.source.getLocation(), this.source.getBounds());
return intersect.contains(pointWorldCoordinates);

The method BoundsUtil.projectBounds transforms a bounds (4 corner points) from the object coordinates relative to (0,0) to a bounds in world coordinates, using the rotation of the object (source.getDirZ()) and its translation (source.getLocation()) and calculates a new bounds in absolute world coordinates based on this calculation. When rotating the object, the bounds become larger as a result.


Support missing features

Support missing API routes

[ ] /stock/price-metric
[x] /stock/earnings

/stock/earnings
Earnings Surprises is the equivalent to Company Earnings, this feature was already implemented but the Go API is probably using an outdated name for the symbol
This feature is already implemented but using the name CompanyEarnings. Example:
client.DefaultApi.CompanyEarnings(context.Background()).Symbol(symbol).Execute()

This should be added in the latest release now.


⚠ Processors has degraded performance

In dee7e80, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 49 ms

Resolved: Processors performance has improved in 9022a31.


CI: fixing doctests

Travis is currently failing because doctests have some formatting issues due to numpy 1.14.
From a ML conversation minor errors should be being picked up by the refguide checker, but it's not currently doing that.
This PR simply corrects the doctest output.

Numpy 1.14.1 is out, so I think we could resume this discussion.

Rebased the PR, so we'll see what happens. AFAICT the doctesting is being done on py35, with pypi numpy?
Whilst looking at the travis config am I right in understanding that we test the numpy master branch in a py27 environment? We should probably move that to 3.x.

We obviously wouldn't have picked the numpy issues up with the doctesting unless we were targeting the master branch, rather than the released wheel.

A few minor nits needed changing.
What's the received wisdom on the doctest - we're obviously looking for correct numerical + object behaviour, but these tests are seem to be picky about the number of spaces, etc.

While the default doctest behavior is very picky about whitespace, our test checker tries to select numeric entities and np.assert_allclose them, where it can. It just fails to find arrays nested too deep into other objects, and falls back to vanilla doctest. Which is arguably a deficiency in our doctester.
I'd suggest to both fix the nits so that our examples match what numpy outputs out of the box, and improve the doctester (in a separate PR).

So if the changes I've made here finally work, then this should be mergeable. Currently PR's will have at least one fail because of the doctest errors fixed in this PR.

Thanks @andyfaff; will be nice to have the CIs green again.


Format Document with isort

These arent major changes but make it look better, I don't believe anything will break.

Well thanks @Onii-Chan-Discord for the proper formatting!

np


Update detail-page-checklist.md

Docs Build status updates of commit 3834048:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/concepts/deploy-and-publish/appsource/prepare/detail-page-checklist.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 71d44aa:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/concepts/deploy-and-publish/appsource/prepare/detail-page-checklist.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


SetUserMetadata throws User could not be found when updating on own user

When setting user metadata on the logged in user (users/me), the management service throws ths error (User could not be found)

I think this error is strance, but an Set metadata method doesn't exist on the auth api.

The requests (for organization users and for the own user) are both made on the management service, either we provider a function for auth service or we should ensure it works on management

In my opinion you should use the management api, but for the own user you should send the id instead of the "me"
I guess this is the problem right now. We do the request by ID if you send "me" you will not find a user

the angular route has nothing to do with the api call. As you can see in chrome dev tools, the id is set

I just tested all the different possibilities.
No matter if I go to edit account in the menu and set the metadata or if i choose my own user in the users list. I am able to set the metadata

seems to be an issue on my .app instance.. works fine with .cloud instances 🤔

@hifabienne just discussed and tested with max as well... worked so far
one question still remains: edit account (my user) also calls management api because there is no endpoint on the auth api to edit the own metatada. Do we need the possibility to edit the own metadata or is it for other users only?

My2cents. I don't think the user should edit his metadata, since it is only there to store additional fields used by services.

in my opinion we dont need it thats why it doesnt exist on the auth api. i dont see a use case where the user shoul add data himself

@peintnermax can you please remove the edit from the "edit Account" page

Are you sure? If I remove it you need at least two users to edit metadata.. You can't open your own user on management site as it will redirect to users/me 🤔

ok.. so the write permission is checked anyway, right? if so i believe we can close this issue

added the requirement for user.write to show the metadata section on /users/me in this PR https://github.com/zitadel/zitadel/pull/4136

IMO displaying the metadata is ok for every user (auth api already allows that: ListMyMetadata), but they must not be able to edit / add them

true.. changed it to your suggestion 👍


Deprecation warning about include

What happened?
When using this role I get the following deprecation warning:
[DEPRECATION WARNING]: "include" is deprecated, use include_tasks/import_tasks instead.

This feature will be removed in version 2.16. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.

Did you expect to see some different?
No deprecation warnings.
How to reproduce it (as minimally and precisely as possible):
Use this playbook:
- hosts: all
  roles: [cloudalchemy.prometheus]

Environment

Role version:

4.0.0

Ansible version information:

ansible [core 2.12.1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/luc/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/luc/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.1 (main, Dec 11 2021, 17:22:55) [GCC 11.1.0]
  jinja version = 3.0.3
  libyaml = True

Variables:

none

Ansible playbook execution Logs:

none, the warning is displayed before anything else is done by the playbook.
Anything else we need to know?:
The relevant code seems to be here:
~/.ansible/roles/cloudalchemy.prometheus/tasks/main.yml
13:- include: preflight.yml
19:- include: install.yml
24:- include: configure.yml

This role has been deprecated in favor of a the prometheus-community/ansible collection.


Get started with Data - Android

Added Android Studio version
updated Eclipse version to Android 21 level

I can merge, but one question: does this mean it will run with 21 by default by supports lower, or does it mean that you have to be at 21 or higher?

@lindydonna the min ver is still 8 so it will default to 21 and support anything higher than/equal to 8.

Sounds good!


Development footer

Description
Create footer for dashboard
Changes
Added footer to dashboard
I removed the transition because it shows a footer at the top of the content.
Related Issues
#1515

Checklist

[ ] Tests included
[ ] Build pass
[ ] Documentation
[ ] Code format and docstrings
[x] Screenshots/Video attached (needed for UI changes)

@mohamedamer453 can u hard refresh and check it works fine with me

After hard reload, the space is still there.

after further checking i found that it's related to the resolution that i'm using, i'm currently using a 2560 * 1440 monitor, but when i used a 1920 * 1080 it worked fine and the space wasn't there. so i think it should handle higher resolutions in a better way.

fixed

fixed

Indeed, the extra spaces at the bottom of the footer are now gone.


EFS - Grant 'endpoints' access

What this PR does / why we need it:
The EFS provisioner process requires access to the endpoints k8s resource.  This PR adds permissions to endpoints to the generated ClusterRole.
You'll see this error message in the logs using the current ClusterRole template:
E1108 19:59:11.054882       1 leaderelection.go:238] error initially creating leader election record: endpoints is forbidden: User "system:serviceaccount:kube-system:efs-provisioner" cannot create endpoints in the namespace "kube-system"

Which issue this PR fixes
Fixes this issue: https://github.com/kubernetes-incubator/external-storage/issues/953
Special notes for your reviewer:
/CC @whereisaaron
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[NA] Variables are documented in the README.md

Thanks for the review and comments @whereisaaron.  I've updated the EFS version info to v2.0.0-k8s1.11 as suggested, which is what I've tested with and validated as working in our development cluster.
I'm having trouble signing off on the commit generated by your suggested change... do you need to sign off on that or should I keep trying on my end?

Oh dear @kppullin. I can't signoff the suggested change or even delete the suggested change since I'd need 'push' access for that. 'Suggested changes' is a new github feature, possibly it isn't compatible with the DCO tool. Sorry I used it since I can't seem to do anything now. It looks like the suggested change is in your branch. If so, maybe you can delete my commit and just do that change yourself?

@whereisaaron - I was able to rebase & squash all the commits and it looks like the DCO gate has been resolved.

/ok-to-test

@whereisaaron - Any thoughts on the test failure?  I'm not too familiar with the helm testing process, but it looks like the tests may run on GCE and not AWS?  And even if they run on AWS is there a valid EFS resource provisioned?  I'm guessing the fs-12345678 referenced in the test output is just a placeholder & example and not expected to be used for testing.

I don't know @kppullin. This chart has a necessary external dependency the testing doesn't provide. So I imagine there is no way that test can pass. Again I'd have to defer to @davidkarlsen who may know how to skip/ignore that test,

@davidkarlsen - Any thoughts on bypassing the test here?
Best I can tell the tests run on GCP and not AWS.  Without having an AWS account with an EFS volume to test against there seems little value in the e2e testing of this chart : /
If needed it looks like we make some minor tweaks to bypass creating the deployment so that the tests pass, similar to what the cluster-autoscaler chart appears to do.

I went ahead and updated the chart to skip creating the deployment when running in CI, as to work around not having a valid AWS EFS resource to test against.  (as mentioned above, this appears to be similar to how the cluster-autoscaler chart works around similar limitations).

https://github.com/kubernetes-incubator/external-storage/issues/953#issuecomment-449519737

Same as the two above comments—after applying the additional rules in the PR (https://github.com/helm/charts/pull/9127/files#diff-1f3ae64e932358240df168628073a894R25), I was able to start binding mounts. Only 3 hours wasted here, but quite annoying nonetheless.

Bumping. @davidkarlsen can you take a look or suggest another reviewer?


Adding Library to Arduino ide

https://github.com/Arathierl/Home-Automation-using-arduino.git.
Adding my library to arduino ide

Hi @Arathierl. We have a new system for submitting libraries. The instructions are here:
https://github.com/arduino/library-registry#adding-a-library-to-library-manager
Please let me know if you have any questions.
Regards, Per


Add support for a "not" operator in "requires"

The "not" operator takes an array of contracts as an argument (as all
the other operators).
The requirements are unfulfilled if at least one of the contracts
declared in the "not" array exists in the context.
Change-type: minor
Fixes: https://github.com/balena-io/contrato/issues/20
Fixes: https://github.com/balena-io/balena-supervisor/issues/1388

@balena-ci I self-certify

@balena-ci I self-certify!


Support for tag editing in UI

Since it is not possible to delete tags with docker client it should be possible to delete tags from the UI.
As an additional feature it should be possible to modify a tag from the UI. While it is possible to add another (the correct) tag to an image, again, it is impossible to remove the wrong tag from the docker client.
Removing a wrong (unnecessary, possibly misleading) tag is kind of housekeeping. While this might not be a problem for automated build pipelines etc, it is one for manually doing stuff.
Both requests could be implemented by buttons next to the tag when browsing the registry.
All users allowed to write to the namespace should be allowed modify tags.
As a convinience goodie: copying of tags would be nice (e.g. copy tag :2.3.1  to :my_beloved_one). While this is possible with docker client it might require an otherwise unneeded pull and tagging of the image.

Since it is not possible to delete tags with docker client it should be possible to delete tags from the UI.
As an additional feature it should be possible to modify a tag from the UI. While it is possible to add another (the correct) tag to an image, again, it is impossible to remove the wrong tag from the docker client.
Removing a wrong (unnecessary, possibly misleading) tag is kind of housekeeping. While this might not be a problem for automated build pipelines etc, it is one for manually doing stuff.

Both requests could be implemented by buttons next to the tag when browsing the registry.
All users allowed to write to the namespace should be allowed modify tags.
Since this is not possible in the registry's side at the moment, I guess that you are proposing to "edit/modify/delete" tags only on the UI. That is, we would be hiding these "deleted" tags to the user right ? My main concern with that is that with this a user would never be sure whether the contents of the registry are actually what Portus is showing (let's image that said user is allowed to see all the images). In my mind, this is shift in terms of what Portus would be showing. Because of this, I'd prefer to wait until we get a solution upstream.

As a convinience goodie: copying of tags would be nice (e.g. copy tag :2.3.1 to :my_beloved_one). While this is possible with docker client it might require an otherwise unneeded pull and tagging of the image.

This is indeed doable. If you don't mind, maybe we can create a new issue for this feature.

Since this is not possible in the registry's side at the moment,

While the DELETE /v1/repositories/(namespace)/(repository)/tags/(tag*) from v1 registry API has gone, V2 reg API spec states delete of an images is done trough delete of a manifest.
While the cleanup of unuse images is not implemented yet the soft deletion itself is.
One of the main concern here is to get rid of wrongly tagged images, so I don't care about wasted space (yet).

(hiding images)
In my mind, this is an important shift in terms of what Portus would be showing,

I aggree that just hiding from the UI but beeing accessible by pulling from the registry is wrong.

(copying tags)
This is indeed doable. If you don't mind, maybe we can create a new issue for this feature.
Sure, feel free ;-)

I just thought to mention ist together since the UI stuff is very closely relatetd.

@mssola: Any chance to get this into 2.1 release?

@holgerreif Next week we will do the planning for the 2.1 release, and so we will detail here on Github which features/improvements will make it for this next release. That being said, this feature will most probably make it for the 2.1 release :)

@holgerreif this will make it into 2.1 ;)

Great!
However first I was a bit confused about the relationship with the newly open enhancement request #748. I understand it the following way:

tag creation is covered by #748
tag deletion is covered by this request
tag renaming is covered by this request
Am I right?

@holgerreif The thing being covered in #748 is re-tagging one tag from an existing one. That's why I created a specific issue just for this one. That being said:

tag creation

What do you mean by this ?

tag deletion

This is not covered either. basically because as of now we cannot provide it.


[addic7ed] Some subtitles arent downloaded

Using latest git version. Most of time subliminal working perfectly like this :
subliminal -p addic7ed -l fr -v -s --addic7ed-username xxxxx --addic7ed-password xxxxx "/home/mac/Videos/TV/The Vampire Diaries/Season 5/The Vampire Diaries - S05E06 - HDTV x264-LOL.mp4"
INFO     [subliminal.video] Scanning video u'The Vampire Diaries - S05E06 - HDTV x264-LOL.mp4' in u'/home/mac/Videos/TV/The Vampire Diaries/Season 5'
INFO     [subliminal.api] Listing subtitles for <Episode [u'The Vampire Diaries', 5x6]>
INFO     [subliminal.providers.addic7ed] Logged in
INFO     [subliminal.providers] Listing subtitles with provider 'addic7ed' and languages set([<Language [fr]>])
INFO     [subliminal.providers] Found 1 subtitles
INFO     [subliminal.api] Found 1 subtitles total
INFO     [subliminal.subtitle] Computed score 66 with matches set([u'series', u'year', u'episode', u'release_group', u'season'])
INFO     [subliminal.api] Downloading subtitle <Addic7edSubtitle [fr]> with score 66
INFO     [subliminal.providers.addic7ed] Logged out
INFO     [subliminal.api] Saving <Addic7edSubtitle [fr]> to u'/home/mac/Videos/TV/The Vampire Diaries/Season 5/The Vampire Diaries - S05E06 - HDTV x264-LOL.srt'
1 subtitle downloaded
But sometime the subtitle isnt downloaded with no error message like this :
subliminal -p addic7ed -l fr -v -s --addic7ed-username xxxx --addic7ed-password xxxxxx "/home/mac/Videos/TV/Lost Girl/Season 4/Lost Girl - S04E01 - HDTV x264-2HD.mp4"
INFO     [subliminal.video] Scanning video u'Lost Girl - S04E01 - HDTV x264-2HD.mp4' in u'/home/mac/Videos/TV/Lost Girl/Season 4'
INFO     [subliminal.api] Listing subtitles for <Episode [u'Lost Girl', 4x1]>
INFO     [subliminal.providers.addic7ed] Logged in
INFO     [subliminal.providers] Listing subtitles with provider 'addic7ed' and languages set([<Language [fr]>])
INFO     [subliminal.providers] Found 1 subtitles
INFO     [subliminal.api] Found 1 subtitles total
INFO     [subliminal.subtitle] Computed score 60 with matches set([u'series', u'year', u'episode', u'season'])
INFO     [subliminal.providers.addic7ed] Logged out
No subtitles downloaded
Using the -m option to lower the minimum score doesnt make a difference and I have still free download slot on my addic7ed account.

See #343


REACH-165 Remove "Click and Drag to Create Connection" dialog from outputs

I'm gonna miss this popup :)

Thanks @pbidenko!


[feat|sde-backend] : EDC API's updation and other refactor classes.

Description
Added

Added controller interface api's for Policy management.
External EDC service interface api updated.
Updated supported sub-model implementation classes.

Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:

[x] DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
[x] Copyright and license header are present on all affected files

@almadigabor  Please review and approve the PR.


Submission form is cutoff / overlaps with side menu (in pre-7.6.1 only)

Describe the bug
On latest main and dspace-7_x, the Submission form is cuttoff / overlaps with the sidebar menu.  It appears to be a side effect of #2454 , as reverting those changes fixes the problem (when I try that locally)
See this screenshot

To Reproduce
Steps to reproduce the behavior:

Can be reproduced on https://demo.dspace.org and https://sandbox.dspace.org (or locally via the latest code.
Login and go to the Submission Form

Related work
Caused by #2454

Solving this issue may require reverting #2454, unless a better fix can be found.  Pinging you @floriangantner just in case you have time to help investigate.

Errors that appear in Console on (seemingly) every page click (when running in production mode: yarn build:prod; yarn serve:ssr):
ERROR Error: NG03402
    at Le (main.dcd17e51f7449cc8.js:1:1377219)
    at Io.reportError (main.dcd17e51f7449cc8.js:1:1377253)
    at Io._flushAnimations (main.dcd17e51f7449cc8.js:1:1379925)
    at Io.flush (main.dcd17e51f7449cc8.js:1:1376684)
    at ge.flush (main.dcd17e51f7449cc8.js:1:1388266)
    at main.dcd17e51f7449cc8.js:1:1396292
    at Z.invoke (polyfills.2583206b8351234c.js:1:17141)
    at Kt.run (polyfills.2583206b8351234c.js:1:12406)
    at Va.runOutsideAngular (main.dcd17e51f7449cc8.js:1:2126778)
    at ge.end (main.dcd17e51f7449cc8.js:1:1396231)

I think we may need to revert #2454... it seems to have some unexpected side effects over the entire site. (These errors do NOT occur on every page click when #2454 is reverted)

Fixed by reverting #2454


Arabic CC search

engine-rtl.css isn't included in Arabic CC search.

@HebaFareed that site is effectively broken now. I would love to make sure we have a great UX for RTL languages on our new search. https://github.com/creativecommons/garmonbozia


Improvement for k8s.io/docs/setup/best-practices/certificates/

Any hints on how to integrate this with an existing CA?  For example, our AD domain currently has a CA cluster for authentication between machines.  We'd like to expand that to handle the certs needed for kube containers so that its already trusted by our staff.

I think you're asking for something different from what https://k8s.io/docs/setup/best-practices/certificates/ is requesting - my guess is that what you have in mind is closer to https://github.com/kubernetes/website/issues/14725 (TLS for applications running in the cluster)
Have I got that right?
/language en
/triage needs-information

Will close this. Slightly relevant to issue https://github.com/kubernetes/website/issues/25833
/close


Extending expiration date for images in disk cache.

Say I have dozens of images in disk cache. And my app uses some of them frequently, and doesn't want those to expire. How would I prevent Kingfisher from expiring them? More specifically, say:
1 I have 50 images cached in disk, and my app accesses 30 of them. By "accesses", I mean calling kf_setImageWithURL to supply the image;
2 I set up maxCachePeriodInSecond to be 7 days, with the intention that images not accessed in the last 7 days will be expired, and purged.
So in such a setting, would calling kf_setImageWithURL extend the image's expiration date to 7 days from the moment of calling? If not, what can I do to extend it?
Thanks!

Now I see your reply in https://github.com/onevcat/Kingfisher/issues/381.
You stated:
"Maybe we should use the access day instead of modification date to check the expiration. It might work better."
In all fairness, I agree with you on using something other than modification date to check for expiration. Using modification date doesn't seem all that elegant to me. After all, if the app keeps reading the image without modifying it, the image should be kept in cache for faster processing, right?

Use access date instead of modification date. So, just access that image from disk will extend the expiration date for the same. Implemented in #406

WOW, can't believe this is happening so quickly. Amazing!


Release 0.9.1 - [merged]

In GitLab by @Asacolips on Feb 12, 2024, 13:51
Merges release/0.9.1 -> master
Fixes

Fixed "Ask" prompt on rolls being empty.
Fixed importing Playbooks from Adventures.
Updated README to include an example with multiple tags.

In GitLab by @Asacolips on Feb 12, 2024, 13:52
added 1 commit
a5bb5740 - Update manifest
Compare with previous version

In GitLab by @Asacolips on Feb 12, 2024, 13:52
mentioned in commit 2e9bfae0f889467a8f9944245015b6e41567bbed

In GitLab by @Asacolips on Feb 12, 2024, 13:52
approved this merge request


Question: how to render generically.

I want to generate html from custom types, so I started like this:
trait ToHtml {
    type Output: HtmlElement;

    fn to_html(&self) -> Self::Output;
}

However, I don't see any generic methods for rendering. For example, suppose I have a generic container:
struct MyThing<T>(Vec<T>);

impl<T> ToHtml for MyThing<T>
where T: ToHtml,
{
    type Output = OrderedList;

    fn to_html(&self) -> OrderedList {
        let mut builder = OrderedList::builder();
        for elem in self.0.iter() {
            let htmlelem = elem.to_html();
            // How can I add htmlelem to the ordered list?
            todo!();
        }
        builder.build()
    }
}

I cannot yet figure out how to implement the todo!() because all of the methods of OrderedListBuilder are "concrete": there is a specific method for every kind of element I would want to add. I want a generic method that can add any HtmlElement type. Is this possible?
I realize that the design of the library aims to constrain rendering to follow the standard, so that may preclude some HtmlElement types from being added to others. My question is: is there any way around this that is generic?
A cumbersome but type-safe approach might be to introduce a trait for each element, such as ListItemChild, then introduce ListItemBuilder::add_child<C>(&mut self, child: C) where C: ListItemChild. This may be cumbersome because every container element type would also need a trait to define which children can be added. An advantage is that every element type's docs would also clarify which containers it could be added to.
A different approach with many fewer traits would be to introduce runtime html-validity checks, so maybe:
trait ContainerElement {
    fn push_child<C>(&mut self, child: C) -> Result<(), ContainerError>
        where C: HtmlElement;
}

Thoughts or advice?

Hey thanks for opening up this. Yes, that's currently not yet supported. We're missing custom element support still.