Skip to content

Commit e3e0d26

Browse files
author
Joseph Iwok
committed
all go out
1 parent d088e38 commit e3e0d26

File tree

184 files changed

+4516
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+4516
-0
lines changed

Diff for: day00/ex01/z

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Z

Diff for: day00/ex02/testDay00

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test size for 40 characters adding more

Diff for: day00/ex02/testDay00.tar

2 KB
Binary file not shown.

Diff for: day00/ex03/exo3.tar

6.5 KB
Binary file not shown.

Diff for: day00/ex03/test1

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
joy

Diff for: day00/ex03/test3

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Diff for: day00/ex03/test4

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b

Diff for: day00/ex03/test5

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Diff for: day00/ex03/test6

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test0

Diff for: day00/ex04/klist.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Credentials cache: API:53465
2+
Principal: [email protected]
3+
4+
Issued Expires Principal
5+
Jul 8 15:17:37 2019 Jul 9 01:17:37 2019 krbtgt/[email protected]
6+
Jul 8 15:17:38 2019 Jul 9 01:17:37 2019 ldap/[email protected]

Diff for: day00/ex05/midLS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ls -Ump

Diff for: day00/ex06/git_commit.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git log --format="%H" -n 5

Diff for: day00/ex07/git_ignore.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git check-ignore *

Diff for: day00/ex08/.DS_Store

6 KB
Binary file not shown.

Diff for: day00/ex08/._.DS_Store

4 KB
Binary file not shown.

Diff for: day00/ex08/._a

4 KB
Binary file not shown.

Diff for: day00/ex08/._sw.diff

4 KB
Binary file not shown.

Diff for: day00/ex08/a

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
STARWARS
2+
Episode IV, A NEW HOPE It is a period of civil war.
3+
4+
Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
5+
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR,
6+
an armored space station with enough power to destroy an entire planet.
7+
8+
Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...
9+

Diff for: day00/ex08/b

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Episode V, A NEW H0PE It is a period of civil war
2+
Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
3+
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.
4+
5+
6+
Pursued by the Empire's sinister agents,
7+
Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..
8+
9+
10+
11+

Diff for: day00/ex08/c

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
1,2c1,8
2+
< STARWARS
3+
< Episode IV, A NEW HOPE It is a period of civil war.
4+
---
5+
> Episode V, A NEW H0PE It is a period of civil war
6+
> Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
7+
> During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.
8+
>
9+
>
10+
> Pursued by the Empire's sinister agents,
11+
> Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..
12+
>
13+
4,6d9
14+
< Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
15+
< During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR,
16+
< an armored space station with enough power to destroy an entire planet.
17+
8d10
18+
< Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...

Diff for: day00/ex08/sw.diff

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
1,2c1,8
2+
< STARWARS
3+
< Episode IV, A NEW HOPE It is a period of civil war.
4+
---
5+
> Episode V, A NEW H0PE It is a period of civil war
6+
> Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
7+
> During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.
8+
>
9+
>
10+
> Pursued by the Empire's sinister agents,
11+
> Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..
12+
>
13+
4,6d9
14+
< Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
15+
< During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR,
16+
< an armored space station with enough power to destroy an entire planet.
17+
8d10
18+
< Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...

Diff for: day00/ex09/clean

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
find . -type f \( -name "#*#" -o -name "*~" \) -print -delete

Diff for: day00/ex10/ft_magic

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
42 string 42 "42 File Type detected"

Diff for: day01/ex01/print_groups.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
groups $FT_USER | tr " ", "," | cat -e

Diff for: day01/ex02/find_sh.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
find . -type f -name "*.sh" | sed 's#.*/##;s#.sh$##'

Diff for: day01/ex03/count_files.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
find . -type f -or -type d | wc -l | tr -d ' '

Diff for: day01/ex04/MAC.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ifconfig -a link | grep ether | cut -d " " -f 2

Diff for: day01/ex05/"\?$*'KwaMe'*$?\"

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
42

Diff for: day01/ex06/skip.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ls -l | awk 'NR%2==1'

Diff for: day01/ex07/r_dwssap.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cat /etc/passwd | awk '!/^#/ && NR%2==0' | cut -d : -f 1 | rev | sort -r | awk 'NR>=ENVIRON["FT_LINE1"] && NR<=ENVIRON["FT_LINE2"]' | xargs | sed 's/ /, /g;s/$/./'

Diff for: day01/ex08/add_chelou.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FT_NBR1_TEMP="$(echo $FT_NBR1 | tr \''\\\"\?\!' '01234')"
2+
FT_NBR2_TEMP="$(echo $FT_NBR2 | tr 'mrdoc' '01234')"
3+
RESULT=$(echo "obase=13;ibase=5;$FT_NBR1_TEMP+$FT_NBR2_TEMP" | bc)
4+
echo $RESULT | tr '0123456789ABC' 'gtaio luSnemf'

Diff for: day02/ex00/ft_print_alphabet.c

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_print_alphabet.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/11 17:59:00 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:27:01 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_print_alphabet(void)
16+
{
17+
int i;
18+
19+
i = 97;
20+
while (i <= 122)
21+
{
22+
ft_putchar(i);
23+
i++;
24+
}
25+
}

Diff for: day02/ex01/ft_print_reverse_alphabet.c

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_print_reverse_alphabet.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/10 12:12:00 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:26:32 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_print_reverse_alphabet(void)
16+
{
17+
int i;
18+
19+
i = 122;
20+
while (i > 96)
21+
{
22+
ft_putchar(i);
23+
i = i - 1;
24+
}
25+
}

Diff for: day02/ex02/ft_print_numbers.c

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_print_numbers.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/10 12:23:33 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:25:58 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_print_numbers(void)
16+
{
17+
int i;
18+
19+
i = 48;
20+
while (i < 58)
21+
{
22+
ft_putchar(i);
23+
i = i + 1;
24+
}
25+
}

Diff for: day02/ex03/ft_is_negative.c

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_is_negative.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/10 12:58:48 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:25:23 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_is_negative(int n)
16+
{
17+
if (n >= 0)
18+
{
19+
ft_putchar('P');
20+
}
21+
else
22+
{
23+
ft_putchar('N');
24+
}
25+
}

Diff for: day02/ex04/ft_print_comb.c

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_print_comb.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/10 13:07:21 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:24:42 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_print_comb(void)
16+
{
17+
int i;
18+
int j;
19+
int k;
20+
21+
i = 47;
22+
while (++i <= 56)
23+
{
24+
j = i;
25+
while (++j <= 57)
26+
{
27+
k = j;
28+
while (++k <= 57)
29+
{
30+
ft_putchar(i);
31+
ft_putchar(j);
32+
ft_putchar(k);
33+
if (!(i == 55 && j == 56 && k == 57))
34+
{
35+
ft_putchar(',');
36+
ft_putchar(' ');
37+
}
38+
}
39+
}
40+
}
41+
}

Diff for: day02/ex05/ft_print_comb2.c

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* manta.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/11 13:40:52 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:29:53 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_print_comb2(void)
16+
{
17+
int i;
18+
int j;
19+
20+
i = 0;
21+
j = 1;
22+
while (i <= 98)
23+
{
24+
ft_putchar('0' + (i / 10));
25+
ft_putchar('0' + (i % 10));
26+
ft_putchar(' ');
27+
ft_putchar('0' + (j / 10));
28+
ft_putchar('0' + (j % 10));
29+
j = j + 1;
30+
if (!(i == 98))
31+
{
32+
ft_putchar(',');
33+
ft_putchar(' ');
34+
}
35+
if (j == 100)
36+
{
37+
i = i + 1;
38+
j = i + 1;
39+
}
40+
}
41+
}

Diff for: day02/ex06/ft_putnbr.c

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_putnbr.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/10 22:49:30 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 21:41:16 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
int ft_putchar(char c);
14+
15+
void ft_putnbr(int nb)
16+
{
17+
int rev_num;
18+
19+
rev_num = 0;
20+
if (nb < 0)
21+
{
22+
nb = nb * (-1);
23+
ft_putchar('-');
24+
}
25+
while (nb)
26+
{
27+
rev_num = rev_num * 10 + nb % 10;
28+
nb = nb / 10;
29+
}
30+
while (rev_num)
31+
{
32+
ft_putchar((rev_num % 10) + 48);
33+
rev_num = rev_num / 10;
34+
}
35+
}

Diff for: day02/ex07/ft_print_combn

8.46 KB
Binary file not shown.

Diff for: day02/ex07/ft_print_combn.c

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* ft_print_combn.c :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: jiwok <[email protected]> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2019/07/11 14:44:59 by jiwok #+# #+# */
9+
/* Updated: 2019/07/11 15:58:16 by jiwok ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
#include <unistd.h>
14+
15+
int ft_putchar(char c)
16+
{
17+
write(1, &c, 1);
18+
return (0);
19+
}
20+
21+
void ft_print_combn(int n)
22+
{
23+
int arr[n];
24+
int i = 0;
25+
26+
while (i < n)
27+
{
28+
arr[i] = i;
29+
i = i + 1;
30+
}
31+
32+
i = n - 1;
33+
34+
while (arr[n-i] <= (10 - n - i))
35+
{
36+
int j;
37+
38+
j = 0;
39+
40+
while (j < n)
41+
{
42+
ft_putchar('0' + arr[j]);
43+
j = j + 1;
44+
}
45+
46+
ft_putchar('0' + arr[n - i]);
47+
arr[n - i] = arr[n- i] + 1;
48+
}
49+
ft_putchar('\n');
50+
}
51+
52+
int main()
53+
{
54+
ft_print_combn(2);
55+
return (0);
56+
}

0 commit comments

Comments
 (0)