Comment by Hamfri on Run intermediate CA with TLS enabled: connection to root...
Please rephrase your question. It's not possible to understand what you mean.
View ArticleComment by Hamfri on Pagination with Search Filter in CodeIgniter
What version of PHP are you using? As of PHP 7.2 method count will throw an error if you try to use it on an unset variable.
View ArticleComment by Hamfri on Type 'null' is not assignable to type 'T'
@JonasStensved did you check what number two does? I don't encourage removing checks and that is why I included solution two as well.
View ArticleComment by Hamfri on Apache could not be started - ServerRoot must be a valid...
Please add an example path.
View ArticleComment by Hamfri on "make_sock: could not bind to address [::]:443" when...
Are you able to use https if you comment this line?
View ArticleComment by Hamfri on How do you use the PHP OpenPGP library?
How do you use this library if you download it using composer require singpolyma/openpgp-php ?
View ArticleComment by Hamfri on openpgp-php can't decrypt cipher text from other clients
All the keys used are dummy keys meant for this question specifically.
View ArticleComment by Hamfri on Angular 9 share ngx-translations with a custom angular...
@brando I didn't find a solution.
View ArticleComment by Hamfri on Angular 2+ attach directive from component dynamically
Thanks so much. I struggled with a similar issue for two days until I came across your answer.
View ArticleComment by Hamfri on Yii2 Gii Forbidden code 403 You are not allowed to...
Thanks, I was struggling with this when trying to access gii while running development server on docker
View ArticleComment by Hamfri on How to seed database in yii2?
What is the purpose of that for loop? I don't see you using it anywhere. If you call a model outside a loop it will only create one record in the database.
View ArticleComment by Hamfri on Easy Admin does not show the relationships
This answers an issue you will only experience when reading symfony.com/doc/current/the-fast-track/en/9-backend.html. Thanks though
View ArticleComment by Hamfri on Traefik with docker backend leads to bad gateway
I was also redirecting my traffic to localhost instead of mapping it to the docker network shared by the containers. You saved me a big deal. Thanks.
View ArticleComment by Hamfri on Angular 13 Directive viewContainerRef.createComponent...
This would have worked in prior versions of angular but since ComponentFactoryResolver is deprecated you have to use ViewContainerRef.
View ArticleComment by Hamfri on Running jest in angular13: Unexpected value...
Thanks a lot. This helped me fix a couple of failing tests on jest 28 and angular 15. I am using some legacy libs which are not ivy compatible like @angular-slider/ngx-slider hence all my tests were...
View ArticleN/A" is not yet installed">Answer by Hamfri for nvm: N/A: version "N/A -> N/A" is not yet installed
I faced the same issue when i used nvm to install node 12 and node 10. To fix this i used the command:nvm alias default node
View ArticleAnswer by Hamfri for VSCode single to double quote automatic replace
I had the same issue in vscode. Just create a .prettierrc file in your root directory and add the following json.For single quotes add:{"singleQuote": true}For double quotes add: {"singleQuote": false }
View ArticleAnswer by Hamfri for How to add Authorization Header to Angular http request?
The following example would fit a situation where you only want some headers added only when accessing resources that require authorization see code below. Kindly note that you need create the getToken...
View ArticleAnswer by Hamfri for How can I set max length of Hashids?
You can easily set the min_length of a hashid but it gets trickier setting the max_length as this would require setting a minimum length on the integer passed. Please avoid doing so in production...
View ArticleAnswer by Hamfri for Angular Validation Error as 'ngClass' since it isn't a...
Ensure that the component is imported and added to declarations array in app.module.ts as shown below:import { BrowserModule } from '@angular/platform-browser';import { NgModule } from...
View ArticleAnswer by Hamfri for How to get the first date of the current month in Node.js?
Create a new file dates.js and add the following code. To execute this code run the command node dates.js from your terminal. You can use this function to get first and last days dates in a given...
View ArticleAnswer by Hamfri for How to determine whether a year is a leap year in...
The following code block will work well on Javascript and also on Typescript if you remove the function keyword. To understand the logic behind this implementation have a look at this link How to...
View ArticleAnswer by Hamfri for Angular ngClass multiple ternary operator conditions
If you are working on angular 8+ the following should work.[ngClass]="{'css-class' : condition1 === true || condition2 === true }">
View ArticleAnswer by Hamfri for Angular/CLI -- auto reload doesn't happen
If angular auto-reload is not working on ubuntu 20.04 and you are using nvm try running the following:sudo echo "fs.inotify.max_user_watches=524288">> /etc/sysctl.confDelete node_modules in your...
View ArticleAnswer by Hamfri for How to change border radius of bootstrap modal?
In Bootstrap 4 Try the following:.modal-content { -webkit-border-radius: 0px !important; -moz-border-radius: 0px !important; border-radius: 0px !important; -webkit-border: 0px !important; -moz-border:...
View ArticleAnswer by Hamfri for Disable click outside of bootstrap modal area to close...
If you are using @ng-bootstrap use the following: Componentimport { Component, OnInit } from '@angular/core';import { NgbModal } from '@ng-bootstrap/ng-bootstrap';@Component({ selector: 'example',...
View ArticleAnswer by Hamfri for Command `npm start` does nothing
Run this command from your console npm config set ignore-scripts false or sudo npm config set ignore-scripts false . This applies to linux or mac users.
View ArticleAnswer by Hamfri for How do I make git use the editor of my choice for...
To make vim the default editor for git on ubuntu 20:04 run the following command:git config --global core.editor vim
View ArticleAnswer by Hamfri for loading directive templates asynchronously is not...
I faced the same issue while upgrading from angularJs 1.7 to Angular 9. To fix the issue i changed template to templateUrl in the angularJS component file.
View ArticleAnswer by Hamfri for cordova Android requirements failed: "Could not find an...
Solution for linux and specifically Ubuntu 20:04. First ensure you have Java installed before proceeding:1. java -version2. sudo apt-get update3. sudo apt-get install openjdk-8-jdkOpen .bashrcvim...
View ArticleAnswer by Hamfri for Failed to find 'ANDROID_HOME' environment variable
To set ANDROID_HOME environment on ubuntu 20.04 visit Ubuntu's snap store and install Android studio and then openvim $HOME/.bashrcAnd set the environment variables as follows:export...
View ArticleAnswer by Hamfri for Support for the experimental syntax 'classProperties'...
I faced the same issue while trying to transpile some jsx with babel. Below is the solution that worked for me. You can add the following json to your .babelrc{"presets": [ ["@babel/preset-react", {...
View ArticleAnswer by Hamfri for sqllite3 install on node and macos give error
I struggled with this issue on Ubuntu 20.04, node version 14.5.0 until when i came across sqlite3 npm documentation. Simply execute the following commands if you are on Ubuntu 20.04:sudo apt-get...
View ArticleAnswer by Hamfri for Cakephp3: How can I return json data?
As of cakePHP 4.x.x the following should work assuming that your controller and routes are set as shown below:controller: <your_project_name>/src/Controller/StudentsController.phppublic function...
View ArticleAnswer by Hamfri for How to import pgp private key in PHP with gnupg?
Assuming that you are on Ubuntu/Debian based operating system this is how I would approach the situation:Install dependencies.sudo apt-get updatesudo apt-get install software-properties-common gnupg...
View ArticleAnswer by Hamfri for Angular 4: How to include Bootstrap?
If you are on Angular 6+ add the following lines of code to angular.json:"styles": ["./node_modules/bootstrap/dist/css/bootstrap.min.css","src/styles.css" ],
View ArticleAnswer by Hamfri for How to install specified version of Composer
If you are using a docker container the following method would be better:curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.16 Ensure...
View ArticleAnswer by Hamfri for Using “ng2-file-upload” with Angular 2 and Typescript,...
Only two things could cause this:Client sideif ng2-file-upload maxFileSize parameter is less than 1MBServer sideIf you are using PHP on the serverside adjust the following parameters in...
View ArticleAnswer by Hamfri for How to response XML with node.js express?
In ExpressJs Simply add the content-type and send a valid XML document as the xmlContentresponse.type('application/xml')response.send(xmlContent)
View ArticleAnswer by Hamfri for gyp error when I want to do React native npm install
If you are on an M1 MacBook or any Apple Silicon chip Macbook the default python installation is Python 3.8.9 or higher this might cause issues during compilation and linking of certain libraries like...
View ArticleAnswer by Hamfri for Package '@angular/cli' is not a dependency
Assuming you are upgrading from Angular 8.0 to Angular 9.0 follow the following steps: 1. rm -rf node_modules package-lock.json 2. npm install @angular-devkit/schematics@8 3. ng update @angular/core@8...
View ArticleAnswer by Hamfri for Is s3fs not able to mount inside docker container?
If you would prefer to use docker-compose for testing on your localhost use the following. Note you don't need to use --privileged flag as we are passing --cap-add SYS_ADMIN --device /dev/fuse flags in...
View Article