Cognitive Services: Face Identification - face-detection

is it possible to add new persons to group afterwards, without re-submitting and re-training everything every time a new person is added?
The sample application (https://github.com/Microsoft/Cognitive-Face-Python) requires images per person in separate directories, to be submitted as a group.

You can add persons to a group anytime you want as long as you don't exceed the limits. However in order for the new persons (or the faces you added for the existing persons) to be used in the "Identify" process you need to call "train". Otherwise newly added persons (or faces) won't be found.

Related

MS Access - Matching records without single identifier

I need to find a way to match records between two tables. The problem is a single identifier that would make the match very simple isn’t available so I need to find a way to make that match based on some other available information in the records.
In an elementary school all registered/existing students have a Student ID. It is unique and makes a perfect primary key. However, any new students entering the school for the coming year do not get a Student ID until they are officially registered.
Before the next school year starts the school invites the new incoming students to be part of a pre-registration assessment program to help determine their current level and needs for the coming school year. It is at this point that as much data about each prospective student is gathered. This information is stored in a separate table from the main student information, mostly because there is no official Student ID. The idea is to merge the pre-registration students and their data into the main student information table(s) once they have an official Student ID assigned to them.
My thinking was to assign these new students a temporary ID just to have a unique identifier for them in case there are name duplications.
My question is how can I match up the temporary ID’s with the real ID’s once the student is assigned one?
Some information that will be gathered in the pre-registration process will include Last Name, First Name, Middle Name, Grade, with Birthday being another possibility (but isn’t included at this time).
Maybe I’m going about this in the wrong way so any suggestions on offer would be greatly appreciated.
It sounds like you are exporting information from the main Student Information System, running additional processing in Microsoft Access, then ultimately merging it back into the main system. This being the case, you will have to work with the limitations in the export and merge features, and building your matching logic around what is available there.
Plan A: Ideally your Excel export would include some type of primary record identifier from the main system, independent of the Student ID that gets assigned later. (It very likely uses a unique ID internally, even if that is not included in the export file.) You would then use this to match to your records in Microsoft Access.
Plan B: If the primary system does not export a unique identifier, then you will need to come up with your best combination of data to uniquely identify the student. How you do this will depend on how many students you are dealing with, and whether the matched data changes in either system. Full name and birthdate is a fairly common way to do this, if that data is complete in the originating system.
With the unique identifier established, I would use two queries in Access. The first would be an update query to assign the Student ID to your Access system as soon as it becomes available in the main system. (Search for matching students that have a Student ID in Excel, but not yet in Access.)
The second query would be an append query to add the new students from the main system into Access. (Where the student in Excel does not match any existing student in Microsoft Access.)
Taking this approach, you would pull the Excel export regularly from the main system and run the above queries to keep your Access system updated. Then when you are ready to merge information back into the main system, you could filter on students in Access that have a Student ID assigned. The actual update of data in the main system might be done through an update query, or perhaps an export from Access that includes the Student ID. (Depending on how your main system merges the incoming data.)
The way I would approach this is to merge both tables into a single table of students. This table would have an AutoNumber ID column that refers to the student or prospective student. Then you would have another column in this table for the StudentID which would be assigned at a later point.
Your forms and reports can then filter the data based on the StudentID field to show you either current or prospective students.
Taking this approach means your student data gets entered into one place, and you don't have to worry about trying to repeat information or merge it later. Since a single record represents a single individual, it makes logical sense to me to use a single table.

Add new name automatically in another table whenever a new unique name is added to main table?

Hi I'm new to Access and I'm trying to accomplish the following task:
I maintain a main table with chronological entries of different investment's return on a daily basis with following fields:
RECORD_DATE, INVESTMENT_NAME, RETURN
Now, I maintain this table by copying a list of investments and their returns from Excel into Access, with the day's date.
So the entries look like:
1/1/2013, Manager_A, 10%
1/1/2013, Manager_B, 9%
1/2/2013, Manager_A, 11%
1/2/2013, Manager_B, 8%
I also want to maintain a different table describing the Investment
INVESTMENT_NAME, ASSET_TYPE, MANAGER
I want to be able to add a new entry whenever a new unique manager name shows up in the first table. Of course I will type in the ASSET_TYPE, MANAGER fields myself later.
Is there a way to construct a relationship in Access so that every time when I copy new entries for the day this happens?
As Access does not have triggers you can use Macros. Depending on which version of Access you are using, this link should help you.
http://blogs.office.com/b/microsoft-access/archive/2009/08/13/access-2010-data-macros-similar-to-triggers.aspx

Implement a form in Salesforce

I am currently the Salesforce administrator of a company Enterprise account. Our accounts are made up of universities. I was asked to implement a form for trips.
The trips basic information is: Trip name, University, Region, Country, Project manager and Project manager met. I created the object trip and added the custom fields using lookup relationships with contacts and accounts. This was very easy to do so.
The first problem is as we move through the form. The next section is about the university info which has these fields: Number of students, Number of faculty, Language. They are asking me that these fields override the information that was previously stored in the account. Like if you pick X university and it had 200 students originally, then if I write 205 in the field , it will overwrite the previously set number.
My second problem is, in the next section of the form they have an objectives section.
For example, there is a text field with the label :
"Objective 1 ___________" +
if you want to add a new objective there is a "+" sign that will create a new field
"Objective 1 ___________" +
"Objective 2 ___________"
How can I achieve this? Is there a way with basic creating system? Do I need to create a Visualforce page? Thank you for your help.
This is what I understand of your 1st problem: On the trip object you have a lookup to account (university) and there are number of students etc field on the trip object and whenever a user updates it here it should be update back in the Account Object?
Instead of doing this, as you're already capturing all this data in the account object, use formula fields in the trip object to populate the data. This i think would be a better data model. But if you still wish to do it the way you intend to then you will have to write a trigger on trip object and update the account with that information. The problem with the second option would be: lets say you create a trip 1 record and update the #of students to 210, and this would be updated in the account as 210. And then you create a trip2 record for the same account and here you input the value of the #of Students field to 230, so the account(university) record with the value 230. But the problem is the value in trip 1 record will still remain 210. I hope you understand what I am trying to explain.
Coming to the 2nd Problem:
Here too the data model will be slightly different:
Create another object called Objective which has a master detail relationship with the trip object. So the Objective will be a related list in the trip object. For every trip there will be a number of objective which you can add in the related list. This is quite simple and there would be no need of any coding. But if you want to add the + sign which would display another field when the user clicked on it: In this case too the data model is the same, but you would need to create a VF page(which could either in-line VF page or a entirely an independent VF page) and then whenever a user clicks the + sign a new field is shown.

AppEngine - Count how many entities have been deleted

I have programmed a social network application on the AppEngine, and a feature that I am about to add is the ability to see which people have viewed your profile in the past month (like you can do on LinkedIn).
Here is the way I am thinking of implementing the code:
I will use a new entity type (lets call it ViewerTracker) to track when a profile is viewed, which will contain 3 main values:
1) the ID of the profile that is viewing, 2) the ID of the profile that is being viewed, and 3) the datetime of the viewing.
Each time someone views a profile, I will check Viewertracker to see if that person has viewed the profile before, if so, I will just update the ViewerTracker object's datetime. If the profile has not been previously viewed, I will create a new ViewerTracker entity to record the event.
I will also track the count of how many unique people have viewed each profile in the past 30 days in a seperate entity type (lets call it ViewerCount). I will write a cron job that on a daily basis clears out ViewerTracker objects that are older than 30 days old and need to subtract the number of old ViewerTracker elements deleted from the ViewerCount object.
However when I delete old ViewerTracker entities (based on a query on the datetime value), I need to know exactly how many entities I have deleted so that I can subtract the number from the ViewerCount object. Is there any way to know exactly how many entities have been deleted by a delete operation? Is my approach to this problem OK, or is there a better way to do it?

Create multiselect lookup in salesforce using apex

I want to create a multi-select Contact Lookup.
What i want :
When user clicks on a lookup then he should be able to select multiple contacts from that.
What i have done:
I have created an object and a field inside that object using both
"Lookup" and
"MasterDetail Relationship" and
"Junction Object"
When i try to use this Field for any input text/Field then it always provides an option to select only one value from lookup but i want to have an option to select multiple.
Even in the Junction object i have created 2 master-detail relationships still lookup allows only one value to be selected.Moreover it makes the field mandatory which i don't want.
Links that i followed:
http://success.salesforce.com/questionDetail?qId=a1X30000000Hl5dEAC
https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=help&section=help&hash=topic-title&target=relationships_manytomany.htm
Can anybody suggest me how to do this.
Its same as we use Email CC/BCC under Send Email option for any Lead.
Even you use a junction object a lookup is just that, it references (looks up to) one other record: when you create a record on the junction object you still have to set each lookup individually and you're still creating only one record.
Master Detail relationships are essentially lookups on steroids, one object becomes the child of the other and will be deleted if the parent object is deleted, they're not going to provide an interface to lookup to many records at once.
If you're not a developer then your best bet is to either just create on junction object record at a time, or look into using dataloader. You could prepare your data in Excel or similar and then upload all the records into Salesforce in one go.
If you are a developer, or have developers at your disposal, then what we've done in the past is create a Visualforce page to do the job. So if, for example, you wanted to link a bunch of contacts up to an Account, we'd have a single account lookup field on the page, then some search fields relating to fields on the contact. Using a SOQL query you can then find all contacts matching the search parameters and display them in a list, where you may want to provide checkboxes to allow the user to select the contacts they want. Then it's just a case of looping through the selected contacts, setting their Account field to be the chosen account.
There are areas in Salesforce (such as the send Email functionality you mentioned) where it's clear to see that bespoke work has been done to fulfil a specific task — another instance of what you want is in the area where you can manage campaign members. This is the model I've copied in the past when implementing a Visualforce page as described.
Good luck!
For adding multiple junction objects at one time, the only solution we have found is a custom Visualforce page, as described by LaceySnr.
For a slightly different problem, where we need to assign many of object B to object A, We have trained our users to do this with a view on object B. We are assigning Billing Accounts (B) to Payment Offices (A). The view on Billing Account has check boxes on the left side. The user checks the Billing Accounts to be assigned, then double-clicks on the Payment Office field on any of the checked rows. A pop-up asks if you want to update only the single row or all checked rows. By selecting 'all checked rows', the update is done to all of them.
The view is created by the user, who enters the selection criteria (name, address, state, etc.). All user-created views are visible only to them.

Resources