Posts

Showing posts from 2015

Learn Java - Random class

Image
The java.util.Random class instance is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula.The algorithms implemented by class Random use a protected utility method that on each invocation can supply up to 32 pseudorandomly generated bits. Commonly used methods of Random class There is a list of commonly used Scanner class methods: Method Description protected int next(int bits) This method generates the next pseudorandom number. boolean nextBoolean() This method returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence. void nextBytes(byte[] bytes) This method generates random bytes and places them into a user-supplied byte array. double nextDouble() This method returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence. float nextFloat() This method return...

learn java - Scanner class

Image
The java.util.Scanner class is one way to read data enter by the user, using an appropriate input device such as keyboard. The  Java Scanner  class breaks the input into tokens using a delimiter that is whitespace bydefault. It provides many methods to read and parse various primitive values.  Commonly used methods of Scanner class There is a list of commonly used Scanner class methods: Method Description public String next() it returns the next token from the scanner. public String nextLine() it moves the scanner position to the next line and returns the value as a string. public byte nextByte() it scans the next token as a byte. public short nextShort() it scans the next token as a short value. public int nextInt() it scans the next token as an int value. public long nextLong() it scans the next token as a long value. public float nextFloat() it scans the next token as a float value. public double nextDouble() it scans the next token as a dou...

Car Wash System vb.net

Image
This software consists of a database that save the registration number of every vehicle being wash along side with the date, type of wash made and price Screen Shot Source Code To view records in the database: Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\washRcd.accdb;Persist Security Info=False") Dim sql As String sql = " SELECT * FROM tblwash" conn.Open() Dim dt As New DataTable Dim cmd2 As New OleDb.OleDbDataAdapter(sql, conn) cmd2.Fill(dt) DataGridView1.DataSource = dt DataGridView1.Refresh() conn.Close() To insert new record in the database: Private Sub insert() Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\washRcd.accdb;Persist Security Info=False") Dim updateSql As String = String.Format(...

VB.net Deployment using installShield in visual studio 2013

Image
The following steps will illustrate how to deploy applications using intallShield software in Visual Studio 2013. First you need to download the installShield software and install it. Click here  to register and download installShield at Flexera software company. Step 1 Open you application and on the solution explorer panel right click on solution name to bring the context menu select ADD and then select NEW PROJECT Step 2 After selecting NEW PROJECT a windows will appear on the left panel select SETUP AND DEPLOYMENT under other project types. Add an appropriate name and select the location Step 3 The project assistant start up page will open, follow the instruction and click next then on the application information page select  GENERAL INFORMATION on the left panel. Change the user software identification tag to no Return to the previous screen and change company name, application name, website of the company and you can also selec...

Database System using Microsoft Access 2007

Image
With the help of my class mate Arshaad Waresh Allee, we were assigned to design a database management system using Microsoft Access 2007 and MySql. we designed an interface to interact with the database with some objects like Customers, Suppliers , Items , Repairs and so on Screenshots the following screenshots are reports that are generated automatically using Microsoft Access: The following are list of forms, queries and tables Download Click on the link below to download the game or source code: Program

C# BMI calculator

Image
A small program using c# language where the user will have to enter the weight in Kilogram and height in Centimeter. Below are some screenshots of the application and a sample source code Screen Shot Source Code public partial class MainProgram : Form { double V_weight; double V_height; double V_result; public MainProgram() { InitializeComponent(); } private void textBox1_TextChanged(object sender, EventArgs e) { label3.Visible = false; } private void textBox2_TextChanged(object sender, EventArgs e) { label4.Visible = false; } private void button1_Click(object sender, EventArgs e) { label5.Visible = true; if (weight_txtbx.Text == "") { MessageBox.Show("enter weight"); } else { V_weight =...

internet programming two

Image
In this module learned how to design a more dynamic and more responsive website alongside with including a database into the website to store personal information about every users who wish to register in the website. please note that all sensitive data are kept private and confidential Common languages i used in developing this website are: HTML with css3, ASP.net, VB.net, JAVASCRIPT, SQL   This is the first time that i was introduced to visual studio. our lecturer encouraged to use the latest version 2013 but due to the fact that our pc/ laptop was not powerful enough we had to use visual studio 2010 ultimate version click on the link below to download the source code:

internet programming

Image
here is my assignment on internet programming one at UTM(university of technology) in other to better understand HTML, javascript and css you can download it for free and can be used as template as the better way of learning is sharing : open the link below to download the source code: