engineer-man / emkc Goto Github PK
View Code? Open in Web Editor NEWEngineer Man Knowledge Center
Home Page: https://emkc.org
License: MIT License
Engineer Man Knowledge Center
Home Page: https://emkc.org
License: MIT License
Since snippets can be attached to a user's account, it would be nice if they were able to edit their own snippets, or even delete them. I'm thinking this would look like having an 'Edit' button above the snippet that validates you are indeed the snippet owner, and a 'Save' button that comes up afterwards.
If this were to be implemented, having a version history would also be a good idea so that people can refer to a previous version if need be.
On the questions page, the URL to the author's profile leads to https://emkc.org/@undefined instead of the user's profile.
official list for this iteration
how to create a challenge:
1_reverse_string
or 2_number_frequency
.see the two that are already made for an example.
So we need more challenges for emkc.
It's not that difficult to make a challenge.
You can clone the repo and look at the other challenges or follow the steps below.
how to create a challenge:
1_reverse_string
or 2_number_frequency
.the content for the about section should outline a basic overview of emkc, its purpose, and its future
investigate compatibility with lxc
Create content for the following developer resources.
Applications
API Reference
Webhooks
To be used in discord bots
Emkc.org doesn't have phone side menu available
js accepts things like a = [1,2,3], as does ruby, php, and others
java, c, c++, not so much and it makes the challenges unfair. investigate maybe handling that logic as part of the challenge init
I think a notification, once you solve a challenge would be nice.
The way it is now only the little status indicators on the top left and in the "console" change
which can be easily missed and just doesn't feel as rewarding as a proper notification.
The popup would probably have to be triggered somewhere around here, but I don't feel sufficiently confident with react and how it is utilized here to write this myself.
Format:
{challenge name}
Challenge : {id}
Difficulty: {dif}/5
{description}
{example input}
{example output}
Example:
Ascending values
Challenge: 1
Difficulty: 1/5
Given an CSV of numbers, write a program that can determine if all of these values are in ascending order. That is they’re ordered from lowest to highest values. Return a boolean stating whether or not the numbers are in order. You may assume that the input will always be valid, but may not assume that there will be a fixed set of numbers.
For: 1, 2, 2, 4, 9
output: true
for: 1, 3, 2, 7, 12
output: false
Trying to run the website on WSL 2 with Ubuntu gives the following errors in the emkc_mysql container:
2020-09-25 09:00:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
2020-09-25 09:00:09+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-09-25 09:00:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
mysqld: [Warning] World-writable config file '/etc/mysql/conf.d/mysqld.cnf' is ignored.
2020-09-25T09:00:09.903225Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 1
2020-09-25T09:00:09.912759Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2020-09-25T09:00:10.007207Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-09-25T09:00:11.933656Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2020-09-25T09:00:12.116161Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2020-09-25T09:00:12.189724Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-09-25T09:00:12.365800Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-09-25T09:00:12.420193Z 0 [Warning] [MY-000054] [Server] World-writable config file './auto.cnf' is ignored.
2020-09-25T09:00:12.421932Z 0 [Warning] [MY-010107] [Server] World-writable config file './auto.cnf' has been removed.
2020-09-25T09:00:12.423117Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 854c0400-ff0d-11ea-86ec-0242ac120004.
2020-09-25T09:00:12.929649Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-09-25T09:00:13.051888Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2020-09-25T09:00:13.052096Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2020-09-25T09:00:13.059219Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-09-25T09:00:13.062517Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-09-25T09:00:13.320438Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-09-25T09:00:13.321178Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2020-09-25T09:00:13.321641Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2020-09-25T09:00:13.321866Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2020-09-25T09:00:13.322688Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-09-25T09:00:13.323003Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2020-09-25T09:00:13.323556Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-09-25T09:00:14.956223Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21) MySQL Community Server - GPL.
the content should be an introduction to the contribution program, guidelines on how to contribute including workflow, procedure, style, etc.
create an api accessible separate server which contains docker images for each operating environment to execute untrusted code.
current operating environments are:
place a button here:
https://shottr.com/i/gfSa
which goes to a page (/snippets/list) that lists all their snippets in a big table. include a view button, language, 3-4 lines of the snippet, and the date it was created. no need to use react here, a simple twig for loop will be fine. if this page is accessed without a user logged in, redirect to /snippets.
The expected text capitalizes the I, while the supplied one doesn't:
Supplied: isthay isyay osay andomray atwhay amyay iyay oingday
Expected: this is so random what am I doing
Actual: this is so random what am i doing
Changing capitalisation does not seem to be a part of pig latin.
create something like codepen, but integrated into emkc
Like contests, and migrate the database.
test
Trying to access the challenges locally gives this:
(node:77) UnhandledPromiseRejectionWarning: SequelizeDatabaseError: Expression #7 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'emkc.solution.user_challenge_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
at Query.formatError (/opt/emkc/platform/node_modules/sequelize/lib/dialects/mysql/query.js:239:16)
at Query.run (/opt/emkc/platform/node_modules/sequelize/lib/dialects/mysql/query.js:54:18)
at async /opt/emkc/platform/node_modules/sequelize/lib/sequelize.js:619:16
(node:77) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
make it so it can identify html code (possibly by the header ) and display its contents on a new screen.
on init, rmig runs sometimes before mysql inits for the first time. a second run does fix this but would be confusing to a typical user.
test
test issue
this involves a couple things:
Create content for intelligence section on the following.
Data Explorer
Statistics
update the list of language resources to reflect the content that is present in discord as well as languages that are popular but have no resources at the moment. take all the content from discord resources channel and place it into emkc resources section.
download and move everything locally
the team section should list each core developer of the site (a person who routinely commits code) and then make an api call to github (or analyze the repo if not possible) to retrieve a list of every contributor who had at least one commit merged into the master branch of the repo and list their pictures in a long line
Add content for the following resource links.
All
Assembly
Bash
C
C++
Go
JavaScript
Node.js
Python
use tags to create a specific view for a person according to what they are good at
each question that comes in should be posted into the proper discord channel. this will involve adding the proper channel(s) to each tag
This is a little out of the box, but I think it is a good idea.
We can start a project every two weeks or every month, a Github repo will be made for the project and details about the project will be posted on emkc. Emkc members will then start collaborating on the project, and after the period ends, the finished result can be showcased on the website.
I think this is a good idea because, unlike contests, members will collaborate together to solve real-world problems and that would help them become better programmers.
The challenges can be marked as solved even if the solution doesn't work for all test cases. This seems to be because the solution is only run against a subset of tests, and if it passes those then the tests are passed.
Example:
https://emkc.org/challenges/13/python
print(max(value1, key=lambda x: value1.count(x)))
This solution works for cases where there is only a single letter that occurs most often, but fails for cases with multiple equally occuring letters. However if this is run against test cases that only test with a single max occuring letter, the challenge is solved, despite the solution being flawed and failing other cases.
Shows all updates to emkc and the history behind it like so. (I'm obviously missing a few dates, like emkc was born etc..)
May 13, 2017
Engineer man posted his first video
June 10, 2017
Engineer man had his first being channel explosion
July 29, 2018
Engineer man posted his first 1 million viewed video.
August 3, 2018
The discord was created
August 28th, 2018
Armageddon happened
August 28th, 2018
Security was increased to prevent armageddon 2
September 20th, 2018
Felix run was born, and coding was allowed to be done as a function of the discord server.
Notify user that they have completed a language on the language selection screen in addition to the programming screen.
At some points while in a development environment, emkc will look for the piston api link directly in local.js (as in production) instead of using the public api link (as in development)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.