‏إظهار الرسائل ذات التسميات برمجة. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات برمجة. إظهار كافة الرسائل
الجمعة، 1 يناير 2016

WebSite 2016

في وقت محدد يحصل تغيير بالصفحة ;-)


الكود الخاص بالساعة بالجافا سكربت ;-) لاستمرر عرض الساعة مع كل ثانية :-
        <script type="text/javascript">
 function startTime()
        {
            var d = new Date();
            var h = d.getHours();
            var m = d.getMinutes();
            var s = d.getSeconds();
          
            m = checktime(m);
            s = checktime(s);
            document.getElementById('txt').innerHTML = h + ":" + m + ":" + s;
            t = setTimeout('startTime()', 500);
        }
        function checktime(i)
        {
            if(i<10)
            {
                i = "0" + i;
            }
            return i;
        }
        </script>

لمشاهد تغيير الصفحة عن حلول عام 2016 عند الساعة 00:00:00  :-



الجمعة، 16 أكتوبر 2015

تجربتي مع احد مشاريعي :p

موقع تواصل للدراسة الكترونية بعيدا عن الطرق الروتنية الممللة بالدراسة و باساليب مبتكرة و ممتعة 

فكرة اشتغلت عليها لمدة شهر ونص و انتهت عند ستارت اب ويكند مو استسلام وانما بحاجة للابداع و افكار مختلفة تصنع الفرق الجوهري استسلمت بانها فكرة مطروحة سابقا و شكد ما اتعب ما راح اوصل لذاك الشي القوي اللي يسوي التغيير (تشجيع على الدراسة) يجوز فد يوم راح ارجع انفذها من تصير عندي الخبرة الكافية ... وبكل احوال استفاديت من هل التجربة طورت نفسي شوية بالويب دزاين غيرت طريقت تفكيري (مو كلشي مقتنع بي صحيح ) و اخيرا شكرا لكل من تابعني و شارك باستبيان او دعمني معنويا :)







https://www.facebook.com/permalink.php?story_fbid=993226397401785&id=731072783617149
https://www.facebook.com/731072783617149/photos/a.952434458147646.1073741828.731072783617149/992323974158694/?type=3
https://www.facebook.com/Engineering.PC/photos/a.329919000444876.1073741826.296735803763196/608520162584757/?type=3
الموقع التجريبي اللي اخذتة من صديقي :)
http://ana-news.net/
وكانت هاية نتائج الاستبيان :-/
https://docs.google.com/forms/d/1p9vgOxj_sjnUuuJYsDmAPF0sjphtgqTxZmH-zEcsnqA/viewanalytics
الثلاثاء، 23 يونيو 2015

برنامج C# يحتوي على كل الاساسيات ALL C# in program

برنامج متكامل يحتوي على كل الاساسيات لتعلم #C و اصلا هو مصمم ب C# ,
طبعا هل فكرة جت لي اثناء الامتحان الا انه ما كدرت اكملها بالامتحان لضيق الوقت والان بالعطلة كملتها و اخذت وقت شوية طويل

المهم الفكرة بصورة عامة كل موضوع يحتوي على التنفيذ و الكود في نفس الواجهة ممل يسهل التعلم دون اخطأ كما موضح بالصور
رابط تحميل البرنامج : ALL C# in program 

 Source   :   with source code

واخيرا اتمنى الفكرة تعجبكم و لتنسون من الدعاء بهذا الشهر الكريم  " تاريخ نشر الموضوع مصادف في رمضان ^__^ "
اكيد كل سنة لازم نترك شي ;)
الاول : موقع الكتب بالاول + CD

الثاني :  لنك روابط الملازم+ برامج هياكل 
السبت، 28 فبراير 2015

Design First Application of Android

اول تطبيق لهواتف الذكية من تصميمي يتيح لك التحكم من نظام الاندرويد بالاردينوا عبر البلوتوث لتحكم بالاجهزة مختلفة 
فهنا تم التحكم بسيارة صغيرة بمختلف الاتجاهات و توقف  بالاضافة الى ضوء تشغيل و اطفاء
في حال اردت تحميل التطبيق من هنا 
معلومات عند برمجة الاردينوا  :
 الاعلى : w , الاسفل :z    و يمين : d   و يسار:  a  و توقف :  s   و تشغيل الضوء :  o  و الاطفاء : f  
 اما pinMode يمكنكم مراسلتي لمعرفة ارقامها 


الأحد، 7 ديسمبر 2014

اصنع الة حاسبة للعمليات الحسابية خاص بك



لتحميل عبر الرابط :- Calculator_Ahmed
وذلك عبر كتابة  كود سي شارب :- 
   char symbol;
        int a;

        private void button1_Click(object sender, EventArgs e)
        {

            textBox1.Text = textBox1.Text+"1";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "2";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "3";
        }

        private void button4_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "4";
        }

        private void button5_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "5";
        }

        private void button6_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "6";
        }

        private void button7_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "7";
        }

        private void button8_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "8";
        }

        private void button9_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "9";
        }

        private void button12_Click(object sender, EventArgs e)
        {
             a = Convert.ToInt16( textBox1.Text);
            textBox1.Text = null;
            textBox1.Focus();
            symbol = '+';

        }
        private void button13_Click(object sender, EventArgs e)
        {
            a = Convert.ToInt16(textBox1.Text);
            textBox1.Text = null;
            textBox1.Focus();
            symbol = '-';
        }

        private void button14_Click(object sender, EventArgs e)
        {
            a = Convert.ToInt16(textBox1.Text);
            textBox1.Text = null;
            textBox1.Focus();
            symbol = '*';
        }

        private void button15_Click(object sender, EventArgs e)
        {
            a = Convert.ToInt16(textBox1.Text);
            textBox1.Text = null;
            textBox1.Focus();
            symbol = '/';
        }
        private void button16_Click(object sender, EventArgs e)
        {
            if (symbol == '+')
            {
                a += Convert.ToInt16(textBox1.Text);
            }
        
            if (symbol == '-')
            {
                a -= Convert.ToInt16(textBox1.Text);
            }
        
            if (symbol == '*')
            {
                a *= Convert.ToInt16(textBox1.Text);
            }
         
            if (symbol == '/')
            {
                a /= Convert.ToInt16(textBox1.Text);
            }
            textBox1.Text = null;
            textBox1.Text = a.ToString();
        }

        private void button17_Click(object sender, EventArgs e)
        {
            textBox1.Clear();

        }

        private void button18_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("design by student Ahmed Abdulkarim talib \n computer engineering in University of technology");
        }

السبت، 25 أكتوبر 2014

++Scheduler FIFO in c

1- find wait time 

#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
float b[4];
float w=0;
float p1=0, p2, p3, p4;
for (int i = 0; i < 4; i++)
{
cout << "enter the burst time for process: ";
cin >> b[i];
}
for (int i = 0; i < 4; i++)
{
cout << "\n process= " << i << "\tthe burst time = " << b[i] << "\n";
}
p2 = b[0];
p3 = b[0] + b[1];
p4 = b[0] + b[1] + b[2];
w = (p1 + p2 + p3 + p4)/4;
cout << "\n wait time p1 = " << p1 << endl;
cout << "\n wait time p2 = " << p2 << endl;
cout << "\n wait time p3 = " << p3 << endl;
cout << "\n wait time p4 = " << p4 << endl;
cout << "\n wait time all = " <<w<< endl;
_getch();
}

2- scheduler as queue

#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
class fifo
{
private:
struct node_fifo{
int data;
node_fifo *next;
};
node_fifo *front;
node_fifo *back;
int count;
public:
fifo()
{
count = 0;
front = back = NULL;
}
bool isempty(){ return count == 0; }
void insert(int item)
{
node_fifo *p = new node_fifo;
p->data = item;
if (isempty())
{
back = front = p;
back->next = p;
p->next = NULL;
}
else
{
back->next = p;
back = p;
back->next = NULL;
}
count++;

}
void display()
{
node_fifo *p = front;
while (p != NULL)
{
cout <<"process "<< p->data << "\t ";
p = p->next;
}
}
};
void main()
{
fifo q;
q.insert(1);
q.insert(2);
q.insert(3);
q.insert(4);
q.display();
_getch();
}

الجمعة، 16 مايو 2014

quick_sort

#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
class quicksort
{
public:
int no_of_elements;
int elements[10];
public:
void getarray();
void sortit(int[], int, int);
void partition(int[], int, int,int &);
void display();
};
void quicksort::getarray(){
cout << "how many elements ?: ";
cin >> no_of_elements;
cout << "insert array of element to sort : ";
for (int i = 0; i < no_of_elements; i++)
cin >> elements[i];
}
void quicksort::sortit(int x[], int lb, int ub)
{
int j;
if (lb >= ub)
return;
display();
partition(x, lb, ub, j);
sortit(x, lb, j - 1);
sortit(x, j + 1, ub);
}
void quicksort::partition(int x[], int lb, int ub, int &pj)
{
int a, down, temp, up;
a = x[lb];
up = ub;
down = lb;
while (down < up)
{
while (x[down] <= a)
down++;
while (x[up]>a)
up--;
if (down < up)
{
temp = x[down];
x[down] = x[up];
x[up] = temp;
}
}
x[lb] = x[up];
x[up] = a;
pj = up;
}
void quicksort::display()
{
for (int i = 0; i < no_of_elements; i++)
cout << elements[i] << " ";
cout << endl;
}

void main()
{
quicksort qs;
qs.getarray();
cout << "sort is given in step by step showing each iteration" << endl;
qs.sortit(qs.elements, 0, qs.no_of_elements - 1);
qs.display();
_getch();
}

merge_sort


#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
void sort(int left, int right);
void merge(int left, int mid, int right);
int a[9] = { 75, 40, 10, 90, 50, 95, 55, 15, 65};
int tmp[9];
void sort(int left, int right)
{

if (left < right)
{
int mid = (left + right) / 2;
sort(left, mid);
sort(mid + 1, right);
merge(left, mid, right);
}
}

void merge(int left, int mid, int right)
{
int i = left;
int j = left;
int k = mid + 1;
while (j <= mid&&k <= right)
{
if (a[j] < a[k])
tmp[i++] = a[j++];
else
tmp[i++] = a[k++];
}
while (j <= mid)
tmp[i++] = a[j++];
for (i = left; i < k; i++)
a[i] = tmp[i];
}
void main()
{
sort(0, 8);
cout << "sort array:"<<"\n";
for (int i = 0; i < 9; i++)
cout << a[i] << " ";
_getch();

}
الثلاثاء، 1 أبريل 2014

hashtable in c++

// record taqble data base.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<iostream>
#include<conio.h>
#define null -1
using namespace std;
struct emprecord
{
int empcode;
};
class hashtable
{
private:
emprecord *hasharray;
int arraysize;
public:
hashtable(int size)
{
hasharray = new emprecord[size];
arraysize = size;
for (int i = 0; i < arraysize; i++)
hasharray[i].empcode = null;
}
int hashfunc(int key)
{
return key%arraysize;
}
void insert(emprecord item)
{
int key = item.empcode;
int hasval = hashfunc(key);
while (hasharray[hasval].empcode != null)
{
++hasval;
hasval %= arraysize;
}
hasharray[hasval] = item;
}
void display()
{
cout << "key" << "\t" << "hashfunc" << endl;
cout << "---" << "\t" << "--------" << endl;
for (int i = 0; i < arraysize; i++)
cout << hasharray[i].empcode << "\t" << hashfunc(hasharray[i].empcode) << endl;
}

};

void main()
{
int a[] = { 12, 17, 21, 28, 35, 40, 43, 52, 66, 69 };
emprecord reckey[10];
for (int i = 0; i < 10; i++)
reckey[i].empcode=a[i];
hashtable h(10);
for (int i = 0; i < 10; i++)
h.insert(reckey[i]);
h.display();
_getch();

}

الاثنين، 24 مارس 2014

priority queues in heap

// ConsoleApplication46.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<iostream>
#include<conio.h>
#include<string>
#define maxsize 10
using namespace std;
struct node
{
string data;
int prn;
};
class heap_priority
{

node a[maxsize];
int count;

public:
heap_priority()
{
count = 0;
}
bool insert(int key, string name)
{
if (count == maxsize)
return false;
else
a[count].data = name;
a[count].prn = key;
moveup(count++);
return true;
}
void moveup(int index)
{
int parent = (index - 1) / 2;
node bottom = a[index];
while (index > 0 && a[parent].prn < bottom.prn)
{
a[index] = a[parent];
index = parent;
parent = (parent - 1) / 2;
}
a[index] = bottom;

}

void *remove()
{
if (count == 0)
{
cout << "\n heap is empty" << endl;
return NULL;
}
node *root = new node;
root->data = a[0].data;
root->prn = a[0].prn;
a[0] = a[--count];
movedown(0);
return root;
}
void movedown(int index)
{
int larger_child;
node top = a[index];
while (index < count / 2)
{
int left_child = 2 * index + 1;
int right_child = 2 * index + 2;
if (right_child < count&&a[left_child].prn < a[right_child].prn)
larger_child = right_child;
else
larger_child = left_child;
if (top.prn >= a[larger_child].prn)
break;
a[index] = a[larger_child];
index = larger_child;
}
a[index] = top;
}
void display()
{
for (int i = 0; i < count; i++)
cout << "["<<i<<"] [" << a[i].data << "|" << a[i].prn << "]";;
cout << endl;
}



};
void main()
{
heap_priority h;
h.insert(2, "alpha");
h.insert(3, "beta");
h.insert(2, "gamma");
h.insert(4, "delta");
h.insert(1, "omega");
h.display();
h.insert(3, "lambda");
h.display();
h.remove();
h.display();
_getch();
}

الأحد، 16 مارس 2014

heap (complete binary tree)

// Heap.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include<iostream>
#include<conio.h>
#define max 7
using namespace std;
class heap
{
private:
int  a[max];
int count;
public:
heap()
{
count = 0;
}
bool insert(int key)
{
if (count == max)
return false;
a[count] = key;
moveup(count++);
return true;
}
void moveup(int index)
{
int parent = (index - 1) / 2;
int bottom = a[index];
while (index > 0 && a[parent] <bottom)
{
a[index] = a[parent];
index = parent;
parent = (parent - 1) / 2;
}
a[index] = bottom;
}
void movedown(int index)
{
int largechild;
int top = a[index];
while (index<count / 2)
{
int leftchild = 2 * index + 1;
int rightchild = 2 * index + 2;
if (rightchild<count && a[leftchild] < a[rightchild])
largechild = rightchild;
else
largechild = leftchild;
if (top >= a[largechild])
break;
a[index] = a[largechild];
index = largechild;
}
a[index] = top;
}

int remove()

{
if (count == 0)
{
cout << "heap is empty" << endl;
return -1;
}
int root = a[0];
a[0] = a[--count];
movedown(0);
return root;
}
void display()
{
for (int i = 0; i <count; i++)
cout << a[i]<<" ";
cout << endl;
}

};


void main()

{
heap h;
h.insert(50);
h.insert(20);
h.insert(30);
h.insert(10);
h.insert(40);
h.insert(70);
h.insert(60);
h.display();
h.remove();
h.display();
_getch();
}








For more advantage in show:-















void display()
{
cout <<"\t\t\t\t    ("<< a[0] <<")" <<endl;
cout << "\t\t\t\t   /" << "    |" << endl;
cout << "\t\t\t\t  /" << "     |" << endl;
cout << "\t\t\t      (" << a[1] << ")\t(" << a[2] << ")" << endl;
cout << "\t\t\t      /" << "  |" <<"     / " << "  | " << endl;
cout << "\t\t\t     /" << "   |" <<"    / " << "   | " << endl;
cout << "\t\t\t  (" << a[3] << ") (" << a[4] << ")  (" << a[5] << ") ("<<a[6]<<")";
cout << endl;
}