Skip to content

Instantly share code, notes, and snippets.

View simars's full-sized avatar

Simar Paul Singh simars

View GitHub Profile
@simars
simars / kyebase.md
Created February 22, 2020 19:35
keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

System Performance

Build Fuel Tune

Simar Singh
simar.singh@redknee.com
learn@ssimar.com
<ul>
<li *ngFor="let item of items; let i = index">
<strong [style.color]="item.color">{{item.id}} | {{item.name}}</strong>
<input size="100%" [value]="values[i]" (input)="values[i] = $event.target.value" >
</li>
</ul>
<ul>
<li *ngFor="let itemTrackBy of items; trackBy: trackByFn; let i = index">
<strong [style.color]="itemTrackBy.color" >{{itemTrackBy.id}} | {{itemTrackBy.name}}</strong>
<input size="100%" [value]="values[i]" (input)="values[i] = $event.target.value">
</li>
</ul>
@simars
simars / Controller304LastModifiedCache.java
Last active August 14, 2018 16:49
demonstrate the usage of WebRequest#checkNotModified and ResponseEntity.BodyBuilder.lastModified(..) for the dynamic content
@Controller
public class Controller304LastModifiedCache {
@ResponseBody
@RequestMapping(value = "/test2")
public String handle2 (WebRequest swr) {
if ( swr.checkNotModified( getResourceLastModified(swr), getETag(swr) ) ) {
//it will return 304 with empty body
return notModified(swr);