I am using google line chart API but It seems like it does not render correctly when there is only one single data. Here's the URL. My value should be at X=50 and Y=5.0 but the point shows up at (0,5.0):
http://chart.apis.google.com/chart?chxl=0:|0|X|100|1:|0|Y|5.0&chxt=x,y&chs=560x240&cht=lxy&chco=5EB3FFFD&chds=0,100,0,5.0&chd=t:50|5&chg=25,50&chls=2&chm=o,3366CC,0,-1,8,1
This apparently is a bug with the Google Charts API but I just figured a workaround. For those who may encounter the same issue, just double your single point by repeating the value twice:
in the URL change:
chd=t:50|5 (generates single point but in (0,5) position - WRONG)
to:
chd=t:50,50|5,5 (generates correct placement of the single point (50,5)
Here's the complete URL:
http://chart.apis.google.com/chart?chxl=0:|0|X|100|1:|0|Y|5.0&chxt=x,y&chs=560x240&cht=lxy&chco=5EB3FFFD&chds=0,100,0,5.0&chd=t:50,50|5,5&chg=25,50&chls=2&chm=o,3366CC,0,-1,8,1
Related
I'm trying to use "videojs-thumbnails" plugin from https://github.com/brightcove/videojs-thumbnails and noticed that thumbnail's time, specified in the plugin configuration is not matching the timestamp in the seek bar. Coming across different comments regarding this issue I found suggestion at https://github.com/brightcove/videojs-thumbnails/issues/43 to replace line
mouseTime = Math.floor((left - progressControl.el().offsetLeft) / progressControl.width() * duration);
to
mouseTime = Math.floor((left) / progressControl.width() * duration);
By removing
- progressControl.el().offsetLeft
However, that produces still not exact time match.
Finally I came with redefined value for the
var left
Getting it from the current value of
.vjs-mouse-display
So, my final codes are:
left=parseInt((document.querySelector('.vjs-mouse-display').style.left),10);
mouseTime = Math.floor((left) / progressControl.width() * duration);
Now everything works correctly.
Greatly appreciate for comments/suggestions.
This is NOT an answer to your specific question / issue, but rather, an alternative implentation approach.
I, too, wanted thumbnails for my video(s), so I proto-typed a page
that used videoJS's plugin. I don't recall all the details of the
issues that I ran into trying to use that plugin, but I finally decided
to abandon the plugin, and design an alternative, which has its own
separate 'slider' just above the viewer. [ One 'drags' my slider,
(rather than hover along it, as you do on YouTube's videos), so that it
can work straight-forwardly on touch-screens...i.e. on Android, etc. ]
And, rather than try to extract images from the video in real-time,
(See: How to generate video preview thumbnails for use in VideoJS? ), I chose to prepare the images, ahead of time, using 'ffmpeg' and the cmd-line interface to 'ImageMagick'.
Details of that part are here:
http://weasel.firmfriends.us/GeeksHomePages/subj-video-and-audio.html#implementing-video-thumbnails
My 'proof-of-concept' webpage based on that approach is here:
https://weasel.firmfriends.us/Private3-BB/
I hope this is helpful.
I'm a DNN beginner. I am currently building a module in which I can display statistics. My DotNetNuke Version is 7.0. The statistic is from Chartjs. For this statistic I would like to implement filters. These filters should be datepickers. As UI element I have now included a textbox with TextMode='Date'. But currently I have problems to set the default value of this field. The default value should be 01.01. of the current year.
I have already tried to set the value via C# server side. Unfortunately without success. I also tried to set the value on the client side via JavaScript. Unfortunately also without success.
These are some lines I tried in JavaScript:
document.getElementById(<%= this.DatumVon.AccessKey %>).value = "01.01.2019";
document.getElementById(<%= this.DatumVon.AccessKey %>).innerText = "01.01.2019";
document.getElementById("DatumVon").value = "01.01.2019";
These are some lines I tried in C# in the method "Page_Load" (server side):
this.DatumVon.Text = "01.01.2019";
I expected the value of the TextBox to be 01.01.2019. However, it currently only contains dd.mmm.yyyy. How can I change this?
Thank you.
There is something wrong with your localization. Please refer to the jQuery UI datepicker documentation (the "Localization" section), this should give you the answer.
wow... I solved it. I made it. Sometimes the solution is right in front of you and you don't see it. Michael Tobisch was absolutely right. When setting the value, the format is very important. I have always used the German format. A DNN TextBox with TextMode="Date" can't handle that. DNN converts this TextBox into an HTML input field. But this input field can only be clear with the format "yyyy-mm-dd". Depending on the geographical position of the client (at least that's what I think) the text displayed in the input field will be formatted. But the value of the input field always has the same format ("yyyy-mm-dd"). So very important here: the displayed text and the actual value have different formats.
Many thanks again to Michael Tobisch for the mental inspiration and the patience with me.
What is also important is that the access to the actual ID of a DNN element works as follows: this.Element.ClientID and not as I assumed before this.Element.AccessKey. This was also buggy.
I am working with an analysis that uses a filter statement to run a calculation on the data. The user wants to be able to change between two different values to view different combinations of scenarios. I keep getting a syntax error on the formula and cant figure out where I am going wrong.
((FILTER(IFNULL("INDRATES"."Client Site Wrap Rate", 0)USING ("Scenario"."Scenario - Default" IN #{"Scenario_1"}{'Forecast'})))-(FILTER(IFNULL("INDRATES"."Client Site Wrap Rate", 0)USING ("Scenario"."Scenario - Default" IN #{"Scenario_2"}{'Plan'}))))
I have been going over and over it and not sure where I am going wrong, any help would be awesome.
Updated code:
(FILTER(IFNULL("INDRATES"."Client Site Wrap Rate",0) USING ("Scenario"."Scenario - Default" = #{Scenario_1}{"Scenario"."Scenario - Default"})))-(FILTER(IFNULL("INDRATES"."Client Site Wrap Rate",0) USING ("Scenario"."Scenario - Default" = #{Scenario_2}{"Scenario"."Scenario - Default"})))
So I have finally resolved the issue so I figured I would post the full answer, and thanks to those who commented, they had components of the answer. So the initial problem we were running into was the IN section which should have been an = sign to finish the FILTER Expression. Secondly, we did not set the filter for Scenario.Scenario - Default to equal a variable expression. third was we were trying to input a default value for Scenario_1 and Scenario_2 which we didnt need in the dashboard (but it does need to be set in order to view it in the analysis). Last, was as the first comment mentioned it did need a single quote ' around the #{Scenario_1} as it was searching for a text value and not a numeric value. The correct syntax and working code is placed below.
((FILTER(IFNULL("INDRATES"."Client Site Wrap Rate",0) USING ("Scenario"."Scenario - Default" = '#{Scenario_1}')))-(FILTER(IFNULL("INDRATES"."Client Site Wrap Rate",0) USING ("Scenario"."Scenario - Default" = '#{Scenario_2}'))))
I'm very new to OpenRefine, so please bear with me if i have made a simple mistake.
I'm parsing a HTML website to gather some date.
Everything went fine with fetching the individual pages, but now the parsing of the HTML fails.
I'm creating a new column, based on the one holding all the page's HTML. I'm trying to get to the data in a specific DIV[20].
In the"create column based on this column" window it gives me a preview when using value.parseHtml().select("DIV")[20] , which results in exactly what i need... executing it gives me nothing but blank cells.
it even tells me that it is "filling 0 rows with grel:value.parseHtml().select("DIV")[20]"
Any clue what i'm doing wrong here?
You just need to finalize with .toString() to output the JSON.org object AS a string.
This is explained on our wiki here: https://github.com/OpenRefine/OpenRefine/wiki/StrippingHTML#extract-html-attributes-text-links-with-integrated-grel-commands
I also updated the select() function with that example: https://github.com/OpenRefine/OpenRefine/wiki/GREL-Other-Functions#selectelement-e-string-s
In version 18 of TextControl (http://www.textcontrol.com) there is supposed to be the ability to add background images/watermarks to the document, however I find that the behavior of the various overloads, etc is not working correctly and that the documentation is rather scarce on examples. Does any one have a working example of adding watermarks to a Word document through the ServerTextControl object?
This functionality didn't exist in previous versions, so I recognize it's still rather new, I just find it weird that doing something like
tx.Images.Add(draftImage, pageNumber, location, ImageInsertionMode.BelowTheText);
doesn't actually add the images to the document, but if I use another overload beforehand, it adds both?
I just need a loop along the lines of
foreach (TXTextControl.Page page in pages){
page.Select();
var location = tx.InputPosition.Location;
var pageNumber = page.Number;
tx.Images.Add(draftImage, pageNumber, location, ImageInsertionMode.BelowTheText);
}
where location is supposed to be the beginning of the page.
Any help would be appreciated, this should be simple!
Thank you
Finally got a response to this on their forum, it's not a complete solution, but it works for the most part. Figured I would follow up here, so that anyone who ends up on this page would get the help I wanted.
http://forums.textcontrol.com/showthread.php?325522-Watermarking-Background-Image-on-Saved-Documents-in-X8&p=41815#post41815