tag:blogger.com,1999:blog-45370177997351640732017-11-26T13:58:00.037+02:00Download Free CodesLearn, Free Codes for Python, HTML, PHP, Javascript, CSS, jQuery, Oracle.Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.comBlogger48125tag:blogger.com,1999:blog-4537017799735164073.post-30026652277607420682016-10-28T07:13:00.000+03:002016-10-29T08:58:15.589+02:00css button style
We can make a web button by any object by modifying its shape to be a button then adding any function by OnClick or other events.
Simple HTML and CSS Code to create Button
<style>
.button_style {
background-color: #4CAF50;
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-66328430876583229852016-07-04T19:12:00.000+03:002016-10-13T10:26:43.116+03:00how to make your computer faster?
1- Restart your computer, that will start a your OS in fresh mode and load only needed services.
2- Ensure that your OS and Software is always up to date.
3- Scan your computer with updated antivirus program, that will prevent and kill any running virus in the background of your computer.
4- You should always have a suitable free disk space on your Computer, delete unneeded data, includingMohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-14886875599212838172016-07-04T19:11:00.001+03:002016-07-04T19:13:11.621+03:00Why is my computer running slow?
Computers are very powerful machines, but just like other devices, they have broken down at some point. Amongst the things that many people experience with their computers. It can be frustrating when your computer is running slow because it takes longer to get tasks done and this can leave you over the edge and can also lead to lots of wasted time. Most of these issues can be resolved, but Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-28556648699293256252016-05-30T13:57:00.000+03:002016-05-30T14:06:11.150+03:00Python Tutorial - python if elsehow to make decisions on python by using if else conditions.
if (condition):
statement1
....
else:
statement2
....
mark = 20 + 20 + 30
if (mark > 60):
print "you pass the exam with total mark:", mark
else:
print "sorry, you mark:", mark
you can use the nested if construct.
if (condition_1):
if (condition_2):
statement2_1
....
....
else:
statement2_2
....
....
Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-38203919453043392692016-05-28T20:48:00.000+03:002016-05-29T09:28:22.144+03:00Python float divisionWhen we divide integer number in python the result show only the integer number, see this example:
a = 7
b = 2
c = a / b
print c
3
# the result will be 3, but it should be 3.5
To make right division with floating point we have to add this import line.
from __future__ import division
a = 7
b = 2
c = a / b
print c
3.5
print 10 / 3
3.33333333333
Another simple way to define python float Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-38175905179946586402016-05-27T12:14:00.000+03:002016-05-30T13:55:54.798+03:00Python Tutorial - Basic Operators
Python language supports the following types of operators.
Arithmetic Operators
print 2 + 3 # 5 - Addition
print 3 - 2 # 1 - Subtraction
print 2 * 3 # 6 - Multiplication
print 2 ** 3 # 8 - Exponent
print 18 / 4 # 4 - Division
print 18 // 4 # 4 - Floor Division
print 10 % 3 # 1 - Modulus
note that in python division the result show only the integer number, for example if divide 10 on 3 Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-28706751511495965352016-03-22T11:08:00.000+02:002016-04-25T14:36:57.724+03:00how many spaces is a tab?
Tab key in the keyboard which is char(9) of ASCII, is a useful key with a lot of functions in our systems, we use it alone to move the focus to the next object, or with [Alt] key to switch between applications, sometimes with [Ctrl] to switch between tabs, some times we use it in text editors to arrange data or text in a tabular, or table, form.
how many spaces is a tab?
While I was searching Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-40750914872227339502016-03-05T16:15:00.002+02:002016-03-06T11:14:47.098+02:00css horizontal list menu
Learn how to build simple css horizontal list menu, its based on ordinary HTML list, with support for one level of nested lists. The nested lists are transformed into 2nd level drop down menus that appears dynamically onmouseover, using CSS for interface syle and arraw image beside menu list for dropdown menu.
CSS code for css Horzontal Java Menu
<style>
.horizontalcssmenu ul{
margin: 0;
Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-54357476956547082242016-01-26T15:41:00.000+02:002016-05-27T22:39:30.652+03:00Python Tutorial - Python Variables and TypesIntroduction
When you create variable in python or in any other languages this means you reserve a memory location to store the value.
The value stored in a variable can be accessed or updated later. The interpreter allocates memory on the basis of data type of a variable.
Python Variable Name Rules
The start character can be the underscore "_" or a capital or lower case letter.
Other Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-82980815039976936932016-01-03T12:37:00.001+02:002016-01-26T13:56:08.917+02:00Python Tutorial - Python Syntax
Python syntax is the set of rules which defines how a Python program will be written, and that rules make python highly readable language.
Lines in Python
Codes of python is divided into logical lines which consist of one or more physical lines.
Any line contains only spaces, tabs or comment is known as a blank line and Python totally ignores it.
Comments in Python
A comment in python Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-86871367115659036812015-12-18T05:13:00.002+02:002016-01-03T14:08:28.147+02:00Python Tutorial - My First Python Program
Open your command line then type python command or open the python IDLE (Python Integrated Development Environment) and start type your codes.
$ python
Python 2.4.3 (#1, Jan 9 2013, 06:47:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
We always start our first program by printing simple string like "Hello, Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-90986063326714490462015-12-17T13:20:00.002+02:002015-12-17T13:25:55.689+02:00why should you learn python
If you want to learn how to write a programming code, I recommend you to start with Python for many reasons, some of these reasons which attracted my attention are:
1- Python requires no "set up." A full python environment is already installed on every Linux and Mac computer, So if you want to get started with python programming, just type python at the prompt command line and go.
On Windows, Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-49144248401452913512014-11-23T12:19:00.000+02:002014-11-23T12:19:48.009+02:00css navigation bar
CSS code
one of my useful and simple css navigation menu bar I always use, only change the style color and use it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<style>
.horizontal-nav {
width:100%;
height:30px;
padding: 0px;
Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-10257680928289815182014-11-01T08:29:00.000+02:002015-12-16T21:00:06.173+02:00php pagerank checker script
a great php class to check page rank for any website, only include the class file and get PageRank.
pagerank_checker.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
class GooglePR {
public function get_google_pagerank($url) {
$Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com1tag:blogger.com,1999:blog-4537017799735164073.post-10337392843480104832014-10-28T23:38:00.000+02:002014-10-29T09:49:10.420+02:00Get alexa rank using php
Alexa is one of the most famous sites to check traffic statistics for any site, and it make a global ranks for all sites depending on the visitors traffic, getting small number in alexa is better for your site to be more popular.
Millions of people from all over the world visit Alexa to get the data they need to make smart business decisions. Search Alexa to discover the most successful sites Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com1tag:blogger.com,1999:blog-4537017799735164073.post-34898825247188157022013-10-22T14:22:00.003+02:002015-12-17T06:06:29.959+02:00username, password and date validation with php
Simple PHP functions to validate username, password and date, functions check the input format and allowed characters and then return TRUE for valid data and FALSE for invalid data.
PHP username validation.
A simple php function to check if the given username is valid or not using preg_match..
1
2
3
4
5
6
7
8
9
10
<?php
function is_valid_username($username){
// accepted username length Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-91318800867221326592013-10-19T12:46:00.000+02:002015-12-17T06:08:03.361+02:00url, email and ip validation with php
Simple PHP functions to validate url, email address and ip, functions will return TRUE for valid data and FALSE for invalid data.
PHP URL validation.
A simple php function to check if the given URL is valid or not using preg_match..
1
2
3
4
5
6
7
<?php
function is_valid_url($url){
$p1 ='/(http|https|ftp):\/\/[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(\/.*)?$/i';
return preg_match($p1, $url)Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-34590546975413348542013-10-05T13:15:00.000+02:002013-10-06T08:27:06.887+02:00How to upload files or Images using PHPA lot of websites these days allawing users to upload their files of a different types and sizes, and they still control of this operation to reject any file type or size, so I will show you in a simple codes how to upload files and add some restrictions for this operation.
File upload form
1
2
3
4
5
6
7
8
9
10
<html>
<body>
<H2>Simple form to upload files</H2><br>
<form action="upload.php" Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-82956164482032111792013-09-15T06:06:00.000+03:002013-09-15T06:06:17.477+03:00Oracle tablespacesOracle Tablespace is a logical storage unit for oracle Database, every tablespace consist of one or more physical data file, each data file belongs to one and only one tablespace.
Oracle tablespace contains objects like Table, Index and any other objects and they should belong to only one tablespace.
Tablespace types
Oracle Database consist of many different Tablespace types:
1- Permanent Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-23922025097986597712013-09-06T02:48:00.000+03:002013-09-06T02:57:21.559+03:00pseudocolumn in OracleA pseudocolumn or Pseudo-column is like a table column but it actually not exist or sotred in the table, so you can select from pseudocolumns to read its value but you can't insert, update or delete their values.
Examples:
The table employees has only 3 columns as we can see by using description command
1
2
3
4
5
6
SQL> desc employees;
Name Null? Type
---------Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-84894896340605222172013-07-09T02:52:00.003+03:002013-07-09T11:33:45.485+03:00Learn how to use regedit
Learn how to use regedit
Introduction
The Windows Registry is a hierarchical database that stores configuration settings and options on Microsoft Windows operating systems. It contains settings for low-level operating system components and for applications running on the platform that have opted to use the registry.
Using regedit.exe application installed with windows is the easiest way to Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-17666612706367783842013-04-30T02:02:00.000+03:002015-12-17T10:16:49.390+02:00php login script
In this post I will build a login form using php with mysql database, first I will build my simple database of one table user info, I will use md5 encrypted to save passwords.
mysql
1
2
3
4
5
6
7
CREATE TABLE `user_tb` (
`user_id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`login` VARCHAR( 20 ) NOT NULL ,
`password` VARCHAR( 32 ) NOT NULL ,
`name` VARCHAR( 30 ) NOT NULL ,
`email` VARCHAR( 50 Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-17996521605143768662013-04-09T02:16:00.000+03:002013-04-09T02:16:59.169+03:00Using Ajax in JavaScript and jQueryAjax is technology that allows web page to update and perform actions dynamically without completely reloading the whole page, Google instance search and Google maps is one of the most great benefit of using Ajax, only the needed part of web page is loading with each action we make.
Simple Ajax example by JavaScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-74800625634613252632013-03-27T14:33:00.000+02:002013-03-30T06:28:29.170+03:00css a fixed position for my messageSome times in our webpage developing we need to set a message box or a helping menu in a fixed position in the left or bottom of the page or any other position we want, to do this task we have to build our message or menu then we use a simple css code to assign the fixed position, I will use my web box style with css for example, then I will add some css code to the main message div.
1
2
3
4
5Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0tag:blogger.com,1999:blog-4537017799735164073.post-37689912235519738902013-03-27T13:04:00.001+02:002013-10-09T06:52:19.588+02:00CSS Image Sprites - get portion of an imageOne of the great methods to load and work with icons in web pages is to load one image that is a collection of several icons and use any icon as needed, that reduces the number of server request and save bandwidth.
Image Sprites example:
I will use one of the Google images to illustrate how they get their icons as needed, Its a PNG image type and 182px × 225px dimensions.
Using DIV background:Mohammed Hijazihttps://plus.google.com/105409444873139770111noreply@blogger.com0