Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 days ago.
Improve this question
I'm facing an error showing "module not found" and I followed all the steps correctly. I even referred to Stack Overflow for help in this regard. I'm facing this same issue in multiple projects.
I am posting the repository link to view the code I have done: https://github.com/caton-k10/fullstack
I am also posting the code of the file which is showing module not found below:
There is lots of issues in your project.
First, you did not import components properly.
You import AddProduct component from AddProduct file but your AddProduct is exported from AddProducts file. The same goes for EditProduct.
Second, you use useHistory in react-router-dom v6 but useHistory is replaced with useNavigate() in react-router-dom v6. and also use router in wrong way, it should be
<Route path="add" element={<AddProduct/>}/>
Third, when you submit a form, you send a request to /products, but there is no route for /products.
Four, in the backend, you did not sync your models, so if you want to perform any operation you have to create all tables manually in your database.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I've just updated angular material via NPM (#angular/material#2.0.0-beta.11-53c42a4)
Now my apps doesn't work anymore, because syntax differences. I look up the documents what's changed, but there isn't much information out there about this issues. I've tried to replace all the
import{ Md ** Module, etc. } from "#angular/material" with
import {Mat ** Module} from "#angular/material" in app.module file.
I've still got Template parse errors.
My question is: Where do I begin to solve this problem?
I was planning to :
1) Change all the import Md ** Module -> Mat ** Module
2) Try to trial and error change all the HTML tags
Update:
Through trial and errors I've solved partial of this question. What I did is following:
change all the import{ Md ** Module, etc. } from "#angular/material" into import {Mat ** Module,etc.} from "#angular/material"
Go through all the *.html files of the components and changed the HTML-tags.
<md-expansion-panel></md-expansion-panel>
<md-select><md-option></md-option></md-select>... etc
into
<mat-expansion-panel></mat-expansion-panel>
<mat-select><mat-option></mat-option></mat-select> ...etc.
The prefix md is changed into mat. I think there's no easy way to solve this.
I am getting Class file editor : Source not found error for the classes in junit / hazelcast packages. Previously i got this error for all built in java classes. But after adding the Source zip file, i am able to see String.class and all. What i need to do for these classes. Please find the screenshot
Thanks in Advance!
Interestingly enough, your question contains all the concepts you need to know in order to answer it.
In order for your IDE to show you source code for any library you are using, the corresponding library needs to come with source code attached to it.
In other words: you managed to point your IDE to the ZIP file containing the source code for your JRE/JDK - thus your IDE knows what to show you when want to open up String.class
Now it seems that you are using other libraries as well. Maybe maybe, other libraries, have other, different source code ZIP files?!
Long story short: you need to add "source code" ZIPs for each and any additional library you are using and that you want to "peek into".
Within eclipse, you achieve that for example as described in that SO q/a. Side note: that is also something to keep in mind: you should do prior research before coming up with "new" questions. Especially when you are a beginner, you can be very sure that "your" question was asked here before.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am unable to see mysql in connection profile in eclipse, I have tried of creating a new connection but all in vain.
Also how can I solve class not found error.
Install Eclipse on your computer
Download JDBC (Java DataBase Connectivity) from http://www.mysql.com/products/conector. Select "Platform Independent"
Unzip/unpack it. Open the new folder create
by the unpacking. Make sure you see a jar file in the folder, with a
name similar to mysql-connector-java-5.1.34-bin.jar
Create a new java project in Eclipse. Call it MySQLTest1 (or whatever name you want).
Drag & drop the JDBC connector jar file
(mysql-connector-java-5.1.34-bin.jar) to your project in Eclipse.
Select copy file and not "link file".
Create 2 java classes in the
project (source code given below)
Main.java, and
MySQLAccess.java
Click on mysql-connector-java-5.1.34-bin.jar in the project to
highlight it
Control-click or right-click on it to open the pop-up:
pick Build-Path, and then Configure Build-Path
A new window opens
up. In the right hand-side, click on the Libraries tab.
Click on Add
JARs
In the JAR Selection window, double-click on MySQLTest1 (or
whatever your project name is).
Select the
mysql-connector-java-5.1.34-bin.jar library.
Click Ok.
The mysql
connector is now a library available when compiling your java code.
New to Umbraco and having a problem updating the code of an existing site (Umbraco version 7.2.8).
Editing views works fine but when editing a model and/or controller the site does not change.
The files I'm editing are located in:
/Models/*.cs
/Controllers/*.cs
Could someone supply details on how to compile these?
Depends on where your code behind files are located. If they're in /App_Code you shouldn't have to compile, I believe, but anything other than that (like /Models/*.cs or /Controllers/*.cs) will have to be compiled.
Your controller names should end with SurfaceController.
All models you create as in Models folder.
You might need to reference your models in controller
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
As a web developer I'm constantly working on projects in different environments (local, staging, testing, production). I mostly work on Drupal projects. I can't tell you the number of times I've been led from local to production by just browsing the site. And then accidentally changing a setting on production that was really only supposed to be changed on my local environment.
So here's an idea: A Chrome theme that changes color depending on the sub domain of a site.
For example: on local.mysite.com* the browser chrome should be green, on staging.mysite.com* it should be blue, and on mysite.com* the color should be standard chrome grey.
This could avoid a lot of confusion for a lot of people working in different environments. Not only for developers, also for "content" people.
Sadly, I have no idea how to code a Chrome theme with that kind of behavior.
Themes are not dynamic, so the solution is not straightforward.
It's possible to create the feature using the management API. At least three extension are needed:
The main extension for switching themes.
Theme #1, theme #2 etc (an extra extension for every additional theme).
How to
Create a theme - See the Chrome themes documentation.
Bind a chrome.tabs.onUpdated event to listen for tab changes, and possibly save the state of known "theme-tabs" in a hash (by tabId). Don't forget to remove the tabId when the tab's URI is not "special" any more, using the delete operator.
Create another extension, with a background script.
Add a chrome.tabs.onActivated Warning: See below event, to listen for tab changes. This event is passed a windowId and tabId. Use the hash, created in step 2, to check whether the theme has to be changed or not.
If the URL matches a certain pattern, activate the new theme using the chrome.management.setEnabled method.
Alternative approach for step 3-4: Use Content scripts to call a method the background page. The match patterns can then be set in the manifest file, at the "content_scripts", "matches" section.
Warning: The onActivated event was not supported prior Chrome 18. Before Chrome 18, the event was called onActiveChanged.
The extension as described in steps 2-4 requires the following permissions:
management
tabs
My solution is to use PHP to detect what server I am connected to and then update Administrative screens of my application (WordPress, Drupal etc.) with a specific color. You could also display a color bar at the top of local and staging sites as well.
Here is what I do for WordPress admin screens:
// determine if this is development, staging or production environment
if (strpos(home_url(),'http://localhost') !== false)
{
define('MY_ENVIRONMENT', 'DEV');
}
else if (strpos(home_url(),'<enter staging URL here>') !== false)
{
define('MY_ENVIRONMENT', 'STAGE');
}
else
{
define('MY_ENVIRONMENT', 'PROD');
}
And then I used this to show specific colors in WordPress admin screen:
function change_admin_color($result) {
return (MY_ENVIRONMENT== 'PROD' ? 'sunrise' : (MY_ENVIRONMENT== 'STAGE' ? 'ocean' : 'fresh'));
}
add_filter('get_user_option_admin_color','change_admin_color');