Skip to content

Instantly share code, notes, and snippets.

View angelvalay's full-sized avatar
🏠
Working from home

Angel Valay angelvalay

🏠
Working from home
  • Mexico
View GitHub Profile
@vades
vades / angular-expression-changed.md
Last active June 21, 2024 15:21
Fixing "Expression has changed after it was checked" in Angular

Fixing "Expression has changed after it was checked" in Angular

The exception appears (in the development mode) at the moment the value is checked and value is different of the updated value.

Error message example

AppComponent.html:1 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: true'. Current value: 'ngIf: false'.
    at viewDebugError (core.js:20440)
    at expressionChangedAfterItHasBeenCheckedError (core.js:20428)
    at checkBindingNoChanges (core.js:20530)
@smex
smex / toQImage.py
Last active September 1, 2021 09:46
Convert numpy arrays (from opencv) to QImage
from PyQt4.QtGui import QImage, qRgb
import numpy as np
class NotImplementedException:
pass
gray_color_table = [qRgb(i, i, i) for i in range(256)]
def toQImage(im, copy=False):
if im is None: