ring

Measuring Principal Performance Is Hard - But We Need to Try

Principals have almost as much of an impact on student achievement as teachers do. Indeed, we found in a study of school reform in Washington, D.C., that replacing ineffective principals improves student achievement. But how do we distinguish good principals from bad ones?




ring

VisualizED: Comparing Schools with Benchmarks

The world of education is becoming inundated with data, and the growing use of technology in schools has made it even easier to collect and report data continuously.




ring

A council & its crises : challenge and response in Fremantle's community during three times of crisis : the Bubonic Plague, the Great War, and the Depression era / by Michelle McKeough

McKeough, Michelle, 1966- author




ring

Bearing witness : essays in honour of Brij V. Lal / edited by Doug Munro and Jack Corbett




ring

Recovering history through fact and fiction : forgotten lives / edited by Dallas John Baker, Donna Lee Brien and Nike Sulway




ring

California at war : the state and the people during World War I / Diane M.T. North

North, Diane M. T., author




ring

Clinical Trials during an infectious outbreaks: More questions than answers

The world is facing a pandemic of COVID-19, for which there is no effective therapy. And any new therapy can be used in medical practice only if its e




ring

[ASAP] Discovering New Lipidomic Features Using Cell Type Specific Fluorophore Expression to Provide Spatial and Biological Specificity in a Multimodal Workflow with MALDI Imaging Mass Spectrometry

Analytical Chemistry
DOI: 10.1021/acs.analchem.0c00446




ring

[ASAP] Breaking the Affinity Limit with Dual-Phase-Accessible Hotspot for Ultrahigh Raman Scattering of Nonadsorptive Molecules

Analytical Chemistry
DOI: 10.1021/acs.analchem.9b05727




ring

During Pandemic Italians Lower Baskets from Balcony to Feed Hungry

Pina Andelora and Angelo Picone are street musicians and activists, accustomed to engaging the passers-by on Spaccanapoli, the historic central street in the middle of Naples. Once the coronavirus hit Italy--and hit it hard--it left people like them without a means to contribute to the vibrancy of their ...




ring

India U-17 women’s football coach Dennerby hails players’ home fitness regime during lockdown

But before getting back to Sweden, he had given his wards a fitness regime to follow at their homes and checks on the players regularly.




ring

Chess: India held to draw against Europe after securing first win at Online Nations Cup

India beat Rest of the World 2.5-1.5 in the seventh round of the Online Nations Chess Cup before drawing against Europe on Friday.




ring

US: Ex-police officer, son charged with murdering unarmed African-American man over two months ago

The shooting, caught on video, drew a wave of anger from several people in the country.




ring

Remembering beloved movie stars: Be kind and rewind, but be open-eyed too

Perhaps one should be able to speak of the ills or even just the shortcomings along with the good and the superlatives.




ring

Football: Some players are still recovering from coronavirus, says AC Milan president Scaroni

The Lombardy club returned to individual training this week and are expecting Swedish star Zlatan Ibrahimovic to return in the coming days.




ring

How to not be mentally distressed during the lockdown: Read Virginia Woolf’s essay ‘On Being Ill’

‘However strange your experience, other people have had it too,’ wrote Woolf in this 1926 essay.




ring

[ASAP] Finite Systems under Pressure: Assessing Volume Definition Models from Parallel-Tempering Monte Carlo Simulations

The Journal of Physical Chemistry A
DOI: 10.1021/acs.jpca.0c00881




ring

Cancer Screening, Monitoring Down During Pandemic

Use of some cancer screening and monitoring tests came to 'a near standstill' in early April in the US, a new report indicates.
Medscape Medical News




ring

Challenges and Solutions in Evaluation Technical Assistance During Design and Early Implementation

This case study discusses two federal grant initiatives and the evaluation technical assistance (ETA) provided to the grantees.




ring

Supporting Child Welfare Agencies During COVID-19

Before the COVID-19 pandemic changed our daily lives, resource-constrained child welfare agencies across the country already faced challenges with implementing parts of the new Family First Prevention Services Act (FFPSA) of 2018.




ring

Agrarian capitalism and the development of the coffee industry in colonial Zimbabwe: 1900-1980 / by Takesure Taringana

Hayden Library - SB270.Z55 T37 2018




ring

Wanderings of a naturalist in India, the western Himalayas, and Cashmere / Andrew Leith Adams

Rotch Library - QH183.A2 2018




ring

Forests and sustainable cities: inspiring stories from around the world.

Rotch Library - SD131.F677 2018




ring

Latin American dendroecology: combining tree-ring sciences and ecology in a megadiverse territory / Marín Pompa-García, J. Julio Camarero, editors

Online Resource




ring

Bringing whales ashore: oceans and the environment of early modern Japan / Jakobina K. Arch

Hayden Library - SH383.5.J5 A73 2018




ring

Mouthwatering food pix to lift your Friday mood

Hemantkumar Shivsharan is making the most of the lockdown with these tempting home cooked meals.




ring

PIX: What kids learned during the lockdown

Rediff readers sent us these pictures to show how their kids are making the most of the lockdown.




ring

Engineering interfacial entropic effects to generate giant viscosity changes in nanoparticle embedded polymer thin films

Soft Matter, 2020, 16,4065-4073
DOI: 10.1039/D0SM00019A, Paper
Aparna Swain, Nafisa Begam, Sivasurender Chandran, M. S. Bobji, J. K. Basu
We demonstrate a new method to study the viscosity of PNC thin films, consisting of polymer grafted nanoparticles (PGNPs) embedded in un-entangled homopolymer melt films, using atomic force microscopy based force–distance spectroscopy.
The content of this RSS Feed (c) The Royal Society of Chemistry




ring

The generic unfolding of a biomimetic polymer during force spectroscopy

Soft Matter, 2020, 16,3941-3951
DOI: 10.1039/C9SM02545F, Paper
Aviel Chaimovich, Christian Leitold, Christoph Dellago
By computing free energies with molecular simulations, we find a general signature for protein unfolding in force spectroscopy, and in turn, we present a useful formula for experimentalists.
The content of this RSS Feed (c) The Royal Society of Chemistry




ring

Layering of bidisperse charged nanoparticles in sedimentation

Soft Matter, 2020, Accepted Manuscript
DOI: 10.1039/D0SM00588F, Communication
Open Access
Xufeng Xu, Maarten Biesheuvel, Helmut Cölfen, Evan Spruijt
Binary mixtures of charged nanoparticles become layered upon centrifugation as a result of minimization of the system free energy in sedimentation-diffusion equilibrium. Different factors were investigated experimentally for their effects...
The content of this RSS Feed (c) The Royal Society of Chemistry




ring

Simultaneous determination of interfacial molarities of an alcohol, bromide ion, and water during an alcohol induced microstructural transition: The difference between medium and long chain alcohols.

Soft Matter, 2020, Accepted Manuscript
DOI: 10.1039/D0SM00665C, Paper
Kaixin Yao, Lijie Sun, Xiaoxuan Ding, Yuzhao Wang, Tianze Liu, Changyao Liu, Jiajing Tan, Li Zhao, Baocai Xu, Laurence S. Romsted
The transitions between surfactant aggregate structures are triggered by changes in chemical or physical stimulations, including addition of additives. Effects of added alcohols on aggregate morphologies correlate strongly with alcohol...
The content of this RSS Feed (c) The Royal Society of Chemistry




ring

Ordering of binary colloidal crystals by random potentials

Soft Matter, 2020, 16,4267-4273
DOI: 10.1039/D0SM00208A, Paper
André S. Nunes, Sabareesh K. P. Velu, Iryna Kasianiuk, Denis Kasyanyuk, Agnese Callegari, Giorgio Volpe, Margarida M. Telo da Gama, Giovanni Volpe, Nuno A. M. Araújo
A random potential can control the number of defects in a binary colloidal crystal.
The content of this RSS Feed (c) The Royal Society of Chemistry




ring

Vesicle adhesion in the electrostatic strong-coupling regime studied by time-resolved small-angle X-ray scattering

Soft Matter, 2020, 16,4142-4154
DOI: 10.1039/D0SM00259C, Paper
Open Access
Karlo Komorowski, Jannis Schaeper, Michael Sztucki, Lewis Sharpnack, Gerrit Brehm, Sarah Köster, Tim Salditt
We have used time-resolved small-angle X-ray scattering (SAXS) to study the adhesion of lipid vesicles in the electrostatic strong-coupling regime induced by divalent ions.
The content of this RSS Feed (c) The Royal Society of Chemistry




ring

Securing IoT for your Competitive Advantage


Delivering visibility, analytics, automation, and security across the branch, campus, and data center into operational environments.
More RSS Feed for Cisco: newsroom.cisco.com/rss-feeds ...




ring

[ASAP] Monochromatic X-ray Source Based on Scattering from a Magnetic Nanoundulator

ACS Photonics
DOI: 10.1021/acsphotonics.0c00121




ring

Five Interesting Ways to Use Array.reduce() (And One Boring Way)

Chris Ferdinandi turns the heat down low and lets the sauce reduce while we take a look at how to add spice to our source with a sprinkling of Array.reduce(). Just a little ingenuity with the humblest of functions.


Of all the modern array methods, the one I had the hardest time wrapping my head around was Array.reduce().

On the surface, it seems like a simple, boring method that doesn’t do much. But below its humble exterior, Array.reduce() is actually a powerful, flexible addition to your developer toolkit.

Today, we’re going to look at some cool things you can do with Array.reduce().

How Array.reduce() works

Most of the modern array methods return a new array. The Array.reduce() method is a bit more flexible. It can return anything. Its purpose is to take an array and condense its content into a single value.

That value can be a number, a string, or even an object or new array. That’s the part that’s always tripped me up – I didn’t realize just how flexible it is!

The syntax

The Array.reduce() accepts two arguments: a callback method to run against each item in the array, and a starting value.

The callback also accepts two arguments: the accumulator, which is the current combined value, and the current item in the loop. Whatever you return is used as the accumulator for the next item in the loop. On the very first loop, that starting value is used instead.

var myNewArray = [].reduce(function (accumulator, current) {
  return accumulator;
}, starting);

Let’s look at some examples to make this all tangible.

1. Adding numbers together

Let’s say you had an array of numbers that you wanted to add together. Using Array.forEach(), you might do something like this:

var total = 0;

[1, 2, 3].forEach(function (num) {
  total += num;
});

This is the cliche example for using Array.reduce(). I find the word accumulator confusing, so in this example, I’m calling it sum, because that’s what it is.

var total = [1, 2, 3].reduce(function (sum, current) {
  return sum + current;
}, 0);

Here, we pass in 0 as our starting value.

In the callback, we add the current value to the sum, which has our starting value of 0 on the first loop, then 1 (the starting value of 0 plus the item value of 1), then 3 (the sum value of 1 plus the item value of 2), and so on.

Here’s a demo.

2. Combining multiple array methods into Array.map() and Array.filter() into a single step

Imagine you had an array of wizards at Hogwarts.

var wizards = [
  {
    name: 'Harry Potter',
    house: 'Gryfindor'
  },
  {
    name: 'Cedric Diggory',
    house: 'Hufflepuff'
  },
  {
    name: 'Tonks',
    house: 'Hufflepuff'
  },
  {
    name: 'Ronald Weasley',
    house: 'Gryfindor'
  },
  {
    name: 'Hermione Granger',
    house: 'Gryfindor'
  }
];

You want to create a new array that contains just the names of wizards who are in Hufflepuff. One way you could do that is by using the Array.filter() method to get back just wizards whose house property is Hufflepuff. Then, you’d use the Array.map() method to create a new array containing just the name property for the remaining wizards.

// Get the names of the wizards in Hufflepuff
var hufflepuff = wizards.filter(function (wizard) {
  return wizard.house === 'Hufflepuff';
}).map(function (wizard) {
  return wizard.name;
});

With the Array.reduce() method, we can get the same array in a single pass, improving our performance. You pass in an empty array ([]) as the starting value. On each pass, you check to see if the wizard.house is Hufflepuff. If it is, you push it to the newArr (our accumulator in this example). If not, you do nothing.

Either way, you return the newArr to become the accumulator on the next pass.

// Get the names of the wizards in Hufflepuff
var hufflepuff = wizards.reduce(function (newArr, wizard) {
  if (wizard.house === 'Hufflepuff') {
    newArr.push(wizard.name);
  }
  return newArr;
}, []);

Here’s another demo.

3. Creating markup from an array

What if, instead of creating an array of names, we wanted to create an unordered list of wizards in Hufflepuff? Instead of passing an empty array into Array.reduce() as our starting value, we’ll pass in an empty string ('') and call it html.

If the wizard.house equals Hufflepuff, we’ll concatenate our html string with the wizard.name wrapped in an opening and closing list item (li). Then, we’ll return the html to become the accumulator on the next loop.

// Create a list of wizards in Hufflepuff
var hufflepuffList = wizards.reduce(function (html, wizard) {
  if (wizard.house === 'Hufflepuff') {
    html += '<li>' + wizard.name + '</li>';
  }
  return html;
}, '');

Add an opening and closing unordered list element before and after Array.reduce(), and you’re ready to inject your markup string into the DOM.

// Create a list of wizards in Hufflepuff
var hufflepuffList = '<ul>' + wizards.reduce(function (html, wizard) {
  if (wizard.house === 'Hufflepuff') {
    html += '<li>' + wizard.name + '</li>';
  }
  return html;
}, '') + '</ul>';

See it in action here.

4. Grouping similar items in an array together

The lodash library has a groupBy() method takes a collection of items as an array and groups them together into an object based on some criteria.

Let’s say you want an array of numbers.

If you wanted to group all of the items in numbers together based on their integer value, you would do this with lodash.

var numbers = [6.1, 4.2, 6.3];

// returns {'4': [4.2], '6': [6.1, 6.3]}
_.groupBy(numbers, Math.floor);

If you had an array of words, and you wanted to group the items in words by their length, you would do this.

var words = ['one', 'two', 'three'];

// returns {'3': ['one', 'two'], '5': ['three']}
_.groupBy(words, 'length');

Creating a groupBy() function with Array.reduce()

You can recreate that same functionality using the Array.reduce() method.

We’ll create a helper function, groupBy(), that accepts the array and criteria to sort by as arguments. Inside groupBy(), we’ll run Array.reduce() on our array, passing in an empty object ({}) as our starting point, and return the result.

var groupBy = function (arr, criteria) {
  return arr.reduce(function (obj, item) {
    // Some code will go here...
  }, {});
};

Inside the Array.reduce() callback function, we’ll check to see if the criteria is a function, or a property of the item. Then we’ll get its value from the current item.

If there’s no property in the obj with that value yet, we’ll create it and assign an empty array as its value. Finally, we’ll push the item to that key, and return the object as the accumulator for the next loop.

var groupBy = function (arr, criteria) {
  return arr.reduce(function (obj, item) {

    // Check if the criteria is a function to run on the item or a property of it
    var key = typeof criteria === 'function' ? criteria(item) : item[criteria];

    // If the key doesn't exist yet, create it
    if (!obj.hasOwnProperty(key)) {
      obj[key] = [];
    }

    // Push the value to the object
    obj[key].push(item);

    // Return the object to the next item in the loop
    return obj;

  }, {});
};

Here’s a demo of the completed helper function.

Special thanks to Tom Bremer for helping me make some improvements to this one. You can find this helper function and more like it on the Vanilla JS Toolkit.

5. Combining data from two sources into an array

Remember our array of wizards?

var wizards = [
  {
    name: 'Harry Potter',
    house: 'Gryfindor'
  },
  {
    name: 'Cedric Diggory',
    house: 'Hufflepuff'
  },
  {
    name: 'Tonks',
    house: 'Hufflepuff'
  },
  {
    name: 'Ronald Weasley',
    house: 'Gryfindor'
  },
  {
    name: 'Hermione Granger',
    house: 'Gryfindor'
  }
];

What if you had another data set, an object of house points each wizard has earned.

var points = {
  HarryPotter: 500,
  CedricDiggory: 750,
  RonaldWeasley: 100,
  HermioneGranger: 1270
};

Imagine you wanted to combine both sets of data into a single array, with the number of points added to each wizard’s data in the wizards array. How would you do it?

The Array.reduce() method is perfect for this!

var wizardsWithPoints = wizards.reduce(function (arr, wizard) {

  // Get the key for the points object by removing spaces from the wizard's name
  var key = wizard.name.replace(' ', '');

  // If the wizard has points, add them
  // Otherwise, set them to 0
  if (points[key]) {
    wizard.points = points[key];
  } else {
    wizard.points = 0;
  }

  // Push the wizard object to the new array
  arr.push(wizard);

  // Return the array
  return arr;

}, []);

Here’s a demo combining data from two sources into an array.

6. Combining data from two sources into an object

What if you instead wanted to combine the two data sources into an object, where each wizard’s name was the key, and their house and points were properties? Again, the Array.reduce() method is perfect for this.

var wizardsAsAnObject = wizards.reduce(function (obj, wizard) {

  // Get the key for the points object by removing spaces from the wizard's name
  var key = wizard.name.replace(' ', '');

  // If the wizard has points, add them
  // Otherwise, set them to 0
  if (points[key]) {
    wizard.points = points[key];
  } else {
    wizard.points = 0;
  }

  // Remove the name property
  delete wizard.name;

  // Add wizard data to the new object
  obj[key] = wizard;

  // Return the array
  return obj;

}, {});

Here’s a demo combining two data sets into an object.

Should you use Array.reduce() more?

The Array.reduce() method has gone from being something I thought was pointless to my favorite JavaScript method. So, should you use it? And when?

The Array.reduce() method has fantastic browser support. It works in all modern browsers, and IE9 and above. It’s been supported in mobile browsers for a long time, too. If you need to go back even further than that, you can add a polyfill to push support back to IE6.

The biggest complaint you can make about Array.reduce() is that it’s confusing for people who have never encountered it before. Combining Array.filter() with Array.map() is slower to run and involves extra steps, but it’s easier to read. It’s obvious from the names of the methods what they’re supposed to be doing.

That said, there are times where Array.reduce() makes things that would be complicated more simple rather than more complicated. The groupBy() helper function is a good example.

Ultimately, this is another tool to add to your toolkit. A tool that, if used right, can give you super powers.


About the author

Chris Ferdinandi helps people learn vanilla JavaScript. He believes there’s a simpler, more resilient way to make things for the web.

Chris is the author of the Vanilla JS Pocket Guide series, creator of the Vanilla JS Academy training program, and host of the Vanilla JS Podcast. His developer tips newsletter is read by thousands of developers each weekday.

He’s taught developers at organizations like Chobani and the Boston Globe, and his JavaScript plugins have been used used by Apple and Harvard Business School. Chris Coyier, the founder of CSS-Tricks and CodePen, has described his writing as “infinitely quote-worthy.”

Chris loves pirates, puppies, and Pixar movies, and lives near horse farms in rural Massachusetts. He runs Go Make Things with Bailey Puppy, a lab-mix from Tennessee.

More articles by Chris




ring

Assessment of the in-house laboratory independent research at the Army's Research, Development, and Engineering Centers / Army Research Program Review and Analysis Committee, Division on Engineering and Physical Sciences

Online Resource




ring

Exploring Patterns of Behaviour in Violent Jihadist Terrorists: an analysis of six significant terrorist conspiracies in the UK.

Online Resource




ring

Proceeding of the VI International Ship Design and Naval Engineering Congress (CIDIN) and XXVI Pan-American Congress of Naval Engineering, Maritime Transportation and Port Engineering (COPINAVAL) / Vice Admiral Jorge Enrique Carreño Moreno, Adan Veg

Online Resource




ring

The myth of coequal branches: restoring the constitution's separation of functions / David J. Siemers

Dewey Library - JK305.S54 2018




ring

Exploring political legacies Stephen Farrall, Colin Hay, Emily Gray

Online Resource




ring

Children deaths in Gorakhpur: A dissolving faith, an enduring mystery

The killer disease of children are undercut by a wily virus and administrative bottlenecks.




ring

Nairobi mall attack brings back memories of 26/11 strike

Shot in the right leg, Devika, was the youngest witness in the trial of Ajmal Kasab.




ring

Bombay HC defers hearing on Adarsh's plea against demolition order

Hearing after SC decides Adarsh Society's plea seeking transfer of the matter to National Green Tribunal.




ring

Earthquake measuring 5 on Richter scale jolts Sikkim

In Gangtok some buildings had developed cracks and people were out on the streets.




ring

Antony asks officials to examine issues raised by Patel on IAF barring PSU tenders

Indian Air Force has to acquire 56 transport aircraft to replace its ageing Avro fleet.




ring

SC disapproves gun firing to celebrate marriage ceremonies

Guns must be carried with a sense of responsibility and caution, SC stated.




ring

Pakistan targets civilian areas in Jammu, 3 children among 4 hurt in firing along LoC

This is the ninth ceasefire violation by Pakistani troops in the past four days.




ring

Mumbai gangrape: Photojournalist identifies assaulters, 'faints' in court during trial

The 23-year-old victim was gangraped in the Shakti Mill compound on August 22.




ring

Election Commission approves distribution of caps, stickers for electioneering

Distribution of T-shirts, shirts, trousers and saris with political party symbols have been prohibited.