Can’t figure out how to pull out twig variables

Trying to use some twig variables (simple strings) in a template that i created from a custom module. Using devel and KINT I can see the info under Iterator contents with


enter image description here

I just can’t get the template to print it out on the page. I tried

 <b>$   {{transaction.amount }}</b> total donation<br/><br/>  and   <b>$   {{transaction[0].amount }}</b> total donation<br/><br/> 

Either way comes up empty. Not sure what I’m missing here. It works in other modules just fine. Maybe I’m too high on the twig templates? I don’t understand the tree structure very well. I created a template called transaction.html.twig.

DMARC Failing cant figure out why

When sending a message from through my companies domain I am getting a DMARC fail. I believe I have SPF and DKIM correctely configured but could use some help on figureing out why DMARC fails.

Email Header:

Keys: 14400 IN TXT v=spf1 mx ~all 14400 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCpntjPXwGg8te96R6sBKmsUIQeIou8tgZWa8o+k0hMYnMQivNcDQG+TlZ6YHI5VfVoxrFbRoh5cDl7RXX9mc2GdO2dnqhlCEVgUY0ElxZrQ00k72KPYJ0wRJT5mSEMVO/vAn/L/yFaSRCrNeHJFbZNL6ttfX5T/1XIVo4gLf7ywIDAQAB 14400 IN TXT v=DMARC1; p=quarantine; sp=none;!10m;!10m; rf=afrf; pct=100; ri=86400

How do I figure out which version of Android is supported on my device?

I am a Pixel 2 that is running Android version 9.

I also have a much older Nexus tablet. I get an update on my tablet almost every day but it is only for Androids version 5.1++.

Why can’t I upgrade to version 9 on my tablet too?

Is there some sort of hardware limitation and if so, how do I figure out what the latest supported version for my device is?

Please help me figure out this included/excluded search filter interaction (4 options)?

I am working on a tool that allows users to analyze a report populated with a bunch of social media (primarily Twitter) posts relating to a topic they are interested in. Within this, I am building something that allows users to search the report (for things like text, author, hashtags, etc) and apply this search as a filter. So for example, a user that works at Nike may want to search the “Nike Shoes” report they created that is all about Nike for mentions of the word “Lebron” to see what people think about their latest campaign with LeBron James. They may also just want to exclude the word “Nike” to get rid of that data and see what else is mentioned outside of their brand (ie: whoa lots of people are positively talking about Adidas + Lebron for some reason this month).

I have come up with a few options for an MVP of this feature. My constraints right now are that the search/filter experience must feel very quick and lightweight, a user must be able to include and exclude text, authors, URLs, and IDs, and that we can’t save or allow toggling on/off of any of these search/filters (what the heck are they?) yet.

Here are the 4 options for the controls that I have come up with thus far. In this scenario a user wants to Exclude any posts that mention or contain the author @nike from their report view. I am going throw them up on a testing site, but I would love feedback here as well.

Option 1: One search box. A user can select if they would like to include or exclude once they are hovering on an option.

Option 1:

Option 2: This was actually my first iteration. One search box with a [equals/not not equal] (could be is/is not, +/- .. not sure?) dropdown input next to it. User can click and chose if it is an inclusion or exclusion from the dropdown and then search for what they want.

enter image description here

Option 3: One search box. The searches are all Included/Inclusion (our primary use case) on default. If a user wants it to be an Exclusion they can click the “Exclude instead” link on hover.

enter image description here

Option 4: Two search boxes. The user clicks into the inclusion search box if they want to include something and into the exclusion search box if they want to exclude. I had actually settled on this option but got pushback that it used to much screen real estate and could probably be accomplished with only search box.

enter image description here

I’d love some feedback on:

  1. What option you think works best, or if there is an entirely different solution you think I am missing?
  2. Is there a better search dropdown interaction I could be going with her instead of the flyout appearing below the box? Any inspiring tools or websites with a better pattern?
  3. What is this called? It is basically creating temporary filters by searching a report comprised of posts that that user generated by.. searching a large database of posts. I have been calling it Post Search Filters but :shrug: !

Thanks so much!

Can’t figure out this triangle geometry problem

I have the following triangle:

enter image description here

I know only the following information about it:

  • ABCD is a trapezoid (AB || DC)
  • EF || DC
  • Q is the intersection of AC, DB, PN, & EF

I am asked to prove that EQ = QF.

Since I don’t have any numerical values, I tried solving it by various triangular relation identities via similarities and Thales’s theorem. The only way to create a relation between EQ and QF that I could think of was this:

$ $ \bigtriangleup \text{APM} \sim \bigtriangleup \text{EPQ} \text{ and } \bigtriangleup \text{PMB} \sim \bigtriangleup \text{PQF}$ $

$ $ \begin{cases} \frac{AM}{EQ} = \frac{PM}{PQ} \ \frac{MB}{QF} = \frac{PM}{PQ} \end{cases}$ $

I’ve then tried to swap around the redundant lengths to try and get to the desired equation, but because I lack direction and methodology I get lost and frustrated. I feel like I’m just doing guesswork.

How can I solve this particular problem, and how do I tackle problems of this kind more effectively?

Unable to figure out the K&R 1.19 exercise reverse (s) func

I am trying to figure out the K&R 1.19 exercise, hence, created my pattern of the solution:

#include <stdio.h> #define MAXLINE 40 int reverse(char [],int); int mgetline(char [],int);  int main() {     char line[MAXLINE];     char longest[MAXLINE];     int max,len;     max=0;     while ((len=mgetline(line,MAXLINE))>0)         if (len>max) {             max=len;             reverse(line,max);         }     printf("\n%s\n",line); }  int mgetline(char s[],int lim) {     int i,c;     for (i=0;i<lim-1&&(c=getchar())!=EOF&&c!='\n';++i)         s[i]=c;     if (c=='\n') {         s[i]=c;         ++i;     }     s[i]='';     return i; }  int reverse(char d[],int newlim) {     char tmp[newlim-2];     int i,j;     for (i=0;(tmp[i]=d[i])&&i<=(newlim-2);++i)     j=i;     i=0;     while (j!=0) {         d[i]=tmp[j];         --j;         ++i;     }     if (j=0) {         d[i+1]='\n';         ++i;     }     d[i]='';     return 0; } 

When I try to run it:

pi@host:~/new$   cc reverse.c pi@host:~/new$   a.out aaaabbbbcccc  <> pi@host:~/new$      

Why am I not getting the line printed out? Does the reverse function correct?