Dedup node_modules for a number of Vue applications - duplicates

As a teacher I frequently have to look at students projekcts. A couple of courses deal with a Vue3 application and I end up with multiple similar if not equal node_modules folders for each students project. Is there away to prevent duplication of the contents of all these folders?

Related

Relating assets to each other in SQL

This question has probably already be answered somewhere but I don't really know how to ask it. Sorry if this gets messy. I'm building a new database for my works ICT assets which include assets, laptops and laptop trolleys. The database must include locations for the assets, for example 'Room01' or 'Trolley01'.
Is it possible to have the same item in two different tables that relate to each other, eg. a trolley that is both an asset and a location, where the trolley itself also has a location?

How to create Synthea demographic County files?

I am using Synthea to generate synthetic populations using the default county demographics for Massachusetts.
How are these json config files created? Specifically, how could I create them for a different US State?
First, you need to obtain several publicly available data files and place them into your ./resources folder.
I think you answered some of your own question over in this GitHub issue. But in case someone finds the question here, you need four different files.
“subcounty population estimates for towns and cities”
https://www.census.gov/data/datasets/2016/demo/popest/total-cities-and-towns.html
“county population estimates by age, gender, race, ethnicity”
https://www.census.gov/data/datasets/2016/demo/popest/counties-detail.html
“income data”
https://factfinder.census.gov/faces/tableservices/jsf/pages/productview.xhtml?pid=ACS_15_5YR_S1901&prodType=table
“Education data”
https://factfinder.census.gov/faces/tableservices/jsf/pages/productview.xhtml?pid=ACS_15_5YR_S1501&prodType=table
Once you obtain the files for the US State you are interested in:
Copy the files into your ./resources folder
git checkout other_usa_states The ability to process other states is not currently within the master branch in GitHub.
bundle exec rake synthea:census This will process the files in ./resources (you may need to rename the files) and generate the JSON configuration files into ./config
bundle exec rake synthea:generate[XXX.json] where XXX.json is the name of the county file within the ./config folder that you want to generate.
Caveats:
Geospatial lat/lon information will not be generated without additional data.
Zip codes outside of Massachusetts are stubbed to XXXXX
Hospital and healthcare facilities will seem odd, since only organizations in Massachusetts are included by default. It will seem like everyone in town travels across the country to go see their doctor in Massachusetts.
Those issues will be fixed in the future.

Possible to build Jekyll site into two dist folders based on YAML front matter?

So I have this site, lets call it example.com, that has had multiple languages; English and Swedish. Up to this point we’ve served the Swedish version on example.com/sv/{pages-in-swedish} and the English pages and posts on example.com/{pages-in-english}.
Now we’ve decided to move the Swedish version to example.se and serve only the English pages on the .com domain.
Preferably I don’t want to have two parallel repos with duplicate sets of JS and CSS (since they’re identical) but rather based on a YAML front matter tag (language: en vs language: sv) spit out two different dist folders (for example dist/ and dist-sv/) during build.
Is this possible?
There is still no standard for internationalization with Jekyll but I can point you to this useful discussion on Jekyll talk on how to manage I18n.

Can I use Mercurial to allow different users access to different parts of a project?

We're using SVN, but it seems to be getting a little out of date and heavy for our liking. We have a big project that we need different team members to get access to different parts of. Can we set up Mercurial is a way that certain people can checkout / update the entire project, where as some other people only check out / access certain parts of the project?
There's the ACL extension which is shipped as part of Mercurial that may be suitable for your needs.
My initial thought is that it could be done using subrepos. If you can split your project into defined parts, these could be set up as sub-repositories. You would have a parent repository which contains all of the sub-repositories. The sub-repositories themselves could be set up to be accessible only by certain people.

How do you come up with names for your namespaces?

I'll preface this by saying that I usually work in C#/.Net.
Normally, I use a naming scheme that puts common, reusable components into a namespace that reflects our organization and project-specific components into a namespace tied to the project. One of the reasons I do this is that I sometimes share my components with others outside my department, but within the organization. Project-specific namespaces are typically prefaced with the name or abbreviation of the department. When I reuse code between projects, I typically migrate it into one of the organization-based namespaces.
For example:
UIOWA.DirectoryServices contains classes that deal with the specific implementation of our Active Directory.
UIOWA.Calendar contains classes that deal with the University's master calendar.
LST.Inventory.Datalayer holds the classes implementing the data layer of the Learning Spaces Technology group inventory application.
I'm embarking on a project now for an entity that has a fuzzier connection to the Unviersity (a student group that runs a charity event) that has the potential to be sold outside of our University and, thus, it doesn't really fit into my normal naming conventions, i.e., the department is only the first customer of potentially many that might use the project.
My inclination is to go the organization naming route and create an "organizational project" name space for this application. I'd like to hear how others handle this and any advice you might have.
Thanks.
See also this related question about namespace organization.
EDIT
I ended up creating the org/project namespace UIOWA.MasterEvent and deriving further namespaces from there. Still interested in other opinions for future projects.
My department got his name changed thrice in the last five years, so we're all glad that someone decided against using namespaces with organisational names...
Our namespaces are organised by project names. Reusable stuff is put into the Toolbox namespace. Perhaps a bit crude, but it works quite well so far.
I'm a .NET developer, and I always use the organisational project namespace (com.bolidian.projectspace) because it guarantees uniqueness.
I use the organisation, followed by the product eg Acme.Crm. When grouping classes together in a subnamespace always use a plural or action so that it cant clash with a class. eg
Acme.Crm.Letters
Acme.Crm.Invoicing
I follow Microsoft's convention by not capitalising acronyms eg Crm instead of CRM, Sql instead of SQL - but that's more a personal preference.