How to represent multiple positive buttons as CTA

We have an extension that has two different actions: Yes and No. But these two actions come in two different flavours. Yes for the current page and Yes for the whole domain, meaning Yes for the current page and treat this as Yes for any future pages on this domain. Similar No for the current page and No for the whole domain.

  1. I am using tick mark icon for Yes, Cross for No and ban icon for No for the whole domain. I am stuck at what icon could be the right choice for Yes for the whole website. current icons and their meanings

  2. Also currently I am showing Yes for the current page as main CTA. I want to change the behaviour and make Yes for the whole domain as Yes.

I am planning to use a double tick mark (like WhatsApp_ for Yes for the whole domain option, but not sure if it does really convey the meaning.

Any suggestions on how should I go about this?

PS: This UI is a menu popped up by the browser extension

SQL Server XML – modify multiple elements

I have a SQL Server XML column with data like this:

<History>    <Entry>       .....    </Entry>    <Entry>       .....    </Entry> </History> 

I need to add a unique identifier to each Entry element, giving this result:

<History>   <Entry entryID="AAA">       .....    </Entry>    <Entry entryID="BBB">       .....    </Entry> </History> 

I have it working for the first occurrence of the Entry element but don’t know how to apply it to all occurrences. Also, this entryID is a GUID and I don’t know how to generate a new one for each row.

Here is how I update the first element.

declare @eventId varchar(64) set @eventId =  CONVERT(varchar(64),NEWID()) update Histories        set XmlHistory.modify('               insert attribute EntryID {sql:variable("@eventId")}                      into (History/Entry)[1]        ') where HistoryID=285162 

I also have query that selects the elements that need this attribute and do not already have it. This gives the primary key and the element I need to update. I can’t get a unique element identifier to use for the element array index.

select rowPK, m.c.query('.') theElement from TheTable h     cross apply h.XMLColumn.nodes('History/Entry[not(@EntryID)]') m(c) where XMLColumn.exist('(History/Entry)')= 1 

Calling a Function to Calculate Multiple Coefficients

I’m working through a practice problem and am wondering if there’s a more efficient way of writing my code and/or if the syntax for my pointers looks correct.

The practice problem:

  • Given the absolute temperatures Tc of a cold reservoir and Th of a hot reservoir (in degrees Kelvin), the coefficients of performance (cp) of the refrigeration cycle and heat pump are given by:
    • Refrig: cp = Tc / (Th – Tc)
    • Heat: cp = Th / (Th – Tc)
  • Write a program that will call a function to prompt the user for the values of Tc and Th . It then calls a function that calculates the two coefficients of performance. Finally, it calls a function to print the results.

Here is what I have:

#include <stdio.h>  void temperature(float *, float *); void performance(float,float,float *, float *); void PrintResults(float,float,float,float);  int main() {     float Tc, //cold reservoir; user input         Th, //hot reservoir; user input         Rcp, //refrigeration cycle coefficient of performance         Hcp; // Heat pump coefficient of performance      temperature(&Tc,&Th); //Prompts user for cold & hot reservoir temperatures     performance(Tc,Th,&Rcp,&Hcp); //Calculates the coefficients of performance     PrintResults(Tc,Th,Rcp,Hcp); //Prints the coefficients of performance     return 0; } void temperature(float *ptrTc, float *ptrTh) {     printf("Enter the absolute temperature for a cold reservoir (in Kelvin): ");     scanf("%f",&*ptrTc);     printf("Enter the absolute temperature for a hot reservoir (in Kelvin): ");     scanf("%f",&*ptrTh); } void performance(float Tc, float Th, float *ptrRcp, float *ptrHcp) {     *ptrRcp = Tc/(Th-Tc);     *ptrHcp = Th/(Th-Tc); } void PrintResults(float Tc, float Th, float Rcp, float Hcp) {     printf("\nGiven the absolute temperatures of %.2f K for the cold reservoir",Tc);     printf(" and %.2f K for the hot reservoir,",Th);     printf(" the coefficient of performance for the refrigeration cycle is %.2f K",Rcp);     printf(" and the coefficient of performance for the heat pump is %.2f K\n",Hcp); } 

Client Side Encryption (CSE) across multiple clients

Working on 2 layer security in the cloud (AWS). Have multiple clients pushing files to S3 document storage which are then retrieved by one EC2 instance.

Multiple external customers each requiring their own encryption (PUT files to S3). Have 1 internal instance that must be able to GET files from S3 and decrypt.

How can we manage multiple keys in an easy way?
3 legs of our problem

  1. Transport encrypted – solved via SSL
  2. Encrypt at rest – solved via S3 SSE
  3. Client side encryption

Is it possible for each client to encrypt (CSE), transport and then decrypt by S3 which then encrypts (SSE)? Any other thoughts or references that might help?

Multiple Field , same ajax callback

I created a custom field. The hook_field_widget_form has an submit element with an ajax callback:

  //Add more   $  element['add_zone'] = array(     '#type' => 'submit',     '#name' => $  field_name . '-add_more-' .'name',     '#value' => t('+'),     '#limit_validation_errors' => array(),     '#submit' => array('dms_polygone_add_more_add_one'),     '#ajax' => array(       'callback' => 'dms_polygone_add_more_callback',       'wrapper' => 'zones-fieldset-wrapper-'. $  field_name,     ),   ); 

I add 2 fields of my custom field type to a node. Ex: field_polygone (field type: polygone) and field_polygone_2 (field type: polygone). When i press the ‘add_more’ button of my first field_polygone, my callback function ‘dms_polygone_add_more_add_one’ thinks the trigger element is field_polygone_2.

Callback function:

function dms_polygone_add_more_callback($  form, $  form_state) {   //@todo: $  i gebruiken voor veld als er meerdere waardes zijn toegestaan.   $  parents = $  form_state['triggering_element']['#parents'];   return $  form[$  parents[0]][$  parents[1]][$  parents[2]]['zones']; } 

$ parents[0] is het field_name => When the i press ‘add_more’ , the $ parents[0] variable in the callback function should be ‘field_polygone’, but its field ‘field_polygone_2’.

How can is solve this problem? Why does the callback function think the trigger element is field_polygone_2 instead of field_polygone.

Multiple Database Records with Same Primary Key

I need to store relationships where a single attribute_id may be visible in multiple store_id and I was trying to use attribute_id as the primary key. It would be something like this:

+--------------+----------+ | attribute_id | store_id | +--------------+----------+ | 147          | 1        | | 147          | 2        | +--------------+----------+ 

But Magento doesn’t see that with good eyes as it returns the exception Item (foo) with the same ID "x" already exists.

What is the best solution for that problem?