Skip to content

Instantly share code, notes, and snippets.

View codeaholicguy's full-sized avatar
🎯
Focusing

Nguyễn Nhật Hoàng codeaholicguy

🎯
Focusing
View GitHub Profile
<blockquote>
<b>{{review.stars}} star(s)</b>
{{review.body}}
<cite>- {{review.author}}</cite>
</blockquote>
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-1 control-label">Email</label>
<div class="col-sm-6">
app.controller("ReviewController", function(){
this.review = {};
});
<form class="form-horizontal" name="reviewForm" ng-controller="ReviewController as reviewCtrl">
<blockquote>
<b>{{reviewCtrl.review.stars}} star(s)</b>
{{reviewCtrl.review.body}}
<cite>- {{reviewCtrl.review.author}}</cite>
</blockquote>
<div class="form-group">
<label class="col-sm-1 control-label">Email</label>
<div class="col-sm-6">
<form class="form-horizontal" name="reviewForm"
ng-controller="ReviewController as reviewCtrl"
ng-submit="reviewCtrl.addReview(product)">
app.controller("ReviewController", function () {
this.review = {};
this.addReview = function (product) {
product.reviews.push(this.review);
};
});
this.addReview = function(product) {
product.reviews.push(this.review);
this.review = {};
};
public V get(Object key) {
Node<K,V> e;
return (e = getNode(hash(key), key)) == null ? null : e.value;
}
static final int hash(Object key) {
int h;
return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);
}
List<Peron> people = new ArrayList<>();
public interface Stream<T> extends BaseStream<T, Stream<T>> {
// more code here
}
Stream<Person> peopleStream = people.stream();