Skip to content

Instantly share code, notes, and snippets.

View akhal3d96's full-sized avatar

Ahmed Khaled akhal3d96

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int times[1000001],indst[1000001],inden[1000001],n,i,f,maxn,max;
maxn=-1;
scanf("%d",&n);
memset(times, 0, 1000001*sizeof(int));
for(i=0;i<n;i++)
#!/usr/bin/python
import random
def Generate():
_1 = str(random.randint(0,9))
_2 = str(random.randint(0,9))
_3 = str(random.randint(0,9))
_4 = str(random.randint(0,9))
_5 = str(random.randint(0,9))
@akhal3d96
akhal3d96 / gist:3842949
Created October 5, 2012 22:59
Kemia2y - Function #2 -
private void my()
{
//تعريف المُتغيرات
string findtxt,findtxt2;
findtxt = entry1.Text;
findtxt2=entry2.Text;
//المُتغير الفارغ :D
Nullable<int> i = null;
@akhal3d96
akhal3d96 / gist:3839691
Created October 5, 2012 12:58
Kemia2y - Function -
private void my()
{
string findtxt,findtxt2;
findtxt = entry1.Text;
findtxt2=entry2.Text;
string [] element = {"H","He","Li","Br","Be","C","N","O","F","Ne","Na","Mg","Al","Si","P","S","Cl","Ar","K","Ca"};
int [] valency = {1,0,1,2,3,4,3,2,1,0,1,2,3,4,5,2,1,0,1,2,};
@akhal3d96
akhal3d96 / gist:3839625
Created October 5, 2012 12:42
Kemia2y [issues #1]
int st = Array.IndexOf(element,findtxt); //رقم مكان القيمة المُدخلة في entry1
int sc = Array.IndexOf(element,findtxt2);//رقم مكان القيمة المُدخلة في entry2
if (sc == st)
{
sc = 1 ; st = 1;
label3.Text = element[st]+valency[sc]+" "+element[sc]+valency[st];
}
@akhal3d96
akhal3d96 / webkit.cs
Created October 2, 2012 20:45
WebKit Rendering Engine In MonoDevelop
SetDefaultSize(800,600);
ScrolledWindow scrol = new ScrolledWindow();
WebView webii = new WebView();
webii.Open("http://www.twitter.com");
fixed2.Add(scrol);
fixed2.Add(webii);
webii.SetSizeRequest(800,600);
fixed2.ShowAll();