text:
Assets are not served when running "sail npm run dev" without an existing build folder after migrating from Mix to Vite on Laravel using Sail

I migrated from Mix 6.0.6 to Vite 3.0.9 (laravel-vite-plugin 0.5.4) on Laravel 9.2.5.1.
I followed these instructions: https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#migrating-from-laravel-mix-to-vite
The assets resources/css/app.css and resources/js/app.js are not served when i start hot-reloading on Sail via sail npm run dev (= vite) , if i did not build them before via sail npm run build (= vite build) and the ./public/build/** files exist.
If the compiled assets in ./public/build/** do NOT exist, then @vite(['resources/css/app.css', 'resources/js/app.js']) in my blade-template does not touch the defined links - they are referenced like that in the web-browser, and therefore won't be served.
If the compiled assets in ./public/build/** DO exist, then @vite(['resources/css/app.css', 'resources/js/app.js']) in my blade-template is converted to the related compiled assets, e.g. build/assets/app.3696ec54.css or build/assets/app.dfc18a0d.js.
Shouldn't hot-reloading started with sail npm run dev (= vite) also create the build-directories and files on related file-changes?
And is it possible to change the build target directory like we can do it with Mix?
My package.json scripts section:
"scripts": {
        "dev": "vite",
        "build": "vite build"
    }

My vite.config.js:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
    server: {
        host: 'server.apps.local'
    },
    plugins: [
        laravel({
            input: [
              'resources/css/app.css',
              'resources/js/app.js',
            ],
            refresh: true
        }),
        vue({
             template: {
                 transformAssetUrls: {
                     base: null,
                     includeAbsolute: false,
                 },
             },
        }),
    ]
});

My postcss.config.js:
module.exports = {
    plugins: {
        tailwindcss: {},
        autoprefixer: {},
    },
}

My docker-compose.yml:
# For more information: https://laravel.com/docs/sail
version: "3"
x-tz: &tz
    TZ: Europe/Berlin
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.1
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.1/app
        extra_hosts:
            - 'host.docker.internal:host-gateway'
        ports:
            - '${APP_PORT:-80}:80'
            - '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
        environment:
            <<: *tz
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
            XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
            XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mysql
            - redis
            - meilisearch
            - selenium
    mysql:
        image: 'mysql/mysql-server:8.0'
        ports:
            - '${FORWARD_DB_PORT:-3307}:3307'
        environment:
            <<: *tz
            MYSQL_TCP_PORT: '${DB_PORT}'
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ROOT_HOST: "%"
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ALLOW_EMPTY_PASSWORD: 1
        volumes:
            - 'sail-mysql:/var/lib/mysql'
        networks:
            - sail
        healthcheck:
            test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
            retries: 3
            timeout: 5s
    redis:
        image: "redis:alpine"
        ports:
            - "${FORWARD_REDIS_PORT:-6379}:6379"
        environment:
            <<: *tz
        volumes:
            - 'sail-redis:/data'
        networks:
            - sail
        healthcheck:
            test: ["CMD", "redis-cli", "ping"]
            retries: 3
            timeout: 5s
    meilisearch:
        image: 'getmeili/meilisearch:latest'
        ports:
            - '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
        environment:
            <<: *tz
        volumes:
            - 'sail-meilisearch:/data.ms'
        networks:
            - sail
        healthcheck:
            test: ["CMD", "wget", "--no-verbose", "--spider",  "http://localhost:7700/health"]
            retries: 3
            timeout: 5s
    mailhog:
        image: 'mailhog/mailhog:latest'
        environment:
            <<: *tz
        ports:
            - '${FORWARD_MAILHOG_PORT:-1025}:1025'
            - '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
        networks:
            - sail
    selenium:
        image: 'selenium/standalone-chrome'
        environment:
            <<: *tz
        volumes:
            - '/dev/shm:/dev/shm'
        networks:
            - sail
networks:
    sail:
        driver: bridge
volumes:
    sail-mysql:
        driver: local
    sail-redis:
        driver: local
    sail-meilisearch:
        driver: local

Hi @stoffpalette,
When running the Vite development server via npm run dev, no files are written to your build directory. The assets are served directly from the Vite development server.
While the Vite development server is running, it creates a file at public/hot with the address of the server.
When the @vite directive detects this file, it loads your assets from the Vite development server, instead of from Laravel's public directory. Only when the hot file is not present does the @vite directive load compiled assets from the public/build directory.

And is it possible to change the build target directory like we can do it with Mix?

Yes, you may use the buildDirectory configuration option for this plugin to change the name of the build directory. You will also need to pass it as the second argument to the @vite directive so that it knows where to find your assets.
I'd recommend sticking with the defaults if possible though.

Hi @jessarcher ,
thanks for your fast reply and the explanation.
Since Vite is not able to serve the files via Sail, something does not seem to run as it should.
The public/hot file is indeed created when i start Vite within the Sail container:
starting vite:
$ sail npm run dev

> dev
> vite

  VITE v3.0.9  ready in 1701 ms

  ➜  Local:   http://server.apps.local:5173/
  ➜  Network: http://172.25.0.7:5173/

  LARAVEL v9.25.1  plugin v0.5.4

  ➜  APP_URL: http://server.apps.local

public/hot-file is created with the following content:
http://server.apps.local:5173

Vite injects the following via the @vite directive in the corresponding blade-template:
<script type="module" src="http://server.apps.local:5173/@vite/client"></script>
<link rel="stylesheet" href="http://server.apps.local:5173/resources/css/app.css" />
<script type="module" src="http://server.apps.local:5173/resources/js/app.js"></script>

But the resources cannot be loaded.
Chrome-Console reports for each file:
Failed to load response data: No data found for resource with given identifier

Firefox reports for each file:
Cross-Origin Request Blocked: The Same Origin Policy disallows
reading the remote resource at https://some-url-here. (Reason: CORS request did not succeed).

( Possible causes: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSDidNotSucceed / i assume, it is the 4th possible cause mentioned, that would be similar to the Chrome message: "The server did not respond to the actual request [...]")
Do you have any idea, why this happens?

What happens if you browse directly to http://server.apps.local:5173/resources/js/app.js ? Do you get a successful response with JavaScript content?

@jessarcher
If i do that, i get an ERR_EMPTY_RESPONSE in Chrome.
Similar error message in Firefox: Error: Connection interrupted

Sounds like there's some sort of networking issue somewhere between your host machine and the Vite service running in the container.
I'm assuming you're able to access the Sail web server via http://server.apps.local?

@jessarcher
yes. Accessing the Sail web server via http://server.apps.local is working without problems.
Only Vite ressources on the additionally port 5173 are not loading as expected.

Browse http://server.apps.local:5173/resources/js/app.js  and the you need to accept the security warning from there., means for the port: 5173

@OmarBouziane
Does not help. There is no security warnig. I just get an EMPTY RESPONSE Error (Chrome: ERR_EMPTY_RESPONSE)

Yeah, this does not work for me. I am not using sail, but just Docker + Laravel + Vite + Svelte. None of the solutions I could find on this help.

Mapped the '5173:5173' ports on app container
Tried updating the build/hot file
Added server.hmr.host = localhost
Tried running dev with --host

None of these help, even on "laravel-vite-plugin": "^0.6.0",
So am a bit stumped. Works if you run npm run build, then loads everything fine. Does not work with npm run dev. Failed to load resource: net::ERR_EMPTY_RESPONSE
What is interesting, that http://localhost:5173/ just returns a This page isn’t working. Then when I go to localhost, console shows: Failed to load resource: net::ERR_EMPTY_RESPONSE and its trying this link: http://localhost:5173/resources/js/app.js
I have ran out of ideas how to troubleshoot this

Yeah, this does not work for me. I am not using sail, but just Docker + Laravel + Vite + Svelte. None of the solutions I could find on this help.

Did you manage to get something working? I'm in a similar situation using Docker+Laravel+Vite, having tried multiple configs:
vite.config.ts

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import react from '@vitejs/plugin-react';

export default defineConfig({
  server: {
    // host: 'localhost',
    // host: 'site',
    // port: 3000,
    // strictPort: true,
    hmr: {
        host: 'localhost',
        // host: '0.0.0.0',
        // port: 5173,
        // clientPort: 80,
    },
  },
  plugins: [
    laravel({
      input: 'resources/js/app.tsx',
      refresh: true,
    }),
    react(),
  ],
  resolve: {
    alias: {
      '@': '/resources/js',
    },
  },
});

docker-compose.yml

version: '3'

networks:
  laravel:

services:
  site:
    build:
      context: ./dockerfiles
      dockerfile: nginx.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    container_name: nginx
    ports:
      - 80:80
    volumes:
      - ./src:/var/www/html:delegated
    depends_on:
      - php
      - redis
      - mysql
      - mailhog
    networks:
      - laravel

  mysql:
    image: mariadb:10.6
    container_name: mysql
    restart: unless-stopped
    tty: true
    ports:
      - 3306:3306
    environment:
      MYSQL_DATABASE: homestead
      MYSQL_USER: homestead
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    networks:
      - laravel

  php:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    container_name: php
    volumes:
      - ./src:/var/www/html:delegated
    networks:
      - laravel

  redis:
    image: redis:alpine
    container_name: redis
    restart: unless-stopped
    ports:
      - 6379:6379
    networks:
      - laravel

  composer:
    build:
      context: ./dockerfiles
      dockerfile: composer.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    container_name: composer
    volumes:
      - ./src:/var/www/html
    working_dir: /var/www/html
    depends_on:
      - php
    user: laravel
    entrypoint: ['composer', '--ignore-platform-reqs']
    networks:
      - laravel

  npm:
    image: node:16.7
    container_name: npm
    volumes:
      - ./src:/var/www/html
    ports:
      - 3000:3000
      - 3001:3001
      - 5173:5173
    working_dir: /var/www/html
    entrypoint: ['npm']
    networks:
      - laravel

  artisan:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    container_name: artisan
    volumes:
      - ./src:/var/www/html:delegated
    depends_on:
      - mysql
    working_dir: /var/www/html
    entrypoint: ['php', '/var/www/html/artisan']
    networks:
      - laravel

  mailhog:
    image: mailhog/mailhog:latest
    container_name: mailhog
    ports:
      - 1025:1025
      - 8025:8025
    networks:
      - laravel

@cookiies
Still no solution here. Forced to work without hot-reloading at the moment.
@jessarcher
Shouldn't the ticket be reopened as a bug?

@cookiies Still no solution here. Forced to work without hot-reloading at the moment. @jessarcher Shouldn't the ticket be reopened as a bug?

I agree, as for now, the only way to get changes is to run npm run build on every change

Are you able to try it on a fresh Laravel project with Sail and something like Breeze, to see whether the default setup works on your machine?
First, make sure you have no running Docker containers that could conflict by checking docker ps.
Then run the following:
curl -s "https://laravel.build/example-app" | bash
cd example-app
./vendor/bin/sail up

Then in another terminal in the same directory:
./vendor/bin/sail composer require laravel/breeze --dev
./vendor/bin/sail artisan breeze:install vue
./vendor/bin/sail npm run dev

If I follow those steps and then browse to http://localhost, I can see in my browser console that it connected successfully to the Vite dev server.
If that works for you, perhaps you can take a look between the example app and your own for what might be different. You could start tweaking the example-app to be more like your real app by introducing one change at a time until you find one that makes it stop working.
If the example-app doesn't work for you, then there may be an issue.

I've just run the exact steps verbatim outline above and can confirm that things are working as expected on my Mac.

@jessarcher
couldn't get that installation work, since of several problems during single installation steps. therefore i stopped that test.
BUT: Additional research when trying to fix some of the errors during installation brought me to an an article that luckily fixed my problem!
What was missing, is the --host parameter, that obviously must be appended to the vite command within the scripts section in the package json, so:
OLD (hmr NOT working):
"scripts": {
        "dev": "vite",
        "build": "vite build"
    }

NEW (hmr working):
"scripts": {
        "dev": "vite --host",
        "build": "vite build"
    },

Glad you got it sorted @stoffpalette! :tada:
The --host flag is the equivalent of setting server.host to true in your vite.config.js. This tells Vite to listen on all addresses, not just localhost. It's important when running inside Docker because listening only on the container's localhost address will make Vite inaccessible from outside.
When using the Laravel Vite plugin with Laravel Sail, we automatically set this value for you unless the user config provides something different:
https://github.com/laravel/vite-plugin/blob/64bef2b3a622a1a9d45c8d7ecccfc93fc9e2dfc9/src/index.ts#L136-L140
I'm wondering whether the server.apps.local setting you had was causing the issue. Depending on what address this resolves to, Vite may not have been able to bind to it if the address did not belong to one of the network devices in your container.

@jessarcher
something is strange here.
Why do i have to add --host (without setting the host value here) inside my package.json file
although i had already set the server.host value (and still do) within my vite.config.js ?
I just checked it again, it definitly works only, when i just add --host inside package.json.
Here is my current vite.config.js:
import { defineConfig } from 'vite'
import laravel from 'laravel-vite-plugin'

export default defineConfig({
    server: {
        hmr: {
            host: 'server.apps.local'
        },
        host: 'server.apps.local'
    },
    plugins: [
        laravel({
            input: [
                'resources/sass/app.scss',
                'resources/js/app.js'
            ],
            refresh: true
        })
    ]
});

Note: server.apps.local just points to 127.0.0.1 inside the windows hosts file

If server.apps.local resolves to 127.0.0.1 then by specifying it for server.host you're telling Vite to only listen on the localhost of the container (which is not the localhost of your host machine) which would make Vite inaccessible outside of the container.
If running Vite inside Sail's main container, then you should be able to remove server.host from your config and remove the --host flag because we automatically configure it for you. If you're using a different Docker setup, then you should either set server.host to true or use the --host option.

@jessarcher
i just tested what you described - these combination only work, when i additionally set server.hmr.host to 'server.apps.local'
working example with server.hmr.host and without server.host and --host option:
vite.config.js:
import { defineConfig } from 'vite'
import laravel from 'laravel-vite-plugin'

export default defineConfig({
    server: {
        hmr: {
            host: 'server.apps.local'
        }
    },
    plugins: [
        laravel({
            input: [
                'resources/sass/app.scss',
                'resources/js/app.js'
            ],
            refresh: true
        })
    ]
});

package.json (snippet):
    "scripts": {
        "dev": "vite",
        "build": "vite build"
    },

I'm using Sail withi Laravel UI.
Just adding this solving my problem:
server: {         hmr: {             host: 'localhost'         }     },

For the sake of completeness, and since this is the only issue I could find that referenced the problem in the repository.
I run Laravel behind a reverse proxy, with every service separated. So there is a separate Node, PHP, Workers, Nginx, etc. For me, I had to make 2 changes to the vite config for this to work. Both of those changes are explained above if you read the entire thread btw.
One is setting the server.hmr.host value to be the domain I'm access the site on (in my case it is myapp.test), and the other is to set server.host to true.
Vite config
server: {
        host: true,
        hmr: {
            host: 'myapp.test'
        }
    },
    plugins: [
        laravel({
            input: 'resources/js/app.jsx',
            refresh: true,
        }),
        react(),
    ],

But if you are running a separate node container, make sure to expose the port that Vite is using!
Node service
  node:
    image: node:18-slim
    init: true
    user: node
    environment:
      - NODE_ENV=development
    volumes:
      - "~/.npm:/usr/local/npm:delegated"
      - "./:/home/node/app:delegated"
    working_dir: "/home/node/app"
    ports:
      - "5173:5173"
    command: "npm run dev"

For me, this was fixed by:

Running npm run dev outside of the docker container (with vite --host). So I ran the command on my machine, rather than within the docker container.
Second thing, I removed the commented out entries from my config. I think the watch option might have been messing it up.

  server: {
       hmr: {
           host: 'localhost'
       }
       // host: true,
       // watch: {
       //     usePolling: true
       // }
   },

Now it works perfectly.

Spoke too soon, it works only with pages, that don't use passed page props (like login page). After login, page load fails, saying, that the data cannot be retrieved.

When following the Laravel Bootcamp, I also ran into the issue described above with Vite not serving CSS.
I'm using Docker Desktop v4.22.0 with WSL2 on Win 10 Education 22H2 64-bit, if that helps.
@greaterking Thanks a million, that solution fixed it. I think that should be added to the bootcamp page: https://bootcamp.laravel.com/blade/installation#installing-laravel-breeze (and maybe also https://bootcamp.laravel.com/inertia/installation#installing-laravel-breeze)

authors: Aigarsss Geovanek OmarBouziane benfreke cookiies jessarcher retifex stoffpalette timacdonald

repo: laravel/vite-plugin


text:
Trying to get in touch regarding a security issue

Hey there!
I belong to an open source security research community, and a member (@hdvinnie) has found an issue, but doesn’t know the best way to disclose it.
If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)

Hi @JamieSlome @HDVinnie, thank you. Feel free to send me an email at hello@laravel.io and I'll get back to you as soon as I can. I'll add a SECURITY.md file as well.
Thanks!

@driesvints - sorted for you 👍 You should have just received an e-mail.
Otherwise, you can view the private report here:
https://huntr.dev/bounties/5cd5fe0d-b3e1-4de4-816e-8d5af1b6f173/

@driesvints thanks for taking the time to do this. I see you read the report and pushed a fix. Mind validating it on huntr? Once that is done I have another to report.

I don't use that site sorry.

@driesvints - no worries, we can arrange this for you, can you please confirm the commit SHA that addressed the issue?

@JamieSlome here: https://github.com/laravelio/laravel.io/commit/8dd022fc972505e5f35e2a5fdadfef74bca95910

@driesvints - thanks for the support! 👍
This report has now been marked as valid. Do you have a version number for the fix?

@JamieSlome this is an app, not a package. There's no versioning.

@driesvints - thanks for the info 😄

@driesvints Thanks again for taking the time to read the disclosure and publish a fix. I do have one more for you if your up for it. I know you said you don't want to use the site so you can just visit the link, read it and then just let @JamieSlome know here that you confirm its a issue and a commit SHA if you decide to fix.
https://huntr.dev/bounties/1e2511a6-ed60-4c6b-8385-0fb6578e68cb
If you no longer wish me to do research bon this app just let me know and I will cease doing so.
Thanks again for taking the time and making this platform for Laravel devs. Im a Lover of Laravel, Livewire and AlpineJS so I can appreciate this.

Thanks @HDVinnie, I appreciate it 👍
Feel free to send whatever you have to the email address in the security policy.

Thanks @HDVinnie, I appreciate it 👍
Feel free to send whatever you have to the email address in the security policy.

Sent

source: gharchive/issue

authors: HDVinnie JamieSlome driesvints

license: MIT

license_type: permissive

license_source: github-api


text:
Fix #695 - Add word breaks to titles

Hey!
This fixes #695 . I've added break-all because break-words did not always break long strings.
Have a great day 😃

Hi @tomhatzer
Again, thanks so much for the contribution. Is there any chance you can share a screenshot of the update? Thanks!

Hey @joedixon ,
sure thing!
Currently it looks like this on laravel.io with the content overlapping the layout on the right:

With this PR it looks like this with the content breaking to the next line:

Would this be ok?
Thank you very much for reviewing.

Looks good. Thanks @tomhatzer!

source: gharchive/pull-request

authors: driesvints joedixon tomhatzer


text:
Error reporting for ParseError

I'm getting a  lark.exceptions.ParseError, and I would like to do error reporting similar to error_reporting_lalr.py but it doesn't look like ParseError has the necessary attributes. I guess ParseError is for missing characters, rather than unexpected characters. Would it be possible to do reporting from a ParseError?
For example,
lark.Lark(r"""
x: "a" y
y: "b"
""", start="x").parse('a')

ParseError: Unexpected end of input! Expecting a terminal of: []

error_reporting_lalr.py uses LALR, while your snippet uses Earley.
Unfortunately, their error reporting mechanisms are different, and currently don't offer the same interface.
However, it should say that it's expecting terminal B, so I pushed a fix for that.

authors: erezsh jtrakk

repo: lark-parser/lark


text:
'url' prop in getBibTeXJSON and parseBibTeXJSON are inconsistent

Uppercase for parseBibTeXJSON and lowercase for getBibTeXJSON

Thanks for reporting this, by the way. I'll create a back-port release.

0.4.0-6 should work now.

authors: larsgw mydu


text:
Update sbt-scoverage to 2.0.5

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

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scoverage", artifactId = "sbt-scoverage" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "org.scoverage", artifactId = "sbt-scoverage" }
}]

labels: sbt-plugin-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #942.


text:
having a sleep period

Is there a way to having a defined time in between retries similar to Retryable, instead of immediately retrying?

Yes, you can set RSpec.configuration.wait_delay globally.
Or you can use the with_wait block like so:
it "works" do
  with_wait(delay: 0.5) do
    wait_for { something }.to be_done
  end
end

You can also pass :wait options to an RSpec example:
it "works", wait: { delay: 0.5 } do
  wait_for { something }.to be_done
end

The default delay value is 0.1 seconds.

authors: guyisra laserlemon

repo: laserlemon/rspec-wait

license: mit

license_source: bigquery


text:
Why use included applications for plumtree and partisan

Why are plumtree and partisan included as included_applications?

This was done because we need their supervisor running under Lasp's supervisor, to ensure that connections and related processes are started correctly and things are properly configured.

Hm, ok. It is just worrisome when I see it used since they can have unintended consequences and are often used when it could be better to change the dependency (for either easier configuration or removing {mod, ...} from it to make it not start anything) or set as load in the release.

I'll close this for now, but as I'm digging into the code I may have suggestions to improve on it.

We welcome any suggestions you may have!

authors: cmeiklejohn tsloughter

repo: lasp-lang/lasp


text:
Кондиционер с датчиком температуры

Есть ли возможность прописать в конфиг кондиционер с датчиком температуры, чтобы он корреткно отображался по данным из mqtt?
Сам яндекс это умеет, добавляю в устройство раздел properties

    properties: [
        {
            type: 'devices.properties.float',
            retrievable: true,
            parameters: {
                instance: 'temperature',
                unit: 'unit.temperature.celsius',
            },
        },
    ],

Перепривязываю устройства в яндексе, у конционера появляется значек термометра и показания 0 (логично, т.к. не задан mqtt-топик).
А вот как его задать? Ведь в разделе mqtt: [] уже есть топики для instance "temperature" из раздела capabilities (для задания и считывания целевой температуры кондиционера).
Мне нужно задать еще один топик state для instance "temperature", только не из capabilities, а из properties.
Попробовал просто добавить в mqtt секцию в конец еще один instance temperature с топиком state, но ожидаемо ничего не заработало.
В общем, есть ли возможность задавать mqtt топики для одноименных instance из разделов capabilities и properties?

На данный момент нет возможности проделать то, что Вы описали. Понадобится время подумать как лучше это реализовать.

На данный момент нет возможности проделать то, что Вы описали. Понадобится время подумать как лучше это реализовать.

То есть на данный момент (спустя 2 года) нет возможности в рамках одного инстанса иметь и properties и capabilities? У меня похожая проблема, но с чайником. Добавил возможность задавать температуру и теперь датчик температуры показывает 0. Вот конфиг:
        {
            id: 'rk-g210s-kettle',
            name: 'Чайник',
            room: 'Кухня',
            type: 'devices.types.cooking.kettle',
            allowedUsers: ['2'],
            mqtt: [
                {
                    instance: 'on',
                    set: 'r4s0/c2c55cd11650/cmd/boil',
                    state: 'r4s0/c2c55cd11650/rsp/boil',
                },
                {
                    instance: 'temperature',
                    set: 'r4s0/c2c55cd11650/cmd/heat_temp',
                    state: 'r4s0/c2c55cd11650/rsp/temp',
                },
                {
                    instance: 'keep_warm',
                    set: 'r4s0/c2c55cd11650/cmd/heat',
                    state: 'r4s0/c2c55cd11650/rsp/heat',
                },
            ],
            capabilities: [
                {
                    type: 'devices.capabilities.toggle',
                    retrievable: true,
                    parameters: {
                        instance: 'keep_warm',
                    },
                },
                {
                    type: 'devices.capabilities.on_off',
                    retrievable: true,
                },
                {
                    type: 'devices.capabilities.range',
                    retrievable: true,
                    parameters: {
                        instance: 'temperature',
                        range: {
                            max: 100,
                            min: 40,
                            precision: 5
                        },
                        unit: 'unit.temperature.celsius'
                    },
                },
            ],
            properties: [
            {
                type: 'devices.properties.float',
                retrievable: true,
                parameters: {
                    instance: 'temperature',
                    unit: 'unit.temperature.celsius',
                },
            },
        ],
            valueMapping: [
                {
                    type: 'keep_warm',
                    mapping: [[false, true], [0, 1]], // [yandex, mqtt]
                },
            ],
        },

В общем я починил это в своем форке, если нужно могу пр кинуть сюда


text:
[dall-e parser][6/n] Add Dall-E parser for Typescript

[dall-e parser][6/n] Add Dall-E parser for Typescript

Stack created with Sapling. Best reviewed with ReviewStack.

#307
-> #306

Is this diff ready to be reviewed @rossdanlm ?

Is this diff ready to be reviewed @rossdanlm ?

My bad, I ran into a few issues so wasn't able to complete, closing for now to make it easier to manage

authors: rossdanlm saqadri

repo: lastmile-ai/aiconfig


text:
Observed durations of \setmainfont et al. feel big

Description
Recently I worked on some project using lualatex and noticed during each build a systematic apparent "freeze" of one to two seconds right after having loaded unicode-math-table.tex. For a long time I blamed (this was silly) that file but now I understand it is \setmainfont et al. which were responsible for it all:
\setmainfont{DejaVu Serif}[
%  RawFeature={fallback=faqfallback}
]
\setsansfont{DejaVu Sans}[
%  RawFeature={fallback=faqfallback}
]
\setmonofont{DejaVu Sans Mono}[
%  RawFeature={fallback=faqfallback}
]

I have commented out here the fallback business (which exacerbates the situation but does not cause it) to focus on simpler configuration.  I tested with TeX Gyre Termes too and found faster times but in my view "problem" persists.
fontspec is definitely not responsible for my lack of upgrade to my hardware,  which I admit is currently quite outdated (2Ghz single core CPU at this time), and the timings would certainly be divided by at least 2, probably 5 on current CPUs.
Still a single \setmainfont or cousin costs an amount of time similar to loading all of unicode-math for example (from half as much to twice as much, with lualatex).
Check/indicate

[x] Relevant for XeTeX
[x] Relevant for LuaTeX
[ ] Issue tracker has been searched for similar issues?
[ ] Links to <tex.stackexchange.com> discussion if appropriate

Minimal example demonstrating the issue
Here is my test file
\documentclass{article}
\usepackage{pdftexcmds}
\usepackage{iftex}
\makeatletter
\let\pdfresettimer\pdf@resettimer
\let\pdfelapsedtime\pdf@elapsedtime
\makeatother

\usepackage{fontspec}

\pdfresettimer

\setmainfont{DejaVu Serif}

\typeout{(\ifxetex xelatex \else lualatex \fi 1)\the\dimexpr \pdfelapsedtime sp\relax}

\pdfresettimer

\setsansfont{DejaVu Sans}

\typeout{(\ifxetex xelatex \else lualatex \fi 2)\the\dimexpr \pdfelapsedtime sp\relax}

\pdfresettimer

\setmonofont{DejaVu Sans Mono}

\typeout{(\ifxetex xelatex \else lualatex \fi 3)\the\dimexpr \pdfelapsedtime sp\relax}

\pdfresettimer
\usepackage{unicode-math}
\typeout{UNICODE-MATH: \the\dimexpr\pdfelapsedtime sp\relax}

\begin{document}
nothing to worry \textsf{about}? \texttt{mono}
\end{document}

Typical console output with lualatex (pt is to be read as second)
(/usr/local/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(lualatex 1)0.20174pt
(lualatex 2)0.28061pt
(lualatex 3)0.17163pt
(/usr/local/texlive/2024/texmf-dist/tex/latex/unicode-math/unicode-math.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.
sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
 (/usr/local/texlive/2024/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2024/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.st
y (/usr/local/texlive/2024/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2024/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)))
UNICODE-MATH: 0.15425pt
(./testfontspec.aux)
[1{/usr/local/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./testfontspec.aux))
 484 words of node memory still in use:
   6 hlist, 2 vlist, 2 rule, 2 glue, 4 kern, 1 glyph, 6 attribute, 52 glue_spec
, 6 attribute_list, 1 write nodes
   avail lists: 2:30,3:4,4:1,5:26,6:2,7:86,9:18,11:2
</usr/local/texlive/2024/texmf-dist/fonts/truetype/public/dejavu/DejaVuSansMono
.ttf></usr/local/texlive/2024/texmf-dist/fonts/truetype/public/dejavu/DejaVuSan
s.ttf></usr/local/texlive/2024/texmf-dist/fonts/truetype/public/dejavu/DejaVuSe
rif.ttf>

and with xelatex
(/usr/local/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(xelatex 1)0.08669pt
(xelatex 2)0.07364pt
(xelatex 3)0.0464pt
(/usr/local/texlive/2024/texmf-dist/tex/latex/unicode-math/unicode-math.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.s
ty
(/usr/local/texlive/2024/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
 (/usr/local/texlive/2024/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2024/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2024/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)))
UNICODE-MATH: 0.10739pt
(./testfontspec.aux)
[1] (./testfontspec.aux) )
Output written on testfontspec.pdf (1 page).
Transcript written on testfontspec.log.

Further details
With original context of lualatex with fallback config, the three font definitions ended up costing about 1s to 1.5s.
This is not an issue report but a question to learn if some profiling has been done to identify what causes observed execution times.  Is it mostly engine issue, or at macro layer? "One second" is a lot of time when watching console output during preamble execution.

I tried specifying the italic, bold and bold-italic explicitly, and it did not change much:
(xelatex 1)0.0996pt
(xelatex 2)0.08202pt
(xelatex 3)0.05931pt
...
UNICODE-MATH: 0.11235pt

and
(lualatex 1)0.2339pt
(lualatex 2)0.28549pt
(lualatex 3)0.18494pt
...
UNICODE-MATH: 0.15825pt

I had to remove spaces from name (with xelatex, and I left it this way for lualatex).  Maybe I should have added Extension=.ttf or Path?
Here is test file
\documentclass{article}
\usepackage{pdftexcmds}
\usepackage{iftex}
\makeatletter
\let\pdfresettimer\pdf@resettimer
\let\pdfelapsedtime\pdf@elapsedtime
\makeatother

\usepackage{fontspec}

\pdfresettimer

\setmainfont{DejaVuSerif}[
    RegularFont=*,
    BoldFont=*-Bold,
    ItalicFont=*-Italic,
    BoldItalicFont=*-BoldItalic,
]

\typeout{(\ifxetex xelatex \else lualatex \fi 1)\the\dimexpr \pdfelapsedtime sp\relax}

\pdfresettimer

\setsansfont{DejaVuSans}[
    RegularFont=*,
    BoldFont=*-Bold,
    ItalicFont=*-Oblique,
    BoldItalicFont=*-BoldOblique,
]

\typeout{(\ifxetex xelatex \else lualatex \fi 2)\the\dimexpr \pdfelapsedtime sp\relax}

\pdfresettimer

\setmonofont{DejaVuSansMono}[
    RegularFont=*,
    BoldFont=*-Bold,
    ItalicFont=*-Oblique,
    BoldItalicFont=*-BoldOblique,
]

\typeout{(\ifxetex xelatex \else lualatex \fi 3)\the\dimexpr \pdfelapsedtime sp\relax}

\pdfresettimer
\usepackage{unicode-math}
\typeout{UNICODE-MATH: \the\dimexpr\pdfelapsedtime sp\relax}

\begin{document}
nothing to worry \textsf{about}? \texttt{mono}
\end{document}

I said I didn't have time to profile this, and I don't, but I tried this and found that there is a small part of the code which appears to be responsible for 50% of the font loading time:
\documentclass{article}
\usepackage{fontspec,l3benchmark}
\ExplSyntaxOn
\cs_set_protected:Nn \__fontspec_select_font_family:nn
  {
    \group_begin:
\benchmark_tic:
\benchmark_tic:
    \__fontspec_font_suppress_not_found_error:
    \__fontspec_init:
    \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
    \tl_set_eq:NN \l__fontspec_fontname_up_tl \l_fontspec_fontname_tl
    \tl_set_eq:NN \l__fontspec_basename_tl    \l_fontspec_fontname_tl
    \__fontspec_if_detect_external:nT {#2}
     { \keys_set:nn {fontspec-preparse-external} {Path} }
    \keys_set_known:nn {fontspec-preparse-cfg} {#1}
    \__fontspec_init_ttc:n {#2}
    \__fontspec_load_external_fontoptions:N \l_fontspec_fontname_tl
    \__fontspec_extract_all_features:n {#1}
    \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
    \__fontspec_preparse_features:
    \__fontspec_load_font:
    \__fontspec_set_scriptlang:
    \__fontspec_get_features:n {}
    \bool_set_false:N \l__fontspec_firsttime_bool
\benchmark_toc:
    \__fontspec_save_family_needed:nTF {#2}
      {
        \__fontspec_save_family:nn {#1} {#2}
      }
      {
      }
\benchmark_toc:\pausenow
    \group_end:
    \tl_set_eq:NN \l_fontspec_family_tl \g__fontspec_nfss_family_tl
  }
\setmainfont{Times}
\begin{document}
hello
\end{document}

On my new-ish Mac mini, this gives:
(l3benchmark) + TIC
(l3benchmark) +-+ TIC
(l3benchmark) +-+ TOC: 0.0114 s
(l3benchmark) + TOC: 0.0205 s

Do you see a similar performance hit for the save_family block of code? I suspect this could be optimised as not a huge amount of information is needed to be stored per font.

Here is typical output on my very old harware. It appears my estimate current one is about 4X faster was not that far off!
For xelatex:
(l3benchmark) + TIC
(l3benchmark) +-+ TIC
(l3benchmark) +-+ TOC: 0.0446 s
(l3benchmark) + TOC: 0.0728 s

For lualatex:
(l3benchmark) + TIC
(l3benchmark) +-+ TIC

(l3benchmark) +-+ TOC: 0.0226 s
(l3benchmark) + TOC: 0.102 s

authors: jfbu wspr


text:
OOM during insertion

I think this simple insertions should complete without OOM but in my machine with 32GB mem the program is killed in 5 or 10 minutes. You will see the program is eating a lot of memory.
    let pool = sqlx::sqlite::SqlitePool::connect("mydb.db").await?;

    let N = 1_000_000;
    let mut ab_list = vec![];
    for i in 0..N {
        ab_list.push((i + 1, i + 1));
    }

    let timer = Instant::now();
    for f in 1..=100 {
        let mut trans = pool.begin().await?;
        let mut values = vec![];
        let mut q = "insert into mydb (a, b, c, d, e, f) values ".to_owned();
        for &(a, b) in &ab_list {
            let v = format!("({}, {}, 1, 1, 1.0, {})", a, b, f);
            values.push(v);
        }
        let values = values.join(",");
        q.push_str(&values);
        sqlx::query(&q).execute(&mut trans).await?;
        trans.commit().await?;
    }

Here is my reproducer. You can sh run.sh but may not reproduce if your machine has lot of RAM (>= 32GB).
https://github.com/akiradeveloper/sqlx-leak-repro
I think this is a bug because the same code with rusqlite 0.25 and 0.26 doesn't have the problem at all. With rusqlite, the memory usage is stable and low. I suspect memory leak with sqlx.
Also, I have noticed that there is a huge difference in terms of the performance characteristic between sqlx and rusqlite. In my env, sqlx version can complete with N=100000 but slower than rusqlite version like x2. Maybe, this is due to memory leak or lack of optimization in sqlite impl.

I see.
With persistent(false) OOM didn't happen but I want to disable all the caches in my program because memory leak is a serious problem for me.
How can I set persistent(false) with query_as?

repo: launchbadge/sqlx


text:
query_unchecked still checks input parameter types

Not sure whether query_as_unchecked! works for output types, but query_unchecked! and query_as_unchecked! seem to both still check input parameter types when they shouldn't be.

Probably its related to issue with Json<T>(T).
I think Json should work not only with output but with input too
let entity = ExampleEntity {
    json: Json(UserType {
        data: "data",
    }),
};
sqlx::query_unchecked!(
    r#"INSERT INTO example(json) VALUES($1)"#,
    entity.json,
)
.execute(self)
.await?;

expected enum `serde_json::value::Value`
found struct `sqlx_core::types::json::Json<UserType>`

I blame @mehcode: https://github.com/launchbadge/sqlx/commit/8d188c5f1a4904f5365781cc7cbd860dcadba401#diff-9e39697ecd9f5570bcf9a9ddc8489628L27
input.checked needs to be considered as part of this match.

authors: abonander jplatte olvyko


text:
fix(pool): always test connection on release to see if it's still viable

This should alleviate some issues WRT cancellation (cc #563) as connections in an inconsistent state should not be recycled by Pool.
SQLx-next (0.6) will address the cancellation issue by ensuring connections remember all relevant state in order to resume where they left off.

I am afraid this breaks some code. Specifically the usage of a sqlite pool will result in PoolTimedOut errors all over the place.

authors: abonander dignifiedquire


text:
fix: pool internals improvements

fix DecrementSizeGuard::drop() only waking one Waiter regardless of whether that waiter was already woken
fix connect-backoff loop giving up the size guard
don't cut in line to open a new connection
have tasks waiting on acquire() wake periodically to check if there's a connection in the queue

@dignifiedquire do you mind testing this?
Signed-off-by: Austin Bonander austin@launchbadge.com

Tested and this does fix the issues I am seeing on master for all my test cases 👍

Can this be released as SQLx 0.5.2? We just had our SQLx DB pool get stuck without any connections to give out yesterday, hoping this will ensure that doesn't happen again.

Yes. Planning to do that later today (merge in anything non-breaking and put out a 0.5.2).

authors: abonander dignifiedquire jplatte mehcode


text:
Improve CMake scripts & add CI

This PR brings the CMake scripts on par with the Makefiles and adds CI through GitHub Actions, for now Ubuntu only. Over time, the CI matrix can be extended to more variants along dimensions like operating system, compiler, dependency versions etc.
Note the CMake Find* modules were written according to https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#a-sample-find-module.
Also addresses https://github.com/laurencelundblade/t_cose/issues/37. Finding packages now relies on CMake's search logic, which can be influenced through command-line options.

Hi. Thanks for this! Any reason you prefer GHA over CircleCI or travis or such? I don't know much about these, but GHA seems OK because it is built in.
Note that I use https://github.com/laurencelundblade/tdv before I merge new changes. It's a bit complicated and takes a while to run.

GHA is (becoming) the de-facto standard for CI on GitHub. It provides lots of free parallel runners. And of course it has very tight integration, which is nice. I don't see a reason not to use it.
Regarding that other repo, over time those scripts should probably be moved into the t_cose repo so that they can be run easily locally and be integrated with CI. I don't think this has to happen in this PR though. Do you agree?

OK. Convinced about GHA.
When I look at the Actions tab on your repository there are failures. That doesn't seem right.
I certainly don't have any need to merge the tdv stuff in to GHA anytime soon (if ever). They are fairly complicated and take a while to run. I also don't want to burden the main repository with extra stuff for people that just want to use it as is.
Thank you!

Ah, sorry, you probably mean the MbedTLS 3.1 run. Yes, that's failing, and I marked it as an allowed failure so that the overall workflow doesn't fail. My assumption was that t_cose doesn't support MbedTLS 3.x yet and needs some code fixes first.
See this part in the CI yaml:
        - os-image: ubuntu-latest
          crypto-provider: MbedTLS
          mbedtls-version: v2.28.0

        - os-image: ubuntu-latest
          crypto-provider: MbedTLS
          mbedtls-version: v3.1.0
          allow-failure: true

OK. Got it on GHA.
On cmake, how does find_library() and such deal with incompatible version changes in the library? How can you find the version you need?  For example, what if you need a newer version of QCBOR. (I don't know much about cmake).
Appreciate you updating me on this. I want to understand things myself some before I merge.

In most cases, CMake relies on the user to provide libraries of the desired/correct version. If the Find* module is able to extract the package version (by somehow extracting it from a header file or similar -- not done in this PR), then find_package can be called with a list of acceptable exact versions, or a version range, and it will fail if the found version doesn't match what was requested. There are no multiple candidates here, the first found file with find_library / find_path is used.
There is an advanced mode of find_package called "Config mode" which requires that the dependency itself (e.g. QCBOR) provides CMake metadata including version information as part of its installation. Then, calling find_package with a version or version range iterates through all found CMake-enabled packages of the given name and invokes the package's version script to determine compatibility. If no sorting order is defined, then the first found package that claims compatibility is chosen. Otherwise, all are collected, sorted according to CMAKE_FIND_PACKAGE_SORT_ORDER, and the first one is picked.
I think investing effort in enabling the advanced mode is likely not worth the trouble, at least for now.
However, it would be nice for the QCBOR and MbedTLS Find* modules to extract the version so that t_cose could specify acceptable version ranges for them. I don't know if QCBOR has its own version anywhere in the installed files. For MbedTLS it is possible, see the code in https://github.com/ARMmbed/mbedtls/issues/298#issue-107570356. Before going through the trouble, it would be good to think through what the acceptable version ranges would be at this time. If there are no sensible ranges that make sense, then it's probably not worth doing.
Side note: There is no Find* module for OpenSSL in this PR since CMake ships with one out-of-the-box. See https://cmake.org/cmake/help/latest/module/FindOpenSSL.html.

authors: laurencelundblade letmaik


text:
FINAL BUDGET APP PROJECT

These are the features implemented in this project :

Set up login and user authentication using Devise gem.
Created migrations for Users, Categories, and Expenses and set up their foreign keys.
Created the User, Expense, and Category models and set up their associations.
Created User, Expense, and Category controllers and their methods.
Setup app resources routes
Validate all user data input using strong parameters and model validations.
Wrote unit and integration tests for User, Expense, and Category model methods, controllers, and view files.
Added styling following the design guideline.
Link to the deployed project version: LIVE LINK

Hi @lawrahkonwea ,
While you made a great effort in this project, unfortunately, I cannot proceed to review your code.
Invalid Code Review Request
You have submitted a PR which is closed.
Your Code Review Request will be marked as invalid in your Dashboard, so please submit a new one once you are ready 🙏
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

Invalid Code Review Request does not count into the code reviews limit.

authors: lawrahkonwea muneebulrehman


text:
Added hyperlinks to README badges

Added hyperlinks to badges on README, fixing #34
Signed-off-by: Leandro Trovões leandrotrovoes@hotmail.com

@LeTrovoes thanks again for this. We'd love to engage you more and have you join the community. Please do - http://slack.layer5.io

authors: LeTrovoes leecalcote


text:
[UI] Toster notification shows installed successfully when we delete a configuration in Management.

Description
When we delete a configuration in an adaptor using the :wastebasket: icon, upon successful deletion it shows [config] installed successfully
Expected Behavior

It should show [config] deleted successfully
Screenshots/Logs

Environment:

Meshery Version: 0.5.19
Kubernetes Version: 1.18
Host OS: ubuntu
Browser: Chrome

Contributor Resources:

(Contributing Docs](https://docs.meshery.io/project/contributing)

May I work on this issue ??

sure, @abhijeet007rocks8

@abhijeet007rocks8 Any blockers I can help you out with?

@abhijeet007rocks8 Any blockers I can help you out with?

Sir I am facing an issue to setup the backend server for meshery on local. I was not getting the meshes, to check the issue.
I joined slack and try to fix someone told me. If that does'nt work. I'll contact you.

Hello @dhruv0000, is this issue is still open? I wanted to work on this.

Sure @yash112-lang .

Sorry, for the delay but it was due to my exams, but now it's over so I will start working on this😀.

I am unable to locate the file from which this issue is happening if anyone helps me on which file I have to work on?

Hey @yash112-lang are you still working on this issue? There haven't been any updates from your side?

No updates @yash112-lang ?

@SirZeck I'm not working on this issue now. You can assign it to any other.

Sure @yash112-lang . You can go ahead and look for some other issue which you can work on. If you face any issue or have some doubt then ask in the slack channel after doing your homework though.

@dhruv0000 can i give it a try?


text:
fix(table): 修复表格列宽计算问题

😃 本次 PR 的变化性质

请至少勾选一项

[ ] 功能新增
[x] 问题修复
[ ] 功能优化
[ ] 分支合并
[ ] 其他改动：请在此处填写

🌱 本次 PR 的变化内容
移植了 #1726 一部分代码，原来的核心计算逻辑基本不变，需要拉取到本地测试

fix(table): 修复表格列宽计算问题
close #2185
https://stackblitz.com/edit/jpiw5g?file=index.js

✅ 本次 PR 的满足条件

请在申请合并之前，将符合条件的每一项进行勾选

[x] 已提供在线演示地址（如：codepen, stackblitz）或无需演示
[x] 已对每一项的改动均测试通过
[x] 已提供具体的变化内容说明

关闭了，因为这个 PR 超出 #2185 的范围了，由 #2203 解决。

重新打开，因为只有彻底解决列宽分配时的计算精度问题，才能修复 #2203，也能解决 #1726 中的部分遗留问题。

为晨星的工匠精神由衷感动！
2.x 早期为了兼容 IE， table 在实现左右固定列的时候，采用了一种特殊的重叠式的结构设计，这也是 table 许多地方需要手动计算的问题根源。而之所以没有再优化这一块：

一是当前右侧部分情况未铺满的瑕疵我认为勉强能够接受；
二是 3.0 完全可以采用 sticky 定位实现固定列，由于剔除了重叠结构，进而又可以采用 <colgroup> 原生分配列宽，这也就天然避免了当前的列宽分配、行高自适应等诸多细节问题。

我认为晨星可进一步斟酌：是否有必要耗费相对较大的精力去实现一个可能并没有那么重要的改进？ 因为在我看来，要做到列的完全水平铺满，不会很轻松，因为不同分辨率的显示器缩放后仍有差异。事实上 easyui 同样存在类似的问题。

如果只是为了规避右侧边框的间隙瑕疵，事实上还有个方案，给每行的 th: last-child, td: last-child 设置 border-right: none

为什么会有这个 PR
没有什么特别的原因，仅仅因为 #2185 标注了 good reproduction 标签，所以抽空优先处理一下。对于不符合规范的问题，看一眼都是浪费时间。
问题原因
#2185 的根本原因是，当前表格内部的列宽修补策略始终作用于最后一列，当最后一列隐藏时，修补的宽度将无法生效。给每行的最后一个单元格设置 border-right: none，存在同样的问题，即最后一列隐藏时无法生效。
最后一列隐藏时无法生效

行高亮和悬停背景色无法铺满行

其他情况表格右侧出现间隙，多是因为表格可分配宽度(cntrWidth)和边框(可能不是1) 的精度问题以及列宽向下取整带来的误差，这些误差累积起来，可能会不满足修补条件。
https://github.com/layui/layui/blob/f7df4ce82e19c4112bcd201cd165cbf8365d6f00/src/modules/table.js#L1008-L1012
解决方案
综上，这个 PR 使用 getComputedStyle 获取真实的像素宽度进行计算，并且将列宽修补策略改为作用于最后一个分配宽度的列，从而解决表格右侧未铺满的问题。
如果决定在 3.0 解决一些不太好处理的遗留问题，可以随时关闭这个 PR。

@Sight-wcg
赞，我还没有做详细的 review 及测试。
如果这个 PR 彻底解决了该问题，那就真的太好了，这是 table 多年来的一个痼疾，一度让我束手无策 😂

当前设置minWidth或者maxWidth无效。
解决方案：
918行
 var lastSpreadCol;
925行
 lastSpreadCol = item;
996行
 if (item3.colGroup || item3.hide || (lastSpreadCol && lastSpreadCol.key === item3.key)) return;
1031行
    // 最后一列获取剩余的空间，避免舍入导致的布局问题
    if (lastSpreadCol) {
      that.cssRules(lastSpreadCol.key, function (item) {
        var minWidth = lastSpreadCol.minWidth || options.cellMinWidth;
        var maxWidth = lastSpreadCol.maxWidth || options.cellMaxWidth;
        var newWidth = Math.max(Math.min(pixelsForLastCol, maxWidth), minWidth);
        item.style.width = newWidth + 'px';
      });
    }

经过测试，该 PR 基本解决了 table 顽固的列宽分配问题，95% 以上场景运行良好，之前列宽未铺满或出现横向滚动条的问题概率均明显减少。暂时发现的唯一瑕疵：部分宽度区间，点击分页存在横向滚动条闪屏现象，如下所示。
Demo.2024-09-23.19-06-51-768.mp4

部分宽度区间，点击分页存在横向滚动条闪屏现象

已修复。

95% 以上场景运行良好，之前列宽未铺满或出现横向滚动条的问题概率均明显减少

极少数仍有问题的场景，是否有办法稳定重现？也许可以尝试解决一下。

95% 是一个保守的说法，包含了前面提到的小瑕疵。刚才已对修复后的代码重新进行了测试，一切正常。
因此，实际上可能已经 100% 完美解决了该问题，晨星的这个 PR 分量十足！ 🎉❤
剩下的那些我们未能测试到的边缘，就交给用户去挖掘啦。

发现一处小瑕疵，table 初始渲染时（数据加载完毕之前），会出现大约超出 1px 宽度的横向滚动条。
https://github.com/user-attachments/assets/7f7ced90-68a7-4b3b-a1b9-ee591298f76e

发现一处小瑕疵，table 初始渲染时（数据加载完毕之前），会出现大约超出 1px 宽度的横向滚动条。
Demo.2024-09-25.12-47-23-196.mp4

发现一处小瑕疵，table 初始渲染时（数据加载完毕之前），会出现大约超出 1px 宽度的横向滚动条。
Demo.2024-09-25.12-47-23-196.mp4

由 #2250 解决

authors: Diyar-IT Sight-wcg sentsim

repo: layui/layui


text:
모바일에서 요일 줄안맞음

https://stackoverflow.com/questions/21955088/7-equal-columns-in-bootstrap

https://codepen.io/knitevision1/pen/BAFmk

repo: lazypic/kalena


text:
Remarques en vrac

Bonjour FX,
Voila quelques remarques à voir (ma faible contribution)  :

Export des csv avec un -delimiter ';' ==> cela permet d'editer et de convertir facilement le csv meme si celui-ci n'as pas vocation à etre editer.

Mettre a jour les exemples avec les bonnes commandes nom du script Monitor-ADGroupMembership et exemple AD-GROUP-Monitor_MemberShip.ps1

Passer en minuscule les balises de style declaré dans le $head et $head2

déclarer une classe (style) pour la balise p et enlever le style mis en direct dans le HTML

Sinon, Génial !! Je te félicite pour ce script que est MER VEIL LEUUUUXX !!!

Hehe merci du retour @Jireck-npds :smiley:

Sans problème Quand j'ai le temps j'attaque sérieusement le powershell mais j'ai moins de compétences.

Bonjour @lazywinadmin
Ne pourrait on pas faire ligne 318 :
`
[String]$EmailEncoding=[System.Text.Encoding]::Default.EncodingName,
`
Je pense que cela est plus portable si le encoding type n'est pas préciser...
Je vais tester cela

authors: Jireck-npds lazywinadmin

repo: lazywinadmin/Monitor-ADGroupMembership


text:
[WIP] Port estimatesmartfee from dcrd

Closing #17
Ported the fee estimator from DCRD, whose implementation is based on bitcoin core v0.14.
Lbrycrd (v0.17) includes the some improvement from bitcoin v0.15.
Test fixtures can't be reused, we need to manually / visually test against mainnet transaction flow.

Pull Request Test Coverage Report for Build 1773345745

12 of 55 (21.82%)  changed or added relevant lines in 4 files are covered.
10 unchanged lines in 4 files lost coverage.
Overall coverage decreased (-0.009%) to 51.81%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

mempool/mempool.go
6
9
66.67%

server.go
0
18
0.0%

rpcserver.go
0
22
0.0%

Files with Coverage Reduction
New Missed Lines
%

connmgr/connmanager.go
2
85.36%

mempool/mempool.go
2
66.79%

peer/peer.go
3
75.76%

server.go
3
0%

Totals

Change from base Build 1738560652:
-0.009%

Covered Lines:
22322

Relevant Lines:
43084

💛  - Coveralls

repo: lbryio/lbcd

license: ISC


text:
Handle duplicate claims on homepage

Various sections will have repeated claims - we should track which claims are shown and remove them via the UI.
This means we'll need to return more than just 4 or 8 claims on search - just return 20 each time, but show first 4 or 8 unique ones.

As part of this, it would also improve the experience where a user blocks a channel and only 7 are then displayed instead of 8.

see also https://github.com/lbryio/lbry-desktop/issues/3678

repo: lbryio/lbry-desktop


text:
fix overrideNative option for video-js

Explained here: https://github.com/lbryio/lbry-desktop/issues/5323#issuecomment-763983790
PR Checklist

Please check all that apply to this PR using "x":

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[x] I have checked that this PR does not introduce a breaking change
[ ] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes)
[ ] Documentation changes
[ ] Other - Please describe:

Fixes
Issue Number: https://github.com/lbryio/lbry-desktop/issues/5323
What is the current behavior?
true
What is the new behavior?
less true if IS_ANY_SAFARI browser.
Other information
All relevant info and discussion is linked in my comment here:
https://github.com/lbryio/lbry-desktop/issues/5323#issuecomment-763983790

nope, no way this broke a CI build. It's half a line of code,
Probably just need to rerun that test.

nope, no way this broke a CI build. It's half a line of code,
Probably just need to rerun that test.


text:
Support Android/Desktop option for release notes

As suggested in #251, the command is now used as !releasenotes android or !releasenotes desktop to show the corresponding notes.

@felhe, thanks for the PR!
Can we show you some appreciation for the contribution?
Also, we're giving away some Hacktoberfest bonuses and goodies for this month. We'll get it all figured out after you shoot us an email after this is reviewed/merged.

authors: felhe tzarebczan

repo: lbryio/lbry-wunderbot


text:
Composer: Remove lock file

Fixes #1.

Coverage remained the same at 100.0% when pulling dd8e04b1dc0e764127018ce32f97f2bd2d8507db on rm-lock into 41221935c0e9114797fbc498f57960beae799871 on master.

authors: coveralls davidstrauss

repo: lcache/lcache


text:
你好，为什么扫描二维码没有任何反应啊？

你好，我的测试设备是Iphone 6 系统是iOS 8.4 Xcode用的6.4 调成横屏可以扫描成功，你的demo真机也可以运行成功了，但是加入到我的测试项目中却报错了，截图给你看看！麻烦帮忙看一下怎么回事？

@zj0517 请问你是用什么设备测试的呢，还有系统

@zj0517 这句代码是写在设置完input和output之后吗？

是的啊，直接Copy你的demo代码，没有一点改动的，就是报错，目前还是没有解决！

@zj0517 能发个demo上来么

找到解决问题的办法了，是因为相机的访问权限没有判断，如果打开相机的访问权限一切都OK了！

@zj0517 好的，还有其他问题么

没有了，楼主加个相机的访问权限判断进去，不然像我这样小白看代码一模一样找了半天错误也不知道怎么回事，还有你的这个二维码做的不错！感谢你的分享！

repo: lcddhr/QRWeiXinDemo


text:
Neo4j error for query 4

Query 4 results in the following error message using Neo4j Enterprise Edition's pipelined and/or parallel runtimes. The exact runtime is unclear as I have trouble reproducing the bug.
The query is changed as follows:
CYPHER runtime=parallel
MATCH ...

Neo.DatabaseError.Statement.ExecutionFailed
Tried overwriting already taken variable name 'topForum1' as LongSlot(2,false,Node) (was: RefSlot(1,true,Any))

To test with different versions, navigate to the cypher directory and  run the following commands:
export SF=1
. scripts/use-datagen-data-set.sh
export NEO4J_VERSION=4.4.3-enterprise
scripts/load-in-one-step.sh
scripts/queries.sh

SF1 is required to trigger the error.
Using the most recent version, 4.4.11-enterprise makes the error go away.

Something is seriously wrong with the current formulation of Q4, it takes 19.6 hours for a single instance of it to run on a server with 8 vCPU cores.

Closing this because (1) the error can be worked around by using the latest version (4.4.11-enterprise); and (2) the new subquery-based formulation does not trigger this errors.


text:
KMS 사용해서 Cloud Storage 용 암호화 키 생성

Terraform에서는 tfstate 파일 자체를 암호화해서 보관 할 것을 권장하고 있음.

GCP 문서보고 간단하게 내용 숙지 후 정리하였음.
https://harmonious-lan-9d2.notion.site/GCP-KMS-cc9b611b88b74ebcb370ae91120b78c0


text:
🛑 Thonk Cloud is down

In 3eaf57e, Thonk Cloud (https://www.thonk.cloud) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Thonk Cloud is back up in 8abd964.

repo: le-server/thonk-upptime


text:
🛑 Thonk Cloud is down

In acab1e8, Thonk Cloud (https://www.thonk.cloud) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Thonk Cloud is back up in 345ff07.


text:
How to use this theme in Hosting sites ?

Sir i have bought paid hosting for 1 year... I uploaded all files in public html folder but when i am refreshing website nothing is shown up....... How to use this theme in cpanel based web hosting ?

You'll have to build it and upload the builded files

You have to use one of the ways to generate your sites (locally, our using docker / docker-compose).
When you have done that you just have to upload the /_site folder to your public html folder. It contains an index.html and every other generated asset.


text:
Added Urdu

Added Urdu

Updated Language Count


text:
Chore: First clarifications answers

As a Developer, to kickstart the development, I need to answer the questions below:

Which tech stack do you will use to the app?
Once React is a requirement, which approach do you use to kickstart the MVP?
Which approach do you use as a database?
In general, how MCC will look like?
How will you efficiently store the versions?
Will you store the whole instance or just delta? Why?
What parts will you test? How? Why?

Clarifications described on README of issue #2

repo: leandrocunha/bank-mcc


text:
Cannot leave fullscreen on windows

When calling windowManager.setFullScreen(false); the app stays in fullcreen.

This problem is fixed in #24, please update to 0.1.2.


text:
createSubWindow Function Windows Support

Are you planning to create multi window support for windows?

同问

The createSubWindow method is just an experimental method and will not support windows for the time being

You can try https://pub.dev/packages/desktop_multi_window


text:
Is there a similar client impletation for Lean 4?

I'm trying to work on a project with Lean 4, which requires communicating to lean4 process (maybe via LSP) and stands alone from vscode or web or React.
However, the current clients I've found in the project are somehow highly nested with those platforms and I've struggled but failed to pick them out.
So I'd like to ask if you have any suggestion of how to implement one like this in Lean 4 or instruction of extracting one from existing project?

This project isn't much more than a thin python wrapper around the Lean 3 JSON-based language server.  The most important thing it does is properly handle the async communication via the trio library.  (It also makes the API into some data classes, but that isn't necessary, nor is it perfect since, for example, the widgets API is not properly supported.)
Lean 4 has a similar JSON-based language server.  It wouldn't be hard for you to modify this code (forgetting about the tests and data classes) to use that language server.  (The Lean 4 language server is also an LSP server, so you may even be able to find an LSP Python client.)
Moreover, I'm not sure of your use case, but note that there are many ways to interact with Lean 4 from Python.  The language server is just one way.  You can also use Lean metaprogramming (the fastest way) or just call Lean from the command line (the simplest way). It might be worth having a discussion about your aims at leanprover.zulipchat.com

authors: LAWArthur jasonrute

repo: leanprover-community/lean-client-python


text:
chore(LapMatrix): golf, use *ᵥ notation, docs

bors merge

authors: fpvandoorn urkud


text:
chore: bump leantar 0.1.12

The latest version of leantar includes the following features and bug fixes:

An improved --help output
Faster performance on windows and slow networks by reducing the number of OS calls (see digama0/leangz#3)
Support for a new trace file format due to land in leanprover/lean4#4402 (see zulip discussion)

This is a backward compatible release, meaning that v0.1.12 can understand .ltar files produced by v0.1.11 and previous versions. So there should not be any hiccups during the transition period.

Looks good on master, still waiting for a build on lean-pr-testing-4402, and then we can merge.

bors merge


text:
feat: Lemmas specialised to piFinset fun _ : Fin n ↦ s

Those lemmas are specifically useful for rewriting backwards when the indexing type doesn't matter (and also sometimes useful forwardly).
From LeanAPAP

bors merge


text:
feat: ring-based prover for certain inequalities in semirings

This PR provides automation for proving certain kinds of inequalities in commutative semirings: goals of the form A ≤ B and A < B for which the ring-normal forms of A and B differ by a nonnegative (resp. positive) constant.
For example, ⊢ x + 3 + y < y + x + 4 is in scope because the normal forms of the LHS and RHS are, respectively, 3 + (x + y) and 4 + (x + y), which differ by a constant.
This automation is not intended to be user-facing.  Rather, it will serve as the discharger tactic for the linear_combination tactic on inequality goals.

bors r+


text:
feat: add isCompact_{quasi}spectrum for instances of the continuous functional calculus

We already have instances for CompactSpace, but it's handy to have these when you need to work with the sets themselves (e.g., to show that spectrum R a ∪ spectrum R b is compact).

bors r+

authors: dupuisf j-loreaux


text:
feat: s⁻¹.encard = s.encard

From Kneser (LeanCamCombi)

bors merge


text:
lower priority of Instance involving SMul and Subtype

Lower priority of instance IntermediateField.instSMulSubtypeMemOfAlgebra to 900.
Because it would cause trouble when synthesizing instance SMul K L where K < L are IntermediateField F E

The instance can be synthesized already. Can you check the impact of just removing it?

Let me have a try!

!bench

Those results are very strange. I'll look at the import graph next chance I get. Thanks!

!bench

bors merge

authors: Thmoas-Guan mattrobball


text:
chore: update std

This commit includes the new BitVec library in std.
No further changes are needed on the mathlib side.

[x] depends on: #7724

I think after #7724 lands it might be better to restart this from scratch

bors merge

authors: eric-wieser tobiasgrosser


text:
chore: Nsmul -> NSMul, Zpow -> ZPow, etc

Normalising to naming convention rule number 6.

Build fails at the Smul -> SMul commit...

I do not find any instances of Vadd. For vAdd, shouldn't there be parity with hSMul as an exception?

Currently there are some Set.vAddAssocClass that should be renamed to vadd like in Finset.vaddAssocClass. hVAdd should probably stay in parallel to hSMul.

authors: alreadydone winstonyin


text:
Show expected type if cursor is to the immediate right of a hole

Often I'll be in term mode, and I write something like fun x => _ with my cursor to the right of the hole, and I have to back up a character to see the expected type at the hole. Please could we change the behaviour of the infotree to give the hole info even if we are immediately after the hole? 🙂

This should be fixed in the termGoal request, not in the infotree, no? Analogously to https://github.com/leanprover/lean4/pull/1172.

Term goals use a different function though.

Term goals use a different function though.

Fixed

ha ha there was an unexpected change of behavior here that broke a vscode test: https://github.com/leanprover/lean4/issues/1262#event-6902216062
Namely cursor to the right of a list close bracket ["a", "b", "c", "d", "e"]| now says expected type "List String" whereas before it said nothing.  I still think this is a good fix though, goto-definition is now much improved, thanks.  I fixed the vscode test by adding a space at the end of the line after the list close bracket.

authors: EdAyers Kha gebner lovettchris


text:
fix: rw should not include existing goal metavariables in the resulting subgoals

closes #4381

In your fix, the otherMVarIds now come from heq, and this is created using let heq := mkAppN heq newMVars. But these newMVars are already taken into account in newMVarIds. And in the Iff case, we get let heq := mkApp3 (mkConst `propext) lhs rhs heq, so then we will suddenly get metavariables from lhs and rhs. Would it be better to define otherMVarIds to be the metavariables in the original heq that was passed as an argument to rewrite?

@semorrison Could you please take a look at the Mathlib failures?

@semorrison Could you please take a look at the Mathlib failures?

Looking now.

All the changes in Mathlib are positive! (I'm surprised more people weren't complaining about their goals being stolen!)

authors: JovanGerb leodemoura semorrison


text:
fix: report info trees on cmdline for .ileans

In #4976, I forgot that we do need info trees eventually on the cmdline for .ilean generation. Unfortunately, not reporting them incrementally would require an API change, so let's see what the impact of incremental reporting is

Merging as incrementally marking the environment as persistent is likely the way to go in any case. Further performance investigations pending.


text:
feat: change Array.set to take a Nat and a tactic provided bound

This PR changes the signature of Array.set to take a Nat, and a tactic-provided bound, rather than a Fin.
Corresponding changes (but without the auto-param) for Array.get will arrive shortly, after which I'll go more pervasively through the Array API.

Why?


text:
Suggestion : Raw label

Hi,
I think it is not possible to add a label containing html (some fa icon for example). We can do it in rows, using raw parameter, but not in labels, right ?
Well, that's a suggestion !
( Thanks for this project...! )

Yes, great idea - I'll add this on the next release (2.0.6). Currently, only the content can be set as raw html.

Thanks!
I have a lot more if you want :D

Yeah, keep em coming

authors: Nuranto leantony

repo: leantony/laravel-grid


text:
latest date is not accurate in nepali date picker instead of chaitra 24 its coming 25

latest date is not accurate in nepali date picker instead of chaitra 24 its coming 25

I am having same issue please fix this fast

Stale issue closing, new version 2.0.2 might fix this issue.

authors: mesaugat sauraab tohumanity

repo: leapfrogtechnology/nepali-date-picker


text:
Bloom Reader integration into the Kolibri Ecosystem

Overview
The Bloom Reader and associated BloomPub file format is a rich multimedia format for creating engaging reading experiences for early readers, with affordances such as integrated sign language 'read aloud' and verbal read aloud functionality.
The Bloom Library contains many books in the BloomPub format, translated into a huge range of languages, meaning that integrating this file format into our ecosystem would immediately unlock many resources for learners in many languages.
Contributors

Technical lead: @rtibbles
Individual contributors:
Other relevant LE team members: @jredrejo

Goals

[ ] Allow Kolibri to render BloomPub format books
[ ] Allow Kolibri Studio to import BloomPub format books in the user interface and via ricecooker
[ ] Create language specific channels of books from the Bloom Library

### High level tasks
- [ ] https://github.com/learningequality/le-utils/issues/124
- [ ] https://github.com/learningequality/kolibri/issues/12237
- [ ] https://github.com/learningequality/ricecooker/issues/501
- [ ] https://github.com/learningequality/studio/issues/4583
- [ ] https://github.com/learningequality/kolibri-library/issues/18
- [ ] https://github.com/learningequality/kolibri-library/issues/19

Will start with the task of Uploading BloomPub files to the studio, which will also require working add bloom pub in format presets in le-utils

Hi from the Bloom Team! It's great to see this work happening.
Here's a couple of notes as you embark on this.

When it comes to reading BloomPUB from other apps, the task is one of  Bloom Player integration, rather than Bloom Reader, which is just one of the existing apps that can play BloomPUBs.

BloomPUBs are ever-evolving; they aren't like ePUBs or PDFs where there is a long expensive process for proposing/accepting new features. Instead, we simply make the change and ship a new Bloom Player that supports it. Until Kolibri, all app-based consumers of Bloom Player have been either supported by the Bloom Team or another team within our organization, SIL. To support external use we need to up our game and make it easier to know what's coming so that you can ship new Bloom Players versions at the time that works well for you. For example we publish to npm, but there aren't github releases and the changelog.md has been ignored. We are currently heads-down releasing Bloom 5.6 and Bloom 6.0 beta, but we will schedule some maintenance on the library production side of this soon.

Another implication of our lightweight definition of the BloomPUB format as "whatever Bloom Player can handle", you'll want to avoid relying on anything in the format so that we don't accidentally break you. If you find a need to read something from the format, please let us know.

Feel free to reach out if you'd like to discuss anything.

authors: hatton nikkuAg rtibbles

repo: learningequality/kolibri-ecosystem


text:
Cloud definition

Word [REQUIRED]: vendor lockin
Content [REQUIRED]: Vendor lock-in refers to a situation where the cost of switching to a different vendor is so high that the customer is essentially stuck with the original vendor. Because of financial pressures, an insufficient workforce, or the need to avoid interruptions to business operations, the customer is "locked in" to what may be an inferior product or service.
Author Name [REQUIRED]: Luqmaan Hakeem
Author Link [REQUIRED]: The URL you want your name to link to.
Learn More URL [REQUIRED]: Page where people can visit to learn more about the word.
Category [REQUIRED, select one]: general, service , cloud

thank you! added :)

authors: madebygps rghdrizzle

repo: learntocloud/cloud-dictionary


text:
onChange event

It should provide an onChange event when the user changes the page index

Any news about this?

why not use onMomentumScrollEnd?

onMomentumScrollEnd is not reliable. I've got different values for current page index.

@getnashty I wanna second @itinance ... onMomentumScrollEnd is not reliable I get several calls with random indexes by just moving normal without any weird swipes.

@getnashty @itinance so I have found the problem .. is the loadMinimal prop, if is true onMomentumScrollEnd does crazy stuff.
So I'm gonna check if I have some time these days to checkout the source if I can find the problem

Any news on this?

@pjnovas loadMinimal is only causing an issue on Android for me. iOS works fine.

I would find this useful also. I have a slideshow with pictures + video and I would like the videos to play only when one becomes active, and pause if it leaves. Currently, the videos are always playing, and if one has sound you hear it multiple times.
An event that gets fired when the swipe animation starts and ends is necessary, i think. Just like how the ListView component dispatches an onChangeVisibleRows events while you scroll
I'm not sure if I can support slideshows of videos with audio in my application. Any help?

This should definitely be a feature, any technical reason it isn't?

authors: Jacse ddolheguy getnashty itinance nicotroia pjnovas sibelius superandrew213

repo: leecade/react-native-swiper


text:
What's the meaning of N(i) is the set of neighboring locations of i ?

In your paper,

Could you please elaborate it? What's the exact code of the searching region of N(i)?

This is the same with several papers: CNNMRF and Fast Patch-based Style Transfer of Arbitrary Style. The search region is the whole image except for the hole. In practice we fill in the hole with some initialization (like reflection based on the original image) and use the entire image as the search region. If you are talking about the code it is mrf.lua 118-182. (we filter the image with the patch weight and find the patch that gives largest response).

authors: LambdaWill leehomyc


text:
Come up with a way of chaining Resolvers

I think I have finally figured out why the use of both Resolvers and Type Converters seems confusing, and that's because we are using them for much the same things, it just depends in what phase of the converter cycle we need them to run at. Essentially what I think we need as a single concept that can be chained together in a given order, so, for example, you could say use UmbracoProperty to grab a specific property, but assuming that property returns IEnumberable but you only want the first item, you could then pass it through another resovler that can convert IEnumerable to a single item, but then maybe you want to convert that single item into something else so you'd want to chain another converter together.
I think if we could come up with a way of chaining attributes together (right now you can't really because the order isn't maintained) that this could become a single concept that can handle everything, cutting down on confusion.
Maybe if you just introduced an order property to all attributes, you could have something like
[UmbracoProperty(0, "Alias", Recursive = true)]
[DittoValueResolver(1, typeof(FirstItemResolver)]
[DittoValueResolver(2, typeof(MyValueConverter)]
public MyType Property {get; set;}

There is the potential issue of inheritance, but I say we could make attribute none inheritable so that if someone overrides "Property", they have to redefine how to get the value.
I'm not sure on naming convention here, ie, is a Resolver the right word now, but it's more about the idea of having a single strategy for doing multiple things during the conversion.
Matt

The concept is very much like Flow-based programming, so you use attributes to define single chunks of chain-able functionality
https://github.com/jpaulm/csharpfbp

Maybe these become "Processors", so each attribute runs a process that can return a value. The first is in the chain is always passed the current IPublishedContent, but the next is passed the result from the first 1 and so on until there are no processors left.

@mattbrailsford I like the idea, initially I was sceptical but I think if we can find a way to resolve (ha!) this confusion between TypeConverters & ValueResolvers. I understand the difference between the two but it seems ValueResolvers are far more mailable in how they can be used.
Not sure how I feel about an index value in constructor though. It should be fairly reasonable to assume first come first serve?
Not sure we'll avoid glossing over the usual TypeConverters vs ValueResolvers conversation though. ;)

If this worked, then it would essentially do away with resolvers/converters and we'd just have chainable processors.
I agree I'd rather not have the index value, but the problem is the CLR won't guarantee the order in which it retrieves attributes from a type so there would need to be an explicit declaration of the order.

Agreed this seems like the way to go. As I said on Twitter, ValueResolvers are far more practical as TypeConverters feel too ridged.

@mattbrailsford @jamiepollock I had a similar thought previously about the need for both and the confusion it brings.
It seems to me like a IDittoBuider and Middleware approach for value converting could be good, much like IAppBuilder. So create a DittoBuilder (Processor?) where you could register (builder.Use || builder.Run) a bunch of AppFunc = Func<DittoContext, Task> (or processor as Matt says), this could then be chained in a similar way that IAppBuider does to then call the next.Invoke(context). Meaning you can manage them async etc too.
Just thinking out loud here as this would obviously be a big change, just think this could a million times more flexible if chaining is a thing that is important to the future of the project. Would also mean all you have a single DittoBuider(or Processor?) attribute which consumes DittoMiddleware which can be chained?

Func Above got stripped for some reason, on iOS here.
Func<DittoContext, Task>

http://benfoster.io/blog/how-to-write-owin-middleware-in-5-different-steps
Some good reading on the pattern as to implementation.

@micklaw interesting approach. I assume that's more a fluent api style of configuration?
I've just done a PR which implemented processors as attributes like I mentioned previously, which seems to work. I've got all the existing tests passing, and changed one that was to do with type converters to prove that chaining would work.

@micklaw the middleware approach does look cool, I'm just not quite sure how we'd make it work. One of the nice things about the attribute based stuff is that it's right next to the property they effect, so it's very explicit and easy to follow what is going on, where as if the mapping happened elsewhere (possibly just within a map function on the model) it feels a bit more disjointed, and I'm not quite sure how we'd create reusable "processors"?

Yeah totally, so you could have a DittoProcessorAttribute which by default takes a Type[] 'middleware' (bad naming convention here) types and iterates them in sequence to create the pipeline for conversion. Or, you could create you own class inheriting from it where you can fluently create it, this could potentially be injectable by consumers of it (e.g. InsertType(int Index))?
That pull requests is huuuge, I get the gist of where you're going with it though, nice work dude, and think I'm def thinking along the same sort of lines. One concern for me would be the amount of annotations decorated on my POCOs, might end up a little messy if you have a few on each property, but that's probably more a cosmetic thing though would be interested to a see a performance benchmark against just doing this stuff in in Value resolver.
I'll give knocking up a demo of the DittoBuilder I was talking about with a mocked data set and put up a gist or something.

The only problem with passing types in attributes is you can't pass
configuration values such as those used on the Umbraco property attribute.

Look forward to seeing a poc though

Yeah totally, I think there is a trade off here between usability and implementation. The attribute approach doesn't seem very DRY to me, for example if use the same attribute setup a few times then I'm copying and pasting the same code, be a shame if used something 20+ times on a site and had t change code in 20+ places. Where if we create a it fluently with a BuilderAttribute then it can be passed params,  plus if this needs to be extened, then you could use methods on the Builder for InsertUseAt(int index, AppFunc),  InsertRunAt(int index, AppFunc), Remove(int index) .
Yeah, Ill crack on with a POC and send something on.

You can still register attributes globally if there is a common conversion
that should occur all the time for a given type. But otherwise I can't see
how either is less or more dry than the other, but as I say, happy to see
the alternative.

Ooh, wonder if I could use this to infer the order
https://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callerlinenumberattribute(v=vs.110).aspx

So that works. If I set the order param of the base DittoProcessorAttribute to optional, and use the [CallerLineNumber], it automatically injects the line number of the calling code, which is effectively the order in which you declare them, so in theory, you can do away with an explicit order param.
I've tested it with attributes on the same line, and it does give them different line numbers, so I'm guessing the number is based on the CLR code, not your actual .CS. I guess it's just a question of whether we are happy to rely on this?

Scratch that, if you use the same Attribute type multiple times on the same line, you get the same line number, so I guess that's not so good.
Good
[UmbracoPropertyProcessor]
[DittoProcessor(typeof(MyProcessor))]
[DittoProcessor(typeof(MyProcessor))]
public string MyProp { get; set; }
Bad
[UmbracoPropertyProcessor, DittoProcessor(typeof(MyProcessor))], DittoProcessor(typeof(MyProcessor))]
public string MyProp { get; set; }

Made a small tweak to my PR, you still need to set the order, but I've made it explicit, rather than an attribute constructor attribute, so you end up doing something like:
[UmbracoPropertyProcessor("Name", Order = 0),
    DittoProcessor(typeof(MyCustomProcessor2), Order = 1),
    DittoProcessor(typeof(MyCustomProcessor3), Order = 2)]
public MyCustomModel MyProperty { get; set; }

I think personally I'm pretty happy with this approach. The only other major difference (other than the order property), is just that anything that was a type converter before, would likely require you to use 2 processor attributes, ie the first to process the UmbracoProperty, then the second to do the conversion, but again, it's nice that it's explicit imo:
[UmbracoPropertyProcessor(Order = 0),
    DittoProcessor(typeof(MyCustomProcessor2), Order = 1)]
public MyCustomModel MyProperty { get; set; }

Cool example alert :) Imagine needing to have multiple fallbacks and a default value if no value is processed:
[UmbracoPropertyProcessor("Title", Order = 0),
    AltUmbracoPropertyProcessor("Heading", Order = 1),
    AltUmbracoPropertyProcessor("Name", Order = 2),
    DefaultValueProcessor("Default value", Order = 3)]
public string Title { get; set; }

Tada :)

To help keep things a bit more DRY, if you do end up running a bunch of processors all the time. You could just merge them into a single processor, but I've just created the concept of a DittoMultiProcessorAttribute that lets you define a single ProcessorAttribute which will run a bunch of processors all at once. This way you can just add your MultiProcessorAtribute on your property, and all the attributes declared in it will run, and in the order defined.
public class MyMultiProcessorAttribute : DittoMultiProcessorAttribute
{
    public MyMultiProcessorAttribute()
        : base(new[] {
                new DittoProcessorAttribute(typeof(MyCustomProcessor1)),
                new DittoProcessorAttribute(typeof(MyCustomProcessor2)),
                new DittoProcessorAttribute(typeof(MyCustomProcessor3))
        })
    { }
}

See unit tests here: https://github.com/leekelleher/umbraco-ditto/pull/143/files#diff-55

Thumbs up dude, that's a good solution to me. Does this mean that TypeConverters and ValueResolvers are no more? It would also be good to see some benchmarking on this in comparison to using a single value resolver doing the same task. Nice work man.

Correct yes. It would just be processors and that's it. Processors can
cover both tasks. Their job is just to process the passed in value with the
first in the chain being passed the content (though all processors can
access the content from the processor context object as well)
I'd imagine it's ever so slightly slower, but it should be negligible, but
yea, if we are happy with this as an approach, we can do some proper
benchmarking.

As we are in agreement about the need for this, I'm going to close this issue. The discussion of the actual implementation can continue on PR #143

@mattbrailsford Thanks for the multi-processor concept! Works nicely for some extra consolidation:
namespace Wiski.App.Mapping.Processors
{

    // Namespaces.
    using Our.Umbraco.Ditto;
    using System.Collections.Generic;

    /// <summary>
    /// This multi-processor combines the Archetype and DocTypeFactory processors to allow for
    /// both of those processors to be run with this single unified processor rather than
    /// having to specify the other two.
    /// </summary>
    /// <remarks>
    /// This can be used when you have an Umbraco property that is an Archetype that allows for
    /// multiple items and multiple fieldset types (e.g., a widget collection).
    /// </remarks>
    public class DittoMixedArchetypeAttribute : DittoMultiProcessorAttribute
    {

        #region Constructors

        /// <summary>
        /// Default constructor.
        /// </summary>
        public DittoMixedArchetypeAttribute() : base(GetProcessors())
        {
        }

        #endregion

        #region Methods

        /// <summary>
        /// Returns the processors that should be run whenever this multi-processor is used.
        /// </summary>
        /// <returns>
        /// The collection of processors to run.
        /// </returns>
        private static IEnumerable<DittoProcessorAttribute> GetProcessors()
        {
            return new DittoProcessorAttribute[]
            {
                // First, the Archetype processor converts the ArchetypeModel
                // to an IPublishedContent collection.
                new DittoArchetypeAttribute(),
                // Next, the DocType processor converts each item in the previously
                // created collection to a type that is indicated by the alias of the
                // item (since they were created from Archetypes, this alias corresponds
                // to the fieldset alias for each item).
                new DittoDocTypeFactoryAttribute()
            };
        }

        #endregion

    }

}

And here's how I'm using it:
namespace Wiski.App.Mapping.Models.Pages
{

    // Namespaces.
    using Interfaces;
    using Processors;
    using System.Collections.Generic;

    /// <summary>
    /// The typical page.
    /// </summary>
    public class Typical
    {
        [DittoMixedArchetype]
        public IEnumerable<IWidget> MainContent { get; set; }
    }

}

And for anybody who stumbles across this, here's where the DittoArchetypeAttribute is implemented: https://github.com/leekelleher/umbraco-ditto-labs/blob/7469acfbf9fab5f63cda1847aba9761fd978ffa3/src/Our.Umbraco.Ditto.Archetype/ComponentModel/Processors/DittoArchetypeAttribute.cs

authors: Nicholas-Westby jamiepollock mattbrailsford micklaw

repo: leekelleher/umbraco-ditto