Skip to content

Commit f16400e

Browse files
authored
add skeleton (acs-pa#1)
1 parent 03577d2 commit f16400e

13 files changed

+604
-1
lines changed

.clang-format

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
BasedOnStyle: Webkit
2+
3+
Language: Cpp
4+
NamespaceIndentation: None
5+
SpaceBeforeCpp11BracedList: false
6+
Cpp11BracedListStyle: true
7+
SortIncludes: false
8+
SpaceAfterTemplateKeyword: false
9+
ColumnLimit: 120
10+
AlwaysBreakTemplateDeclarations: Yes
11+
AlignAfterOpenBracket: DontAlign
12+
BinPackArguments: true
13+
BreakBeforeBraces: Attach
14+
AllowAllArgumentsOnNextLine: false
15+
AllowShortFunctionsOnASingleLine: Inline
16+
AllowShortLambdasOnASingleLine: Inline

.github/workflows/demo_comple_all.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Compile all demos
18+
run: utils/demo_compile_all.sh
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Compile all skels
18+
run: utils/skel_compile_all.sh
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Compile all demos
18+
run: utils/tutorial_compile_all.sh

.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Compiled Object files
2+
*.slo
3+
*.lo
4+
*.o
5+
*.obj
6+
7+
# Precompiled Headers
8+
*.gch
9+
*.pch
10+
11+
# Compiled Dynamic libraries
12+
*.so
13+
*.dylib
14+
*.dll
15+
16+
# Compiled Static libraries
17+
*.lai
18+
*.la
19+
*.a
20+
*.lib
21+
22+
# Executables
23+
*.exe
24+
*.out
25+
*.app
26+
27+
*.tmp
28+
*.err.log
29+
*.class
30+
*bin*
31+
*main
32+
*.project
33+

README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# pa-lab
2-
ACS - Proiectarea Algoritmilor (lab)
2+
3+
Maintainers:
4+
* Darius-Florentin Neațu (neatudarius@gmail.com)
5+
* Cristian Olaru (cristianolaru99@gmail.com)
6+
* Mara Nicolae (maraioana9967@gmail.com)
7+
* Miruna-Elena Banu (mirunaelena.banu@gmail.com)
8+
* Radu Nichita (radunichita99@gmail.com)
9+
10+
## Descriere
11+
Aici vor fi publicate materialele pentru laboratoarele de la Proiectarea Algoritmilor:
12+
* `docs/`: diverse materiale utile pentru PA
13+
* `tutorial/`: diverse tutoriale
14+
* `demos/labxy/`: demo pentru `labxy`
15+
* `skel/labxy/`: skel pentru `labxy`
16+
* `utils/`: scripturi de uz intern pentru echipa de PA
17+
18+
## Precizări și recomandări
19+
### Limbaje
20+
* Limbaje permise:
21+
* laborator: `C++` / `Java`
22+
* teme / teste practice: `C++` / `C` / `Java`
23+
* Limbaj recomandat: `C++` - pentru flexibilitatea pe care o oferă `STL` pentru tipul de probleme de la PA (comparativ cu `Java Collections`).
24+
25+
### Setup
26+
* Recomandăm să codați în `Visual Studio Code` pe `Linux` (detalii în `tutorial/setup.md`).

tutorial/setup.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# PA setup
2+
3+
## Compilers
4+
### C++
5+
Use a recent `g++` version: at least `g++-7`, recommended `g++-10`.
6+
```bash
7+
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
8+
$ sudo apt-get update
9+
$ sudo apt install g++-10
10+
# optional: install gcc-10
11+
```
12+
13+
### Java
14+
Use Java 10 or later.
15+
```bash
16+
$ sudo add-apt-repository ppa:openjdk-r/ppa
17+
$ sudo apt-get update
18+
$ sudo apt install openjdk-11-jdk
19+
```
20+
21+
## IDE: VSCode
22+
23+
Use `Visual Studio Code` for all languages.
24+
25+
### Installation
26+
```bash
27+
# download https://code.visualstudio.com/docs/?dv=linux64_deb
28+
29+
$ sudo dpkg -i ~/Downloads/code_<version>.deb
30+
```
31+
32+
### VSCode C++ extension
33+
* open VSCode
34+
* open command shell `CTRL + SHIFT + P`
35+
* type "install" and select `Extensions: Install Extensions`
36+
* search for `C++`
37+
* select `C/C++ Intellisense` from Microsoft (~18M users)
38+
* install
39+
* restart the IDE
40+
41+
### VSCode Java extension
42+
* open VSCode
43+
* open command shell `CTRL + SHIFT + P`
44+
* type "install" and select `Extensions: Install Extensions`
45+
* search for `Java`
46+
* select `Language Support for Java` from Red Hat (~9M users)
47+
* install
48+
* restart the IDE
49+
50+
### VSCode Markdown extension (local rendering)
51+
* open VSCode
52+
* open command shell `CTRL + SHIFT + P`
53+
* type "install" and select `Extensions: Install Extensions`
54+
* search for `Markdown`
55+
* select `Markdown Preview Enhanced` from Yiyi Wang (~2M users)
56+
* install
57+
* restart the IDE

utils/Makefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Darius-Florentin Neațu (neatudarius@gmail.com)
2+
3+
CC = g++
4+
CFLAGS = -Wall -Wextra -std=c++17 -Werror=vla
5+
LDFLAGS = -lm
6+
7+
SRCS = $(sort $(wildcard *.cpp))
8+
TARGETS = $(patsubst %.cpp,%,$(SRCS))
9+
10+
# build all targets
11+
all: $(TARGETS)
12+
13+
# general rule for building a target
14+
%: %.cpp
15+
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
16+
17+
# clean all related target files
18+
clean:
19+
rm -f *.o $(TARGETS)
20+
21+
# pack directory
22+
pack:
23+
zip -FS $(ZIP).zip *.cpp *.h Makefile README
24+
25+
.PHONY: pack clean

0 commit comments

Comments
 (0)