text:
The Allure and Intrigue of Dungeons & Dragons
Jake Monaghan
Descending deeper underground, the red clay and mangroves that color the cityscape fade to a forlorn gray; the sounds of exotic birdsong fade with the dying light as you submerge yourself deeper into Del Solan's bloody past.
You step into what looks to be the main tunnel. The subdued ambience of the flagstones is drowned in the hungry gurgling of the river, whose muddied waters plunge forward into darkness, heedless of the many side paths that meander deeper into the catacombs. Vines cling to the vaulted walls. The shadow of a beast permeates the place-one long dead to the light of day. A darkness brooding 'till the death of all matter.
Waning, yet suffused with a natural beauty, the plant life thrives with an unnatural volition…
Dungeons & Dragons has, since its creation, been considered the epitome of nerdom. It conjures the image of geeks in an attic rolling icosahedrons and fighting through imaginary dungeons.
Dungeons & Dragons is a tabletop fantasy role-playing game, played collaboratively with a group of people. Each player at the table has a character represented by a stat sheet and ability scores. These characters then inhabit the imaginary world created for them by the Dungeon Master, the runner of the game and the arbiter of rules (hitherto known as the DM). With the DM's guidance, the player characters form a party of adventurers to pursue quests and mysteries as the protagonists of the group's collaborative story.
"The idea of doing things beyond what normal people are capable of and feeling like heroes is really cool," said Novato High senior Link Henderson.
On the surface, the sort of entertainment that Dungeons & Dragons provides is not unlike more familiar forms of fantasy, be it video games or novels. In truth, the game offers much of the same as these other mediums in both its immersive storytelling and nuanced battle system.
The line of difference is drawn in Dungeons & Dragons collaboration. It's a team game; not only in the ways that the adventures fight together to take down the realm's deadliest foes, but in the unique group storytelling that only role-playing games can offer.
NHS senior Taylor Bernard explains this perfectly.
"You take parts of your character from yourself and it creates this interesting way of getting to learn more of the people you're interacting with, and then you all get to work together and you're putting yourself a little out on the line. So you grow closer in that aspect," said Bernard.
Dungeons & Dragons, with its encyclopedic rulebooks and polyhedral dice, has always been the black sheep of the entertainment industry. The game's more immersive aspects made it an easy target for reprimanding parents throughout the 1980s, during which it was suspected of being a gateway to pagan worship.
The Satanic Panic (as it is retroactively known) began in 1979 with the disappearance of Michigan State University sophomore, James Dallas Egbert III. Egbert was something of a prodigal student, entering college at the age of 16. After his sudden vanishing, his parents hired Private Investigator William Dear to find out the cause.
Dear immediately latched onto the idea of Dungeons & Dragons as the ultimate problem. Believing that Egbert had become so enthralled with the game, he completely lost touch with reality, Dear began an exhaustive search of the school's steam vents, believing that Egbert had wandered there thinking he was living out the game.
In truth, Egbert, who struggled with drug use and depression, ran away to escape the pressures of academic life. He commited suicide on August 16, 1980, while the media was still fascinated by the alleged idea of Dungeons & Dragons being a gateway to pagan worship.
In the modern day, however, the legacy of Dungeons & Dragons lives on. Nowhere is this success more apparent than on Critical Role, a show dedicated to talented voice actors playing the game. In March 2018, the team behind the show began a Kickstarter with a modest goal of raising $750,000. By the end of March, the team raised nearly $7 million, making it one of the most successful fundraisers ever run on Kickstarter.
This success is evident in the localest of ways. Many students at NHS have begun to see the ways in which Dungeons & Dragons compliments their artistic passions.
"It's this really big mental gymnastics exercise to make people believe they are people that they're not," said Henderson.
"With theater, you're acting off of a script, and with writing, you only ever see it on a page, so I think it's a really cool fusion of the two and getting to see what you had in your head. So I think it's cool to get to play out a story as it happens," added Bernard.
The narratives created through the game are characteristically expansive, with the lore and culture being developed alongside the player character's stories (an ongoing narrative told over multiple sessions is called a campaign. These adventures can often stretch into years of real time). The characters that the players inhabit over this time become more human with each session develop unique personalities complex motivations that mix with the conflicts of the narrative at large.
When everything comes together, Dungeons & Dragons offers an experience wholly unlike any sort of conventional storytelling. The sense of immersion it creates lends some of the game's more intense moments a potent emotional viscosity. Everyone familiar with it can recall at least one moment where a lucky dice roll produced fabulously unexpected results, or when a character's untimely death immortalize them in the hearts and minds of those at the table.
Jake Monaghan, Reporter
Netflix Suggestions for Quarantine
The Path to My Dream School
Saying Goodbye to High School a Struggle for Seniors
The Beginning of No-Touch Greetings
Coronavirus Quarantine Impacting Mental Health
Sun-Worshipping Cult Assembles on Campus
The Benefits of Dogs in High School Classrooms
Morbid Legends of Lake Tahoe: Bodies at the Bottom


Emporio Armani jewellery and watches are popular pieces at Fraser Hart as the design mastery of the luxurious Italian fashion house resonates with all. Spanning a stunning selection of both male and female styles, the range includes decadent accessory, jewellery and watch designs infused with contemporary coolness and classic sensibility. Take advantage of this universal appeal by wearing Emporio Armani with both every day casual and special occasion formal looks.
The Emporio Armani collections of watches and jewelry for autumn 2018 are classic, but feature innovative elements and new materials. The color combinations of gunmetal and blue, or grey and brown, create a truly masculine and stylish look.
With a strong and recurring use of luscious leather, sleek steel and serene silver; Emporio Armani pieces are both versatile and eternally in style. Choose them as a great gift idea to gift with love to someone special in your life - or even as an indulgent treat for yourself. We are proud to stock bracelets, cufflinks, earrings, watches and more with a wide array available to browse and buy online. Fraser Hart empowers your style to shine with the exquisite Emporio Armani brand.


Searchmetrics offers a wide array of products targeting independent webmasters, small agencies, and enterprise-level agencies. For the purposes of this review we'll be focusing on the Essentials Plus suite, which should suffice for most independent webmasters.
To start a project you enter the domain or sub-domain you, keywords, and search engines you want to track for your project. You can select from a wide range of countries as well as inside specific Google locales (this can be helpful for Local SEO).
Once you finish up with the keywords you can add competitors manually for benchmarking or click the Suggested Benchmarks tab and see the competitors Searchmetrics feels is relevant.
The last step is to connect your web analytics account if you'd like (Google Analytics).
As part of their Rankings tool you can see SEO visibility going back 2 years as well as benchmarks against the competitors you entered in areas of link data, rankings data, keyword counts, and social metrics (these areas are based on current data). On the keyword piece of this module you'll see overall visibility, keywords that have gained and lost positions, as well as overall keyword coverage and potential. Each of these areas offer the ability to drill down further, beyond the overview page.
The Competitive Analysis feature of the Rankings module shows you additional competitors for your keywords as well as their historical trends for the keywords you are monitoring. Also, you get up to date information on competitor changes so you can spot competition that is trending up relatively quickly.
The Links module gives an overview of current link landscape of your site with data on total links, referring domains, and anchor text data. You can also view the page strength of each link as well as location breakdown of the link profile. You can also filter links by follow/no-follow, page strength, and custom text strings (if you wanted to see links that contain X word or phrase as an example).
Searchmetrics also includes an Optimization module that reports on site optimization as a whole (404 errors, no-index tags, duplicate titles, and other features you see in competing commercial optimization tools) and keyword optimization. The keyword optimization tool shows on-page scores for each keyword as well as current rank and volume.
The final module available is the Research module. You can research the visibility and spread of domains, keywords, backlink profiles, as well as social metrics.
One of the neat features inside of the initial site set up is the ability to add keywords via a keyword suggest tool that is available when you are entering your keywords.
They also offer a standard keyword research tool in the same interface but the cool thing with the suggest feature is it will show you where the entered domain ranks for that specific keyword. You can also add and tag keywords from these interfaces.
Another unique feature is that you can see the top 50 rankings for a given keyword and the associated domain movement within the last week. This can help you spot sites that are doing things correctly (or incorrectly) so you can get a better, more real-time handle on what might be working vs what isn't.
You might find yourself in a position where you do not have historical rankings at your disposal. You can access up to 2 years worth of historical traffic data inside of this tool. Historical ranking access can be a major factor in diagnosing if a site has been hit by a major algorithm update or if certain tactics caused specific ranking (traffic related) issues with the site.
As search results become more and more ubiquitois across multiple search types, having access to universal ranking data becomes more useful.
The above verticals are available in both domain and keyword level research modules.
In PPC and organic research modules you'll get access to the spread of each site across their keyword sets. When doing competitive research this can be helpful in determining whose strategy is working and whose isn't based on which site is top ranking for more terms compared to the other.
From just about any data set you can click on the Report icon and get access to an easy to use, white label reporting system with the ability to add the ranking charts, images, and custom text to the report . In this particular plan only the chart data is available for report creation.
Searchmetrics is very easy to use and includes lots of helpful charts. Near each section of a given result is a question mark bubble which tells you exactly what the data is referring to.
Sometimes the charts load a bit slow but overall the experience is quick and crisp. It's clear that a lot of thought went into the UI of the site as everything is easy to understand, logically grouped, and clearly explained.
Data is extremely exportable into a variety of formats (PNG, PDF, .csv).
Searchmetrics collects data from Google, various 3rd party social sites, as well as from their own internal database to help deliver its results.
The size of their proprietary database is approximately 100,000,000 keywords.
Some of the metrics inside of Searchmetrics update weekly (your keyword data as an example, though you can choose daily) and the larger database is refreshed monthly.
Searchmetrics breaks down social signals so you can see the pages on a domain with the highest likes, shares, +1's, pins, and LinkedIn shares.
The 3 features mentioned above can be combined to really help streamline your content creation and promotion ideas. It can also give you a good idea of what social pieces might fit into the market you are in (are major sites in your market or lateral markets heavily weighted to one or only a couple social sites?).
You can research the competition as well as get an overview of how your site is doing in various universal search results as well as compare up to 4 sites. This is especially helpful if you are an e-commerce site trying to get a handle on shopping results or if your market involves a fair amount of play in Google News, Videos, and Images.
There are a dizzying amount of options and tools available in the various subscriptions they offer. While choice is good it can also cause some confusion. Really analyze what it is you need to do with the tool and pick based off of that. The higher level plans are quite pricey and are aimed at the enterprise market.
Plans start at 99$ and go up to 949$ per month. There is also a custom pricing solution if you need to go even higher.
Currently there is no free trial available but they do have a free account you can use where they offer SEO and Social visibility as well as limited views of organic, paid, and universal results and competitors.
Coupons for this tool generally run during the last quarter of the year. As of this writing none exist but you can check back and search for discounts and coupons during the year (some are sure to pop up).


One of my brides told me about Aletha and her amazing blog a few months ago. I've been an avid reader of her blog at Pearl Events ever since. I love Aletha's style and her ideas are amazing. I hope I get to work on more weddings with her in the coming years. Anyone on the west side of the state should definitely give her a holler. Oh and she featured me today on her blog! Check it out. The pictures are all courteous of Dionne at The Shooting Gallery.


Children. They're just smaller versions of us you know, but I'm not so crazy about me in the first place, so why would I want one of them?
Children. They cry at you when they're young, they yell at you when they're older, they borrows from you when they's middle-aged and they leave you alone to die.
Children. You give them everything they want. Give them candy and a lot of toys and what do you get in return? You get a lot of noise: Nyah nyah nyah nyah nyah, my poppa's a mean old man.
Children. Bless their little hearts, if they was really made out of gold, I'd like to sell'em on the open market. I could make me a fortune.


text:
Q: Remoting Exception: Attempt to de-reference a null object when attempting to get a field from an SObject I am attempting to grab the value of the "Status" field from an SObject.
@RemoteAction
public static String getStatus() {
    Id NTHRecordId = ApexPages.currentPage().getParameters().get('id');
    String nthRecordQuery = 'SELECT ' +  TransactionContext.getFieldNames('Negotiation_Team_Hub__c') +' FROM Negotiation_Team_Hub__c WHERE id = \''+ NTHRecordId + '\'';
    Negotiation_Team_Hub__c NTHRecord = database.query(nthRecordQuery);
    String status =(String)NTHRecord.get(Schema.Negotiation_Team_Hub__c.Status__c);
    return status;
}

I get below exception

Visualforce Remoting Exception: Attempt to de-reference a null object"

Assuming that I'm going about getting the field in the correct manner (a stretch), why might I be hitting this error?

A: The issue is that ApexPages.currentPage() is not available in a Remoting context, therefore this line is throwing a Null Pointer Exception when you attempt to access query-string parameters from a null Page Reference:
Id NTHRecordId = ApexPages.currentPage().getParameters().get('id');

The solution, as you have already guessed, is to pass any needed parameters along with your Remoting request. Assuming that you are trying to retrieve the Id of the record in context, there are several ways to do that:

*

*If you're using a Standard Controller, retrieve the Id off of the record in context from the Standard Controller. For instance if you're using the Account Standard Controller, then you can get the Id using {!Account.Id}, like this:
Visualforce.remoting.Manager.invokeAction(
    '{!$RemoteAction.NTHController.getStatus}',
    '{!Account.Id}',
     function(result, event) {
         console.log(event);
         console.log(result);
     }
)

*You can pass along the value of the id URL Query String parameter directly into your Remote Action:
// Get an object containing all Query String parameters as key/value pairs
var params = (function(){
    var allParams = {},
        search = window.location.search,
        arr;
    if (search.length) {
        arr = search.substring(1).split('&');
        for (var i=0;i<arr.length;i++) {
            var parts = arr[i].split('=');
            allParams[parts[0]]=parts[1];
        }
    }
    return allParams;
})();

Visualforce.remoting.Manager.invokeAction(
    '{!$RemoteAction.NTHController.getStatus}',
    params.id,
     function(result, event) {
         console.log(event);
         console.log(result);
     }
)

In both cases you will need to adjust your getStatus remote action to accept the Id as a parameter, e.g.
@RemoteAction
public static String getStatus(String NTHRecordId) {
    String nthRecordQuery = 'SELECT ' +  TransactionContext.getFieldNames('Negotiation_Team_Hub__c') +' FROM Negotiation_Team_Hub__c WHERE id = \''+ NTHRecordId + '\'';
    Negotiation_Team_Hub__c NTHRecord = database.query(nthRecordQuery);
    String status =(String)NTHRecord.get(Schema.Negotiation_Team_Hub__c.Status__c);
    return status;
}

A: Based on Keith C's comments, I wound up inserting a parameter into my Javascript remote invocation of the Apex method:
Visualforce.remoting.Manager.invokeAction(
    '{!$RemoteAction.NTHController.getStatus}','{!Id}', function(result, event) {
      console.log(event);
      console.log(result);
    }
  )

This did indeed lead me to a different error:

Visualforce Remoting Exception: List has no rows for assignment to SObject

So the issue was that I wasn't able to get the ID through ApexPages and now need to troubleshoot how to get to the page's ID through the frontend.

A: Please declare a instance variable in class and fetch id in just constructor from page parameters. Whenever you invoke remote action pass that instance variable to remote action as parameter as we cannot use instance variables in static functions so pass instance variable as local variable. Moreover, you need not write this --> Visualforce.remoting.Manager.invokeAction. you can directly call method as we do usually.
Please check the following sample code :-
/*
    Class : Code
*/
public class DemoManger {

    public String strRecordId { get; set;}

    public DemoManger() {
        strRecordId = ApexPages.currentPage().getParameters().get('id');
    }

    @RemoteAction
    public static String fetchAccount(String strAccountId ) {

    }
}

<script>

var strAccountId = '{!strRecordId}';
DemoManger.fetchAccount
( strAccountId,
  function(result,event) {
  }
);

</script>

Thanks...!

redpajama_set_name: RedPajamaStackExchange


text:
CLIFF HARVEY
Study Nutrition
The Carb-Appropriate Research Review
Does Milk do a Body Good?
| September 1, 2019
| Carb-Appropriate Research Review, Nutrition, Patrons Only
Milk and dairy are commonly avoided by people seeking health but is the recommendation to eliminate dairy justified?
What are the effects of dairy on health?
Dairy is likely to benefit heart disease, stroke, and diabetes risk
Nutrients in dairy improve bone health and increase bone mineral density
Dairy does not appear to have any strong association with the incidence of cancer
Dairy does not appear to have any effect, positive or negative, on cognition
Increased intakes of dairy might exacerbate acne
In The Carbohydrate Appropriate Diet, I wrote about the health benefits of dairy…and why some people should still avoid it. Since that book was published there has been a huge volume of research published and many reviews of that research summarising the most important results. There is also a lot of uncertainty around the topic of dairy. Some people promote it as a health panacea, others deride it as a pro-inflammatory dietary nightmare.
So, what does the evidence tell us about the impact of dairy overall, and for whom it is (and isn't) appropriate?
At the time of writing The Carbohydrate Appropriate Diet, despite dairy avoidance being a common theme in alternative and complementary health circles, the evidence for the absolute avoidance of dairy by most people was very thin on the ground. In fact, the research had demonstrated that in an adequate protein diet, a moderate dairy intake helped to retain lean mass during dieting more effectively than the same protein intake but with lower dairy intake, and that high protein, high dairy intake increased fat-loss.1 Typically, people lost more fat when they supplemented with calcium, and more again when the same amount of calcium was provided from a diary containing diet,2, 3 and it's is likely that dairy promotes a synergistic effect because of its relatively high content of protein (especially the BCAAs found in dairy in abundance) and angiotensin-converting enzyme inhibitors, to mitigate fat-gain.4
Systematic reviews and meta-analyses of the published studies have concluded that the inclusion of dairy in energy-restricted weight-loss diets significantly reduces weight and body-fat and improves lean-mass.5, 6 There is also an association between the intake of dairy products and reduced rates of type-2 diabetes.7, 8 Furthermore, high-dairy consumption might reduce insulin resistance without negatively impacting bodyweight or cardiometabolic markers.9
You might think that not a lot has changed since 2014-2016 when I wrote and released The Carbohydrate Appropriate Diet. But since 2016 there have been nearly 60 systematic reviews or meta-analyses published on the effects of diary on various parameters of health! These include the studies I originally referenced but also many more.
So, let's do a deep dive into what the research tells us about dairy and its effects on health, whether good or bad.
It looks like you are not a $10 patron. To access this and other great content become a patron or upgrade your membership.
Liked this post? Became a patron for as little as $1 a month, or subscribe to member-only articles and the Carb-Appropriate Research Review for only $10 a month.
PrevPreviousAll You Need to Know About Keto
NextIs Low-Fat Dairy Superior to Full-Fat?Next
Carb-Appropriate Research Review
Is Erythritol Safe to Use as a Sweetener?
Cliff Harvey	January 21, 2020
The Impact of Non-Nutritive Sweeteners on Health
Cliff's 101 Tips for Health: Eliminate added sugar
Bella	January 17, 2020
Life & Purpose
Patrons Only
Cliff's 101 Tips for Health: Moderate your drinking!
Cliff's 101 Tips for Health: Cut out fruit juice
Fresh health and performance info delivered weekly!
Sign up to receive blog posts, videos, podcasts, and member-only specials, delivered right to your inbox.
Holistic Performance
Nutrition Store Online
Twitter Facebook Youtube Medium
© 2019 Cliff Harvey. All rights reserved

redpajama_set_name: RedPajamaCommonCrawl


text:
/* import-globals-from preserve-referer.js */

"use strict";

var VIEWER_URL = chrome.extension.getURL("content/web/viewer.html");

function getViewerURL(pdf_url) {
  return VIEWER_URL + "?file=" + encodeURIComponent(pdf_url);
}

/**
 * @param {Object} details First argument of the webRequest.onHeadersReceived
 *                         event. The property "url" is read.
 * @returns {boolean} True if the PDF file should be downloaded.
 */
function isPdfDownloadable(details) {
  if (details.url.includes("pdfjs.action=download")) {
    return true;
  }
  // Display the PDF viewer regardless of the Content-Disposition header if the
  // file is displayed in the main frame, since most often users want to view
  // a PDF, and servers are often misconfigured.
  // If the query string contains "=download", do not unconditionally force the
  // viewer to open the PDF, but first check whether the Content-Disposition
  // header specifies an attachment. This allows sites like Google Drive to
  // operate correctly (#6106).
  if (details.type === "main_frame" && !details.url.includes("=download")) {
    return false;
  }
  var cdHeader =
    details.responseHeaders &&
    getHeaderFromHeaders(details.responseHeaders, "content-disposition");
  return cdHeader && /^attachment/i.test(cdHeader.value);
}

/**
 * Get the header from the list of headers for a given name.
 * @param {Array} headers responseHeaders of webRequest.onHeadersReceived
 * @returns {undefined|{name: string, value: string}} The header, if found.
 */
function getHeaderFromHeaders(headers, headerName) {
  for (const header of headers) {
    if (header.name.toLowerCase() === headerName) {
      return header;
    }
  }
  return undefined;
}

/**
 * Check if the request is a PDF file.
 * @param {Object} details First argument of the webRequest.onHeadersReceived
 *                         event. The properties "responseHeaders" and "url"
 *                         are read.
 * @returns {boolean} True if the resource is a PDF file.
 */
function isPdfFile(details) {
  var header = getHeaderFromHeaders(details.responseHeaders, "content-type");
  if (header) {
    var headerValue = header.value.toLowerCase().split(";", 1)[0].trim();
    if (headerValue === "application/pdf") {
      return true;
    }
    if (headerValue === "application/octet-stream") {
      if (details.url.toLowerCase().indexOf(".pdf") > 0) {
        return true;
      }
      var cdHeader = getHeaderFromHeaders(
        details.responseHeaders,
        "content-disposition"
      );
      if (cdHeader && /\.pdf(["']|$)/i.test(cdHeader.value)) {
        return true;
      }
    }
  }
  return false;
}

/**
 * Takes a set of headers, and set "Content-Disposition: attachment".
 * @param {Object} details First argument of the webRequest.onHeadersReceived
 *                         event. The property "responseHeaders" is read and
 *                         modified if needed.
 * @returns {Object|undefined} The return value for the onHeadersReceived event.
 *                             Object with key "responseHeaders" if the headers
 *                             have been modified, undefined otherwise.
 */
function getHeadersWithContentDispositionAttachment(details) {
  var headers = details.responseHeaders;
  var cdHeader = getHeaderFromHeaders(headers, "content-disposition");
  if (!cdHeader) {
    cdHeader = { name: "Content-Disposition" };
    headers.push(cdHeader);
  }
  if (!/^attachment/i.test(cdHeader.value)) {
    cdHeader.value = "attachment" + cdHeader.value.replace(/^[^;]+/i, "");
    return { responseHeaders: headers };
  }
  return undefined;
}

chrome.webRequest.onHeadersReceived.addListener(
  function (details) {
    if (details.method !== "GET") {
      // Don't intercept POST requests until http://crbug.com/104058 is fixed.
      return undefined;
    }
    if (!isPdfFile(details)) {
      return undefined;
    }
    if (isPdfDownloadable(details)) {
      // Force download by ensuring that Content-Disposition: attachment is set
      return getHeadersWithContentDispositionAttachment(details);
    }

    var viewerUrl = getViewerURL(details.url);

    // Implemented in preserve-referer.js
    saveReferer(details);

    return { redirectUrl: viewerUrl };
  },
  {
    urls: ["<all_urls>"],
    types: ["main_frame", "sub_frame"],
  },
  ["blocking", "responseHeaders"]
);

chrome.webRequest.onBeforeRequest.addListener(
  function (details) {
    if (isPdfDownloadable(details)) {
      return undefined;
    }

    var viewerUrl = getViewerURL(details.url);

    return { redirectUrl: viewerUrl };
  },
  {
    urls: [
      "file://*/*.pdf",
      "file://*/*.PDF",
      ...// Duck-typing: MediaError.prototype.message was added in Chrome 59.
      (MediaError.prototype.hasOwnProperty("message")
        ? []
        : [
            // Note: Chrome 59 has disabled ftp resource loading by default:
            // https://www.chromestatus.com/feature/5709390967472128
            "ftp://*/*.pdf",
            "ftp://*/*.PDF",
          ]),
    ],
    types: ["main_frame", "sub_frame"],
  },
  ["blocking"]
);

chrome.extension.isAllowedFileSchemeAccess(function (isAllowedAccess) {
  if (isAllowedAccess) {
    return;
  }
  // If the user has not granted access to file:-URLs, then the webRequest API
  // will not catch the request. It is still visible through the webNavigation
  // API though, and we can replace the tab with the viewer.
  // The viewer will detect that it has no access to file:-URLs, and prompt the
  // user to activate file permissions.
  chrome.webNavigation.onBeforeNavigate.addListener(
    function (details) {
      if (details.frameId === 0 && !isPdfDownloadable(details)) {
        chrome.tabs.update(details.tabId, {
          url: getViewerURL(details.url),
        });
      }
    },
    {
      url: [
        {
          urlPrefix: "file://",
          pathSuffix: ".pdf",
        },
        {
          urlPrefix: "file://",
          pathSuffix: ".PDF",
        },
      ],
    }
  );
});

chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
  if (message && message.action === "getParentOrigin") {
    // getParentOrigin is used to determine whether it is safe to embed a
    // sensitive (local) file in a frame.
    if (!sender.tab) {
      sendResponse("");
      return undefined;
    }
    // TODO: This should be the URL of the parent frame, not the tab. But
    // chrome-extension:-URLs are not visible in the webNavigation API
    // (https://crbug.com/326768), so the next best thing is using the tab's URL
    // for making security decisions.
    var parentUrl = sender.tab.url;
    if (!parentUrl) {
      sendResponse("");
      return undefined;
    }
    if (parentUrl.lastIndexOf("file:", 0) === 0) {
      sendResponse("file://");
      return undefined;
    }
    // The regexp should always match for valid URLs, but in case it doesn't,
    // just give the full URL (e.g. data URLs).
    var origin = /^[^:]+:\/\/[^/]+/.exec(parentUrl);
    sendResponse(origin ? origin[1] : parentUrl);
    return true;
  }
  if (message && message.action === "isAllowedFileSchemeAccess") {
    chrome.extension.isAllowedFileSchemeAccess(sendResponse);
    return true;
  }
  if (message && message.action === "openExtensionsPageForFileAccess") {
    var url = "chrome://extensions/?id=" + chrome.runtime.id;
    if (message.data.newTab) {
      chrome.tabs.create({
        windowId: sender.tab.windowId,
        index: sender.tab.index + 1,
        url,
        openerTabId: sender.tab.id,
      });
    } else {
      chrome.tabs.update(sender.tab.id, {
        url,
      });
    }
  }
  return undefined;
});

// Remove keys from storage that were once part of the deleted feature-detect.js
chrome.storage.local.remove([
  "featureDetectLastUA",
  "webRequestRedirectUrl",
  "extensionSupportsFTP",
]);

redpajama_set_name: RedPajamaGithub


text:
Cooperative growth mechanism of plate-like FCC crystals
R. V. Mehta, R. Jagannathan
Some aspects of the cooperative growth mechanism of plate-like FCC crystals, as proposed by Ming and Sunagawa [J. Crystal Growth 87 (1988) 13], are discussed. It is unclear as to the circumstances under which such a mechanism would operate. Further, the mechanism for the alternating formation of macroscopic protrusions requires a corresponding reversal of relative growth rates of two surfaces for a constant supersaturation level, which is difficult to understand.
Journal of Crystal Growth
https://doi.org/10.1016/0022-0248(94)90354-9
10.1016/0022-0248(94)90354-9
Dive into the research topics of 'Cooperative growth mechanism of plate-like FCC crystals'. Together they form a unique fingerprint.
Crystal growth Engineering & Materials Science 95%
Supersaturation Chemical Compounds 78%
Crystals Engineering & Materials Science 67%
Crystal Growth Chemical Compounds 66%
crystals Physics & Astronomy 32%
supersaturation Physics & Astronomy 25%
Surface Chemical Compounds 21%
crystal growth Physics & Astronomy 21%
Mehta, R. V., & Jagannathan, R. (1994). Cooperative growth mechanism of plate-like FCC crystals. Journal of Crystal Growth, 142(3-4), 403-405. https://doi.org/10.1016/0022-0248(94)90354-9
Cooperative growth mechanism of plate-like FCC crystals. / Mehta, R. V.; Jagannathan, R.
In: Journal of Crystal Growth, Vol. 142, No. 3-4, 02.09.1994, p. 403-405.
Mehta, RV & Jagannathan, R 1994, 'Cooperative growth mechanism of plate-like FCC crystals', Journal of Crystal Growth, vol. 142, no. 3-4, pp. 403-405. https://doi.org/10.1016/0022-0248(94)90354-9
Mehta RV, Jagannathan R. Cooperative growth mechanism of plate-like FCC crystals. Journal of Crystal Growth. 1994 Sep 2;142(3-4):403-405. doi: 10.1016/0022-0248(94)90354-9
Mehta, R. V. ; Jagannathan, R. / Cooperative growth mechanism of plate-like FCC crystals. In: Journal of Crystal Growth. 1994 ; Vol. 142, No. 3-4. pp. 403-405.
@article{2498f27a74ac4b028c81be3595404208,
title = "Cooperative growth mechanism of plate-like FCC crystals",
abstract = "Some aspects of the cooperative growth mechanism of plate-like FCC crystals, as proposed by Ming and Sunagawa [J. Crystal Growth 87 (1988) 13], are discussed. It is unclear as to the circumstances under which such a mechanism would operate. Further, the mechanism for the alternating formation of macroscopic protrusions requires a corresponding reversal of relative growth rates of two surfaces for a constant supersaturation level, which is difficult to understand.",
author = "Mehta, {R. V.} and R. Jagannathan",
doi = "10.1016/0022-0248(94)90354-9",
journal = "Journal of Crystal Growth",
T1 - Cooperative growth mechanism of plate-like FCC crystals
AU - Mehta, R. V.
AU - Jagannathan, R.
N2 - Some aspects of the cooperative growth mechanism of plate-like FCC crystals, as proposed by Ming and Sunagawa [J. Crystal Growth 87 (1988) 13], are discussed. It is unclear as to the circumstances under which such a mechanism would operate. Further, the mechanism for the alternating formation of macroscopic protrusions requires a corresponding reversal of relative growth rates of two surfaces for a constant supersaturation level, which is difficult to understand.
AB - Some aspects of the cooperative growth mechanism of plate-like FCC crystals, as proposed by Ming and Sunagawa [J. Crystal Growth 87 (1988) 13], are discussed. It is unclear as to the circumstances under which such a mechanism would operate. Further, the mechanism for the alternating formation of macroscopic protrusions requires a corresponding reversal of relative growth rates of two surfaces for a constant supersaturation level, which is difficult to understand.
U2 - 10.1016/0022-0248(94)90354-9
DO - 10.1016/0022-0248(94)90354-9
JO - Journal of Crystal Growth
JF - Journal of Crystal Growth


Entrants must answer the question on the Liverpool ONE competition page after watching the video on the page to find their answer.
From correct answers, one winner will be chosen at random to win and contacted by a member of the Smooth Radio promotional team.
The winner will have 14 days to claim the prize by phone or email before their entry is deemed void and another winner is selected at random from correct answers.


text:
The Ship Ganges
1797 The Ship Ganges sailed from UKG in 1797 with William Batman, Maria Batman, Mary Mobbs and Robert Batman aboard and arrived in Sydney, NSW on 2 June 1797 under the Master Thomas Patrickson.
Last Edited 14 Aug 2009
Thomas P Rigney
Father Michael Rigney
Mother Ann Ryan
Birth 1868 Thomas P Rigney was born in 1868 at Camden, NSW, AustraliaG.1
He was the son of Michael Rigney and Ann Ryan.
Marriage 1892 Thomas P was married to Elizabeth M/H Maher in 1892 at Cootamundra, NSW, AustraliaG.2
Elizabeth M/H Maher
Patrick Thomas Rigney+ b. 1900
[S2] Index of BDM records, NSW BDM, Place of Registration: Camden; Year: 1868; Number: 7826.
[S2] Index of BDM records, NSW BDM, Place of Registration: Cootamundra; Year: 1892; Number: 3274.
Marriage 1892 Elizabeth M/H was married to Thomas P Rigney, son of Michael Rigney and Ann Ryan, in 1892 at Cootamundra, NSW, AustraliaG.1
Married Name 1892 As of 1892, her married name was Rigney.
Thomas P Rigney b. 1868
Michael Rigney
Marriage 1854 Michael was married to Ann Ryan in 1854 at Sydney, NSW, AustraliaG.1
Ann Ryan
Thomas P Rigney+ b. 1868
[S2] Index of BDM records, NSW BDM, Parish of Registration: Sydney, St Mary's RC; Year: 1854; Number: V1854287 100.
Marriage 1854 Ann was married to Michael Rigney in 1854 at Sydney, NSW, AustraliaG.1
Thomas G Moule
Marriage Thomas G was married to Jane Unknown.
Jane Unknown
Frederick George Moule+ b. c 1861, d. 24 Jul 1891
Marriage Jane was married to Thomas G Moule.
Married Name Her married name was Moule.
The Ship Hadlow
circa August 1819 The Ship Hadlow sailed from EnglandG circa August 1819 and arrived in Sydney, NSW on 24 December 1819 under the Master John Craigie.
2 April 1820 The Ship Hadlow sailed from Cork, IrelandG, on Sunday, 2 April 1820 with John Kelly aboard and arrived in Sydney, NSW on 5 August 1820 under the Master John Craigie.
Arthur S Brown1
Marriage 1924 Arthur S was married to Olga K Mary Howell, daughter of Robert Samuel Howell and Isabel Jessie Liddell, in 1924 at Woollahra, NSW, AustraliaG.1
[S2] Index of BDM records, NSW BDM, Place of Registration: Woollahra; Year: 1924; Number: 15917.
Mary Ann Ibbotson1
F, #29570, b. 22 August 1831, d. 5 July 1909
Birth 22 August 1831 Mary Ann Ibbotson was born on Monday, 22 August 1831 at Castlereagh Street, Sydney, NSW, AustraliaG.1
Marriage 30 September 1846 Mary Ann was married to George Pickering, son of Gowan Pickering and Mary Ann Toft, on Wednesday, 30 September 1846 at St Peters Church, Cooks River, NSW, AustraliaG.1
Death 5 July 1909 Mary Ann Ibbotson died on Monday, 5 July 1909 at 98 Oxford Street, Woollahra, NSW, AustraliaG, at age 77.1
Married Name 1846 As of 30 September 1846, her married name was Pickering.1
George Pickering b. 11 Aug 1824, d. 9 Aug 1900
George Pickering+1 b. 10 Aug 1847, d. 21 Aug 1930
Mary Ann Pickering1 b. 14 Feb 1850, d. 1909
William James Pickering1 b. 1 Jun 1853, d. 15 Jul 1929
John Henry Pickering1 b. 8 Jul 1855, d. 31 Oct 1885
Thomas Gowen Pickering1 b. 16 Sep 1857, d. 29 Oct 1857
Alfred Frederick Pickering1 b. 5 Nov 1858, d. 11 Feb 1924
Susan Australia Pickering1 b. 12 Aug 1861, d. 29 Jun 1932
Emily Rosina Pickering b. 21 Aug 1863, d. 4 Jun 1926
Sydney Spencer Pickering1 b. 17 Nov 1865, d. 16 Aug 1875
Florence Jane Pickering1 b. 27 Aug 1868, d. 18 Aug 1948
Albert Ernest Pickering1 b. 19 Dec 1870, d. 12 Dec 1919
Eliza Ellen Pickering+1 b. 19 Feb 1873, d. 22 Jun 1948
Francis Emanuel Pickering1 b. 12 Nov 1878, d. 21 Jun 1951
[S169] Brendan Dennis, "Pickering Family," e-mail to Robert Mote, 7 April 2000.
Mary Jane Ann Meredith1
F, #29571, b. 30 March 1833, d. 4 October 1911
Father Frederick Meredith2 b. 17 Mar 1801, d. 10 Feb 1861
Mother Sarah Morgan2 b. 1804
Birth 30 March 1833 Mary Jane Ann Meredith was born on Saturday, 30 March 1833 at Liverpool, NSW, AustraliaG.1,3
Baptism 30 March 1833 She was baptized on Saturday, 30 March 1833 at St Lukes Parish, Liverpool, NSW, AustraliaG.3
She was the daughter of Frederick Meredith and Sarah Morgan.2
Marriage 15 April 1850 Mary Jane Ann was married to Henry Pickering, son of Gowan Pickering and Mary Ann Toft, on Monday, 15 April 1850 at St Peters Church of England, Enfield, NSW, AustraliaG.1,3
Death 4 October 1911 Mary Jane Ann Meredith died on Wednesday, 4 October 1911 at 98 Derwent Street, Glebe, NSW, AustraliaG, at age 78.1,3
Burial 6 October 1911 She was buried on 6 October 1911 at Church of England Section, Rookwood Cemetery, Sydney, NSW, AustraliaG.1
Married Name 1850 As of 15 April 1850, her married name was Pickering.1
Henry Pickering b. 2 Oct 1827, d. 7 Nov 1893
Sarah Jane Pickering1 b. 11 Apr 1851
Frederick George Pickering1 b. 20 May 1853 or 28 May 1853, d. 11 Apr 1898
Charles Henry Cohan Pickering1 b. 22 Sep 1855, d. 24 Jul 1906
Mary Jane Pickering1 b. 1858, d. Jan 1859
William Henry Pickering1 b. 22 Mar 1860, d. 28 Jul 1909
Ada Amey Pickering1 b. 15 Apr 1862, d. 23 May 1937
Henry Meredith Pickering4 b. 20 Aug 1864, d. 2 Feb 1911
James Pickering5 b. 1 Dec 1866, d. 16 Feb 1867
May R Pickering1,6 b. 31 Mar 1868, d. 30 Jun 1930
Unknown Pickering7
Horatio Pickering8 b. 17 Apr 1871, d. 3 Nov 1899
Lucy Alexandra Pickering9 b. 26 Jun 1873, d. 2 Sep 1939
Last Edited 27 Sep 2011
[S963] Diana Steele, "The Meredith Family," e-mail to Robert Mote, September 2011.
[S386] Loraine Johnson, "G & MJ Pickering," e-mail to Robert Mote, 8 August 2003.
[S2] Index of BDM records, NSW BDM, Place of Registration: Paddington; Year: 1864; Number: 3821.
[S2] Index of BDM records, NSW BDM, Place of Registration: Mudgee; Year: 1869; Number: 14384.
[S2] Index of BDM records, NSW BDM, Place of Registration: Maitland; Year: 1871; Number: 12527.
[S2] Index of BDM records, NSW BDM, Place of Registration: Gulgong; Year: 1873; Number: 14400.
Mary Pickering1
F, #29572, b. 3 October 1829, d. 17 June 1908
Father Gowan Pickering1 b. bt 1761 - 1773, d. 2 Oct 1851
Mother Mary Ann Toft1 b. c 1795, d. 26 Jan 1843
Birth 3 October 1829 Mary Pickering was born on Saturday, 3 October 1829 at Cooks River, NSW, AustraliaG.1
She was the daughter of Gowan Pickering and Mary Ann Toft.1
Marriage 1849 Mary was married to Jonathon Bennett in 1849 at Sydney, NSW, AustraliaG.1
Death 17 June 1908 Mary Pickering died on Wednesday, 17 June 1908 at Wallangat, NSW, AustraliaG, at age 78.
Burial 19 June 1908 She was buried on 19 June 1908 at Coolongolook, NSW, AustraliaG.
Married Name 1849 As of 1849, her married name was Bennett.1
Last Edited 6 Oct 2001
Jonathon Bennett1
Marriage 1849 Jonathon was married to Mary Pickering, daughter of Gowan Pickering and Mary Ann Toft, in 1849 at Sydney, NSW, AustraliaG.1
Jane Pickering1
F, #29574, b. 5 October 1832, d. 1901
Birth 5 October 1832 Jane Pickering was born on Friday, 5 October 1832 at Punchbowl, NSW, AustraliaG.1
Death 1901 Jane Pickering died in 1901.1
George Pickering1
M, #29575, b. 10 August 1847, d. 21 August 1930
Father George Pickering1 b. 11 Aug 1824, d. 9 Aug 1900
Mother Mary Ann Ibbotson1 b. 22 Aug 1831, d. 5 Jul 1909
Birth 10 August 1847 George Pickering was born on Tuesday, 10 August 1847 at Georges River, NSW, AustraliaG.1
He was the son of George Pickering and Mary Ann Ibbotson.1
Marriage 5 May 1875 George Pickering was married to Alice Ellen Ellison on Wednesday, 5 May 1875 at St Pauls Church of England, Sydney, NSW, AustraliaG.2,1,3
Death 21 August 1930 George Pickering died on Thursday, 21 August 1930 at Sutherland, NSW, AustraliaG, at age 83.1,4
Alice Ellen Ellison b. 1857, d. 1934
William John Charles Pickering+ b. 27 Oct 1882, d. 1938
[S2] Index of BDM records, NSW BDM, Place of Registration: Sydney; Year: 1875; Number: 447.
[S208] Certificate, marriage, NSW Registration Number: 1875/000447.
[S2] Index of BDM records, NSW BDM, Place of Registration: Sutherland; Year: 1930; Number: 15077.
Mary Ann Pickering1
F, #29576, b. 14 February 1850, d. 1909
Birth 14 February 1850 Mary Ann Pickering was born on Thursday, 14 February 1850 at Georges River, NSW, AustraliaG.1
She was the daughter of George Pickering and Mary Ann Ibbotson.1
Marriage 1869 Mary Ann was married to Henry William Hoare in 1869 at Paddington, NSW, AustraliaG.1
Marriage 1873 Mary Ann Pickering was married to James Shepherd Smith in 1873 at Paddington, NSWG.1
Marriage 1883 Mary Ann was married to Edwin Gee in 1883 at Sydney, NSW, AustraliaG.1
Death 1909 Mary Ann Pickering died in 1909 at Woollahra, NSW, AustraliaG.1
Married Name 1869 As of 1869, her married name was Hoare.1
Married Name 1873 As of 1873, her married name was Smith.1
Married Name 1883 As of 1883, her married name was Gee.1
Henry William Hoare1
Birth 1846 Henry William Hoare was born in 1846.1
Marriage 1869 Henry William was married to Mary Ann Pickering, daughter of George Pickering and Mary Ann Ibbotson, in 1869 at Paddington, NSW, AustraliaG.1
Death 1871 Henry William Hoare died in 1871 at Paddington, NSWG.1
James Shepherd Smith1
Birth 1846 James Shepherd Smith was born in 1846.1
Marriage 1873 He was married to Mary Ann Pickering, daughter of George Pickering and Mary Ann Ibbotson, in 1873 at Paddington, NSW, AustraliaG.1
Death 1881 James Shepherd Smith died in 1881.1
Edwin Gee1
Birth 1840 Edwin Gee was born in 1840.1
Marriage 1883 Edwin was married to Mary Ann Pickering, daughter of George Pickering and Mary Ann Ibbotson, in 1883 at Sydney, NSW, AustraliaG.1
Death 1894 Edwin Gee died in 1894.1
William James Pickering1
M, #29580, b. 1 June 1853, d. 15 July 1929
Birth 1 June 1853 William James Pickering was born on Wednesday, 1 June 1853 at Georges River, NSW, AustraliaG.1
Marriage 11 October 1875 William James was married to Mary Ann Kirkby on Monday, 11 October 1875 at St Davids, Surry Hills, NSW, AustraliaG.1
Marriage 1902 William James was married to Isabella J Murphy in 1902 at Sydney, NSW, AustraliaG.1
Death 15 July 1929 William James Pickering died on Monday, 15 July 1929 at Oatley, NSW, AustraliaG, at age 76.1
Occupation William James Pickering was a fencer.1


text:
Q: Multiple item selection by pressing ctrl button Currently my function looks like that
http://jsfiddle.net/tt13/5CxPr/13/
as you see, now when I click one by one multiple rows, it will make them selected.
What I want to do is, to select multiple rows by pressing ctrl+left-click and one and only selection with only one - left click (I mean remove previous selected and select last clicked one; just like windows icon selection). How can I modify current code?

A: Try this:
$(".subject").live('click',function(event) {
    event.preventDefault();

    if(event.ctrlKey) {
          $(this).toggleClass('selected');
    } else {
          $(".subject").removeClass("selected");
          $(this).addClass("selected");
    }
});


text:
Subscriber login Close [x]
Forgot Password? To subscribe, click here
Analysis & Insights
People & Opinion
Wine brand news
European wine news
Americas wine news
Asia Pacific wine news
African wine news
Harvest Reports
Spirit brand news
Spirit by type
On-Trade
Multiple Retailer
Harpers Bespoke
SITT
Harpers Design Awards
Wine Stars
Majestic Wine sales soar, but profits slide
By Jo Gilbert
Majestic's financial year 2016 results show that while reported sales increased 41.3% to £402.1m, adjusted profits before taxes declined 30.3% to £15.0m for the same period as the company invests in a three-year transformational plan.
The figures full year results are for the year ending 28 March 2016.
"We have taken the first step on a long journey - it was a good start but it is just the first step. Early signs are that the plan is starting to work. Strong sales figures reflect the hard work being done on the ground by the whole team," said chief executive Rowan Gormley.
The slide in adjusted profits were costs related to the acquisition the Naked Wine business and investments made in the course of the retail business.
"There were about £11.5m of costs related to the Naked Wines acquisitions of which a large portion were paid out in shares which we had to account for. Additionally, there were associated costs that were related to new stores that needed to paid out as well. Although we have capped the expansion on the number of new stores moving forwarded, there were some residual costs," explained James Crawford, the chief executive officer for Majestic Wines PLC.
While profits did take a hit due to the acquisition costs, the level of investments in the business for FY2016 would have still eroded the figures.
"There is no skirting the issue that profits were down, but the level of investments in the business that we have made will drive sales and we will see the return on these costs in the coming years," said Crawford.
Sales were driven by an improvement in like-for-like sales in the retail business, which were up 4.8%, continued growth in Naked Wines business, which was up 27.3% and the commercial business growing sales by 7.9%.
According to John Colley, the managing director of Majestic Retail, the sales growth for Majestic was driven by a healthy Christmas trading period. "We had a good Christmas and the trading went reasonably well and that is a massive part of our trading year," said Colley.
Luke Jecks, the managing director of Naked Wines, said that the growth was being driven by the US market. He said: "We have had growth in all three markets. In the UK we saw year-on-year growth of 13.5%. In the US we had 49% growth in sales and in Australia we had 5% growth. We really spent the year recalibrating the recruitment part of the model we have and the US is really the growth engine at the moment."
The re-calibration of the recruitment model included a change in price points for the wines on offer and focusing on higher quality customers that were more engaged with the Naked Wines community.
For the commercial side of the business, led by Ben Nicholl, the past year was one of transition - but one that also helped drive growth.
"We have had above-market growth, but the year was one of transition where we have been investing in infrastructure."
Gormley's three-year transformational plan involves three stages with the aim ultimately having sales reach £500m by 2019.
"The management re-organistation is now complete, I am delighted with the teams we have in place across the Group," said Gormley.
Jo Gilbert
HWS - Jo Gilbert
Majestic Retail has "biggest ever Christmas" during bumper trading period
The week that was: top news, Q&As and opinion on Harpers.co.uk
Majestic at "tipping point" as sales rise but profits fall
Harpers Newsletters
Condor Wines: Sales & Marketing Executive
Harpers Wine and Spirit
Harpers latest digital edition, plus all archived editions, can be found here.
Wine Stars Awards
Judged by buyers for buyers, the only wine competition assessing quality, value and design for a rigorous audit of each entry.
Supplements and Special Reports
You can now view the latest Harpers supplement with our digital edition....
Tweets by HarpersWine
Wine in a can? Well yes, maybe…
Villa Maria hires Matt Deller
Essex farmer claims first British Baijiu
NZ tasting: alternative styles playing e...
Events guide 2020: What not to miss
Saunders pinpoints 2020 as 'revolutionar...
Barbados rum GI standoff
Agile Publications
© Agile Media Ltd 2020. All rights reserved. Agile Media Ltd. Registered office:
56-58 Church Walk, Burgess Hill, West Sussex, RH15 9AN
Registered in England No. 6646125. VAT No. 938 4452 95


text:
\section*{Abstract}
\begin{small}
The ability to understand and manipulate numbers and quantities emerges during childhood, but the mechanism through which humans acquire and develop this ability is still poorly understood. In particular, it is not known whether acquiring such a {\em number sense} is possible without supervision from a teacher.

We explore this question through a model, assuming that the learner is able to pick and place small objects and will spontaneously engage in undirected manipulation. We further assume that the learner's visual system will monitor the changing arrangements of objects in the scene and will learn to predict the effects of each action by comparing perception with the efferent signal of the motor system. We model perception using standard deep networks for feature extraction and classification, and gradient descent learning.

Our main finding is that, from learning the unrelated task of action prediction, an unexpected image representation emerges exhibiting regularities that foreshadow the perception and representation of numbers and quantity. These include distinct categories for zero and the first few natural numbers, a strict ordering of the numbers, and a one-dimensional signal that correlates with numerical quantity. As a result, our model acquires the ability to estimate {\em numerosity}, i.e. the number of objects in the scene, as well as {\em subitization}, i.e. the ability to recognize at a glance the exact number of objects in small scenes. Remarkably, subitization and numerosity estimation extrapolate to scenes containing many objects, far beyond the three objects used during training.

We conclude that important aspects of a facility with numbers and quantities may be learned without teacher supervision.
\end{small}

\section*{Introduction}

Mathematics, one of the most distinctive expressions of human intelligence, is founded on the ability to reason about abstract entities. We are interested in the question of how humans develop an intuitive facility with numbers and quantities, and how they come to recognize numbers as an abstract property of sets of objects.  There is wide agreement that innate mechanisms play a strong role in developing a {\em number sense}~\cite{xu2005number,dehaene2011number,viswanathan2013neuronal}, that development and learning also play an important role~\cite{dehaene2011number}, that naming numbers is not necessary for the perception of quantities~\cite{gordon2004numerical,pica2004exact}, and that specific brain areas are involved in processing numbers~\cite{dehaene1999sources,harvey2013topographic}. As to the role of learning, we do not yet know whether developing a number sense requires a teacher's supervision or whether unsupervised learning is sufficient.

The role of supervised learning in developing abilities that relate to the natural numbers and estimation has been recently explored using computational models. Fang et al.~\cite{fang2018can} trained a recurrent neural network to count sequentially and Sabathiel et al.~\cite{sabathiel2020emerging} showed that a neural network can be trained to anticipate the actions of a teacher on three counting-related tasks -- they find that specific patterns of activity in the network's units correlate with quantities. The ability to perceive {\it numerosity}, i.e. a rough estimate of the number of objects in a set, was explored by Stoianov, Zorzi and Testolin~\cite{stoianov2012emergence,zorzi2018emergentist}, who trained a deep network encoder to efficiently reconstruct patterns composed of dots, and found that the network developed units or `neurons' that were coarsely tuned to quantity, and by Nasr et al.~\cite{2019numbnasrer}, who found the same effect in a deep neural network that was trained on visual object classification, an unrelated task. In these models quantity-sensitive units are an emergent property. In a recent study, Kim et al.~\cite{kim2021visual} observed that a random network with no training will exhibit quantity-sensitive units.

It thus intuitive that supervised learning is sufficient for training perception to estimate quantities. This is because emergent quantity-tuned units that are observed in previous studies will be automatically recruited as an input by a supervised classifier that is trained to estimate numerosity. Is supervised learning, i.e. the intervention of an external teacher, also necessary? We are interested in the question of whether the natural numbers, as an ordered set of abstract concepts, as well as the effortless and spontaneous perception of quantity, may instead be learned without explicit supervision.

We explore the hypothesis that a facility with numbers and quantities may arise without the help of a teacher -- we call this {\em unsupervised learning} following computer science nomenclature.
We focus on the interplay of action and perception as a possible avenue for this to happen. More specifically, we explore whether perception, as it is naturally trained during object manipulation, may develop representations that support a number sense. In order to test this hypothesis we propose a model where perception learns how specific actions modify the world. The model shows that perception develops a representation of the scene which, as an emergent property, can enable the ability to manipulate numbers and estimate quantities at a glance~\cite{jevons1871power,piazza2002subitizing}. Thus, we find that a teacher is not needed.

In order to ground intuition, consider a child who has learned to pick up objects, one at a time, and let them go at will. Imagine the child sitting comfortably and playing with small toys (acorns, Legos, sea shells) which may be dropped into a bowl. We will assume that the child has already learned to perform, and tell apart, three distinct operations. The {\em put} (P) operation consists of picking up an object from the surrounding space and dropping it into the bowl. The {\em take} (T) operation consists in doing the opposite: picking up an object from the bowl and discarding it. The {\em shake} (S) operation consists of agitating the bowl so that the objects inside change their position randomly without falling out. Objects in the bowl may be randomly moved during put and take as well. We hypothesize that the visual system of the child is progressively becoming sensitive to the changes that are caused by manipulation~\cite{singer2018sensory}. As a result, the visual system is progressively trained through spontaneous play to predict (or, more accurately, post-dict) which operation took place that changed the appearance of the bowl: was it a put, a take or a shake?

\begin{figure}
\begin{center}
    \includegraphics[width=\linewidth]{/model/model-schematics-6.pdf}
\end{center}
\vspace{-0.4cm}
\linespread{1} \caption{\small {\bf Schematics of our model.} {\bf \textbf{(A)}} (Bottom-to-top) The scene changes as a result of manipulation. The images $x_t$ and $x_{t+1}$ of the scene before and after manipulation are mapped by perception into representations $z_t$ and $z_{t+1}$. These are compared by a classifier to predict which action took place. Learning monitors the error between predicted action and the efferent copy of the actual action, and updates simultaneously the weights of both perception and the classifier to increase prediction accuracy. {\bf (B)} (Bottom-to-top) Our model of perception is a hybrid neural network composed of the concatenation of a convolutional neural network (CNN) with a fully-connected network (FCN 1). The classifier is implemented by a fully connected network (FCN 2) which compares the two representations $z_t$ and $z_{t+1}$. The two perception networks are actually the same network operating on distinct images and therefore their parameters are identical and learned simultaneously  in a {\em Siamese network} configuration~\cite{bromley1994signature}. Details of the models are given in \textbf{Fig. \ref{fig:network_details}}.}
\label{fig:model-schematics}
\label{fig:network}
\vspace{0.3in}
\begin{center}
    \renewcommand{\thesubfigure}{\Alph{subfigure}}
    \begin{subfigure}{1\textwidth}
        \includegraphics[width=1\linewidth]{/datasets/dataset1_sequence.pdf}
        \caption{}
        \label{fig:main_data_env1}
    \end{subfigure}
    \begin{subfigure}{1\textwidth}
        \includegraphics[width=1\linewidth]{/datasets/dataset2_sequence.pdf}
        \caption{}
        \label{fig:main_data_env2}
    \end{subfigure}
\end{center}
\vspace{-1.2cm}
\linespread{1} \caption{\small {\bf Training image sequence samples.} We trained our model using sequences of images that were generated by randomly concatenating take (T), put (P) and shake (S) manipulations, while limiting the number of objects to the $\left\{ 0 \dots 3 \right\}$ set (see Methods - Training Sets). We experimented with two different environment/scene statistics: {\bf (A)} Identical objects (15x15 pixel squares) with random position. {\bf (B)} Objects (squares) of variable position, size and contrast. The overall image intensity is a poor predictor of cardinality in this dataset (statistics in \textbf{Fig. \ref{fig:dataset_statistics}}). Note that some of the objects in (B) have very low contrast and may not be visible on all displays. }
\label{fig:main_data}
\end{figure}

A number of perceptual maps are known to arise during development, each one of which contains mechanisms that are tuned to specific scene properties, as simple as orientation~\cite{hubel1962receptive} and boundaries~\cite{von1984illusory}, and as complex as  faces~\cite{tsao2006cortical} and objects~\cite{tsao2003faces,hung2005fast}. We propose that, while the child is playing, the visual system is being trained to use one or more such maps to build a representation that facilitates the comparison of the pair of images that are seen before and after a manipulation. Simultaneously, a classifier network is trained to predict the action (P,T,S) from the representation of the pair of images (see \textbf{Fig.~\ref{fig:network}}). Using a simple model of this putative mechanism, we find that the image representation that is being learned for classifying actions, simultaneously learns to represent and perceive the first few natural numbers, to place them in the correct order, from zero to one and beyond, as well as estimate the number of objects in the scene.

\section*{Results}

We postulate that the efferent signals from the motor system are available to the visual system and are used as a supervisory signal (\textbf{Fig~\ref{fig:model-schematics}A}). Such signals provide information regarding the three actions of put, take and shake and, accordingly, perception may be trained to predict these three actions. Note that {\em no explicit signal indicating the number of objects in the scene is available to the visual system} at any time.

We use a standard deep learning model of perception~\cite{lecun1998gradient,krizhevsky2012imagenet,lecun2015deep}:  a {\em feature extraction} stage is followed by a {\em classifier} (\textbf{Fig.~\ref{fig:model-schematics}B}). The feature extraction stage maps the image $x$ to an internal representation $z$, often called an {\em embedding}. It is implemented by  a deep network~\cite{krizhevsky2012imagenet} composed of convolutional layers (CNN) followed by fully connected layers (FCN 1).  The classifier, implemented with a simple fully connected network (FCN 2), compares the representations $z_t$ and $z_{t+1}$ of the {\em before} and {\em after} images to predict which action took place. Feature extraction and classification are trained jointly by minimizing the prediction error. We find that the embedding dimension makes little difference to the performance of the network (\textbf{Fig. \ref{fig:embedding_dimension_fig}}). Thus, for ease of visualization, we settled on two dimensions.

We carried out train-test experiments using sequences of synthetic images containing a small number of randomly arranged objects (\textbf{Fig.~\ref{fig:main_data}}).  When training we  limited the top number of objects to three (an arbitrary choice), and each pair of subsequent images was consistent with one of the manipulations (put, take, shake). We ran our experiments twice with different object statistics. In the first dataset the objects were identical squares, in the second they had variable size and contrast. In the following we refer to the model trained on the first dataset as \textit{Model 1} and the model trained on the second dataset as \textit{Model 2}.

\begin{figure}
\begin{center}
    \renewcommand{\thesubfigure}{\Alph{subfigure}}
    \includegraphics[width=1\linewidth]{action_prediction_task/action_prediction_task_error_model_comparison.pdf}
\end{center}
\linespread{1} \caption{\small {\bf Action classification performance.} The network accurately classifies actions up to the training limit of three objects, regardless of the statistics of the data (the x axis indicates the number of objects in the scene before the action takes place). Error increases  when the number of objects in the test images exceeds the number of objects in the training set. 95\% Bayesian confidence intervals are shown by the shaded areas (272 $\leq$ N $\leq$ 360). The gray region highlights test cases where the number of objects exceeds the number in the training set.}
\label{fig:errors}
\end{figure}

We found that models learn to predict the three actions on a test set of novel image sequences (\textbf{Fig.~\ref{fig:errors}}) with an error below 1\% on scenes up to three objects (the highest number during training). Performance degrades progressively for higher numbers beyond the training range. Model 2's error rate is higher, consistently with the task being harder. Thus, we find that our model learns to predict actions accurately. However, there is little ability to generalize the task to scenes containing previously unseen numbers of objects. This will become relevant later.

\begin{figure}
\begin{center}
    \renewcommand{\thesubfigure}{\Alph{subfigure}}
    \hspace*{-1.2cm}
    \begin{subfigure}{0.48\textwidth}
        \includegraphics[width=1\linewidth]{embedding_space_plots/embedding2_ground_truth.pdf}
        \caption{}
        \label{fig:embedding_space_ground_truth}
    \end{subfigure}
    \begin{subfigure}{0.48\textwidth}
        \includegraphics[width=1\linewidth]{embedding_space_plots/embedding2_unsupervised.pdf}
        \caption{}
        \label{fig:embedding_space_clusters}
    \end{subfigure}
    \begin{subfigure}{1\textwidth}
        \includegraphics[width=1\linewidth]{embedding_space_plots/embedding2_confusion_matrix.pdf}
        \caption{}
        \label{fig:embedding_space_heatmap}
    \end{subfigure}
\end{center}
\vspace{-1cm}
\linespread{1} \caption{\textbf{Visualizing the embedding space for Model 2.} To explore the structure of the embedding space, we generated a dataset with $\left\{ 0 \dots 30 \right\}$ objects, extending the number of objects far beyond the limit of 3 objects in the training task. Each image in the dataset was passed through Model 2 and the output (the internal representation/embedding) of the image is shown. \textbf{(A)} Each dot indicates an image embedding and the embeddings happen to be arranged along a line. The number of objects in each image is color coded. The smooth gradation of the color suggests that the embeddings are arranged monotonically with respect to the number of objects in the corresponding image. The inset shows that the embeddings of the images that contain only a few objects are arranged along the line into `islands'. \textbf{(B)} We apply an unsupervised clustering algorithm to the embeddings. Each cluster that is discovered is denoted by a specific color. The cluster X, denoted by black crosses, indicates points that the clustering algorithm excluded as outliers.
\textbf{(C)} The confusion matrix shows that the clusters that are found by the clustering algorithm correspond to numbers. Images containing 0 - 6 objects are neatly separated into individual clusters; after that images are collected into a large group that is not in one-to-one correspondence with the number of objects in the image. Note that the color scale is logarithmic (base 10).}
\label{fig:embedding_space}
\end{figure}

When we examined the structure of the embedding we were intrigued to find a number of unexpected regularities (\textbf{Fig.~\ref{fig:embedding_space}}). First, the images' representations do not spread across the embedding, filling the available dimensions, as is usually the case. Rather, they are arranged along a one-dimensional structure. This trait is very robust to extrapolation: after training (with up to three objects), we computed the embedding of novel images that contained up to thirty objects and found that the line-like structure persisted (\textbf{Fig.~\ref{fig:embedding_space_ground_truth}}). This {\it embedding line} is also robust with respect to the dimensions of the embedding -- we tested from two to 256 and observed it each time.

Second, images are arranged almost monotonically along the embedding line according to the number of objects that are present (\textbf{Fig.~\ref{fig:embedding_space_ground_truth}}). Thus, the representation that is developed by the model contains an order. We were curious as to whether the {\em embedding coordinate}, i.e. the position of an image along the embedding line, may be used to estimate the number of objects in the image. Any one of the features that make up the coordinates of the embedding provides a handy measure for this position, measured as the distance from the beginning of the line -- the value of these coordinates may be thought of as the firing rate of specific neurons~\cite{roitman2007monotonic}.
We tested this hypothesis both in a relative and in an absolute quantity estimation task.  First, we used the embedding coordinate to compare the number of objects in two different images and assess which is larger, and found very good accuracy (\textbf{Fig.~\ref{fig:psychometric_curves}}). Second, assuming that the system may self-calibrate, e.g. by using the `put' action to estimate a unit of increment, then an absolute measure of quantity may be computed from the embedding coordinate.  We tested this idea by computing such a {\em perceived number} against the actual count of objects in images (\textbf{Fig.~\ref{fig:unsupervised_numerosity}}). The estimates turn out to be quite accurate, with a slight underestimate that increases as the numbers become larger. Both relative and absolute estimates of quantity were accurate as far as thirty objects (we did not test beyond this number), which far exceeds the training limit of three. We looked for image properties, other than `number of objects', that might drive the estimate of quantity and we could not find any convincing candidate (see Methods and {\bf Fig.~\ref{fig:covariates}}).

Third, image embeddings separate out into distinct `islands' at one end of the embedding line (\textbf{Fig.~\ref{fig:embedding_space_ground_truth} inset}). The brain is known to spontaneously cluster perceptual information~\cite{wertheimer1938laws,harvey2013topographic}, and therefore we tested empirically whether this form of unsupervised learning may be sufficient to discover distinct categories of images/scenes from their embedding. We found that unsupervised learning successfully discovers the clusters with very few outliers in both Model 1 and the more challenging Model 2 (\textbf{Fig.~\ref{fig:embedding_space_clusters}}).

Fourth, the first few clusters discovered by unsupervised learning along the embedding line are in almost perfect one-to-one correspondence with groups of images that share the same number of objects (\textbf{Figs. \ref{fig:embedding_space_heatmap}}).
Once such distinct {\em number categories} are discovered, they may be used to classify images. This is because the model maps the images to the embedding, and the unsupervised clustering algorithm can classify points in the embedding into number categories. Thus, our model learns the ability to carry out instant association of images with a small set of objects with the corresponding number category.

A fifth property of the embedding is that there is a limit to how many distinct number categories are learned. Beyond a certain number of objects one finds large clusters  which are no longer number-specific (\textbf{Fig.~\ref{fig:embedding_space}}). I.e. our model learns distinct categories for the numbers between zero and eight, and additional larger categories for, say, ``more than a few'' and for ``many''.

There is nothing magical in the fact that during training we limited the number of objects to three -- the regularities we observed are robust with respect to the choice of the number of objects that are used in training the action classifier (\textbf{Fig.~\ref{fig:trainx_test8},~\ref{fig:extra_embeddings}}).

\begin{figure}
\begin{center}
    \renewcommand{\thesubsuppfigure}{\Alph{subsuppfigure}}
    \hspace*{1.2cm}
    \includegraphics[width=0.6\linewidth]{perception_figures/comparison_task_image_panel.pdf}\\
    \vspace{0.3in}
    \includegraphics[width=0.8\linewidth]{perception_figures/proportion_more_figure.pdf}
\end{center}
\vspace{-0.5cm}
\linespread{1} \caption{\small \textbf{Comparative estimation of quantity.}  Two images may be compared for quantity~\cite{burr2008visual} by computing their embedding and observing their position along our model's embedding line: the image that is furthest along the line is predicted to contain more objects. Here images containing a {\em test number} of objects (see three examples above containing N=12, 16 and 20 objects) are compared with images containing the {\em reference} number of objects (orange line, N=16). The number of objects in the test image is plotted along the x axis and the proportion of comparisons that result in a `more' response are plotted on the y-axis (blue line). Human data from 10 subjects~\cite{maldonado2020adaptation} is plotted in green.
}
\label{fig:psychometric_curves}
\end{figure}

\begin{figure}
\begin{center}
    \renewcommand{\thesubfigure}{\Alph{subfigure}}
    \hspace*{-1.3cm}
    \includegraphics[width=\linewidth]{perception_figures/perceived_numerosity.pdf}
\end{center}
\linespread{1} \caption{\small \textbf{Unsupervised numerosity perception.} The position of images in the embedding space fall along a straight line that starts with 0, and continues monotonically with an increasing number of objects. Thus, the position of an image in the embedding line is an estimate for the number of objects in the scene. Here we demonstrate the outputs of such a model, where we rescale the embedding coordinate (an arbitrary unit) so that one unit of distance matches the distance between the ``zero'' and the ``one'' clusters. The y-axis represents such perceived numerosity, which is not necessarily an integer value. The red line indicates perfect prediction.  Each violin plot (light blue) indicates the distribution of perceived numerosities for a given ground-truth number of objects. The width of the distributions for the higher counts indicates that perception is subject to errors. There is a slight underestimation bias for higher numbers, consistent with that seen in humans~\cite{izard2008calibrating,krueger1982single}. In fact, Krueger shows that human numerosity judgements (on images with 20 to 400 objects) follow a power function with an exponent of $0.83 \pm 0.2$. The green line and its shadow depict the range of human numerosity predictions on the same task. The orange lines are power function fits for seven models trained in the same fashion as Model 2 with different random initializations.
}
\label{fig:unsupervised_numerosity}
\end{figure}

\section*{Discussion}
Our model and experiments demonstrate that a number sense may be learned by an agent that freely engages in object manipulation without supervision from a teacher. The two mechanisms of the model, deep learning and unsupervised clustering, are computational abstractions of mechanisms that have been documented in the brain.
The model observes the effect of manipulation on small sets of objects and learns to predict actions. The image representation that is developed in the process presents emergent regularities which confer to the model a number of unexpected properties.

First, the model discovers the structure underlying the integers. The first few numbers, from zero to six, say, emerge as categories from spontaneous clustering of the embeddings of the corresponding images. Clustered topographic numerosity maps observed in human cortex may be viewed as confirming this prediction~\cite{harvey2013topographic}. These number categories are naturally ordered by their position on the embedding line, a fundamental property of numbers. The ability to think about numbers may be thought as a necessary, although not sufficient, step towards counting, addition and subtraction~\cite{feigenson2004core,dehaene2009origins}. The dissociation between familiarity with the first few numbers and the ability to count has been observed in hunter-gatherer societies~\cite{pica2004exact} suggesting that these are distinct steps in cognition.

Second, instant classification of the number of objects in the scene is enabled by the emergence of number categories in the embedding. This predicts a well-known capability of humans,  commonly called {\em subitization}~\cite{jevons1871power,burr2011adaptation}, limited to the first few numbers, a property we observe in our model as well.

Third, a linear structure, which we call {\em embedding line}, where images are ordered according to quantity, is an emergent representation. This prediction is strongly reminiscent of the {\em mental number line} which has been postulated in the psychology literature~\cite{restle1970speed,dehaene1993mental,dehaene2004arithmetic,rugani2015number}. The embedding line confers to the model the ability to estimate quantities both in relative comparisons and in absolute judgments. The model predicts the ability to carry out relative estimation, absolute estimation, as well as the tendency to slight underestimation in absolute judgments. These predictions are confirmed in the psychophysics literature~\cite{burr2008visual,izard2008calibrating}.

Fourth, subitization and numerosity estimation extend far beyond the number of objects using in training. While the model trains itself to classify actions using up to three objects, subitization extends to 5-8 objects and numerosity estimation extends to at least thirty, which is as far as we tested. Extrapolating from the training set is a hallmark of abstraction, which eludes most supervised models~\cite{trask2018neural}.

The model is simple and essentially {\em parameter-free}, in that our observations are robust with respect to large variations in the dimension of the embedding, the number of objects in the training set and the tuning parameters of the clustering algorithm. Yet, the model accounts qualitatively and, to some extent, quantitatively for a disparate set of observations by psychologists, psychophysicists and cognitive scientists.

There is a debate in the literature on whether estimation and subitization are supported by the same mechanisms or separate ones~\cite{burr2008visual,cheyette2020unified}. Our model suggests a solution that will please both sides: both perceptions rely on a common representation, the embedding. However, the two depend on different mechanisms that take input from this common representation. Furthermore, our model predicts that adaptation affects estimation, but not subitzation. This is because subitization solely relies on classifiers, which allows for a direct estimate of quantity. Estimation, however, relies on an analog variable, the coordinate along the embedding line, which requires calibration. These predictions are confirmed in the psychophysics literature~\cite{izard2008calibrating,burr2008visual}. Our model predicts the existence of summation units, which have been documented in the physiology literature~\cite{roitman2007monotonic} and have been postulated in previous models~\cite{verguts2004representation}. It does not rule out the simultaneous presence of other codes, such as population codes or labeled-line codes~\cite{nieder2016neuronal}.

It is important to recognize the limitations of our model: it is designed to explore the minimal conditions that are required for the emergence of a number sense, and abstracts over the details of a specific implementation in the brain.
For instance, we limit the model to vision, while it is known that multiple sensory systems may contribute, including hearing, touch and self-produced actions~\cite{amalric2018role,crollen2020visual,anobile2020sensorimotor}. Furthermore, the visual system serves multiple tasks, such as face processing, object recognition, and navigation. Thus, it is likely that multiple visual maps are simultaneously learned, and it is possible that our `latent representation' is shared with other visual modalities~\cite{2019numbnasrer}.  Additionally, we postulate that visually-guided manipulation, and hence the ability to detect and locate objects, is learned before numbers. Thus, it would perhaps be more realistic to consider input from an intermediate map where objects have been already detected and located, and are thus represented as `tokens', in visual space, and this would likely make the model's task easier, perhaps closer to Model 1 than to Model 2. However, making this additional assumption is not necessary for our observations.

Our investigation adds a concrete case study to the discussion on how abstraction may be learned without explicit supervision. While images containing, say, five objects will look very different from each other, our model discovers a common property, i.e. the number of items, which is not immediately available from the brightness distribution or other scene properties.  The mechanism driving such abstraction may be interpreted as an implicit {\em contrastive learning} signal~\cite{hadsell2006dimensionality}, where the {\em shake} action identifies pairs of images that ought to be considered as similar, while the {\em put} and {\em take} actions signal pairs of images that ought to be considered dissimilar, hence the clustering. However, there is a crucial difference between our model and traditional contrastive learning. In contrastive learning it is the designer who hand-crafts the similarity and dissimilarity training signals in order to achieve an intended learning goal. I.e. the abstraction is directly built into, not discovered by, the network. By contrast, in our model it is the network itself that associates a meaning of `close' and `far' to the P,T,S actions, and ultimately discovers the abstraction. This abstraction is surprisingly strong -- while the primary supervised task, action classification, does not generalize well beyond the three objects used in training, the unsupervised abstractions of number and quantity extend far beyond it.

\section*{Methods}

\subsection*{Network Structure}
\label{sec:structure}

The network we train is a standard deep network~\cite{lecun2015deep} composed of two stages. First, a feature extraction network maps the original image of the scene into an embedding space (\textbf{Fig. \ref{fig:network}A}). Second, a classification network takes the embedding of two sequential images and predicts the action that modified the first into the second (\textbf{Fig. \ref{fig:network}B}). Given the fact that the classification network takes the embedding of two distinct images as its input, each computed by identical copies of the feature extraction network, the latter is trained in a Siamese configuration~\cite{bromley1994signature}.

The feature extraction network is a 9-layer CNN followed by two fully connected layers (details in \textbf{Fig.~\ref{fig:network_details}A}). The first 3 layers of the feature extraction network are from AlexNet~\cite{krizhevsky2012imagenet} pre-trained on ImageNet~\cite{deng2009imagenet} and are not updated during training. The remaining four convolutional layers and two fully connected layers are trained in our action prediction task.

The dimension of the output of the final layer is a free parameter (it corresponds to the number of features and to the dimension of the embedding space). In a control experiment we varied this dimension from one to 256, and found little difference in the action classification error rates (\textbf{Fig.~\ref{fig:embedding_dimension_fig}}). We settled for a two-dimensional output for the experiments that are reported here.

The classification network is a two-layer fully connected network that outputs a three-dimensional one-hot-encoding vector indicating a put, take or shake action (details in
\\\textbf{Fig.~\ref{fig:network_details}B}).

\subsection*{Training procedure}
The network was trained with a negative log-likelihood loss (NLL loss) function with a learning rate of 1e-4. The NLL loss calculates error as the -log of the probability of the correct class. Thus, if the probability of the correct class is low (near 0), the error is higher. The network was trained for 30 epochs with 30 mini-batches in each epoch. Each mini-batch was created from a sequence of 180 actions, resulting in 180 image pairs. Thus, the network saw a total of 162,000 unique pairs of images over the course of training.

We tested for reproducibility by training Model 2 thirty times with different random initializations of the network and different random seeds in our dataset generation algorithm. The embeddings for these reproduced models are shown in {\bf Figure \ref{fig:extra_embeddings}}.

\subsection*{Training sets}
\label{sec:training-stats}

We carried out separate experiments using synthetic image sequences where objects were represented by randomly positioned squares. The images are 244x244 pixels (px) in size. Objects were positioned with uniform probability in the image, with the exception that they were not allowed to overlap and a margin of at least 3px clearance between them was imposed. We used two different statistics of object appearance: identical size (15px) and contrast (100\%) in the first, and variable size (10px - 30px) and contrast (9.8\% - 100\%) in the second (\textbf{Fig.~\ref{fig:main_data}}). Mean image intensity statistics for the two training sets are shown in \textbf{Figure \ref{fig:dataset_statistics}}. The mean image intensity is highly correlated with the number of objects in the first dataset, while it is ambiguous and thus not very informative in the second. We studied a number of other potential correlates  and we were unable to find an image property that would `explain away' the abstraction of number (\textbf{Fig.\ref{fig:covariates}}). We note that a principled analysis of the information that is carried out by individual object images is still missing from the literature~\cite{testolin2020visual} and this point deserves more attention.

Each training sequence was generated starting from zero objects, and then selecting a random action (put, take, shake) to generate the next image. The take action is meaningless when the scene contains zero objects and was thus not used there. We also discarded put actions when the objects reached a maximum number. This limit was three for most experiments, but limits of five and eight objects were also explored (\textbf{Fig.~\ref{fig:trainx_test8}}).

\subsection*{Test sets}
In different experiments we allowed up to eight objects per image (\textbf{Figs. \ref{fig:errors}, \ref{fig:trainx_test8}}) and thirty objects per image (\textbf{Figs. \ref{fig:embedding_space}, \ref{fig:psychometric_curves}, \ref{fig:unsupervised_numerosity}}) in order to assess whether the network can generalize to tasks on scenes containing previously unseen numbers of objects. The first test set (up to 8 objects) was generated following the same recipe as the training set. The second test (up to 30 objects) set was generated to have random images with the specified number of objects (without using actions), this test set is guaranteed to be balanced.

\subsection*{Action classification performance}
To visualize how well the model was able to perform the action classification task, we predict actions between pairs of images in our first test set. The error, calculated by comparing the ground truth actions to the predicted actions, is plotted with respect to the number of objects in the visual scene at $x_t$. 95\% Bayesian confidence intervals with a uniform prior were computed for each data point, and a lower bound on the number of samples is provided in the figure captions (\textbf{Figs. \ref{fig:errors}, \ref{fig:embedding_dimension_fig}, \ref{fig:trainx_test8}}).

\subsection*{Interpreting the embedding space}
We first explored the structure of the embedding space by visualizing the image embeddings in two dimensions.  The points, each one of which corresponds to one image, are not scattered across the embedding. Rather, they are organized into a structure that exhibits five salient features: (a) the images are arranged along a one-dimensional structure, (b) the ordering of the points along the line is (almost) monotonic with respect to the number of objects in the corresponding images, (c) images are separated into groups at one end of the embedding, and these groups are discovered by unsupervised learning, (d) these first few clusters are in one-to-one correspondence with the first few natural numbers, (e) there is a limit to how many number-specific clusters are discovered (\textbf{Fig. \ref{fig:embedding_space}}).

To verify that the clusters can be recovered by unsupervised learning we applied a standard clustering algorithm, and found almost perfect correspondence between the clusters and the first few natural numbers (\textbf{Fig. \ref{fig:embedding_space_clusters}}). The clustering algorithm used was the default Python implementation of HDBSCAN \cite{McInnes2017}. HDBSCAN is a hierarchical, density based clustering algorithm, and we used the euclidean distance as an underlying metric \cite{campello2013density}. HDBSCAN has one main free parameter, the minimum cluster size, which was set to 70 in \textbf{Figure \ref{fig:embedding_space}}. All other free parameters were left at their default values. Varying the minimum cluster size between 5 and 80 does not have an effect on the first few clusters, although it does create variation in the number and size of the later clusters. Beyond 80, the algorithm finds only three clusters corresponding to 0, 1 and greater than 1.

One additional structure is not evident from the the embedding and may be recovered from the action classifier: the connections between pairs of clusters. For any pair of images that are related by a manipulation, two computations will be simultaneously carried out; first, the supervised action classifier in the model will classify the action as either P, T, or S (\textbf{Fig.~\ref{fig:errors}}) and, at the same time, the unsupervised subitization classifier (\textbf{Fig.~\ref{fig:model1_clustering_unsup}}) will assign each image in the pair to the corresponding number-specific cluster. As a result, each pair of images that is related by a P action provides a directed link between a pair of clusters (\textbf{Fig.~\ref{fig:model1_clustering_unsup}, red arrows}), and following such links one may traverse the sequence of numbers in an ascending order. The T actions provide the same ordering in reverse (blue arrows). Thus, the clusters corresponding to the first few natural numbers are strung together like the beads in a necklace, providing an unambiguous ordering that starts from zero and proceeds through one, two etc. (\textbf{Fig.~\ref{fig:model1_clustering_unsup}}). The numbers may be visited both in ascending and descending order. As we pointed out earlier, the same organization may be be obtained more simply by recognizing that the clusters are spontaneously arranged along a line, which also supports the natural ordering of the numbers~\cite{dehaene1995towards,zorzi2002neglect,dehaene2004arithmetic}. However, {\em the connection between the order of the number concepts, and the actions of put and take, will support counting, sum and subtraction}.

To estimate whether the embedding structure is approximately one-dimensional and linear in higher dimensions we computed the one-dimensional linear approximation to the embedding line, and measured the average distortion of using such approximation for representing the points. More in detail, we first defined a mean-centered embedding matrix with M points and N dimensions, each point corresponding to the embedding of an image. We then computed the best rank 1 approximation to the data matrix by computing its singular value decomposition (SVD) and zeroing all the singular values beyond the first one. If the embedding is near linear, this rank 1 approximation should be quite similar to the original matrix. To quantify the difference between the original matrix and the approximation, we calculated the element-wise residual (the Frobenius norm of the difference between the original matrix and the approximation), then computed the ratio of the Frobenius norm of the residual matrix and the Frobenius norm of the original matrix. The nearer the ratio is to 0, the smaller the residual, and the better the rank 1 approximation. We call this ratio the {\em linear approximation error}, we show this error compared to some embeddings in {\bf Figure \ref{fig:extra_embeddings}}. We computed the embedding for dimensions 8, 16, 64, and 256, (one experiment each) and found ratios of 0.702\%, 2.23\%, 2.77\%, and 2.24\%, suggesting that they are close to linear.

\subsection*{Estimating relative quantity}
We can use the perceived numerosity to reproduce a common task performed in human psychophysics. Subjects are asked to compare a reference image to a test image and respond in a two-alternative-forced choice paradigm with `more' or `less'. We perform the same task using the magnitude of the embedding as the fiducial signal. The model responds with more if the embedding of the test image has a larger perceived numerosity than the reference image. The psychometric curves generated by our model are presented in \textbf{Figure \ref{fig:psychometric_curves}} and match qualitatively the available psychophysics~\cite{burr2008visual, krueger1982single}.

\subsection*{Estimating absolute quantity}
As noted above, the clusters are spaced regularly along a line and the points in the embedding are ordered by the number of objects in the corresponding images (\textbf{Fig. \ref{fig:embedding_topology_histogram}}). We postulate that the number of objects in an image is proportional to the distance of that image's embedding from the embedding of the empty image. Given the linear structure, any one of the embedding features, or their sum, may be used to estimate the position along the embedding line. In order to produce an estimate we use the embedding of the ``zero" cluster as the origin. The zero cluster is special, and may be detected as such without supervision, because all its images are identical and thus it collapses to a point. The distance between ``zero" and ``one", computed as the pairwise distance between points belonging to the corresponding clusters, provides a natural yardstick. This value, also learned without further supervision, can be used as a unit distance to to interpret the signal between 0 and n. This estimate of numerosity is shown in \textbf{Figure \ref{fig:unsupervised_numerosity}} against the actual number of objects in the image. We draw two conclusions from this plot. First, our unsupervised model allows an estimate of numerosity that is quite accurate, within 10-15\% of the actual number of objects. Second, the model produces a systematic underestimate, similar to what is observed psychophysically in human subjects~\cite{izard2008calibrating}.

\subsection*{Controlling for spurious correlates of `number'}
\label{sec-covariates}
\label{sec:covariates}
One may be concerned that image properties other than the abstraction of `object number' may be driving the quantity estimate. Indeed, {\em  confound variables} , such as the count of pixels that are not black, are correlated with object number and might play a role in the model's ability to estimate the number of objects in the scene.

We controlled for this hypothesis by exploiting the natural variability of our test set images. We postulated that overall brightness, the area of the envelope of the objects in the image, and total pixel area of the objects would be good candidates as confound variables that might affect estimation.

To explore this possibility we analyzed close-call relative estimate tasks (e.g. 16 vs 18 objects), where errors are frequent both for our model and for human subjects, and, while holding the numbers of objects constant in the two scenes, we studied the behavior of error rates as a function of fluctuations in the confound variables. One would expect more errors when comparing image pairs where quantities that typically correlate with the number of objects are anticorrelated in the specific example ({\bf Fig.~\ref{fig:covariates_examples}}). Conversely, one would expect lower error rates when the confound variables are positively correlated with number.

In {\bf Fig.~\ref{fig:covariates}} we plotted error rates vs each one of the confound variables. As is clear from the figure, we could not find large systematic biases even for extreme variations in the confound variables. In conclusion, we are unable to construct a convincing argument that any of the confound variables we studied is strongly implicated in the estimate of quantity.

\section*{Acknowledgements}
The California Institute of Technology and the Simons Foundation (Global Brain grant 543025 to PP) generously supported this work. We are very grateful to a number of colleagues who  provided references to the literature and insightful suggestions: Alessandro Achille, Katie Bouman, David Burr, Eli Cole, Jay MacClelland, Markus Meister,  Mario Perona, Giovanni Paolini,  Stefano Soatto, Alberto Testolin, Kate Stevenson, Doris Tsao, and Yisong Yue.

\bibliographystyle{unsrt}

redpajama_set_name: RedPajamaArXiv


Our expert, digital creative team possess the technical skills required to help you create more effective html designs. Our email marketing solutions are designed to help you increase brand awareness and gain more customers.
Email marketing is a fast, flexible and extremely cost-efficient way to reach new potential prospects and communicate with existing customers.
Studies have shown that for every $1 spent on email marketing, advertisers can expect an ROI of approximately $44. These numbers are impressive, but believable, since we're all addicted to our inboxes; after all, what's the first thing you do when you wake up in the morning? For over 147 million Americans the answer is, "check my email." There is no denying it - we are a digital society.
Whether you are trying to build brand awareness, promote your products or service, generate a survey or communicate special offers to your current clients, email is a valuable tool and should be a part of your current marketing mix. Our expert team of email marketing consultants will put their years of experience and creativity to work for you. Call us today and give your email campaign the best opportunity for success.
An email deployment for the Spring Spectacular at Radio City Music Hall in New York City.
An email deployment for Disney resorts offering potential guests a free planning DVD.
A campaign for a Ski Resort offering deals on their stay and ski plans.
An email for a Volvo dealer on Long Island promoting some of their newest models.
A personalized email deployment for Madison Square Garden Group Sales.
An HTML and Landing Page built for Age in Place Custom Builders.
An email promoting a restaurant re-launch complete with special calls to action.
Part of a large, multi piece marketing campaign for this Fortune 100 company.
A unique campaign for a whitelisted email list advertising a brand new special menu.