Categories
Mastering Development

Node, Express API App on Azure giving Container Start Failure error

I have an existing Node and Express API application which I am trying to deploy to Azure WebApps. Deployment goes fine. But when I try to access the APIs, nothing happens. When I check log, I see following: "Container chdemoapi_0_f2df43ac didn’t respond to HTTP pings on port: 8080, failing site start""Container chdemoapi_0_4e583132 didn’t respond to HTTP […]

Categories
Mastering Development

PHP check images before update

I’m looking for guidance to help me learn since I’m new to PHP. I’ve added the ability to upload images for a post in a simple posts app. I’m trying to use the validation code from W3schools, inserted just below $image_temp = $_FILES[‘image’][‘tmp_name’]; below <?php include ‘inc/header.php’; // Check for submit if(isset($_POST[‘submit’])){ // Get form […]

Categories
User Help Web Pro

Best practice for multilang and regional website (with hreflang tags)

It’s the first time for me that I implement a multi-language and regional website. I read all the google information about how to implement href lang tags and I also read a few other information on the internet and now I am just not sure if what I implemented is "best practice". So I have […]

Categories
Mastering Development

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of laun

Hi I just followed up the code from Udemy class but I got a problem when I opened Heroku. I am a newbie here I hope anybody can help me out Index.js const express = require(‘express’); const app = express(); app.get(‘/’, (req, res) => { res.send({ hi: ‘there’ }); }); const PORT = process.env.PORT || […]

Categories
Mastering Development

Why my Dockerized LoopBack4 App runs unsuccessfully and receives message “ConnectionError: Failed to lookup instance on”?

I created a LoopBack 4 App to implement CRUD operations on User data model following the LoopBack 4 tutorial and the app works fine in VSCode and with Dockerization (Linux Container mode). After that I add in basic authentication function base on username and password. The app again works fine in my VSCode but Dockerization […]

Categories
Mastering Development

reactjs application – can’t get my hello world to show up

Background / Problem I’m trying to build understand my first react/webpack/nodejs app. I am able to build / launch it by opening a browser and navigating to http://localhost:3333/ , but the hello world message I’m expecting is not showing. Instead I think it’s trying to give me a directory listing of a folder…? Not too […]

Categories
CMS Mastering Development Wordpress

Use same slug base for Custom Post Type posts, and multiple taxonomy terms

I have done a lot of digging the past few days, and can come close, but not exactly what I need. I’m trying to alter a custom taxonomy/CPT permalink structure to all use the same slug base: /resources/. CPT: ‘resources’ TAX1, non-hierarchical: ‘type’ TAX2, hierarchical: ‘section’ I need the structure to look like this: /resources/ […]

Categories
Mastering Development

An error when connect python code with Mysql using PyMysql

Dears, I’m working to connect python code with MysqlDB… But I get an error when I run the code below import cursor as cursor import pymysql.cursors # Connect to the database con = pymysql.connect(host=’127.0.0.1′, user=’root’, password=’123′, db=’db’, port=3306) request = (‘name’, ‘authorname’, ‘price’, ‘file’, ‘bookcover’, ‘description’) sql = (“INSERT INTO test” “(Bookname,Author,price,file,Bookcover,about)” “VALUES (%s, %s,%s, […]

Categories
Mastering Development

How to fix Next.js Vercel deployment module not found error

My next.js app works on my machine and was working when deployed on Vercel but now it fails when building on Vercel with the following error: I’ve tried deleting node_modules and running npm install a few times but with no joy. Any help would be hugely appreciated. Thank you! Analyzing source code… 21:30:52.642 Installing build […]

Categories
Mastering Development

How to use tidyr in R Studio to separate a string column into multiple other columns

So I am using tidyr in Rstudio and I am trying to seperate the data in the ‘pub_author’ column (attached below) into 3 individual columns: ‘website_title’, ‘year’, and ‘author’. I tried using the separate() function doing separate(‘pub_author’,c(‘website_title’,’year’, ‘author’),’-‘), but since R reads each ‘-‘ individually it only returns the first three words. Does anyone know […]