Vote count: 0I have this code to generate a table from mysqlite, but number of cells is static(only 2), can you please help me get dynamic cells? Thank you very much depending on result size? // Table PdfPTable table = new PdfPTable(2); // Header PdfPCell cell1 = new PdfP...
ادامه مطلبVote count: 0 im creating a class where i would be able to have in my constructor dynamic variables, but im not sure if im doing the right way or if it is valid. Example static: my class: class MyClass{ constructor(options){ this.propertyname = options.value; this.propertyname = options.value; this.propertyname = options.value; } } Does this example would be the same of the above? My only issue would be that the example i have wasnt making the options value assign to "this." my class: class MyClass{ constructor(options){ for (var property in options) { if (options.hasOwnProperty(property)) { this[property] = options[property]; } } } } Calling: var example = new MyClass({ property1: "Somethin...
ادامه مطلبVote count: 0 Here are 3 worksheets. '//i.stack.imgur.com/KeULk.png ' //i.stack.imgur.com/w9wa7.png ' //i.stack.imgur.com/KLeUl.png Case: I want to sum the days for each person. The result is displayed on worksheet-report. The days store in worksheet-day. The day is not fixed. The range of the days should be according to row: that person row in worksheet-day column :Worksheets("button").Cells(1, 2 ) to Worksheets("button").Cells(2, 2) Here is my code: Sub gg() row = Worksheets("report").Range("C" & Rows.Count).End(xlUp).row Row2 = Worksheets("day").Range("C" & Rows.Count).End(xlUp).row Dim g As Range 'the range for sum Dim row999 As Integer 'store the selected row index For k = 2 To Row2 'ch...
ادامه مطلبVote count: 0 How do I use the data-attribute to pass a dynamically generated id from a rails app to jQuery? When I try, the value retus undefined unless I just send it to an alert box. This code: $(document).on "page:change", -> $('#debug_link_id').click -> alert $(this).data('dynamic_id) Shows the dynamic_id in the alert box. However, using the same selector, this code: $(document).on "page:change", -> jqVar = $(this).data('dynamic_id') $('#link_id').click -> alert jqVar Shows "undefined" in the alert box. [using .attr('data-dynamic_id') gives the same results] Kindly tell me: Why the first code works and the second doesn't If there is a better strategy for pulling dynamic id's into jQuery...
ادامه مطلب