Skip to content

Instantly share code, notes, and snippets.

View MajedDH's full-sized avatar

Majed DH MajedDH

  • Turkey, Gaziantep
View GitHub Profile
@MajedDH
MajedDH / Database 1 Assignment 7.sql
Last active March 19, 2020 04:05
Database 1 Assignment 7.sql
create table Allergy
(
AllergyID char(10) not null,
AllergyName char(40) not null,
constraint uq_aid
unique (AllergyID)
);
alter table Allergy
add primary key (AllergyID);
@MajedDH
MajedDH / assignment.sql
Created March 5, 2020 02:00
assignment
create table Allergy
(
AllergyID int auto_increment,
AllergyName varchar(100) not null,
constraint AllergyPrimaryKey
primary key (AllergyID)
);
create table Speciality
(
SpecialityNumber varchar(100),
@MajedDH
MajedDH / SpellChecker.java
Created March 5, 2020 01:31
Spell checker assignment
package com.company;
import javax.swing.*;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.*;
public class Main {
private static HashSet<String> badWordsCorrected = new HashSet<>();
package com.company;
import java.util.Arrays;
/**
* This class looks like it's meant to provide a few public static methods
* for searching and sorting arrays. It also has a main method that tests
* the searching and sorting methods.
* <p>
* TODO: The search and sort methods in this class contain bugs that can
@MajedDH
MajedDH / SentenceGenerator.java
Created February 12, 2020 22:43
Lab 3 Part 1
package homework;
public class SentenceGenerator {
static final String[] conjunctions = {"and", "or", "but", "because", "unless"};
static final String[] proper_nouns = {"Fred", "Jane", "Richard Nixon", "Miss America"};
static final String[] common_nouns = {"man", "woman", "fish", "elephant", "unicorn"};
static final String[] determiners = {"a", "the", "every", "some", "all"};
static final String[] adjectives = {"big", "tiny", "pretty", "bald", "long", "short", "small", "fat"};
static final String[] intransitive_verbs = {"runs", "jumps", "talks", "sleeps", "eats", "walks", "breaths"};
@MajedDH
MajedDH / Main.java
Created February 6, 2020 04:51
UoPeople assignment
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
runTestForLength(1000);
runTestForLength(10000);
runTestForLength(100000);
}
@MajedDH
MajedDH / manifest.xml
Created January 30, 2020 00:20
firebase example
<service
android:name=".MyFirebaseMessagingService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
@MajedDH
MajedDH / main_window
Created January 27, 2015 16:16
cef bug
<Window x:Class="some_class"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
Title="some Title"
Width="525"
Height="350"
FlowDirection="RightToLeft"
Icon="1.png">
<wpf:ChromiumWebBrowser x:Name="ChromiumWebBrowser"/>