Plotting Multiple barcharts using Flot API [closed] - flot

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
hi i am using FLOT charts API to show data in the form of bar charts in my application. I have got requirement to show the data in bar chart and in categories with Pre Data and Post data some thing as shown in the picture like this
Sample Diagram
Please tell me how to take the data to plot the bar chart

You need a plugin for this.
Check OrderBars and then use data like:
var series = [];
series.push({
data: [], // your raw data
bars: {
order: 0
}
});
series.push({
data: [], // your raw data
bars: {
order: 1
}
});
Example: http://jsfiddle.net/ZRXP5/
My example uses Mootools, but you find the jQuery version (.js file) in the link above.

Related

Start scraping only after and before certain element [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Here's what the HTML looks like:
<h4>Categories</h4>
<ul>
<li>Cars</li>
<li>Bikes</li>
<li>Planes</li>
</ul>
<h4>Brands</h4>
<ul>
<li>Audi</li>
<li>BMW</li>
<li>Mercedes</li>
</ul>
<h4>FAQ</h4>
<ul>
<li>FAQ1</li>
<li>FAQ2</li>
<li>FAQ3</li>
</ul>
I'm trying to extract only the brands using Scrapy. There are no distinguishing features between the category vs. brands section except that the H4 begins the new section. Also, there are many categories and brands so it's hard to hardcode it.
You can use the following or following-sibling axis.
For instance, in order to get the brands you can get to the desired h4 element by text and then get to the next ul sibling via following-sibling:
//h4[. = 'Brands']/following-sibling::ul[1]/li/text()
Demo from the Scrapy shell:
$ scrapy shell ./index.html
>>> response.xpath("//h4[. = 'Brands']/following-sibling::ul[1]/li/text()").extract()
['Audi', 'BMW', 'Mercedes']

How to integrate dialogflow with floating chat in website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to using Dialogflow framework within website . I know dialogflow offers the website integration as widget but.I want to use in it a custom designed floating chatbox in website.Like a chatbox which hovers in the corner of the page.How can i integrate with such chatUI
Yes, there is a way in dialogflow to do so. You will just have to create a simple chat window in html/angular or in any framework you want to design. You can just capture user-entered query & make an ajax call & pass it to dialogflow. Again that depends on the api version that you're using. Dialogflow offers you v1/v2 apis, which itself changes the request format. Please have a look at code below (used v1 api):
function captureUserQuery() {
var text = jQuery(".my-text").val();
dialogflowApi(text);
}
function dialogflowApi(text) {
jQuery.ajax({
type: "POST",
url: "https://api.dialogflow.com/v1/query?v=20170712",
contentType: "application/json; charset=utf-8",
headers: {
"Authorization": "Bearer " + access_token
},
data: JSON.stringify({
query: text,
lang: "en",
sessionId: "chatbot"
}),
success: function(response) {
console.log("success");
// Here you will get the response to your query in json, you will have to parse it based on the type it has like text, image, card etc. & show it to user.
parseResponse(response); // function to parse your response.
},
error: function() {
console.log("Error");
}
});
}
Hope this answers your query. Let me know if you have any more.
You can do so by updating the iframe tag provided by dialogflow. You can put any html page you want inside the iframe tag. Also you can add a floating button/icon to activate it:
<iframe height="430" width="350" src="https://bot.dialogflow.com/kjhdfjhfjfh">
<your custom designed floating chatbox in website html>
</iframe>

String with Links and different font styles in Swift 3 [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I've been trying to achieve this:
Basically: A very simple line of text including 2 links. These two link being in semibold when the rest of the text is in regular.
Was trying to get everything done into the same string using the Storyboard.
Surprisingly, it seems to be quite hard to achieve. I can't get myself to understand why something that simple should be so hard. Was expecting to achieve this in the Storyboard view...
Please view the images by clicking this link
Thank you all for your help!
Quentin
I can't help you with storyboard, but you can do it this way programmatically:
first make your label
yourLabel: UILabel =
{
let label = UILabel()
return label
}()
Now, to have some text be bold and the rest not, you need to declare a NSMutableAttributedString and then append it on another string, like this:
yourLabel: UILabel =
{
let label = UILabel()
let attributedText = NSMutableAttributedString(string: "Your Text Here", attributes: [NSFontAttributeName: UIFont.systemFont(ofSize: 14)])
attributedText.append(NSAttributedString(string: "Your Bold Blue Text Here", attributes: [NSForegroundColorAttributeName: UIColor.blue, NSFontAttributeName: UIFont.boldSystemFont(ofSize: 14)]))
label.attributedText = attributedText
return label
}()
You can now also set one of the strings to be a link/button and the other not.
Hope it helps.

kentico site and DesignMode css conflicts [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have my custom css (all Compass/SASS based) added to the site from the Master page, rather than include the CSS in the site settings. While in Design View, my custom css, has overridden the items from DesignMode.css.
My master page is loading in my compiled CSS this way:
<link href="/CMSPages/GetResource.ashx?stylesheetfile=/KFF/SalesForce/main.css" type="text/css" rel="stylesheet" />
What is the best method to isolate my CSS from the designview.css?
Might want to take a look at this article
I think you can also do something like this in your master page:
{% ViewMode == "LiveSite" ? "StyleSheet Link": "" %}

Embedding video in PowerPoint 2010 not working [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm trying to embed a video in powerpoint 2010 to autoplay when I get to that slide (ideal).
OR... if that doesn't work I'd like to hyperlink an image in my presentation to the video... and when I click on it, it autoplays (meaning, I don't have to click the play button).
I followed this tutorial: http://www.howtogeek.com/howto/10552/how-to-add-video-from-the-web-in-powerpoint-2010/
On vimeo, I copied and pasted this provided iFrame code into my presentation:
<iframe src="http://player.vimeo.com/video/20241459?badge=0" width="500" height="375" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p>Rick Astley - Never gonna give you up from zunebock on Vimeo.</p>
But it threw this error... I don't see how this is possible because I copied and pasted the embed code.
Powerpoint cannot insert video from this embed code. Verify that the embed code is correct, and then try again.
Here's an image:
So, restating my question:
1) why wouldn't powerpoint be accepting that given embed code?
2) If it just won't work... how do I start a vimeo video automatically on page load?
Vimeo's code uses an iframe, which won't work; it sort of expects you to play the video back in a browser, not PPT. It even mentions on the site right beneath the embed code that it's intended for iphones and such.
If you use, say, YouTube instead, PPT's help points out that you need to use the Old Embed code option, which gives you something like this:
<object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/Q7vsoVR5NX4?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Q7vsoVR5NX4?version=3&hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
Next problem: The video doesn't play automatically and since it's an object (ie, a "thing" that PPT has no idea about other than to let it do whatever it's going to do), you can't force it to play (other than perhaps with code).
And finally, the site that hosts the video may restrict your ability to play it w/in PPT. I tried a couple of YouTube vids in testing this; neither would play w/in ppt due to copyright restrictions.
In order to avoid this error, a recommended solution is to embed downloaded YouTube video in PowerPoint.
This following article just aims to introduce a professional YouTube to PowerPoint Converter and a step by step guide on how to download and convert YouTube to PowerPoint supported format to successfully embed YouTube in PowerPoint for easy playback.

Resources