Skip to main content

Posts

Showing posts from November, 2011

ES6 101 - Map

ES6 101 - Map
ES6 Map is the topic of today’s post which also is the 11th in the ES6 101 Series. Map is going to be fairly easy, so before jumping into it, if you want to look at other features we have covered so far, here is a quick list for your reference.Fat Arrow FunctionsLexical Declarations - LetLexical Declarations - ConstSpread OPeratorTemplate LiteralRest OperatorDefault parametersDestructuringFor…ofSetNow let’s see what Map has to offer. As opposed to Set (which by the way, I highly recommend reading), Map saves values as key-value pair. Let’s see for ourselves how this works!Example of ES6 Mapvar dummyMap = newMap(); dummyMap.set("1"); // Method is set as against add in ES6 Setconsole.log(dummyMap); // [["1",null]] dummyMap.set("1", "one"); console.log(dummyMap); // [["1","one"]] dummyMap.set("2", "two").set("3","three"); console.log(dummyMap); // [["1","one&…

Quake Risk Assessment Application...

A GIS application has been designed to help the Chennai Corporation and the departments concerned to take quick decisions when a major earthquake strikes the city. The application has been prepared based on data collected as part of the seismic vulnerability screening of over 50,000 buildings with more than three floors by the civic body in association with the Centre for Disaster Mitigation and Management, Anna University. However, buildings in the defence areas were not covered in the seismic vulnerability screening.
           The civic body has started taking measures towards providing the GIS application to other agencies such as Fire and Rescue Services, Police and Home Guards. The GIS application could be used to find out if any of the residential or commercial buildings with three of more storeys are safe when an earthquake strikes. The number of buildings that are likely to be damaged with a particular magnitude of earthquake in the city could be estimat…