Describe briefly good web development practicies.
On the internet people need to feel secure, but they also need to be relaxed. A website should provide a worry free, safe, and simple experience to a user. For this reason it is important to make sure your website is secure if handling any kind of sensitive information by using some kind of SSL encryption. Also the functionality of a web page should be not only optimal, but reliable. This means nothing will randomly crash or break on the website during use even if the user is purposely trying to incorrectly use components. Beyond the technicalities of coding it is important that you develop your website with a plan and since web development often times involves building a system for a client it is important to not promise things that are not within your coding capabilities. Instead deliver the product they desire while also keeping in mind what is feasible.
In programming it is important to know the major algorithms and data structures used constantly in larger projects. Question: Please produce a functional bubble sort algorithm.
Sub BubbleSort (List() As Long, ByVal min As Integer, _ ByVal max As Integer) Dim last_swap As Integer Dim i As Integer Dim j As Integer Dim tmp As Long ' Repeat until we are done. Do While min < max ' Bubble up. last_swap = min - 1 ' For i = min + 1 To max i = min + 1 Do While i <= max ' Find a bubble. If List(i - 1) > List(i) Then ' See where to drop the bubble. tmp = List(i - 1) j = i Do List(j - 1) = List(j) j = j + 1 If j > max Then Exit Do Loop While List(j) < tmp List(j - 1) = tmp last_swap = j - 1 i = j + 1 Else i = i + 1 End If Loop ' Update max. max = last_swap - 1 ' Bubble down. last_swap = max + 1 ' For i = max - 1 To min Step -1 i = max - 1 Do While i >= min ' Find a bubble. If List(i + 1) < List(i) Then ' See where to drop the bubble. tmp = List(i + 1) j = i Do List(j + 1) = List(j) j = j - 1 If j < min Then Exit Do Loop While List(j) > tmp List(j + 1) = tmp last_swap = j + 1 i = j - 1 Else i = i - 1 End If Loop ' Update min. min = last_swap + 1 Loop End Sub Note Bubble sort is useful only in certain situations and other sorting algorithms may have a reduced run time in comparison depending on the applied situation.
1.) 22x+11 = 33 2.) 3x+y=5 7x-y=15
Problem 1: Solving for x we will first move 11 to the other side of the equation by subtracting it. This gives us 22x = 22. Then we will isolate the x variable by dividing both sides by 22 yielding x = 1, Problem is solved Problem 2: for a system of equations we have many different approaches. This particular system is handled easily by elimination. Notice we have a positive y in the first equation and negative y in the second equation. Lets add them together and we get 10x = 20. Now divide both sides by 10 to isolate the x variable. We get that x = 2. Now plug our x = 2 into the first equation to solve for our y variable. 3(2) + y = 5 6+y = 5 Substract 6 from the left hand side to isolate y y = -1 We have now solved our system. X = 2 and y = -1