Oracle Database for Beginners – Create – Insert

What is Oracle?

Oracle is a DB for UNIX or Windows.

– Advantages of Oracle UNIX:

Significant performance improvement

Provides High Availability

Contains in-depth system utilities and open-source code

Highly respected by Oracle personnel

– Advantages of Oracle Windows:

Very easy to deploy and support

Requires far less IT training

Simple interface to Microsoft tools such as ODBC and .NET.

– Disadvantages of Oracle UNIX:

Required specialized skills (vi editor, shell scripting, etc.)

Required highly-technical Systems Administrators and DBA

Contains in-depth system utilities and open-source code

Security Holes (if mis-configured)

Susceptible to root kit attacks

– Disadvantages of Oracle Windows:

Slower than Linux

Less glamorous for the SA and DBA

History of poor reliability (bad reputation)

Security Holes (if mis-configured)

Susceptible to Internet viruses

Create a try database for free

1. Go to https://apex.oracle.com/en/

2. Click Get Started> Free Workspace> Application Development

3. Choose a ‘Workspace’ name, you will login using workspace / username / password combination

4. Choose your ‘Schema Name’, it is the Oracle database user.

5. Complete the registration and login

6. Click on SQL Workshop> SQL Commands

7. Notice on top right your ‘Schema Name’, Input the code:


CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255) NOT NULL,
Address varchar(255),
City varchar(255)
);

Notice the endline semicolon ;

Click ‘Run’> in the foot of the page you will have the system message ‘Table created’

8. Go Back, in the left columns you will see the table ‘PERSONS’ listed

9. Click on the top ‘Object Browser’> aftet that on the left column ‘PERSONS’, on the centen you will see the table content

Populate the database

1. Type the code:


INSERT INTO Persons 
(P_Id,LastName,FirstName,Address,City)
VALUES 
(1,'Rossi','Mario','Route 66','Los Angeles');

Notice to insert the strings you need double single apex as ‘stringName’

Let’s go on:


Go to Object Browser> PERSONS> Data

INSERT INTO Persons 
(P_Id,LastName,FirstName,Address,City)
VALUES 
(2,'Rossi','Luigi','Route 77','Los Angeles');

Then:


INSERT INTO Persons 
(P_Id,LastName,FirstName,Address,City)
VALUES 
(3,'Rossi','Andrea','Route 77','Los Angeles');

At the end we will have:

P_ID 1 | 2 | 3
LASTNAME Rossi | Rossi | Rossi
FIRSTNAME Mario | Luigi | Andrea
ADDRESS Route 66 | Route 77 | Route 77
CITY Los Angeles | Los Angeles | Los Angeles

References and docs:
https://apex.oracle.com/en/
http://www.w3schools.com/sql/default.asp
Ref: https://www.techonthenet.com/oracle/

By |Oracle|Commenti disabilitati su Oracle Database for Beginners – Create – Insert

PHP Development – Easy PHP – NetBeans IDE for noobs

What is and IDE?

To develop HTML and CSS you can use an advance notepad as NotePad++ (http://notepad-plus-plus.org/).
A tool like that is very useful for:
– Syntax Highlighting and Syntax Folding
– Auto-completion: Word completion, Function completion and Function parameters hint
– Multi-View

To edit simple PHP code you can use NotePad++ but if you want develop an application with variables and classes you will need an IDE environment. An integrated development environment (IDE) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development.
An IDE normally consists of:
– Syntax Highlighting and Syntax Folding
– Auto-completion: Word completion, Function completion and Function parameters hint
– Multi-View
– Build Automation Tool
– Debugger
– Ready to use code for graphic elements as windows, slides, buttons.
– Project Support to organize files better

Debugger help you to find evil bugs in less time.

Today we will try NetBeans IDE (https://netbeans.org/).
NetBeans IDE is free and by Oracle.

What is a WAMP?

A WAMP (Windows web development environment) allows you to create web applications with Apache, PHP and a MySQL database without installing them in your system. It is a like a magic standalone box :)

I like to use EasyPHP(http://www.easyphp.org/).

Install and Run EasyPHP

1. Go to http://www.easyphp.org/ download ‘E Development Server’ and install

2. Go to your installation folder, usually Programmi(x86)> EasyPHP> data> localweb> www> create the folder ‘test-net-beans’

3. If you have Skype running, drop it because it uses the same port of EasyPHP

4. Run EasyPHP

5. Barra di Windows> icone nascoste> RMB over EasyPHP> Administrator to see versions of Apache PHP and MYSQL

6. Barra di Windows> icone nascoste> RMB over EasyPHP> Local Web> www, to see the root folder of your website

Install and Run NetBean IDE

1. Download the package here http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
This package includes NetBeans 8.0.2 + JDK, one installation, two packages!
Lanch the .exe and install

2. Open NetBeans IDE> MAIN TOP MENU> Tools> Plugins> ‘Available Plugins’ tab> check PHP> ‘Install’ button, then restat IDE

New Project – Hello World!

0. Run NetBeans IDE

1. MAIN TOP MENU> File> New project> PHP Application

2.
Project Name: TestNetBeans
Sources Folder: usually Programmi(x86)> EasyPHP> data> localweb> www> test-net-beans
PHP Version: the same setup in barra di Windows> Icone nascoste> RMB Easy PHP> Administration

3.
Run As: Local Web Site
Project URL: http://localhost/www/test-netbeans/

4. PHP Frameworks: leave blank

NOTICE: inside Programmi(x86)> EasyPHP> data> localweb> www> create the folder ‘test-net-beans’ now there is the folder /nbproject

5. NetBeans> MAIN TOP MENU> File> New File> PHP> PHP File (empty php file)

6.
File Name: index
Folder: Browse the root folder or wherever you want, ‘Finish’, good! We have our first index.php! Congrats!

7. Write inside index.php:


<?php
/* 
 * My first index file
 */
echo "Hello World!";
?>

8. MAIN TOOLBAR> Play!

PHP Application with Existing Sources

0. Run NetBeans IDE

1. MAIN TOP MENU> File> New project> PHP Application with Existing Sources

2.
Project Name: TestNetBeans
Sources Folder: usually Programmi(x86)> EasyPHP> data> localweb> www> my-old-project
Project Name: my-old-project
PHP Version: the same of EasyPHP

3.
Run As: Local Web Site
Project URL: http://127.0.0.1/www/my-old-project/
NOTE: you can modify later at File> Project Properties> Run Configuration> Project URL
Index Folder: index.php or other

Debug

1. NetBeans> MAIN TOP TOOLBAR> Debug Project, it will open a page like this: ‘http://127.0.0.1/www/my-website-folder/index.php?XDEBUG_SESSION_START=netbeans-xdebug

2. MAIN TOOL BAR> ‘Step Into'(F7) to debug step by step

Resume

The combination of tools is simple:

1. Easy PHP acts like a webserver, run Apache, PHP and MySQL in a sandbox and hosts the web site inder /www/mysite folder
2. NetBeans create a project file inside /www/mysite/nbproject and manages/edits .php files inside /www/mysite folder

NeBeans IDE edit -> | /www folder of EasyPHP WAMP |

By |PHP, Web Design|Commenti disabilitati su PHP Development – Easy PHP – NetBeans IDE for noobs

CGI Scripting – How it works

CGI Scripting – How it works

What is CGI Scripting and how can I use it on my site?
Common Gateway Interface (CGI) is a standard method used to generate dynamic content on Web pages and Web applications.
In plain words inside your web server you will find a folder www/cgi-bin, here you can store executable files.

An ultra simple example:

Browser send -> www.your.com/your.html -> Static Content
Browser send -> www.your.com/your.php -> Dynamic content PHP language
Browser send -> www.your.com/cgi-bin/your.cgi -> Dynamic Content PERL/C Language

CGI scripts can be PERL (.pl) or C (.c)

Your web hosting have to allow CGI scripts!

Hello there!

We will get the same output “Hello there!” using the codes below;

simplest.html:


<html>
  <body>
     <h1>Hello there!</h1>
  </body>
</html>

It prints:

Hello there!

simplest.c:


#include <stdio.h>

int main()
{
  printf("Content-type: text/html\n\n");
  printf("<html>\n");
  printf("<body>\n");
  printf("<h1>Hello there!</h1>\n");
  printf("</body>\n");
  printf("</html>\n");
  return 0;
}

I can use GCC (GNU Compiler Collection – https://gcc.gnu.org/) by saying: gcc simplest.c -o simplest.cgi, the output file is ‘simplest.cgi’.
I can upload simplest.cgi inside my server at www/cgi-bin and call it widt my browser typing www.your.com/cgi-bin/simplest.cgi

It prints:

Hello there!

Notice:


printf("Content-type: text/html\n\n");

The line “Content-type: text/html\n\n” is special piece of text that must be the first thing sent to the browser by any CGI script.
It sends: ‘Hey Browser, you have to consider that an html file’ :)
If you forget, the browser will reject the output of the script.

The perl code (http://perldoc.perl.org/index.html) here:

simplest.pl:


#! /usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><body><h1>Hello World!";
print "</h1></body></html>\n";

Place the file into your cgi-bin directory. On a UNIX machine, it may help to also type:
chmod 755 simplest.pl

This tells UNIX that the script is executable.

Counter

count.c:


#include <stdio.h>

int incrementcount()
{
  FILE *f;
  int i;

  f=fopen("count.txt", "r+");
  if (!f)
  {
     sleep(1);
     f=fopen("count.txt", "r+");
     if (!f)
       return -1;
  }

  fscanf(f, "%d", &i);
  i++;
  fseek(f,0,SEEK_SET);
  fprintf(f, "%d", i);
  fclose(f);
  return i;
}

int main()
{
  printf("Content-type: text/html\n\n");
  printf("<html>\n");
  printf("<body>\n");
  printf("<h1>The current count is: ")
  printf("%d</h1>\n", incrementcount());
  printf("</body>\n");
  printf("</html>\n");
  return 0;
}

Compile it by typing: gcc count.c -o count.cgi

Create another text file named count.txt and place a single zero in it. By placing counter.cgi and count.txt in the cgi-bin directory, you can run the script. All that the script does is generate a page that says, “The current count is: X,” where X increments once each time you run the script. Try running it several times and watch the content of the page change!

The count.txt file holds the current count, and the little incrementcount() function is the function that increments the count in the count.txt file. This function opens the count.txt file, reads the number from it, increments the number and writes it back to the file. The function actually tries to open the file twice. It does that just in case two people try to access the file simultaneously. It certainly is not a foolproof technique, but for something this simple it works. If the file cannot be opened on the second attempt, -1 is the error value returned to the caller. A more sophisticated program would recognize the -1 return value and generate an appropriate error message.

Reference:
http://it.wikipedia.org/wiki/Common_Gateway_Interface
http://computer.howstuffworks.com/cgi.htm

By |Web Design|Commenti disabilitati su CGI Scripting – How it works

My Best Free Webmaster Tools

Hi All,
some free tools I made and I use every day to develop faster.
I hope it is useful :)

1. EasyColor Scheme Generator
2. Dummy Text Generator
3. HTML Color Names
4. HTML Symbol Entities
5. Iso Latin 1 Codes
6. Hiragana Codes
7. HTTP Status Codes

———————————————
1. EasyColor Scheme Generator
http://www.lucedigitale.com/blog/easy-color-scheme-generator-online/

Pic a color and get the color scheme!

Support:
-Triad
-Tetrad
-Analogous
-Monochromatic
———————————————
2. Dummy Text Generator
http://www.lucedigitale.com/blog/dummy-text-generator-online/

Ultra easy to use dummy text generator

Support:
-Lorem ipsum latin
-Cicero latin
-Kakfa en
-Kafka fr
-Kafka de
-Kafka es
-Kafka it

Characters Cutter Function.
———————————————-
3. HTML Color Names
http://www.lucedigitale.com/blog/html-color-names-complete-list/

Interactive table with seach function for HTML color names

Support:
-Color Name
-Hec Code
-Decimal Code
———————————————
4. HTML Symbol Entities
http://www.lucedigitale.com/blog/html-symbol-entities-complete-list/

Interactive table with seach function for HTML symbol entities

Support:
-Decimal
-Hexadecimal
-Entity number
-Entity name
-Symbol
-Description
———————————————
5. Iso Latin 1 Codes
http://www.lucedigitale.com/blog/html-character-entities-iso-latin-1-codes-extended-ascii-table/

Interactive table with seach function for HTML character entities

Support:
-Decimal
-Hexadecimal
-Binary
-Symbol
-HTML Number
-HTML Name
-Description
———————————————
6. Hiragana Codes
http://www.lucedigitale.com/blog/hiragana-syllable-entity-codes/

Interactive table with seach function for Hiragana syllable entity codes

Support:
-Character Name
-Character
-Entity
-Hex Entity
———————————————
7. HTTP Status Codes
http://www.lucedigitale.com/blog/http-status-codes/

Interactive table with seach function for HTTP status codes

Support:
-Error Number
-Description
———————————————

By |Web Design|Commenti disabilitati su My Best Free Webmaster Tools

Best Data Recovery Raid Software

Best Data Recovery Raid Software

RAID (originally redundant array of inexpensive disks; now commonly redundant array of independent disks) is a data storage virtualization technology that combines multiple disk drive components into a logical unit for the purposes of data redundancy or performance improvement.

The term “RAID” was invented by David Patterson, Garth A. Gibson, and Randy Katz at the University of California, Berkeley in 1987

virtual-data-rooms

Data is distributed across the drives in one of several ways, referred to as RAID levels, depending on the specific level of redundancy and performance required. The different schemes or architectures are named by the word RAID followed by a number (e.g. RAID 0, RAID 1). Each scheme provides a different balance between the key goals: reliability, availability, performance, and capacity. RAID levels greater than RAID 0 provide protection against unrecoverable (sector) read errors, as well as whole disk failure.

RAID levels

RAID 0
RAID 0 consists of striping, without mirroring or parity. The capacity of a RAID 0 volume is the sum of the capacities of the disks in the set, the same as with a spanned volume. There is no added redundancy for handling disk failures, just as with a spanned volume. Thus, failure of one disk causes the loss of the entire RAID 0 volume, with reduced possibilities of data recovery when compared to a broken spanned volume. Striping distributes the contents of files roughly equally among all disks in the set, which makes concurrent read or write operations on the multiple disks almost inevitable. The concurrent operations make the throughput of most read and write operations equal to the throughput of one disk multiplied by the number of disks. Increased throughput is the big benefit of RAID 0 versus spanned volume.

RAID 1
RAID 1 consists of mirroring, without parity or striping. Data is written identically to two (or more) drives, thereby producing a “mirrored set”. Thus, any read request can be serviced by any drive in the set. If a request is broadcast to every drive in the set, it can be serviced by the drive that accesses the data first (depending on its seek time and rotational latency), improving performance. Sustained read throughput, if the controller or software is optimized for it, approaches the sum of throughputs of every drive in the set, just as for RAID 0. Actual read throughput of most RAID 1 implementations is slower than the fastest drive. Write throughput is always slower because every drive must be updated, and the slowest drive limits the write performance. The array continues to operate as long as at least one drive is functioning.

RAID 2
RAID 2 consists of bit-level striping with dedicated Hamming-code parity. All disk spindle rotation is synchronized and data is striped such that each sequential bit is on a different drive. Hamming-code parity is calculated across corresponding bits and stored on at least one parity drive.[9] This level is of historical significance only; although it was used on some early machines (for example, the Thinking Machines CM-2),[15] as of 2014 it is not used by any of the commercially available systems.

RAID 3
RAID 3 consists of byte-level striping with dedicated parity. All disk spindle rotation is synchronized and data is striped such that each sequential byte is on a different drive. Parity is calculated across corresponding bytes and stored on a dedicated parity drive.[9] Although implementations exist,[17] RAID 3 is not commonly used in practice.

RAID 4
RAID 4 consists of block-level striping with dedicated parity. This level was previously used by NetApp, but has now been largely replaced by a proprietary implementation of RAID 4 with two parity disks, called RAID-DP.

RAID 5
RAID 5 consists of block-level striping with distributed parity. Unlike in RAID 4, parity information is distributed among the drives. It requires that all drives but one be present to operate. Upon failure of a single drive, subsequent reads can be calculated from the distributed parity such that no data is lost. RAID 5 requires at least three disks.[9] RAID 5 is seriously affected by the general trends regarding array rebuild time and chance of failure during rebuild.[19] In August 2012, Dell posted an advisory against the use of RAID 5 in any configuration and of RAID 50 with “Class 2 7200 RPM drives of 1 TB and higher capacity” for business-critical data.

RAID 6
RAID 6 consists of block-level striping with double distributed parity. Double parity provides fault tolerance up to two failed drives. This makes larger RAID groups more practical, especially for high-availability systems, as large-capacity drives take longer to restore. As with RAID 5, a single drive failure results in reduced performance of the entire array until the failed drive has been replaced.[9] With a RAID 6 array, using drives from multiple sources and manufacturers, it is possible to mitigate most of the problems associated with RAID 5. The larger the drive capacities and the larger the array size, the more important it becomes to choose RAID 6 instead of RAID 5.[21] RAID 10 also minimizes these problems.

Best Recovery Software

For successful data recovery it’s essential to choose the right software. A useful list of most famous data recovery software.

Stellar Phoenix Windows Data Recovery

Fend off data loss with this immaculate Windows data recovery solution. The software comes as a rescuer in times when your precious photos, music, videos, documents, and other files get deleted accidentally or in a frenzy to free up storage.

Find more at: http://www.stellarinfo.com/

Virtual Lab

Regardless of the reason for data loss, accidental format, damaged partition, virus attack, deleted files, even a formatted hard drive, VirtualLab Data Recovery software does the job! VirtualLab is incredibly easy to use, yet so powerful and robust that it is used daily by data recovery companies world-wide. Works with all Windows operating systems, from Windows 98 to Windows 8, FAT 12/16/32 and NTFS file-systems. Forget having to use different software versions for different recoveries, VirtualLab does it all in one

Find more at: https://www.datarecoverysoftware.net

Data Recovery Wizard Free

EaseUS Data Recovery Wizard Free is the best free data recovery software to solve all data loss problems – recover lost files from hard drive, external hard drive, USB drive, Memory card, digital camera, mobile phone, music player and other storage media due to deleting, formatting, software crash, hard drive damage, virus attacking, partition loss or other unknown reasons. Only three steps and a few clicks to get whatever you lost back!

Find more at: http://www.easeus.com/

GetDataBack Simple

The simplest Data Recovery Software ever. Lightning fast, for FAT and NTFS. You can recover it now. GetDataBack Simple’s user interface is so simple, it enables even the most inexperienced users to conduct their own data recovery with just one click. Our developers have combined decades of data recovery experience with the newest technologies. GetDataBack Simple recovers files from Windows drives when the data is no longer accessible due to formatting, partitioning, virus attack, power or software failure.

Find more at: https://www.runtime.org

MiniTool Power Data Recovery Free Edition

Power Data Recovery is a professional File Recovery Software and Data Recovery Software. Power data recovery software could help you recover all your data no matter the data is lost by accidental deletion, format, re-partition, system crash or virus attack.
Find more at: http://www.powerdatarecovery.com/

File Scavenger – Data Recovery Utility

File Scavenger® Version 4 is a file “undelete” and data recovery utility for Windows® 8, 7, Vista, Server 2003, XP and 2000. File Scavenger® can recover files that have been accidentally deleted (including files removed from the Recycle Bin, in a DOS window, from a network drive, from Windows Explorer with the SHIFT key held down) provided that recovery is attempted before the files are permanently overwritten by new data. File Scavenger® supports both basic and dynamic disks, NTFS compression, alternate data streams, sparse files, Unicode filenames, etc. Except in severe cases, both the file and the folder path leading to the file can be recovered.

Find more at: http://www.quetek.com/

iRecover – Recover data from just about anything

iRecover is the most complete data recovery program available. In addition to outstanding recovery capabilities, it offers everything a data recovery engineer could ask for: two-pass disk cloning (with reverse cloning), a disk viewer that interprets disk structures, automatic RAID0 and RAID5 parameter detection and access to S.M.A.R.T. data to review a disk’s physical status.

Find more at: http://www.diydatarecovery.nl/

By |Server|Commenti disabilitati su Best Data Recovery Raid Software