Posts

javascript - ngRepeat track by: How to add event hook on model change? -

i have simple ngrepeat following: <some-element ng-repeat="singlerecord in arrayofrecords track singlerecord.id"> <!-- stuff --> </some-element> arrayofrecords updated server , may contain new data. ngrepeat 's track by feature can figure out when new element added array , automatically updates dom without changing existing elements. hook code , execute callback function when there's new data coming in or old data removed. possible via angular? from understand, there's $$watchers triggers callbacks whenever there's changes variables, don't know how go hacking that. right direction? note: know can manually save arrayofrecords , compare new values when fetch them see changed. however, since angular offers track by feature has logic, nice if can have angular automatically trigger event callback when element added or removed array. doesn't make sense duplicate logic exists in angular. probably create dire...

php - copy values to another mysql database -

i have table displays fields sent form. there buttons can edit or delete selected row selecting id. want add button insert selected row table. cannot work. here's code table: <?php /* view.php displays data 'players' table */ // connect database include('config2.php'); // results database $result = mysql_query("select * articles") or die(mysql_error()); // display data in table echo "<table border='1' cellpadding='10'>"; echo "<tr> <th>author</th> <th>email</th> <th>title</th> <th>poem</th> <th>id</th>"; // loop through results of database query, displaying them in table while($row = mysql_fetch_array( $result )) { // echo out contents of each row table echo "<tr>"; echo '<td>' . $row['name'] . '</td>'; echo '<td>' . $ro...

bash - Determine Deployment Group from appspec.yml -

i using elb scripts https://github.com/awslabs/aws-codedeploy-samples/tree/master/load-balancing/elb remove ec2 instances load balancer before code updates. i need define load balancer in elb_list variable of common_functions.sh bash script. load balancer different each environment (or deployment group). is there way can set variable based on deployment group deploying within bash script? the application artifacts same, deployed different environments or groups , hence, different load balancers. well then, after searching forums on aws, see support deployment specific environment variables. so can reference deployment group within bash , set load balancer: if [ "$deployment_group_name" == "staging" ] elb_list="staging-elb" fi re http://blogs.aws.amazon.com/application-management/post/tx1px2xmplypuld/using-codedeploy-environment-variables

vb.net - (415) Unsupported Media Type while posting envelopes in DocuSign -

i getting error while trying post envelope: (415) unsupported media type here code: dim httpwebrequest = directcast(webrequest.create("https://demo.docusign.net/restapi/v2/accounts/1005732/envelopes"), httpwebrequest) httpwebrequest.contenttype = "text/json" httpwebrequest.method = "post" httpwebrequest.accept = "text/json" httpwebrequest.mediatype = "text/json" httpwebrequest.headers.add("x-docusign-authentication", "{""username"": ""myuser"",""password"": ""mypassword"",""integratorkey"": ""mykey""}") using streamwriter = new streamwriter(httpwebrequest.getrequeststream()) dim json string = "{""status"": ""sent"",""emailblurb"": ""test email body"",""emailsubject"": "...

Sorting XML based on several sub-elements using XSLT -

i'm trying sort xml (using xslt) based on few child elements , return result xml. know it's not difficult first experience using xslt , it's giving me troubles. here's xml: <root> <subject> <coursesubjectheader> <subjectcode>b</subjectcode> <subjectname>text</subjectname> <unit>text</unit> <faculty>text</faculty> </coursesubjectheader> <course> <crslevel>text</crslevel> <subjectandnumber>b 200</subjectandnumber> <units>3.0</units> <hours>3-0</hours> </course> <course> <crslevel>text</crslevel> <subjectandnumber>b 100</subjectandnumber> <units>3.0</units> <hours>3-0</hours> </course> </subject> <subject> <coursesubjectheader> <subjectco...

java - Javafx - How to Add Pie Chart to BorderPane from Different Class -

i have 2 classes. main class , chart class. chart class extends piechart , instantiates pie chart in constructor. main class creates borderpane, instantiate object of chart class(creating pie chart) , add center pane.the problem don't know exact syntax make work properly, in constructor of chart class. i know example, if creating hbox instead of pie chart in constructor, use this. , number of methods. pie charts have additional elements observable lists i'm not sure how make work? here 2 classes below. please help. thank you. main class public class main extends application { @override public void start(stage primarystage) { borderpane border = new borderpane(); chart chart = new chart(); border.setcenter(chart); scene scene = new scene (border, 640,680); primarystage.setscene(scene); primarystage.show(); } public static void main(string[] args) { launch(args); }} chart class public class chart extends piechart{ public chart(){ ...

c# - Mapping stored procedures in EF 6 to abstract types -

my data model uses inheritance (which i'm trying change...) looks like: abstract class entity { public int foo { get; set; } } class derived1 : entity { public int widgetcount { get; set; } } class derived2 : entity { public int barcount { get; set; } } i retrieve results of query (or stored proc) returns entity, .executestorecommand<t> .translate<t> , .sqlquery<t> fail because can't create entities, yet query against dbcontext's dbset<entity> works , returns objects of correct type (either derived1 or derived2). is there way me query entities without using dbset?