What does Error converting data type to numeric means?
You must have declared a method which tries to convert a variable/field value into a numeric value but that is not possible. Refer to the line on which the error is found and remove the method which tries to convert the variable/field.
Note: Java allows type casting so a string cannot be converted into integer even if a method tries to change the value
How do you write multiplication table program in php?
// example of 1..12x12 table
for($i = 1; $i <= 12; $i++)
{
for($j = 1; $j <= 12; $j++)
{
print ($i * $j) ." ";
}
print "\n";
}
How do you write a program to print prime numbers from 1 to 50 in PHP?
The following PHP Code will display the prime numbers between 2 and 50.
You know that 1 is not a prime number so edit the value for "first for loop" according to your requirements (you can also do it for 2 to 1000 or from 900 to 929)
Output will be:
2is a prime number
3is a prime number
5is a prime number
7is a prime number
11is a prime number
13is a prime number
17is a prime number
19is a prime number
23is a prime number
29is a prime number
31is a prime number
37is a prime number
41is a prime number
43is a prime number
47is a prime number
for($i=2;$i<=50;$i++)
{
$flag=0;// assume prime
for($j=2;$j<=sqrt($i);$j++)
if(($i%$j)==0)
{
$flag=1;
break;
}
if($flag==0)
echo $i."is a prime number
";//
for jumping to next line after displaying this line..
}
?>
2013-02-22: Replaced $i/2 with sqrt($i) for efficiency by Ryankirgan
The post method used to send data from HTML to php is not working.?
good guess is you have one of the following errors/mistakes/bugs:
just to name a few
How can you embed a Java program in PHP webpage?
In the output stream (i.e. using echo), output an "embed" tag (or if using older HTML, the "applet" tag). Note that the Java will run on the client, not on the server, meaning that PHP variables, etc, will not be available to it.
Where do you type JavaScript in?
It can be done in any text editor, if you're new to it, just try using Notepad. Of course, there are many IDEs for Javascript -- look up "Aptana".
What are input processes for the Currency Conversion project?
It really depends where are you inputs coming from.
From the keyboard by prompting the user:
import java.util.Scanner;
System.out.print("input: ");
Scanner scan = new Scanner(System.in);
int input = scan.nextInt();
// Do your converting with the input
From a file:
import java.io.FileReader;
import java.util.Scanner;
Scanner scan = new Scanner(new FileReader("inputFile.dat"); // the input data file
int input = scan.nextInt(); //similar to reading from keyboard since the file is now your input source
//Do your converting
scan.close(); // remember to close your files that you opened, good Java conventions
Is Buck McHenry a real Negro player?
No, Buck McHenry was a fictional Negro League Baseball star in the book Finding Buck McHenry.
Difference between blank space and white space?
In computer programming, these two terms are interchangeable.
Why do you need to use bootstrap What is the advantage and disadvantage of using bootstrap?
Without a bootstrap it would be impossible to boot a computer system but that's not really an advantage, it's a fundamental aspect of any computer system.
The term "bootstrap" derives from the phrase: "to lift oneself up by one's own bootstraps". This is clearly an impossibility, not unlike standing in a carrier bag and then trying to lift the bag with you still in it; it can't be done. However, as we'll see, it is an apt phrase when it comes to initialising a computer system and provides the origin of terminology such as "boot process" and "bootup".
On any computer system, most software is loaded and executed by other software that has previously been loaded and executed. For instance, the BIOS (Basic Input/Output System) performs some essential checks upon the system hardware before loading and executing the boot loader which loads and executes a chosen (or default) operating system, at which point the user can logon and subsequently load and execute their own choice of programs.
But given that we require a program or operating system in order to load and execute other programs, this presents us with a paradox during initial bootup. How does the very first program load and execute if there is no program present to load and execute it? The answer lies in the bootstrap. The bootstrap is a machine-code program that is permanently written to a read-only memory chip (ROM). Being read-only, the bootstrap cannot be changed other than by replacing the chip itself. Unlike programs stored in RAM (Random Access Memory), ROM programs do not require power to maintain state. Thus when power is restored to the system, the bootstrap is already in memory and can be executed automatically, at which point the bootstrap takes control of the system. Typically, a bootstrap will simply locate, load and execute the system's BIOS program which takes care of the POST (Power-On Self-Test) and prepares the system to load and execute the boot loader which takes care of the bulk of the boot process until the system is ready to load and execute an operating system, at which point the system has effectively lifted itself up by its own bootstraps.
How do you write a password script using JavaScript in PHP with a form?
This question is too broad, be more specific.
What is the main reason for not using mysql functions in PHP?
The mysql_ functions were deprecated for a number of reasons:
A foreach loop takes an array, and goes through the loop you specify - each time, it goes to the next index of the array. When it has gone through every index, the script continues. This can be useful to retrieve data from a database, and insert it into a table, list, or into general content space, or to easily manipulate all the data in an array. The syntax varies depending on the programming language you are using.
What is the relationship between MVC and 3-tier architecture?
At first glance, the three tiers may seem similar to the model-view-controller (MVC) concept; however, topologically they are different. A fundamental rule in a three tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all communication must pass through the middle tier. Conceptually the three-tier architecture is linear. However, the MVC architecture is triangular: the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model.
What is difference between random file access and sequencial flle access in c?
There is no difference in the files, only in the way they are accessed. Sequential files are accessed just like they sound, sequentially, which means the if you want to read something that starts at byte number 40,000, you have to read and ignore the first 39,999 bytes. Random-access files, however, allow you to go directly to the exact location you want.
Sequential access is normally used if the file is stored on a medium which doesn't allow random access. For example, if the file is stored on tape, you have to start reading from the beginning of the tape, until you get to the location you want. If you're using a hard disk, however, the head that reads and writes the disc can be moved directly to the portion of the file you want, making it faster to get the data you want.
How do you leave comment on php code?
There are 3 styles of PHP comments
// comment a single line
# comment a single line (perl-style
/*
comment block
*/
What are the limitations of PHP jabbers restaurant booking system?
Your hosting account must support PHP 4.1 and MySQL 4.1. See the related link for further information.
User licenseDeveloper licensePHP4.1 or more4.1 or moreMySQL4.1 or more4.1 or more
Data flow diagram for railway reservation?
RAILWAY RESERVATION SYSTEM
This system is basically concerned with the reservation and cancellation of railway tickets to the passengers. The need of this system arose because as is the known fact that India has the largest railway network in the whole of the world and to handle it manually is quite a tough job. By computerizing it, we will be able to overcome many of its limitations and will be able to make it more efficient. The handling of data and records for such a vast system is a very complex task if done manually but it can be made much easier if the system is computerized.
To be more specific, our system is limited in such a way that a train starting from a particular source will have a single destination.
The basic functions being performed by our system are reservation and cancellation. These functions will be handled with the help of following sub functions: -
Ñ It reserves and cancels seats for the passenger.
Ñ It contains information about the trains.
Ñ It contains information about the passenger.
Ñ It contains the details of reservation fees, any concessions etc.
Ñ It makes entries for reservation, waiting, cancelled tickets.
Ñ It will update for uptime and downtime trains.
Index:-
· System Specification
§ Security
§ Limitation of Executing System
· Data Flow Diagrams
· Description of Flow Chart
· Entity Relationship Diagrams
· Feasibility Study
· Introduction of Feasibility study
· Summary
· Testing
· Debugging
· Conclusion
· Reference
SYSTEM SPECIFICATION
The railway network is a very vast system to be handled manually and its computerization will prove to be of great help to both the employees and the passengers.
SECURITY:-
From security point of view, authentication will be done by password checking. If correct password has been entered by the user, the user will get further access to the system, otherwise he will have to re-enter the password. The facility to change the password has also been provided but for that the user will have to first enter the old password. The password can be four characters long.
LIMITATIONS OF EXISTING SYSTEM: -
Ñ Data redundancy: It means that same data fields appear in many different files and often in different formats. In manual system, it poses quite a big problem because the data has to be maintained in large volumes but in our system, this problem can be overcome by providing the condition that if the data entered is duplicate, it will not be entered, otherwise, updating will take place.
Ñ Difficulty in accessing the data: In manual system, searching information is time consuming but in our system, any information can be accessed by providing the primary key.
Ñ Unsatisfactory security measures: In manual system, no security measures were provided but in this system, password security has been provided. The person can access the system by providing the correct password otherwise he is denied the access.
DATA FLOW DIAGRAMS
The data flow diagram is a graphical representation that depicts information flow and the transforms that are applied as data moves from input to output. The DFD may be used to represent a system or software at any level of abstraction. In fact DFD may be partitioned into levels that represent increasing information flow and functional detail.
The level 0 DFD or a context model represents the entire software element as a single bubble with input and output data indicated by incoming and outgoing arrows, respectively.
In level 0 diagram shown below, the passenger fills either the reservation or cancellation form as input. He gets the ticket as the output and the report is sent to the administration.
Up/down train info
Fill cancellation form
Passenger
Admin
Fill reservation form resva/cancle info
Ticket info passenger info
Waiting info
Level - 1 data flow diagram
Up Storage
Down Storage
A level 1 DFD is the furthur refinement of level 0 DFD showing greater details and functionalities. In this, the single bubble of level 0 DFD is refined furthur . Each of the processes depicted at level 1 is a subfunction of the overall system depicted in the context model.
As shown in the DFD above, the passenger either enquires about the trains or goes directly for the reservation or the cancellation processes as a result of which he gets the ticket generated. The reports are then sent to the administration.
Level 2 DFD
Cancel table
Reservation table
Waiting table
The level 2 DFD is the further refinement of the level 1 DFD. As shown in the DFD above the passenger has many options like he can directly go to the reservation counter or can first inquire and then go to the reservation counter or he can just inquire and return back. If the passenger wants reservation then the seats are checked for availability and if the seats are available the confirmation ticket is generated otherwise he is asked for waiting and waiting ticket is generated if he wants. If the user wants tickets to be cancelled he is given the cancellation ticket and the reports of all the transactions are sent to the administrator.
DESCRIPTION OF FLOW CHART
The program flowchart shows how the system proceeds from the input form to the output form of the system. It explains how the system is actually processed step by step .It represents the flow of control as the system is processed.
There are three types of program flow chart:
1. Input flow chart: This flowchart depicts the basic input operations in the system. In railway reservation system, first of all the password is checked then if the password is valid then we process the input form if the data is valid then the entries are updated in the data base otherwise the form is refilled.
2. Output flow chart: This flowchart depicts the basic output operations in the system. The user is required to enter t
he criteria for output. If it is for the reservation then the availability if seats is checked. If the seats are available then the confirmed ticket is generated otherwise the user is asked for waiting and if he wants then waiting ticket is generated. If the user wants the seat to be cancelled it is done and the cancelled ticket is generated for the user. The information about all the above transactions is then transferred to the related databases.
3. Report flow chart: This flowchart depicts the basic operations for the generation of reports. If the entries from the processed database are valid the concerned reports are generated otherwise the process will have to be repeated.
No
Yes
Reservation database is updated
INPUT FLOW CHART
ENTITY RELATIONSHIP DIAGRAM
Entity relationship diagram expresses the overall logical structure of a database graphically. It shows the relationship between different entities. The entities can have composite, multivolume or derived attributes. The entities and their attributes are: -
1 Passenger
#. Name
*. First name
*. Middle name
*. Last name
#. Gender
#. Address
*. House no.
*. Street
*. City
#. Age
#. Phone no.
2 Form
#. Form no.
3 Ticket
#. Ticket no.
*. Waiting
*. Confirmed
*. Cancelled
4 Reservation counter
5 Administrator
6 Train
#. Train no
#. Train name
#. Source
#. Destination
7 Seat
#. Seat no.
#. Compartment no.
The relationships between different entities are: -1. Fill: The passenger fills the form.2. Submit: The form is submitted to the reservation counter.
3. Check: The reservation counter checks the seats.
4. Generate: Reservation counter generates the ticket.
5. Issue: Reservation counter issues ticket to the passenger.
6. Send info: The reservation counter sends information to the administrator.
7. Allotted: The seat is allotted in the train.
Symbols
Meanings
Data flow
Process
Data store
Entity
ENTITY RELATIONSHIP DIAGRAMOUTPUT FLOWCHART
REPORT FLOWCHART
FEASIBILITY STUDY
An initial investigation in a proposal that determines whether an alternative system is feasible. A proposal summarizing the thinking of the analyst is presented to the user for review. When approved, the proposal initiates feasibility study that describes and evaluates candidate systems and provides for the selection of best system that meets system performance requirements.
To do a feasibility study, we need to consider the economic, technical factors in system development. First a project team is formed. The team develops system flowcharts that identify the characteristics of candidate systems, evaluate the performance of each system, weigh system performance and cost data and select the best candidate system for the job. The study culminates in a final report to the management.
By the end of this chapter you should know:
1. The steps in defining system performance.
2. What key considerations are involved in feasibility analysis?
3. How to conduct a feasibility study?
INTRODUCTION
1. Describe and identify characteristics of candidate systems.
2. Determine and evaluate performance and cost effectiveness of each candidate system.
4. Weigh system performance and cost data.
5. Select the best candidate system.
SUMMARY
1. A feasibility study is conducted to select the best system that meets performance requirements. This entails an identification description, an evaluation of candidate systems, and the selection of the best system for the job.
2. A statement of constraints, the identification of specific system objectives and a description of outputs define a system's required performance. The analyst is then ready to evaluate the feasibility of candidate systems to produce these outputs.
3. Three key considerations are involved in feasibility analysis: economic, technical and behavioral.
4. There are eight steps in feasibility study:
a. STATEMENT OF CONSTRAINTS
Constraints are factors that limit the solution of a problem. Some constraints are identified during the initial investigation
b. IDENTIFICATION F SPECIFIC SYSTEM OBJECTIVES
Once the constraints are spelled out, the analyst proceeds to identify the system's specific performance objectives. They are derived from the general objectives specified in the project directive at the end of the initial investigation. The steps are to state the system's benefits and then translate them into measurable objectives.
c. DESCRIPTION OF OUTPUTS
A final step in system performance definition is describing the output required by the user. An actual sketch of the format and contents of the reports as well as a specification of the media used, their frequency, size and numbers of copies required are prepared at this point.
d. FEASIBILITY CONSIDERATIONS
Three key considerations are involved in the feasibility analysis:
1. Economic feasibility
2. Technical feasibility
3. Behavioral feasibility
Testing and Debugging
Testing:
Testing is the process of exercising software with the intent of finding errors and ultimately correcting them. The following testing techniques have been used to make this project free of errors.
Content ReviewThe whole content of the project has been reviewed thoroughly to uncover typographical errors, grammatical error and ambiguous sentences. Navigation ErrorsDifferent users were allowed to navigate through the project to uncover the navigation errors. The views of the user regarding the navigation flexibility and user friendliness were taken into account and implemented in the project. Unit TestingFocuses on individual software units, groups of related units.· Unit - smallest testable piece of software.
· A unit can be compiled /assembled / linked/loaded; and put under a test harness.
· Unit testing done to show that the unit does not satisfy the application and /or its implemented software does not match the intended designed structure.
· Integration is the process of aggregating components to create larger components.
· Integration testing done to show that even though components were individually satisfactory, the combination is incorrect and inconsistent.
System Testing Focuses on a complete integrated system to evaluate compliance with specified requirements (test characteristics that are only present when entire system is run)
· A system is a big component.
· System testing is aimed at revealing bugs that cannot be attributed to a component as such, to inconsistencies between components or planned interactions between components.
· Concern: issues, behaviors that can only be exposed by testing the entire integrated system (e.g., performance, security, recovery)
Each form encapsulates (labels, texts, grid etc.). Hence in case of project in V.B. form are the basic units. Each form is tested thoroughly in term of calculation, display etc.
Regression TestingEach time a new form is added to the project the whole project is tested thoroughly to rectify any side effects. That might have occurred due to the addition of the new form. Thus regression testing has been performed.Debugging:
Debugging is a consequence of successful testing. That is when a test care uncovers an error, debugging is the process that results in the removal of errors. There are mainly two types of debugging.
BacktrackingBacktracking is a fairly common debugging approach that can be used successfully in small programs. Beginning at the site where a symptom has been uncovered, the source code is traced backward until the site of the cause is found. Brute ForcingThis is the most common category of debugging which involves loading the source code with write statements and tracking line by line execution to isolate possible errors.Conclusion
Practical Training is a very important part of the curriculum as it strengthens the concepts and enhances knowledge about the practical implementation of all the theory concepts, we have learnt so far in different subjects.
This summer training helped us learn a lot. In this training we did the project on railway reservation system. This project is used to keep a track on reserving the seat to the passenger. It helps managing the system very efficiently and conveniently.
Finally, this gives us a lot of mental satisfaction that the project we have worked upon is a real time project, which will be installed at the customer site after some more session of regress testing.
Although the project work has been done in a complete and detailed manner but due to the constraint of time, we could not include some more features we wanted to. We left these features as a part of the future development. As soon as we'll get time we'll try to add them to my project.
Reference:-
v Henry F Korth, Abraham Silberschatz, ''Database system concepts'', McGrsw-Hill Internation editions, Computer Science Series (1991). Second Ed.
v Software Engineering ,McGrsw-Hill Internation editions
v www.Google.com.
Made By:-
Sunil Kumar Sharma
3rd Year (Computer Engineering)
Jaipur Engineering College, Kukas
E-mail: suniljoshi151@yahoo.in.
The function already exists in PHP and is even called max(); Otherwise use:
function max ($one, $two)
{
return $one > $two ? $one : $two;
}
Which is the best eCommerce application in PHP?
According to Top Ecommerce app development company WooCommerce is one of the best free ecommerce platforms that’s based on PHP programming language. It is an extension of WordPress CMS made by Jigoshop. WooCommerce commands more than 30% of the global market share. It can be easily installed even by a beginner while setting it up on any PHP Host is just a matter of seconds.. If you are using Cloudways, WooCommerce can be installed with just a single click. you can also make a WooCommerce multi-vendor marketplace with powerful SEO features. As it is used by more than 4 million retailers, it offers a huge repository of themes and plugins.
Can you use WordPress software to create a PHP website?
Well, Wordpress is written in (primarily) PHP, so any blog or website powered by Wordpress is technically a PHP based site, even though Wordpress also has some Javascript and other stuff in there.
How can you get the line breaks to work when you retrieve data from MySQL to PHP?
In most raw (not formatted) text, such as the text in a simple HTML input element, new lines are denoted by a special "newline" character (commonly referred to as \n). When the text reaches this character, it pulls the text following it to the next line.
For example, the string "hello\nworld" would actually appear as:
hello
world
When you submit and retrieve text data in MySQL, it preserves these newline characters as they were originally entered. When you print them onto an HTML page, you may notice that newline characters do not seem to "work" as you could expect them to. The previous string would actually appear as "helloworld", instead of being broken up into two lines.
This is because the string is printed into the HTML source code as "hello\nworld". Browsers are supposed to ignore most whitespace and newlines, which would give us the resulting "helloworld".
In HTML, new lines are created with the
element. When pulling raw text data from MySQL, you will probably want to replace any occurrences of newline characters (which is the raw text's way of creating new lines) with the
element (which is HTML's).
A function exists which easily makes the replacements. It is the nl2br() function, which (simply put) accepts one string as an argument (the text data to replace newline characters) and returns a string (the text data with \n replaced as
).
Example:
$string_taken_from_mysql = 'hello \n\n hello';
echo nl2br($string_taken_from_mysql);
?>
Outputs:
hello
hello