Friday 15 December 2017

online book store project in php | bootstrap | mysql



Download Online Book Store project in php


This is an simple online web store was made by using php , mysql and bootstrap.
the sql for database is put in folder database. the database contains many tables.
To change the localhost, username, password for connecting to database, change it only one time in /functions/database_functions.php -> db_connect() . Simple and fast The setup base is localhost , root , , www_project
to connect the admin section, click the name Admin Login at the bottom. the name and pass for log in is admin , admin. Just to make it simple.
the 2 main things are not fully implemented is contact and process purchase. Due to having to work with some security and online payment, the process site is just a place holder.

Installation/Configuration/Execution Steps

  • Download Online Book Store Project
  • Unzip the Downloaded Project
  • Copy and Paste inside WWW folder or htdocs folder
  • Open Your Web Browser and type inside “localhost/online-book-store-project-in-php”

Database Configuration

  • Create a new database named “www_project”
  • Import “www_project.sql” file from database folder(See in downloaded folder)

Admin Login Details

  • Use the Same Login Form(Given on left Sidebar on front Page)
  • Username: admin@admin.com
  • Password: admin

Download project

Thursday 14 December 2017

Online matrimonial system project in php



Online Matrimonial Project in PHP


Online Matrimonial Website is an online web portal that enables a user to find partners by choice.
It is a free project on PHP in which a user needs to first register by entering some details and then he will have access to choose his/her life partner based on his preferences.
Online matrimonial project in PHP is a totally dynamic web portal and is managed by admin from back-end.

Online matrimonial website that has features like

  • Messaging to matched preferences.
  • sending invitation to other users.
  • View other’s profile

Actors/Users of the System

  • Admin
  • Members

Features of Admin

The admin is a superuser that have access to everything.
  • He can view User details
  • He can block or unblock a user
  • He can edit user details, family details, partner preferences
  • He can even delete a user

Members

  • Enter Personal details
  • Enter Family Details
  • Enter Partner Preferences
  • Now You will be logged in and at your dashboard you will see the list of all users of opposite sex.
  • In the left sidebar, you will find a section named as “My Matches”.
  • This section contains all the members based on your partner preferences.
  • Also you can send invitation to other users and if the user accepts your invitation you can send message to each other.
  • Also a user can search other users in three ways .
  • We have advance search Features.
  • We have simple search features
  • We have search by ID features.

Brief overview of the technology:

HTML: HTML is used to create and save web document. E.g. Notepad/Notepad++

  1. CSS : (Cascading Style Sheets) Create attractive Layout
  2. JavaScript: it is a programming language, commonly use with web browsers.
  3. Bootstrap: responsive designing.
  4. jQuery
Back end: PHP, MySQL
  1. PHP: Hypertext Preprocessor (PHP) is a technology that allows software developers to create dynamically generated web pages, in HTML, XML, or other document types, as per client request. PHP is open source software.
  2. MySQL: MySql is a database, widely used for accessing querying, updating, and managing data in databases.

Software Requirement(any one)

  • WAMP Server
  • XAMPP Server
  • MAMP Server
  • LAMP Server

Installation Steps

1. Download zip file and Unzip file on your local server.
2. Put this file inside "c:/wamp/www/" .
3. Database Configuration
Open phpmyadmin
Create Database named matrimony.sql.
Import database matrimony.sql from downloaded folder(inside database)
4. Open Your browser put inside "http://localhost/Matrimony/"

Tuesday 12 December 2017

Kotlin Tutorials in Hindi | while loop



Kotlin in Hindi while loop

Loop is used in programming to repeat a specific block of code. In this article, you will learn to create while and do...while loops in Kotlin programming.

Kotlin while Loop

The syntax of while loop is:
while (testExpression) {
    // codes inside body of while loop
}

How while loop works?

The test expression inside the parenthesis is a Boolean expression.
If the test expression is evaluated to true,
  • statements inside the while loop are executed.
  • then, the test expression is evaluated again.
This process goes on until the test expression is evaluated to false.
If the test expression is evaluated to false,
  • while loop is terminated.
Example: Kotlin while Loop
// Program to print line 5 times

fun main(args: Array<String>) {

    var i = 1

    while (i <= 5) {
        println("Line $i")
        ++i
    }
}
When you run the program, the output will be:
Line 1
Line 2
Line 3
Line 4
Line 5
Notice, ++i statement inside the while loop. After 5 iterations, variable i will be incremented to 6. Then, the test expression i <= 5 is evaluated to false and the loop terminates.

If the body of loop has only one statement, it's not necessary to use curly braces { }.

Example: Compute sum of Natural Numbers

// Program to compute the sum of natural numbers from 1 to 100.
fun main(args: Array<String>) {

    var sum = 0
    var i = 100

    while (i != 0) {
        sum += i     // sum = sum + i;
        --i
    }
    println("sum = $sum")
}
When you run the program, the output will be:
sum = 5050
Here, the variable sum is initialized to 0 and i is initialized to 100. In each iteration of while loop, variable sum is assigned sum + i, and the value of i is decreased by 1 until i is equal to 0. For better visualization,
1st iteration: sum = 0+100 = 100, i = 99
2nd iteration: sum = 100+99 = 199, i = 98
3rd iteration: sum = 199+98 = 297, i = 97
... .. ...
... .. ...
99th iteration: sum = 5047+2 = 5049, i = 1
100th iteration: sum = 5049+1 = 5050, i = 0 (then loop terminates)

Kotlin Tutorials in Hindi | Null Safety in Kotlin hindi



Kotlin in Hindi Null Safety

Null Safety in Kotlin is to eliminate the risk of occurrence of NullPointerException in real time. If you are a Java developer, you might have definitely come across the atrocities of NullPointerException it creates during real time. NullPointerException is so popular as NPE (NullPointerException), since it costed billions of dollars to companies. Kotlinis so concerned about this, and made its type system in such a way that it eliminates the usage of NullPointerException, unless you want it explicitly. Thank you Kotlin.
Kotlin could never throw a NullPointerException unless you ask for it.
Of course there are ways you might give NullPointerException a chance to live one more Exception again. Let us see how could this happen :
  • When you ask for a NullPointerException explicitly
    • to throw a NullPointerException or
    • use !! operator. This operator comes with a disclaimer for usage : You have been warned! And yet you chose to live with NullPointerException.
  • From Outside Kotlin
    • You may be aware that you can run external Java code in your application. And this external Java Code is not NullPointerException proof, unless you make it so.
  • Data inconsistency

How Kotlin handles Null Safety ?

Following are some of the ways to handle Null Safety in Kotlin :
  • Differentiate between nullable references and non-nullablereferences.
  • User explicitly checks for a null in conditions
  • Using a Safe Call Operator (?.)
  • Elvis Operator (?:) : If reference to a val is not null, use the value, else use some default value that is not null
Null Safety in Kotlin

Differentiate between nullable and non-nullable references

Kotlin’s type system can differentiate between nullable references and non-nullable references.  ?  operator is used during variable declaration for the differentiation.
To make a variable hold a null value, follow the below example and observe the usage of  ?  in the program
Program:
fun main(args: Array<String>){
    var a: String = "Hello !"     // variable is declared as non-null by default
    println("a is : $a")
    // kotlin prevents you assign a null to a non-nullable variable
    // a=null //assing null to a causes complilation error
    var b: String? = "Hi !"     // variable is declared as nullable
    println("b is : $b")
    b = null
    println("b is : $b")
}
output:
Compilation completed successfully
a is : Hello !
b is : Hi !
b is : null

Kotlin Tutorials in Hindi | for loop



Kotlin in Hindi for Loop

The for loop in Kotlin iterates through anything that provides an iterator. In this article, you learn to create for loop (with the help of examples).
In Kotlin, for loop is used to iterate through ranges, arrays, maps and so on (anything that provides an iterator).
The syntax of for loop in Kotlin is:
for (item in collection) {
    // body of loop
}

Example: Iterate Through a Range

fun main(args: Array<String>) {

    for (i in 1..5) {
        println(i)
    }
}
Here, the loop iterates through the range and prints individual item.
When you run the program, the output will be:
1
2
3
4
5

If the body of the loop contains only one statement (like above example), it's not necessary to use curly braces { }.
fun main(args: Array<String>) {
    for (i in 1..5) println(i)
}

It's possible to iterate through a range using for loop because ranges provides an iterator. To learn more, visit Kotlin iterators.

Example: Different Ways to Iterate Through a Range

fun main(args: Array<String>) {

    print("for (i in 1..5) print(i) = ")
    for (i in 1..5) print(i)

    println()

    print("for (i in 5..1) print(i) = ")
    for (i in 5..1) print(i)             // prints nothing

    println()

    print("for (i in 5 downTo 1) print(i) = ")
    for (i in 5 downTo 1) print(i)

    println()

    print("for (i in 1..4 step 2) print(i) = ")
    for (i in 1..5 step 2) print(i)

    println()

    print("for (i in 4 downTo 1 step 2) print(i) = ")
    for (i in 5 downTo 1 step 2) print(i)
}
When you run the program, the output will be:
for (i in 1..5) print(i) = 12345
for (i in 5..1) print(i) = 
for (i in 5 downTo 1) print(i) = 54321
for (i in 1..4 step 2) print(i) = 135
for (i in 4 downTo 1 step 2) print(i) = 531

Iterating Through a String

fun main(args: Array<String>) {

    var text= "Kotlin"

    for (letter in text) {
        println(letter)
    }
}
When you run the program, the output will be:
K
o
t
l
i
n

Similar like arrays, you can iterate through a String with an index. For example,
fun main(args: Array<String>) {

    var text= "Kotlin"

    for (item in text.indices) {
        println(text[item])
    }
}
When you run the program, the output will be:
K
o
t
l
i
n

Kotlin Tutorials in Hindi | Invoke operators



Here are some expressions using invoke operator with corresponding functions in Kotlin.
ExpressionTranslated to
a()a.invoke()
a(i)a.invoke(i)
a(i1, i2, ..., in)a.inkove(i1, i2, ..., in)
a[i] = ba.set(i, b)
In Kotlin, parenthesis are translated to call invoke member function.

Example
class Example{
 operator fun invoke(x:Int){
 println("You are in invoke function with value of x ="+x)
 }
 }

fun main(args: Array<String>) {
 var e:Example = Example()
 e(10)
 }
Output:
You are in invoke function with value of x = 10

Wednesday 6 December 2017

Kotlin Tutorial in Hindi | Index access operators



 Index access Operator in Kotlin Hindi

Here are some expressions using index access operator with corresponding functions in Kotlin.
ExpressionTranslated to
a[i]a.get(i)
a[i, n]a.get(i, n)
a[i1, i2, ..., in]a.get(i1, i2, ..., in)
a[i] = ba.set(i, b)
a[i, n] = ba.set(i, n, b)
a[i1, i2, ..., in] = ba.set(i1, i2, ..., in, b)

Example: Index access Operator

fun main(args: Array<String>) {

    val a  = intArrayOf(1, 2, 3, 4, - 1)
    println(a[1])   
    a[1]= 12
    println(a[1])
}
When you run the program, the output will be:
2
12

Kotlin Tutorial in Hindi | in Operators



in Operator in Kotlin Hindi

The in operator is used to check whether an object belongs to a collection.
OperatorExpressionTranslates to
ina in bb.contains(a)
!ina !in b!b.contains(a)

Example: in Operator

fun main(args: Array<String>) {

    val numbers = intArrayOf(1, 4, 42, -3)

    if (4 in numbers) {
        println("numbers array contains 4.")
    }
}
When you run the program, the output will be:
numbers array contains 4.

Kotlin Tutorial in Hindi | Logical Operators



There are two logical operators in Kotlin: || and &&
Here's a table of logical operators, their meaning, and corresponding functions.
OperatorDescriptionExpressionCorresponding Function
||true if either of the Boolean expression is true(a>b)||(a<c)(a>b)or(a<c)
&&true if all Boolean expressions are true(a>b)&&(a<c)(a>b)and(a<c)
Note that, or and and are functions that support infix notation.
Logical operators are used in control flow such as if expressionwhen expression, and loops.

Example: Logical Operators

fun main(args: Array<String>) {

    val a = 10
    val b = 9
    val c = -1
    val result: Boolean

    // result is true is a is largest
    result = (a>b) && (a>c) // result = (a>b) and (a>c)
    println(result)
}
When you run the program, the output will be:
true