text:
The post window didnot display in the main page

Hi, miguelgrinberg
After reading the chapter 11, I can add a post window in the main page, and I can comment.
But I didn't see it when I visit the main page.
This is my page:

I use chrome and IE(include edge), but the same result. And I also checked the chrome developer tools and didn't see any local file load error in the console.
Do you have any idea?
Thanks~

@Neroldy Sounds like the role/permission bits aren't correctly set for the user.

@miguelgrinberg
Thanks for you reply.
I set the confirmed = db.Column(db.Boolean, default=True), so that I can just register and do not need email confirmed because I can't use the gmail smtp. And use #login_manager.session_protection = 'strong'.
Can I simply skip the email confirmed? Or there are some role/permission bits operation after email confirmed?

@Neroldy the shortcut you are taking is not a problem. Check that the role_id in the user object is set to  non-zero value. Then check the role with id user.role_id and make sure it exists and has the permission bits to allow the user to write posts set.

@miguelgrinberg Thank you, I will try it~

@miguelgrinberg How can I create an Administrator account directly? I want to check whether this problem happen when user is Administrator.

@Neroldy First of all, check your roles table, it should look like this:
$ sqlite3 data-dev.sqlite
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> select * from roles;
1|Administrator|0|255
2|User|1|7
3|Moderator|0|15

In this example, the administrator role has id=1. So your administrator user needs to have role_id set to 1. You can convert any user to an admin by setting its role_id to 1.

@miguelgrinberg Thanks you, problem solved!

authors: Neroldy miguelgrinberg


text:
Option to save comicinfo/metadata and poster on the manga root folder.

Describe your suggested feature
Save the metadata and the poster in the manga's root folder, so that it is easier to import it to other services.
Source
├── Manga Name
│   ├── Chapter 1.cbz
│   ├── Chapter 2.cbz
│   ├── Chapter 3.cbz
│   ├── Poster.jpg
│   └── ComicInfo.xml
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 0.16.5.
[X] I will fill out all of the requested information in this form.

Totally agree! This allows for better portability of downloaded comics.
Especially going through the migration from Tachiyomi to Mihon. I have a large number of manga downloaded in Tachiyomi that are not recognized in Mihon. Although it can be read, the icon shows that it has not been downloaded, and there is no response when clicking the download icon.
A similar scenario also occurred when I changed to a new phone and I had to re-download all comics to ensure that the download icon was displayed correctly.

Totally agree! This allows for better portability of downloaded comics.
Especially going through the migration from Tachiyomi to Mihon. I have a large number of manga downloaded in Tachiyomi that are not recognized in Mihon. Although it can be read, the icon shows that it has not been downloaded, and there is no response when clicking the download icon.
A similar scenario also occurred when I changed to a new phone and I had to re-download all comics to ensure that the download icon was displayed correctly.

That wouldn't have been necessary, you could have just invalidated the download index from the advanced settings.

很需要这个，我有大量来自Manga Manager标注的漫画，mihon暂时还无法识别元数据分组，软件目前的本地功能还是有些羸弱

I agree, this would be a great feature to easily convert non-local series to local series.

source: gharchive/issue

authors: Comprehensive-Jason HamusutaW MajorTanya MrChuw XI-ryimi

repo: mihonapp/mihon

license_type: permissive

license_source: github-api


text:
Death image at README.md

Nothing critical; The Image that is embedded in the README.md is not longer available.

Thanks, fixed.

repo: mikar/blockify

license: mit

license_source: bigquery


text:
Use Blade Template as default?

@mikecao  Would you integrate the blade template language as the default template language engine? Just wondering if you would be open to the idea?
i have personally used the following within Flight for blade support which has been an amazing addition. => Ducan3D Blade

The default template in Flight is just plain PHP. That will always be the best default because it has no dependencies. But you can easily override the template engine to whatever you want. See the documentation example where it uses Smarty instead of the default.

authors: mikecao vishtany

repo: mikecao/flight


text:
Fix: Domain name regex accepts protocols on non-localhost domains

Fix the domain name regex:

Reject protocols on non-localhost domains (thanks @robsontenorio for finding this bug 🙏 )
Allow ports on non-localhost domains
Reject port numbers with leading zeros

You've got a point, ports are not actually a part of the domain name. I'll revert the change.
On that note: Should we still allow port on localhost?

While developing/test locally its pretty common to have http://localhost:8080 as target site.

While developing/test locally its pretty common to have http://localhost:8080 as target site.

That's true, testing referrals from another localhost service can be convenient. But maybe we should discuss naming and/or adding a hint, because people might get confused (adding noise in the issues). localhost is the domain name while protocol and port number are actually not part of it.

Enhancement: We could conditionally add an extra port input next to the domain input when domain name is equal to localhost.

Also a potential issue: the referrer table groups and displays referrers by their domain name - excluding port (see table and screenshot). So if we decide on keeping the port for localhost, this needs to be changed as well.
umami=# select referrer, count(*) y from pageview where website_id=2 and referrer not like '%localhost:3001%' group by 1 order by 2 desc;
        referrer        | y
------------------------+---
                        | 6
 http://localhost:3000/ | 2
 http://localhost:3002/ | 1
(3 rows)

Sorry for the wall of text 😅 @mikecao what do you think about this?

@gnarlex I don't think we need the port. The only time we really need the domain is

Filtering some metrics based on domain
Excluding referrers where the source is the same as the domain in the SQL query
Figuring out where to redirect the user when they click on Pages in the Realtime dashboard

So localhost should act as the domain name.
Also, we probably don't need to check the domain and send a bad request, which makes your PRs #506 and #508 not needed (sorry 😓). The only request that needs it is the query for referrers and it's probably better to simply do a join on the website table. I will explore this.
But the answer is we don't need the port.

Good point, the domain check is not really necessary (don't be sorry 😄)

Excluding referrers where the source is the same as the domain in the SQL query

I have two web apps running on localhost (port 3000 and 4000 respectively) and I want to track a referral - for debugging purposes - from one web app to another. That referral would then be filtered out, since they both have the same domain name (localhost). That - for me at least - would be unexpected behaviour.

Figuring out where to redirect the user when they click on Pages in the Realtime dashboard

In that case the port on localhost would actually be necessary:

Coming from another direction: What would be the downsides of keeping the localhost port?

@gnarlex I guess it does not hurt to allow port only for localhost. The only people that would care are developers like us 😄

source: gharchive/pull-request

authors: gnarlex mikecao robsontenorio

repo: mikecao/umami

license: MIT


text:
Plugin doesn't play nice with gatsby-remark-images or frontmatter File type fields.

When trying to use the plugin with image file types I get this error.
error Field "featuredImage" of type "File" must have a selection of subfields. Did you mean "featuredImage { ... }"?

I digged a little in the code and it's because getAvailableFrontmatterFields returns all the frontmatter fields which includes the ones set as File, which requires more parameters.
Solution would be to just ignore or query them the right way. I don't know if that's even possible I'm not very experienced in GraphQL.

Looking more into the code I'm not sure why it needs all the fields there. It doesn't seems to be used anywhere going down.

repo: mikefowler/gatsby-plugin-collections


text:
🛑 OMSF is down

In eef83fb, OMSF (https://www.omsf.io) was down:

HTTP code: 0
Response time: 0 ms

Resolved: OMSF is back up in 14b4e96 after 27 minutes.

repo: mikemhenry/website-uptime


text:
🛑 OMSF is down

In 864cd48, OMSF (https://www.omsf.io) was down:

HTTP code: 0
Response time: 0 ms

Resolved: OMSF is back up in 23adbef after 19 minutes.


text:
🛑 OMSF is down

In 4877f85, OMSF (https://www.omsf.io) was down:

HTTP code: 0
Response time: 0 ms

Resolved: OMSF is back up in 34b58dd after 9 minutes.


text:
Bug: DeleteAll ignores parameter tableName

Context
I have multiple tables using the same table structure. Thus I have only 1 c# class and try to use the tableName param to specify the table that I want to modify. The following code gives me an error whilst I expected it to work.
I am using Nuget 1.12.4 - net48
            using (var connection = CreateConnection())
            {
                connection.DeleteAll("MySpecificTable", new List<MyGenericTableClass> {new MyGenericTableClass(1)});
            }

Result
This results in an error: "There are no database fields found for table 'MyGenericTableClass'. Make sure that the target table 'MyGenericTableClass' is present in the database and/or atleast a single field is available."
Expected
No error and deletes uses the primary key of the MyGenericTableClass to delete an item from table 'MySpecificTable' where primary key is 1.
Guessed solution
Implementation is using
ClassProperty keyOrIdentityKey = DbConnectionExtension.GetAndGuardPrimaryKeyOrIdentityKey<TEntity>(connection, transaction);
which uses ClassMappedNameCache.Get<TEntity>() to retrieve 'tableName' instead of the parameter passed into the DeleteAll method, whilst an overload with explicit tableName is also available.
    internal static ClassProperty GetAndGuardPrimaryKeyOrIdentityKey<TEntity>(
      IDbConnection connection,
      string tableName,
      IDbTransaction transaction)
      where TEntity : class
    {
      return DbConnectionExtension.GetAndGuardPrimaryKeyOrIdentityKey(connection, tableName, transaction, typeof (TEntity));
    }

Hi @bobduncan , thank you for reporting this issue. We have tested your issue using the latest release version of RepoDB v1.12.5-beta3 and RepoDb.SqlServer v1.1.1 and it is happening there.
We also spent time investigating the issue and you are correct on pointing us to the correct fix. Many thanks for that! 👍
We would be very glad if you could contribute this fix towards this repository so your findings and recommendation will be recorded? Can you make a PR? We will then issue you the new beta (beta4) including this fix.
The fix must be applied here (sync) and here (async) by simply passing the tableName argument when calling the GetAndGuardPrimaryKeyOrIdentityKeyAsync method.
Please do not hesitate to revert if you cannot make the PR, we can always push the fix for you.

Hey @mikependon
Sorry for the delay. Here is the PR you requested including unit tests to verify that it worked.
https://github.com/mikependon/RepoDB/pull/649

The fix is now available at RepoDb v1.12.5-beta4.

Closing this ticket now. Thanks

authors: bobduncan mikependon

repo: mikependon/RepoDB


text:
bug: conflict with pocco81/auto-save.nvim yank triggers write

Result of discussion: https://github.com/mikesmithgh/kitty-scrollback.nvim/discussions/192
lazy.nvim setup:
return {
  'pocco81/auto-save.nvim',
  lazy = false,
  enabled = true,
  config = function()
    require('auto-save').setup()
  end,
}

Steps to reproduce:

open kitty-scrollback.nvim
yank text

Actual:

text is copied to "paste window"
auto-save.nvim triggers a write to try and autosave
write results in sending the contents of the "paste window" to kitty

Expected:

text is copied to "paste window"

Workaround:
Disable pocco81/auto-save.nvim

I created a Wiki page Recommended Configurations provide recommendations for plugins that may conflict with kitty-scrollback.nvim.
The recommend configuration for auto-save.nvim is:
Disable auto-save.nvim when kitty-scrollback.nvim is active.
require('auto-save').setup({
  enabled = vim.env.KITTY_SCROLLBACK_NVIM ~= 'true',
})

This lets you keep using auto-save.nvim in normal nvim sessions but disables it for kitty-scrollback.nvim sessions.
FYI @aksh1618

Disable auto-save.nvim when kitty-scrollback.nvim is active.

@mikesmithgh I had tried exactly that as my first step! But sadly it didn't work, so I decided to remove the plugin for now and file it under see later. It is now later, and I found out that this plugin doesn't read the config correctly (See https://github.com/pocco81/auto-save.nvim/issues/76) and there is another fork that is more maintained: https://github.com/okuuva/auto-save.nvim. So I switched to that one and it works!


text:
Add an example of how to configure the plugin in lua

Everything is great so far. But some keymap are either don't work or just a bad UX for me, so I tried to customize stuff. Unfortunately nothing works. And the most annoying part, that I think I did everything right, but there is no example that I can compare to or copy+paste to see if/how it works. There are only each and every part of a configuration spread across the readme file. That's why I spend about an hour trying many different way to configure the plugin through lazy.nvim opts or config and it just doesn't work.
And I'm supposed to be a "smart" guy after knowing how to do stuff in Lua, how lazy.nvim config spec works, configuring NvChad and generally feeling pretty good (not great) about knowing how to configure Neovim things in Lua. Sometimes I do skip something from the doc which has a plain answer, but I don't think this is the case (I hope so).
Here is what I consider the almost 100% correct config:
lazy.nvim
  {
    "mikesmithgh/kitty-scrollback.nvim",
    enabled = true,
    lazy = true,
    cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" },
    event = { "User KittyScrollbackLaunch" },
    version = "^2.0.0",
    config = function()
      require("kitty-scrollback").setup {
        custom = function()
          return {
            callbacks = {
              after_ready = function()
                vim.keymap.set("n", "q", ":q<CR>")
                vim.cmd [[quit]]
              end,
            },
          }
        end,
      }
    end,
  },

kitty.conf
allow_remote_control yes
listen_on unix:/tmp/kitty
shell_integration enabled
action_alias kitty_scrollback_nvim kitten ~/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
map kitty_mod+h kitty_scrollback_nvim --config custom
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
mouse_map kitty_mod+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output

This config should both add q keymap and exit nvim. Neither is done after Ctrl+Shift+h.

Hey thanks for the feedback, I am wondering if you may need to use the flag --no-nvim-args. I recently answered something similar here https://github.com/mikesmithgh/kitty-scrollback.nvim/discussions/48. I just gave this a quick read since I am away at the moment, I'll circle back and review with more details. I agree it is a lot of config and not quite obvious, I am trying to improve on that 👍

Yes, this did help. Thanks. But I again had to build my simple config like a constructor.
Now, the problem is that all the plugins and all the custom Lua configs are enabled. By default, it's all disabled. I would assume that there is a switch of some sort or a way of pasting some more configuration to disable other plugins or something. I didn't see this in the doc either.
So there should be 2 examples (or if they are similar, then only a small comment or note about the differences):

example how to make and apply/use custom config that will expand the default kitty-scrollback.nvim behavior
as above, but that will expand the configured nvim behavior (all custom settings/plugins enabled).

To give an idea, I want to add a couple of additional keymap to the default kitty-scrollback.nvim behavior + override/remove already set keymaps + I want to at least have move/jump plugins enabled (leap.nvim).

@Andrew15-5 gotcha, I have https://github.com/mikesmithgh/kitty-scrollback.nvim/issues/52 as well which sounds similar.
Right now, I am thinking of two approaches that could let you use a custom config specific to kitty-scrollback.nvim
--nvim-args -u .lua
action_alias kitty_scrollback_nvim kitten /Users/mike/gitrepos/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py --nvim-args -u /Users/mike/.config/nvim/ksb-init.lua

add you config to /Users/mike/.config/nvim/ksb-init.lua
this will only load what is defined in nvim/ksb-init.lua

or
NVIM_APPNAME
action_alias kitty_scrollback_nvim kitten /Users/mike/gitrepos/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py --env NVIM_APPNAME=nvim-ksb --no-nvim-args

add you config to /Users/mike/.config/nvim-ksb/init.lua
this will only load what is defined in nvim-ksb/init.lua

This way you can keep your kitty-scrollback.nvim separate from your normal nvim config.
I think this covers your first bullet.

example how to make and apply/use custom config that will expand the default kitty-scrollback.nvim behavior

For the second bullet,

as above, but that will expand the configured nvim behavior (all custom settings/plugins enabled

It would be something like
action_alias kitty_scrollback_nvim kitten /Users/mike/gitrepos/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py --config custom --no-nvim-args

and it would use the custom config defined in your setup like
return {
  {
    'mikesmithgh/kitty-scrollback.nvim',
    enabled = true,
    lazy = true,
    cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth', 'KittyScrollbackTest' },
    event = { 'User KittyScrollbackLaunch' },
    dev = true,
    -- version = '*', -- latest stable version, may have breaking changes if major version changed
    -- version = '^1.0.0', -- pin major version, include fixes and features that do not have breaking changes
    config = function()
      vim.g.mapleader = ' '
      vim.g.maplocalleader = ','
      require('kitty-scrollback').setup({
        custom = function()
          vim.print('customstuff')
        end,
      })
    end,
  },
}

Have you checked out the Advanced Configuration section on the Wiki? There is a lot of good stuff there, it just doesn't have a written explanation on each config yet.

Yeah, --no-nvim-args is super confusing. Like, why do I care if "some"/"any" args are passed to nvim or not (I just need everything to work, nothing else). If the args are invalid, then I would see an error. But since using or not using --no-nvim-args doesn't cause any error, then what's the point of it? At the very least, the naming is bad. Maybe if a user could understand immediately what it does and how to use it, then maybe it's fine. The amount of places where user need to add many different options (flags and/or configs) is honestly overwhelming. I'm amazed that in the end everything does work. I think I could help you with some documentation as a non-author user of the plugin.
I'll answer your questions later.

closed in favor of #69


text:
Setting limit while using findAndCount() always returns one result even if more are available

Describe the bug
Setting limit while using findAndCount always returns one result even if more are available.
To Reproduce
Steps to reproduce the behavior:
const [results, count]= await this.fooRepository.findAndCount(
      {
        $and: [{ organization: organization }, {}],
      },
      {
         limit: 5
      },
    );
console.log(results.length, count);

Output: 1 7
Generated SQL
select
    "r0" ."uuid",
    "r0" ."created_at",
    "r0" ."updated_at",
    "r0" ."deleted_at",
    "r0" ."slug",
    "r0" ."title",
    "r0" ."description",
    "r0" ."created_by_uuid",
    "r0" ."organization_uuid",
    "c1" ."uuid" as "c1__uuid",
    "c1" ."created_at" as "c1__created_at",
    "c1" ."updated_at" as "c1__updated_at",
    "c1" ."deleted_at" as "c1__deleted_at",
    "c1" ."body" as "c1__body",
    "c1" ."author_uuid" as "c1__author_uuid",
    "c1" ."target_uuid" as "c1__target_uuid",
    "s2" ."uuid" as "s2__uuid",
    "s2" ."created_at" as "s2__created_at",
    "s2" ."updated_at" as "s2__updated_at",
    "s2" ."deleted_at" as "s2__deleted_at",
    "s2" ."article_uuid" as "s2__article_uuid",
    "s2" ."order" as "s2__order",
    "s2" ."description" as "s2__description",
    "s2" ."title" as "s2__title"
from
    "article" as "r0"
    left join "comment" as "c1" on "r0" ."uuid" = "c1" ."target_uuid"
    left join "article_step" as "s2" on "r0" ."uuid" = "s2" ."article_uuid"
where
    "r0" ."organization_uuid" = '371245b2-e60d-401c-bcd0-b42860916a32'
limit
    5

Expected behavior
Limit should return up to 5 items if they are available not one.
Additional context
Removing limit returns all 8 results.
Versions

Dependency
Version

node
v16.13.1

typescript
"typescript": "^4.3.5"

mikro-orm
"@mikro-orm/core": "^5.0.3"

your-driver
"@mikro-orm/postgresql": "^5.0.3"

Please always upgrade to latest before filing issues, and note that you are supposed to say what exact versions are you using - so not a range, an exact version.
This has been fixed in v5.0.5.

I might be doing something wrong but I just upgraded to 5.0.5 and purged node_modules
select
    "r0" ."uuid",
    "r0" ."created_at",
    "r0" ."updated_at",
    "r0" ."deleted_at",
    "r0" ."slug",
    "r0" ."title",
    "r0" ."description",
    "r0" ."created_by_uuid",
    "r0" ."organization_uuid",
    "c1" ."uuid" as "c1__uuid",
    "c1" ."created_at" as "c1__created_at",
    "c1" ."updated_at" as "c1__updated_at",
    "c1" ."deleted_at" as "c1__deleted_at",
    "c1" ."body" as "c1__body",
    "c1" ."author_uuid" as "c1__author_uuid",
    "c1" ."target_uuid" as "c1__target_uuid",
    "s2" ."uuid" as "s2__uuid",
    "s2" ."created_at" as "s2__created_at",
    "s2" ."updated_at" as "s2__updated_at",
    "s2" ."deleted_at" as "s2__deleted_at",
    "s2" ."runbook_uuid" as "s2__runbook_uuid",
    "s2" ."order" as "s2__order",
    "s2" ."description" as "s2__description",
    "s2" ."title" as "s2__title"
from
    "runbook" as "r0"
    left join "comment" as "c1" on "r0" ."uuid" = "c1" ."target_uuid"
    left join "runbook_step" as "s2" on "r0" ."uuid" = "s2" ."runbook_uuid"
where
    "r0" ."organization_uuid" = '371245b2-e60d-401c-bcd0-b42860916a32'
limit
    10

I can see this query returning 10 of the same row with the same uuid
Versions

Dependency
Version

node
v16.13.1

typescript
4.6.2

mikro-orm
5.0.5

your-driver
5.0.5"

Can you try this?
const [results, count]= await this.fooRepository.findAndCount(
      {
        $and: [{ organization: organization }, {}],
      },
      {
         limit: 5,
         flags: [QueryFlag.PAGINATE],
      },
    );
console.log(results.length, count);

The query needs to be a subquery, which is what the paginate flag does. It should be applied automatically in latest version, but apparently only when using QB directly.

Yeah that works. Interesting. Thank you.

Ok let's reopen then, this should work automatically nowadays.

I have samo issue in version 6.3.13
const queryResult = await this.profileRepository
      .findAndCount(
        null,
        {
          limit: 10,
          offset: 0,
          disableIdentityMap: true,
          flags: [QueryFlag.PAGINATE],
        },
      );

sql:
select "p0".*
from "profile" as "p0"
where "p0"."id" in
  (select "p0"."id" from
      (select "p0"."id" from "profile" as "p0" group by "p0"."id" limit 10)
  as "p0")

Result:
0 = (1) [Profile] //expect to get 10 of total 11
1 = 11
length =2
[[Prototype]] =Array(0)
[[Prototype]] =Object

repo: mikro-orm/mikro-orm


text:
Entity Generator not generating 1:M relationship

Describe the bug
When generating the entities with the CLI, most are correct but one 1:M relationship isn't generated.
That relationship should be BNG -> IP_POOL (the inverse is generated).
Don't know if it's intended or not.
This is the ER diagram:

And this is the CLI dump:
import { Entity, PrimaryKey, Property, Unique } from '@mikro-orm/core';

@Entity()
export class SnmpGroup {

  @PrimaryKey()
  id!: number;

  @Unique({ name: 'snmp_group_UN' })
  @Property({ length: 100 })
  name!: string;

}

import { Entity, PrimaryKey, Property, Unique } from '@mikro-orm/core';

@Entity()
export class IpPoolType {

  @PrimaryKey()
  id!: number;

  @Unique({ name: 'name_UN' })
  @Property({ length: 100 })
  name!: string;

}

import { Collection, Entity, ManyToMany, ManyToOne, PrimaryKey, Property, Unique } from '@mikro-orm/core';
import { Brand } from './Brand';
import { SnmpGroup } from './SnmpGroup';

@Entity()
export class Bng {

  @PrimaryKey()
  id!: number;

  @ManyToOne({ entity: () => Brand, index: 'bng_FK' })
  brand!: Brand;

  @Unique({ name: 'code_UN' })
  @Property({ length: 100 })
  code!: string;

  @Unique({ name: 'name_UN' })
  @Property({ length: 100 })
  name!: string;

  @Unique({ name: 'admin_ip_UN' })
  @Property({ length: 100 })
  adminIp!: string;

  @ManyToMany({ entity: () => SnmpGroup, joinColumn: 'bng_id', inverseJoinColumn: 'snmp_group_id' })
  snmpGroup = new Collection<SnmpGroup>(this);

}

import { Entity, PrimaryKey, Property, Unique } from '@mikro-orm/core';

@Entity()
export class Brand {

  @PrimaryKey()
  id!: number;

  @Unique({ name: 'name_UN' })
  @Property({ length: 100 })
  name!: string;

}

import { Entity, ManyToOne, PrimaryKey, Property, Unique } from '@mikro-orm/core';
import { Bng } from './Bng';
import { IpPoolType } from './IpPoolType';

@Entity()
export class IpPool {

  @PrimaryKey()
  id!: number;

  @Unique({ name: 'ip_pool_range_UN' })
  @Property({ length: 50 })
  range!: string;

  @ManyToOne({ entity: () => Bng, index: 'ip_pool_FK' })
  bng!: Bng;

  @ManyToOne({ entity: () => IpPoolType, index: 'ip_pool_FK_1' })
  ipPoolType!: IpPoolType;

}

Expected behavior
Generate the OneToMany relationship in "Bng" class.
Versions
"@mikro-orm/core": "^5.1.5",
"@mikro-orm/mariadb": "^5.1.5",
"@mikro-orm/cli": "^5.1.5",
"@mikro-orm/entity-generator": "^5.1.5",

Dependency
Version

node
v16.15.1

typescript
4.4.4

mikro-orm
5.1.5

your-driver
5.1.5

This is expected behaviour, it never generates inverse sides of relations, only owning sides. I am not opposed by adding opt-in support for this, not sure if we should do it by default.

Oh, it was only weird to me because I didn't see it in the docs, but yes, could be a nice enhancement.
Thanks.


text:
Question: Watch mode

Hi @milesj !
While developing a library with Packemon, I was wondering if there was any watch mode available ?

@jon301 No plans for watch mode. Packemon was designed to be ran pre-publish. What is your use case?

I currently have a yarn v2 monorepo with a nextjs app and a library bundled with rollup. The latter is a dependency or the app.
During dev, I open 2 terminals and run both in watch mode. When a change occurs on the lib, the app detects it and rebuilds automatically.
Now I'd like to try to replace my custom rollup config with packemon, but I'd prefer not having to compromise the developer experience.

@jon301 Cool, not opposed to watch, just not sure when I'll get around to it. May have to roll my own implementation.

Started experimenting here https://github.com/milesj/packemon/pull/11

Added. Very basic now but can improve upon.

repo: milesj/packemon


text:
minor midi topics

midi_device.event = function(data)
local d = midi.to_msg(data)
if d.type == 'note_on' then
transpose = d.note - 60
end
end

I don't think we need this section anymore (Actually I don't think we ever did). It looks for a root note as midi input and then transposes everything accordingly.
I know you suggested adding a separate device for each track. I'm not sure I know that would work yet. And currently the MIDI channel is just assigned by track number (e.g. Track 1 = Channel 1, Track 2 = Channel 2, etc.). So until we implement something more complicated, should we comment out midi out device and midi out channel from the parameter menu? Right now, they don't do anything.

I commented out both these sections and nothing changed, so I'll make this change.

yeah that's right. your change starts the sequence on step 2, not step 1. You could argue that it doesn't matter, because all the steps are empty to start with, but I find that as inelegant as the original fix (starting on 16).
How about my other idea? We start with a variable that is one to start, but goes to zero after the first unpausing. But when it is equal to one, we keep the 16th LED dim so that nobody can see that we are starting with the 16th step.

Why did I use local_x instead of track? There must have been a reason, no?

Actually, I think I renamed it to 'local_x' because I was worried about it shadowing another 'x', but I wasn't entirely sure of it's function...

but I find that as inelegant as the original fix (starting on 16).

See #22, which might be a less-inelegant compromise :D

authors: millxing tildebyte

repo: millxing/QUENCE


text:
[Suggestion] Translate the alert section in monitor.md into CN.

Note: This repository is ONLY used to solve issues related to DOCS.
For other issues, please move to other repositories.

Is there anything that's missing or inappropriate in the docs? Please describe.
Describe what the problem is, and where is it. Ex. I think it's better to add/change [...] in [Install Milvus].
Describe your suggestion
A clear and concise description of what you want to change or add.
Additional reference
Provide any other reference docs or websites about your request.

PR#397

repo: milvus-io/milvus-docs


text:
Issue Title: I+D sobre como poder hacer las tablas más

Tarea completada con éxito

repo: mimorep/HowMuchIKnowFromYou


text:
Quartz执行updateJobCron出错

api-boot-starter-quartz
版本：2.1.4.RELEASE
Quartz执行updateJobCron出错，提示
(ApiBootQuartzServiceDefaultSupport.java:225)
org.quartz.impl.triggers.SimpleTriggerImpl cannot be cast to org.quartz.CronTrigger

@282919088 可以先去看下官网文档，http://apiboot.minbox.io/zh-cn/docs/api-boot-quartz.html ，如果问题还不能解决，麻烦把具体的控制台异常使用```形式贴出来

还是不可以，不知道是不是版本问题
2019-10-07 18:39:26.677 [http-nio-8080-exec-5] ERROR o.m.f.a.b.p.q.s.ApiBootQuartzServiceDefaultSupport - Update job cron error. java.lang.ClassCastException: org.quartz.impl.triggers.SimpleTriggerImpl cannot be cast to org.quartz.CronTrigger 	at org.minbox.framework.api.boot.plugin.quartz.support.ApiBootQuartzServiceDefaultSupport.updateJobCron(ApiBootQuartzServiceDefaultSupport.java:225) 	at com.nsc.boot.core.quartz.interfaces.JobInterfaces.updateJobCron(JobInterfaces.java:74)

@282919088 相同jobKey的任务是不是存在多个不同类型的？比如once、cron、loop三种类型的任务都是使用同样的jobKey？

@hengboy  是我的失误，Loop 类型的用updateJobCron去修改了，感谢你的解惑。

@282919088 不客气，有问题随时可以提交issues

repo: minbox-projects/api-boot


text:
Memory issue crnn

Bug description
Hello everyone
I am running this function called ocr_image :

with the model being  loaded with the following code (I use cpu) :
  `

    self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")

    det_model = db_resnet50(pretrained=False, pretrained_backbone=False)
    det_params = torch.load(path_model_detection, map_location=self.device)
    det_model.load_state_dict(det_params)
    reco_model = crnn_vgg16_bn(pretrained=False, pretrained_backbone=False)
    reco_params = torch.load(path_model_recognition, map_location=self.device)
    reco_model.load_state_dict(reco_params)

    self.model = ocr_predictor(
        det_arch=det_model,
        reco_arch=reco_model,
        pretrained=False,
        assume_straight_pages=True,
    ).to(self.device)

The memory is allocated in  the crnn class in the forward function when creating "features" (See line 223) ,
The memory  should be freed when we go outside  the local scope of the forward function, right ? :

The memory is never freed and running ocr_image multiple times results in a huge increase of ram usage.
Do someone have any insights on that ?
I am using last doctr main version and torch==1.12.0+cpu on Linux-5.15.0-58-generic-x86_64-with-glibc2.35
Code snippet to reproduce the bug
"""
Error traceback
"""
Environment
"""
Deep Learning backend
is_tf_available: False
is_torch_available: True

Hi @NikitaPomies :wave:,
Thanks for the report.
I was able to reproduce the behaviour and will open a PR to fix this soon. :+1:

Hi @NikitaPomies :wave:,
Thanks for the report.
I was able to reproduce the behaviour and will open a PR to fix this soon. :+1:

Thanks !
Just for the record,
I have been able to avoid the high memory usage by putting
ONEDNN_PRIMITIVE_CACHE_CAPACITY = 1
as suggested on https://github.com/pytorch/pytorch/issues/29893

Thanks for the response :+1:

repo: mindee/doctr


text:
How to mock a document reference?

First of all, thanks for taking the time to publish such a great solution to unit testing Firebase. This is a life-saver.
I'm trying to set up a collection with documents that look like the following:

I've gotten everything figured out except _gameRef and _trackRef, which point to other documents in the database.
I have the following code in my test:
      mocked.firestore().mocker.loadCollection('games', {
        gameOne: {
          color: 'red',
          friendlyId: 'gameOne',
          name: 'Game One',
          collections: {
            tracks: {
              trackOne: {
                name: 'Factory settings'
              }
            }
          }
        }
      });

      mocked.firestore().mocker.loadCollection('scores', {
        scoreOne: {
          _gameRef: 'games/gameOne',
          _trackRef: 'games/gameOne/tracks/trackOne',
          playerAlias: 'Steve Wiebe',
          finalScore: 1190400,
          platform: 'Arcade PCB',
          submittedAt: new MockTimestamp(123123123123, 0)
        }
      });

Obviously this doesn't work :-)
Is there a way to set up a document reference using the library?

I figured this out for anyone curious:
      mocked.firestore().mocker.loadCollection('games', {
        gameOne: {
          color: 'red',
          friendlyId: 'gameOne',
          name: 'Game One'
        },
        gameTwo: {
          color: 'blue',
          friendlyId: 'gameTwo',
          name: 'Game Two'
        }
      });

      mocked.firestore().mocker.loadCollection('games/gameOne/tracks', {
        trackOne: {
          name: 'Factory settings'
        }
      });

      mocked.firestore().mocker.loadCollection('games/gameTwo/tracks', {
        trackOne: {
          name: 'Factory settings'
        }
      });

      mocked.firestore().mocker.loadCollection('scores', {
        scoreOne: {
          _gameRef: mocked.firestore().doc('games/gameOne'),
          _trackRef: mocked.firestore().doc('games/gameOne/tracks/trackOne'),
          playerAlias: 'Steve Wiebe',
          finalScore: 1190400,
          platform: 'Arcade PCB',
          submittedAt: new MockTimestamp(123123123123, 0)
        },
        scoreTwo: {
          _gameRef: mocked.firestore().doc('games/gameTwo'),
          _trackRef: mocked.firestore().doc('games/gameTwo/tracks/trackOne'),
          playerAlias: 'Wes Copeland',
          finalScore: 1218000,
          platform: 'Arcade PCB',
          submittedAt: new MockTimestamp(123123123, 0)
        }
      });

repo: mindhivefi/ts-mock-firebase


text:
Responding With 422 Status Code

When the XSRF enabled, some create requests, such as project namespace, will fail to handle responding 422 status code.
Although it could be fixed by set XSRF disabled, still required to fix in the future.

Which beego version are you using?

Beego Version v1.12.3
Not Tested in Beego Version 2.x.x

这是开启了https配置导致的，改为false即可，这是个bug

authors: LawyZheng ProgressiveDevelop roberChen

repo: mindoc-org/mindoc


text:
能否新添加一个配置项，如果配置了，如果仅仅是调整目录顺序不更新修改日期

请按照一下格式提交issue，谢谢！

你当前使用的是哪个版本的 MinDoc(godoc_linux_amd64 version)?
mindoc_windows_amd64.2.2beta1

你当前使用的是什么操作系统?
windows2019

你是如何操作的？
我们逐渐积累的文档比较多,目录也是多级的，MinDoc没有地方让大家看更改日志，某些栏目是否有更新大家也不知道，我们自己用iframe 做了一个显示更改日志的页面（因为不熟悉go lang,用其它语言开发的页面），方便大家看最近的修改情况，看到感兴趣的修改可以直接点击查看，但是发现，如果仅仅是调整了文档目录树的顺序，所有的相关文档的修改日期都变了，这样大家就不知道具体改了什么，譬如下面，只是调整了一篇文章的顺序，下面的文章都显示更改了。

你期望得到什么结果?
能否新添加一个配置项，如果配置了，如果仅仅是调整目录顺序不更新修改日期。

当前遇到的是什么结果?

当然，系统能添加一个日志模块更改

不懂go语言，自己随便改了一下, 调整顺序时只更新数据库，不去修改更新时间，勉强可以用:
在 models/DocumentModel.go 添加了一个函数
``
// 更新排序 20241208 james
func (item *Document) UpateOrder(id int,OrderSort int,ParentId int) {
o := orm.NewOrm()
o.QueryTable(item.TableNameWithPrefix()).Filter("document_id", id).Update(orm.Params{
"order_sort": OrderSort,"parent_id":ParentId,
})
}
修改 BookController.go，SaveSort 函数，调用上面的函数


text:
多卡推理，生成配置文件出错

没有hccn_tool命令

您好，该代码仓为映射仓，可以去源码仓提问：https://gitee.com/mindspore/mindformers

repo: mindspore-lab/mindformers


text:
PXP-549: [API] Google Cloud Oauth2 does not have the resfresh token

Summary

Ticket: PXP-549
What's Changed

Fixed

[x] Add prompt=consent to the redirect url to obtain refresh token https://stackoverflow.com/a/65702100

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: jk-gan
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: jk-gan, onimsha
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

authors: jk-gan sauron-droid

repo: mindvalley/wukong-cli


text:
[FEATURE] 重新设置密码并失去焦点后不能查看重设的密码

修改密码时必须将input清空才出现小眼睛，希望可以通过小眼睛随时查看密码框的内容

这个用的 m-input，这个组件不打算做的很复杂，最小可用就OK了，如果需要特别功能。建议换成 el-input

repo: mineadmin/MineAdmin


text:
Create authorization server tests

Establish tests for the authorization server.

On section 4.1 of the RFC you can see the expected request and output for the authorization endpoint and the error messages to be displayed.
Requests for the authorization server not containing the scope parameter will result in the grant only allowing the user's identity and company to be identified.

On section 5 of the RFC you can see the expected request and output for the authorization endpoint and the error messages to be displayed.

I installed the dependencies and prepared the project.

repo: miniluz/AstronAuth


text:
Application does not have permission for this action

I get access token from: https://developers.facebook.com/tools/accesstoken
curl -G \
> -d "search_terms='california'" \
> -d "ad_type=POLITICAL_AND_ISSUE_ADS" \
> -d "ad_reached_countries=['US']" \
> -d "access_token=<>" \
> "https://graph.facebook.com/v7.0/ads_archive"

And I get the following error
{
    "error": {
        "message": "Application does not have permission for this action",
        "type": "OAuthException",
        "code": 10,
        "error_subcode": 2332002,
        "is_transient": false,
        "error_user_title": "Authorization and login needed",
        "error_user_msg": "To access the API, you'll need to follow the steps at facebook.com/ads/library/api.",
        "fbtrace_id": "AOxlW9wwYGgl5evOXSPcbiD"
    }
}

How do I solve this problem, please help me

You need to enter your authentication token in place of <>.
In order to do that you need to confirm your Facebook id first via facebook.com/id
You can refer to step 1 here:
https://www.facebook.com/ads/library/api

I get access token from: https://developers.facebook.com/tools/accesstoken
curl -G \
> -d "search_terms='california'" \
> -d "ad_type=POLITICAL_AND_ISSUE_ADS" \
> -d "ad_reached_countries=['US']" \
> -d "access_token=<>" \
> "https://graph.facebook.com/v7.0/ads_archive"

And I get the following error
{
    "error": {
        "message": "Application does not have permission for this action",
        "type": "OAuthException",
        "code": 10,
        "error_subcode": 2332002,
        "is_transient": false,
        "error_user_title": "Authorization and login needed",
        "error_user_msg": "To access the API, you'll need to follow the steps at facebook.com/ads/library/api.",
        "fbtrace_id": "AOxlW9wwYGgl5evOXSPcbiD"
    }
}

How do I solve this problem, please help me

We can't confirm your Facebook id first via facebook.com/id in VietNam. Poor you and me!

authors: khaitranvan96kt khanhnguyen paulwongx

repo: minimaxir/facebook-ad-library-scraper


text:
Add warning object

Trello
Add warning object
The Warning object will be used on the Pages Flow to warn the user if they do not have a CYA or a Confirmation page in the main flow.
The Warning object should always be on the top row, in the last column of the grid.
The Warning object should not be present in the unconnected pages section.
Version 2.13.0

great stuff, nat!
agree with @tomas-stefano about the naming of the methods. it is specifically about the CYA and Confirmation pages and not about generic pages

authors: brenetic njseeto

repo: ministryofjustice/fb-metadata-presenter


text:
SAA-1412 changes to support feature switched updates on the back of an offender merge event being intercepted

As it stands this only merges (replaces the old number with) the new prisoner number.  It does not replace the existing booking ID. I have been told on the back of an offender merge the existing booking ID is maintained and does not change but the prisoner number does.
Ideally going forwards we should seriously consider modelling a prisoner entity which should be associated with each affected entity. This way we would only have to deal with one single update to a prisoner entity instead of having to update all entities where a prisoner number is stored.  This should be done as a separate exercise, it is beyond the scope of this change at the moment.

Codecov Report
Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (b73ae09) 86.67% compared to head (a49527b) 86.70%.
Report is 1 commits behind head on main.

Files
Patch %
Lines

...vice/events/handlers/OffenderMergedEventHandler.kt
87.93%
0 Missing and 7 partials :warning:

...service/events/handlers/InterestingEventHandler.kt
33.33%
1 Missing and 1 partial :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #712      +/-   ##
============================================
+ Coverage     86.67%   86.70%   +0.02%
+ Complexity     3450     3446       -4
============================================
  Files           356      357       +1
  Lines         11738    11779      +41
  Branches        984      991       +7
============================================
+ Hits          10174    10213      +39
  Misses         1096     1096
- Partials        468      470       +2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: codecov-commenter matt-crowson-moj


text:
CCMSPUI-376: Migrate notification summary from SOA-API to EBS-API

As part of CBP-947, work was done to move the notification summary from SOA to EBS, which resulted in a new view XXCCMS_NOTIFICATION_COUNT_V being created to support this.
As part of this PR and CCMSPUI-376, the old method in SoaApiClient has been removed, and a new method has been added in EbsApiClient to use the new endpoint added as part of this PR:
https://github.com/ministryofjustice/laa-ccms-data-api/pull/119

The class NotificationSummary is still being used from the SOA gateway API rather than the new one generated in the EBS API so leaving this PR as a draft. It would for myself to first understand what the process for releasing new versions of APIs is before updating the versions within this project's build.gradle.

Are you able to amend the gradle build with the snapshot versions:
uk.gov.laa.ccms.data:data-api:0.0.21-9a44d8f-SNAPSHOT
uk.gov.laa.ccms.soa.gateway:soa-gateway-api:0.0.38-cfdf45d-SNAPSHOT
Usually do this, then once this is merged, a PR is auto raised for the release version for ebs-api and soa-api.

Are you able to amend the gradle build with the snapshot versions:
uk.gov.laa.ccms.data:data-api:0.0.21-9a44d8f-SNAPSHOT uk.gov.laa.ccms.soa.gateway:soa-gateway-api:0.0.38-cfdf45d-SNAPSHOT
Usually do this, then once this is merged, a PR is auto raised for the release version for ebs-api and soa-api.

@PhilDigitalJustice I have updated build.gradle properties to the published SNAPSHOT versions and updated references to NotificationSummary to the new EBS varient.

After requesting review, realised the integration tests were not working due to old Soa method not existing anymore. Took the time to remove this, and also add the EBS integration tests for the new NotificationSummary endpoint as this was missed off initially.

authors: JamieBriggs-MoJ PhilDigitalJustice

repo: ministryofjustice/laa-ccms-caab


text:
calculateSwapExactIn return wrong value

I use calculateSwapExactIn function to calculate amount out but it is returning different data than the interface.
Tried with the ADA/tMELD pair and it is displaying amount out correctly with the interface. But it doesn't need divide by 10^6
Where is it going wrong?
async function getPool(
  assetA: string,
  assetB: string
): Promise<PoolState | undefined> {
  for (let i = 1; ; i++) {
    const pools = await blockfrostAdapter.getPools({
      page: i,
    });
    if (pools.length === 0) {
      // last page
      break;
    }
    const pool = pools.find((p) => p.assetA === assetA && p.assetB === assetB);
    if (pool) {
      return pool;
    }
  }
  return;
}

async function main(): Promise<void> {
  {
    // tMELD/tMIN
    const pool = await getPool(
      "88dc7cd1c28d3a0c7ef4df99036c7c9688d309d91a1bb6fe4b08fee9744d454c44",
      "f6f49b186751e61f1fb8c64e7504e771f968cea9f4d11f5222b169e3744d494e"
    );
    if (pool) {
      const amountIn = 10_000_000n;
      const data = calculateSwapExactIn({
        amountIn,
        reserveIn: pool.reserveA,
        reserveOut: pool.reserveB,
      });
      const amountOut = new Big(data.amountOut.toString()).div(
        new Big(10).pow(6)
      );
      console.log("amountOutFull", data.amountOut.toString());
      console.log("amountOut", amountOut.toString());
      console.log("priceImpact", data.priceImpact.toString());
    }
  }
}

Output:
amountOutFull 907854
amountOut 0.907854
priceImpact 90.60331783793637772309

UI:

@kieutuan218 The Testnet Enviroment is quite different with the Mainnet. There's no Token Metadata, it means that all Token on the Testnet will have decimal zero as well (except ADA, we assume that ADA always has 6 decimals)
In that case, you are exchanging 10 tMELD to get around 9 tMIN, not 10_000_000 tMELD

1 Tip for it is we always show Invisible Token on the Swap page for zero decimals Tokens like the picture you provided above.

Thank you.
I have 1 more question. If I reverse swap tMIN -> tMELD, the parameters reserveIn, reserveOut, assetIn, assetOut will be reversed, right?
const data = calculateSwapExactIn({
    amountIn,
    reserveIn: pool.assetA === tMinAddress ? pool.reserveA : pool.reserveB,
    reserveOut: pool.assetB === tMeldAddress ? pool.reserveB : pool.reserveA,
});

@h2physics
Decimal = 0 then amount out is the same as UI but priceImpact is always different from UI
amountOut 9. amountOut 9
priceImpact 0.00099300609363561084

repo: minswap/sdk


text:
🛑 Matrix is down

In ef1137f, Matrix (https://matrix.mint.lgbt:8448/_matrix/federation/v1/version) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Matrix is back up in b31178f.

repo: mint-lgbt/status


text:
Allow volunteers to delete their position

Volunteers can stop sharing their position (so other volunteers will only see the last gathered position), but they should also be able to remove their geo data information.
Add a link somewhere in the geolocalization tool letting them delete this information.

Closed with #602

repo: minutis-redcall/app


text:
🌟 [FEATURE] Masking out some labels (e.g. constrained atoms)

BETA implemention on masks: https://github.com/mir-group/nequip/tree/masks/examples/mask_labels
See https://github.com/mir-group/nequip/discussions/240 for more discussion.

A related feature request would be to set custom weights per force component (e.g. as additional columns in an ASE .xyz dataset).
If I have structures where some atoms have very large forces I do not really care how accurate the trained model is on those large forces, only that they are "large", so it would be great to be able to give them a much smaller weight in the loss function.
This would be useful for example when adding short interatomic distances, or when breaking chemical bonds (i.e. far from equilibrium).

Hi @mhellstr ,
That would be something you'd implement as a custom loss function, see here:
https://github.com/mir-group/nequip-example-extension
You could either make a custom loss that directly depends on the force magnitude, or you could take a force_weights (or whatever) key from the data and use that to reweight the loss value. (In the second case, you'd just need to include the force_weights in the dataset as a custom field with include_keys)

Hi,
Super cool, I would love to also use this feature in my work!
Is it possible to also set the masked atom's atomic energy contribution to zero? Ideally I would like to keep the masked atoms in the structure to keep the local atomic environment of the relevant atoms intact, however I do not want them contributing to the ultimage energy of the structure.
I tried by including the value "atomic_energy" in the field fields_to_mask, but that didn't work, presumably because the training data only includes one scalar value for the total_energy.
Is there anyway around this?
Thanks!

authors: Linux-cpp-lisp Zausinator mhellstr

repo: mir-group/nequip


text:
Update to Cow > 2.2.0

See https://github.com/mirage/ocaml-cow/pull/99

Subsumed by #34

repo: mirage/cowabloga

license: ISC


text:
@embroider/macros causing builds to fail > v2.2

After upgrading our dependencies builds started crashing with the below error messages:
Build Error (broccoli-persistent-filter:Babel > [Babel: @embroider/macros]) in @embroider/macros/runtime.js

<snip>/@embroider/macros/runtime.js: The "path" argument must be of type string. Received an instance of Object

and
Build Error (broccoli-persistent-filter:Babel > [Babel: @embroider/macros]) in @embroider/macros/runtime.js

<snip>/@embroider/macros/runtime.js: @babel/template placeholder "1000": Expected string substitution

Our investigation lead us to the bump from mirage version 2.2 to 2.4, by locking it to 2.2 builds weren't crashing anymore (2.3 is confirmed to also crash).
I tried reproducing the error in a standalone app but couldn't get it to crash. My guess it has something to do with dependencies from different addons on different versions of the same package (I noticed ember-power-select also has a dependency on @embroider/macros in our app, but that was not causing the issue).
Nevertheless, the issue stands, perhaps someone can find this with similar problems, and we can narrow it down even further.

I tried reproducing the error in a standalone app but couldn't get it to crash.

I guess this resurface some issues that exist in older @embroider/macros version ember-cli-mirage > v2.2
is using.
The problem with bumping @embroider/macros is that it requires Node.js 12+ and ember-cli-mirage v2 supports Node.js 10.
Upgrading @embroider/macros to 1.0.0 would be a breaking change as it would ultimately require Node.js 12+.
I would to try ember-cli-mirage@v3.0.0-alpha.1 as it upgrades @embroider/macros and should be pretty stable (although you should update all the import paths remove in #2314).
Another option is to use resolutions and enforce @embroider/macros@^1.0.0.
I'm hesitant to bump @embroider/macros to v1 in ember-cli-mirage as it's breaking change.
Another option to move forward is to release stable v3 with @embroider/macros@1.0.0 and rollback #2297 in v2 (which is not great option as well IMO).
Ultimately and unfortunately, issues is not in ember-cli-mirage but in older version of @embroider/macros used in v2.

I'm up for bumping to v3.0.0-alpha.1, but how do import paths need to be updated? Currently having imports like this:
import { Request, Response } from "miragejs";
import { Server } from "miragejs/server";

Cheers for the response.

We are also talking about the imports in your mirage models, adapters, etc
For example: many people have
import { Model, belongsTo } from 'ember-cli-mirage';

which should be changed to
import { Model, belongsTo } from 'miragejs';

Anything that was extracted to MirageJS (almost everything) should be imported frommiragejs
The things left that ember-cli-mirage exports is setupMirage and things used in defining the server as below.
Previously your routes were the only thing defined in the config.js, now your config.js should look like this
import {
  discoverEmberDataModels,
} from 'ember-cli-mirage';
import { createServer } from 'miragejs';

export default function (config) {
  let finalConfig = {
    ...config,
    models: { ...discoverEmberDataModels(), ...config.models },
    routes,
  };

  return createServer(finalConfig);
}

function routes() {
// define your routes here
}

This now makes our definition of a server look like MirageJS documentation.

v3.0.0-alpha.1 still supports the routes only config, but deprecated, will be releasing an alpha.2 that removes that soon

v3 isn't working for me.
Can't even get ember-cli to build.
Build Error (broccoli-persistent-filter:Babel > [Babel: @embroider/macros]) in @embroider/macros/runtime.js

<snip>/@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution

stack:
(node:349084) UnhandledPromiseRejectionWarning: Error: @babel/template placeholder "APP": Expected string substitution
    at applyReplacement (<snip>/node_modules/@babel/template/lib/populate.js:74:13)
    at <snip>/node_modules/@babel/template/lib/populate.js:44:7
    at Array.forEach (<anonymous>)
    at populatePlaceholders (<snip>/node_modules/@babel/template/lib/populate.js:42:43)
    at <snip>/node_modules/@babel/template/lib/string.js:20:51
    at <snip>/node_modules/@babel/template/lib/builder.js:75:14
    at Object.buildLiterals (<snip>/node_modules/ember-element-helper/node_modules/@embroider/macros/src/babel/evaluate-json.js:377:73)
    at Object.inlineRuntimeConfig (<snip>/node_modules/ember-element-helper/node_modules/@embroider/macros/src/babel/get-config.js:107:55)
    at PluginPass.enter (<snip>/node_modules/ember-element-helper/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:77:38)
    at newFn (<snip>/node_modules/@babel/traverse/lib/visitors.js:177:21)
    =============
    at Object.buildLiterals (<snip>/node_modules/ember-element-helper/node_modules/@embroider/macros/src/babel/evaluate-json.js:377:34)
    at Object.inlineRuntimeConfig (<snip>/node_modules/ember-element-helper/node_modules/@embroider/macros/src/babel/get-config.js:107:55)
    at PluginPass.enter (<snip>/node_modules/ember-element-helper/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:77:38)
    at newFn (<snip>/node_modules/@babel/traverse/lib/visitors.js:177:21)
    at NodePath._call (<snip>/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (<snip>/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (<snip>/node_modules/@babel/traverse/lib/path/context.js:100:31)
    at TraversalContext.visitQueue (<snip>/node_modules/@babel/traverse/lib/context.js:103:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:349084) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:349084) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Interestingly I get that same error when I try to update ember font-awesome and staying on ember-cli-mirage 2.4. I had thought it was a font-awesome problems.
Could be another embroider migration problem.
If your app using auto-import V1 or V2?
Feel a lot of addons are probably encountering these mirgration issues
From: PJ Carly @.>
Date: Thursday, February 3, 2022 at 6:32 AM
To: miragejs/ember-cli-mirage @.>
Cc: Gantzler, Brian @.>, Comment @.>
Subject: Re: [miragejs/ember-cli-mirage] @embroider/macros causing builds to fail > v2.2 (Issue #2343)
    External Email – Please use caution before opening attachments or clicking links

v3 isn't working for me.
Can't even get ember-cli to build.
Build Error (broccoli-persistent-filter:Babel > [Babel: @embroider/macros]) in @embroider/macros/runtime.js
@.***/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution
stack:
(node:349084) UnhandledPromiseRejectionWarning: Error: @babel/template placeholder "APP": Expected string substitution
at applyReplacement ***@***.***/template/lib/populate.js:74:13)

at ***@***.***/template/lib/populate.js:44:7

at Array.forEach (<anonymous>)

at populatePlaceholders ***@***.***/template/lib/populate.js:42:43)

at ***@***.***/template/lib/string.js:20:51

at ***@***.***/template/lib/builder.js:75:14

at Object.buildLiterals ***@***.***/macros/src/babel/evaluate-json.js:377:73)

at Object.inlineRuntimeConfig ***@***.***/macros/src/babel/get-config.js:107:55)

at PluginPass.enter ***@***.***/macros/src/babel/macros-babel-plugin.js:77:38)

at newFn ***@***.***/traverse/lib/visitors.js:177:21)

=============

at Object.buildLiterals ***@***.***/macros/src/babel/evaluate-json.js:377:34)

at Object.inlineRuntimeConfig ***@***.***/macros/src/babel/get-config.js:107:55)

at PluginPass.enter ***@***.***/macros/src/babel/macros-babel-plugin.js:77:38)

at newFn ***@***.***/traverse/lib/visitors.js:177:21)

at NodePath._call ***@***.***/traverse/lib/path/context.js:53:20)

at NodePath.call ***@***.***/traverse/lib/path/context.js:40:17)

at NodePath.visit ***@***.***/traverse/lib/path/context.js:100:31)

at TraversalContext.visitQueue ***@***.***/traverse/lib/context.js:103:16)

(Use node --trace-warnings ... to show where the warning was created)
(node:349084) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:349084) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
—
Reply to this email directly, view it on GitHubhttps://github.com/miragejs/ember-cli-mirage/issues/2343#issuecomment-1028899450, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AALVLRQ5VO72MNN4AARZCK3UZJRUTANCNFSM5M2XSMRQ.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>

This message is for the designated recipient only and may contain privileged, proprietary
or otherwise private information. If you have received it in error, please notify the sender
immediately and delete the original. Any other use of the email by you is prohibited.
Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Chinese
Svenska: http://www.cardinalhealth.com/en/support/terms-and-conditions-english.html

using ember-auto-import v2 in my dependencies however there is still a v1 present in my lock file (from ember-intl).

using ember-auto-import v2 in my dependencies however there is still a v1 present in my lock file (from ember-intl).

@pjcarly could you please check if it's EAI 1.12+ as it has @embroider/* in dependencies.
Regarding /@embroider/macros/runtime.js: @babel/template placeholder "APP": Expected string substitution
this issue happens when you have outdated @embroider/* packages somewhere in transitive dependencies.
Can you try to re-roll your lock file to get latest deps?
If issue persists with v3, then there is some another dependency that may need a bump to use v1 of @embroider/* across the board

ember-auto-import v1 is resolved to v1.12.1. (coming from dependency ember-intl v6.0.0-beta.3)
After further investigation it seems that there are still @embroider/* dependencies under v1 (coming from ember-power-select and ember-basic-dropdown.
However the weird thing is, that everything is building just fine (with EPS and EBD), as long as ember-cli-mirage isn't added to the dependencies
¯_(ツ)_/¯

We're running into this same issue with our applications when trying out the v3-alpha release. I've tried forcing an @embroider/macros resolution in both directions (down to 0.50.x and up to 1.x) and neither is compatible.
If ember-cli-mirage releases a breaking v3 that requires @embroider/macros@1.x, then it seems that it's going to be a huge blocker to adoption. Maybe consider keeping @embroider/macros@0.50.x until there's a clear upgrade path that doesn't break everyone's builds?

This is an issue everyone is having. It shows different error messages but it is the same error. Please see https://github.com/FortAwesome/ember-fontawesome/issues/194 and https://github.com/embroider-build/embroider/issues/1077
The second link thinks that the error actually happened with .41 of macros (and not sure why it didnt start being an issue til .50)
This issue states the problem happened in this repo on version 2.3 Looking at the yarn lock of 2.3 we included .41 of macros. https://github.com/miragejs/ember-cli-mirage/blob/v2.3.0/yarn.lock#L1821 It was updated as a result of updating the package.json. If this was the catalyst, its still pre .50.  Would have to test a failing build with a fork of 2.3 and revert macros back to .40
I personally am using ember-cli-mirage 2.4 and not having the issue, but thats not the case for the person who opened the issue. Im currently fighting this exact issue, but with the update to ember-fontawesome.
Much like the ember-cli-babel 7.26 issue, It would seem the way forward is to get every addon to update to macros 1.0 as soon as possible.
Im really looking to embroider/macros to tell what what the way forward is.

@cah-briangantzler My point is that ember-cli-mirage opted into forcing this issue by upgrading the @embroider/macros dependency when it worked fine before as it was. If that upgrade is rolled back, it could open the door to many more people opting into the 3.0-alpha series and being able to provide feedback on the changes the addon is making itself.
I agree that this is on @embroider/macros to provide a path forward, but ember-cli-mirage isn't required to force the pain point in the meantime by upgrading that dependency.

@kpfefferle @cah-briangantzler more thinking of this, more I convinced we should rollback @embroider/macros in v2 to not cause churn for people with < 1.0.0 version we use in ember-cli-mirage@2.
I'll open PR once have a chance and release patch release v2.4.1 without @embroider/macros.
ember-cli-mirage@3 will stay on @embroider/macros@1.
Note that we can't use @embroider/macros@1 in ember-cli-mirage@2 due to Node.js version requirements.

For anyone else struggling with this, I was able to get things working by forcing @embroider/macros to resolve to a single version in my package.json:
// package.json
{
  // ...
  "resolutions": {
    "@embroider/macros": "1.2.0"
  },
  // ...
}

This seems to work with a wide range of @embroider/macros versions in my app as long as I rm -rf node_modules before yarn install to ensure conflicting versions are not hanging around and causing issues.

@SergeAstapov if you are rolling back macros in V2 (and I think you should), I would stick with .40 as that was in 2.2 and people are reporting when we went to .41 in 2.3 is started causing issues
@kpfefferle I had tried this for my upgrading to ember-fontawesome and it did not work for me. However macros was at 1.0.1 at the time. Perhaps 1.2 has fixed the issue, will try it again.

@kpfefferle I tried the resolutions again and this time it worked. I think I neglected to do the rm -rf node_modules last time. Thanks for the tip.

Honestly. I don't understand anything about embroider/macros and how it is causing the issues.
I have many years of Ember experience, but this is a complete mystery to me. Is there any documentation I can read up on to get a better understanding?

I've just run into this both when installing ember-cli-mirage in a fresh 4.2.0 project, and when installing the latest ember-fontawesome.
Is there any path forward without requiring npm-force-resolutions?

fwiw I got past the ember-fontawesome issue by removing regex from fastboot hostwhitelist per https://github.com/ember-fastboot/ember-cli-fastboot/issues/889

For anyone visiting this issue, I was having the reported issue with a fresh new project using Node 20.5.1, Ember 5.3.0, and ember-cli-mirage 2.4.0:
$ ember new mwe
$ cd mwe
$ ember install ember-cli-mirage
$ ember serve

Upgrade ember-cli-mirage to 3.0.0-alpha resolved the issue.

Upgraded from 2.1.0 (I had this problem in 2.2.0) to 3.0.0 and it works to me (https://www.ember-cli-mirage.com/docs/getting-started/upgrade-guide#3-0-upgrade-guide)

Path forward for anyone having such issue - upgrade to v3.

authors: SergeAstapov cah-briangantzler hoIIer kpfefferle olenderhub pjcarly rgaiacs

repo: miragejs/ember-cli-mirage


text:
No appropriate version found

Summary
When trying to install on IOS I get this error message
Steps to reproduce
No response
Obsidian info
Trying to install Homepage version 2.7.3 fails with the error message: "No appropriate version found"
Obsidian version
Obsidian version 1.4.1 (83) API v1.0.3.
Checklist

[X] I updated to the latest version of the plugin.

Thanks for letting me know, should be fixed in 482884065fd1cfdb7d8b70f30a02e880adba87cf

authors: maakbaas mirnovov

repo: mirnovov/obsidian-homepage


text:
Refactor Gift Card List Top Alert

I want to merge this change because... it refactors Gift Card List Top Alert.

PR intended to be tested with API branch:  feature/gift-cards-2
Screenshots

Pull Request Checklist

[ ] This code contains UI changes
[ ] All visible strings are translated with proper context including data-formatting
[ ] Attributes [data-test-id] are added for new elements
[ ] Changes are mentioned in the changelog
[ ] The changes are tested in different browsers and in light/dark mode

Test environment config

API_URI=https://feature-gift-cards-mvp.api.saleor.rocks/graphql/

Task linked: SALEOR-4383 Refactor Gift Card List Top Alert

authors: orzechdev patrys

repo: mirumee/saleor-dashboard


text:
Can't create product

The product can not be added, no errors in console.

Hi @maltitco,
Thanks for reporting! This one was freshly merged, must overlook something.

repo: mirumee/saleor


text:
Feature/email improvement

Using different email in the case of order, payment and refund is common.
I mostly use DEFAULT_FROM_EMAIL  for subscription email.
This way, if the users can also add ORDER_FROM_EMAIL if it's necessary.

[Current coverage][cc-pull] is 49.88%

Merging [#528][cc-pull] into [master][cc-base-branch] will decrease coverage by <.01%

@@             master       #528   diff @@
==========================================
  Files            90         90
  Lines          4147       4142     -5
  Methods           0          0
  Messages          0          0
  Branches        430        430
==========================================
- Hits           2071       2066     -5
  Misses         2019       2019
  Partials         57         57

Powered by Codecov. Last updated by [c621a1b...f38e579][cc-compare]
[cc-base-branch]: https://codecov.io/gh/mirumee/saleor/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/mirumee/saleor/compare/c621a1b99587ab6207fad46002034a48e5c22dc6...f38e579cbff35000dd949ffc6f3f02e9f1bd52b1
[cc-pull]: https://codecov.io/gh/mirumee/saleor/pull/528?src=pr

@patrys Now, I guess it's prefect to merge now.

@iraycd Thank you :)

authors: artursmet codecov-io iraycd


text:
Compatibility with MacOS bash (3.2.57)

It turns out source <(command) does not work correctly on MacOS Sonoma's bash.
bash-3.2$ source <(echo "export HELLO=world")
bash-3.2$ echo $HELLO

bash-3.2$

Changing source to eval fixes the problem.  Given all output from the sops_env function is escaped, I think this is equally safe.
bash-3.2$ eval $(echo "export HELLO=world")
bash-3.2$ echo $HELLO
world
bash-3.2$

I gave up on the ancient bash that comes with macOS and just installed it with Homebrew (and ensured it was higher up in my PATH)

I gave up on the ancient bash that comes with macOS and just installed it with Homebrew (and ensured it was higher up in my PATH), but definitely I'm for making this more compatible.

This seems very sensible, you have encouraged me to do the same!  Hopefully tho it will help other folks who are still on old bash.

thanks for the commit - I hope you find this useful for managing secrets, too - it's been working great for me!

Thanks for maintaining it, we're gonna use it in our team at work for sharing/accessing dev credentials.  Much better than our old solution!

@jdx could you please take a look at this if you get a chance? Thank you :)

authors: joshbode mogest

repo: mise-plugins/mise-sops


text:
книги прочитать

убить пересмешника
Китаист +
убить бобрыкина
День опричника
Текст Дмитрий Глуховский

https://yadi.sk/i/9_cm1ceg3QnyKh

Мне 20 лет просмотреть

Пауло Коэльо "Алхимик".

repo: mishin/life-mishinna


text:
Tasks

овощи замороженные +
мексиканская смесь брок марко +
белый и черн хлеб, булочки+
кефир+
окорок обезжиренный +
капуста белокочанная +
мятный чай
чай с шалфеем
сахар 1кг+
сметаны+
шалфей в аптеке
камфорное масло

кефир 2.5% обычный
лук 2кг
картошка молодая 2 кг
шампуры 5 шт
решетка побольше
мангал
7 угли мешок
8 росшиг
9 пимпочка на насос
туалетная бумага
фери

Песни для Артёма:имя любимое моё
николай
мамонтёнок
трактор
нюша чудо
санта лючия
мот день и ночь

1415

чай зеленый grifild+
чай черный lipton+
булочки с отрубями 6шт+
черный и белый хлеб+
сосиски клинские 1 пачка+
кефир биокефир 1%+
яйца 10+
бананы 3 шт 1кг+
3 помидора+
печенье офсяное 1 кг+
пакеты для мусора+
пакеты маленькие+
огурец длинный в пленке или 3 мал+
сметана 200 по акции+
15 картошки 2 кг+
16 лук 1 кг+
17 качан капусты 1 кг+

Росевробанк:
sonic ESB
Camel
topic
очередь - транзакционность
singleton

1 вынести preMerge
2 Проверять имя таблицы в методе!
3. пройти курс Oderski по Scala
4. нужно ли использовать %not_found?

mi@ya.ru
Николай Мишин
Дмитрий Маланин
daenurko@gmail.com

поставить переводчик независимый от интернета!

разобраться с TeamViewer
eclipse , как private methods push to bottom? нашел source -> sort

4 болта м4 для телевизора Panasonic TX-LR32C 10

Порошок стиральный автомат ариель для цветного белья 3,5-4 кг
кондиционер для белья
крупа манная 1 пачка
макароны мелкие импортные только не макфа
Масло валио
йогурты 8 шт активия с отрубЯми
сыр масдам
сосиски клинские 1 кг или венские
сметана 20 процентов 500 мг
сок фруто няня или агуша 5 шт яблоко зеленое 3 и две яблоко вишня
курица 1 шт
филе индейки
филе тилапии 1 кг
яйцо окское 1
молоко 3,2 процента
яблоки зеленые  голден 1 кн
мандарины 1 кг
киш миш 500 мг


text:
🛑 Catalogue is down

In 29fd589, Catalogue (https://catalogue.apprentissage.beta.gouv.fr/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Catalogue is back up in 65d0e8e after 26 minutes.

repo: mission-apprentissage/upptime


text:
Editing does not work on slow computer

Edit a line or polygon, quickly "flick" the points to a new spot.  The graphic editing will get all out of order, and the line will be incorrect.
Also, a mouse down and up over a point will allow  you to drag the point while the mouse is up.   This should be fixed as well.
Susupect the mouse up event is not raising.  investigate.

Use the following script to test.  This is the copy of the example in the dev guide.  Try whipping the points around now.  Points should never go out of order.    Test polygons, points, and other draw/edit types.
NOTE: this branch is based on the draw branch, so it will have the same issues the draw branch has.
var overlay1 = new emp3.api.Overlay({
name: "overlay1",
id: "w834mne-sdg5467-sdf-we45"
});
var path = new emp3.api.Path({
name: "myPath1"
});
// After we know an overlay has been added, we can draw the symbol.
// You don't need an overlay to draw, but when the draw is complete,
// we want to add the returned feature to the map.
function processAdd() {
var count = 0;
// This is just an example.  Customize drawing and editing however you like!
alert("Click on the map to begin drawing.  Click 3 times to end drawing and go into edit mode.  Right-click to exit edit mode.");
// This just puts the map in draw mode, so the map begins
// animating the draw.  It does not actually add data to the map.
map0.drawFeature({
feature: path,
onDrawUpdate: function() {
// once we hit three, end the draw.  (this is not necessarily what you
// do--just a way to end the draw)
count++;
if (count >= 3) {
map0.completeDraw();
}
},
onDrawComplete: function(args) {
console.log("draw complete");
// this is what actually adds the feature to the map.
overlay1.addFeature({
feature: args.feature,
onSuccess: function() {
console.log("feature add complete");
// Right click to end the edit
function myListener(cbArgs) {
if (cbArgs.event === emp3.api.enums.UserInteractionEventEnum.CLICKED &&
cbArgs.button === emp3.api.enums.UserInteractionMouseButtonEventEnum.RIGHT) {
map0.completeEdit();
}
}
	  // Add a map event listener so we know when to finish the edit.  In this case
	  // we will finish the edit on a right click.
      map0.addEventListener({
        eventType: emp3.api.enums.EventType.MAP_INTERACTION,
        callback: myListener
      });

      map0.editFeature({
        feature: args.feature
      });
    }
  });
}.bind(this)

});
}
function processError(error) {
alert(JSON.stringify(error));
}
// add an overlay to the map.
map0.addOverlay({
overlay: overlay1,
onSuccess: processAdd,
onError: processError
});

Reintegrate

authors: jamesbeecroft sjpinizzotto


text:
Problem testing local server build app with emulator

I built a new server running on my local machine. To test it on the phone, I connected with a USB cable and verified that adb devices sees the phone. I then installed a new companion on the phone with ant installplay.  I then start an app on my local server instance and also run appinventor companion on the phone. I then say connect with the companion (use legacy) on my local app inventor. It shows a barcode on my phone and I can use the to  run  my app.
Everything seems fine.
But now I try the same thing with the emulator.  I start the emulator and verify that adb devices can see it.  This time when I run ant installplay I get the error:
     [exec] /Users/hal/Desktop/appinventor-sources/appinventor/build/buildserver/MIT AI2 Companion.apk: 1 file pushed. 195.6 MB/s (17951553 bytes in 0.088s)
     [exec] 	pkg: /data/local/tmp/MIT AI2 Companion.apk
     [exec] Failure [INSTALL_FAILED_NO_MATCHING_ABIS]

Hey @halatmit this generally happens when the app is built for an architecture and the emulator runs a different one. If you are using an M1/M2 the emulator might default to arm, but the app is built for x86. The other way around is also possible, depending on configuration.
You can check which emulator image you are using in the settings and create a different one with an image using the same architecture used to build the APK.

@josmas
Thanks for the note - that makes sense, but I'm not clear how to avoid the issue and what we could to keep others from running into this problem   Do we need different installation packages (with instructions) on this page [https://appinventor.mit.edu/explore/ai2/setup-emulator]
Or different options in our build dropdown menu?  Or ... ?
What do think?

Hey Hal, I don't have all the details, so this is more of a guess, but I am not sure there's a good solution here.
Because this is only happening to people using the sources, if a new M1/M2 package was created, it could solve the problem you are facing, but you would end up with 3 different mac packages. Two already exist (old OS and new OS packages already exist), and a new architecture package could be created. This sounds too convoluted in order to solve a problem that only a handful of people might ever face (working with the sources and using a new M1/M2 machine).
It might be easier to just add instructions in the readme so source users, which will be more used to this type of work in any case, know what to do if they find this situation.

hey @halatmit I was finally able to try this on an M1.
I cannot run the emulator from the installer on M1 at all. It is looking for Intel x86 Emulator Accelerator (HAXM) which I do not have installed. That dependency can be install from the Android SDK manager. It is likely that installing the package and running the emulator from Rosetta it will work. But the problem is mixing architectures (x86 and arm).
If I run one of my arm emulators (for terminal or android studio) I am able to install the app with installplay and connect to the emulator from Connect --> Emulator. I have to start the app manually, but then it does connect. The connection is rather flimsy and it crashes the emulator if I change projects, but it is usable.
I can add some instructions to the readme, but this is only good for source code users using the emulator, not final users. Would that work? cc/ @ewpatton

authors: halatmit josmas

repo: mit-cml/appinventor-sources


text:
Speed Up Blockly on Firefox

This small fix comes from Neil. see:
https://github.com/google/blockly/commit/f79b42ab70e2c6eda7beb6777cec76db654332a4
Change-Id: I2559fe33fb261243e5a4c985bddfda59ff103a3a

@afmckinney @halatmit Here is the firefox speedup fix from Neil

LGTM

authors: halatmit jisqyv


text:
some question about Bev pool's pre computation.

Hi, thanks for sharing the work, after reading the code, I have some question about the precomputation.
I see in bev pool code, you first calculate rank, then sort rank, then use cuda function to calculate sum, in cuda kernel function, after calculate the sum of points in grid, you just put the value to the corresponding position(calculated by grid position).
So I wonder, where is pre computation? what's the different between your bev pool and LSS's bev pool, except for the sum calculation?
LSS's code:
final = torch.zeros((B, C, self.nx[2], self.nx[0], self.nx[1]), device=x.device)
final[geom_feats[:, 3], :, geom_feats[:, 2], geom_feats[:, 0], geom_feats[:, 1]] = x.
what's the difference between your pre computation and LSS's final[geom_feats[:, 3], :, geom_feats[:, 2], geom_feats[:, 0], geom_feats[:, 1]] = x.

Pre-computation is not released in this repo. It requires the extrinsic and intrinsic matrices to be unchanged across the entire dataset, but actually on nuscenes those parameters do change once several hundreds of frames. This will not influence the average latency, but taking care of such corner cases will make our code messy. If you are still interested in the specific implementation, I can talk about it in this thread, but it is just basically caching the geom_feats, ranks, etc. after the first time they are computed.
The major difference other than pre-computation is the interval reduction you see. LSS uses a prefix sum and keeps the results on the interval boundaries, while we perform interval reduction directly. We also save some intermediate DRAM activations by putting partial results in the GPU registers.

Pre-computation is not released in this repo. A simple implementation requires the extrinsic and intrinsic matrices to be unchanged across the entire dataset, but actually on nuscenes those parameters do change once several hundreds of frames. This will not influence the average latency, but taking care of such corner cases will make our code messy. If you are still interested in the specific implementation, I can talk about it in this thread, but it is just basically caching the geom_feats, ranks, etc. after the first time they are computed. You need to do dataloader-level modification to make sure the results are correct (this is the tricky part).
The major difference other than pre-computation is the interval reduction you see. LSS uses a prefix sum and keeps the results on the interval boundaries, while we perform interval reduction directly. We also save some intermediate DRAM activations by putting partial results in the GPU registers (as you can see, we do not have the DRAM tensor x in LSS).

I got it, I find your 2d augmentation param is fixed , so no augmentation for 2d image, so you did can just calculate once and use the same after, but whether no augmentation will have influence to performance? as LSS use true augmentation.

repo: mit-han-lab/bevfusion


text:
How should the hyperparameters of cifar10 be set? I have tried many times and can only reach 79%.

How should the hyperparameters of cifar10 be set? I have tried many times and can only reach 79%.

yes, from scratch on CIFAR10

repo: mit-han-lab/efficientvit


text:
Questions on "streaming-llm" Paper

Firstly, I'd like to express my appreciation for your insightful paper and the open-source 'streaming-llm'. Your approach and experiments are truly commendable. I hope you don't mind, I would really appreciate it if you could give me some hints about the below questions.

As mentioned in your paper, the attention score of initial tokens seems crucial. I was under the impression that Dense Attention might be more effective than Window Attention, especially since Dense Attention consistently calculates KV values of initial tokens. Is it because Window Attention performs better because Dense Attention struggles with significantly longer input lengths, affecting Length Extrapolation?

Regarding Figure 1-(b), the PPL of Window Attention seems the lowest, but it has an 'X' label. Maybe the PPL score of Window Attention should be larger in real, or it shouldn't take 'X' label?

I appreciate any clarifications you can provide.

Hello!
I'm not related to the publishing of this paper, but I have done my fair share of experiments surrounding this work.

As mentioned in your paper, the attention score of initial tokens seems crucial. I was under the impression that Dense Attention might be more effective than Window Attention, especially since Dense Attention consistently calculates KV values of initial tokens. Is it because Window Attention performs better because Dense Attention struggles with significantly longer input lengths, affecting Length Extrapolation?

My belief is yes. There are two primary issues with Dense Attention:

It's not scalable due to the linear increase in memory usage, making it unfit for handling many tokens.
(related to your question) the position IDs of tokens in StreamingLLM are "shifted". To give a toy example: 4 attention sink tokens, window size of 6, and the text is just a space separated alphabet, then the model sees:

A
A B
A B C
A B C D
A B C D E
A B C D E F
A B C D E F G
A B C D E F G H
A B C D E F G H I
A B C D E F G H I J
A B C D F G H I J K
A B C D G H I J K L
A B C D H I J K L M
...

With these position IDs:
0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
...

i.e. the position IDs get shifted (or rather, they don't get shifted) as the window moves.
Or from the paper itself (Section 3.2, page 5):

When determining the relative distance and adding positional information to tokens, StreamingLLM
focuses on positions within the cache rather than those in the original text. This distinction is crucial
for StreamingLLM’s performance. For instance, if the current cache has tokens [0, 1, 2, 3, 6, 7, 8]
and is in the process of decoding the 9th token, the positions assigned are [0, 1, 2, 3, 4, 5, 6, 7], rather
than the positions in the original text, which would be [0, 1, 2, 3, 6, 7, 8, 9].

As a direct result of this, the crucial initial tokens are always "closer" to the "current" tokens, allowing these initial tokens to have a larger effect on the current tokens. I think this is why the Dense Attention models fail at larger sequence lengths (but this is purely my hypothesis, an author may correct me).

Regarding Figure 1-(b), the PPL of Window Attention seems the lowest, but it has an 'X' label. Maybe the PPL score of Window Attention should be larger in real, or it shouldn't take 'X' label?

Perhaps I'm looking at the wrong figure, but Figure 1 (b) shows a really high PPL of 5158 for me. This is also corroborated in Figure 3, where the PPL for Window Attention is always larger than the PPL for StreamingLLM. Could you elaborate here?

Tom Aarsen

@tomaarsen
Thank you for your comments! Your examples and experimental results have provided me with a better understanding.

Yeah, so I understood that Dense Attention has limitations in the aspect you pointed out, such as memory usage and processing positional IDs related to positional encodings.

I realized that I misinterpreted it as 5.158, but it's actually 5158 which was large enough.

repo: mit-han-lab/streaming-llm