dynamic

How to create a Google Pie Chart with dynamic data?

大憨熊 提交于 2019-12-22 13:49:30
问题 I'm struggling to get the below google pie chart to reflect dynamic data found within a html table on the same page. <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"> </script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Answer', 'Percentage'], ['Yes', 10], //This static data needs to

Jquery/Javascript: Buttons added dynamically with javascript do not work

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 13:49:09
问题 I have a code chunk of html: <div id="chunk-1" class="chunk"> <div class="chunkText">Text<div> <button class="addChunk">Click Me</button> </div> <script> $(".addChunk").click(function(){create_chunk(this.parentNode)}) function create_chunk(after_this){ $(after_this).after(chunk_html) var i = 0 $("div.chunk").each(function(){$(this).attr('id', "chunk-" + i++)}) } </script> Now, this works, but only for the .chunk that is statically rendered on the page. When I press the button a second chunk

Manipulate Custom Tabular representation in Mathematica

白昼怎懂夜的黑 提交于 2019-12-22 13:33:08
问题 Considering the following data example : data ={ {"a", "b", "c", "d", "e"}, {1, 2, 3, 4, 5}, {11, 12, 13, 14, 15}, {21, 22, 23, 24, 25} }; And the following Function to generate customized Tabular representation : (and you can refer to Mr.Wizard extensive solution for customizable tabular representations. Ultimatly I would also manipulate the options he offered, for now ) DataSampleX[data_, linesNumber_, range1_, range2_, color1_, color2_, color3_] := Grid[ Join[ {Range[range1, range2]}, {Map

Loading plugins at runtime with MEF

本秂侑毒 提交于 2019-12-22 12:24:14
问题 My application allows users to write plugins (implementing IPlugin) that they can instantiate at runtime. On startup a directory of plugin .dlls is parsed, registering all the available plugins information. At runtime a GUI is provided that lets users create instances of any of the plugins. This works fine. But now I see MEF and hope I can do the same, but in a more elegant way codewise. What I got working so far with MEF : on startup I am doing an import of all plugins in a directory (that

SSRS: Report label position dynamic

陌路散爱 提交于 2019-12-22 12:21:44
问题 I have a report which displays customer address in multiple labels. My customers use windowed envelopes for mailing. I need the address labels position to be configurable. Something like, I'll have a database table which stores the Top/Left position of each label per customer. Based on this table, I need to position the address labels on my report. I thought, it is doable by expressions, but Location property doesn't provides ability to set an expression and make the label's top and left

Value types inferred as object at runtime when using dynamic

不羁岁月 提交于 2019-12-22 11:37:20
问题 I almost understand why this particular problem arises (though I more than welcome a layman's explanation if you can find the time!), it I'm sure involves boxing/unboxing which I won't attempt to incorrectly explain.. With my current knowledge (or lack thereof), of the situation, I'm not sure how best to proceed to resolve it. Here is a fairly simplified console app showing my issue: static void Main(string[] args) { try { // succeeds IEnumerable<Expression<Func<TestCase1Impl, dynamic>>>

(excel 2013) Dynamic change of formula depending on number of items in another sheet

倖福魔咒の 提交于 2019-12-22 11:36:02
问题 i have a specific problem to solve. I dont know how to do it but want to do it without macro or worse without VB script. I will explain what i have and then what i want to do. I have (plan to have) many sheets in worksheet. first sheet is some intro sheet, where i have also one column containing name of sheets in every cell. i am using formula "=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)" so i can change name of sheet and it will change also name of sheet in intro sheet cell

Dynamic Dictionary usage in C#

懵懂的女人 提交于 2019-12-22 11:10:05
问题 I am using a Dynamic dictionary in C#. The problem I am facing is the behavior of TryGetMember which I am overriding in the dynamic dictionary class. Here's the code of dynamic dictionary. class DynamicDictionary<TValue> : DynamicObject { private IDictionary<string, TValue> m_dictionary; public DynamicDictionary(IDictionary<string, TValue> a_dictionary) { m_dictionary = a_dictionary; } public override bool TryGetMember(GetMemberBinder a_binder, out object a_result) { bool returnValue = false;

Adding Dynamic Buttons to different layouts for phone and tablet using RecyclerView with GridLayoutManager

爷,独闯天下 提交于 2019-12-22 10:44:25
问题 I am adding dynamic buttons to a layout. Each button is added one at a time, and the layout must update itself if new buttons were added based on a user's action. So the layout could have 3 buttons, or 16, or whatever, depending on the user's action. And the buttons can be added at different times. So if the user opens the app and adds a button, then leaves and returns to the app and adds another button, the old one must remain. I want my buttons to be added, one by one, into a layout like

gcc Linkage option -L: Alternative ways how to specify the path to the dynamic library

谁说我不能喝 提交于 2019-12-22 10:20:42
问题 If I compile my source code with "-L." the dynamic library libmd5.so can be found. gcc main.c -g -O2 -Wall -o main -L. -lmd5 -lcr But if I leave the "-L."-option away, the linker does not find the dynamic library. How can I change that without having to invoke "-L."? (additional info libmd5.so and libmd5.so.1.0.1 are located in /home/user/ba) 回答1: There's really nothing wrong with the -L flag, so you shouldn't try so hard to get rid of it - is it at runtime you have problems, as the system