Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
muftisamiullah committed Jan 29, 2020
0 parents commit f53fa2f
Show file tree
Hide file tree
Showing 44 changed files with 181 additions and 0 deletions.
Binary file added 1461165720028-588264325.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 1461178479591-588264325.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added Computer Graphics/computer graphics.pdf.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Database Internals.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Machine learning (dawood sir)/ciml-v0_99-all.pdf
Binary file not shown.
Binary file added Project study material/apibegineer.pdf
Binary file not shown.
26 changes: 26 additions & 0 deletions Qt programming/MyForm.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "MyForm.h"
MyForm::MyForm(QWidget *parent) : QWidget(parent)
{
label = new QLabel(this); //set parent to this as parent is Myform object
label->setGeometry(30,0,50,80);

lineEdit = new QLineEdit(this); //set parent to this as parent is Myform object
lineEdit->setGeometry(30,80,80,20);

button = new QPushButton(this); //set parent to this as parent is Myform object
button->setGeometry(30,110,50,60);
button->setText("Click");

this->connect(button, // button generates signal
SIGNAL(clicked()), // signal was clicked
this, // recievr is form
SLOT(addTextToLabel()) //the slot that executes is addTextToLabel
);
}
void MyForm::addTextToLabel(){
this->label->setText( lineEdit->text() ); // on this from obj

}



28 changes: 28 additions & 0 deletions Qt programming/MyForm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef MyForm_H
#define MyForm_H
#include <QLabel>
#include <QWidget>
#include <QLineEdit>
#include <QPushButton>

class MyForm : public QWidget{
Q_OBJECT
public:
//declare pointers of QWidgets.
QLabel *label;
QPushButton *button;
QLineEdit *lineEdit;

/* Myfrom class's constructor with parent value 0, i.e form
* object will be the parent for all the widget objects inside it ..
* or simply QLabel, QPushbutton etc will be childs of MyForm object when created..
*/
MyForm(QWidget *parent = 0);

private slots:
/*
* A slot that will set the value of label to whatever was written inside QLineEdit.
*/
void addTextToLabel();
};
#endif
19 changes: 19 additions & 0 deletions Qt programming/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Author:Nadeem Hilal
Purpose:A simple application to show working of signal & slots.
Description:Three QWidgets QLabel, QPushButton and QLineEdit,
whateever is typed inside the QLineEdit, after user clicks the QPushButton
the same text from the QLineEdit is Displayed on QLabel.

How to compile the code to application on linux machine.
qmake-qt4, g++, must be installed on machine, and other qt4 packages required for Qt Development.
1: Create a directory hello.
2: Copy MyForm.h, MyForm.cpp, main.cpp into this "hello" directory.
3: cd into hello, the write below commands one by one.
4: qmake-qt4 -project main.cpp
5: qmake-qt4 hello.pro
6: qmake-qt4
7: make
8: ./hello


Enjoy :)
11 changes: 11 additions & 0 deletions Qt programming/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <QWidget>
#include "MyForm.h"
#include <QApplication>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyForm *form = new MyForm;
form->show();
return app.exec();
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions UnixShellScripts/areaOfCircle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
#Compute area of circle
readonly pi=3.14;
area(){
echo "scale=5; ${pi} * ( ${1} * ${1} ) " | bc
}

#script actually is interpreted from here
echo "Enter the radius."
read radius;
areaIs=`area ${radius}`
echo "The area of circle with radius ${radius} is: ${areaIs}"
11 changes: 11 additions & 0 deletions UnixShellScripts/countToltalLinesInFile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
#Script that counts lines in the file passed.
noOfLines=0;
if test -f $1; then
while read line
do
noOfLines=$( echo " ${noOfLines} + 1" | bc )
done < $1
echo "The total no of lines are: ${noOfLines}"
fi

15 changes: 15 additions & 0 deletions UnixShellScripts/factorialOfNumberByRecurrsion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
#factorial using recurrsion
factorial(){
if test $1 -eq 1; then
echo 1;
else
x=$(echo "$1 - 1" | bc)
echo "${1} * $(factorial $x)" | bc
fi
}

#script actually is interpreted from here
echo "Enter the number"
read number;
echo "The factorial of ${number} is: $(factorial ${number})"
8 changes: 8 additions & 0 deletions UnixShellScripts/readIstWordOf3rdLine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
lineCount=`wc -l $1 | cut -d ' ' -f1`
if [ $lineCount -ge 3 ]; then
word=`head -3 $1 | tail -1 | cut -d ' ' -f1 `
echo "The ist word of third line is : ${word}"
else
echo "No sufficient lines."
fi
6 changes: 6 additions & 0 deletions UnixShellScripts/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hello my name is nadeem
hello world
hellosdsadasdsadsad
sajdlkjsajda


15 changes: 15 additions & 0 deletions UnixShellScripts/sumTwoNumbers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
#sum 2 numbers using function or without
# sum(){
# echo " ${1} + ${2} "| bc
# }

#script actually is interpreted from here
echo "Enter the ist number."
read num1;
echo "Enter the 2nd number."
read num2;
# sumIs=`sum ${num1} ${num2}`
sumIs=$(echo "${num1} + ${num2}" | bc)
echo "The sum of ${num1} + ${num2} = ${sumIs}"

11 changes: 11 additions & 0 deletions UnixShellScripts/testEvenOdd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
#even odd
#script actually is interpreted from here
echo "Enter the number"
read number;
bool=$(echo "${number} % 2" | bc )
if test $bool -eq 0; then
echo "The number ${number} is Even."
else
echo "The number ${number} is Odd."
fi
19 changes: 19 additions & 0 deletions UnixShellScripts/testPrimality.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
#Primality test
#script actually is interpreted from here
echo "Enter the number"
read number;
count=2;
while test $count -lt $number;
do
y=$(echo "${number} % ${count} " | bc)
if test $y -eq 0; then
echo "The number ${number} is not prime"
break;
fi
count=$(echo "${count} + 1" | bc) #i++
done

if test $count -ge $number; then
echo "The number ${number} is Prime."
fi
Loading

0 comments on commit f53fa2f

Please sign in to comment.