Posts

javascript - Understand adding rows on click, confusion with .cloneNode(true); -

consider http://jsfiddle.net/99cl3/224/ , adds rows on click html <br /><br /> <table id="tbl"> <tr> <td><input type="text" name="links" /></td> <td><input type="text" name="keywords" /></td> <td><input type="text" name="violationtype" /></td> <td><input type="submit" class="button" value="add line" onclick="addfield(this);" /></td> </tr> </table> js function addfield(n) { var tr = n.parentnode.parentnode.clonenode(true); document.getelementbyid('tbl').appendchild(tr); } i'm trying understand why code adds rows on click works. first realize take click (the input), , go 2 parent nodes above it. first .parentnode points td , , next tr . making table on click these new properties. quest...

Spring mvc requested resource is not available -

application , browser cannot render resource of app. saw lot of similar questions , not find solution. app works fine through json(ie without view) there config @configuration @enablewebmvc @componentscan("ru.practice.web") public class chatlocalwebconfig extends webmvcconfigureradapter { @bean public viewresolver viewresolver() { internalresourceviewresolver resolv = new internalresourceviewresolver(); resolv.setprefix("web-inf/views/"); resolv.setsuffix(".jsp"); resolv.setviewclass(jstlview.class); return resolv; } } initializer public class chatlocalinitializer extends abstractannotationconfigdispatcherservletinitializer { @override protected string[] getservletmappings() { return new string[] { "/" }; } @override protected class<?>[] getrootconfigclasses() { return new class<?>[] { chatlocalwebconfig.class }; } @override protected class<?>[] getservletconfigclasses() { return new class...

My Meteor projects skip MongoDB-startup -

three weeks ago meteor projects worked fine, today noticed all meteor projects skip 'start-mongodb' step , or @ least seems way. projects rely on 1 or more collections stuck on 'starting app' step, while new projects start (probably because no mongodb doesn't cause problems them). note: i'm having these problems while running applications locally on laptop. most posts can find apps freezing on 'starting app' mention app can't connect mongodb, relates case, because never started, i don't know how tell meteor should start mongodb first before running of apps . any tips on matter? have set environment variable mongo_url ? if so, meteor (aka meteor run ) not start mongodb.

Getting Success/Failure Response from PowerShell Enable/Disable User script -

how success/failure response powershell enable/disable user using following scripts.i need update status of user. get-aduser -filter mail -eq $mail | disable-adaccount get-aduser -filter 'mail -eq "ed@gmail.com"' | enable-adaccount please advice me resolve this. just add -passthru parameter enable-adaccount , pass user object along properties. want select enabled user property. get-aduser -filter 'mail -eq "ed@gmail.com"' | enable-adaccount -passthru | select-object enabled

calculated columns - Min value with GROUP BY in Power BI Desktop -

Image
id datetime new_column datetime_rankx 1 12.01.2015 18:10:10 12.01.2015 18:10:10 1 2 03.12.2014 14:44:57 03.12.2014 14:44:57 1 2 21.11.2015 11:11:11 03.12.2014 14:44:57 2 3 01.01.2011 12:12:12 01.01.2011 12:12:12 1 3 02.02.2012 13:13:13 01.01.2011 12:12:12 2 3 03.03.2013 14:14:14 01.01.2011 12:12:12 3 i want make new column, have minimum datetime value each row in group id. how in power bi desktop using dax query? use expression: newcolumn = calculate( min( table[datetime]), filter(table,table[id]=earlier(table[id]) ) ) in power bi using table data produce this: update: explanation , earlier function usage. basically, earlier function give access values of different row context. when use calculate function creates row context of whole table, theoretically iterates on every table row. same happens when use filter function iterate on whole table , evaluate every row against filter co...

graph - Python: Find the total weights of a subgraph's outside edges -

i'm using python-igraph extract subgraph non-directed graph. nodes locations, , subgraph represents nodes/edges within radius node. i need find weights connect outside nodes of subgraph main graph, there simple way of doing this? i'm not sure of formally called. this total weight of cut between chosen set of nodes , rest of graph. can try this: your_nodes = [1, 2, 3] other_nodes = sorted(set(range(graph.vcount())) - set(your_nodes)) weight_of_cut = sum(graph.es.select(_between=(your_nodes, other_nodes))["weight"])

c# - Database Vender Error 245 -

Image
my code generates error message. how can correct this? rpt.bills_per_month rpt = new rpt.bills_per_month(); rpt.setparametervalue("@date", datetimepicker1.text.tostring()); rpt.rpt frm = new rpt.rpt(); frm.crystalreportviewer1.reportsource = rpt; frm.showdialog(); alter proc [dbo].[month_bills] @date nvarchar(20) select * pay_bills ((datepart(mm, date_of_pay) = @date) , (datepart(yy, date_of_pay) = @date))