lundi 28 décembre 2020

My HTML Files does not work on online properly but it works properly on local

I want to add an Google map to my website. I copied and pasted the code that Google give to add to

HTML file. Map can be seen on local but when I add this code to HTML that is uploaded to the hosting site, map can not be seen.

This is code that can not be seen on online.

. We use InfinityFree. I tried to use its file manager to add this code. It has a page like complier.


When does coding and content input becomes easy in web development? [closed]

I am just starting to learn web development, I started learning HTML, CSS, and bootstrap moving next to javascript. My main aim is to create a content delivery website, I could have used CMS like WordPress but I feel it will not be according to what I want and how it should be. Learning those three technologies I have always code and input the contents along-side coding but where down along the learning path will I have to just code the basic design of the website and input /update of contents will have to be something like the WordPress content delivery system where you don't have to write <p> tag <h1-h6> tag or styling of the content but just basic typing of the contents and it will format and arrange itself in a certain format. I don't know if it is a front-end thing or a back-end thing, I don't know if I will be able to do that when I start learning javascript




.htaccess www to non-www not working for my site

I have a site hosted for free on 000webhost.com I have a problem with .htacces file. When I go to dd-myportfolio.000webhostapp.com , it redirects me to www.dd-myportfolio.000webhostapp.com and throws me error No such website...

Here is my .htaccess code:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ %{REQUEST_SCHEME}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

ErrorDocument 404 /error-404

RewriteRule ^articles/$     /articles [L,R=301]
RewriteRule ^articles.html$     /articles [L,R=301]
RewriteRule ^articles/article/(.*)$     /site/index.php?param=article&id=$1 [L]
RewriteRule ^articles$               /articles [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) /site/index.php?param=$1 [L]

I just try so many www to non-www methods to resolve it but nothing helps with my case. Thanks in advance!




why VS code has problem with variable name?

Why vs code has problem when I write let name = "Hi"; it has problem with the name and i should change it to something like :sname , fname or etc.




What types to use in cPanel table for my sign-up form for my website?

So I'm creating a sign-up system for my website and I created a form now I need to make sure if the table I created in cPanel will work with my sign-up form. I suspect the type (date) for birthday might be messed up. Thanks in advance.

Images: https://drive.google.com/drive/folders/1fOQZ1Mj1NcLMYdKefRzAQTD_hXJfyySr?usp=sharing




How to combine web application and machine learning? [closed]

I am a rookie in ML and Web development and I am creating my college project that is "Web Application that can extract words from image". So, I have a web application written completely in the usual Html/CSS/javascript in that user upload an image and I wanted to send it to my python program that has libraries "EasyOCR", etc that extract words from the image and show it to the user in my web page. And I don't know how to do that, please help me!! Some other questions---

  1. Who will be the mediator between my web page and the python program and how to do it?
  2. How can I run my python program online for image processing? Please explain in detail.



Get files production when refresh the website page

When I refresh/reload my website (no issue on localhost, just on the online server) I get the "production files" via the browser

My server is on Flask, my app on Angular

init.py :

@app.errorhandler(404)
def handle_angular_routes(e):
    return render_template("index.html") 

@app.route('/', methods=['GET'])
def root():
    return render_template('index.html') # Return index.html 

app-routing.module.ts:

const routes: Routes = [  { path: '', redirectTo: '/board', pathMatch: 'full' },
 { path: 'board', 
component: DashboardComponent 
},
{ path: 'stats', 
component: StatisticComponent 
},
{ path: 'servers', component: ServersComponent,
children: [
    { path: '', component: ServerListComponent },
    { path: 'data', component: ServerDataComponent },
  ],
},
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule]
})

I don't see anything like this issue in google, please help

This is the screen when I reload the page : enter image description here