stack code example

Example 1: stackoverflow

Ctrl + c, Ctrl + v

Example 2: stack

typedef struct Nodo{
   Elem val;
   struct Nodo *next;
} *Stack;
Stack Empty(){return NULL;}
bool IsEmpty(Stack a){return a==NULL;}
Elem Top(Stack a){return a->val;} 
Stack Pop(Stack l){return l->next;}
Stack Push(Elem x,Stack res){
    Stack nuevo=(Stack)malloc(sizeof(struct Nodo));
    nuevo->val=x;
    nuevo->next=res;
    return nuevo;
}

Example 3: stack

Future<void> _handleNotification(
    Map<dynamic, dynamic> message, bool dialog) async {
    var data = message['data'] ?? message;
    String notificationTitle = data['YOUR_KEY']; // here you need to replace YOUR_KEY with the actual key that you are sending in notification  **`"data"`** -field of the message. 
    String notificationMessage = data['YOUR_KEY'];// here you need to replace YOUR_KEY with the actual key that you are sending in notification  **`"data"`** -field of the message. 

    // now show the Dialog
    Utils().showMessageDialog(context, notificationTitle,notificationMessage);
  }

Example 4: stackoveflosw

` function myFunction() {
  s.getRange(3, 7, 1, 3).clear()
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var s = ss.getSheets()[0];
  s.getRange(3, 7, 1, 3).clear()
  var celda = s.getRange(3, 1).getValue()
  for (var i = 1; i < 13; i++) 
  {
    var bar = s.getRange(i, 2, 1, 3).getValues(); 
    if (celda == s.getRange(i, 2))
    {s.getRange(3, 7, 1, 3).setValues(bar);
    }
  }
}`