Add ComponentDidUpdate Functionality

The react-perfect-scrollbar works well on initial render, but
if the underlying content changes in size, the scrollbar size
does not update until you manually interact with the scrollbar.
By adding this function, the scrollbar will update any time
the content size changes.

Addresses issue #10

Thanks for the contribution.

Thanks for getting a new release out quickly.

I'm using 1.3.0, but it doesn't seem to work, the the scrollbar size does not update until I manually interact with the scrollbar. Is this change already in 1.3.0? Or is there any implementation detail I should know?
Thanks!

@rpelorosso 1.3.0 is the version of perfect-scrollbar. You'd better ask issues there. Thanks.

@goldenyz That's true, it was my mistake while writing down the version.  I'm using react-perfect-scrollbar 1.0, which in turn uses perfect-scrollbar 1.3.0.  But I'm having an issue with the scrollbar not updating when the content size changes.

@rpelorosso Could you provide a code example for how your content size changes? One possible reason would be the content size changes in child component which does not cause the component which using ScrollBar update:
class Container extends Component {
  ...
  render() {
    return (
      <ScrollBar>
        ...
       <ChildComponent />
        ...
      </ScrollBar>
    );
  }
}

class ChildComponent extends Component {
  handleClick = () => {
    this.setState({
      show: !this.state.show,
    });
  }

  render () {
    return (

        <button onClick={this.handleClick} />
        { this.state.show ?
 }

    )
  }
}

For example above, the ChildComponent's update triggered by click will not cause the Container update. So the Scrollbar will not update, too. Which you can do is add a props on ChildComponent and bind a function to update Container, Like:
class Container extends Component {
  ...
  render() {
    return (
      <ScrollBar>
        ...
       <ChildComponent onUpdateSize = {() => { this.forceUpdate(); }} />
        ...
      </ScrollBar>
    );
  }
}

class ChildComponent extends Component {
  handleClick = () => {
    this.setState({
      show: !this.state.show,
    }, () => this.props.onUpdateSize());
  }

  render () {
    return (

        <button onClick={this.handleClick} />
        { this.state.show ?
 }

    )
  }
}

Could you help to confirm if it is the reason? If so, I will add a more graceful way to update the ScrollBar, Thanks.

Thank you @goldenyz ! That is in fact the reason it wasn't working. Your code example works just fine. Thank you!

@rpelorosso I have added a method updateScroll in the component. You could refer https://github.com/goldenyz/react-perfect-scrollbar#updatescroll for more details

The problem is you can't access updateScroll until you interact with the component.

@yyynnn can you provide an example on codesandbox.io?


SDL2 + bgfx + Android : need help

I'm trying to get SDL2 working with bgfx on android, windows version is ok. But on android it crashes with the following error on bgfx::init() :
E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0xaebbb208) failed (0xffffffea) (already connected to another API?)
09-28 16:21:26.424 10167-10231/com.game.test2 E/libEGL: eglCreateWindowSurface:456 error 3003 (EGL_BAD_ALLOC)

Here's my init code:
    SDL_SysWMinfo wmi;
    SDL_VERSION(&wmi.version);
    if (!SDL_GetWindowWMInfo(sdlWindow, &wmi)) {
        return false;
    }
    bgfx::PlatformData pd;
    pd.nwh = wmi.info.android.window;

    bgfx::setPlatformData(pd);
    bgfx:init()

I guess it's because SDL already created the surface and bgfx is trying to recreate it. I also set PlatformData::backbufferDS, PlatformData::backbuffer pointer I got from SDL but still no change (I think bgfx only checks for these in d3d11 backend).
I also tried setting nwh to NULL but init fails silently
Am I doing something wrong here ?

followed the instructions suggested here https://github.com/bkaradzic/bgfx/issues/805
and my issue is fixed. btw the solution is currently a hack, maybe bgfx can just be overrided by a context and surface and leave those stuff to SDL.
thanks

Regarding this issue. I found another bug in onActivityResume that shows blank screen.
jazzbre is missing another modification in his solution:
comment all SDL_EGL_CreateSurface and SDL_EGL_DestroySurface calls in SDL_Android.c too.

Still the solution in 2020 :+1:

Just did a test, with latest SDL2 without any modifications you can just add this line:
SDL.SetHint("SDL_VIDEO_EXTERNAL_CONTEXT", "1");
And it will not create any OpenGL etc context anymore.

Sorry for discussions in a closed issue. @jazzbre Did you test portrait and landscape switch in android device? It is very strange that rendering freezed after resizing. And if no switch, just set "Portrait" in phone or set "Landscape" in pad also freezes rendering...
Similar to a windows bug in https://github.com/libsdl-org/SDL/issues/1059.


Linking a Table of Contents page to sections of the PDF

I am creating a separate Table of Contents page that is bundled inside the PDF which has link tags as:

   Go to Section

and then adding an a tag with the target , which also gets embedded in the PDF
You should arrive here

when saving the PDF file, it doesn't go the section as expected, it opens up a tab in the browser with the anchor tag.

https://bunchoblokes.org/pdf/General-Documents/BOB-Manual.pdf#page=4
Well for the A href + links its not the same as HTML. I check online and see this goes like: "#page="
This is the best way to refer to a page number.

@cablegunmaster The main issue is that it any anchor tag sends me to a new tab, not to an element target inside the PDF

@romucci I've found the same issue. All anchor links are incorrect. They're rendered with the base URI preceding the #.
But that's not all.... It appears that all links  are broken.

@romucci  it may happened if you set base url before coverting to pdf
converterProperties.setBaseUri(baseUrl); HtmlConverter.convertToPdf(html, target, converterProperties);

@romucci Did you find a solution to this? Thanks in advance!

@WISEFREAKZ Did you find the solution? Thanks in advance!

same


error message ['function' object has no attribute 'Model']

Hello!
Please help me start training
All the actions I've taken:

Created a new project (ocr_service) in pycharm with a virtual environment

Cloned the project (git clone https://github.com/Azazel0203/ocr_captcha.git)

cd ocr_captcha

pip install -r requirements.txt

Added six new characters "+", "-", "*", "!", "@", "." to the file "artifact/unique_char.csv", "artifact/char_to_num.json", "artifact/num_to_char.json"

In the file "artifact/char_to_num.json" and "artifact/num_to_char.json" corrected "vocabulary_size": 32 to "vocabulary_size": 38

unique_char.csv file:

This is how I have my files now "artifact/char_to_num.json" and "artifact/num_to_char.json"
{"config": {"name": "string_lookup_1", "trainable": true, "dtype": "float32", "invert": true, "max_tokens": null, "num_oov_indices": 1, "oov_token": "[UNK]", "mask_token": null, "output_mode": "int", "sparse": false, "pad_to_max_tokens": false, "idf_weights": null, "vocabulary": ["[UNK]", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "+", "-", "*", "!", "@", "."], "vocabulary_size": 38, "encoding": "utf-8"}, "weights": []}

Created a train folder in the {project name}/ocr captcha directory

Added the file "labels.csv" to the train folder

Created an images folder in the train directory and placed 93 pictures in it

In the file "data_ingestion.py" I corrected the paths and the cycle

Manually added the necessary data to the files (I don't know how correct this is) "raw_img_path.csv", "raw_labels.csv", "test_x.csv", "test_y.csv", "train_x.csv", "train_y.csv"

In the file "model_trainer.py" I changed the line with the sizes of the pictures

I run the file "data_ingestion.py", there are no errors

I run the file "model_trainer.py" and get errors

D:\ocr_service\.venv\Scripts\python.exe D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py
2024-05-07 09:25:38.677735: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-07 09:25:39.712543: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-07 09:25:41.673057: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 82, in initate_model_training
    model = build_model(self.img_width, self.img_height, char_to_num)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\utils\utils.py", line 178, in build_model
    model = keras.models.Model(
AttributeError: 'function' object has no attribute 'Model'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 129, in <module>
    model_path = trainer.initate_model_training(train_path_x, train_path_y, test_path_x, test_path_y, unique_chars)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 119, in initate_model_training
    raise customexception(e, sys)
ocr_captcha.src.ocr_captcha.exception.exception.customexception: Error occured in python script |
 name [D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py]
 line number [82]
 error message ['function' object has no attribute 'Model']

Process finished with exit code 1

In the file "model_trainer.py" line 15 is highlighted as an error

You have written "inference/: Module for making predictions on new images.", there is no such file

What am I doing wrong?
Please help me start training and then test the model.
I would be grateful for any help!
Thank you
Python version 3.10.11
Windows 11 x64
no GPU

Hello! Please help me start training
All the actions I've taken:

Created a new project (ocr_service) in pycharm with a virtual environment
Cloned the project (git clone https://github.com/Azazel0203/ocr_captcha.git)
cd ocr_captcha
pip install -r requirements.txt
Added six new characters "+", "-", "*", "!", "@", "." to the file "artifact/unique_char.csv", "artifact/char_to_num.json", "artifact/num_to_char.json"
In the file "artifact/char_to_num.json" and "artifact/num_to_char.json" corrected "vocabulary_size": 32 to "vocabulary_size": 38

unique_char.csv file:
This is how I have my files now "artifact/char_to_num.json" and "artifact/num_to_char.json"
{"config": {"name": "string_lookup_1", "trainable": true, "dtype": "float32", "invert": true, "max_tokens": null, "num_oov_indices": 1, "oov_token": "[UNK]", "mask_token": null, "output_mode": "int", "sparse": false, "pad_to_max_tokens": false, "idf_weights": null, "vocabulary": ["[UNK]", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "+", "-", "*", "!", "@", "."], "vocabulary_size": 38, "encoding": "utf-8"}, "weights": []}

Created a train folder in the {project name}/ocr captcha directory
Added the file "labels.csv" to the train folder

Created an images folder in the train directory and placed 93 pictures in it

In the file "data_ingestion.py" I corrected the paths and the cycle

Manually added the necessary data to the files (I don't know how correct this is) "raw_img_path.csv", "raw_labels.csv", "test_x.csv", "test_y.csv", "train_x.csv", "train_y.csv"
In the file "model_trainer.py" I changed the line with the sizes of the pictures

I run the file "data_ingestion.py", there are no errors
I run the file "model_trainer.py" and get errors

D:\ocr_service\.venv\Scripts\python.exe D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py
2024-05-07 09:25:38.677735: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-07 09:25:39.712543: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-07 09:25:41.673057: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 82, in initate_model_training
    model = build_model(self.img_width, self.img_height, char_to_num)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\utils\utils.py", line 178, in build_model
    model = keras.models.Model(
AttributeError: 'function' object has no attribute 'Model'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 129, in <module>
    model_path = trainer.initate_model_training(train_path_x, train_path_y, test_path_x, test_path_y, unique_chars)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 119, in initate_model_training
    raise customexception(e, sys)
ocr_captcha.src.ocr_captcha.exception.exception.customexception: Error occured in python script |
 name [D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py]
 line number [82]
 error message ['function' object has no attribute 'Model']

Process finished with exit code 1

In the file "model_trainer.py" line 15 is highlighted as an error

You have written "inference/: Module for making predictions on new images.", there is no such file

What am I doing wrong? Please help me start training and then test the model. I would be grateful for any help! Thank you
Python version 3.10.11 Windows 11 x64 no GPU

You shouldn't manually change the json files in the artifacts. The data-ingestion part does it for you.
Also you shouldn't be changing the paths. Only path you should update is the path to the main data (training and testing data).
Rest all the things are supposed to run as it is.

Thank you very much for the answer!
deleted the artifact folder, then ran the data_ingestion.py file, after which the artifact folder was created with all the files.
Then I ran the model_trainer.py file and got the error
D:\ocr_service\.venv\Scripts\python.exe D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py
2024-05-08 04:14:12.360207: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-08 04:14:13.353849: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-08 04:14:15.140182: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 82, in initate_model_training
    model = build_model(self.img_width, self.img_height, char_to_num)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\utils\utils.py", line 178, in build_model
    model = keras.models.Model(
AttributeError: 'function' object has no attribute 'Model'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 129, in <module>
    model_path = trainer.initate_model_training(train_path_x, train_path_y, test_path_x, test_path_y, unique_chars)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 119, in initate_model_training
    raise customexception(e, sys)
ocr_captcha.src.ocr_captcha.exception.exception.customexception: Error occured in python script |
 name [D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py]
 line number [82]
 error message ['function' object has no attribute 'Model']

Process finished with exit code 1

Thank you very much for the answer!
deleted the artifact folder, then ran the data_ingestion.py file, after which the artifact folder was created with all the files.
Then I ran the model_trainer.py file and got the error
D:\ocr_service\.venv\Scripts\python.exe D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py
2024-05-08 04:14:12.360207: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-08 04:14:13.353849: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-08 04:14:15.140182: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 82, in initate_model_training
    model = build_model(self.img_width, self.img_height, char_to_num)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\utils\utils.py", line 178, in build_model
    model = keras.models.Model(
AttributeError: 'function' object has no attribute 'Model'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 129, in <module>
    model_path = trainer.initate_model_training(train_path_x, train_path_y, test_path_x, test_path_y, unique_chars)
  File "D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py", line 119, in initate_model_training
    raise customexception(e, sys)
ocr_captcha.src.ocr_captcha.exception.exception.customexception: Error occured in python script |
 name [D:\ocr_service\ocr_captcha\src\ocr_captcha\components\model_trainer.py]
 line number [82]
 error message ['function' object has no attribute 'Model']

Process finished with exit code 1

Install the requirements_dev and try.

I installed it, but it didn't help

I installed it, but it didn't help

I am a bit busy right now...i will check the code again and get back to you by tomorrow.

Я установил, но это не помогло

Я сейчас немного занят... я проверю код еще раз и свяжусь с вами завтра.

Thanks a lot

I understand that the project can be deleted.

I understand that the project can be deleted.

What do u mean?
I am still held back with my college..i am gonna check the code when i am free.

I understand that you don't have to, but you promised.
Think for yourself, what should I think in such a situation?
As a user, I received errors that I am not able to fix myself.
You, as the author, can correct them, you promised to look and correct them if possible, you promise to look into it and report it the next day, several days have passed and you are silent.
What should you think in such a situation?

I understand that you don't have to, but you promised.
Think for yourself, what should I think in such a situation?
As a user, I received errors that I am not able to fix myself.
You, as the author, can correct them, you promised to look and correct them if possible, you promise to look into it and report it the next day, several days have passed and you are silent.
What should you think in such a situation?

Well i have been busy with my college exams..
I will look into it today... Don't worry
Abe also it's not that you can't fix the error... You can always make a PR to fix the error.

I understand that you don't have to, but you promised.
Think for yourself, what should I think in such a situation?
As a user, I received errors that I am not able to fix myself.
You, as the author, can correct them, you promised to look and correct them if possible, you promise to look into it and report it the next day, several days have passed and you are silent.
What should you think in such a situation?

Well i have been busy with my college exams.. I will look into it today... Don't worry
Abe also it's not that you can't fix the error... You can always make a PR to fix the error.

Don't think anything bad, I'm writing through Google translator.
I'm not a professional programmer, I'm just learning.
Thanks a lot

I mean, you promised to contact me the next day, but you didn't do anything.
I understand that you don't have to, but you promised.
Think for yourself, what should I think in such a situation?
As a user, I received errors that I am not able to fix myself.
You, as the author, can correct them, you promised to look and correct them if possible, you promise to look into it and report it the next day, several days have passed and you are silent.
What should you think in such a situation?

Well i have been busy with my college exams.. I will look into it today... Don't worry
Abe also it's not that you can't fix the error... You can always make a PR to fix the error.

Don't think anything bad, I'm writing through Google translator. I'm not a professional programmer, I'm just learning. Thanks a lot

ohh so whats ur native language
Also I tried running it on my local...and its running fine

So i cant recreate the error.
Tell me a way I can contact You properly to sort this problem of yours...Do you have discord?

My native Russian language)
Can I ask you to check my project?
It contains everything that I wrote to you and all the pictures.
It’s possible, of course, that you have something installed that I don’t, because it can’t be that it works for one person, but not for another.
The project turned out to be 38mb, git does not allow more than 25mb, I had to upload an exchanger to the file

https://transfiles.ru/h9sg3

My discord name Robox


Hgw tidy mgrennan patch

This adds connection string for TCP and also another debugging option. It is an import of #528.

@mgrennan OK Mark, this is your PR imported into this repo. The addition to the connections strings is very welcome - I've fixed the "Vehicle" typo. The added debugger also useful - I put that in its own section.
Really appreciate your contribution.
@peterbarker Can you please merge this.

@mgrennan Thanks!
I rebased this on master.  Generally it is nice to have pull requests which don't include pulls from master.  Instead, rebase the branch for pulling.

@peterbarker Thanks very much. I agree regarding rebasing. The problem is that so often it fails for no apparent reason. I've got out of the habit.


Usage with other browserify transforms

Why is the browserify transform inline replacing in the javascript? Why not just let require('./my-shader.glsl') transform to something like module.exports = "<shader source>"; like that there's no compatibility issues.

require('./my-shader.glsl') would break the node modules spec. Instead we've opted to go for a similar approach as brfs. There shouldn't be any compat issues with other transforms, if you're running into bugs we definitely would like to hear about them. I hope my explanation makes sense. Cheers! :sparkles:

Thanks for the response, and you're right, there wasn't any compat issue. I just had to get my transforms loaded in the correct order :blush:
Curious though why you think that would break the module spec?

require() can only parse JavaScript and derivatives natively (e.g. JSON); when porting in stuff like CSS or GLSL which isn't intended to become part of the dependency tree, you're basically overloading the require() semantics - which is a very bad idea

I don't see how having to require('glslify') and doing some special calls that are inline replaced is less unexpected behaviour than that require('./shader.glsl') returns my shader. That's how the majority of browserify transforms work (and where designed to work AFAIK).
And the fact that JSON is supported by require contradicts your statement that it's not intended for use as a resource loader. If we where to adhere to the node.js module spec by the letter browserify wouldn't be possible.
I wouldn't care if this was just a "style" choice, but this method of injecting the shaders degrades browserify's bundle performance a lot since every file in my project is parsed to look for glslify calls (not to mention the complexity it must add to your bundling code).

@jnordberg For me it's crucial that these special calls glslify(__dirname + '/shader.glsl') still work in node. Together with glslify-promise I can load shader with or without the browser. require('shader.glsl') would break that.

I wouldn't care if this was just a "style" choice, but this method of injecting the shaders degrades browserify's bundle performance a lot since every file in my project is parsed to look for glslify calls (not to mention the complexity it must add to your bundling code).

That indeed is a problem. Especially if you would like to make libraries that browserify shaders for internal use. I have and FX library with 10 effects and compiling them on the go is getting out of hand. I'm currently considering browserifying them once on library build and use brfs in production.

Require overloads also overlook the larger problem of passing options like transform. The webpack way (using query strings) is pretty darn ugly. 😁
@vorg
There is some value in transpiling your code to inline the shaders, so a module doesn't need to depend on glslify to work. Ideally something like Babel would be used, but it does not support asynchronous transforms.
Transpiling is kinda clunky though. See here for discussion: https://gist.github.com/mattdesl/aaf759da84cc44c22305
Sent from my iPhone

On Feb 26, 2016, at 8:15 AM, Marcin Ignac<EMAIL_ADDRESS>wrote:
@jnordberg For me it's crucial that these special calls glslify(__dirname + '/shader.glsl') still work in node. Together with glslify-promise I can load shader with or without the browser. require('shader.glsl') would break that.
I wouldn't care if this was just a "style" choice, but this method of injecting the shaders degrades browserify's bundle performance a lot since every file in my project is parsed to look for glslify calls (not to mention the complexity it must add to your bundling code).
That indeed is a problem. Especially if you would like to make libraries that browserify shaders for internal use. I have and FX library with 10 effects and compiling them on the go is getting out of hand. I'm currently considering browserifying them once on library build and use brfs in production.
—
Reply to this email directly or view it on GitHub.

@vorg Yeah, that wouldn't work..
But more of a node problem really, I wish the node team had looked at improving require.extensions instead of just yelling ANTIPATTERN and deprecating it, making platform interoperability much harder than it has to be :/
I'll have a look at creating a separate module that transforms only require('*.glsl') calls, won't work with node but at least it's an alternative for people like me who only needs to run in the browser (how are you running shaders in node btw?:)
@mattdesl What's wrong with the browserify way of passing options?

@jnordberg I use my engine with browsers but also (mostly) Plask and Electron both of which are node based environments that work without browserifying stuff.

@jnordberg The package.json options apply a glslify transform to every inlined call. With the glslify syntax you can specify options per-shader, which can be handy.
const frag = glslify(`
  void main () { ... }
`, { inline: true, transform: [ 'foobar' ] })

One benefit to the require() overload approach is that shaders will be de-duplicated because of the require cache. :smile:

Here we go https://github.com/jnordberg/glslify-bare
Kudos to the stackgl team for breaking out the components so cleanly, was super easy to implement an alternative transform.
@mattdesl ah, I see, made a note of it in the README for my module :)
@vorg that looks super cool! Had no idea that even was a thing


fix: set PostgreSQL SSL options in django

We're attempting to deploy Label Studio to GCP using the official Helm chart but it's unable to connect to Cloud SQL with SSL.
These are the values we're using:
global:
  pgConfig:
    host: "<IP_ADDRESS>"
    port: 5432
    userName: "label-studio"
    dbName: "label-studio"
    password:
      secretName: "postgres-password"
      secretKey: "postgres-password"
    ssl:
      pgSslMode: "verify-ca"
      pgSslSecretName: "postgres-tls"
      pgSslRootCertSecretKey: "server-ca.pem"
      pgSslCertSecretKey: "client-cert.pem"
      pgSslKeySecretKey: "client-key.pem"

postgresql:
  enabled: false

redis:
  enabled: false

(replaced the real IP with <IP_ADDRESS>)
These are the logs from the k8s pod:
./deploy/docker-entrypoint.sh: Looking for init scripts in /label-studio/deploy/docker-entrypoint.d/app/
./deploy/docker-entrypoint.sh: Launching /label-studio/deploy/docker-entrypoint.d/app/20-wait-for-db.sh
=> Waiting for postgres...
=> Postgres is up.
./deploy/docker-entrypoint.sh: Launching /label-studio/deploy/docker-entrypoint.d/app/30-run-db-migrations.sh
=> Skipping run db migrations.
./deploy/docker-entrypoint.sh: Launching /label-studio/deploy/docker-entrypoint.d/app/31-run-label-studio-init.sh
=> Run label-studio init...
=> Hostname correctly is set to: <snip>
=> Database and media directory: /label-studio/data
=> Static URL is set to: /static/
=> Hostname correctly is set to: <snip>
=> Database and media directory: /label-studio/data
=> Static URL is set to: /static/
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /pypi/label-studio/json HTTP/1.1" 200 57083
Can't read version file: ls-version_.py. Fall back to: version_.py
[2023-07-20 16:07:13,694] [root::_read_py::61] [WARNING] Can't read version file: ls-version_.py. Fall back to: version_.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.10/dist-packages/sentry_sdk/integrations/django/__init__.py", line 622, in connect
    return real_connect(self)
  File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.10/dist-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "<IP_ADDRESS>", port 5432 failed: FATAL:  connection requires a valid client certificate
connection to server at "<IP_ADDRESS>", port 5432 failed: FATAL:  pg_hba.conf rejects connection for host "<IP_ADDRESS>", user "postgres", database "label-studio", SSL off

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/label-studio", line 33, in <module>
    sys.exit(load_entry_point('label-studio', 'console_scripts', 'label-studio')())
  File "/label-studio/label_studio/server.py", line 297, in main
    _apply_database_migrations()
  File "/label-studio/label_studio/server.py", line 65, in _apply_database_migrations
    if not is_database_synchronized(DEFAULT_DB_ALIAS):
  File "/label-studio/label_studio/server.py", line 58, in is_database_synchronized
    executor = MigrationExecutor(connection)
  File "/usr/local/lib/python3.10/dist-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python3.10/dist-packages/django/db/migrations/loader.py", line 53, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.10/dist-packages/django/db/migrations/loader.py", line 220, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/local/lib/python3.10/dist-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
    if self.has_table():
  File "/usr/local/lib/python3.10/dist-packages/django/db/migrations/recorder.py", line 55, in has_table
    with self.connection.cursor() as cursor:
  File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 218, in ensure_connection
    with self.wrap_database_errors:
  File "/usr/local/lib/python3.10/dist-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.10/dist-packages/sentry_sdk/integrations/django/__init__.py", line 622, in connect
    return real_connect(self)
  File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.10/dist-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: connection to server at "<IP_ADDRESS>", port 5432 failed: FATAL:  connection requires a valid client certificate
connection to server at "<IP_ADDRESS>", port 5432 failed: FATAL:  pg_hba.conf rejects connection for host "<IP_ADDRESS>", user "postgres", database "label-studio", SSL off

Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit

When the pod runs the wait for db script on startup it's able to connect to the database successfully with SSL:
./deploy/docker-entrypoint.sh: Launching /label-studio/deploy/docker-entrypoint.d/app/20-wait-for-db.sh
=> Waiting for postgres...
=> Postgres is up.

However when it continues to start the django app we get an error:
django.db.utils.OperationalError: connection to server at "<IP_ADDRESS>", port 5432 failed: FATAL:  connection requires a valid client certificate
connection to server at "<IP_ADDRESS>", port 5432 failed: FATAL:  pg_hba.conf rejects connection for host "<IP_ADDRESS>", user "postgres", database "label-studio", SSL off

It seems django is trying to connect to the database without SSL which is blocked by our Cloud SQL configuration because it requires a client certificate.
Looking at the django settings it seems the app is not using the POSTGRE_* environment variables to set the SSL options when connecting to PostgreSQL. This is a little surprising as there's documentation etc. for this feature, so perhaps there's something we've missed?
This pull request updates the django settings to use those environment variables where available. I've tested this PR in our cluster and the django app is able to connect to the database, and the app starts successfully.

Hey @rupert — thank you so much for creating this! I really appreciate this!
I'll flag to our internal team as well :)

@makseq @niklub would it be possible to review this PR when you have a chance?

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.


HSEARCH-2585 Allow injecting Analyzer definitions using a Service

https://hibernate.atlassian.net/browse/HSEARCH-2585

Merged, thanks!


Option to disable log print

Add an option to disable the print() to the Output Console.

nvm, I think error and fatal logs should be printed, and everything else can be handled via the verbosity level.


Update examples for the converged Switch component

This will add the examples to the Switch component on the website.

@facebook-github-bot shipit

Import failed becuase out SnapshotTests in closed source depend in SwitchIOSExample.

I'll do it manually

@andybb could you please rebase?
File is conflicting.

@bestander Done.

@facebook-github-bot shipit

@facebook-github-bot shipit

One of the closed source snapshot tests was failing because the order of switches changed in the Example file.
I'll update the test and it should land within an hour.

closed with commit https://github.com/facebook/react-native/commit/05f31a0cbfaad33d8f67e2932f29bfc05556968a


OCI Logging plugin stopped working with Grafana 8

It's the same issue with the metrics plugin. Can you please fix it?

Not working here too.

Same here :(

This is fixed with the v2 plugin. https://grafana.com/grafana/plugins/oci-logs-datasource/


Add explicit issue templates for bug and feature request

Prerequisites
Put an x into the box(es) that apply:

[ ] This pull request fixes a bug.
[ ] This pull request adds a feature.
[ ] This pull request enhances existing functionality.
[ ] This pull request introduces breaking change.

For more information, see the Contributing Guide.
Description
Update issue templates for better capturing the request/report.
Issues Resolved
List any existing issues this pull request resolves.
Checklist
Put an x into all boxes that apply:

[ ] I have read the Contributing Guidelines.

Tests

[ ] I have added tests to cover my changes.
[ ] All tests pass when I run make test.

Documentation

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Code Style

[ ] My code follows the code style of this project.

Codecov Report

Merging #257 into master will not change coverage.
The diff coverage is n/a.


Add queue to client

This elevates the queue implementation out of optimist into common-files so it also be used in client without duplication.
Note that to do this quickly, we exploit the fact that common-files is copied into the client and optimist during the build. This allows us to keep the queues array inside the event-queue file (as there is a fresh instantiation in each copy of the event-queue file in both client and optimist).
Long-term we can certainly do better than this and should look at a way to instantiate the queue in the main files for optimist and client rather than instantiating in common-files and copying it across. This provides some benefits in terms of flexibility on setup (e.g. client does not need two queues) and minimises any potential issues with global mutation and the copy process.
P.S there is a slight bump in some packages as a result of fixing some high-risk vulnerabilities with npm audit fix
This closes #230

This looks good
I will make an issue for the following

Long-term we can certainly do better than this and should look at a way to instantiate the queue in the main files for optimist and client rather than instantiating in common-files and copying it across. This provides some benefits in terms of flexibility on setup (e.g. client does not need two queues) and minimises any potential issues with global mutation and the copy process.

Is there any reason why we didn't implement the queue directly in main for client ?


TypeError: Cannot read property 'text' of null

This Exception is thrown,when i select date,date can't be selected in every setup

Not sure what changed, but in the MaskedTextInput's text setter the call to updateDisplayList can  access the embedTextField which hasn't been created yet.  You can try checking if the component is has a parent
if (parent)
   updateDisplayList(0,0);

Or call updateDisplayList in an override of addedToParent() as I've suggested on some other issues.

After more investigation, the dateField flag is set in MaskedTextInput in the DateField, but the embedTextField is null.


Bugfix: api/json vizjson endpoint not allowing table names

Fixes #4183

Frontend tests were OK :+1: (details)

@juanignaciosl CR please

I've added a note about a strange flow because of reusing load_visualization, but I think it's ok and will work :+1: . Nice duplication removal, indeed! <3

Yep, I did it on purpose to reuse the "error renders", old code was doing something like that so if table is not loaded and vis also fails, return 404/403 and we're done.
Not the cleanest approach but I avoid duplicating code (also just for this scenario)


[Proposal] Add packages into CDN

Actual
Xlsx-importer and xlsx-renderer is available only via node_modules
Expected
Make it possible to use xlsx-import imported from CDN:
<script src="https://cdn.example.com/xlsx-import.js"></script>
<script type="application/javascript">
    const factory = new Sx.ImporterFactory();
</script>

As described in The Index of Proposals (#144), it will be reopened if accepted.
🗣 🗣 🗣 🗣 Any discussion here is wanted.

As described in The Index of Proposals (#144), it will be reopened if accepted.
🗣 🗣 🗣 🗣 Any discussion here is wanted.


LB-1047 cloudflare-go: support of origin's weights

Added weight and session affinity fields for lb.

@elithrar @saljam

Hey @sinduvi87 - you'll need to update the related tests as well: https://travis-ci.org/cloudflare/cloudflare-go/jobs/361301463#L522-L646

Oops! sorry didn't see that. Will fix the test.


Added DLR Geoservice and GRASS GIS i.sentinel.mask

two more references added

Thank you for the additions @neteler :+1:


Add json: (or custom) struct tag support for field matching

Is your feature request related to a problem? Please describe.
Most of the time, struct field names can be made to match. Sometimes the fields differ in capitalization (e.g., Go's entityID vs JSON's entityId) which can be resolved with case insensitivity.
However, there are cases where field names differ beyond the coder's control, like from one protobuf to multiple slightly different "internal" structs, etc.
Describe the solution you'd like
Support for this could be added but using json: struct tags to inform matching. Ideally, struct fields could be annotated with an additional goverter: tag to inform field mapping, so that existing json: tags could be ignored.
Honoring json: would obviously need to be an opt-in flag, but to me it's debatable whether goverter: tag support could be on by default, or also opt-in.
I'd originally tried to use copygen which has tag support, but in general that project just doesn't work with protobuf or complex structs in the mix. YMMV.
Briefly looking through the goverter code, it does look like adding tag support could be a bit involved. I'd be happy to get advice on the project's preferences on how this would be implemented.
Describe alternatives you've considered
There's no real alternative to true field mismatches, other than creating a ghost field to receive the goverted value, and then add a wrapper that manually copies over these ghost values.
Thanks!

However, there are cases where field names differ beyond the coder's control, like from one protobuf to multiple slightly different "internal" structs, etc.

For this goverter has support for defining the mapping on the conversion methods, see map. This methods also allows you to define custom methods for the conversion https://goverter.jmattheis.de/reference/map#map-source-path-target-method.

Support for this could be added but using json: struct tags to inform matching. Ideally, struct fields could be annotated with an additional goverter: tag to inform field mapping, so that existing json: tags could be ignored.

Could you explain why you would prefer defining the conversion names on one of the structs used in the conversion? For me it seems that the conversion methods are the better place. E.g. if you have the following conversion A -> B, A -> C. If the mapping is defined directly on the A struct, then you can only define the mapping for one of them.

There's no real alternative to true field mismatches, other than creating a ghost field to receive the goverted value, and then add a wrapper that manually copies over these ghost values.

Would these "true field mismatches" be fixable with map if not could you give an code example what you mean with this?

Briefly looking through the goverter code, it does look like adding tag support could be a bit involved. I'd be happy to get advice on the project's preferences on how this would be implemented.

I think the change would actually not that big, there is one method responsible for matching the field by names. In there we could add the additional checks for the struct tags.
https://github.com/jmattheis/goverter/blob/48f86d93e2c569c62488c85636683b928dded8f5/xtype/type.go#L87

That said, I do think tag matching can improve the developer experience of goverter. Goverter could support something like this:
// goverter:converter
// goverter:matchIgnoreCase
// goverter:matchTag json
type Converter interface {
	Convert(source []Input) []Output
}

type Input struct {
	Name string `json:"fullName"`
}

type Output struct {
	FullName string
}

the json part would be customizable and you could use yaml or even goverter. If there would be an ambiguity like this
type Input struct {
	Name string `json:"fullName"`
	FullName string
}

type Output struct {
	FullName string
}

Then goverter should fail with an error, but this functionality already exist because of autoMap and matchIgnoreCase so it should be fairly simple to implement.
Would this solve your use-case?

we could keep our "source of truth" for mappings as-is and just flip a switch in goverter, if that makes sense.

Yeah, in this case I agree. Having tag support in goverter would remove a lot of duplicated mappings there.

I think you'd need goverter:map source dest and a goverter:map dest source on each of the "directional" copy methods?

Yes.

Yep, this makes sense. Would matchIgnoreCase apply to the tags as well as the fields?

Yes.

The tags should support this common format tag:"[<key>][,<flag1>[,<flag2>]]", so goverter should only use the first value in a comma separated list.
Do you think it's okay to have tag matching as addition to the normal field name matching? Or should it be explicitly definable, e.g. matchNames tag:json fieldName would only match the json tags of the source types against the actual field name of the target type. I think I rather have this as addition to the existing matching and then the developer has to manually resolve potential ambiguities because it seems easier to configure and implement.

I mean it more like a general matching configuration.
// goverter:converter
// goverter:matchIgnoreCase
// goverter:matchNames tag:json fieldName
type Converter interface {
	Convert(source []Input) []Output
}

this would mean that only the json tag is matchend against the fieldName

// goverter:converter
// goverter:matchIgnoreCase
// goverter:matchNames tag:json fieldName
// goverter:matchNames fieldName fieldName
type Converter interface {
	Convert(source []Input) []Output
}

this means that both the json tag and fieldname will be matched against the target field. But yeah, I think this is overkill, so i'll say we do it "in addition".

I'd like to +1 this request. My issue is that I have a lot of generation in my stack, and due to some unique naming restrictions (due to the domain, even if it doesn't make the most programmatic sense), I have some weird friction points.
One of them is that due to this unique naming restriction, my generated protobuf code has extraneous underscores in the name (due to casing of the source material). This makes it so every field I want to map requires two mapping directives (one for each direction).
My current model that goverter is supporting is over 400 lines (in it's most compact form, this is actual properties/objects that get converted). So now i'm stuck auto-generating my goverter definition file and having it auto-determine correlation based on some known naming conventions.
This entire workflow could go away if I could just match on the json tags.
In a perfect world i'd make things align, and maybe I will, but that requires forking the protoc-gen-grpc plugin... and i'm not ready to do that. I'd be willing to throw a $50 bounty towards this.

I'd like to +1 this request.

See PR #164 @morganhein

I'd like to +1 this request.

See PR #164 @morganhein

This is great! Lmk when this is merged if you want the bounty or not, and the best way to get it to you! Thanks!


Display My Projects' badges and global badges on Progress and Ranking views

On Progress and Ranking view display add Badges button on the Badges card that would lead to the following view:

visualize achieved badges
display available badges catalog
only show badges/global badges for projects that the user added to 'My Projects'
provide ability to view skills that are required to achieve for a badge as well as user's progress within that badge

Re-use badges views/code from client-display

optionally include project name
the data source would be altered to one that only returns badges/global badges for projects that the user has added to 'My Projects'

PR: https://github.com/NationalSecurityAgency/skills-service/pull/824

:+1:


Request for Resnet front-end scripts

Dear authors,
Its quite interesting and awesome work. Do you have the plan to also share the code for Resnet front-end part? Is it simply use Resnet or there is any modify. I would like to re-implement ur results and do some continue works.
Thanks a lot!
Regards.

@sn1ff1918 Hi, thanks for your interest to our work. We don't have plan to release resnet part due to official implementation of resnet provided by PyTorch. You can use these implementation directly or others' resnet implementation for speaker verification.

@sn1ff1918 Hi, thanks for your interest to our work. We don't have plan to release resnet part due to official implementation of resnet provided by PyTorch. You can use these implementation directly or others' resnet implementation for speaker verification.

Thanks for kind and quick reply! May I double check that there is no any modification on resnet part, right? Just need to simply replace the model? I would be very appreciate if you could share me that part of code if it is possible, even its official Pytorch model.

@sn1ff1918 Yes. There is no difference.

@sn1ff1918 Yes. There is no difference.

Thx a lot!


Missing prettyUrls behaviour on a number of Admin API routes

I first noticed this on the /api/v2/admin/site route but looking at the v2 routes file we have a number of routes that are missing the the prettyUrls middleware which enforces our trailing-slash standard.
Currently we only include the prettyUrls middleware in the mw.authAdminApi group. We should review the endpoints which don't use that to see if it needs adding separately, or alternatively look at whether we can apply it in a more general fashion.

@kevinansfield How do I check for pretty urls in the other routes? How do I know if these routes need pretty urls?
I would love to tackle that for you.


Standardized name incorrect (BRK)

Describe the bug
I've been tested three times in the last weeks and always with the same problem: My last name of the standardized name in the certificate is incorrect. Lets say my name would be Max Mustermann. Then the CWA is showing Mustermann, Max as Name and First Name. But the field for the standardized name shows something like MUSTIRMANN<<MAX - almost correct, but still incorrect.

Expected behaviour
I would expect to have the standardized name as MUSTERMANN<<MAX in this case.
Steps to reproduce the issue
Create your personal QR code on https://meintest.brk.de, get tested (quick test) and receive the QR code for the CWA along with your test result (depending on test station, you have to book an appointment to get a certificate for CWA). Scan the QR code with CWA to fetch the certificate. The standardized name is shown incorrect in my case.
Technical details
Android 12, CWA 2.14.1
Possible Fix
Additional context
This happened now the third time. At the first time I guessed that at the test station my name was written in correct. But then it was the same after the second test. I already contacted the BRK (testservice@). They checked on their side for my two tests and told me, that on their side everything is fine. It has to be something on CWA side.
Today I was again at the test station. There I asked whether they can specifically check again the name since it was incorrect the last times. I showed her the certificate on my smartphone from the last check, to explain what to look for. She told me that she does not have a separate field and everything was fine. The certificate is now again having the incorrect name.
I found https://github.com/corona-warn-app/cwa-quicktest-onboarding/wiki/Anbindung-der-Partnersysteme-ohne-DCC and had a look on my personal link (https://s.coronawarn.app?v=1#...). Decoding it is giving the correct name, but this is not containing the standardized version. It is not explained on that page how the standardized name is created / provided.
I have changed the given example, since actually the E in my name is replaced by I. The example is now showing this.

@sicheste  I think you have to place this issue to the partner where you was tested. Because I tried to recognize your issue in our testsystem and for me it works correct. This is the standardized name I got for Max Mustermann:

Maybe ther is an issue in the partners solution of creating standardized name.

Also the third angle bracket seems wrong in this case. We will hand over this to the BRK.
Thanks @sicheste for pointing this out.

@ascheibal Oh, sorry. That's my fault. It is only showing <<. The angle brackets are fine. I will fix it in the description.
Would be great if you (=someone from CWA) could contact the BRK. As I wrote, I already tried and failed on the first level support.
For me it is unclear where this error is happening in detail, but I also do not have to know, would only help when I have to talk to the BRK support again :)

@ascheibal I have been today again on a BRK test center. Now the certificate is fine, the name is correct.
Thanks for forwarding this issue to the BRK, seems they fixed it. I am closing the ticket.

@ascheibal I have been today again on a BRK test center. Now the certificate is fine, the name is correct.
Thanks for forwarding this issue to the BRK, seems they fixed it. I am closing the ticket.
Hi @sicheste,
Unfortunately this Standardized/ICAO Name transliteration feature in the quicktest portal still got no prioritization! So the feature is still on our mind but waits for implementation.
You were lucky, the people at your Testcenter this time paid more attention on preventing typos.(Which was actually the ´fix´) We know that incorrect spelling is now an even more severe issue, as CWA figures out vaxination/booster state and reads incorrect spelling as certificates of two different individuals rather than showing your correct vax. state. So keep fingers crossed on this.

Hello @ascheibal

You were lucky, the people at your Testcenter this time paid more attention on preventing typos.(Which was actually the ´fix´) We know that incorrect spelling is now an even more severe issue, as CWA figures out vaxination/booster state and reads incorrect spelling as certificates of two different individuals rather than showing your correct vax. state. So keep fingers crossed on this.

This is not valid for the test center of the BRK. When I, as a person to be tested, arrive there, they scan a QR code which I generated before (it is speeding up the process of entering name, birth date etc. - and of course, this is not the QR code which can be generated by the CWA app). They check the entered data - but there is no field for the standardized/ICAO name.
Now they are having two screens, one for the personnel, and which is facing to the person to be tested. Therefore I was able to see the web form. There is no field to give the standardized name. There must be other magic doing this later on - and for me it seems that this magic was corrected.

Unfortunately this Standardized/ICAO Name transliteration feature in the quicktest portal still got no prioritization! So the feature is still on our mind but waits for implementation.

Would make sence to have it on long term. For now: what ever was changed is working now :)

Hi @sicheste ,
there is a request to harmonize "the magic of ICAO transliteration" across all participating parties, including RAT portal and test centers with their own applications that are connected via the API: https://github.com/corona-warn-app/cwa-quick-test-frontend/issues/185#issuecomment-1021142950


Jest and Phantomjs

Bug Report or Feature Request (mark with an x)
- [ ] bug report -> please search issues before submitting
- [ X] feature request

Hey! Thanks for this amazing generator, would be great if the generator gives the ability to choose the test environment and would be amazing if you add Jest and Phantomjs. Thanks
OS and Version?

Generator Version

Tools Version

Targeted Angular version

Repro steps.

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

Hi @BenevidesLecontes
Thanks for using the generator, glad it is useful to you!
Your request about jest has been heard :) I've started the dev, and the generator will soon offer the choice between using it or karmaas testing framework.
As for phantomjs,  i'm not doing anything about it as the main maintainer of the project stepped down. And besides, Headless Chrome is a better alternative IMHO.
Stay tuned for jest
Cheers,

@tinesoft thanks for your great job, i'll stay tuned.

Hi,
jest integration is almost around the corner! See https://github.com/tinesoft/generator-ngx-library/pull/136.
I have 1 issue left, with a sample test that fails because of  angular/platform's By.css ( i dont know if it is supposed to work on jest's jsdom environnement anyway). Until i figure this out,  I cannot integrate in the generator.
If you have any idea, your help will be appreciated!
Cheers!

Hi @tinesoft thanks for the info. I think the issue is not By.css i have an library that was generated with other generator that run with jest and By.css is passing in my tests. I'll try to compare the setup to see the differences.


gpg asks to overwrite vault

kelvin deck command which adds a new deck to the vault asks user if he wants to overwrite the vault(y/N). should choose yes by default

fixed!


[RunIQ] Runing track mode restarts in the middle of running

Happened the last 2 times while I was running long distance.
I think I've passed the line where I can stand. I'm about to return/sell this watch.

Decided to part ways with RunIQ https://github.com/130s/hut_10sqft/issues/157#issuecomment-431757896


Del key and add commands

Controls: delete key to delete nodes
closes #473
AddCone,AddCylinder,MenuWeights: Add Cylinder and Cone menu entries
closes #487

The cylinder looks a bit shitty b

FWIW, I would also be fine with merging this and creating an issue to track the need for deletion warning dialogs.

I would prefer an undo option instead but that probatly requires it own hackerton^^
A warning could be quite annoing if one wants to delete many things. But the delete key also only works if the focus is on the scenery frame that is annoying anyway.

Do you know by heart how to display such a warning? I am not familiar with that.

Maybe try JOptionPane.showOptionDialog

IMHO it is fine to not use the Delete command as well, but then the dialog could be part of deleteNode toggled by a keyword argument.

ok so now the user has to confirm a delete if it is triggerd by a key press. And the button descriptions would make my human interaction professor proud.
@kephale if you are also happy you are free to merge.


Bump Typescript to 3.9.2.

Signed-off-by: Zbigniew Zagorski<EMAIL_ADDRESS>Thank you for contributing to harp.gl!
Before requesting a pull request, please remember to check the following documents:

contribution guidelines
coding style

If you are adding new functionality we would highly appreciate if you can describe what is the capability you are adding and even better if you can add some examples. Please also remember to add tests for it.
CI Check
Our bots will check whether your PR can be directly integrated into the mainline. We have some internal integration tests running on the background, our bots will inform you of the next steps and someone from our team will take a look and help if needed!
And please do not forget to sign-off your commit! You can read more about DCO here. But, in short, you just need to use git commit -s or append --signoff when you are committing to the repo.
Happy contributing!

Codecov Report

Merging #1527 into master will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1527      +/-   ##
==========================================
+ Coverage   60.52%   60.62%   +0.09%
==========================================
  Files         277      278       +1
  Lines       24387    24522     +135
  Branches     5500     5517      +17
==========================================
+ Hits        14761    14867     +106
- Misses       9626     9655      +29

Impacted Files
Coverage Δ

@here/harp-datasource-protocol/lib/Theme.ts
100.00% <ø> (ø)

@here/harp-mapview/lib/ThemeLoader.ts
86.58% <100.00%> (+0.05%)
:arrow_up:

@here/harp-mapview/lib/text/TextStyleCache.ts
51.54% <0.00%> (-8.13%)
:arrow_down:

@here/harp-mapview/lib/ColorCache.ts
100.00% <0.00%> (ø)

@here/harp-utils/lib/Logger/index.ts
100.00% <0.00%> (ø)

@here/harp-mapview/lib/text/Placement.ts
87.50% <0.00%> (ø)

@here/harp-mapview/lib/text/LayoutState.ts
61.11% <0.00%> (ø)

@here/harp-datasource-protocol/lib/Techniques.ts
78.50% <0.00%> (ø)

@here/harp-materials/lib/CirclePointsMaterial.ts
100.00% <0.00%> (ø)

...ere/harp-geoutils/lib/projection/EarthConstants.ts
100.00% <0.00%> (ø)

... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35d25c2...caa0bf8. Read the comment docs.


Bug or me? Using a generator with a dataset, impossible to correctly specify shapes

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10/Ubuntu 18.04/Macos
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below):v2.4.0-rc4-71-g582c8d236cb 2.4.0
Python version: 3.8.5
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: 11.1
GPU model and memory: 1080TI 8gigs

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:

TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior
Creating a functional model with multiple outputs seems to work fine if all of the data is in memory or being sourced from files, but using a generator it seems to be impossible to properly define the shapes.  I've tried both the deprecated output_* options and the current output_signature options to no avail.  It is entirely possible it is just me, but if so, it is possible the the documentation might be a tad incorrect. :)
Describe the expected behavior
I would expect that the shape of the data can be properly defined and used for fitting!
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
This code will compile fine but fail to fit with an error concerning the data shape.  I've redefined the data to be any of a variety of shapes... As soon as I switch to multiple outputs, this fails.
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers, models

def generate_sample():
    x = list("123456789")
    y = list("2345")
    while 1:
        yield np.array(x).astype(np.float32),[np.array(y).astype(np.float32),np.array(y).astype(np.float32)]

dataset = tf.data.Dataset.from_generator(generate_sample,
            output_signature=(
                 tf.TensorSpec(shape=(9,), dtype=tf.float32),
                 tf.TensorSpec(shape=(2,4), dtype=tf.float32)

            ))

dataset = dataset.batch(batch_size=32)

inputs = keras.Input(shape=(next(generate_sample())[0].shape))
x = layers.Dense(512, activation = "relu")(inputs)
x_outputs = layers.Dense(4, activation="relu", name="output")(x)
y_outputs = layers.Dense(4, activation="relu", name="output2")(x)

model = keras.Model(inputs=inputs, outputs=[x_outputs,y_outputs])
model.compile(loss="mse", optimizer = "adam", metrics=['accuracy'])
history = model.fit(dataset, epochs=1, steps_per_epoch=10, validation_data=dataset, validation_steps=5)

Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-102-3dad39c1e2c1> in <module>
----> 1 history = model.fit(dataset, epochs=1, steps_per_epoch=10, validation_data=dataset, validation_steps=5)

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
   1098                 _r=1):
   1099               callbacks.on_train_batch_begin(step)
-> 1100               tmp_logs = self.train_function(iterator)
   1101               if data_handler.should_sync:
   1102                 context.async_wait()

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\eager\def_function.py in __call__(self, *args, **kwds)
    826     tracing_count = self.experimental_get_tracing_count()
    827     with trace.Trace(self._name) as tm:
--> 828       result = self._call(*args, **kwds)
    829       compiler = "xla" if self._experimental_compile else "nonXla"
    830       new_tracing_count = self.experimental_get_tracing_count()

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\eager\def_function.py in _call(self, *args, **kwds)
    886         # Lifting succeeded, so variables are initialized and we can run the
    887         # stateless function.
--> 888         return self._stateless_fn(*args, **kwds)
    889     else:
    890       _, _, _, filtered_flat_args = \

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\eager\function.py in __call__(self, *args, **kwargs)
   2940       (graph_function,
   2941        filtered_flat_args) = self._maybe_define_function(args, kwargs)
-> 2942     return graph_function._call_flat(
   2943         filtered_flat_args, captured_inputs=graph_function.captured_inputs)  # pylint: disable=protected-access
   2944

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\eager\function.py in _call_flat(self, args, captured_inputs, cancellation_manager)
   1916         and executing_eagerly):
   1917       # No tape is watching; skip to running the function.
-> 1918       return self._build_call_outputs(self._inference_function.call(
   1919           ctx, args, cancellation_manager=cancellation_manager))
   1920     forward_backward = self._select_forward_and_backward_functions(

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\eager\function.py in call(self, ctx, args, cancellation_manager)
    553       with _InterpolateFunctionError(self):
    554         if cancellation_manager is None:
--> 555           outputs = execute.execute(
    556               str(self.signature.name),
    557               num_outputs=self._num_outputs,

~\anaconda3\envs\SEC595\lib\site-packages\tensorflow\python\eager\execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     57   try:
     58     ctx.ensure_initialized()
---> 59     tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
     60                                         inputs, attrs, num_outputs)
     61   except core._NotOkStatusException as e:

InvalidArgumentError:  Incompatible shapes: [32,2,4] vs. [32,4]
	 [[node mean_squared_error/SquaredDifference (defined at <ipython-input-102-3dad39c1e2c1>:1) ]] [Op:__inference_train_function_12605]

Function call stack:
train_function

I just tried this yielding a nested tuple and it may have just been me.  It could be that the docs could benefit from an example along these lines because it is not intuitive how to do this properly.


Inequation inside Jax.jit function

Hi!
https://github.com/google/jax/pull/2508#issuecomment-657785351
Maybe I miss something obvious, but what should I do if I need to use inequation inside the function for jax.jit? Here's my function:
def tt_round_model(tt, delta):
...
for x in s:
if x < delta:
...
As I found, I should add static_argnums in such case, so I added delta to it:
fast_tt_round = jit(tt_round_model, static_argnums=(1))
ttr = fast_tt_round(tts_s, eps / math.sqrt(len(tts_s.core) - 1))
But I still have the problem in compilation:

I suppose that the problem is in my x variable which is diagonal element of s matrix which I get inside this algorithm, so I can't add it to static_argnums.
Thank you for your help!

In general, you cannot jit-compile code with control flow that depends on the value in an array. It's possible to use structured control flow primitives in this case, but this sort of loop-based construction will generally be much less efficient than array-based primitives, particularly on GPU or TPU.
For code like yours, it would be best to write your code using broadcasting and jnp.where:
result = jnp.where(s < delta, value1, value2)


chore: enlarge resource group column width to show long name

to resolve the issue: https://asktug.com/t/topic/1008382

Sorry, I don't know why I'm marked as a reviewer of the PR. And I got several notifications about this repository. I don't have any knowledge of it. Is it good to remove me from the potential reviewers?

Codecov Report

Merging #1550 (7229973) into master (5c8c08b) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1550   +/-   ##
=======================================
  Coverage   27.24%   27.24%
=======================================
  Files          93       93
  Lines       10097    10097
=======================================
  Hits         2751     2751
  Misses       7166     7166
  Partials      180      180

Flag
Coverage Δ

backend_ut
27.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c8c08b...7229973. Read the comment docs.


update(libsinsp): Add sinsp_evt::set_num

Event extraction can be cached based on the event number. Add a setter so that externally constructed events can be cached correctly.

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: geraldcombs
Once this PR has been reviewed and has the lgtm label, please assign molter73 for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

Just adding the function without using it?

Correct. I'm using it externally in a Falco dissector for Wireshark and for that particular use case, plugin extraction returns the same cached extraction fields unless I set the event number.

LGTM label has been added.  Git tree hash: 9001c4ef26d776857d8d5a1ca75912d743172630

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: geraldcombs, incertum
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [incertum]

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

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, geraldcombs, incertum
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,incertum]

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


Revert "Add GPU and CPU implementation of tf.histogram_fixed_width.…

… (#13731)"
This reverts commit 528457ea3cbe4edfbd3eb90c303b2a1408fe8d65.
The failing test is //tensorflow/contrib/distributions:poisson_lognormal_test
https://source.cloud.google.com/results/invocation/28566b59-d961-458c-8978-b16dc248782f/%2F%2Ftensorflow%2Fcontrib%2Fdistributions:poisson_lognormal_test?page=log
See comment: https://github.com/tensorflow/tensorflow/pull/13731#issuecomment-337127918
Signed-off-by: Yong Tang<EMAIL_ADDRESS>

Can one of the admins verify this patch?

/cc @gunan

Also running tests here, in case the other fix cannot go in.
Jenkins, test this please.

Looks like the other fix worked, so closing.