PrimeNG p-message severity icon covers message (Angular 6 / PrimeIcons) - angular6

As shown below, the severity icon on the message box covers the actual message. Has anyone else experienced this and/or knows of a way to resolve it (in a manner that doesn't require hacking on the source code)? Thank you.
Versions:
"primeicons": "1.0.0-beta.10",
"primeng": "6.1.0",
Angular CLI: 6.0.8
Node: 8.9.4
OS: win32 x64
Angular: 6.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.6.8
#angular-devkit/build-angular 0.7.2
#angular-devkit/build-optimizer 0.7.2
#angular-devkit/build-webpack 0.7.2
#angular-devkit/core 0.6.8
#angular-devkit/schematics 0.6.8
#angular/cli 6.0.8
#ngtools/webpack 6.1.2
#schematics/angular 0.6.8
#schematics/update 0.6.8
rxjs 6.2.2
typescript 2.7.2
webpack 4.9.2

Related

any script to test the installation of Pytorch

I have installed the pytorch, and would like to check are there any script to test whether the installation is correct, e.g., whether it can enable CUDA or not, etc?
Coming to your 1st question,
In your python script....
just add
import torch
if this gives "ModuleNotFoundError: No module named 'torch'",
then your pytorch installation is not complete
And your 2nd question to check if your pytorch is using cuda,use this
torch.cuda.is_available()
this will return True if your pytorch is using cuda
You can use the collect_env.py script provided in the PyTorch utils folder.
Its output is as follows:
Collecting environment information...
PyTorch version: 1.2.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130
OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: version 3.14.6
Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce RTX 2080
Nvidia driver version: 410.48
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.1
Versions of relevant libraries:
[pip] numpy==1.16.4
[pip] torch==1.2.0
[pip] torchsample==0.1.3
[pip] torchsummary==1.5.1
[pip] torchvision==0.4.0a0+6b959ee
[conda] blas 1.0 mkl
[conda] mkl 2019.4 243
[conda] mkl-service 2.0.2 py37h7b6447c_0
[conda] mkl_fft 1.0.14 py37ha843d7b_0
[conda] mkl_random 1.0.2 py37hd81dba3_0
[conda] pytorch 1.2.0 py3.7_cuda10.0.130_cudnn7.6.2_0 pytorch
[conda] torchsample 0.1.3 pypi_0 pypi
[conda] torchsummary 1.5.1 pypi_0 pypi
[conda] torchvision 0.4.0 py37_cu100 pytorch
If you installed it from here you are doing fine.
Check this:
import torch
dev = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
print(dev)
If you have your GPU installed correctly you should have nvidia-smi.
(On Windows it should be inside C:\Program Files\NVIDIA Corporation\NVSMI)
You can use my code. This repo implements a set of PyTorch environment checker and cuda-based operators, which helps you verify whether your GPU-based PyTorch is installed properly.
https://github.com/BAI-Yeqi/PyTorch-Verification

Upgrading ngx-bootstrap 3.0.1 to 4.0.1

While Upgrading from ngx bootstrap 3.0.1 to 4.0.1 am getting the following error.Replaced the node_modules, package.json still getting the same errors.
Angular Version :
Angular 6,
Typescript: 2.7.2.
Errors:
ERROR in node_modules/ngx-bootstrap/chronos/utils/type-checks.d.ts(8,62): error TS2304: Cannot find name 'Extract'.
node_modules/ngx-bootstrap/datepicker/reducer/bs-datepicker.actions.d.ts(5,33): error TS1039: Initializers are not allowed in ambient contexts.
node_modules/ngx-bootstrap/timepicker/reducer/bs-datepicker.actions.d.ts(4,33): error TS1039: Initializers are not allowed in ambient contexts.
Errors in the image
I have encounter this error when I was using ngx-editor to implement rich text editor in Angular
This error occurs due to older version of Angular and rxjs, In my case I was using Angular 6 and rxjs 6.0.0, then I have updated it to Angular 7 and rxjs 6.2.0 by using below commands (Typescript will also be updated to typescript 2.9.2)
ng update rxjs#~6.2.0
ng update #angular/cli #angular/core
Note: If you are getting below warning
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
and you want to ignore this warning (fsevents#1.2.7:) you can use below command
npm i -f
After this, I have uninstall ngx-bootstrap and ngx-editor, then first install dependency packages and then reinstall ngx-bootstrap and ngx-editor, as mentioned below steps.
npm i ajv#^6.9.1 --save
npm i font-awesome#^4.7.0 --save
npm i angular-font-awesome
npm install ngx-bootstrap --save
npm install ngx-editor --save
At last, you need to check if HttpClientModule and other packages are properly imported in app.module.ts
import { NgxEditorModule } from 'ngx-editor';
import { AngularFontAwesomeModule } from 'angular-font-awesome';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
import { HttpClientModule } from '#angular/common/http';
imports: [
BrowserModule,
AppRoutingModule,
NgxEditorModule,
AngularFontAwesomeModule,
TooltipModule.forRoot(),
HttpClientModule
],
Now it is resolved, In addition you can able to use rich text editor by using ngx-editor
Thanks
the Solution for this error is the same to the above, change the followings versions in package.json.
"bootstrap": "4.1.3",
"font-awesome": "4.7.0",
"ngx-bootstrap": "3.1.1",
"ngx-editor": "4.0.0",
"rxjs": "6.3.3",
remove the node_module and package-lock.json and than install npm:
npm install.
Fix it in files
"\node_modules\ngx-bootstrap\datepicker\reducer\bs-datepicker.actions.d.ts"
From
static readonly CALCULATE = "[datepicker] calculate dates matrix";
To
static readonly CALCULATE : "[datepicker] calculate dates matrix";
Solution for this error is change the Bootstrap version (4.0.0 to 3.0.0) and remove the ^ in package.json (i.e "rxjs": "^6.0.0" to "rxjs": "6.0.0", and "rxjs-compat": "^6.2.2" to "rxjs-compat": "6.2.2",).
if you want bootstrap 4 version than try to change the rxjs and rxjs-compat (As i inform in above line).and remove the node_module and package-lock.json and than install npm.

Cordova fails on a fresh Mojave installation

I installed a fresh Mojave to find this error with my build and I am not sure how to debug this, seems it's coming out of
cordova-plugin-googlemaps/PluginLocationService.m
cordova run ios --debug --verbose
The following build commands failed:
CompileC /Users/me/Library/Developer/Xcode/DerivedData/app-bdpokdmgnlhxvrfpkwhgoykdgckc/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/PluginCircle.o app/Plugins/cordova-plugin-googlemaps/PluginCircle.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/me/Library/Developer/Xcode/DerivedData/app-bdpokdmgnlhxvrfpkwhgoykdgckc/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/PluginLocationService.o app/Plugins/cordova-plugin-googlemaps/PluginLocationService.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/me/Documents/app/platforms/ios/cordova/build-debug.xcconfig,-workspace,app.xcworkspace,-scheme,app,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/me/Documents/app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/me/Documents/app/platforms/ios/build/sharedpch'
ionic info
Ionic:
ionic (Ionic CLI) : 4.10.3
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 9 other plugins)
System:
NodeJS : v11.10.0 (/Users/me/.nvm/versions/node/v11.10.0/bin/node)
npm : 6.7.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
Solution - install missing CocoaPods
cd platform/ios
pod install

Basic adding of angular/material fails with Angular 6

I simply do the following:
ng new my-proj
cd my-proj
ng add #angular/material
I get in response the following error:
Your project is not using the default configuration for build and test.
The Angular Material schematics can only be used with the default
configuration
Seriously?? Anyone else?
Config:
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.8.1
#angular-devkit/build-angular 0.8.1
#angular-devkit/build-optimizer 0.8.1
#angular-devkit/build-webpack 0.8.1
#angular-devkit/core 0.8.1
#angular-devkit/schematics 0.8.1
#angular/cli 6.2.1
#angular/material 6.4.7
#ngtools/webpack 6.2.1
#schematics/angular 0.8.1
#schematics/update 0.8.1
rxjs 6.2.2
typescript 2.9.2
webpack 4.19.0

"ng generate application xyz" CLI not woking

I am trying to add an application to existing project but it's failing when running "ng generate application xyz". Error is:
Schematic input does not validate against the Schema: {"sourceDir":"app","prefix":"app","style":"css","theme":true,"webpack":true}
Errors:
Data path "" should have required property 'name'.
I then used "ng generate application --name=xyz" and the full blown subproject was created but I get the error when I run "ng serve xyz" which says "Project 'xyz' could not be found in workspace.". I Googled but I found nothing matching my problem. All examples generate libraries but I want to generate application not library.
Do I need to manually add the newly generated sub project settings to parent angular.json file?
ng -v
Angular CLI: 6.1.5
Node: 8.11.3
OS: win32 x64
Angular: 6.1.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.7.5
#angular-devkit/build-angular 0.7.5
#angular-devkit/build-optimizer 0.7.5
#angular-devkit/build-webpack 0.7.5
#angular-devkit/core 0.7.5
#angular-devkit/schematics 0.7.5
#angular/cli 6.1.5
#ngtools/webpack 6.1.5
#schematics/angular 0.7.5
#schematics/update 0.7.5
rxjs 6.3.1
typescript 2.7.2
webpack 4.9.2
According to this you need to add a --name flag in the older version of the cli.
ng generate application --name xyz
And it seems to be a fixed issue.