How to view entire contents of AWS Cloudwatch application logs? - amazon-web-services

As shown in the scresnshot we see a snippet of messages. The one shown here "fits" due to its brevity: but other lines (contents of which I can not show due to privacy) are truncated at 212 characters.
I would like to just view the entire contents "raw" without the dropdown arrow or truncations. There was some way to do that but I can not find it at this point. Pointers appreciated.

I don't know if I understood correct, but there is a checkbox called View as text.
When it is checked it will show you all log stream as pure text. Not as line collapsed anymore.
See it below.

If you prefer CLI you can try something like this - https://github.com/lucagrulla/cw

Related

Console returns SSML error when adding parameter to emphasis tag

I am working on a Python script to convert SSML into audio for an application. I already have the text conversion working, but I am figuring out the SSML part by experimenting in the console.
From the documentation: https://docs.aws.amazon.com/polly/latest/dg/supported-ssml.html#emphasis-tag there is an example using the emphasis tag with the level parameter:
<speak>
I already told you I <emphasis level="strong">really like</emphasis> that person.
</speak>
When I enter my SSML into the console:
<speak>
Hi there. My name is Joanna.
<p>This is line 2</p>
I am really <emphasis level=“strong”>excited</emphasis> to be here with you today.
</speak>
After pressing the “Listen to audio” button, the console returns an error
the input text contains invalid SSML syntax. Fix the SSML syntax and then try again.
If I remove the level keyword so the SSML reads
<speak>
I am really <emphasis>excited</emphasis> to be here with you today.
</speak>
it is converted correctly.
The example provided in the Polly documentation works, but I cannot figure out why my text has an error.
the quotes around "level" look weird. You've probably copied and pasted from another editor? Please make sure you use proper quotes and it should work :)
So it turns out, that typing into the text input box in the console on an iPad will change the quotes if you have "Smart Punctuation" turned on, and the quotes inserted using that feature will break the SSML processing engine.
On the iPad, go to General->keyboards->Smart Punctuation. If it is turned on, disable it. It makes no difference if you are using the on-screen keyboard or a hardware keyboard. If this setting is enabled, the quotes are replaced.
This wasn't the case on this answer, but you need to keep in mind the support of these tags. For example, the emphasis tag is only available (by the time I write this answer) in the standard form, not the neural form.
click here to see the supported task

Script to generate html Beyond Compare folder differences

I've found several ways to automate folder comparison using scripts in Beyond Compare, but none that produce the pretty html report created from Session>Folder Compare Report>View in browser.
Here is an example of what that looks like.
I would love to be able to find the script that gives me that html difference report.
Thanks!
This is what I am currently getting
load "C:\Users\UIDQ5763\Desktop\Enviornment.cpp" &
"C:\Users\UIDQ5763\Desktop\GreetingsConsoleApp"
folder-report layout:side-by-side options:display-all &
output-to:C:\Users\UIDQ5763\Report.html output-options:html-color
The documentation for Beyond Compare's scripting language is here. You were probably missing either layout:side-by-side, which gives the general display, or output-options:html-color which is required to get the correct HTML stylized output. You may want to change options:display-all to options:display-mismatches if you only want to see the differences, and you might want to add an expand all command immediately before the folder-report line if you want to see the subfolders recursively.'
The & characters shown in the sample are line continuation characters. Remove them if you don't need to wrap your lines.

content empty when using scrapy

Thanks for everyone in advance.
I encountered a problem when using Scrapy on Python 2.7.
The webpage I tried to crawl is a discussion board for Chinese stock market.
When I tried to get the first number "42177" just under the banner of this page (the number you see on that webpage may not be the number you see in the picture shown here, because it represents the number of times this article has been read and is updated realtime...), I always get an empty content. I am aware that this might be the dynamic content issue, but yet don't have a clue how to crawl it properly.
The code I used is:
item["read"] = info.xpath("div[#id='zwmbti']/div[#id='zwmbtilr']/span[#class='tc1']/text()").extract()
I think the xpath is set correctly and I have checked the return value of this response and it indeed told me that there is nothing under this directory. Results shown here:'read': [u'<div id="zwmbtilr"></div>']
If it has something, there should be something between <div id="zwmbtilr"> and </div>.
Really appreciated if you guys share any thoughts on this!
I just opened your link in Firefox with NoScript enabled. There nothing inside the <div #id='zwmbtilr'></div>. If I enable the javascripts, I can see the content you want. So, as you already new, it is a dynamic content issue.
Your first option is try to identify the request generated by javascript. If you can do that, you can send the same request from scrapy. If you can't do it, the next option is usually to use some package with javascript/browser emulation or someting like that. Something like ScrapyJS or Scrapy + Selenium.

How to customize Sitecore workflow Comment box

I am working in Sitecore 7 and want to customise the comments textbox. I need following functionality:
Instead of Single line, I want to replace it with multiline.
Is it possible to have rich text box instead of single line to allow users to put more meaningful comments and those are visible in History too.
You have to modify a lot to do it. When you approve button is called this command :
<command name="item:workflow" type="Sitecore.Shell.Framework.Commands.Workflow,Sitecore.Kernel"/>
with some parameters
Inside this class you have next method :
protected void Run(ClientPipelineArgs args)
{
...
where you find next lines of code that is called to show single line input :
...
if (!flag1 && flag2 && !flag3)
{
SheerResponse.Input("Enter a comment:", "");
args.WaitForPostBack();
}
Yes, this is possible, but you'll have to essentially recreate and replace some basic functionality to do it. And worse... it will require use of SheerUI, which is not documented anywhere from Sitecore that I know of. You have to figure it out by disassembling existing code. If you look at Sitecore's implementation of say, the Approve action, you'll see there is a SheerUI call to get the comment text. (not looking at it right now, so I don't know exactly where this is) You'll need to replace this with a SheerUI call to load your own custom dialog. How do you do this? Well... man, wouldn't documentation on this be nice?

Add line-break to open graph meta tag [duplicate]

This is an URL I have to send an invitation to an app of mine:
https://www.facebook.com/dialog/send?app_id=MY_APP_ID&
name=hola&
link=http://www.aWebSite.com&
picture=http://www.aWebSite.com/im01068442.jpg&description=participar!&
redirect_uri=http://elsuperdt.com
I'm trying to have a linebreak included within the description, but I just haven't found a way to do so. How do I do it?
I had the same issue and eventually gave up. Facebook seems to have gone to great lengths to avoid letting us have any linebreaks in the description.
The one thing you can do is add a &caption=first%20line which gets you one linebreak between the caption and the description. (There's a pretty short limit on how long the caption can be though - something like 80 characters.)
Update: this no longer works for send dialogs. It does still work for feed dialogs
Try using <center></center> this will create a new line in Facebook dialog description.
Try including %0D%0A in your description where you want the line break to be. This is the URL-encoded equivalent of a line break.
\n works in message but not in name parameter
I tried center></center> and %0D%0A. Both worked... for a split second. You could see the breaks upon page load, and then, like evil magic, facebook took it away and it was all scrunched up. Too bad. I'm trying to share a daily schedule, which would look much better with line breaks.
You can use blanks that are not posted to facebook in the length of the feed so the line breaks.
Or you just style your post by adding ".........." in the end of each line. This way people would maybe be more attracted to your post as they are eyecatching.