Prepared statement with variables: erroneous parse error

Apologies for the length.
In mysql, I can use a prepared statement:
mysql> PREPARE stmt1 FROM 'INSERT INTO messages (secure) VALUES (?)';
Query OK, 0 rows affected (0,00 sec)
Statement prepared

mysql> SET @sec = false;
Query OK, 0 rows affected (0,00 sec)

mysql> EXECUTE stmt1 USING @sec;
Query OK, 1 row affected (0,00 sec)

In D, the equivalent doesn't work:
bool secure = false;
auto cmd = Command(con);
cmd.sql = `INSERT INTO messages (secure) VALUES (?)`;
cmd.prepare;
cmd.bindParameter(secure, 0);
ulong affected;
cmd.execSQL(affected);

The error is:
mysql.protocol.packets.MySQLReceivedException@../../.dub/packages/mysql-native-0.1.6/source/mysql/protocol/commands.d(719): MySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?)' at line 1

If I substitute the prepared statement's placeholder with a value, I do not get an error and the values are inserted into the table.
Server version: 5.7.15-0ubuntu<IP_ADDRESS> (Ubuntu)
mysql-native version: 0.1.6

When using prepared statements, you should use execPrepared and execPreparedResult instead of execSQL and execSQLResult.
However, mysql-native should clearly, at the very least, catch this and provide a more meaningful exception message. Ideally, the API should be adjusted so you don't even need to make a choice.
I'm closing this as invalid, but I'll create a new issue to fix the confusion mysql-native causes in this situation. If you still get the same error even when using execPrepared, then please re-open this issue.


Push 0.2.2 to pypi

Could we push the latest version to Pypi please :)
Thanks!

Will do later today.

Done.


npx next-video init doesn't work with monorepos

Tried running in my turborepo, against app/web/package.json. Since the script checks for a lockfile and the lockfile is at root, the script fails to run.

Fun with wizards! 🧙 @mmcc loves me right now.
If this is a tough or brittle fix, we could just add a "are you using a monorepo" question to the prompts and point them to the manual setup docs.


Error: EACCES, mkdir '/sc5styleguide' Error: We need tree to translate

What does this mean? It was working but stopped after a gulp update. Not sure if it's related to 3.6 or something else.
Also, sass interpolation breaks gonzales-pe.

@alanontheweb could you provide a bit more details about when this error is thrown, i.e. during installation, styleguide.generate() or styleguide.applyStyles(), or perhaps somewhere else?

@jpbackman Sure, here you go -
Running 'styleguide'...
[23:56:10] Using gulpfile ~/Documents/Projects/demosite/gulpfile.js
[23:56:10] Starting 'styleguide:generate'...
[23:56:10] Starting 'styleguide:applystyles'...
[23:56:10] Finished 'styleguide:applystyles' after 193 ms
[23:56:10] 'styleguide:generate' errored after 210 ms
[23:56:10] Error: EACCES, mkdir '/sc5styleguide'
Error: We need tree to translate

Hmm, haven't seen that error message before, but to me it looks like something (gulp, I assume) is trying to create a dir /sc5styleguide at your root, are you sure you want that? Check the path you're passing on to gulp.dest().
Also, I'd guess that the EACCES error is from gulp trying to mkdir at root, and the error message is unrelated to that, and comes probably from the sass preprocess you're using, it's definitely not something we'd throw.

Ahh thanks. It's my first time using this, so I wouldn't be sure. But I got it to compile by setting  "return gulp.src('*.scss')" instead of a path or with "**/*scss".
However, it doesn't seem to be picking up my KSS annotations. The server loads but it just shows the readMe. I copied the KSS comments right out of the demo files. What could I be missing?

gulp.src picks the files relative to the gulpfile.js, and .scss matches only a file with exactly that name, since you don't provide a wildcard (i.e. *). If you have your .scss files in css dir, you'd use gulp.src('css/*.scss') and 'css/**/*.scss' would match all .scss files in css and its subdirs.

No, I get that. I know gulp, just having issues with getting sc5 to compile right. The paths and wildcards throw up that error tree. I'm going to dig up the gulp demo file you guys provided.

I think it looks the same... I only removed the node-neat stuff.
// generate(): All unprocessed styles containing the KSS markup and style variables. This will process the KSS markup and collects variable information.
gulp.task('styleguide:generate', function() {
  return gulp.src('src/assets/**/*.scss')
    .pipe(styleguide.generate({
        title: 'CNC Styleguide',
        server: true,
        port: 9000,
        rootPath: env.Test + "sc5styleguide",
        //styleVariables: 'lib/app/sass/_styleguide_variables.scss'
        overviewPath: 'README.md'
      }))
    .pipe(gulp.dest(env.Test + "sc5styleguide"));
});

//applyStyles(): Preprocessed/compiled stylesheets. This will create necessary pseudo styles and create the actual stylesheet to be used in the styleguide.
gulp.task('styleguide:applystyles', function() {
  return gulp.src('main.scss')
    .pipe($.sass({
      errLogToConsole: true
    }))
    .pipe(styleguide.applyStyles())
    .pipe(gulp.dest(env.Test + "/sc5styleguide"));
});

gulp.task('watch', ['styleguide'], function() {
  // Start watching changes and update styleguide whenever changes are detected
  // Styleguide automatically detects existing server instance
  gulp.watch(['*.scss'], ['styleguide']);
});

gulp.task('styleguide', ['styleguide:generate', 'styleguide:applystyles']);

Could you paste the output of npm ls --depth 0? I'll try to replicate this on my end and find the root cause.

Okay, so it its a 0.3.6 thing, at least for me. I reverted to 0.3.5 and now I'm getting these errors (but at least it's going through my file).
Parsing error: Please check the validity of the block starting from line #206
204 | table tr th.show-for-small, table tr td.show-for-small {
205 |
206*| @media #{$small-only} {
207 | display:table-cell;
208 | }
Gonzales breaks on sass interpolation. I'll tried switching back to  "gonzales-pe": "3.0.0-12", but now it's giving me this error instead - TypeError: Object # has no method 'parse'

Yes, we reverted our variable parsing related changes and gonzales-pe to an older version with 0.3.6 since they were giving more trouble than benefits, and the newer gonzales-pe has a changed API, so we can't update it without making big rewrites. We'll sit tight for a while and let things settle on that front, sorry.

Hey @alanontheweb and @jpbackman ,
I noticed this issue, and thought I'd add my voice. I have also come across this error message 'Error: We need tree to translate'.
For me, this error has been always caused (so far a least) by a simple issue in my SCSS code as shown in the example below:
@mixin sample-mixin($variable:'value'){
...
}

The key thing to note about the example above is that there is no space between $variable and its value. This is the cause of this issue (or has been for me at least).
The issue is resolved simply by adding a space between $variable and its value - as in the code below:
@mixin sample-mixin($variable: 'value'){
...
}

The root cause of this issue is almost certainly not an SC5-styleguide issue, but some issue with one of its dependencies - perhaps this 'gonzales-pe' you mentioned. I haven't taken the time to look into it in any detail, having found this simple fix.
@alanontheweb I'm not sure if this will help you resolve your issue, but I hope it does!

Thanks @sarahquigley ! I'll take a look see if I find something in my SCSS that matches what you're describing. Much appreciated =)

@alanontheweb No problem! It took me a while to track down the cause of that issue - so it would be nice to be able to save someone else the trouble - fingers-crossed it's the same cause for you!


Fix trying to add and link beyond last time-point.

Fix trying to add and link beyond last time-point.
Or before first time-point.
Reported by @xulman
Fixes #75
Also deal with moving the time slider while adding spots.

Fixed.


0.7 release prep

[x] outstanding 0.7 issues
[x] changelog
[x] check 'extra_args' functionality of looper.looper with regard to lumping scripts into single job submission (i.e., is it being done per-command rather than per-job, and is that the intended behavior?)

it's all good


[QUESTION] One ResponseFilter with content-type changes content-type for all responses

    "@tsed/ajv": "6.23.3",
    "@tsed/common": "6.23.3",
    "@tsed/core": "6.23.3",
    "@tsed/di": "6.23.3",
    "@tsed/exceptions": "6.23.3",
    "@tsed/platform-express": "6.23.3",
    "@tsed/schema": "6.23.3",
    "@tsed/swagger": "6.23.3",

If I use @ResponseFilter('application/json') then content-type is application/json (ctx.response.raw.headers inside transform method)
If I use @ResponseFilter('text/plain') then content-type is text/plain (ctx.response.raw.headers  inside transform method)
I need to return image/png so I use @ResponseFilter('application/json') to skip get-png endpoint. But Filter is called for png.
It works in v.5. with middleware.
Is it expected behavior? Thanks.
@Configuration({
  // acceptMimes // skipped
  responseFilters: [MyResponseFilter],
});

@Get('/get-png')
@Returns(200).ContentType('image/png') // I don't use swagger in a lot of endpoints. But even it doesn't help me.
public getPng(
  @Res() response: Express.Response /* or PlatformResponse */
) {
  const raw = '...';
  const img = Buffer.from(
    this.getBase64(raw),
    'base64',
  );
  response.setHeader('Content-Type', 'image/png');
  return img;
}

@ResponseFilter('text/plain') // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    // `ctx.response.raw.headers` is always has `content-type` as `text/plain; charset=utf-8`
    return data;
  }
}

Hello @silveoj
Your problem isn't clear, but I tried to reproduce it here: https://github.com/TypedProject/tsed/pull/1224
Right now, all works fine.
Can you create codesandbox or reproducible repository example please. I won't take more time to investigate on it without that ;)
See you
Romain

Hello @silveoj
Your problem isn't clear, but I tried to reproduce it here: https://github.com/TypedProject/tsed/pull/1224
Right now, all works fine.
Can you create codesandbox or reproducible repository example please. I won't take more time to investigate on it without that ;)
See you
Romain

Hello @Romakita
I can't reproduxe it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
But I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");

Hello @Romakita
I can't reproduxe it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
But I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");

Hello @Romakita
I can't reproduce it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
So I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");

Hello @Romakita
I can't reproduce it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
So I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");

Hello @Romakita
I can't reproduce it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
So I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");
@ResponseFilter("11text/plain11") -> {"filter":"text/plain"}
@ResponseFilter("455") -> {"jsonexample": 1}

Hello @Romakita
I can't reproduce it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
So I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");
@ResponseFilter("11text/plain11") -> {"filter":"text/plain"}
@ResponseFilter("455") -> {"jsonexample": 1}

Hello @Romakita
I can't reproduce it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
So I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");
You can change filter:
@ResponseFilter("11text/plain11") -> {"filter":"text/plain"}
@ResponseFilter("455") -> {"jsonexample": 1}
About response.setHeader('content-type', 'image/png'); and @ResponseFilter('*/*').
Browser gets application/json. I see result as data:*/*;base64... but must be data:image/png;base64...
If I disable my filter it will work.

Hello @Romakita
I can't reproduce it in sandbox. But I can reproduce it locally (export from sandbox).
sandbox example
So I rephrase my issue:
I use text/plain filter
@ResponseFilter("text/plain") // text/plain for example.
export class MyResponseFilter implements ResponseFilterMethods {
  transform(data: any, ctx: Context) {
    console.log("MyResponseFilter");
    return {
      filter: 'text/plain',
    };
  }
}

I send JSON:
@Get("/send-json")
// @(Returns(200).ContentType("application/json"))
public sendJson(@Res() response: PlatformResponse) {
  // response.setHeader("Content-Type", "application/json");
  return {
    jsonexample: 1
  };
}

But text/plain filter is called for JSON. Postman gets {"filter":"text/plain"} response.
It will not be called if I add @(Returns(200).ContentType("application/json")) OR response.setHeader("Content-Type", "application/json");
You can change filter:
@ResponseFilter("11text/plain11") -> {"filter":"text/plain"}
@ResponseFilter("455") -> {"jsonexample": 1}
About response.setHeader('content-type', 'image/png'); and @ResponseFilter('*/*').
Browser gets application/json. I see result as data:*/*;base64... but must be data:image/png;base64...
If I disable my filter it will work.

My task is set no cache headers for ALL responses.
My temporary solution in v6 is
$beforeRoutesInit(): void {
  this.app
      .use(...)
      .use(MyGlobalSendResponseMiddleware)
      .use(...)
}

// MyGlobalSendResponseMiddleware doesn't work in afterRoutesInit but work for controllers and endpoints (I have more than 200)
/*$afterRoutesInit(): void {
  this.app
    .use(MyGlobalSendResponseMiddleware)
}*/

Here is my middleware codesandbox
(ctx.data = { ... } in UseAfter also doesn't work like in https://github.com/TypedProject/tsed/issues/914 But I don't need it. I only add headers)
import {IMiddleware, Middleware, Context, Next} from "@tsed/common";

@Middleware()
export class MyGlobalSendResponseMiddleware implements IMiddleware {
  use(@Context() ctx: Context, @Next() next: Next) {
    // ctx.data = { // it doesn't work
    //   isMiddleware: true,
    // }
    ctx.response.setHeaders({ 'my-example-header': 123 }); // works in global mode only for useBefore
    next();
  }
}

My task is set no cache headers for ALL responses.
My temporary solution in v6 is
$beforeRoutesInit(): void {
  this.app
      .use(...)
      .use(MyGlobalSendResponseMiddleware)
      .use(...)
}

// MyGlobalSendResponseMiddleware doesn't work in afterRoutesInit but works `@UseAfter` for controllers and endpoints (I have more than 200 so I use global)
/*$afterRoutesInit(): void {
  this.app
    .use(MyGlobalSendResponseMiddleware)
}*/

Here is my middleware codesandbox
(ctx.data = { ... } in UseAfter also doesn't work like in https://github.com/TypedProject/tsed/issues/914 But I don't need it. I only add headers)
import {IMiddleware, Middleware, Context, Next} from "@tsed/common";

@Middleware()
export class MyGlobalSendResponseMiddleware implements IMiddleware {
  use(@Context() ctx: Context, @Next() next: Next) {
    // ctx.data = { // it doesn't work
    //   isMiddleware: true,
    // }
    ctx.response.setHeaders({ 'my-example-header': 123 }); // works in global mode only for beforeRoutesInit
    next();
  }
}

My task is set no cache headers for ALL responses.
My temporary solution in v6 is
$beforeRoutesInit(): void {
  this.app
      .use(...)
      .use(MyGlobalSendResponseMiddleware)
      .use(...)
}

// MyGlobalSendResponseMiddleware doesn't work in afterRoutesInit but works `@UseAfter` for controllers and endpoints (I have more than 200 so I use global)
/*$afterRoutesInit(): void {
  this.app
    .use(MyGlobalSendResponseMiddleware)
}*/

Here is my middleware codesandbox
(O noticed ctx.data = { ... } in UseAfter doesn't work like in https://github.com/TypedProject/tsed/issues/914 But I don't need it. I only add headers)
import {IMiddleware, Middleware, Context, Next} from "@tsed/common";

@Middleware()
export class MyGlobalSendResponseMiddleware implements IMiddleware {
  use(@Context() ctx: Context, @Next() next: Next) {
    // ctx.data = { // it doesn't work
    //   isMiddleware: true,
    // }
    ctx.response.setHeaders({ 'my-example-header': 123 }); // works in global mode only for beforeRoutesInit
    next();
  }
}

My task is set no cache headers for ALL responses.
My temporary solution in v6 is
$beforeRoutesInit(): void {
  this.app
      .use(...)
      .use(MyGlobalSendResponseMiddleware)
      .use(...)
}

// MyGlobalSendResponseMiddleware doesn't work in afterRoutesInit but works `@UseAfter` for controllers and endpoints (I have more than 200 so I use global)
/*$afterRoutesInit(): void {
  this.app
    .use(MyGlobalSendResponseMiddleware)
}*/

Here is my middleware codesandbox
(I noticed ctx.data = { ... } in UseAfter doesn't work like in https://github.com/TypedProject/tsed/issues/914 But I don't need it. I only add headers)
import {IMiddleware, Middleware, Context, Next} from "@tsed/common";

@Middleware()
export class MyGlobalSendResponseMiddleware implements IMiddleware {
  use(@Context() ctx: Context, @Next() next: Next) {
    // ctx.data = { // it doesn't work
    //   isMiddleware: true,
    // }
    ctx.response.setHeaders({ 'my-example-header': 123 }); // works in global mode only for beforeRoutesInit
    next();
  }
}

Hello @silveoj
The better choice to set no-cache is to use a middleware registered on $beforeRoutesInit hooks. This the main principle with Express.js. Middlewares added after the handler which send the response, won't probably be called (in pure Express.js app).
Can you send me also a curl example. The content-type/accept headers sent by the browser especially :)
See you
Romain

Hello @silveoj
I created a repository based on your sandbox. https://github.com/Romakita/tsed-issue-1222
All unit test works! Can you checkout the repository and

Fixed.
Please consider supporting the framework if it provides value to you or your company and this support was of help to you. Supporting the framework means, amongst other things, that such support will be available in the future.


Update Lit's computed state snippet to not create a public field.

If you don't need state to be accessed publicly or in multiple methods, you can just use statements in the render() method.

Happy to have you here @justinfagnani !
Thanks !


rp2daq python application detecting older FW on Pico

Getting this error: WARNING:root:rp2daq device firmware has version 231005, older than this script requires: 240715. right after flashing the newest v0.2.0 release.
I followed the instructions and held BOOTSEL button while plugging the device in, when the device showed up as a flash drive I dragged and dropped the UF2 file. After I dragged and dropped the UF2 file I saw the LEDs blink twice.
I'm trying to use the latest on main branch, not sure if this is too new for the latest FW release.

Dear Lisa, thanks for writing. You will surely need to have matching firmware/software versions - the easiest is to get both of them from https://github.com/FilipDominec/rp2daq/releases/tag/v0.2.0 . Is this OK?
Since v0.2.0, I pushed changes in the main branch that make the binary messaging partially incompatible with it. It's actually correct the firmware wrote you the warning.  I will publish a new release to make the new features available.
Feel free to write any user experience and wishes.


(1.12) Fix app metric names in v0 API

High-level description
This is a 1.12 backport of #3453.
Corresponding DC/OS tickets (obligatory)
These DC/OS JIRA ticket(s) must be updated (ideally closed) in the moment this PR lands:

DCOS_OSS-4071 Metrics v0 API changed some metric names

Related tickets (optional)
Other tickets related to this change:
N/A
Checklist for all PRs

[x] Added a comprehensible changelog entry to CHANGES.md or explain why this is not a user-facing change:
[x] Included a test which will fail if code is reverted but test is not. If there is no test please explain here:
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Change log from the last version integrated (this should be a link to commits for easy verification and review): https://github.com/dcos/telegraf/compare/071b143b1c93f03e5469378d082ec14dacf41674...515b24c921aa4578c2d99b55e2625425580b2a62
[x] Test Results: link to CI job test results for component (failed due to irrelevant test bug)
[x] Code Coverage (if available): link to code coverage report

@mesosphere-mergebot bump-ee

@mesosphere-mergebot bump-ee

@mesosphere-mergebot label ready for review

Rolled up into https://github.com/dcos/dcos/pull/3515

Superseded by https://github.com/dcos/dcos/pull/3515


The good old C error

Found an easy one today:
for i in range(101):
    if i % 2 = 0:
        print(i)

which currently gives:
Python exception
    Traceback (most recent call last):
      File "solution.py", line 2
        if i % 2 = 0:
                 ^
    SyntaxError: invalid syntax

A SyntaxError occurs when Python cannot understand your code.
Python could not understand the code in the file
'solution.py'
beyond the location indicated below by --> and ^.
       1: for i in range(101):
    -->2:     if i % 2 = 0:
                       ^

Python's error message (invalid syntax) cannot be used to identify the problem
Currently, I cannot guess the likely cause of this error.
Try to examine closely the line indicated as well as the line
immediately above to see if you can identify some misspelled
word, or missing symbols, like (, ), [, ], :, etc.
You might want to report this case to
https://github.com/aroberge/friendly-traceback/issues

Yes, indeed, this is something that definitely needs to be identified. I'll get to work on it right away.

Fixed for if case as well as elif.  I also added support for while; I cannot think of any other similar case.
New version uploaded to Pypi.org.

What about do_thing(is_bar=foo()="bar")? Why limit it to expressions directly in conditional statements? Perhaps once you find the offending token you could try replacing it with == and see if the program is now valid syntax?

@alexmojaki This is a good point. At the moment, I never proceed to reevaluate if a program has a valid syntax. To be honest, I never thought of doing it ... and have already a function (editors_helper.check_syntax, https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/editors_helper.py#L20) that could be used for that purpose.

I might have to revisit the current message: it could be that instead of a normal assignment, what is required is using the walrus operator: this is certainly the case in while statements and possibly in other contexts.


BotHandle Validation

[ I have found that if at the step of Subscribe to Bot Events from the "Connect a bot to Slack" the user does not match exactly the name of the bothandle "Crneguleslack" versus "CrneguleSlack" the test still results in a Succesfful Verification. Evern if that happens the bot will not work on the slack side.  Once you go back and change "/Events/Crneguleslack" to "/Events/CrneguleSlack" the bot starts to work.
The easy workaround would be to add to the documentation extra information for the users.
In section Subscribe to Bot Events Step 3. Subscribe to Bot Events
In Request URL, enter this URL, but replace {YourBotHandle} with your bot handle. https://slack.botframework.com/api/Events/{YourBotHandle}
to
In Request URL, enter this URL, but replace {YourBotHandle} with your bot handle. https://slack.botframework.com/api/Events/{YourBotHandle}. Pay attention the {YourBotHandle} needs to be an exact match with the one you took from your bot. ]

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e38b3d9f-a7c8-18d6-3fca-db1be46dff14
Version Independent ID: 328f6bde-8645-5fbd-fb10-55aeef61e0c5
Content: Connect a bot to Slack - Bot Service
Content Source: articles/bot-service-channel-connect-slack.md
Product: bot-framework
GitHub Login: @RobStand
Microsoft Alias: kamrani

This article was recently updated. There is now this tip in the section that you mentioned:

Your bot handle is the name of your bot. To find a bot's handle, visit https://dev.botframework.com/bots, choose a bot, and record the name of the bot.

If this is not sufficient, please reopen this issue.


ci: drop non-LTS eoan from CI tests

Signed-off-by: Alessandro Comodi<EMAIL_ADDRESS>The eoan Ubuntu version (19.10) is causing failures on CI. Unsure whether there is  a temporary maintenance to the packages, but in general, it is worth to keep tested only the LTS OSes versions.
Example of failing build: https://github.com/SymbiFlow/symbiflow-examples/runs/1531376091?check_suite_focus=true

Is it out of support?

It says that it went out of support on July, 17 2020 (https://wiki.ubuntu.com/Releases)

Drop away!


Spike: support for tables

I think that this approach looks good and fits in well with what we've already developed.
There is definitely a lot to explore with the serialisation and wether the table container should manage all of the serialisation or pass it down to rows and cells but that always something that can be refactored with some snapshot tests.
I'd be pro cleaning the PR up and adding a second spike that contains just the attempted to support cell alignment - it will be interesting to explore if this should be a property on a cell (since we don't have columns) or some sort of map on the parent table to make serialisation easier.
Well done 🎉


Windows CLI output has encoding issue and hard to read

CLI version: 0.5.33
FN Server version: 0.3.630
The output of the cli contains characters that makes the text difficult to read.  This happens in both cmd and powershell.

Fixed by #566


_disableInitializers is missing in Bridge’s constructor

From https://codehawks.cyfrin.io/c/2024-07-ark-project/s/181
Summary
disableinitializers is not called in Starklane’s constructor
details
An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. But in the case of the implementation contract, a disableinitializers() is necessary to be called in the constructor. This is because when the Bridge contract is deployed and initialized, the initialize method on the newly created proxy's implementation contract is never called. As such, anyone can call that method and pass in whatever values they want as arguments
Unit test must be provided.

Can I be assigned when od hack starts please! @ptisserand

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet, Ethereum ecosystem.
How I plan on tackling this issue
I will resolve this issue by taking the following approach:

Adding _disableInitializers() to the Bridge Constructor:

The main issue here is that the Bridge contract’s implementation is vulnerable to being initialized multiple times, allowing potential attackers to exploit this. To fix this, I will add a constructor to the Bridge contract that calls _disableInitializers(), ensuring that the contract can only be initialized once.

Example:
constructor() {
    _disableInitializers();
}

This will ensure that the implementation contract is protected from further initialization once it is deployed.

Reviewing Starklane and Bridge Contracts:

I will review the existing implementation of both the Bridge and Starklane contracts to ensure that this issue doesn't exist elsewhere.
I will verify that _disableInitializers() is called in any other contract that is deployed via a proxy to avoid similar vulnerabilities.

Writing Unit Tests:

To prevent regressions and validate this fix, I will implement unit tests that check whether the constructor correctly disables initializers.
Specifically, I will test that:

After deploying the Bridge contract, any subsequent calls to initialize() should revert.
I will simulate an attacker trying to call initialize() and confirm that they are unable to pass arbitrary arguments due to _disableInitializers() being triggered.

Example test case:
function testCannotInitializeAfterDeployment() public {
    vm.expectRevert("Initializers are disabled");
    bridge.initialize(/* malicious arguments */);
}

Manual and Automated Testing:

After making the changes, I will manually verify that the vulnerability is fixed by interacting with the contract and ensuring no unauthorized initializations can occur.
I will also add the new unit tests to the project’s CI pipeline to guarantee that future updates don’t reintroduce this issue.

By following these steps, I’ll make sure the Bridge contract is protected against unauthorized initialization, and I will ensure that robust tests are in place to confirm the fix.
ETA - 3 days

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
i'm a solidity and cairo smart contract  developer with over 2 years experience and believe i have the skill set for the task and i am also very good with smart contract testing

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I'm a Solidity adn cairo developer specializing in NFT marketplaces and decentralized apps, with experience in multi-token support and integrating blockchain protocols. My work on projects like Worldcoin-Bridge-Linea equips me to handle tasks like adding ERC-20 support efficiently.
How I plan on tackling this issue
To handle the missing _disableInitializers in the Bridge’s constructor:

Add _disableInitializers()** call in the Bridge constructor to prevent unauthorized initialization.
Ensure that this is done before any other logic to secure the contract from potential attacks.
Write unit tests to confirm that the function is correctly called and that the contract cannot be initialized after deployment.

Hi @PoulavBhowmick03 any update on this ?

Hi @PoulavBhowmick03 any update on this ?

hey i will get it done by tonight

My Background
GM, I am a smart contract developer with a focus on writing secure contracts and have been writing contracts in Solidity for 2 years. I have also contributed to the bridge repo before, on https://github.com/ArkProjectNFTs/bridge/pull/235. This task is pretty straightforward and here is how I would approach this issue:
My Approach
I will import the Initializable.sol contract from openzeppelin and make the Starklane contract initializable. Then, I would add the constructor to disable the initializer like this:
constructor() {
        _disableInitializers();
}

After that, I will write the corresponding unit test and make sure that everything runs and passes the test.
Docs references
What does _disableInitializers(); function mean?
ETA: 1 Day

Hi @ptisserand @PoulavBhowmick03 Can i please get assigned this issue?
I would love the opportunity to tackle it

@SoarinSkySagar reassigned to you

Thanks @ptisserand I'll get on it

@SoarinSkySagar reassigned to you

Thank you @ptisserand 🎉


Support other currencies and fix weird divide by 100

Problem
Current commerce messages show amounts in $ even if it was in GBP.
Solution
Remove weirdness around format_price and how needs things in dollar but then multiplies by 100 and pass currency_code to all format_price calls.

Do these source APIs already expose display fields that can be used directly instead? That's the recommendation of our recent "task force" on the subject. I think Gravity's API does already return properly-formatted, currency-aware string fields but I'm not sure about Exchange.

no, exchange events only sends cents fields and currency i thought we made that the responsibility of MP to handle formatting. https://github.com/artsy/metaphysics/pull/1858

Yup the recommendation might not help in this case if APRB is accessing Exchange's API directly.
It might be worth using the display... fields from Gravity though, unless you'd rather just treat everything consistently within this repo.


2D Physics Run on Seperate Thread Crash

Tested versions

Reproducible in :
v4.3.beta2.mono.official.b75f0485b
v4.2.stable

System information
Godot v4.3.beta2.mono - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; <IP_ADDRESS>22) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)
Issue description
When enabling  Run on Seperate Thread for Physics 2D, the game run from the editor crashes without any error. However, disabled it, the game runs perfectly fine.
Video below to demonstrate: https://youtu.be/VzHw3-da53U
Please let me know if there's any way I can get more logs/information about such crashes
Steps to reproduce
Video demonstrating it:
https://youtu.be/VzHw3-da53U
Please let me know if there's any way I can get more logs/information about such crashes
Minimal reproduction project (MRP)
mrp (2).zip

Any update regarding how I can get some more logs of the crash for troubleshooting?

You need to use a debug build of the engine, and run from console, and get the error logs from that
But the best thing would be to have an MRP, or more info, check here for more on debugging and logs

You need to use a debug build of the engine, and run from console, and get the error logs from that
But the best thing would be to have an MRP, or more info, check here for more on debugging and logs

I would be hard pressed to make an MRP without knowing which part is causing it - it's not a small project I have that I can condense that quickly unfortunately.
That being said, where can I get the debug build of the engine?

Right where I linked, there are no official builds with debugging, so you need to build your own

I would be hard pressed to make an MRP without knowing which part is causing it

Absolutely, but that makes it even harder for anyone else to identify and fix it, so without an MRP it's very hard to do anything
Creating a new project and recrating some conditions would be the way to go probably, but with debugging you can start pinpointing where the issue comes from at least

That's my idea is to at least get an idea of what I need to recreate - the only thing for sure I know it's related to a lot of areas/collisions happening at once. Because if I tone down the number of units (the number in the video was used more as a performance testing/benchmark) it works no problem. I didn't scroll up to see the windows instructions my bad. That being said, this is what the 4.3 console shows:

I will follow up with what the dev build does

================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.beta.custom_build (f0d15bbfdfde1c1076903afb7a7db373580d5534)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] RID::operator== (C:\Users\denys\Documents\godot\source_code\godot\core\templates\rid.h:44)
[1] GodotArea2D::BodyKey::operator== (C:\Users\denys\Documents\godot\source_code\godot\servers\physics_2d\godot_area_2d.h:78)
[2] HashMapComparatorDefault<GodotArea2D::BodyKey>::compare (C:\Users\denys\Documents\godot\source_code\godot\core\templates\hashfuncs.h:399)
[3] HashMap<GodotArea2D::BodyKey,GodotArea2D::BodyState,GodotArea2D::BodyKey,HashMapComparatorDefault<GodotArea2D::BodyKey>,DefaultTypedAllocator<HashMapElement<GodotArea2D::BodyKey,GodotArea2D::BodyState> > )
[4] HashMap<GodotArea2D::BodyKey,GodotArea2D::BodyState,GodotArea2D::BodyKey,HashMapComparatorDefault<GodotArea2D::BodyKey>,DefaultTypedAllocator<HashMapElement<GodotArea2D::BodyKey,GodotArea2D::BodyState> > )
[5] HashMap<GodotArea2D::BodyKey,GodotArea2D::BodyState,GodotArea2D::BodyKey,HashMapComparatorDefault<GodotArea2D::BodyKey>,DefaultTypedAllocator<HashMapElement<GodotArea2D::BodyKey,GodotArea2D::BodyState> > )
[6] GodotArea2D::call_queries (C:\Users\denys\Documents\godot\source_code\godot\servers\physics_2d\godot_area_2d.cpp:269)
[7] GodotSpace2D::call_queries (C:\Users\denys\Documents\godot\source_code\godot\servers\physics_2d\godot_space_2d.cpp:1129)
[8] GodotPhysicsServer2D::flush_queries (C:\Users\denys\Documents\godot\source_code\godot\servers\physics_2d\godot_physics_server_2d.cpp:1323)
[9] PhysicsServer2DWrapMT::flush_queries (C:\Users\denys\Documents\godot\source_code\godot\servers\physics_server_2d_wrap_mt.cpp:71)
[10] Main::iteration (C:\Users\denys\Documents\godot\source_code\godot\main\main.cpp:4055)
[11] OS_Windows::run (C:\Users\denys\Documents\godot\source_code\godot\platform\windows\os_windows.cpp:1686)
[12] widechar_main (C:\Users\denys\Documents\godot\source_code\godot\platform\windows\godot_windows.cpp:180)
[13] _main (C:\Users\denys\Documents\godot\source_code\godot\platform\windows\godot_windows.cpp:206)
[14] main (C:\Users\denys\Documents\godot\source_code\godot\platform\windows\godot_windows.cpp:220)
[15] WinMain (C:\Users\denys\Documents\godot\source_code\godot\platform\windows\godot_windows.cpp:234)
[16] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[17] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================

Got a more proper stack-trace this time @AThousandShips any idea what this is related to?

It's related to an Area2D but that's all I know

Are there any illegal operations/calls when using physics in its own thread? Like I can't call x functions outside _phyiscs_process or something?

You can't call a lot of physics things outside of _physics_process but they generally have warnings
But this pinpoints it to being related to areas, that should help narrowing it down

Alright, I'll try to make an mrp...

@AThousandShips
I manage to make it! How can I share it?

You upload it, it should be small so best upload it directly, just drag it to the input field and keep it focused until it's done uploading, make sure to add it to the original post

mrp.zip

You upload it, it should be small so best upload it directly, just drag it to the input field and keep it focused until it's done uploading, make sure to add it to the original post

Let me know if it crashes for you - specifically the physics has to be on separate thread (on single it works fine)

The MRP is not really working, it completely breaks down performance wise because you didn't copy all the code into the MRP, you removed parts that were necessary, for example the _disable_bullet method, please test your own MRP and see

mrp (2).zip
@AThousandShips I apologise - I got too excited that I could replicate so easily and zipped the wrong file.
I've also attached a video with the mrp working (single threaded) and crashing (with physics multi-threading)
https://github.com/godotengine/godot/assets/10791321/39564a6e-519b-48e9-b910-02d47aa3e544
https://github.com/godotengine/godot/assets/10791321/5be3f732-9464-4195-ba5d-9c8c0638207a

Will test as well when I have time!

@AThousandShips any luck replicating?

Haven't found the time, will see if I can or someone else can try replicating it

@AThousandShips just gonna ping you one more time if you have a chance to confirm it's happening on your machine 😅

Sorry I haven't found the time still, will try find some time once 4.3 is released

I can confirm that it crashes specifically on threaded, but it only does this once it's broken down completely performance wise, I don't expect this to happen in any reasonable case, and the crash is almost certainly caused by the fact that things are bogged down completely
While it shouldn't crash, I'm not sure it's ever going to crash in any reasonable case given that it only crashes with this MRP in extreme slowdown and under an extreme load level (on non-threaded the game simply bogs down to freezing with <1 fps even on my reasonably powerful computer)

That's fair point, however, even when performance is fine this is relatively repeatable. I have attached an mrp for convenience sake, but all I did was in main_scene.gd -> line 69 -> 	if (drones.size() < (75) and true): I changed the values from 225 to 75. The higher the value the more consistent the crash. I've had it crash at values as small as 5, but maybe 5% of the time. And it went up from there.
Also a video to show I'm not crazy 😅
mrp3.zip
https://youtu.be/SOUhyYcZz98

Will test that case as well and see! Always important to provide good references for bugs and their scope

Sounds good, this definitely feels like some sort of race condition that happens specifically during spawning. Because I notice it either crashes while something is being spawned, or doesn't crash once everything is spawned. It's also why higher numbers make this more consistent since there are more frames spent spawning units... but that's just my guess

@AThousandShips I know it's been dead for a while but I'm still around and hoping this can be addressed/resolved 😅

Can't add any more details to this right now, so needs someone with physics expertise to look at it

Are you able to replicate the issue on your end with reasonable performance now with the small changes I mentioned?

I don't remember I will test soon and confirm


✨ Comment out highlighted code

Is your feature request related to a problem? Please describe.
No response
Describe the solution you'd like
Ability to comment out code by highlighting some code and pressing: CMD + /
Describe alternatives you've considered
n/a
Additional context
Preview from vscode:

Can you assign this issue to me? I would like to start contributing to this project

Done! Let me know if you have any questions.

How is this going @crpatil1901 @austincondiff? I would be interesting in working on this also if no solution has been found yet.

@Sophiahooley I can assign it to you. This related PR is about to be merged just so you are aware.

Do you know if the PR is going to be merged soon? I am trying to see if I should start working now or if the related PR will completely change what I do.

Still need to update, and this is 1/2 done. Still needs multi-line commenting implemented as well as detecting comment type in context.


New World of Darkness Official: Fix errors from previous merge & fixes potency roll

@wing-it hi, this fixes some errors we got from the previous merges that I don't understand why they slipped in.  Please merge ASAP
Regards


[Enhancement] Drop jQuery initiative

Any plans on dropping jQuery dependency?

This is already in the works

https://github.com/twbs/bootstrap/pull/23586


Add zoxide-git-projects extension

Description
Allows the user to select git repositories found by filtering a zoxide query, then open them in an application of choice.
I use and love zoxide ❤. With this extension, all the directories returned by zoxide query -l (i.e. the directories you use) are filtered to just those that are git repositories and ordered by most frequently used. From there, this extension allows you to fuzzy find a specific project, then open that project with the tool of your choice. For me, zed.
Screencast
https://github.com/user-attachments/assets/664b15a6-ff19-4528-9405-1a5e45fc1ac6
Checklist

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

I'm a little confused about the "I checked that assets used by the README are placed outside of the metadata folder" task. I'd like to use this same image in the README.md and it works fine. If you want me to store a second copy of it, I can, but I'm just unclear.

@pernielsentikaer: The simple answer is probably ineptitude :). My goal was to have control over the life of the cache, and set explicitly how long it will live since the call can have some overhead. Can that be done with this util method. Maybe be having some timer to call revalidate? I'm unsure. But the point is to call the query only when needed, but let the user change it to force an update if repositories change.

One option would be to always make the query but immediately return and work from the cached list until the query returned. Then update the cache if the query response differs from the cached dataset.

Also, your update to "Git Application" doesn't make sense to me. You can use many applications to open git repositories. Imagine VS Code or Finder. Those aren't exactly "Git" applications.

Actually, turns out the method I describe above is precisely how useCachedPromise works. See... ineptitude. :D
So, this is a much more simple implementation. I'm still not sure about the change to Git Application, but I'll await feedback.
In the meantime, I also modified the filter to be a bit more friendly. Frankly, I'd be open to using the build in sort, if you prefer the simplicity, but not being able to find "my-repo" with "my repo" or "repo my" is not great.

I think it's fine as is. Let's get the first version live so we can iterate on it - thanks for looking into useCachedPromise 🙂


Allow protected handler methods

In this PR we allow to declare protected handler methods, but only if the method is overridden from a superclass.
This will enable users to create hierarchies of handling types without seeing annoying log warnings.
The experience of ProtoData shows that there are advantages to such hierarchies.

@armiol, PTAL.

@armiol, PTAL again.


great work

this is a great work for t2x. can you update the checkpoint url of the t2i, since the old url is invalid

Thank you for your interest in lumina-t2x, we will soon put up the address of the latest huggingface model!

this is a great work for t2x. can you update the checkpoint url of the t2i, since the old url is invalid

Thank you for your interest in lumina-t2x, we will soon put up the address of the latest huggingface model!

Hi liubo,
we uploaded our final model for lumina-t2i, here is the link: https://huggingface.co/Alpha-VLLM/Lumina-T2I @liubo0902


Suggestion: add Time.creationTime

Hey,
Since timers are overridden, it's currently impossible to know the amount of time took for a timer to complete its work,
Adding timer. creationTime  in createTimer can help.

Good idea :+1:


Confuse about dump "tessnoimages.png" when segmenting page and detect orientation.

I see in file "ccmain/pagesegmain.cpp: line 322 - 333".
  // Leptonica is used to find the rule/separator lines in the input.
  LineFinder::FindAndRemoveLines(source_resolution_,
                                 textord_tabfind_show_vlines, pix_binary_,
                                 &vertical_x, &vertical_y, music_mask_pix,
                                 &v_lines, &h_lines);
  if (tessedit_dump_pageseg_images)
    pixWrite("tessnolines.png", pix_binary_, IFF_PNG);
  // Leptonica is used to find a mask of the photo regions in the input.
  *photo_mask_pix = ImageFind::FindImages(pix_binary_);
  if (tessedit_dump_pageseg_images)
    pixWrite("tessnoimages.png", pix_binary_, IFF_PNG);

Please notice to line:
  if (tessedit_dump_pageseg_images)
    pixWrite("tessnoimages.png", pix_binary_, IFF_PNG);

I try with configuration:
tessedit_dump_pageseg_images    1

And images:

But result in file "tessnoimages.png" is:

I think before pixWrite("tessnoimages.png", pix_binary_, IFF_PNG);, we need something like:
if (*photo_mask_pix != NULL) {
    pixSubtract(pix_binary_, pix_binary_, *photo_mask_pix);
}

At least in osdetect it is done that way. Anyway I found out that   pixSubtract(pix_binary_, pix_binary_, *photo_mask_pix) does not removed all images.
@theraysmith: can you have a look at this?

@nam-leduc, is this still an issue with latest Tesseract? We'd like to know that before releasing Tesseract 4.0.0.

@stweil: I testing it with:
tesseract i269.png i269 -c tessedit_dump_pageseg_images=1
Interesting it that it produce pdf (i269_debug.pdf) for debugging steps and it seems it is not fixed...

https://github.com/tesseract-ocr/tesseract/blob/641237495a4e8b07e3fc6110c694c4a9e3ee3dab/src/ccmain/pagesegmain.cpp#L294
https://github.com/tesseract-ocr/tesseract/blob/a9e2574effcbc589eba9d7ced92320cd920e79f8/src/textord/imagefind.cpp#L63
https://github.com/DanBloomberg/leptonica/blob/master/prog/livre_pageseg.c

Dear @amitdo ,
Recently, I tested and it still meet the problems.
Environment

Tesseract Version:
tesseract --version
tesseract 5.0.0-alpha-777-g162f3
 leptonica-1.75.3
  libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.2) : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11 : libwebp 0.6.1 : libopenjp2 2.3.0

 Found AVX2
 Found AVX
 Found SSE

Commit: 162f3707e28102451338ced235c80ffa6f09ae40 (Merge pull request #3082 from bertsky/fix-line-detector)

Platform: Ubuntu 18.04.4 LTS

Tessdata: https://raw.githubusercontent.com/tesseract-ocr/tessdata/master/eng.traineddata

Tesseract input/output

Following are input image:
https://user-images.githubusercontent.com/8704662/92300832-517da180-ef88-11ea-8ce3-149bd3e79bc3.PNG

My command:
$ ./bin/tesseract ~/vmshare/have-image.PNG have-image-original -c tessedit_dump_pageseg_images=1
Tesseract Open Source OCR Engine v5.0.0-alpha-777-g162f3 with Leptonica

Following are PDF debug file when run with original source code:
have-image-original_debug.pdf

And this is image after I add following source code:
have-image_debug.pdf
*photo_mask_pix = ImageFind::FindImages(pix_binary_, &pixa_debug_);
if (tessedit_dump_pageseg_images) {
  Pix* pix_no_image_ = nullptr;
  if (*photo_mask_pix != nullptr) {
    pix_no_image_ = pixSubtract(nullptr, pix_binary_, *photo_mask_pix);
  } else {
    pix_no_image_ = pixClone(pix_binary_);
  }
  pixa_debug_.AddPix(pix_no_image_, "NoImages");
  pixDestroy(&pix_no_image_);
}

Best regards,
Le Duc. Nam

LGTM.

Anyway I found out that pixSubtract(pix_binary_, pix_binary_, *photo_mask_pix) does not removed all images.

@zdenop,
Can you give an example?
Probably Leptonica itself fails to identify the these images. For example, Leptonica does not recognize line drawings as images.

@amitdo: as you can see in have-image_debug.pdf from @nam-leduc example (or you can use original image from  this issue) - there are still image artefacts.
Leduct patch improves debug output without effect on OCR (so it could/should be applied). @nam-leduc: can you send PR?
My original suggestion has effect on OCR and I did not test it  (so it is dangerous to apply it). IMHO SetupAndFilterNoise should be investigated if photo_mask_pix/FindImages produces expected results.

Hi @zdenop ,

@nam-leduc: can you send PR?

Yes, I will send PR.

I suggest to simplify the patch a little bit. It is not necessary to write a 2nd image for pix_binary_, so the else part can be omitted..

Hi @stweil , my thinking is that if we can't find any photo from binary image, so, binary image are 'NoImages', it maybe confuse developer if we don't add 'NoImages' pdf page. @stweil , what do you think?

Fixed by pull request #3090, so closing this issue.


Update Lazyload commit in Dockerfile [MW-310]

Here is the commit we were waiting for https://github.com/mudkipme/mediawiki-lazyload/pull/15/commits/92172c30ee5ac764627e397b19eddd536155394e

Please check Jira for details https://wikiteq.atlassian.net/browse/MW-310

Shall be merged with https://github.com/WikiTeq/Taqasta/pull/218


Strange sidebar scroll behavior

As per user feedback:

if you scroll all the way to the bottom on the sidebar, it will scroll the article, but if you begin to scroll up from the bottom on the sidebar, it will scroll the article, IT WILL NOT SCROLL THE SIDEBAR until you hit the top of the article, and THEN it will scroll the sidebar up

I have not been able to repeat this bug myself but we should try and see what is causing it.

Should now be fixed with the addition of overscoll-behavior: none

I'm actually finding this to be less intuitive than before. Any thoughts?

I don't like either way, truthfully. I think this method might make the most "logical" sense, though. Hard to say.

I'm calling this one closed. I think we've gotten this about the best we can with the way we have it now. I also added shadows that appear on the top and bottom when there is space to scroll (indicating that it can be scrolled.)


View extensions don't change colorscheme automatic

The vAlert and vToast don't respond to theme changes automatically they stay in light mode and won't change self
The colours are set in my Assets file
Example:
extension VAlertUIModel {

    public static var error: Self {
        var uiModel: Self = .init()

        uiModel.backgroundColor = Color("AlertBGColor", bundle: .none)
        uiModel.titleTextColor = Color("AlertTextColor", bundle: .none)
        uiModel.messageTextColor = Color("AlertTextColor", bundle: .none)

        return uiModel
    }
}

It's strange, as I cannot recreate it. Colors work fine for me in a sample project.
But, the API allows you to override the color scheme manually. Let me know if this helps:
import SwiftUI
import VComponents

struct ContentView: View {
    @Environment(\.colorScheme) private var colorScheme: ColorScheme

    @State private var parameters: VAlertParameters?

    var body: some View {
        Button(
            "Present",
            action: {
                parameters = VAlertParameters(
                    title: "Lorem Ipsum",
                    message: "Lorem ipsum",
                    completion: nil
                )
            }
        )
        .vAlert(
            id: "content_view",
            uiModel: {
                var uiModel: VAlertUIModel = .error
                uiModel.colorScheme = colorScheme
                return uiModel
            }(),
            parameters: $parameters
        )
    }
}


Run Chromium tests

Big stuff. The plan is:

[ ] Identify all test "suites" that cover the code we use from Chromium (i.e. content_unittests, etc.)
[ ] List failing tests from all "suites"
[ ] Fix failing tests (either modify related code in a patch or modify/disable the test)
[ ] optional Add tests for patches we have
[ ] Build and run tests on CI bots

Chromium tests documentation:

Running tests locally
Layout Tests

/cc @jkleinsc, @tonyganch, @zcbenz, @groundwater, @gavignus

We can start with the content_unittests and go directly to the step five: "Build and run tests on CI bots." It means we need to 1) build content_unittests target, 2) run it, 3) parse results, 4) display results in a human-readable form.
@jkleinsc I would need your help to actually run the tests on CI machines.
Not right now, but in the nearest future.

Build config for tests:
is_debug = false
is_component_build = true
dcheck_always_on = true
symbol_level = 1
compute_grit_inputs_for_analyze = true
enable_update_channel = false
enable_nacl = false

Failing tests
content_unittests

DOMStorageMapTest.EnforcesQuota

@alexeykuzmin is there any thought about running Electron test suite as well?  In theory we can build Electron from the compiled libcc and run the Electron test suite.  I think maybe all the parts are there because on the Electron build you can specify where libcc is.

@jkleinsc so you're suggestion on every change in libcc run
build libcc → run libcc tests → build Electron (with this libcc) → run Electron tests ?
Makes a lot of sense.
It would require some non-trivial changes in out CI setup though. But will be extremely useful.

Yes, that way we verify libcc PR is ok to go without having to have electron PR before we can verify it.

Ok. So, on every commit in the libcc repo we should trigger not libcc, but Electron build.
Electron builds shouldn't expect libcc binaries to be always available for download, but instead
a) trigger a libcc build, if that libcc revision has never been built
b) wait for the libcc build, if there is a build in progress
c) fail if the libcc build has failed
Can we setup builds like that on all our CI platforms?

@alexeykuzmin a couple of thoughts

Why can't we build libcc from Electron if commit doesn't exist?  I know it means Electron build could potentially run super long, but that should be the exception not the norm.   The nice thing about this would be we could make sure that libcc is being tested against the version of Electron it is intended for and would cover the case where there are changes to both libcc and electron.  Maybe we could throw something in a config file that tells the CI build to build libcc if it isn't already built?

If we are going to build Electron from a libcc PR, it would be my preference to build libcc first and then point Electron to the newly compiled build.  As far as which Electron to build, we could derive it from target branch name or possibly use some config file to specify which Electron branch.

Why can't we build libcc from Electron if commit doesn't exist?

I'm afraid I don't fully understand what you mean by "commit doesn't exist" )

As far as which Electron to build, we could derive it from target branch name or possibly use some config file to specify which Electron branch.

Or we can simply build it against master, at least for now. We can add more complex logic later.

@alexeykuzmin sorry I meant if libcc for a specific commit hasn't been build.
Building against master is a good start!

I meant if libcc for a specific commit hasn't been build

Sure, of course we can build libcc as part of Electron build. We even have this option already implemented in the Electron build scripts.
But maybe it would make sense to trigger a libcc build from an Electron build and wait for it to finish, instead of building everything in place? Having libcc binaries available for download could save us some time if we would have to restart a build.

@jkleinsc
My idea was to trigger Electron builds for all PRs in both  libcc and Electron repos.
For Electron PRs run builds as usual, for libcc – run (Electron master + new libcc).
I don't know if it is possible or even make sense )

Hey there,
It's been a long time coming but the libchromiumcontent repository is being archived as it is no longer used in the Electron build system (🎉 this is a good thing).
If your issue is still relevant to Electron in it's current build system (please verify first) then you should probably raise a similar issue on electron/electron.
Thanks 😄


Error code should be a string

First at all, thanks for the nice gem! It does extremally huge work! And really easy to use!
I've discovered that errors codes are returned as strings, but according to JSONAPI specification, as I understood they should be strings.

code: an application-specific error code, expressed as a string value.

E.g. instead of 100 should be returned "100".
Do I understoond it right?
Thanks in advance!

I'm seeing that as well. :+1: When I inspect my response body during an error, I see:
{"errors":[{"title":"can't be blank","detail":"user - can't be blank","id":null,"href":null,"code":100,"source":{"pointer":"/data/attributes/user"},"links":null,"status":"422","meta":null}]}

Specifically, "code": 100, when it should be "code": "100".


added changes on AIRMapMarker.m

Does any other open PR do the same thing?

(please answer here)
What issue is this PR fixing?
(please link the issue here)
How did you test this PR?

(please answer here)

Hi @jaysonsorio
What's this PR supposed to do ?


Delete images/frames from an existing task

Hi,
Thank you for this amazing tools, seems really promising. I'd like to suggest a new feature which is to allow to add/delete images/videos from an existing task. From my side it's really common to extend or reduce the dataset size during the development process.
Thank you for you work!

Hi,
The only advantage is that you don't need to modify/join the exported files If you annotate two different tasks and you need to have both annotations together to train a model.

Hi @carlescarmonacalpe ,
If you have a good idea how to implement that please send us a PR. Our internal focus is to add stability, introduce analytics, improve UI and implement a couple of semi-automated methods to annotate data. Please let me close the issue for now but if you like implement such functionality don't hesitate to reopen it. In any case I really appreciate your involvements. Thank you very much!

Vitor Casadei 04:41
Hi, I used to use vatic and it exported the videos in image format. However on CVAT I can only download the labels, is that right? I've got to convert frames to images on my own?

vcasadei , at the moment you need to prepare data (at least for videos) by yourself. Internally we don't keep original data to save server disk space. When you upload data CVAT does compress images (image_quality parameter when you create an annotation task). Thus 1 frame can weight only 10-100 kilobytes. For example, an original image in png format can be several megabytes. I will submit an issue regarding that. Probably we need one more step in CVAT: prepare a dataset. Thus users can prepare data and after that download them from CVAT as is. If you can help us with such app/feature for CVAT you are welcome.

The feature will be implemented only in our new UI. Thus need to move it on v1.0.0 which is expected at the end of the year.

I am facing similar issue where I will have to consolidate/add additional frames with annotation and generate one single JSON file. Is there a way, I can do that?

Hi,
Is there a progress update on this feature?

Hello! Is there anything more with this? I have an extra 40 images to annotate so was hoping to just add them into my existing annotations. Cheers!

Hi, any update on this feature? Would be extremely useful !! CVAT is great, but this definitely helps users who might have made mistakes when uploading datasets and didn't realize until after annotation. Furthermore, it is beneficial to any user who would like to continue to add to their datasets as they annotate. It makes exportation of annotations easier and more consolidated when going to train.

@mrawding , the PR is the first step to solve the problem https://github.com/openvinotoolkit/cvat/pull/2255

Hello @nmanovic and @bsekachev Does it work now? Adding images to an existing task, or merging tasks within a project.

@davodogster
No updates on the feature.
Instead of adding images to an existing task, you can move the task to a project and create another task in the project with new images. Finally, you can dump all the annotations for the project, after #3365  will be merged.
As a workaround, you can add to extra images a tag: "extra" for example. And if the annotation file contains this tag, you just ignore the image.

@bsekachev Awesome, I'm looking forward to using this feature when it has been merged. Thank you

@davodogster , it was merged already. Please use the latest development version if you want to test/use the feature.
To close the issue we are waiting ability to mark images/frames as removed in a task.

@nmanovic Great, thanks. So I need to docker-compose stop, backup my annotations and then clone the latest cvat github repository and then docker-compose again ? Regards, Sam

@davodogster , it is the fastest way.

@nmanovic Hi guys, I just cloned the latest version of cvat and ran docker compose and modified the docker compose file (I notice there were some big changes to the docker compose file) see here:

It deployed successfully but there is no option for exporting a project as a dataset in the "Actions" tab.

Am I doing something wrong?

@nmanovic Hi guys, I just cloned the latest version of cvat and ran docker compose and modified the docker compose file (I notice there were some big changes to the docker compose file) see here:

It deployed successfully but there is no option for exporting a project as a dataset in the "Actions" tab.

Am I doing something wrong?

Hi, please use Export task dataset option in the Actions tab.
Regarding orphans container - it's expected, just follow the docker suggestion and add --remove-orphans once.

Hi,
That is not an option. The only option is delete. That is why I asked the question.
Cheers, Sam
Get Outlook for iOShttps://aka.ms/o0ukef

From: Andrey Zhavoronkov @.>
Sent: Wednesday, August 18, 2021 7:33:56 PM
To: openvinotoolkit/cvat @.>
Cc: Sam Davidson @.>; Mention @.>
Subject: Re: [openvinotoolkit/cvat] Add/Delete images/video to existing task (#95)
@nmanovichttps://github.com/nmanovic Hi guys, I just cloned the latest version of cvat and ran docker compose and modified the docker compose file (I notice there were some big changes to the docker compose file) see here:
[image]https://user-images.githubusercontent.com/46079516/129834211-7ef3c7a9-5c82-494c-96eb-62ac7e0f3a94.png
It deployed successfully but there is no option for exporting a project as a dataset in the "Actions" tab.
[image]https://user-images.githubusercontent.com/46079516/129834633-16b0a805-69f3-4b77-94f8-247e61c0bec0.png
Am I doing something wrong?
Hi, please use Export task dataset option in the Actions tab.
Regarding orphans container - it's expected, just follow the docker suggestion and add --remove-orphans once.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/openvinotoolkit/cvat/issues/95#issuecomment-900889128, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK7R4HC5R4OM4CZ22R23MJLT5NO6JANCNFSM4FXJNFWA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

The workaround described above, exporting the labeled data and using those labels on a subset of images, does not work when using COCO annotations, if the images you wish to ignore already contain labels.  I don't think the workaround provided above is sufficient for most CVAT users.  This is a rather basic functionality, it is perhaps my team's greatest frustration with CVAT.
Is it possible to exec into the PostgreSQL DB and delete annotated images from there?

any update on this feature?

Hi guys, @carlescarmonacalpe @domef
The feature has been finished and implemented in our CVAT fork, here: https://github.com/cvat-ai/cvat

+1 really need this feature

@adamsau , is it something which you are looking for? https://cvat-ai.github.io/cvat/docs/manual/advanced/delete_frame/

yes thanks a lot!

It is possible now, you can update CVAT from develop branch if you want to use the feature.


Backup with Keeper

Check Box is fine on the first option "I have a back-up with Keeper" and remove the arrow on it
This screen can be redesigned to add the QR, derivation path, and purpose in other options or menus.
Content part to be made by Abhilash on this screen

Completed


Add Odoo to integration section

Blocked by https://github.com/btcpayserver/btcpayserver-doc/issues/1414
Once above is merged, we can proceed adding it. This task is assigned to @TChukwuleta

Assigned to @TChukwuleta


Add a flag to enforce commit signoff

Hi, it would be great to have an optional flag to enforce commit signoff, e.g. when working on a project which requires every commit to be signed off (see the git commit documentation)
This would involve checking for the presence of a Signed-off-by line (see example below) in the commit message.
Signed-off-by: Joe Bloggs<EMAIL_ADDRESS>

Thanks for the suggestion, @johnboyes! Do more such lines exist or is Signed-off-by: ... the only one?
If there are multiple such lines, it might make sense to come up with a more general interface where the user can specify that there should be lines conforming to a regular expression (including their cardinality). However, if signed-off-by is a single case, the flag seems like a better and more reusable solution across different projects (i.e., each project can just use the flag instead of copy/pasting the regular expressions).
Could you dig into the Git documentation to see if there are more such lines?

Thanks for the suggestion, @johnboyes! Do more such lines exist or is Signed-off-by: ... the only one?
If there are multiple such lines, it might make sense to come up with a more general interface where the user can specify that there should be lines conforming to a regular expression (including their cardinality). However, if signed-off-by is a single case, the flag seems like a better and more reusable solution across different projects (i.e., each project can just use the flag instead of copy/pasting the regular expressions).
Could you dig into the Git documentation to see if there are more such lines?

Hi @mristin, thanks for the quick reply!
For git commit signoff, it's just that one Signed-off-by: line.  So as you say, a flag (called something like enforce-signoff, maybe) would work well.
NB the check would not need to enforce that the Signed-off-by: line is always the last line in the commit message, as that is not stipulated.  So it's just a check that the line appears somewhere in the body of the message.

Hi @mristin, thanks for the quick reply!
For git commit signoff, it's just that one Signed-off-by: line.  So as you say, a flag (called something like enforce-signoff, maybe) would work well.
NB the check would not need to enforce that the Signed-off-by: line is always the last line in the commit message, as that is not stipulated.  So it's just a check that the line appears somewhere in the body of the message.

Could you dig into the Git documentation to see if there are more such lines?

I've looked through the https://git-scm.com/docs/git-commit documentation and there's no other git commit flags that mandate certain content in the commit message that I can see 🙂

Could you dig into the Git documentation to see if there are more such lines?

I've looked through the https://git-scm.com/docs/git-commit documentation and there's no other git commit flags that mandate certain content in the commit message that I can see 🙂

@johnboyes So there should be a line matching:
^\*Signed-off-by:\s*[^<]+\s*<[^@>]+@[^@>]+>

, did I get that right? Or is it only the prefix "Signed-off-by:" what matters? I suppose you want to automatically process the git log at some point?

@johnboyes So there should be a line matching:
^\*Signed-off-by:\s*[^<]+\s*<[^@>]+@[^@>]+>

, did I get that right? Or is it only the prefix "Signed-off-by:" what matters? I suppose you want to automatically process the git log at some point?

Thanks @mristin, it's the format of the whole line that matters - in pseudocode it needs to be
Signed-off-by: A Name <emailaddress>
Here's a regex for reference from the DCO probot: [regex = /^Signed-off-by: (.*) <(.*)>$/img](https://github.com/probot/dco/blob/523afa2ddf5f9b80101921f0d523288b628b014a/lib/dco.js#L74)

Thanks @mristin, it's the format of the whole line that matters - in pseudocode it needs to be
Signed-off-by: A Name <emailaddress>
Here's a regex for reference from the DCO probot: [regex = /^Signed-off-by: (.*) <(.*)>$/img](https://github.com/probot/dco/blob/523afa2ddf5f9b80101921f0d523288b628b014a/lib/dco.js#L74)

Some examples:

Valid

Signed-off-by: Random J Developer<EMAIL_ADDRESS>

Invalid

Signed-off-by Random J Developer<EMAIL_ADDRESS>

signed-off-by: Random J Developer<EMAIL_ADDRESS>

Signed-off-by: Random J Developer <randomdeveloper.example.org>

Signed-off-by: Random J Developer (randomdeveloper.example.org)

Signed-off-by: Random J Developer randomdeveloper.example.org

Some examples:

Valid

Signed-off-by: Random J Developer<EMAIL_ADDRESS>

Invalid

Signed-off-by Random J Developer<EMAIL_ADDRESS>

signed-off-by: Random J Developer<EMAIL_ADDRESS>

Signed-off-by: Random J Developer <randomdeveloper.example.org>

Signed-off-by: Random J Developer (randomdeveloper.example.org)

Signed-off-by: Random J Developer randomdeveloper.example.org

Thanks, @johnboyes! I hope to be able to have a look at it tonight.

Thanks, @johnboyes! I hope to be able to have a look at it tonight.

@johnboyes I need to get my Linux machine to re-build the package as I could not get the dependencies installed on my Windows machine. I'll bump the minor version tomorrow.

@johnboyes I need to get my Linux machine to re-build the package as I could not get the dependencies installed on my Windows machine. I'll bump the minor version tomorrow.

Thanks @mristin.  That would be really great if you can create a new release for this.   May be worth adding an overview of this functionality in the README, btw.  Thanks again.

Thanks @mristin.  That would be really great if you can create a new release for this.   May be worth adding an overview of this functionality in the README, btw.  Thanks again.

Hi @johnboyes,

That would be really great if you can create a new release for this.

The new version 2.3.0 is up -- please let me know if it works as expected for you.

May be worth adding an overview of this functionality in the README, btw.

Fixed in #77, thanks for spotting it! I forgot to document the feature in haste.

Hi @johnboyes,

That would be really great if you can create a new release for this.

The new version 2.3.0 is up -- please let me know if it works as expected for you.

May be worth adding an overview of this functionality in the README, btw.

Fixed in #77, thanks for spotting it! I forgot to document the feature in haste.

Hi @mristin

The new version 2.3.0 is up -- please let me know if it works as expected for you.

Thanks for this.  I just tried it but couldn't get it to work I'm afraid - after turning on the check I couldn't get it to stop commits with no sign-off.

Hi @mristin

The new version 2.3.0 is up -- please let me know if it works as expected for you.

Thanks for this.  I just tried it but couldn't get it to work I'm afraid - after turning on the check I couldn't get it to stop commits with no sign-off.

Thanks for checking it out, @johnboyes ! Could you please send me the relevant snippet of your workflow so that I can try to reproduce the error?

Thanks for checking it out, @johnboyes ! Could you please send me the relevant snippet of your workflow so that I can try to reproduce the error?

Sure thing @mristin, here's a quick example
Apologies if it's user error on my part!

Sure thing @mristin, here's a quick example
Apologies if it's user error on my part!

Did you maybe forget to copy/paste the full URL? (The link to the example looks like a commit hash to me.)

Did you maybe forget to copy/paste the full URL? (The link to the example looks like a commit hash to me.)

I fixed the link within 20 seconds of posting it, you must have been quick ;-)

I fixed the link within 20 seconds of posting it, you must have been quick ;-)

@johnboyes Could you please try the verision 2.3.1 on your repository? The end-to-end test passes on my side, but you never know :).
For some reason, the distribution files included in the release 2.3.0 were not properly built, but I didn't notice it. There will be more thorough manual end-to-end tests from now on to avoid such issues.

@johnboyes Could you please try the verision 2.3.1 on your repository? The end-to-end test passes on my side, but you never know :).
For some reason, the distribution files included in the release 2.3.0 were not properly built, but I didn't notice it. There will be more thorough manual end-to-end tests from now on to avoid such issues.

Hi @mristin, yes that all works properly now, thanks. Doing end-to-end tests every time is a great idea, I wonder if you could automate them?  You could have a GitHub Action workflow in your repo triggered on every push, that programatically creates commits on an example repo, running against the corresponding version of the opinionated-commit-message checker? Just sharing ideas :-)

Hi @mristin, yes that all works properly now, thanks. Doing end-to-end tests every time is a great idea, I wonder if you could automate them?  You could have a GitHub Action workflow in your repo triggered on every push, that programatically creates commits on an example repo, running against the corresponding version of the opinionated-commit-message checker? Just sharing ideas :-)


Markdown Link Highlighting (references)

From @erichiller on February 11, 2017 19:33

VSCode Version: 1.9.1
OS Version: Win 10x64

When defining links such as the below, while in the editor, the links are not highlighted as they are in test style links. I think it would be better, and more uniform for the editor to highlight these links in the same manner.
[Promise] objects have a [then]

[Promise]: https://msdn.microsoft.com/library/windows/apps/BR211867
[then]: https://msdn.microsoft.com/library/windows/apps/BR229728

Promise objects have a then

Copied from original issue: Microsoft/vscode#20483

@hashhar For the syntax highlighting, we should just update the grammar file to identify contents inside of [...] as links. To get started, take a look link-ref in the syntax file: https://github.com/Microsoft/vscode/blob/master/extensions/markdown/syntaxes/markdown.tmLanguage

From @hashhar on February 15, 2017 3:47
Is there a better way to implement it other than looking for all unmatched and unescaped square brackets and then referencing them. Also, what code is responsible for the link generation? Does it come from the syntax file or is it generated by modifying an object that holds the viewstate of the editor.

From @chirag64 on March 2, 2017 12:43
I'd like to give this a try.
@erichiller Can you please explain how you want these links to be highlighted? Your link to test style links gives a 404 error.

From @hashhar on March 2, 2017 11:49
Wow. This got out of hand for me. I'm very confused. Somebody else can and should work on it.

Fixed by 2544443db4402b3271b1b99bd9a1efb2c757c3d5

I believe that the fix for 2544443 has broken the syntax highlighting for link reference definitions that contain characters other than alphanumeric and underscore.  For example, it is common for a link reference to use hyphens, but hyphens are not matched by \w.
 (\[)([\w ]+?)(\])(:)    # Reference name

So, a link reference definition like the following is no longer highlighted correctly in VS Code.
[link][ref-1]

[ref-1]: http://localhost/

The link reference definitions were highlighted correctly when the pattern was (\[)(.+?)(\])(:)    # Reference name.
Probably it would be better to replace [\w ] with [^]] to match any character except a closing bracket.

Created issue https://github.com/Microsoft/vscode-markdown-tm-grammar/issues/39 (Syntax highlighting for reference link definitions broken) for the problem with reference link definitions that contain characters other than alphanumeric or underscore.

Can this be made optional? So when disabled, the highlighting would require that [<<..>>] would be followed by (, [ or :, to not be just text.


Update integration tests

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches


Add CustomOption for API calls

This should allow anyone to add custom query params to API calls

I'm using it with spec.nodeName atm, not sure if I will need more in the future

@ericchiang, field selectors have first class support upstream.
https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/types.go#L283

@vjsamuel the client supports adding it to the query but the API server doesn't have full support on every resource object: https://github.com/kubernetes/kubernetes/issues/1362
It generally breaks for different resources so isn't something that people should be encouraged to use. You should prefer label selectors, so that why I haven't added field selector support.

@ericchiang, the fieldSelector params working or not working depends on if the resource being queried defines valid selectable fields in its strategy.go
https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/pod/strategy.go#L163
FieldSelectors typically work for all such use-cases. It would be great if k8s-client could support the same. :)

Sure, we can add them. I just want to make sure that there's adequate warning that they don't work with a bunch of resources. It'll probably look like a bug in the client.

Agreed that it looks like a bug. But its only lack of documentation IMHO.

@ericchiang what's the status of this? do you want me to add a warning comment?


TabBar from mobile appears in desktop Contacts after refreshing

contacts functionality should not be included in any releases. i don't think we will work on it soon. is is possible to exclude it from the develop branch?

There is no such issue in current version.


All the templates should include tests

I am using Leptos as my frontend framework and appreciate the concept. However, to add tests in the template, we need to create two different cases: one for the Rust function and another for the WASM component logic test. Both cases are well defined in the Leptos book. Including them in the template could increase the chances of future breaking changes. If users want to use Leptos, they should read the book and implement their tests. I found this approach to be fairly simple and more aligned with Leptos than Tauri. Other template cases may vary.
https://book.leptos.dev/testing.html

I meant the basic tests setup respectfully to backend and front-end flavors. One test method per backend and one per frontend. Just as an example or starting point. No more...


Display a message when no unaudited content is assigned

In order to help users orientate themselves on the site, this change
adds a message that explicitly tells them if they are filtering by
“Not audited” content (the default), but no content has been assigned
that is not audited.
A message is shown regardless of whose allocations are being viewed,
but the message is only shown on the “Audit content” tab, and notably
not the “Assign content” tab. This is because the “Assign content”
tab will have a default view that will probably default to showing all
unassigned, unaudited content, and having no content there will be a
rare case.
Also notably, the change does not show a message for “Audited”
content either - so if a user has not yet audited any content, the user
will be presented with a blank table.
Screenshots

 Show Info Message when there is no content to audit assigned to user

@pmanrubia can you please re-review?


Implement deletion sync

If a user deletes task in TW, it should automatically be deleted from Asana.

Done. https://github.com/manishrjain/asanawarrior/commit/e4fec87d5bcb97f87b3f1857f55baf80474091f3


Doors not placing in 1.0.3 version of BG2

Building Gadgets Version
1.0.3
Describe the bug
All doors are not being placed when pasting in a schematic. Doors are listed in the Material List.   Also of note and possibly related, trap doors paste into the world in a down, horizontal, state regardless of state when copied.
To Reproduce
Paste in a schematic with doors in it.
Expected behavior
All doors should be placed in.
Screenshots
If applicable, add screenshots to help explain your problem.
Log Files
No crash
NOTE ON RUBIDIUM
Rubidium contains code that will crash many mods when used in conjunction with them. Unfortunately this includes Building Gadgets 2. There is absolutely nothing I can do on my side to prevent these crashes. If you're using Rubidium and your game crashes when rendering something, please try without rubidium before submitting a bug report.

also the campfires if extinguished with shovel are not staying unlit and when pasted become relit as well.

Doors are blacklisted in the mod - they are just weird things that are hard to place due to being 2 blocks in reality.
I’ll look at the state issues though :)

Trapdoor shares its properties with other blocks that are less safe to copy, so I'm err'ing on the side of safety here. Sorry! Gotta leave trap doors as they are.


⚠ Bofrost.nl has degraded performance

In c90166b, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 1533 ms

Resolved: Bofrost.nl performance has improved in 47ca70c.


Make "copy" work better with numpy arrays

Previously, if you go to variable explorer, right clicked
on a (large) numpy array and clicked copy if copied in the form
[[1.0, 2.0 ... 3.0 ]] (i.e. with dots in place of the middle
of the array)
Now it copies the whole array with as a tab separated string.
This is more useful since you can paste directly into Spyder
or into a spreadsheet, and no data is omitted.
The downside is that the clipboard can get quite large

I have one additional issue with copying arrays from Spyder (under slightly different circumstances) that I'd like to fix, but it's a bit more complicated, so will have have to wait. It'll come under a different pull request I think.

Thanks @da-woods :-)

It should be a bit tidier now.

That was just a quick code style review, I didn't check the functionality.

Thanks a lot for your work @da-woods! I'm going to merge it as it is because I need it for other improvements I've done to the Variable Explorer.


Footer and Sponsors

Very WIP footer formatting is fully broken, half of the images are incorrectly linked and we don't have descriptions for most robots.
TODO:

[ ] fix footer styling
[x] make footer use react-icons icons
[x] add/fix images and descriptions for robots page
[ ] cleanup

Supersedes https://github.com/CurtinFRC/Team-Website/pull/138

Bang on warp page needs removal


Don't import Bugsnag in test build

Approach:
Detect when the host app is in testing and basically make the addon enter stealth mode. Nothing is included in the app/vendor (bugsnag, initializers... nothing)

Looks great! Thanks for the contribution @cibernox.

Released in v1.0.1

@cibernox do you remember your motivations for not including bugsnag in a test build? See #78 for wider discussion.


CSHARP-409 - Mapper: Support timestamp at CqlQueryOptions level (Inserts only for now)

From https://datastax-oss.atlassian.net/browse/CSHARP-409

@jorgebay fixed.  Thanks.

Oops I missed that one.  Fixed.
Also see PR #208: Using lang features > C# 4.0 should be a compile error.

Looks good, I will try to add a unit test for it and merge it.

After a closer look, I'm not going to merge it as it should be implemented using protocol level timestamp: you can specify it at Statement level without affecting the query.
You can implementing by adding it to the following method:
https://github.com/datastax/csharp-driver/blob/a4afd10b15d33bde2606d657f0f59f59fb539389/src/Cassandra/Mapping/CqlQueryOptions.cs#L131
Something like:
if (Timestamp != null)
{
    statement.SetTimestamp(Timestamp);
}

That later gets applied by the statement factory here: https://github.com/datastax/csharp-driver/blob/a4afd10b15d33bde2606d657f0f59f59fb539389/src/Cassandra/Mapping/Statements/StatementFactory.cs#L44
We appreciate your continuing effort to contribute and improve the driver, keep it coming!
Sorry for the misunderstanding

Implemented according to your suggestions at PR #209


Fixing some inconsistent casing on website.

All changed packages have been documented!

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/2879/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/2879/


feat(clamav): print version of ClamAV DB

It may be useful to users to know which version of ClamAV DB is used

@dheerajodha in my dev env


Add Tower execution feature to README

It's quite simple to monitor a pipeline run via tower.nf:

We could add a section to the README, e.g., after the ## Profiles section in the already updated README in the dev branch (github is converting some of the md below automatically, should work to just copy from raw mode):
## Monitoring

<img align="right" width="400px" src="figures/tower.png" alt="Monitoring with Nextflow Tower" />

To monitor your Nextflow computations, VIRify can be connected to [Nextflow Tower](https://tower.nf). You need a user access token to connect your Tower account with the pipeline. Simply [generate a login](https://tower.nf/login) using your email and then click the link sent to this address.

Once logged in, click on your avatar in the top right corner and select "Your tokens." Generate a token or copy the default one and set the following environment variable:

```bash
export TOWER_ACCESS_TOKEN=<YOUR_COPIED_TOKEN>

You can save this variable in your .bashrc or .profile to not need to enter it again. Refresh your terminal.
Now run:
nextflow run EBI-Metagenomics/emg-viral-pipeline -r v0.4.0 --fasta "/home/$USER/.nextflow/assets/EBI-Metagenomics/emg-viral-pipeline/nextflow/test/assembly.fasta" --cores 4 -profile local,docker -with-tower

Alternatively, you can also pull the code from this repository and activate the Tower connection within the nextflow.config file located in the root GitHub directory:
tower {
    accessToken = ''
    enabled = true
}

You can also directly enter your access token here instead of generating the above-mentioned environment variable.

Done in https://github.com/EBI-Metagenomics/emg-viral-pipeline/commit/3c840933463


Change the output order of line number and arg name

For the following example:
from objprint import config, install, objjson, op

config(line_number=True)
config(arg_name=True)

x = 1
op(x)

This is the output right now:
x:
<module> (/path/to/objprint-test.py:7)
1

What I think more intuitive is argument name followed by the value and the file and line number at the top. In this particular case:
<module> (/path/to/objprint-test.py:7)
x:
1

Any thoughts?

You are right, it should be fixed.


I can implement fs.readFileSync to read files. But, what I want is: import {readFileSync} from 'fs' (so the same code is available for nodejs and my runtime)

I can now implement fs.readFileSync to read files. But, what I want is: import {readFileSync} from 'fs' (so the same code is available for nodejs and my runtime)
How to modify the code to achieve the import effect I want.
https://github.com/i18n-site/ejs/blob/main/src/ext/init_fs/mod.rs
https://github.com/i18n-site/ejs/blob/main/src/ext/init_fs/init_fs.js
use rustyscript::deno_core::{extension, Extension};

use crate::ext::fs::Permissions;

extension!(
  init_fs,
  deps = [rustyscript],
  esm_entry_point = "ext:init_fs/init_fs.js",
  esm = [ dir "src/ext/init_fs", "init_fs.js" ],
  state = |state| state.put(Permissions{})
);

import * as io from "ext:deno_io/12_io.js";
import * as fs from "ext:deno_fs/30_fs.js";

import {
applyToGlobal,
// writeable,
nonEnumerable,
} from "ext:rustyscript/rustyscript.js";

applyToGlobal({
// io: nonEnumerable(io),
fs: nonEnumerable(fs),
// fs: nonEnumerable(fs),
});

At the same time, I want to implement
import {dirname} form 'path'
to actually import the file
deno bundle https://deno.land/std/path/mod.ts path.js

I will embed this path.js into the program. Can I do this(In other words, can the search path of the module be customized?
)?

deno bundle seems to be deprecated, can use this package path.js
deno eval 'import { bundle } from "https://deno.land/x/emit/mod.ts"; const { code } = await bundle(new URL("https://deno.land/std/path/mod.ts")); console.log(code);'| esbuild --minify --bundle --outfile=path.js --format=esm

To import code from an extension use ext:name/path.js format
For example, if the extension and file you embedded dirname into was called my_fs/main.js you'd use ext:my_fs/main.ks

Can you provide an example code under 'example' to demonstrate to impl this requirement?
I'm not quite clear on how to do it (how to configure 'extension!' )
  use rustyscript::deno_core::extension;

  use crate::ext::fs::Permissions;

  /*
     import { readFileSync } from 'fs'
     import { dirname } from 'path'
  */

  extension!(
    init_fs,
    deps = [rustyscript],
    esm_entry_point = "ext:init_fs/init_fs.js",
    esm = [
      dir "src/ext/init_fs", "init_fs.js",
      // dir "src/ext/init_fs", "path.js",
    ],
    state = |state| state.put(Permissions{})
  );

Configure what requirement? Sorry I'm not sure I understand

I mean, if you want to support "
import {readFileSync} from 'fs'
".
How should I write extension!() or how should I write ext:init_fs/init_fs.js
.
Can you give me a demo code to show how to import a custom built-in module?

Ah I see
Deno requires ./fs, instead of just fs
Your line should read:
import {readFileSync} from './fs'


Theme does not correspond to syntax highlight in text editors

Hey, I know it is a bit of nitpicking at this point, but it kinda bothers me that the highlight colors used by bat do not correspond to the ones used in helix, neovim, sublime, or other text editors. For example, in the sublime config the built-ins are colored with "love" color, whereas here the "iris" color is used. It would be more consistent if the highlighting were the same across all applications. Would you be interested in such a fix?

I think that would be a decision for @mvllow or @ThatOneCalculator to provide feedback on.
I would recommend providing some screenshots showing the differences and the proposed fix along with a PR and see what feedback you get.

I would personally consider Neovim to be a great reference for the "source of truth" but also it's semi-intentional to be relaxed and flexible enough so that anyone willing to donate their time porting Rosé Pine can do so with their own rendition. That being said, any PR that unifies colour usage between ports is always appreciated :)
Perhaps it would make contributing easier for some if we did have more specific documentation for applying our palette, even if simply a suggestion


Error for creating a tournament without a club (dummyUser) is not handled by frontend

Possible: implement check for whether user has a club before opening the createtournament dialog?

fixed with conditional rendering