Create something of similar to Watson Virtual Agents - ibm-watson

I've seen the gif on this page:
https://github.com/watson-virtual-agents/chat-widget
And I want to creato with IBM Watson Conversation tool something similat to this
In which user can choose between some options inserted in a cicular bottom. Do you know how is it possible?

Pretty sure you can do this example.
The summary you need to know: Watson Conversation is one endpoint REST API, so, you can call this service in your backend and to anything in your front end, for shows the messages for your user in different forms (front-end).
In this case, your example is one Web page, so, probably inside the Watson conversation, you need to add the html for the buttons in the response.
You can see this example from one IBM Developer - Ashley using buttons in Watson.
Conversation simple is one awesome example that you can use to understand how Watson Conversation works and one based for your projects using this API. This project is built in Node.js.
See the Official API Reference for use IBM Watson Conversation.

Ok.
I've inserted this code
<script>
function yesBye() {
var latestResponse = Api.getResponsePayload();
var context = latestResponse.context;
Api.sendRequest("yes", context);
}
function noBye() {
var latestResponse = Api.getResponsePayload();
var context = latestResponse.context;
Api.sendRequest("no", context);
}
</script>
inside /ui/index.html (he suggests me to sobstitute " with ' and I make it)
this code
#button-yes {
width: 100px;
margin: 5px;
font-size: 16px;
border: none;
border-radius: 2px;
background-color:#66B266;
color: white;
}
#button-no {
width: 100px;
margin: 5px;
font-size: 16px;
border: none;
border-radius: 2px;
background-color:#ff3232;
color: white;
}
inside /ui/css/conversation.css and inside /ui/css/main.css
and this code
"text": "Would you link to end our conversation?\n\n<button id=\"button-yes\" onclick=\"yesBye();\">Yes</button> <button id=\"button-no\" onclick=\"noBye();\">No</button>"
inside the code js editor of the single node
This is the situation
image
it means that page recognise button but don't recognise their css style.
The structure of my project is the same of this (https://github.com/watson-developer-cloud/car-dashboard) and after every edit I deploy again the project. Where is the mistake?

Ok, but it's not a CSS problem. By losing the buttons, any type of modification I make to the index.html file does not appear.
Not even if I try to replace the "Type something" string in the bottom box.
I tried to empty the cache, resume the deploy at every modification, check that the service names and contents of the manifest.yml file were correct, but nothing. Work space and environment variables are correct.
Every time I hit the play button in the eclipse ID I see this
https://imgur.com/a/oe5lt
with the "Failed to read application content" error message.
Is there anything inside the code (which you can find here https://github.com/watson-developer-cloud/car-dashboard) that blocks any type of modification?

Related

How to get real CAPTCHA images with python selenium

I'm trying to solve a sliding CAPTCHA on https://beian.miit.gov.cn. I want to save the image as a local file and run some edge detection algorithm on it to obtain the correct offset, but the image is not given by a url (maybe it's a javascript? src="data:text/javascript;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAA...). How can I download the image?
I should probably change the problem title, but I'm not sure how to describte my problem in a more technical way.
Here is the code that gives the background image:
<img data-v-8408b814="" id="bgImg" width="500px" src="data:text/javascript;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAC+AfQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8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7+P8AuSfe/wC+u4rEgZbe/lt4GkX/AGia3m1YWaxQzWqyN5f3t+f5ipCY/wC16Fc/vZF8tj/D5Z4/Liis+e9t7h/OisUQOMkbsc/hRVGZ/9k=" alt="" style="height: 190px; display: block; position: absolute; top: 0px; left: 0px;">
What you are doing does not seem morally correct.
The source of the image is base64, with python you can decode it and save it as a file:
EDIT: Here is the code working:
import base64
encoded_string = yourElement.get_attribute('src').replace('data:text/javascript;base64,', '')
decoded_string = base64.b64decode(encoded_string)
with open('captcha.jpg', 'wb') as f:
f.write(decoded_string)
output:

Github pages not rendering CSS correctly as it is locally

CSS Is not rendering as expected for the ReactApp as it is locally.
On Github
On Locally
Not attaching any code, however if you need any specific file, let me know will edit question accordingly.
EDIT
I seems the position: fixed was causing the issue:
Earlier:
.navbar-custom {
z-index:100;
position: fixed;
}
Later:
.navbar-custom {
z-index:100;
/* position: fixed; */
}
Also, please ensure to disable caching::

Exception in queued GPT command TypeError: Cannot read property 'addService' of null

I am using adsesne code in my angularjs application. On the first load of application ads are working fine when I switch content dynamically I get this error.
Exception in queued GPT command TypeError: Cannot read property 'addService' of null site:stackoverflow.com.
This is the script which I load inside my div.
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<script>
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/28379801/MWBanner320x50', [320, 50], 'div-adlocation').addService(googletag.pubads());
googletag.enableServices();
});
</script>
<!-- /28379801/MWBanner320x50 -->
<div id='div-adlocation' style='width: 320px; height: 50px; margin:auto'>
<script>
googletag.cmd.push(function() { googletag.display('div-adlocation'); });
</script>
</div>
Any possible work around using angularjs?
I had the same issue and saw your post. Only after two weeks I found out by accident that you get the same error if you define the slot twice with the same adUnitPath. Maybe you have the same issue.
Solution
Make sure that the adUnitPath is define only once. The easiest way to check this for me was to console.log(<the adUnitPath>) with every googletag.defineSlot(...) call. In the screenshot you can see that two attempts are made to definer the same slot. However, this is not possible because the adUnitPath must be unique.
Example of the error and the double define action

What type of device is viewing my site?

Hi i am trying to make a responsive website, and i want to find a way to check whether the device viewing the page is a pc, tablet or phone.
So far, the only solution i could find was variations of this:
# Mobile
only screen and (min-width: 480px)
# Tablet
only screen and (min-width: 768px)
# Desktop
only screen and (min-width: 992px)
# Huge
only screen and (min-width: 1280px)
Correct me if i'm wrong, but the difference in pixel-density in devices is so big, that this can't guarantee anything, and it would also require regular updates based on the development of new screens with higher pixel-density.
I was hoping there was a function that could give you the screens size in real physical inches, or a variable you could call, that would tell you what type the device is.
The goal is to have a piece of code, that i never have to update, but just works no matter the type of device. I'm up for any language, but i'm best at html, css and javascript.
Thank you in advance!
You could use media-queries: media-queries
or try: responsive webdesign via media-queries # stackoverflow
I found a simple way to do this.
I added this code in the header of my desktop site:
if (screen.width <= 800)
{
window.location.href = "http://www.sandbergcykler.dk/mobile/";
}
If a device with a width smaller than 800 pixels enters, it's redirected to a mobile-friendly version of the website. On my mobile site i did the opposite, just in case a desktop-device should visit it:
if (screen.width >= 801)
{
window.location.href = "http://www.sandbergcykler.dk/";
}
This method will get deprecated when phones start to get really high screen-resolutions, but so far it is working surprisingly well!
You can test it on your own device if you would like to:
if (screen.width <= 800) {
document.getElementById("p").innerHTML = "You're a mobile";
}
if (screen.width >= 801) {
document.getElementById("p").innerHTML = "You're a desktop";
}
<p id="p"></p>

Hiding menu in SRSS

I have created a few reports which like users to be able to access via url mainly. I want to hide the menu options in these URLs'. Not sure how to do this this. This link:
remove-top-links-from-report-server
would require one to modify the actual css file, while this link:
hiding-tool-bar-from-the-ssrs-report-while-using-them-in-dashboard-crm-2011
alludes to appending the url with'&rc:Toolbar=false' which i cannot get to work. So any suggestions or am i left with modifying a css file?
Try &rv:Toolbar=false instead of &rc:Toolbar=false
This worked for me.
http://msdn.microsoft.com/en-us/library/ms152835.aspx
Additionally to the answer from
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6c4a0722-b7cc-4a77-9c28-95cb478b743f/remove-top-links-from-report-server
Please open the Report Manager folder.
In Reporting Services 2008 (R2), the folder is :\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ ReportManager.
Open the folder “Styles”.
Open the file “ReportingServices.css” using Text Editor such as Notepad.
Change the “table.msrs-topBreadcrumb” to be the following:
table.msrs-topBreadcrumb { background-color: #EBF3FF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 84%; font-weight:normal; color:#666666;display:none}
And this I added myself :
.toolbarbuttonscell {display: none;}
Save the file.
One option that might work is to go view the report, go to IE tools->Compatibility view settings, and add the site that the report is viewed at.
Try amending the URL as below (adds 'ReportServer' and calls 'ReportViewer.aspx')
Examples:
https://devreports01/ReportServer_INST01/Pages/ReportViewer.aspx?ReportName
https://devreports01/Reports_INST01/Pages/Report.aspx?ItemPath=ReportName
I noticed that the window loaded after deployment did not include the toolbar and this was because of the URL. Seems to be the easiest way to lose the toolbar.
Follow the link to hide toolbar
LINK
I have implemented by using the below report url
http://servername:port/ReportServer/Pages/ReportViewer.aspx?ReportFolderWithReportName&rs:Command=Render&rc%3aCommand=Render&rc%3aLinkTarget=_blank
Instead of this
http://servername:port/Reports/Pages/Report.aspx?ItemPath=ReportFolderWithReportName&rs:Command=Render&rc%3aCommand=Render&rc%3aLinkTarget=_blank
For mobile reports add this as a query string parameter
rs:embed=true
You can do this configuring the object with c#, setting the "ShowToolBar" option to false. Find the file "you_report.apsx.cs" and modify the "LoadReport" action, like this:
private void LoadReport() {
this.rptViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
rptViewer.LocalReport.ReportPath = Server.MapPath("~/path_to_you_report.rdlc");
rptViewer.LocalReport.DataSources.Add(datasource);
rptViewer.ShowToolBar = false; //This hide the toolbar
rptViewer.ServerReport.Refresh();}
Update:rptViewer.ShowToolBar = false does not work with SSRS 2016
try instead rptViewer.ShowParameterPrompts = false; it Worked for me

Resources