Posts

javascript - What is the pattern for composite views in backbone? -

For example, I have a view attached to the body, all other thoughts are connected to the elements in the body. I believe that I should use many scenes as a sequence. But I'm not sure if I should, or if I should, then how to do it. This is my top-level view // Login shortcut "View" var UserTryView = Backbone.View ("Keydown": "keydown": "keydown"} , Keydown: function (e) {console.log (): 'Keydown detected'); Var self = this; This.key [eccode] = zero; $ A. Testkins (this. Key, '1684', function () {self.render ();})}}, funnel: function (e) remove {this.keys [e.keyCode];}; Render: function () {new favorite view ({L: $ AL ('# mm')}); // New FeedView ({El: $ al ('# et_view'}}; // new account view (); // storage.set obz (packet.service.smalls); Page.flip ('main'); }}); Var user_try_view = New UserTryView (); It looks like you need marionette.js or you have your own views Should be invented ...

java - Retrieval of database values using component other than jtable? -

Text after "div class =" itemprop = "text"> There are other components used in addition to JTable where unique jButtons can be added for each line to be retrieved and performed database rows Is there any way to perform specific tasks? Currently I'm using the following code ... JTable A Dialog Box Public Fixed DefaultTableModel buildTableModel (ResultSet RS) SQLException {ResultSetMetaData Metadata appears in Throws = Rs.getMetaData (); // Column Vector Name & lt; String & gt; ColumnNames = new vector & lt; String & gt; (); Int column = mountadata.gate columncount (); Println ("7"); {ColumnNames.add (metaData.getColumnName (column)) for (int column = 1; column & lt; = columnCount; column ++); } // data vector of the table & lt; Vector & lt; Object & gt; & Gt; Data = new vector & lt; Vector & lt; Object & gt; & Gt; (); While (rsnext ()) {Vector & lt; Object & gt; Vector = new vector ...

Django get field rendering as string -

How do I get field rendering from html after the form init? I am trying to add custom HTML in the form like this: class baseform (form): render_port = forms Booleanfield (required = false, initial = false) def __init __ (self, * args, ** kwargs): super (baseform, self) .__ init __ (* args, ** kwargs) html_rendering = str (self.fields [ 'Render_report']) conflicting part str (self.fields ['render_report']) . How do I get the html rendering of render_report? Of course, str () does not work. After some headbanking, here is the catch: _ _ fetch__ of the rendered field form _ _ ( ). So I had to change self ['render_report]' for self.fields ['render_report'] ]]

How to draw multiple strings in awt (java) and align them -

I need to draw different lengths in three strings or three adjacent lines. I must fit the string in a fixed width, all of which Is normal for To fit the string in the given width, we can increase the font size or reduce it. I need lines so that there is a parallel to each other. I have used font matrix, so here is my code fontmatrix metric = graphics .getFontMetrics (f); Int textWidth = metrics.stringWidth (line1); Double ratio = (double) width / (double) text; Float font size = (float) (font.getSize () * ratio); Font = font.deriveFont (FONTSIZE); Matrix = graphics.gettometmetrics (font); Graphics.drawString (line1, x, y); Y + = metrics.getHeight (); // This is the same thing for the other 2 string This job is only for some fonts; Some fonts have huge climbing and descent, some of them are desired - / P> What is a way to do this?

mysql - PHP: Building an HTML Table from an Array with Repeated Entries -

I have a database table (created by query) that lists the member (called a truppe), event, startup Date and end date A member can be listed more than once in the table because they are associated with more than one event. I want to create an HTML table that lists the name of that member, after which they are associated with each event for the next member, which may contain some items in the array. I was thinking of using a foreach () statement but could not get it to work. Any sign on how I can accomplish this? Thanks! while (list ($ event, $ troupe, $ start-date, $ termination) = mysqli_fetch_array ($ result)) {$ return = $ return "& lt; table & gt;" ; $ Return = $ return "& lt; tr & gt;"; $ Return = $ refund "& lt; th colspan = 3" gt; ". $ Troop" & lt; / Th & gt; "; $ return = $ return" & lt; / TR & gt; "$ return = $ return" & lt; TR & gt; "$ return = $ return...

jsp - How do I fix a java.lang.NumberFormatException: for String " " in my servlet? -

"itemprop =" text "> After I parse a string parameter in an integer I pulled from a corresponding jsp and after trying to create them, in the same error The display continues and a float in my web application I have Java class, the one on which I am trying to parse is an integer and a float, but I can not find a way to parse and work my servlet By the way i am I'm so proud. Here the code I used in my servlet is: Get the parameter from // newStudentPage.jsp string id = request.getParameter ("stuId"), string fName = request.getParameter (" FName "); String lName = request.getParameter ("lName"); String road = request.getParameter ("street"); String city = request.getParameter ("city"); String position = request.getParameter ("state"); String zip = request.getParameter ("zip"); String email = request.getParameter ("email"); String gpa = request.getParameter ("GPA"); Int z...

I need help on jquery/javascript -

OK, therefore, I have a question. I'm getting element id like this . & Lt; TD ID = "ctl00_cphRoblox_lstItemsForResale_ctrl1_Td1" class = "PriceBuyContainer" & gt; document.getElementById ("ctl00_cphRoblox_lstItemsForResale_ctrl1_Td1") and below it & lt ;. Div class = "Roblox- purchase-now btn-primary btn small PurchaseButton" data-item-id = "168167114" data-item-name = "wanwood visor" data-userasset-id = "1941846042" data-product-id = "20655974" data-expected-value = "114" data-asset-type = "hats" data-expected-currency = "1" data-expected-vendor-id = "6141596" data-BC-requirement = "0 "Data-vendor-name =" laugh blogs "& gt; Buy Now & lt; Span class = "btn-text" & gt; Buy Now & lt; / Span & gt; & Lt; / Div & gt; Will I get the data-expected-value = "NUMBERHERE" ? by ...