Writing an Apex class to make REST Callouts to several API endpoints (Jira, , and Zendesk). Methods on the class will be invoked daily by the Apex Job Scheduler. Jira was easy to setup using Named Credentials using my Jira username and a token. Tempo gives me two options:  Using the REST API as an individual user where I create a token that I can use to make requests. Note: I'm not getting a code first and then getting this token. I just get the token. Using the REST API as an application developer (OAuth 2.0) - I'm trying to pull data administratively, not create a web app where users authorize my app to access their data.  This code works using approach 1 (but embedding credentials in code is not good): Http http = new Http(); HttpRequest request = new HttpRequest(); DateTime todaysDate = System.today().addDays(-1); String todaysDateStr = todaysDate.format('yyyy-MM-dd'); request.setEndpoint('https://api.tempo.io/core/3/worklogs?updatedFrom=2020-08-30'); // request.setEndpoint('callout:Tempo/core/3/worklogs?updatedFrom=2020-08-30'); request.setMethod('GET'); request.setHeader('Content-Type', 'application/json'); String TOKEN = 'REPLACE_WITH_ACTUAL_TOKEN'; request.setHeader('Authorization', 'Bearer ' + TOKEN); HttpResponse response = http.send(request);  Wondering what the correct setup would be as a Named Credential in Salesforce (Identity Type, Authentication Protocol, etc.). I wouldn't think I would need to provide a Certificate. Any thoughts?
I want to be able to make callouts to JotForm, but they do not support OAuth and username/password is insufficient for their API. ; for reference, here are the 3 auth options:        Authenticate with Query Parameters   Authenticate with HTTP Headers   Authenticate with Javascript SDK      Basically, they provide an API Key and want me to include an apikey parameter in the header. I don't want to hard code it, I don't want to store it as plain text in custom settings/metadata, and this isn't a managed package. Is there any way to securely store/authenticate from Salesforce, ideally using a Named Credential?  I'd love to be able to just have a Named Credential that is just a securely stored, obscured API Key...
I am using the full pager in views module. I am displaying 40 items per page. The full pager display links like this  1 2 3 4 5 next last   I want to change it to this  1-40 41-80 81-120 next   How will I do this? Any idea about this? I am trying to think of a non-colloquial word or phrase that means "practice what you preach." I would appreciate any suggestions. Thank you! What is a simple example of a limit in the real world? Problem: Suppose $f$ is continuous for $x\ge 0$, differentiable for $x&gt;0$, $f(0)=0$, and $f'$ is monotonically increasing.  Define $g(x)=\frac{f(x)}{x}$ for $x&gt;0$. Prove that $g$ is monotonically increasing.  Source: W. Rudin, Principles of Mathematical Analysis, Chapter 5, exercise 6. Is a URL allowed to contain a space? Is a URI (specifically an HTTP URL) allowed to contain one or more space characters? If a URL must be encoded, is + just a commonly followed convention, or a legitimate alternative?    In particular, can someone point to an RFC that indicates that a URL with a space must be encoded?  Motivation for question: While beta-testing a web site, I noted that some URLs were constructed with spaces in them. Firefox seemed to do the right thing, which surprised me! But I wanted to be able to point the developers to an RFC so that they would feel the need to fix those URLs. The meaning of Bit-wise NOT in Python I'm basically searching for the opposite of putting all your eggs in one basket, where the risk is total failure because you did not hedge your efforts. I'm searching for a phrase that encompasses splitting your efforts and evokes the prospect of failing at both. A bird in the hand is worth two in the bush also encompasses a sense of having focused your efforts, but only alludes to total failure. To satisfy the criteria, the phrase must cover:  attempting two things (or multiple iterations of one thing) both of which you might succeed at, if you addressed them serially but both of which you fail at because you address them in parallel  Here are the idioms/phrases that do not sufficiently cover the idea and why:  &quot;A servant to two masters&quot;  This has the sense of competing priorities, but not the sense of failing to achieve your goals.  &quot;Jack of all trades. Master of none.&quot;  The sense is insufficiently pejorative. Being a jack-of-all-trades can be seen as an advantage; I'm trying to focus on the lack of mastery.  &quot;The man who fancied himself a wit, and was half-right.&quot;  From Christopher Hitchens. Hilarious, but lacking the sense of split effort between two things.  &quot;Walking and chewing gum at the same time.&quot;  An idiom for multi-tasking, not for failing to multi-task. Edit Addressing a few suggestions and another one that occurred to me:  &quot;Hedging your bets&quot; or &quot;Betting against yourself&quot;  In this case, you cannot win both bets, but you will almost certainly win one. You limit your upside, but also limit your risk. I'm looking in particular for total, catastrophic failure due to split attention/effort.  &quot;Can't walk and chew gum at the same time&quot;  Failing to do two fairly simple things that most everyone can do, not failing at two hard things because you tried to do both.  &quot;Robbing Peter to pay Paul&quot;  In this case, Paul gets paid. If you were to rob Peter to pay Paul, and get robbed yourself before you could get the money to Paul, that'd be closer. :)  &quot;Spreading yourself too thin&quot;  An actual English idiom, but missing the implied sense of failure.  &quot;Too many irons in the fire&quot;  &quot;A lot of irons in the fire&quot; can be viewed positively, so this is missing the sense of a strategic misstep.  &quot;Between a rock and a hard place&quot;  The sense is of needing to act but having no good alternative.  &quot;Falling between two stools&quot;  My favorite answer so far because it does appear to be an actual English idiom (not a proverb). In that sense, it's great, but some of the usages are closer to a failure of  than a failure of effort. And falling between two stools implies that the attempted action was simply sitting down.  &quot;Chasing two rabbits and catching none.&quot;  This is the exact sense I was looking for, but it appears to be a cross-cultural proverb rather than idiomatic English like &quot;putting all your eggs in one basket&quot;. I'll be accepting it, and using it in my work! But if there are other ideas, please let me know. I am writing a bash script to look for a file if it doesn't exist then create it and append this to it:  Host localhost     ForwardAgent yes   So "line then new line 'tab' then text" I think its a sensitive format.  I know you can do this:  cat temp.txt &gt;&gt; data.txt   But it seems weird since its two lines. Is there a way to append that in this format:  echo "hello" &gt;&gt; greetings.txt I am working on a print for my wall and I am trying to create something like this:      I have already created the letters in Illustrator and now I am adding the colors in Illustrator and then exporting everything to Photoshop and then using the liquify tool to blend the colors to create a similar effect. I also used the healing patch tool to blend in the hard edges.  Is that the right way of doing it? Or is there another way? SyntaxError: Non-ASCII character '\xa3' in file when function returns '£' I'm including \usepackage{hyperref} so that each instance of \ref (as well as each page number in the index and the table of contents) automatically links to that page.  When I'm viewing the document (in ) and I click a link, I jump to the linked page.  Is there any easy way to go "back" to where I was before I clicked the link?  (And is the answer any different when using Adobe Acrobat reader?) Not sure how to make tables, but:  For a binary operation $*$, and set $\{e,a,b,c\}$, in the Cayley table, $a*a$ can be filled with either the identity or an element different from both $e$ and $a$. If in the table the place for $a*a$ is filled with $e$, then the rest of the table can be filled out in two different ways.  What are the two different ways?  Thanks QGIS query syntax differs between attribute table and feature filter Using QGIS 2.16.2, I can successfully select records from a shapefile attribute table using the following expression:  left("start_time", 10) = '2015-08-01'   Please note that start_time is a string field.  However, when I copy and paste the same expression into the shapefile's Layer Properties>General>feature filter>Query Builder I get the following error:    I would expect that the same expression would work everywhere in QGIS.  What am I doing wrong? Does $\pi$ contain all possible number combinations? What is the difference between "I have a doubt with ...." & "I suspect there is a problem"? Calculate $\lim_{n\rightarrow +\infty}\binom{2n} n$ Can Muggles publicly establish the existence of a magical community? Sometimes when I write, for example, "the boundaries of segments", I am suggested to use "segments' boundaries" or even "segment boundaries".   Or "the page's content" vs. "the content of the page" vs. "the page content". Then I would like to know is it always preferred to use phrases with apostrophe or adjective?  For example      In our terms, they are mainly textual elements within the page content, which serve as the starting point  of a data region (or a data region's starting point ?)  or a distinctive feature within it The range of $T^*$ is the orthogonal complement of $\ker(T)$ How can I prove that, if $V$ is a finite-dimensional vector space with inner product and $T$ a linear operator in $V$, then the range of $T^*$ is the orthogonal complement of the null space of $T$?  I know what I must do (for a $v$ in the range of $T^*$, I have to show that $v\perp w$ for every $w$ in $\ker(T)$ and then do the opposite), but I don't know how to show that this inner product is zero. How do I get the icon associated with a file type? I have a form that displays file information in a TabControl, and I'd like the pages to have the file's icon in their tab.  How do I get the icon associated with a file type?  I'd prefer solutions that don't involve looking things up in the registry, but if that's the only way then so be it.