This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= hello world %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Loan { //declaring a public class called "Loan" | |
| double loanAmount; //I'm declaring a variable called "loanAmount" and setting it to the double-data-type. | |
| double yearlyRate; //I'm declaring a variable called "yearlyRate" and setting it to the double-data-type. | |
| double totalPrice; //I'm declaring a variable called "totalPrice" and setting it to the double-data-type. | |
| void totalCost(double newYearlyRate, double newLoanAmount) { //I'm creating a method named "totalCost" and passing in two arguments "newYearlyRate and newLoanAmount and declaring them both of type double. | |
| totalPrice = newLoanAmount * newYearlyRate; //I created a new variable called "totalPrice" and set it equal to the product of the arguments passed into the "totalCost" method. | |
| totalPrice = Math.round(totalPrice*100)/100.0; //Math.round(variableName) will round a number to it's nearest whole number. The number * 100 in addition to the Math.round coverts the number to an integer, and then when you divid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Loan { //declaring a public class called "Loan" | |
| double loanAmount; //I'm declaring a variable called "loanAmount" and setting it to the double-data-type. | |
| double yearlyRate; //I'm declaring a variable called "yearlyRate" and setting it to the double-data-type. | |
| double totalPrice; //I'm declaring a variable called "totalPrice" and setting it to the double-data-type. | |
| void totalCost(double newYearlyRate, double newLoanAmount) { //I'm creating a method named "totalCost" and passing in two arguments "newYearlyRate and newLoanAmount and declaring them both of type double. | |
| totalPrice = newLoanAmount * newYearlyRate; //I created a new variable called "totalPrice" and set it equal to the product of the arguments passed into the "totalCost" method. | |
| totalPrice = Math.round(totalPrice*100)/100.0; //Math.round(variableName) will round a number to it's nearest whole number. The number * 100 in addition to the Math.round coverts the number to an integer, and then when you divid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| public class NumberManipulation { | |
| double[] array; | |
| double minimum = Double.MIN_VALUE; | |
| double maximum = Double.MAX_VALUE; | |
| public void getMaximum(double... newArray) { | |
| array = newArray; | |
| for (int i = 0; i < array.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| public class NumberManipulation { | |
| double[] array; | |
| public double getMaximum(double [] newArray) { | |
| double minimum = Double.MIN_VALUE; | |
| array = newArray; | |
| for (int i = 0; i < array.length; i++) { | |
| if (array[i] > minimum) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% @block_busters.each_slice(3) do |slice| %> | |
| <div class="row"> | |
| <% slice.each do |movie| %> | |
| <div class="col-md-3"> | |
| <div class="card" style="width: 20rem;"> | |
| <img class="card-img-top" src="<%= movie.image_url %>" alt="Card image cap"> | |
| <div class="card-body"> | |
| <h4 class="card-title"><%=movie.title%></h4> | |
| <p class="card-text"><%=movie.rating%></p> | |
| <p class="card-text"><%=movie.description%></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="container"> | |
| <div class="row"> | |
| <% @block_busters.each_slice(3) do |slice| %> | |
| <% slice.each do |movie| %> | |
| <div class="card" style="width: 20rem;"> | |
| <img class="card-img-top" src="<%= movie.image_url %>" alt="Card image cap"> | |
| <div class="card-body"> | |
| <h4 class="card-title"><%=movie.title%></h4> | |
| <p class="card-text"><%=movie.rating%></p> | |
| <p class="card-text"><%=movie.description%></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this throws a "newLatLngBounds, int) exception" error on line 14 | |
| mMap = googleMap; | |
| ArrayList<MyPoint> points = Data.getPoints(); | |
| LatLngBounds.Builder builder = new LatLngBounds.Builder(); | |
| PolylineOptions polylineOptions = new PolylineOptions(); | |
| for (int i = 0; i < points.size(); i++) { | |
| MyPoint point = points.get(i); | |
| polylineOptions.add(new LatLng(point.getLat(), point.getLng())); | |
| builder.include(new LatLng(point.getLat(),point.getLng())); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this throws a "newLatLngBounds, int) exception" error on line 14 | |
| mMap = googleMap; | |
| ArrayList<MyPoint> points = Data.getPoints(); | |
| LatLngBounds.Builder builder = new LatLngBounds.Builder(); | |
| PolylineOptions polylineOptions = new PolylineOptions(); | |
| for (int i = 0; i < points.size(); i++) { | |
| MyPoint point = points.get(i); | |
| polylineOptions.add(new LatLng(point.getLat(), point.getLng())); | |
| builder.include(new LatLng(point.getLat(),point.getLng())); | |
| } |
OlderNewer