Skip to content

Instantly share code, notes, and snippets.

@Yousif-FJ
Yousif-FJ / docker-compose.yml
Created March 26, 2024 01:04
Docker compose for running Collabra Office Online with own cloud for testing purposes
services:
owncloud:
image: "owncloud/server"
ports:
- "8080:8080"
environment:
OWNCLOUD_TRUSTED_DOMAINS: "*yourlocalIP*:8080"
collabora:
image: collabora/code
@Yousif-FJ
Yousif-FJ / HillCipher.py
Created April 16, 2022 19:21
Q/Create software that can encrypt and decrypt using a 2 * 2 Hill cipher
import string
import numpy
from sympy import Matrix
def HillEncrypt(message : string, key: numpy.ndarray):
message = message.replace(" ", "")
if len(message)%2 != 0:
message += 'a'
@Yousif-FJ
Yousif-FJ / AffineCipher.py
Last active April 16, 2022 19:17
Q/Write a program that can encrypt and decrypt using the affine cipher
import string
def AffineEncrypt(input :string, key1: int, key2: int):
input = input.replace(" ", "")
result = ""
for letter in input:
cipheredLetter = (GetLetterIndex(letter)*key1+key2)%26
result += GetLetterFromIndex(cipheredLetter)
return result
@Yousif-FJ
Yousif-FJ / index.html
Created January 22, 2022 22:04
Q/In the last FIFA World Cup , which was held in Russia in 2018, there are only 4 teams from 32 others qualified to the semi-final and after they played this stage and final stage, these 4 teams took ordered as following: (France: 1st (Champions), Croatia: 2nd, Belgium: 3rd, England: 4th). Write a complete HTML and JavaScript code to input only …
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
@Yousif-FJ
Yousif-FJ / index.html
Created January 8, 2022 21:34
Write a program using JavaScript to change the font to "Times New Roman" and the colour to "red" of the text inside <p> element when the user click on the element.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
p{
font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif
@Yousif-FJ
Yousif-FJ / Exp3 2-2.asm
Last active June 30, 2022 13:52
Q/Print the largest ASCII value character from a string inputted by user using 86 assembly
org 100h
.DATA
STR DB 30 DUP(' ')
LEN DW 0
CHAR DB ?
.CODE
LEA DI,STR
@Yousif-FJ
Yousif-FJ / Exp4.asm
Last active June 30, 2022 13:53
Q\Write an 8086 program to draw a horizontal line starts at the position 60,60 with the length of 100 pixel and with Magenta color
org 100h
;set display mode to 320x200 for drawing
MOV AX,0013H
INT 10H
;set up drawing
MOV CX,60 ; x coordinate
MOV DX,60 ; y coordinate
@Yousif-FJ
Yousif-FJ / ProgramA.cs
Last active June 30, 2022 13:53
A- Write a C# CLI program to read three numbers and find the maximum ( largest ) number. B- Modify the program to read ten numbers and find the second largest number.
//Answer to A
using System;
using System.Linq;
namespace ConsoleApp2_for_test
{
class Program
{
public static void Main()
{
@Yousif-FJ
Yousif-FJ / Source.cpp
Last active June 30, 2022 13:55
Q/Create class Book_Store that have the following data members (ISBN (int), book name (string), and number of copies (int)). The class have the following functions: • Input function to enter the Book_Store information. • Print function to display the Book_Store information. • In the main class use array of objects size (5) to test the functions.…
#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
class Book_Store
{
public:
void input();
void print();
@Yousif-FJ
Yousif-FJ / Source.cpp
Last active June 30, 2022 13:50
Q2/ Create class BOX that have three data members (length, height, and width). And the following function members: • Default Constructor to initialize the data members. • Input: to input values to the data members. • Print: to display the data members values. • Overload (=) operation to assign the values of one BOX objects to another. • Friend f…
#include<iostream>
#include<conio.h>
using namespace std;
class Box
{
public:
Box();
void input();
void print();