This is the English Sample 1 page.blah blah
public class EnhancedFor
{
public static void main(String[] args)
{ int[] list ={1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int sum = sumListEnhanced(list);
System.out.println("Sum of elements in list: " + sum);
System.out.println("Original List");
printList(list);
System.out.println("Calling addOne");
addOne(list);
System.out.println("List after call to addOne");
printList(list);
System.out.println("Calling addOneError");
addOneError(list);
System.out.println("List after call to addOneError. Note elements of list did not change.");
printList(list);
}
// pre: list != null
// post: return sum of elements
// uses enhanced for loop
public static int sumListEnhanced(int[] list)
{ int total = 0;
for(int val : list)
{ total += val;
}
return total;
}
// pre: list != null
// post: return sum of elements
// use traditional for loop
public static int sumListOld(int[] list)
{ int total = 0;
for(int i = 0; i < list.length; i++)
{ total += list[i];
System.out.println( list[i] );
}
return total;
}
// pre: list != null
// post: none.
// The code appears to add one to every element in the list, but does not
public static void addOneError(int[] list)
{ for(int val : list)
{ val = val + 1;
}
}
// pre: list != null
// post: adds one to every element of list
public static void addOne(int[] list)
{ for(int i = 0; i < list.length; i++)
{ list[i]++;
}
}
public static void printList(int[] list)
{ System.out.println("index, value");
for(int i = 0; i < list.length; i++)
{ System.out.println(i + ", " + list[i]);
}
}
}
here is some js:
<!DOCTYPE html>
<html>
<head>
<title>Simple Map</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
async defer></script>
</body>
</html>
this is the english version…
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ‘Content here, content here’, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ‘lorem ipsum’ will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
sample | table |
---|---|
row 1 | row 1 |
row 2 | row 2 |