Left-hand operand: Expected a hash, but this has evaluated to a sequence - freemarker

I am working on a installation video mail. Not all products have an installation video therefore I want to hide (Null) in the mail. However, I cant figure it out how to do it. Does someone knows how to do it properly?
SS

Related

Is it possible to assign a slash command or some other shortcutr to auto populate message in Slack?

I am little unsure whether the question suits here or SuperUser, but I have decided to post it here first.
While using Slack, I have encountered multiple situations in which I need to post same content to multiple channel / people. Let me explain with an example;
Hi Bill, please provide your;
First Name :
Last Name :
Age :
Email :
I will be sending (DM) the same question not just to Bill alone, but to others as well. What I can do now is that I can copy this message to notepad, or pin it in slack, and copy paste the content (and modify the name) every time I want to send the message to someone.
I am looking for something like a template, which pops up (if i type some command or press a button) and I can modify the content if necessary. I tried integrating slash commands and Slack app, but then I realized that the approach is wrong.
Is there any way to achieve this?
Useful links
https://slack.com/apps/AJGJWCYPQ-templates?tab=more_info

Confused about XPath Syntax

Problem Summary:
Hi, I'm trying to learn to use the Scrapy Framework for python (available at https://scrapy.org). I'm following along with a tutorial I found here: https://www.scrapehero.com/scrape-alibaba-using-scrapy/, but I was going to use a different site for practice rather than just copy them on Alibaba. My goal is to get game data from https://www.mlb.com/scores.
So I need to use Xpath to tell the spider which parts of the html to scrape, (I'm about halfway down on that tutorial page on the scrapehero site, at the "Construct Xpath selectors for the product list" section). Problem is I'm having a hell of a time figuring out what syntax should actually be to get the pieces I want? I've been going over xpath examples all morning trying to figure out the right syntax but I haven't been able to get it.
Background info:
So what I want is- from https://www.mlb.com/scores, I want an xpath() command which will return an array with all the games displayed.
Following along with the tutorial, what I understand about how to do this is I'd want to inspect the elements from the webpage, determine their class/id, and specific that in the xpath command.
I've tried a lot of variations to get the data but all are returning empty arrays.
I don't really have any training in XPath so I'm not sure if my syntax is just off somewhere or what, but I'd really appreciate any help on getting this command to return the objects I'm looking for. Thanks for taking the time to read this.
Code:
Here are some of the attempts that didn't work:
response.xpath("//div[#class='g5-component--mlb-scores__game-wrapper']")
response.xpath("//div[#class='g5-component]")
response.xpath("//li[#class='mlb-scores__list-item mlb-scores__list-item--game']")
response.xpath("//li[#class='mlb-scores__list-item']")
response.xpath("//div[#!data-game-pk-id > 0]")'
response.xpath("//div[contains(#class, 'g5-component')]")
Expected Results and Actual Results
I want an XPath command that returns an array containing a selector object for each game on the mlb.com/scores page.
So far I've been able to get generic returns that aren't actually what I want (I can get a selector that returns the whole page by just leaving out the predicates, but whenever I try to specify I end up with an empty array).
So for all my attempts I either get the wrong objects or an empty array.
You need to always check HTML source code (Ctrl+U in a browser) for the data you need. For MLB page you'll find that content you are want to parse is loaded dynamically using JavaScript.
You can try to use Scrapy-Splash to get target content from your start_urls or you can find direct HTTP request used to get information you want (using Network tab of Chrome Developer Tools) and parse JSON:
https://statsapi.mlb.com/api/v1/schedule?sportId=1,51&date=2019-06-26&gameTypes=E,S,R,A,F,D,L,W&hydrate=team(leaders(showOnPreview(leaderCategories=[homeRuns,runsBattedIn,battingAverage],statGroup=[pitching,hitting]))),linescore(matchup,runners),flags,liveLookin,review,broadcasts(all),decisions,person,probablePitcher,stats,homeRuns,previousPlay,game(content(media(featured,epg),summary),tickets),seriesStatus(useOverride=true)&useLatestGames=false&language=en&leagueId=103,104,420

Xcode DATE text macro not performing as expected

I’m not sure if this is really an ask, but I thought I’d try anyway.
I’m trying to format a file name so that it shows the date in its title. Sound easy, right?
I can’t use the DATE text macro, however, because the / creates new folder paths (which would be great if the dates were in a different order than they are but... what can you do).
However, when I try to use a modifier (as specified by Apple), the format ‘eats’ the first number.
I’m in my phone right now so I can’t show results but an example:
Template for the file’s name:
HelloWorld-___DATE:bundleIdentifier___.swift
What I expect:
HelloWorld-29-03-2019.swift
What I am getting:
HelloWorld--9-03-2019.swift
Any ideas what’s going on or should I just take the L?

How do I find the code for the Special Character ǝ in an IDN and type it?

In searching to resolve this issue I have found several lists of codes that appear to be the same special character, but give different codes from each other. And since I can't seem to type them, I can't verify if any of them is the correct code for a domain name.
The domain name URL for purposes of this inquiry is the http://sǝx.com IDN. If you paste that in, it goes to a landing page; but how would you TYPE it in?
In comparison, £.com (symbol for the British Pound) is pretty straight forward: you just hold down the Alt key, tap 0, tap 1, tap 6, and tap 3 — all on the numpad — and then release the Alt key and press enter. Bam! You just created the £ needed to go to the £.com website (which resolves and redirects to poundsymbol.com).
But how do you do this for the "ǝ" in sǝx.com? The domain name converts to "xn--sx-73a.com" in your browser once you press enter, so I thought that might give me a clue to typing in the character. But if so I missed it.
However, in researching the "ǝ" symbol I ran across this URL:
http://easycaptures.com/fs/uploaded/1110/6435628828.jpg
(That's an image of it, since when I paste it in this editor it ends up like this instead: ?text=%C7%9D)
Anyway, that URL implies that there are many different versions of the letter available in several different character sets. If so, would they all work the same in a browser for resolving to the same domain name? If so, is any particular character set easier to work with on a standard US keyboard?
There are also other URLs that seem to give different information about the actual code for the letter, such as wikipedia:
https://en.wikipedia.org/wiki/%C6%8F
(and others, but I'm at my link limit)
While they all look similar, I am wondering if the distinction between them is enough to prevent the URL from resolving properly based on which exact character from which exact character set is deployed.
And again, I am only unable to test this more as I cannot ascertain how to type most of them into the browser - particularly if the code has a letter, as that seems to start triggering shortcuts on the browser instead of considering it as URL input.
Please help me decipher the mystery (to me) of the "ǝ" (apparently also called schwa) and how I would find and type the correct code to get to "sǝx.com" or "pǝt.com" or any website that included "ǝ" in its name.
Thanks in advance!

Script for the USPS

I am trying to write a script that does a zip code look up at the USPS.
URL="http://zip4.usps.com/zip4/citytown_zip.jsp". The data gets submitted by POST is:
zip5=YOURZIPCODE&submit.x=3&submit.y=22&submit=Find+ZIP+Code
The part I am having a hard time finding is how these numbers get generated:
submit.x=3
submit.y=22
The above two always "submit" values for X and Y always change. I can figure out
those number get put into the string.
Any thoughts would be greatly appreciated.
Those are the coordinates for a image-button click. Their values just give the mouse position on the button when it was clicked. In this case, they are going to be meaningless, just make them both 1 or something.
"Users may view and download material from this site only for the following purposes: (a) for personal, non-commercial home use"
http://www.usps.com/homearea/docs/termsofuse.htm?from=global_footer&page=termsofuse
From the link above.
As the first answer says, that is just the USPS trying to keep anyone from building an automated script to access data through that form. They expect slightly different numbers for each request from a given IP address.
"when you can prevent someone from doing something, you can get paid to allow them to get things done"
Just put in random numbers between 1 and the max size of the image button and it will work.
And I would not bother trying to do it "legally", their legal terms make no sense:
http://techref.massmind.org/techref/ecommerce/shipAPIlegal.htm also see the "Shipping" link in the heading for that page.

Resources