Route splitting without loosing type inference

Hello all!
one of the most difficult situation, at least for me to switch to elysia from either hono or another node framework is the missing ability to split rounding code among files. I've seen some proposal, even file system routing. But for a simple situation (e.g.: 5/6 routes, each having some endpoints) is there is any workaround or guidance?
Thanks!

Hi! Having probably the same problem here. It's very easy and clean yo create group with prefixes for every "resource". For example:
export const apiProducts = new Elysia({ prefix: '/products' })     .use(apiSetup)     .post('/', createProductHandler, createProductHandlerSchema)     .get('/', getAllProductsHandler, getAllProductsHandlerSchema)
That would be my index.ts of the folder that is going to contain 1 file per route, with this file containing both the handler and the handler schema. The big problem right now is typing the handler function (tried several things with Context, TypedRoute and another couple of things, but no luck)
`
import { TypedRoute, t } from 'elysia'
export const createProductHandlerSchema = {
body: t.Object({
name: t.String({ error: 'name is required' }),
pvp: t.Numeric({ error: 'pvp is required' }),
categoryId: t.Numeric({ error: 'categoryId is required' })
}),
response: {
200: t.Object({
id: t.Numeric(),
name: t.String(),
pvp: t.Numeric(),
categoryId: t.Numeric()
}),
400: t.String()
}
}
export async function createProductHandler({ body, store }: ????) {
// do something with 'body'
return {
id: 1,
name: 'CocaCola',
pvp: 10,
categoryId: 4
}
}
`

Hi everyone again! Not ideal in my opinion (I'd love to have a single generic class for all my project) but I ended up surrendering to a per-handler typing, adding only what you need to the type. In the example above it would be only the body, and a type that I declared for my shared state store:
import { ApiStore } from<EMAIL_ADDRESS>import { Static } from '@sinclair/typebox'
import { Context, t } from 'elysia'

export const createProductHandlerSchema = {
    body: t.Object({
        name: t.String({ error: 'name is required' }),
        pvp: t.Numeric({ error: 'pvp is required' }),
        categoryId: t.Numeric({ error: 'categoryId is required' })
    }),
    response: {
        200: t.Object({
            id: t.Numeric(),
            name: t.String(),
            pvp: t.Numeric(),
            categoryId: t.Numeric()
        }),
        400: t.String()
    }
}

export async function createProductHandler({
    body,
    store
}: Context<
    { body: Static<typeof createProductHandlerSchema.body> },
    ApiStore
>) {
    // do something with 'body'
    return {
        id: 1,
        name: 'CocaCola',
        pvp: 10,
        categoryId: 4
    }
}

Hi again, and sorry for the spam. I'm leaving the last comment for the record, but I've managed to come up with a simple type that "FOR NOW" is working for me. Full example:
api.utils.ts
import { DbContext, dbPool } from<EMAIL_ADDRESS>import { Static, TSchema } from '@sinclair/typebox'
import Elysia, { Context } from 'elysia'

export type ApiStore = {
    dbPool: DbContext
}

export type ApiHandlerParams<Schema> = Context<
    {
        [Property in keyof Schema]: Schema[Property] extends TSchema
            ? Static<Schema[Property]>
            : Schema[Property]
    },
    ApiStore
>

export const apiSetup = new Elysia({ name: 'apiSetup' }).state('dbPool', dbPool)

create-product.endpoint.ts
import { ApiHandlerParams } from<EMAIL_ADDRESS>import { t } from 'elysia'

export const createProductHandlerSchema = {
    body: t.Object({
        name: t.String({ error: 'name is required' }),
        pvp: t.Numeric({ error: 'pvp is required' }),
        categoryId: t.Numeric({ error: 'categoryId is required' })
    }),
    response: {
        200: t.Object({
            id: t.Numeric(),
            name: t.String(),
            pvp: t.Numeric(),
            categoryId: t.Numeric()
        }),
        400: t.String()
    }
}

export async function createProductHandler({
    body,
    store
}: ApiHandlerParams<typeof createProductHandlerSchema>) {
    // here 'body' and 'store' have proper intellisense and types
    return {
        id: 1,
        name: 'CocaCola',
        pvp: 10,
        categoryId: 4
    }
}

index.ts
import { apiSetup } from<EMAIL_ADDRESS>import { Elysia } from 'elysia'
import {
    createProductHandler,
    createProductHandlerSchema
} from './create-product.endpoint'

export const apiProducts = new Elysia({ prefix: '/products' })
    .use(apiSetup)
    .post('/', createProductHandler, createProductHandlerSchema)

Having all endpoints in one file is a real deal breaker for many of us, even if you manage to split your routes into groups with multiple Elysia instances, there could be very large groups.
This is hurts development experience for sure, I hope some one smarter than me comes with a good fix, I've tried several ways to workaround this with no luck.

Reading the docs, the dependency injection section seems to attempt to address it, more specifically here.
I'm not entirely sure if I followed what's been suggested there, though. 🤔

Hello, guys!
Got myself in a similar problem, I was looking to type my body from the schema. After some looking at the types files and trying to find a solution... I think I got something! 🎉
Here is my sample code:
  private initializeRoutes() {
    const users = new Elysia({ prefix: '/auth' })
      .post('/register', this.register, RegisterBody)
  }

  private register = async ({ body, set }) => {
    const { emailAddress, passwordString, firstName, lastName, cpfNumber } = body;
    if ( await this.AuthService.checkIfUserExists(cpfNumber) )
      return new HttpException(400, 'Já existe um usuário com este CPF.');

    try {
      const newUser = await this.AuthService.create({ emailAddress, passwordString, firstName, lastName, cpfNumber });
      set.status = 201;
      return newUser;
    } catch (err: unknown) {
      if (err instanceof HttpException)
        return err;
      return new HttpException(500, `Ocorreu um erro interno: ${JSON.stringify(err)}}`);
    }
  }

Sadly as this is, all the parameters on the register function are any:

To type that you can simply put the parameter as Context:

But we enter in another problem as the body now is any:

To solve that I found the UnwrapRoute Type, which can receive a typeof a schema and automatically types the body:

I haven't started working with this yet, as I just found this solution and got no type errors or anys.
TLDR: Context<UnwrapRoute<typeof Schema>>

I'm using decorate to inject prisma at the root level of my routes. I'm also looking for a way to pass the type to sub-routes/sub-files.

I assume this is also the reason why I'm getting this:
Argument of type '(context: Context) => Promise<string | null>' is not assignable to parameter of type 'Handler<MergeSchema<UnwrapRoute<InputSchema<never>, {}>, {}>, { request: {}; store: {}; }, "/user/metadata/:key">'.
  Types of parameters 'context' and 'context' are incompatible.

when doing this:

app.get('/user/metadata/:key', metadata.get)

I really don't want to create a huge file or use any for context. Is there any fix for this?

This is a bit problematic, right now it's pretty much impossible to create a single file containing all route definitions and having the actual functions in separate files. Hopefully, this is something that will be fixed soon.

That what I was looking for ! Bump !
Here is the same problem

Hi everyone, is there any solution for this situation?
user.route.ts
import { Elysia } from "elysia";
import { registerUser } from "../controllers/user.controller";
import { registerUserRouteGuard } from "../guards/user.guard";

export const userRoutes = new Elysia({ prefix: "/users" }).post(
	"/",
	registerUser,
	registerUserRouteGuard
);

user.controller.ts
import type { Context } from "elysia";

export const registerUser = ({ body }: Context) => {
	// get user details from the user
	const { username } = body;  // this does not works
	// validate user details
	// sanitize user details
	// check if user already exists
	// check if images, check for avatar
	// if images available, upload it to cloudinary
	// create user object - create entry in db
	// get the new user response without password and refresh token field
	// check if response is returned successfully - null check
	// return the response to the user
	return {};
};

user.guard.ts
import { t } from "elysia";

export const registerUserRouteGuard = {
	body: t.Object({
		username: t.String({ error: "Username is required" }),
		email: t.String({ error: "Email is required" }),
		fullname: t.String({ error: "Fullname is required" }),
		avatar: t.String({ error: "User profile picture is required" }),
		coverImage: t.String(),
		password: t.String({ error: "Password is required" }),
	}),
	response: {
		200: t.Object({}),
		400: t.String(),
	},
};

The problem is that the user.controller.ts file's body de-structuring is not typesafe. If I write it like below, it works:
user.route.ts
import { Elysia } from "elysia";
import { registerUser } from "../controllers/user.controller";
import { registerUserRouteGuard } from "../guards/user.guard";

export const userRoutes = new Elysia({ prefix: "/users" }).post(
	"/",
	({body}) => {
         const {username} = body; // this now works
         return {}
        },
	registerUserRouteGuard
);

Hi again, and sorry for the spam. I'm leaving the last comment for the record, but I've managed to come up with a simple type that "FOR NOW" is working for me. Full example:
api.utils.ts
import { DbContext, dbPool } from<EMAIL_ADDRESS>import { Static, TSchema } from '@sinclair/typebox'
import Elysia, { Context } from 'elysia'

export type ApiStore = {
    dbPool: DbContext
}

export type ApiHandlerParams<Schema> = Context<
    {
        [Property in keyof Schema]: Schema[Property] extends TSchema
            ? Static<Schema[Property]>
            : Schema[Property]
    },
    ApiStore
>

export const apiSetup = new Elysia({ name: 'apiSetup' }).state('dbPool', dbPool)

create-product.endpoint.ts
import { ApiHandlerParams } from<EMAIL_ADDRESS>import { t } from 'elysia'

export const createProductHandlerSchema = {
    body: t.Object({
        name: t.String({ error: 'name is required' }),
        pvp: t.Numeric({ error: 'pvp is required' }),
        categoryId: t.Numeric({ error: 'categoryId is required' })
    })
}

export async function createProductHandler({
    body,
    store
}: ApiHandlerParams<typeof createProductHandlerSchema>) {
    // here 'body' and 'store' have proper intellisense and types
    return {
        id: 1,
        name: 'CocaCola',
        pvp: 10,
        categoryId: 4
    }
}

index.ts
import { apiSetup } from<EMAIL_ADDRESS>import { Elysia } from 'elysia'
import {
    createProductHandler,
    createProductHandlerSchema
} from './create-product.endpoint'

export const apiProducts = new Elysia({ prefix: '/products' })
    .use(apiSetup)
    .post('/', createProductHandler, createProductHandlerSchema)

This solution worked for me FOR NOW, it seems.
utils/apiSetup.ts
import { Static, TSchema } from "@sinclair/typebox";
import Elysia, { Context } from "elysia";

export type ApiHandlerParams<Schema> = Context<{
	[Property in keyof Schema]: Schema[Property] extends TSchema
		? Static<Schema[Property]>
		: Schema[Property];
}>;

export const apiSetup = new Elysia({ name: "apiSetup" });

Then, I simply used it as the first middleware of the main Elysia app init:
import { cookie } from "@elysiajs/cookie";
import { cors } from "@elysiajs/cors";
import serverTiming from "@elysiajs/server-timing";
import staticPlugin from "@elysiajs/static";
import { swagger } from "@elysiajs/swagger";
import { Elysia } from "elysia";
import { compression } from "elysia-compression";
import { rateLimit } from "elysia-rate-limit";
import { apiSetup } from "./utils/apiSetup";

const app = new Elysia({ prefix: "/api/v1" })
	.use(apiSetup)
	.use(
		cors({
			origin: Bun.env.CORS_ORIGIN!,
			credentials: true,
		})
	)
	.use(
		rateLimit({
			responseMessage: "Max limit of 10 calls per minute exceeded",
			countFailedRequest: true,
		})
	)
	.use(cookie())
	.use(
		staticPlugin({
			assets: "public",
		})
	)
	.use(compression())
	.use(serverTiming())
	.use(swagger());

export default app;

Please use the plugin pattern instead of TS gymnastics your way to type everything, all you would have in the end is a messy unmaintainable types.
https://elysiajs.com/essential/plugin.html

For a future reference, please see https://elysiajs.com/patterns/mvc.html

For a future reference, please see https://elysiajs.com/patterns/mvc.html

With all respect, this isn't ergonomic at all

For a future reference, please see https://elysiajs.com/patterns/mvc.html

Is it possible to just expose the types instead telling us to not do that? Trying to move to the recommended way of doing it raises so many other issues, for me at least.
I figured out how to make the typescript work for my use case. My only issue would be not being able to rely on Elysia types in the future.

You should use new Elysia()... and add the plugins you want type inference on again. Plugins should have a name (and optionally a seed), Elysia then knows not to instantiate them twice.
// myPlugin.ts
const myPlugin = new Elysia({ name: 'myplugin'})
    .decorate('greeting', 'Hello you')

// subRoutes.ts
const subRoutes = new Elysia()
    .use(myPlugin)
    .get('/greetme-again', ({ greeting }) => greeting)

// index.ts
const app = new Elysia()
    .use(myPlugin)
    .use(subRoutes)
    .get('/greetme', ({ greeting }) => greeting)
    .listen(3000)

IDK if this is "the definitive solution" but thought I'd share how I personally handle splitting routes in a project of mine.
// base.ts
import { Elysia } from 'elysia';

// You can add whatever logic and state every route shares here
export const base = new Elysia().decorate('env', { ... }); // I can now access env vars via Elysia context

// routers/user.ts
export const userRouter = new Elysia({ prefix: '/user' })
  .use(base)
  .get('/', async (context) => {
    context.env; // This works
    // ...
  });

// index.ts
import { Elysia } from 'elysia';
import { base } from './base';
import { userRouter } from './routers/user';

const app = new Elysia()
  .use(base)
  .use(userRouter)
  .listen(3001);

Hi, just in case we have just added something that might help to the documentation:
https://elysiajs.com/essential/handler.html#typescript

I have achieved something similar with the plugin pattern
`
// server.ts
new Elysia()
.use(getContact);
// getContact.ts
export const getContact = new Elysia().get(
"/contacts/:id",
(context) => {
const contactId = context.params.id; // ok
const tuna = context.params.tuna // typescript error
const body = context.body.john // typescript error
},
{
params: t.Object({
id: t.String(),
})
}
);
`
but I agree I would prefer this:
// server.ts new Elysia()       .get("/contacts/:id", getContact, getContactSchema);
I like seeing the routes

@SaltyAom
Hey
Im doing dependency injection this way
const app = createApp({
  db: createDBClient(databaseConnectionURL),
});

export const createApp = (config: { db: DBInstance }) => {
  const database = new Database(config.db);
  return new Elysia().decorate("database", database).use(router);
};

export type Context = InferContext<ReturnType<typeof createApp>>;

export const router = new Elysia({ prefix: "/api" })
  .use(authController)
 .use(courseController)
  .onError(({ error }) => {
    if (error instanceof Exception) {
      return { success: false, message: error.message };
    }

    console.error(error);

    return { success: false, message: SOMETHING_WENT_WRONG };
  });

export const courseController = new Elysia({ prefix: "/courses" })
  .get("/", async (context: Context) => {
    const courses = await context.database.course.all();

    return {
      data: courses.map((course) => course.data),
    };
  })
  .get("/:id", <T extends Context>(context: T) => {
    const course = context.database.course.findOrThrow({
      courseId: context.params.id
    });

    return {
      data: course,
    };
  })

I get
Property 'id' does not exist on type '{}'. when hovering over ts       courseId: context.params.id


[AMORO-1892] Improve the SQL Shortcuts in Terminal Web UI

Why are the changes needed?

Close #1892.
Brief change log

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[ ] Run test locally before making a pull request

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Thank you for your contribution. 👍 It's a very helpful improvement.


Add Async Library

Add an Async Library to Scoot which will facilitate receiving return values (errors only for now) from go functions.  For an example of how this should be used see the godoc comments in mailbox.go.  AsyncError is similar to a Promise that contains an error value.
This helps us run an event loop in the scheduler with go routines and then executing callbacks when the go routine completes (successfully or unsuccessfully).
The goal is to use this in the scheduler refactor, which will have an event loop.  Every loop it will do the following as prototyped in dbentley/actors.  This is similair to the RPC abstract Dan provides in actions.  But I prefer this because

the functions we are invoking are not actually remote procedure calls, they are just go routines which may perform an off box call or not
mimics promises & callbacks from languages like node.js & scala.
separate lib from scheduler its reusable
keep go routine and callback closer together, for easier readability.  The RPC Solution requires the definition of message types and processing of these messages in a big switch statement.  So the RPC and the Handling of the RPC are in different places in the code.   This will make updates more brittle and less modular.
actions are planed and messages sent at the same time.  This is different than the other pull request where the loop is (receive messages & update state, plan actions, execute rpc).  The last two are combined in this model.  However the at the end of the loop you can easily check what messages have been added so no information is lost to verify that the correct actions were taken.
less error prone, the user only needs to remember to create a mailbox & call the processupdates() method once per loop.  Then any created AsyncError is automatically tracked and the callback invoked, as opposed to the RPC which required the user to specify separate message types and then handle th

Current coverage is 71.67% (diff: 100%)

Merging #86 into master will increase coverage by 0.19%

@@             master        #86   diff @@
==========================================
  Files            42         44     +2
  Lines          2097       2129    +32
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1499       1526    +27
- Misses          522        527     +5
  Partials         76         76

Powered by Codecov. Last update b85d7b7...7a8674e

LGTM

lgtm to merge and start writing code against this so we can see how well the api fits our needs.


langchain[patch]: Upgrade Google Cloud Storage dependency

Update the Google Cloud Storage dependency to the latest version. The parts of the API that are being utilised in gcs.ts seem to be unaffected, so this is just a small improvement that fixes #4305.

Thank you! If this does cause problems, we can split it out into a separate package.

Actually, if it doesn't matter - can you change this to:
^6.10.1 || ^7.7.0

And update the entry in peerDependencies?

Thank you!


Add documentation for input validation

Added a documentation page for Input Validation. Covers the issues in https://github.com/microsoft/AdaptiveCards/issues/4391.

Docs Build status updates of commit 1ec19ca:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

AdaptiveCards/authoring-cards/input-validation.md
:white_check_mark:Succeeded

AdaptiveCards/toc.yml
:white_check_mark:Succeeded

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

@RebeccaAnne this would then need to be CP'd into live as well IIRC

Docs Build status updates of commit 94310b5:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

AdaptiveCards/authoring-cards/input-validation.md
:white_check_mark:Succeeded

AdaptiveCards/toc.yml
:white_check_mark:Succeeded

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


Classes don't use type information from interface?

If an interface supplies type information, is the implementation required to repeat it?
Class:

Interface:

Additionally, the description isn't loaded in (just says inheritdoc as if there's nothing in the implementation to show).
If I keep all the types except the return value, the description shows again:

Perhaps this issue would be more clearly named, "Add support the @inheritdoc tag, a la JSDoc".

+1
I need this feature desperately as well. Important to mention that it is not only related to interface -> class inheritance, but also to interface -> interface and class -> class.
I haven't managed to implement this feature in my fork. It looks like TypePlugin doesn't resolve overwrites type for fields and methods very well, or does it after ImplementsPlugin processing. Only constructors are resolved properly.

TypeDoc's behavior is consistent with TypeScript's, yes, the implementing class must repeat type information from the interface.
interface Interface {
  method(a: string, b: number): void
}

class Class implements Interface {
  method(a, b) {
    b.substring(1, 2) // but wait, a is the string! TS doesn't know since the parameters aren't typed.
  }
}


Consider more images for FID

This is more like a discussion, shall we consider more generated images per prompt  while calculating FID? The generated images can be very different if the seed changes, shall we do some aggregation for FID? Trying to understand the implication of considering one generated image per prompt.

This is a valid point, in the spreadsheet I shared there are three runs for each experiment to measure the run to run variance. Past a certain number of samples, the variance is low, so generating multiple images per prompt shouldn't change the final score.
We'll discuss this point in more details in the next meeting.

Yes, lets discuss. Also, I still don't have access to the sheet.


add npe for query

Fix https://github.com/Azure/azure-sdk-for-java/issues/25231
Add npe protection for query methods and some inner methods.
Add test case for query methods npe protection.
Updated recorded sessions.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:

[ ] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

/azp run java - compute - ci

/azp run java - compute - ci


Programmatically selecting a node

Is it possible, would anyone please shove me in the right direction?

refs are provided for the root ul, TreeNode li and child containing ul as well as the default container decorator root div with the onClick handler


Could you make a release so this can be installed with BRAT?

Could you make a release so this can be installed with BRAT?
or how do you recommend installing it?

Figured it out! just cloned and built locally.


rio: promote to Extras bucket

Just in case if you would like to promote your manifest for rio to Extras bucket we have corresponding request here: ScoopInstaller/Extras#11772.
Looks like you've spent time to polish it, and it may be useful for the whole community.
Thanks anyway.

Merged into Extras.


Fixed Settings Fragment Closes on Screen Rotation #589

Fixes #589
Changes: Added configChanges attribute in manifest
Screenshots for the change:

@Tilak-Shenoy No response from your side

I am still working on it

@iamareebjamal  do you have some idea where in the code the bug is?
I have tried a lot of ways, but could not fix it. Still I will continue working on the same

You have to save the fragment in backstack and the information of backstack in the savedInstance and on restore instance, reapply it

It's been a long time @Tilak-Shenoy, if you feel updating the PR, ping me and I'll open it back


updating SAMBA

This PR should cover merging SAMBA's newest commit as the pointer for the submodule.

OK now the Taweret submodule update was also added to this PR, so this one counts for both.

I added John to the reviewer list since he's a Taweret coder :)

Update on installation:
Remove the following from requirements.txt: math, mpl_toolkits, time, warnings. These come with your python installation so for example, you can't do pip install math. Once you remove these four packages from the requirements.txt file, pip install -r requirements.txt should work (let me know if it doesn't).
Once the packages are installed, pytest works great and all tests pass!
Also, Taweret submodule looks good to me.

OK great---I removed the math one, need to remove the others. Will do now.

OK final commit for SAMBA should be linked now in this PR.

Please add
-  [Taweretbandsdk.md](https://github.com/bandframework/Taweret/blob/main/Taweretbandsdk.md)
to the end of resources/sdkpolicies/README.md

I would update setup.py to reflect the updated requirements and would change the two SAMBA to samba for case-sensitive systems (or go to a single way of installing and specify what it is).

All proposed changes from @wildsm have been included in the two commits above.

I am still having problems building SAMBA but it may be a local issue.
Maybe another reviewer (@ozgesurer? @mosesyhc?) can update see whether they are able to do a clean install, build, and run?

I followed the README testing instructions and have the following observations:

jupyter, pytest, and/or pytest-cov dependencies are assumed.  It might be good to add a line before Testing to specify these dependencies.
pytest under Tests/ directory succeeded.
Jupyter notebooks under Tutorials fail at different spots.  I have attempted to run all blocks and exported the HTML with errors, attached here

Happy to review @asemposki. Perhaps after Moses' checks are incorporated let me know and I can rerun with the updated version? or do you just want me to try the current version?

Thanks @mosesyhc for the careful review. I had forgotten to update the Tutorials, so now all have been updated and run locally for me, so if @ozgesurer wants to check them, that would be appreciated. I know the pytests have worked for everyone. I also updated the README.md for the Tests folder to reflect that people will need pytest and Jupyter notebook to run the tests.

@ozgesurer everything should now be up to date :)

Reopening this PR because I had to update my branch of bandframework:develop before being able to merge this.

@asemposki So, I am not checking it then. I am sure it runs smoothly :) Sorry, I wasn't able to test immediately. But, let me know if it is needed. @wildsm you can assign me if there is something to do.

I have attempted to find out what is wrong with the checks; I have updated the asemposki/bandframework:develop repo, so there are no new commits to fetch from here. I have pushed the submodule pointers, and the checks still claim that either 'Taweretbandsdk' itself is misspelled, or that the link is broken, yet when I click on it it works. I cannot find any other mistakes in our files. @mosesyhc if you know what's going on with this could you point me in the right direction?

Or @ozgesurer if you want to look at the Actions that would be great. I am not sure what's stopping this from passing checks.

@asemposki - can you create a new branch (from develop) on bandframework? Then you could pull request asemposki/bandframework to that branch (and you could merge yourself since it is not develop or main). The branch would then pass the tests. Right now I think others cannot contribute to asemposki/bandframework  since it is a fork on the asemposki organization, which has different rules.
An alternative would be to update asemposki/bandframework based on the current develop on bandframework.

@asemposki : As @wildsm has mentioned, with only one addition.  I believe spellcheck will still fail, we will need to add Taweretbandsdk into .github/config/.wordlist.txt so that spellcheck recognizes the word.

Looking slightly closer, it seems like both checks are complaining about Taweretbandsdk. My first try would be to add that to .github/config/.wordlist.txt. I tried to PR into this branch and I have no privilege to do so.

In the test PR from @wildsm, all checks are passing, so let's just use that PR instead of this one (simpler solution).


RocketMQ sink v1

https://github.com/bytedance/bitsail/issues/137
Prepare a Pull Request

Title: [BitSail][Connector] Migrate rocketmq Sink connector to V1 interface #137

Fixes: #XYZ

Please change the PR title and the related issue number refer to the following description.
The above XYZ must be replaced with the actual GitHub Issue number, indicating that the current PR is used to solve the problem described in this Issue.
If you don't find an Issue that matches your changes, please Create Issue first, then commit this PR.
For more info about the contributing guide, see: Contributing Guide

Motivation
Migrate rocketmq Sink connector to V1 interface  and use BitSail  unified streaming and batching interface
Modifications
Describe the modifications you've done.
Verifying this change
Please pick either of the following options.

[ ] This change is a trivial rework/code cleanup without any test coverage.

[ ] This change is already covered by existing tests, such as:
(please describe tests, example:)

com.bytedance.bitsail.core.EngineTest#testRunEngine

[ ] This change added tests and can be verified as follows:
(example:)

Added unit tests for parsing of configs
Optimized integration tests for recovery after task failure

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation

Hi, @beyond-up , some suggestions:

Please change the PR title, refer: https://github.com/bytedance/bitsail/pull/448
Please link the issue in your PR, once PR is merged, issue will be automatically closed, refer: https://github.com/bytedance/bitsail/issues/253
Please add tests to make sure the connector is working properly

Hi, @beyond-up , some suggestions:

Please change the PR title, refer: [BitSail-141][Connector] Support DDL sync in KuduWriter #448
Please link the issue in your PR, once PR is merged, issue will be automatically closed, refer: [BitSail][Feature] Support sample in PrintSink. #253 and [BitSail][Docs] fix code highlight #285 (comment)
Please add tests to make sure the connector is working properly

ok, thx!

Hi, @beyond-up , some suggestions:

Please change the PR title, refer: [BitSail-141][Connector] Support DDL sync in KuduWriter #448
Please link the issue in your PR, once PR is merged, issue will be automatically closed, refer: [BitSail][Feature] Support sample in PrintSink. #253 and [BitSail][Docs] fix code highlight #285 (comment)
Please add tests to make sure the connector is working properly

I have modified, please help me review de code, thx @liuxiaocs7

Thanks for you suggestions, I hava optimized my code ,please help me review the code ! @garyli1019


Add models to components

We could add models which calculate output values like solar transmission and heat transfer based on input values and parameters like irradiance and slat tilt angle. A model could be defined directly in component by a reference or by a repository. It could also be defined as a service. In this case, it would be helpful to define schemas for each input, parameter and output value.
Until November 2021, we focus on the core functionalities. After that, we can continue to work on this issue.

After November 2021, models could be added to optical, calorimetric, ... by adding the property
  "models": {
    "type": "array",
    "items": {
      "title": "A model receives arguments and source data and generates result data.",
      "type": "object",
      "properties": {
        "method": {
          "$ref": "#/$defs/method",
          "description": "Method which describes the model."
        },
        "arguments": {
            "$ref": "https://json-schema.org/draft/2019-09/schema",
            "description": "JSON schema for the arguments of the model."
        },
        "sources": {
          "$ref": "https://json-schema.org/draft/2019-09/schema",
            "description": "JSON schema for the source data of the model."
        },
        "results": {
          "$ref": "https://json-schema.org/draft/2019-09/schema",
            "description": "JSON schema for the result data of the model."
        }
      },
      "additionalProperties": false,
      "required": ["method", "arguments", "sources"]
    },
    "minItems": 1
  },

This is similar to appliedMethod, but differs regarding arguments, sources and results.


When building a images, you can build a images without filling the required fields

In GitLab by @luotian-github on Nov 9, 2017, 10:10
If you are reporting a problem, please make sure the following information are provided:

Version of board (last git commit number) , docker engine and docker-compose.
Config files of board, you can get them by packaging "board.cfg" and files in the same directory, including subdirectory.
Log files, you can get them by package the /var/log/board/.
Other necessery information.

In GitLab by @liyanq528 on Nov 8, 2019, 07:40
please repeat it with new version;

In GitLab by @luotian-github on Nov 8, 2019, 07:40
The lack of judgment on the required items, resulting in no fill can also build a image

In GitLab by @sokril on Nov 8, 2019, 08:14
closed

In GitLab by @sokril on Nov 8, 2019, 08:14
assigned to @liyanq528


[ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory

I executed "npm run build" and receive
CLI Building entry: src/bin.ts, src/cli.ts, src/index.ts, src/shared/auth.ts, src/shared/gsc.ts, src/shared/index.ts, src/shared/sitemap.ts, src/shared/types.ts, src/shared/utils.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.0.2
CLI Using tsup config: xxxxxxxxxxxxx/google-indexing-script/tsup.config.ts
CLI Target: esnext
CLI Cleaning output folder
CJS Build start
ESM You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
CJS dist/shared/utils.js       355.00 B
CJS dist/bin.js                401.00 B
CJS dist/cli.js                460.00 B
CJS dist/chunk-LWWEROSD.js     388.00 B
CJS dist/index.js              1.08 KB
CJS dist/chunk-LBCQ44KW.js     4.51 KB
CJS dist/shared/auth.js        271.00 B
CJS dist/shared/gsc.js         579.00 B
CJS dist/shared/index.js       1.02 KB
CJS dist/chunk-75CVEFN6.js     669.00 B
CJS dist/chunk-74KA7FXM.js     1.43 KB
CJS dist/chunk-2MKILNFN.js     3.54 KB
CJS dist/shared/sitemap.js     307.00 B
CJS dist/chunk-MEQJBOPJ.js     1.36 KB
CJS dist/chunk-TTTS3QMW.js     807.00 B
CJS dist/shared/types.js       264.00 B
CJS dist/chunk-XL3RXX4H.js     708.00 B
CJS dist/chunk-IL7T5FML.js     692.00 B
CJS dist/shared/utils.js.map   51.00 B
CJS dist/bin.js.map            136.00 B
CJS dist/cli.js.map            51.00 B
CJS dist/chunk-LWWEROSD.js.map 230.00 B
CJS dist/index.js.map          51.00 B
CJS dist/chunk-LBCQ44KW.js.map 8.75 KB
CJS dist/shared/auth.js.map    51.00 B
CJS dist/shared/gsc.js.map     51.00 B
CJS dist/shared/index.js.map   51.00 B
CJS dist/chunk-75CVEFN6.js.map 376.00 B
CJS dist/chunk-74KA7FXM.js.map 2.72 KB
CJS dist/chunk-2MKILNFN.js.map 7.01 KB
CJS dist/shared/sitemap.js.map 51.00 B
CJS dist/chunk-MEQJBOPJ.js.map 2.68 KB
CJS dist/chunk-TTTS3QMW.js.map 2.76 KB
CJS dist/shared/types.js.map   51.00 B
CJS dist/chunk-XL3RXX4H.js.map 841.00 B
CJS dist/chunk-IL7T5FML.js.map 51.00 B
CJS ⚡ Build success in 225ms
DTS Build start
node:events:492
throw er; // Unhandled 'error' event
^
Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
at [kOnExit] (node:internal/worker:313:26)
at Worker..onexit (node:internal/worker:229:20)
Emitted 'error' event on Worker instance at:
at [kOnExit] (node:internal/worker:313:12)
at Worker..onexit (node:internal/worker:229:20) {
code: 'ERR_WORKER_OUT_OF_MEMORY'
}

Hey @kaltsturm,
You actually need to increase the memory limit of js heap, one possible way to do it is to set NODE_OPTIONS env variable to NODE_OPTIONS="--max_old_space_size=4096", it will sets the maximum heap size to 4 GB. Adjust the value according to your worker capabilities.


data prepare

if i want to train my own model
what ingredients should i prepared??

Have a look at the demo voices (egs/slt_arctic/s1/) and see what's happening in 'experiments'.
You basically need to:

copy the content of 'egs/slt_arctic/s1/' to 'egs/mynewvoice/s1/'
adapt the configuration scripts in 'egs/mynewvoice/s1/'
compute the features of your new voice (lf0, bap, mgc)
generate the state-aligned labels (you can use those from HTS)
put features labels in 'egs/mynewvoice/s1/experiments/mynewvoice_dnn_world/acoustic_model/data'
run Merlin: ./scripts/submit.sh ${MerlinDir}/src/run_merlin.py conf/acoustic_configfile.conf
(and similarly for the duration model)
(I think there should be a tutorial coming at some point for this)

and you can have a look at #18 also.

Are state-aligned label necessary, or is it possible to train using only phone-aligned labels?

state-alignments are not compulsory. You can even use phone alignments.
change Labels to phone_align in conf/global_settings.conf and re-create all the configuration files.

Possible bug? Let me know if you want this in a separate issue.
I changed to phone_align in conf/global_settings.conf and re-created all the configuration files.
The value for label_type was not updated automatically inside of duration config files (duration.conf and test_dur_synth.conf). In other words, it remained state_align even though I changed my global config file. However, it did correctly change automatically in acoustic.conf and test_synth.conf. I was running scripts/prepare_config_files.sh and prepare_config_files_for_synthesis.sh

Are you using latest commit. If not, please update. I found this bug two days before and fixed it.

Ok thanks. I just pulled down and used the latest commit and now it does work for prepare_config_files.sh, but it did not work for prepare_config_files_for_synthesis.sh.

Can you please check once again? I didn't find anything wrong even with prepare_config_files_for_synthesis.sh when I updated Labels to phone_align in conf/global_settings.cfg

Ok yes I confirm the prepare_config_files_* scripts are fixed.

Some steps for data preparation and model building:
https://github.com/CSTR-Edinburgh/merlin/wiki/step-by-step-guide-to-train-new-voice


Typo in tmosXcRules.json

There is a minor typo in tmosXcRules.json
For code b432, on line 146. The message should begin with "custom" and not "custome"

this got included in v3.16.0 that just released.  Thank you for the issue


How to align the predicted label with ground truth?

Hi,
Thanks for your amazing work!!
I just wonder how to align the predicted label with the ground truth.
For example, given an input and fixed network, we could do the prediction (fixed) . We could use the argmax function as pseudo labels during training period. However, how could we calculate the mIoU metric with ground truth and predicted results.
as we could assign the pixel belonging to a dog to label "0" when annotating the data set, we could also assign it to label "1", it's not sure.
Thanks~

As what you have done, if the output result is just a black image, the iou will be very high. So i don't think your evaluation code is reasonable.🙊

As what you have done, if the output result is just a black image, the iou will be very high. So i don't think your evaluation code is reasonable.🙊

Hi,
Please see #2 for our evaluation code.

Hi,
Please see #2 for our evaluation code.

Yup, the iou with a blank image will be rather high when the ground truth segments are large. Here are the comparison of mIOU with a blank image and our method.
BSD500:
            Blank    Proposed
All        0.0458    0.3050
Fine      0.0249    0.2592
Coarse  0.1001    0.3739
VOC2012:
Blank    Proposed    Proposed+scribbles
0.2972    0.3520        0.6174
Thanks,
Asako
On 2021/01/05 9:03, Tiankai Hang wrote:

As what you have done, if the output result is just a black image, the iou will be very high. So i don't think your evaluation code is reasonable.🙊
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/kanezaki/pytorch-unsupervised-segmentation-tip/issues/6#issuecomment-754299366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU3GJSZ3ZQMC55D4MHV4LSYJJO5ANCNFSM4VNFQAOQ.

Yup, the iou with a blank image will be rather high when the ground truth segments are large. Here are the comparison of mIOU with a blank image and our method.
BSD500:
            Blank    Proposed
All        0.0458    0.3050
Fine      0.0249    0.2592
Coarse  0.1001    0.3739
VOC2012:
Blank    Proposed    Proposed+scribbles
0.2972    0.3520        0.6174
Thanks,
Asako
On 2021/01/05 9:03, Tiankai Hang wrote:

As what you have done, if the output result is just a black image, the iou will be very high. So i don't think your evaluation code is reasonable.🙊
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/kanezaki/pytorch-unsupervised-segmentation-tip/issues/6#issuecomment-754299366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU3GJSZ3ZQMC55D4MHV4LSYJJO5ANCNFSM4VNFQAOQ.

Oh, thanks for your kind answer!!
But why the blank result is so low (near zero, supposed to be near 1).... (Maybe my question is a little bit stupid).

Oh, thanks for your kind answer!!
But why the blank result is so low (near zero, supposed to be near 1).... (Maybe my question is a little bit stupid).

A blank image can be regarded as a single large segment. IoU of a large segment and a small segment is low (near zero).

A blank image can be regarded as a single large segment. IoU of a large segment and a small segment is low (near zero).

Yup, the iou with a blank image will be rather high when the ground truth segments are large. Here are the comparison of mIOU with a blank image and our method. BSD500:             Blank    Proposed All        0.0458    0.3050 Fine      0.0249    0.2592 Coarse  0.1001    0.3739 VOC2012: Blank    Proposed    Proposed+scribbles 0.2972    0.3520        0.6174 Thanks, Asako
…
On 2021/01/05 9:03, Tiankai Hang wrote: As what you have done, if the output result is just a black image, the iou will be very high. So i don't think your evaluation code is reasonable.🙊 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#6 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU3GJSZ3ZQMC55D4MHV4LSYJJO5ANCNFSM4VNFQAOQ.

i relabelling using my code, and the result is a difference


Cli/batch inference

first attempt to make separate CLI for each step. This PR focuses on the batch inference. After iterating this, we can apply the same thing for other steps.

changes are made to address your comments

@sayakpaul
now, record sha instead of branch name!
i.e. https://huggingface.co/datasets/chansung/lm_response_test


Missing context information for Event: JSON representation exceeds the body size limit XXX;

I have a question about the "eventBodyLimitBytes" attribute of Serilog. Unfortunately, there are places in our code that lead to an event that exceeds the limit. Unfortunately, the entire context of what was actually logged is lost in the retroactive view. Is there a practicable way to prevent this other than manually truncate the event in the code?
Thank you and best regards
Fynn

Hi @FynnNikolaus
You can set eventBodyLimitBytes to a higher value, with the consequence that the events sent to Seq will be larger. Note that Seq also places configurable limits on the size of events.
If possible, manually truncating the event before sending is the best solution.

Hey @liammclennan ,
thank you for your quick answer.
I think that the default value of 256kb makes sense. If the Seq limit takes effect, the event is no longer displayed on the interface, which is not exactly advantageous.
In our log there are 5 - 7 places where such an error often occurs. At every point where such an error occurs in the past, I would like to truncate the event.
However, I don't like the fact that the context is lost when the error occurs. So you can only find out where the error occurred and not what happened. Such an error can also happen because the user makes a special data query that can no longer be reproduce afterwards. Can the truncate be done at a central location?
I have tried the following approach, which I don't like and doesn't work:

I cannot access the complete event in the TryDestructure() method and therefore I cannot truncate it at this point.
At the point where the error is logged, I can of course make a trancate, but logically I don't know every point where such a problem could potentially occur.
Thanks for your help!

It is probably best to manually build your log data, instead of serializing arbitrarily large objects.

Thanks again for raising this @FynnNikolaus; we've reviewed this again and think that controlling this at the point the entity is logged will be the better solution here. If you're still running into any issues though or need help figuring out what that might look like, please let us know.


Theming and Custom Styling

The following colors need to be customizable. Does a theme context like MUI make the most sense for this?

Can it just be done via css?


handle no resource file in APK

Please remove this template if you only have a question or do not want to create a new issue.
Describe what you wanted to do
get the icon from an APK where the resource file is missing / could not be parsed:
    icon = a.get_app_icon()
  File "/usr/local/lib/python3.5/dist-packages/androguard/core/bytecodes/apk.py", line 301, in get_app_icon
    res_id = self.get_android_resources().get_res_id_by_key(self.package, 'mipmap', 'ic_launcher')
AttributeError: 'NoneType' object has no attribute 'get_res_id_by_key'

Describe what you expected
icon should at least return None but not raise an Error
Describe what actually happened
error is raised.
System Information

Androguard Version: master
Python Version: 3.5
Operating System: linux

@reox we only check first if self.get_android_resources() is None or not and accordingly proceed.

yes, that would be the solution. We need also check where the resource file is queried and no None check is made.


Tools: fix fpgainfo mac command to prints  mac count and address list.

Print mac info function reads mac address and mac count from sysfs and prints mac info
cat  /sys/class/fpga_region/region0/dfl-fme.0/dfl_dev.2/mac_count  8
cat  /sys/class/fpga_region/region0/dfl-fme.0/dfl_dev.2/mac_address  78:56:34:12:ab:90
sudo ./bin/fpgainfo mac
FPGA SmartNIC N6010 Card
Board Management Controller, MAX10 NIOS FW version: 0.2.0
Board Management Controller, MAX10 Build version: 0.2.0
//****** MAC ******//
Object Id                        : 0xEF00000
PCIe s:b:d.f                     : 0000:B1:00.0
Device Id                        : 0xBCCE
Socket Id                        : 0x00
Ports Num                        : -527316905
Bitstream Id                     : 0x10005
Bitstream Version                : 0.0.0
Pr Interface Id                  : 0e7f3e69-0ca3-5a17-858c-8bd1e8ac621e
Number of MACs                   : 8
MAC address 0                    : 78:56:34:12:AB:90
MAC address 1                    : 78:56:34:12:AB:91
MAC address 2                    : 78:56:34:12:AB:92
MAC address 3                    : 78:56:34:12:AB:93
MAC address 4                    : 78:56:34:12:AB:94
MAC address 5                    : 78:56:34:12:AB:95
MAC address 6                    : 78:56:34:12:AB:96
MAC address 7                    : 78:56:34:12:AB:97
Signed-off-by: anandaravuri<EMAIL_ADDRESS>

Coverage increased (+0.09%) to 63.295% when pulling 0f84625a12446f3bc701349fd0bf14b86cde7c6d on aravuri/fix_mac into b3f5520979ffcdd2787616692449ad719f7cdac7 on master.


Mark Walls and Gates as paywalled

In the Graphs section, Walls and Gates should be listed as premium-only.

Thanks for letting me know, will get this fixed.


Open things on the correct $DISPLAY.

This may be an upstream issue, but here it is anyway: if I'm running multiple X servers on different ttys, there's a chance that the file dialog I request pops up on the wrong X server. I'm running arch linux, and it uses per-user (as opposed to per-session) dbus daemons.
Steps to reproduce:

Clone the repo here
Run two X servers on different ttys.
 If the file dialog shows up, switch to the other tty and repeat. At least one of them will show the file dialog on the other tty.

Do you have a parent window that would be in different tty or none at all?

In this linked example, I have no parent window. But I have other very-much-not-minimal examples (in particular, the open_save example in this PR, which isn't currently using ashpd but I have a local branch where it is) where I am setting a parent window and still see the bad cross-tty behavior. But maybe I'm setting the parent window wrong? I was following the documentation here, but IIUC XIDs are not unique across different instances of the X server, and I don't see any way to specify the DISPLAY.

That's probably an issue on the xdg-desktop-portals/whatever compositor you're running side. ashpd doesn't do much other doing the dbus calls while providing a nice rust wrappers around the various things.
I don't know much about x11 so I can't really help here

Also, super cool to see that PR. Please let me know if there's something I can provide in the next release to help you with that/simplify things for you on that regards :)

Thanks! I've opened an issue with xdg-desktop-portals.
I think the main things I was wanting from ashpd is #11 (which I'm still planning to look into eventually), plus maybe some indication that the API is settled-ish. It's always hard to know about that when the version number is so low :)

I think the main things I was wanting from ashpd is #11 (which I'm still planning to look into eventually), plus maybe some indication that the API is settled-ish. It's always hard to know about that when the version number is so low :)

I'm planning to do more cleanup once zbus 2.0 is out, drop the sync variant of the portals and finish up the demo application which should be a good enough test case for ensuring the various portals are working as expected.
Once that's done, I'm going to do a new "major" release and mark it as stable enough for wider use cases.


Make text bold with bold div

With Semantic is it possible to make it so that instead of writing custom css for text to make it bold you can add the class bold please can you let me know if this is already possible or if you think this is a good idea (probably not the first to think of it) thanks

Hi @jackttcoms, there’re no classes to allow that out of the box, but you can add your own; in the end, it’s just CSS, and SUI is designed to be extended—please refer to the theming guide.


Add project Phu Quoc Dog

Project Abstract
Decentralized dogs social network, it is the best social network for pets, where you can share photos and videos of your pet's life, rescue puppies, adopt a pet, find pet friendly places and take advantage of our useful pet services. Join the moon mission
For which grant level are you applying?

[ ] Level 1:  Up to $10,000, 2 approvals
[x] Level 2:  Up to $50,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for > $100k Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied, renamed ( project_name.md) and updated.
[x] A BTC or Ethereum (DAI/USDT) address for the payment of the milestones is provided inside the application.
[x] I have read and acknowledged the terms and conditions.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for the application. However, we only support the development of open source software and research via our grants program, that doesn’t already exist in our ecosystem. I’m therefore closing the pull request. Your first two milestones contain no new development and rather focuses simply on creating your own chain, which isn’t beneficial for anyone else in our ecosystem.  If you are developing something technically unique, I suggest you apply again with an application that focuses on the new technology you plan to develop for your use-cases, which might also be beneficial for others in our ecosystem.

@Noc2 Thank you for suggestions. I know this project not fix for Polkadot system. But we have build on Substrate .Could you give me the link to apply this part Substrate . Thanks

Sorry, I’m not sure I understand what you are trying to say. Feel free to take a look at other successful application: https://github.com/w3f/Grants-Program/tree/master/applications as well as our https://github.com/w3f/Grants-Program/blob/master/docs/faq.md


Error 6: The handle is invalid

Trying to launch a process, kill it if it times out, kill it if the process that launched it is interrupted. When it dies, it should take its descendants with it. It's working for me on my mac and on Travis (CI for Linux), but not on AppVeyor (CI for Windows). While tweaking different things, I've also seen error 5, "Access is denied" and I've had it just kill the tests without a backtrace when I tried stopping the child process and rescuing any ChildProcess::Errors from invalid handles.

I've recreated the issue so that it can be analyzed without the distraction of my gem.
It fails on AppVeyor (Windows)
It passes on Travis (Linux)

It seems the error occurs when you call stop after having called wait. When I added this test to your suite (screenshot b/c I don't know how to copy/paste through the VM barrier):

It blew up on the line where I called stop in the same way that my tests are:

I'm calling stop because it was leaving orphan processes before. But I'll see if there's not a way to get all my tests passing in both environments.

Okay, got all the tests passing on windows and unix. Note that I do have to explicitly check what system I'm on

In the test to see how to detect whether the process is running.
In the implementation to see whether I need to call stop or not (if I don't call it, Unix leaves orphans, if I do call it, Windows blows up, but I do need to call it on Windows when there is an error like an interrupt)

@JoshCheek Okay. As you have already figured out, the problem does seem to stem from your code calling Process#stop after calling Process#wait. Essentially, you are telling the OS to kill a process that doesn't exist anymore and Windows particularly seems to not like that.
Rather than have the extra OS checks and lower level implementation, have you tried using Process#exited? in order to see if you still need to call stop? That should be more consistent across operating systems.

@JoshCheek Okay. As you have already figured out, the problem does seem to stem from your code calling Process#stop after calling Process#wait. Essentially, you are telling the OS to kill a process that doesn't exist anymore and Windows particularly seems to not like that.
Rather than have the extra OS checks and lower level implementation, have you tried using Process#exited? in order to see if you still need to call stop? That should be more consistent across operating systems.

@JoshCheek Did you get a chance to check out Process.exited??

I did try it but I didn't go with it. I don't remember why. Should have come back and updated the issue at that time.
I feel like it didn't work the way I needed it to (I have a vague memory that if I asked before calling #wait, that it would cause #wait to error instead and that I sometimes needed to be able to call it before calling #wait). But that could be a false memory. I seem to also remember reordering the code to where I didn't have the need for it, but I can't say if that's the reason I didn't use it, or if I did that because it wasn't working as expected. I also switched to posix spawn, which I think was a separate thing after the fact, but could have been related. Not super helpful, I know >.<

So...reasons. Got it. ;)
At this point, is there still an issue that you need fixed? If not, feel free to close this Issue. If so, feel free to post another update that will help get you and I on the same page so that we can tackle stuff.

I don't currently have an issue. Hopefully I've left enough breadcrumbs that anyone who hits this later can find and follow.


Configure sensitivity

In my application, I have a requirement to make slides more responsible. I think it would be better for everybody to have a property to customize hysteresis behavior. Current behavior is preserved as defaultProp value.

Done.

@just-boris Thanks!

@oliviertassinari could you make a new realease, please?
Currently, I depend on my fork to have this feature.

@just-boris Yes, I'm on it.


[5.0] JSON options support in Model

Currently JSON encoding options are only applied on converting model to JSON but not on JSON castable attributes.
This patch allows to set JSON casting options globally by calling Model::setJsonOptions(...)
Compatibility can be broken only if the new feature is being used but it remains ok if the feature is not touched.

Should go to master.


please tell us which term page....

clicking on the link to gene products  takes you to this page

but nowhere on this page does it tell you which term you are looking at. I have noticed this before and found it annoying, but I wanted to use this in a screenshot. it seems crazy that the term name isn't visible.

@ValWood Apologies--as the page that is jumped to is merely a "pinned" gene product search page, it follows that page's conventions as if you had navigated there manually using the regulates_closure with an ID: GO:0051256, and how it is listed on the page. The listed gene products are all gene products that have the pinned term in their regulates closure, but as the gene product pages are saved as an aggregate, without access to the annotations, they are not separately listed in the table (for that, you would want the annotation page).
One change that could maybe be made, would be to pin to the label rather than the ID, giving you a better way to orient yourself. The downside of that is that bookmarks are less compact.


DEP: remove the erf() and erfc() function, fixes #1738

Hello Professor/Tutor, I'm using git commands in the VSCode terminal. Compared to the original project, there appears to be a significant number of changes (of course, it's impossible for me to have made so many changes, as my task was merely to remove two functions), but I can't discern any differences between the two. Could you advise on how this should be resolved?

Thank you Professor Huttley. It's a matter of line breaks, I will change the Windows style line breaks to Unix style.


Fix packing logic error in GenImageFontAtlas

Basic packing algorithm currently follows this order:
Copy pixel data -> Move offsetX for current glyph -> Check remaining space for current glyph...
Since X offset already moved according current glyph, remaining space should be checked for next glyph. Because of this, occasionally, current logic causes glyphs wrapping around texture.
Proposed fix accomplishes that by moving offsetX check to the beginning of the loop.

An example for the font OpenSans-Regular.ttf with current logic:
(The letter m in the texture is wrapped around)

And after proposed fix:

@hanaxar Good catch for the issue! And thanks again for the improvement!


cmp/cmpopts: use errors.Is with ≥go1.13 in compareErrors

Use the standard definition of errors.Is to implement compareErrors with
≥go1.13. Retain the implementation using golang.org/x/xerrors for versions <go1.13.
This will allow packages using newer Go versions and already relying on
the errors package to get rid of the transitive dependency on
golang.org/x/xerrors.

I see that previously #225 and #243 attempted to get rid of the golang.org/x/xerrors as well. However it looks like these weren't accepted based on the fact that they broke cmp for Go versions older than 1.13, while this PR retains compatibility for older versions.

What's the effect of this PR on the go.mod file?

What's the effect of this PR on the go.mod file?

As far as I can tell there will be no effect on the go.mod file because cmp/cmpopts/util_test.go still uses xerrors unconditionally. Running go mod tidy doesn't change go.mod or go.sum.
However, a package importing cmp which uses go1 .13 or newer in go.mod should no longer see an indirect dependency on xerrors.

The presence of xerrors in the go.mod file is unfortunate especially since older versions of Go (which is why the dependency even needs to exist) don't use Go modules.
Anyways, I agree this change in a step in the direction we want to go.


Add support download latest index metadata from remote

Description

Adds support to download latest IndexMetadata from remote cluster state.
Please skip the changes in ClusterMetadataMarker file as it is part of the upload PR - https://github.com/opensearch-project/OpenSearch/pull/9160/files

Related Issues
Resolves #[Issue number to be closed when this PR is merged]

Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Test Failures
org.opensearch.remotestore.RemoteIndexRecoveryIT.testRerouteRecovery -- already muted in main
org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testIndexDeletionDuringSnapshotCreationInQueue -- Other PR where this is failing https://github.com/opensearch-project/OpenSearch/pull/9667#issuecomment-1702148537
org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testAfterCommit -- https://github.com/opensearch-project/OpenSearch/issues/8947


feature request: underscore for last answer

Hi, can _ be added as an alias for the last answer? _ is used in python for the last result, and be shorter to type than ans.
Side question: what is the ds unit? I could not find any reference to ds in the wiki.

Hi @Dialga,
Thanks for the suggestion!  I will see if the _ character conflicts with any built in function or syntax.  If not, should be easy to implement.
As for the ds, d is the abbreviation for deci with a value of 1e-1.  And s is short for seconds so 1 ds is equal to 0.1 s.  For example, you can try 1 ds to s  // 0.1 s
There are many other prefixes like this.  I will update the documentation to include them.  In the meantime, you can refer to https://mathjs.org/docs/datatypes/units.html#prefixes for the complete list.

_ is now available in v5.1.0.  Thanks for the request and please let me know if you find any bugs.


Create a rounded text-icon-rear-button-rounded.html

One need to make this component using HTML and Tailwind CSS. I would suggest to use Tailwind Playgrounds to make things faster and quicker.
Here is a reference to the component.
You need to follow the design system of the button ➡ Button Design system
Make the rounded version of this Secondary Button
After building the component please raise a PR with a screenshot of the component and add the component in Button/src/Secondary/text-icon-rear-button.html.
If you need to use any icon please use it from Hero Icons
Good luck.

I'd like to work on this issue.

Sure go ahead. @pranavjainjs

I came up with this design. Let me know if you need any modifications.

This looks good but you don't need to come up with any design. Just go here Button/src/Secondary/text-icon-rear-button.html and make a rounded version of it.
Make the rouded-full and that will be okay I guess. @pranavjainjs

I have completed the task and made a pull request.


Codegen: add C# support for Agent bindings

This PR attempts to add C# support to codegen in order to facilitate smooth development of Cody and Agent in Visual Studio.

Updated Codegen to convert TypeScript interfaces/types into C# for use in Visual Studio
Updated the agent/scripts/generate-agent-kotlin-bindings.sh script to support generating bindings with different arguments for different clients
Renamed agent/scripts/generate-agent-kotlin-bindings.sh to agent/scripts/generate-agent-bindings.sh

I tried not to touch the existing logic for Kotlin and Java in the codegen code by adding additional if-else statements for csharp, but if you spot any issues with my change please let me know 😄
WIP: working on fixing the error for the existing code if any
Test plan

Run the current command for generating Agent bindings for kotlin is still working correctly with no diff:
 pnpm generate-agent-kotlin-bindings

Run the same command with env vars set to confirm it generates bindings in C#, something we can use for Visual Studio:
OUT_LANG=csharp OUT_DIR=agent/bindings/csharp NAMESPACE=Cody.Core.Agent.Protocol pnpm generate-agent-kotlin-bindings

Example output:

See full results in https://github.com/sourcegraph/cody/compare/bee/codegen-csharp-result
Changelog

@abeatrix the WebviewMessagesEnum Object-encoded, String-encoded names aren't valid identifiers because of the hyphens.
Here's the relevant part of the C# spec: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#643-identifiers

@abeatrix the WebviewMessagesEnum Object-encoded, String-encoded names aren't valid identifiers because of the hyphens.
Here's the relevant part of the C# spec: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#643-identifiers

This enum was the exact same issue we ran into last week that motivated me to work on this 😂
will work on the feedback tomorrow, thank you!

Thank you for doing this! 🙏🏻

Some comments on the generated code:
We use Json.Net as the serialization library. System.Text.Json is newer, but we have to use what the Visual Studio SDK provides.
Technically, we don't need to use JsonPropertyName because serializer follows the camel case naming convention. If we want to add an attribute, let's use JsonProperty instead:
[JsonPropertyName("FooBar")] -> [JsonProperty(PropertyName = "FooBar")]
Return type can't be Task please use Task
Task<Void> -> Task
same goes to parameters
Task<AuthStatus> extensionConfigurationstatus(Void params) -> Task<AuthStatus> extensionConfigurationstatus()
for methods definitions please use pascal case:
void autocompletecompletionAccepted(CompletionItemParams params); -> void AutocompleteCompletionAccepted(CompletionItemParams params);
for enums please use 'EnumMember'
[JsonPropertyName("workspace")] -> [EnumMember(Value="workspace")]
I found several places where the name was incorrectly translated into C#. We need to remove special characters such as spaces and hyphens. The code should look something like this:
'string.Join("", zm.Split(' ','-').Select((x => char.ToUpper(x[0]) + x.Substring(1))));'

Thanks for the reviews ya'll! I've updated the PR based on all the helpful feedback. You can find the latest results in https://github.com/sourcegraph/cody/compare/bee/codegen-csharp-result
Please let me know if you spot anything unusual @tomaszgolebiowski !
Here is an example after the change
using System.Text.Json.Serialization;

namespace Cody.Core.Agent.Protocol
{
  public class CompletionItemInfo
  {
    [JsonProperty(PropertyName = "parseErrorCount")]
    public int ParseErrorCount { get; set; }
    [JsonProperty(PropertyName = "lineTruncatedCount")]
    public int LineTruncatedCount { get; set; }
    [JsonProperty(PropertyName = "truncatedWith")]
    public string TruncatedWith { get; set; } // Oneof: tree-sitter, indentation
    [JsonProperty(PropertyName = "nodeTypes")]
    public NodeTypesParams NodeTypes { get; set; }
    [JsonProperty(PropertyName = "nodeTypesWithCompletion")]
    public NodeTypesWithCompletionParams NodeTypesWithCompletion { get; set; }
    [JsonProperty(PropertyName = "lineCount")]
    public int LineCount { get; set; }
    [JsonProperty(PropertyName = "charCount")]
    public int CharCount { get; set; }
    [JsonProperty(PropertyName = "insertText")]
    public string InsertText { get; set; }
    [JsonProperty(PropertyName = "stopReason")]
    public string StopReason { get; set; }
  }
}

P.S: I'll be OOO next week so will have to pick it up when I'm back if there is any issues with the new changes

Merging so that we can start integrating this into Visual Studio, and will make improvements as we go.


add ability to 3.3 to read compressed AqlItemBlocks

but not the ability to produce them. This way we can support
running 3.3 as part of a mixed 3.3/3.4 cluster, and do not
break any clusters that run mixed versions of 3.3 current and
either 3.2 or 3.3 older versions

http://jenkins01.arangodb.biz:8080/view/PR/job/arangodb-matrix-pr/1137/


test: Oracle endblocker validator reward test

Description

Found a bug when calculating reward factor where the maximum misscounters being used was the maximum amount of misses possible in a vote period rather than a slash window. This PR fixes it.
Updated vote threshold enforcing to calculate denom power ratio with sdk.NewDecWithPrec()
closes: #66

Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...

[ ] included the correct type prefix in the PR title
[ ] added ! to the type prefix if API or client breaking change
[ ] added appropriate labels to the PR
[ ] targeted the correct branch
[ ] provided a link to the relevant issue or specification
[ ] added a changelog entry to CHANGELOG.md
[ ] included comments for documenting Go code
[ ] updated the relevant documentation or specification
[ ] reviewed "Files changed" and left comments if necessary
[ ] confirmed all CI checks have passed

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] confirmed the correct type prefix in the PR title
[ ] confirmed all author checklist items have been addressed
[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] reviewed documentation is accurate
[ ] reviewed tests and test coverage
[ ] manually tested (if applicable)

Codecov Report

Merging #70 (cfd074a) into main (5f88227) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   16.61%   16.61%
=======================================
  Files          31       31
  Lines        8777     8777
=======================================
  Hits         1458     1458
  Misses       7272     7272
  Partials       47       47

Impacted Files
Coverage Δ

x/oracle/abci.go
82.75% <100.00%> (ø)

x/oracle/keeper/reward.go
87.93% <100.00%> (ø)

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

I'll be cleaning up some of the sdk.Dec <> float math in https://github.com/ojo-network/ojo/pull/71 - I think some of the messiness in CalculateRewardFactor came from my review, my bad 😅


[DRAFT] [video_player_avfoundation] Split iOS native code into multiple files

This PR splits iOS native code into multiple files. Specifically, it extracts FVPVideoPlayer and FVPFrameUpdater from FVPVideoPlayerPlugin.m file, and puts them into separate files (.h and .m). This should make it easier to maintain the code and add new features in the future (e.g. support for platform views which is mentioned in 86613.
In order for the code to compile, I had to add some methods to the interface of FVPVideoPlayer.
Related issues:

#86613 This PR does not fix the issue, it only refactors some parts of code, so that it is easier in the future to add support for platform views (the git diff will be cleaner when we modify the code to support it - only related changes would show up then). If you'd like me to create a new issue, specifically for splitting the native code into files, let me know.

Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
[ ] I signed the CLA. In progress
[x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
[x] I linked to at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
[x] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Closing as the main PR (in flutter/packages) was merged into main


Add Pull Request Template

Should provide info from the readme about the live/master branches to clarify how to do live fixes.
Also should have a checklist for new feature docs (like adding a line to the toc, having the link to the generated API docs, etc...).

@Kyaa-dost we added this now, eh? Think we just forgot to link back to this issue to close?

@michael-hawker correct this is complete. Thanks for pointing this out 👍👍


Renterd fails to start if pinned price conversion fails

Got this error on my node. If we can't fetch a rate we should probably just keep the prices the way they are and try again later.
2024-07-11T13:20:28Z    FATAL   failed to setup bus: failed to fetch exchange rate for 'usd': unexpected status code: 525

Yes, autopilot seems not start again after uploads failed.

Autopilot just notifies that uploads fail by st (like size storage, not clear at price)
It just stops forever with 100% (not upload to network yet)
If I tried to upload the same (when conditions were fine), it would keep old failed one after all. This means I must delete old one to see the new one uploaded successfully, or just see both at 100% status like above.

This is not safe for files upload, speacially in case that many files unfollowed by me.
This is better if autopilot could change price on suggestion to keep uploads not failed automatically.


Nan breaking node-opencv build

The latest update to nan is breaking node-opencv
https://github.com/peterbraden/node-opencv/issues/210
I don't know if it is reasonable to report that here, but I'm hoping someone could advise on how to solve the problem.

It is reasonable to report here, but I believe the error is on opencv's end. The error comes from trying to make a v8::Integer from a long unsigned int. V8 does not support 64-bit integers. You need to downcast to 32 bit. Previously this may have happened implicitly, which was not really proper.
If long is not 64 bit in this case, the problem is likely on our end and needs a small fix.
On January 15, 2015 12:07:50 AM EET, Simon Hill<EMAIL_ADDRESS>wrote:

The latest update to nan is breaking node-opencv
https://github.com/peterbraden/node-opencv/issues/210
I don't know if it is reasonable to report that here, but I'm hoping
someone could advise on how to solve the problem.

Reply to this email directly or view it on GitHub:
https://github.com/rvagg/nan/issues/229

Oh, if you just need it installed right now, you can patch package.json in node-opencv and make it use "nan": "~1.4.1" instead of "nan": "^1.3.0", which resolves to 1.5.0 for no good reason.

Great, thank you.
On Wednesday, January 14, 2015, Benjamin Byholm<EMAIL_ADDRESS>wrote:

Oh, if you just need it installed right now, you can patch package.json in
node-opencv and make it use "nan": "~1.4.1" instead of "nan": "^1.3.0",
which resolves to 1.5.0 for no good reason.
—
Reply to this email directly or view it on GitHub
https://github.com/rvagg/nan/issues/229#issuecomment-70017884.

thanks @metalaureate  & @kkoopa saved me a lot of time on this.


Update styles for mobile and fullscreen surveys (FOR-39)

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Popover auto dismiss focus of active element by default

Ionic version:  (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ...  (check one with "x")
[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
When opening a popover from PopoverController, the default behavior is to automatically blur any focused element. Sometimes, it is not a wanted behavior.
Expected behavior:
An option should be available to tell the PopoverCmp if we want to dismiss automatically focus or not.
Steps to reproduce:
A typical use-case, is opening a popover when the user focus an input field. The popover is showing extra-information related to the user input and should be dismissed when the input field focus is removed. In this situation, we want to keep the focus in the input field (unless the user explicitly change the focus).
Other information:
I was able to 'patch' the PopoverCmp in a hackish way to accomplish what I wanted (getting rid of the code disabling active focus):
let popover = popoverCtrl.create(...);
popover.component.prototype.ionViewPreLoad = function() {
this._load(this._navParams.data.component);
};
But a dedicated option 'dontBlurFocus' would be much better/safer on the long run (defaulting to false, so the default behavior would be the same as now).

duplicate symbol OBJC_IVAR$_APPLocalNotification.deviceready in:
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a748ec1072cf45651f2b6564649f8c77286b.o
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a74876cf0a019d5973dde97ba1ea0d9bf15f.o
duplicate symbol OBJC_CLASS$_APPLocalNotification in:
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a748ec1072cf45651f2b6564649f8c77286b.o
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a74876cf0a019d5973dde97ba1ea0d9bf15f.o
duplicate symbol OBJC_METACLASS$_APPLocalNotification in:
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a748ec1072cf45651f2b6564649f8c77286b.o
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a74876cf0a019d5973dde97ba1ea0d9bf15f.o
duplicate symbol OBJC_IVAR$_APPLocalNotification.eventQueue in:
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a748ec1072cf45651f2b6564649f8c77286b.o
/Users/silicon/Library/Developer/Xcode/DerivedData/DVR-fkgopbggtilucbfhxvkyiibdatcy/Build/Intermediates.noindex/DVR.build/Debug-iphoneos/DVR.build/Objects-normal/arm64/APPLocalNotification-b9bdfeff695ce11db6a601bc1cc9a74876cf0a019d5973dde97ba1ea0d9bf15f.o
ld: 4 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am Getting the above error in xcode for IOS app


Text corrections

Made a few text corrections on the docs.

Thank you for the contribution @criadoperez!


The Virtual Machine doesn't use the entire screen when in fullscreen

Describe the issue
When I start a VM and put it in fullscreen Windows doesn't actually use the entire screen until I go to the other desktop and come back.
Configuration

UTM Version: 2.1.1
OS Version: 11.4
Intel or Apple Silicon? Apple Silicon

video
debug.log

This was likely introduced in the recent release. Previous version didn't have this issue. Tested on a machine with the same parameters as the original reporter.

No, I've had this problem since I started using UTM (I started with version 2.0.23 or 2.0.24).

I have the same problem on my MacBook Air M1.

I am trying this with UTM macOS app on my M2 MacBook Air running windows11 vm. I cannot full screen the VM. What am I missing?

Would like to add my recent experience as well.
Host:
Model Name:       MacBook Pro (M3)
Model Identifier: Mac15,6
UTM:
Version: Unable, see below
UTM does not full screen, nor include the little active dot under in the taskbar like other running applications, nor does the titlebar change to UTM when the application is selected. Dunno if this helps narrow down what might have broken but it is what I have observed.
Functionally the application works as intended. Seems like an host OS integration issue.


tests: http_server: Add missing zephyr_iterable_section

As the test uses iterable sections, we need to utilize zephyr_iterable_section for targets that need linker script generation like arm-clang.
So add zephyr_iterable_section() for the ROM sections that the testcases utilizes.

This is similar to the fix in commit 336803e96f547747b9cec4511d1767c4c30a7b52


moths should be able to eat goats coats

Description
title
if nobody else does it i might in a day or so

try saying that title 3 times fast


Fix parser for examTimetable

So NUS decided to use pdfs instead and this parses the pdfs. Also a change to requestCache by enabling caching of binary files.

Can squash and merge if it's ready. Would be better if can squash, rebase then ff merge but Github doesn't provide that option out of the box :(


Housing info for Subject

Is it possible to get room and cage ids for mice from LabTracks? If so, this would allow us to track light cycle, which would be very valuable.
@mekhlakapoor lmk if that information is not available

Housing info is available: fields cage_id and room_id in animals_common.
Use room_id to map light cycle


Custom td contents

vue-good-table is awesome.
I would like to display some custom content for a column.  I suppose I can do that by passing a function and rendering the html - but that makes me sad.
I would like to be able to supply the td contents using a template:
<vue-good-table :columns='columns' :rows='modems' lineNumbers='true' paginate='true' title='Modems'>
  <template scope='props' slot='table-cell-**field**'>
    <btn v-click='action'>
      {{ field }}
    </btn>
  </template>
</vue-good-table>

where **field** is the column field string.  I'm not sure if the template should be responsible for the td tags or not...

if it is at the beginning or at the end of the columns, you can use 'template-row-before', 'template-row-after'... as described here: https://github.com/xaksis/vue-good-table#additional-columns
if it is in the middle somewhere, then i'm afraid you have to provide a template for all tds
<vue-good-table
  :columns="columns"
  :rows="rows">
  <template slot="table-row" scope="props">
    {{ props.row.name }}
    {{ props.row.age }}
    {{ props.formattedRow.date }}
    {{ props.index }}
  </template>
</vue-good-table>

closing this. Let me know if above hasn't resolved your issue and i'll reopen it.

@xaksis just to confirm: 'template-row-before' and 'template-row-after' got nixed somewhere along the line to the current version, right?

hey @mgd722 yeah. you don't need them anymore. Just supply the column names and then provide the row-template:
https://jsfiddle.net/aks9800/hsf0sqf8/


Invisible bullet points :0

The bullet point's are there when I highlight them...

But not otherwise

I tried digging through the code, but I'm still pretty new to css hehe. I hope you can look into this issue when/if you have the time :)

Hello! Go into the Style Settings for Ultra Lobster. There should be a category called "Type Palettes". You'll find "Bullet Point" under that. Then, key in '-' into the text box. It should appear afterwards.

Oh, it works! I could've sworn I tried that before, but I guess not. Tysm!!


Unix Domain Socket Listeners

Based on: https://github.com/contribsys/einhorn/pull/60
This adds support for Unix Domain Socket listeners.
I'm not super thrilled about all the aspects here, but I wanted to open this sooner, rather than later:

Serializing the ruby class isn't super great
Abstracting all the tests to run against both listener family

I have no idea what a Unix domain socket is. I have no idea why users would want this. Please educate and discuss before throwing a large pull request at an OSS maintainer.

Hey @mperham sorry, I think we had some crossed wires internally! You can ignore this for now, it should be able to get closed out.

While The Manual is terse to say the least, you probably know more than you think!
In fact, the einhorn pid already has a unix domain socket listener for the control socket that einhornsh connects to!
I'll aim to channel Julia Evan's Explanation, but may come up short.
From running the tests, we can see einhorn makes einhorn.sock:
clundquist       49353   0.0  0.1 34782536  28268 s000  S+    3:51PM   0:00.38 einhorn: einhorn -m manual -b <IP_ADDRESS>:56065 --reexec-as=env VAR=b OINK=b bundle exec --keep-file-descriptors einhorn -d /var/folders/7w/_5yxq6ms4wlc6hv117xkws4r0000gn/T/env_printer20220830-49279-nmoaz/einhorn.sock -- ruby /var/folders/7w/_5yxq6ms4wlc6hv117xkws4r0000gn/T/env_printer20220830-49279-nmoaz/env_printer.rb VAR

zooming in .../einhorn.sock is a unix domain socket!
and finding one in the wild here:
ps aux | grep einhorn
# ...
example+     689  0.0  0.0  83480  2860 ?        S    Aug26   0:00  |   |   \_ einhorn: ruby example-srv

sudo lsof -p 689
COMMAND PID      USER   FD      TYPE             DEVICE SIZE/OFF    NODE NAME
# ...
einhorn 689 example    7u     IPv4              25204      0t0     TCP localhost:15555 (LISTEN)
einhorn 689 example    8u     unix 0xffff92d61056e640      0t0   25198 /tmp/einhorn-example-srv.sock type=STREAM
einhorn 689 example    9u     IPv4              25205      0t0     TCP localhost:15556 (LISTEN)

Indeed lsof shows us that FD 8 above is a unix domain socket!
So here we see some examples, but what are they? Why do we care about them? How can they help us solve real problems? All great questions! Let's take them one by one.
What are they?
At a high level, they're a file handle you can read and write from, that (should) have a process on the other side reading and writing back. Remember that, as the above lsof shows, the TCP listeners are also "just file handles where something is reading and writing back"
They're similar to a FIFO or named pipe, but offer some other properties around permissions, ordering, and bidirectional data flow. You can connect a Unix socket, much like with TCP and UDP sockets.
sudo strace -- ruby -e 'require "socket"; UNIXSocket.new("/tmp/einhorn-example-srv.sock")' |& grep -C3 connect
mprotect(0x7f0f4403b000, 4096, PROT_READ) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 5
fcntl(5, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
connect(5, {sa_family=AF_UNIX, sun_path="/tmp/einhorn-example-srv.sock"}, 110) = 0
fstat(5, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f0f47b68090}, {sa_handler=0x7f0f47ebf570, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f0f47b68090}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f0f47b68090}, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f0f47b68090}, 8) = 0

All this to say, they're a way to accept connections, from things that share the same filesystem [namespace].
Why do we care about them?
I think Julia answers this better, but in addition to her explanation, UDS listeners are a bit faster performance wise, and sometimes are a way to side step listening port conflicts. (While there is SO_REUSE_PORT in TCP, in general, only a single process can bind a listening port, causing the dreaded E_ADDR_IN_USE error when the second process tries to listen)
(where as with UDS, you could design things to listening at /var/run/example.<sha>.sock or /deploy/example/<sha>/run/example.sock rather than fighting over port 8080. In fact, Einhorn already does this for when you have multiple services running under einhorn for their distinct control sockets!)
How can they help us solve real problems?
Here is where we get to What I'm Really Trying To Do!
Spoiler: I'm hitting ephemeral port exhaustion
As our tests show, we basically always bind to TCP <IP_ADDRESS>:@port. You've been doing this a minute, and I'm sure long ago you found Ruby (and many other languages), is Not Good at serving index.css. So, you put your favorite web server in front of your app, served the static assets from the web server, then forwarded the dynamic stuff to the app, which listened on localhost, boom, done!
As we both know, Ruby services generally pre-fork, and have a one-process-per-request model. When we're running O(10s) or even O(100s) of Ruby Workers, listening on localhost, this works fine. (The core thing here is, you'll only ever have concurrency equal to the number of app worker pids from einhorn's perspective, unless you have EventMachine wired up just right in your ruby app)
However, let's say we swapped out Ruby for something like Golang or Java. These languages are a bit easier to do threading and concurrency. nginx and proxy_pass will only use http/1.1, which means you use 1 File Descriptor per-conncurrent-request, likewise, if you're using Einhorn to front an L4/TCP service (haproxy, a database, redis, memcached, or something not HTTP), you'll use one file descriptor per-connection.
Let's stick to the nginx example.
sudo netstat -plant | grep 15555 | grep example | head
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:47244         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:47272         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:50510         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:49380         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:47232         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:34398         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:50666         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:50550         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:49366         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:49556         ESTABLISHED 1387/example
tcp        0      0 <IP_ADDRESS>:15555         <IP_ADDRESS>:48472         ESTABLISHED 1387/example
#...

This is where you might end up. Each one of these is a connection from something like nginx to my example service, doing an HTTP request, and I have this many concurrent inflight requests.
One nitty gritty that is important here, is that A TCP Connection is identified by the UNIQUE 5 tuple
What is in this 5 tuple?
arbitrary citation

It includes a source IP address/port number, destination IP address/port number and the protocol in use.

So above, that's tcp, <IP_ADDRESS>, 15555, <IP_ADDRESS>, <FREE EPHEMERAL PORT>
This means we only have 1 "free variable" for this. because we're listening on the same protocol, port, and both things are connecting via <IP_ADDRESS>!
We can tweak this a little bit with sysctl and net.ipv4.ip_local_port_range manual
but you run out of juice a bit before 64k, meaning you can only have ~64k unique 5 tuples when talking to yourself over localhost! This means that, once you run out of ephemeral ports (and the rest of the 5 tuple is the same) our child process can no longer accept connections!
For our web services, we've side stepped this by using Http/2 which allows multiplexing requests over the same connection, but for TCP/L4 like services, we can't do that, as those protocols don't have the same multiplexing.
All this to say, the goal here is to accept more than 64k connections per einhorn child group (since the 5 tuple will be shared with all siblings listening on the same FD)

Thanks, I appreciate the explanation and it sounds like that really could be a big issue for use at scale!
If you wish to close this PR, go ahead or we can continue discussing a merge. I'd like a wiki page or .md doc written on the feature, explaining how to configure and use it. Your comment would be an excellent start for that doc.


Generate images from subfolders

Hi,
How to generate images from all folder inside public/images/photos/**?
It don't generate from subfolders.
Will be nice separate galleries by subfolder.
Thanks.

This is not possible right now. It definitly makes sense, but I just don' have any free time to implement it right now

Hi @paulocoutinhox,
I had a similar use case a time ago and build https://github.com/hille721/simple-photo-gallery-bulkcreation. It's kind of an extension to this project which makes it possible to create a galery out of more folders.
Didn't spend to much time into it as @haltakov already mentioned that this feature will come in the future, but at least it works 🤷
Thus feel free to test.