Posts

Showing posts from January, 2014

jQuery: how to refresh DOM after fading in new elements? -

i want make small survey. want user has answer questions. new question fading in after clicking answer. works 1 time, because new question on display:hidden before not in dom think. need refresh dom think? here example: http://jsfiddle.net/x2yu6tvw/ qstnno = $('.question').data('id'); $('.answer').on( 'click', function(){ $('.question[data-id="' + qstnno + '"]').fadeout(800, function(){ nextqstn = qstnno+1; $('.question[data-id="' + nextqstn + '"]').delay(300).fadein(300); }); }); what can jquery listen new added element? here working demo . js $('.answer').on( 'click', function(){ qstnno = $(this).parent('div').data('id'); $('.question[data-id="' + qstnno + '"]').fadeout(800, function(){ nextqstn = qstnno+1; $('.question[data-id="' + nextqstn + '"]&#

c# - RouteUrl not working when site is published in Asp.net -

i had code in link <a href="<%$routeurl:city=islamabad %>" runat="server" >islamabad</a> its not routing url. link unclickable. had tried changing , still no luck. had 3 of them working during offline run through visual studio same site not working in live. what think web.config file not updated in production environment <%$ %> asp.net expression builder. used runtime expression binding control properties through server tag attributes. used appsettings, connectionstrings, or resources (or own custom extension, example use code-behind properties). these assignments added oninit() method of generated class. please refer below articles complete understanding of expression builder in asp.net expressions overview creating custom expressionbuilder class used in above code.

web services - Code Demand Constraint for RESTful APIs -

as newbie trying understand rest , principles. have read articles struggling undestand code demand constraint optional constraint. ? how , when implement it? appreciated. roy fielding's thesis, original source on rest, defines code-on-demand constraint follows : rest allows client functionality extended downloading , executing code in form of applets or scripts. simplifies clients reducing number of features required pre-implemented. allowing features downloaded after deployment improves system extensibility. however, reduces visibility, , optional constraint within rest. at time written, web static documents , "web client" browser itself. it's commonplace javascript-powered web apps consuming rest apis. example of code on demand - browser grabs initial html document , supports <script> tags inside document application can loaded on-demand .

wysiwyg - TinyMCE, Ckeditor... What do you use? -

my company building web app of front end developer. i've been doing research messaging services , been recommended @ tinymce , ckeditor. both of have tried , not overly keen on functionality. essentially messages sent out need include signature unique user logged system able utilize templates marketing purposes (advertising etc). so, question is. have had experience alternatives? , recommend based on small requirements? cheers,

javascript - Canvas change image background color but keep it's "effects" -

Image
i have image need change it's background color, keep "effects" on (on image black dots, white lines etc.) here's orginal image: i managed change color, keep removing "effects". preview: here's code : //let's want red var r = 255; var g = 0; var b = 0; var imgelement = document.getelementbyid('img'); var canvas = document.getelementbyid('canvas'); canvas.width = imgelement.width; canvas.height = imgelement.height; var ctx = canvas.getcontext("2d"); ctx.drawimage(imgelement, 0, 0); var imagedata = ctx.getimagedata(0, 0, canvas.width, canvas.height); var data = imagedata.data; (var = 0; < data.length; += 4) { if (data[i + 3] !== 0) { data[i] = r; data[i + 1] = g; data[i + 2] = b; data[i + 3] = data[i + 3]; } } ctx.putimagedata(imagedata, 0, 0); <img src="foo" id="img" /> <canvas id="canvas"

ios - MPMoviePlayerController in UICollectionView -

i developing app ios in xamarin , have uicollectionview mpmovieplayercontroller in cells. my problem cannot use mpmovieplayercontroller controls in order play / pause video because uicollectionview has touch events. i have tried setting false in uicollectionview cancancelcontenttouches field , setting true userinteraction doesn't work. how can send touch event mpmovieplayercontroller? thanks in advance!

javascript - Restangular | CustomPOST : I am unable to make a CORS POST request, with json data object in the body -

i trying make cors post request using restangular in following manner : //data json object var urltopost = '/api/deal/update/'+dealid; return restangular.all(urltopost).custompost(data, '', {}, { "content-type": "application/json", "access-control-allow-origin": "*", "access-control-allow-methods": "post, get, put, delete, options" }); when hit call, following error appears on console : xmlhttprequest cannot load http://55.76.122.145:8080/hulk/api/deal/update/55cd93bd20ce9744aeebff3a. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:9001' therefore not allowed access. and in network tab, can see successful call status 200 being fired option method. how go it? doing wrong ? the error message spells out you: no 'access-control-allow-o

ios - swift indexOf for [AnyObject] array -

Image
trying index of array ( [anyobject] ). what's part i'm missing? extension pageviewcontroller : uipageviewcontrollerdelegate { func pageviewcontroller(pageviewcontroller: uipageviewcontroller, willtransitiontoviewcontrollers pendingviewcontrollers: [anyobject]) { let controller: anyobject? = pendingviewcontrollers.first anyobject? self.nextindex = self.viewcontrollers.indexof(controller) int? } } i have tried swift 1.2 approach: func indexof<u: equatable>(object: u) -> int? { (idx, objecttocompare) in enumerate(self) { if let = objecttocompare as? u { if object == { return idx } } } return nil } we need cast object we're testing uiviewcontroller , since know array of controllers holding uiviewcontroller s (and know uiviewcontroller s conform equatable . extension pageviewcontroller : uipageviewcontrollerdelegate { func pageviewcontroller(pageviewcontrolle

matlab - Sending data to workers -

i trying create piece of parallel code speed processing of large (couple of hundred million rows) array. in order parallelise this, chopped data 8 (my number of cores) pieces , tried sending each worker 1 piece. looking @ ram usage however, seems each piece send each worker, multiplying ram usage 8. minimum working example: a = 1:16; ii = 1:8 data{ii} = a(2*ii-1:2*ii); end now, when send data workers using parfor seems send full cell instead of desired piece: output = cell(1,8); parfor ii = 1:8 output{ii} = data{ii}; end i use function within parfor loop, illustrates case. matlab send full cell data each worker, , if so, how make send desired piece? in personal experience, found using parfeval better regarding memory usage parfor . in addition, problem seems more breakable, can use parfeval submitting more smaller jobs matlab workers. let's have workercnt matlab workers gonna handle jobcnt jobs. let data cell array of size jobcnt x 1 , , each

Unit Testing Typescript In Visual Studio for Angular 2 development -

i new angular2. hence writing code in typescript our website. using visual studio 2013 development. need write unit test cases typescript code have written. can please share step step example on how configure typescript unit testing in visual studio. , whether should write unit test cases typescript in typescript, or should write unit test cases typescript in javascript. in advance. have seen this: https://github.com/steve-fenton/tsunit "tsunit unit testing framework typescript, written in typescript. allows encapsulate test functions in classes , modules." while not provide "step-by-step" directions ... step in right direction!

Rails form fields passing old data to whitelisted params -

update: fixed, pointing out kjmagic13. can see solution below. so i've been working on 1 since yesterday. have rails project form_for collecting client data name, age, etc. there's "add spouse?" button uses javascript reveal additional spouse input fields. of these attributes whitelisted, , spouse data no more attributes on client model (no spouse object). the first time input data these fields, pass through fine , saved. when revisit page, form prepopulated data. can edit fields , update client info, not spouse fields --> though fields whitelisted , nothing more client attributes. can't imagine how i'd make happen on purpose, less figure out how fix it. the form gets submitted, , params passed in old spouse data, not went input field. new client info updated in same form. looking in logs shows old spouse data being passed through, if never typed anything here's relevant snippets: in clients_controller def update if @client.report_read

c# - Intermittent error Linq to NHibernate Sequence Contains no Elements -

this may sound duplicate question, don't believe is. this error i'm getting, sounds common. i'm getting error intermittently. number of users site, i'm estimating occurs 5% of time. here's code: private topwrestlers filltopwrestlers() { try { var mostrecent = _wrestlerrankingrepo.query().orderbydescending(wr => wr.season).first().season; var currentseason = _configservice.getcurrentseason(); if (mostrecent > currentseason) return null; var tws = _wrestlerrankingrepo.getrankedwrestlers(currentseason) .where(wr => wr.rank <= 3) .orderby(wr => wr.rank) .select(wr => wr.wrestler); return new topwrestlers { _125 = tws.firstordefault(w => w.roster.weightclass == 125), _133 = tws.firstordefault(w => w.roster.weightclass == 133), _141 = tws.firstordefault(w => w.roster.weig

c# - How to retrieve the TFS queries of a user? -

similar question : how can retrieve list of workitems tfs in c#? but trying retrieve queries (not workitems) of user (to call them later, that's topic). possible c# ? also, related, there documentation anywhere tables used in workitemstore.query object ? sorry if has been asked before, googling tfs , queries returns lot of unwanted results (obviously). thanks ! aaaaaaaaaaaand, looking 5 minutes namespace have saved me writing yet useless question. answer if ever interested : tfsteamprojectcollection tfs = new tfsteamprojectcollection(new uri("uri")); tfs.ensureauthenticated(); workitemstore workitemstore = tfs.getservice<workitemstore>(); queryhierarchyprovider queryprovider = new queryhierarchyprovider(workitemstore); project project = workitemstore.projects["myproject"]; var queries = queryprovider.getqueryhierarchy(project);

asp.net mvc - passing query string after the controller name in mvc -

i trying pass parameter in mvc after controller name i added routes.maproute( name: "product", url: "product/{*id}", defaults: new { controller = "product", action = "index", id = urlparameter.optional } ); this did not work i tried url: "product/{id}", but if remove lines above it(the lines below in post), working routes.maproute( name: "default", url: "{controller}/{action}/{id}", defaults: new { controller = "home", action = "index", id = urlparameter.optional } ); order in register routes matter. first route matches request used. if understand correctly, had: routes.maproute( name: "default", ... routes.maproute( name: "product", default route generic, , since registered first picked time of requests, shadowing product route. correct way registed routes

algorithm - Sort labels of segmented image in kmeans based on cluster mean -

Image
i have simple question interesting. know, kmeans can give different result after each running due randomly initial cluster center. however, assume know cluster 1 has smaller mean value cluster 2, cluster 2 has smaller mean value cluster 3 , on. want make algorithm implement cluster has small mean value, assigned small cluster index. this matlab code. if have more sort or more clear way. please suggest me %% k-mean num_cluster=2; nrows = size(img_original,1); ncols = size(img_original,2); i_1d = reshape(img_original,nrows*ncols,1); [cluster_idx mu]=kmeans(double(i_1d),num_cluster,'distance','sqeuclidean','replicates',3); cluster_label = reshape(cluster_idx,nrows,ncols); %% sort based on mu [mu_sort id_sort]=sort(mu); idx=cell(1,num_cluster) %% save index of order if mu i=1:num_cluster idx{i}=find(cluster_label==id_sort(i)); end %% sort cluster label based on mu i=1:num_cluster cluster_label(idx{i})=i; end it's uncle

amazon web services - Long running mysql "cleaning up" transaction -

i have been trying debug 'lock wait timeout exceeded' error in mysql (aws rds) v5.6.19a, sporadically thrown when attempt select row, using primary id, update, i.e: select primary_id tbl_widgets primary_id = 5 update after many hours debugging have ruled out part of application 'directly' locking same row (which obvious culprit). such have started dig deeper rabbit hole mysql locking , noticed following correlation between 'lock wait timeout exceeded' error being thrown , information provided by: show engine innodb status; there appears long running transaction in cleaning up state locking increasing number of rows upto ~10 minutes, here relevant lines transaction 10 manual innodb status queries: 2015-08-19 13:29:04 ---transaction 25861246681, active 158 sec 10 lock struct(s), heap size 1184, 21 row lock(s), undo log entries 20 mysql thread id 5110120, os thread handle 0x2ba082506700, query id 7146839061 10.0.1.154 mfuser cleaning trx read view no

Will OpenLayers 4 change its v3 api? -

i developing big software using openlayers 2.13.1. estimating migrating software 3.8.2 version, seems version 4 right around corner, , concerned if change api again. does know it? the following links document changes: https://github.com/openlayers/openlayers/blob/master/changelog/v4.0.0.md https://gis.stackexchange.com/questions/229046/openlayers-4-differences-from-3-x

javascript - How can I specify an array of objects indexed by a field in Typescript? -

i have got far: testquestions: { data: [{ admintestid: number, admintestquestionid: number, questionuid: string, subtopidid: number, title: string }] }; now add in object called datamap. object result of passing data through reduce function: testquestions.datamap = data.reduce((rv, v) => { rv[v.questionuid] = v; return rv; }, {}); can telling me how can define (inline) datamap? testquestions: { data: [{ admintestid: number, admintestquestionid: number, questionuid: string, subtopidid: number, title: string }], datamap: questionuid: string [{ admintestid: number, admintestquestionid: number, questionuid: string, subtopidid: number, title: string }] }; i have tried above it's not correct. hope can here. you close. first lets break out object type own interf

android - In Broadcast receiver class, onReceive method contains custom intent which is not working in Samsung mobile -

here trying build simple sms receiving app. in broadcast receiver class, have onreceive method contains custom intent not working in samsung mobile(4.1.2) works in kitkat 4.4(moto e). intent in = new intent("smsmessage.intent.main").putextra("get_body", sms_body); context.sendbroadcast(in); how do in android 4.1.2? all need if send data via intent right? if no please explain mean broadcast not working. if yes put following inside onreceive() method. intent in = new intent(context, ****name of activity****.class) in.putextra("get_body", sms_body) context.startactivity(in); please take note have mentioned _****name of activity****_change name of activity inside activity create method onnewintent () inside input following code: string textinsms = intent.getstringextra("get_body") that's can whatever want textinsms string. holds value of whatever passed it.

android - Circular ImageView on Xamarin -

i working on xamarin android application, , need make circular imageview . how can achieved? i use roundedimageview library. it's written in java, can write binding without problems. once do, can add .axml : <roundedimageview local:riv_corner_radius="15dp" local:riv_oval="false" android:scaletype="centercrop" android:layout_width="30dp" android:layout_height="30dp" /> edit future readers: wrote port of roundedimageview xamarin.android, based on library linked on post. source code can found here , nuget package here . mvxroundedimageview included use mvvmcross.

java - What's the difference between fx:id and id: in JavaFX? -

maybe newbie's question.... i'm starting learning javafx in fmxl application using scene builder, reading tutorials: http://docs.oracle.com/javase/8/javafx/get-started-tutorial/fxml_tutorial.htm so once applied changes, issue 2 ids came up... might have missed or confused them... can tell me in cases used 1 or another? id use set css id component, example <text id="welcome-text" .../> , in stylesheet have #welcome-text { font-size: 16pt; } applied text . fx:id use if want work components in controller class, annotate them @fxml text mywelcometext .

SQL Server trigger to update the same table -

i have sql server table has varchar column can save 4 characters when insert value 963 column have add leading "0" this example: if insert 23 value should saved 0023 if insert 236 value should save 0236 if insert 2369 value should saves 2369 can add after trigger table, check if value inserted less 4 digits, , update same value in column leading "0"s appended value will affect performance of trigger? practice have trigger update value in same table? yes, can create trigger , 1 operation did not affect performance. way change value when use in select. e.g select right('0000' + column, 4), ....

jsf - Unable to call method specified in ValueChangeListener attribute of <ice:selectOneRadio> -

i creating icefaces datatable.first column have radio button. on clicking of radio button of first row able edit row. on clicking of radio button of rows operation should performed(but not edit). have 1 command button @ bottom of datatable saves data. find below code same ------------------xhtml---------------------- <h1>icefaces 3 </h1> <h:form> <ice:selectoneradio id="myradioid" value="#{order.checked}" layout="spread" valuechangelistener="#{orderbean.editselectedrow}" partialsubmit="true"> <f:selectitem itemvalue="" /> </ice:selectoneradio> <ace:datatable value="#{orderbean.orderlist}" var="o" style="width: 300px !important"> <ace:column headertext=

javascript - Highcharts full circle gauge as in Knob js -

Image
is there simple example (preferibly jsfiddle) implementation of full circle gauge highcharts 1 below jquery knob ? here ve got far : http://jsfiddle.net/skeletorkun/grn5o39e/1/ $(function () { var gaugeoptions = { chart: { type: 'solidgauge' }, title: null, pane: { center: ['50%', '50%'], size: '100%', startangle: 0, endangle: 360, background: { backgroundcolor: (highcharts.theme && highcharts.theme.background2) || '#eee', innerradius: '60%', outerradius: '100%', shape: 'arc' } }, tooltip: { enabled: false }, // value axis yaxis: { stops: [ [0.1, '#55bf3b'], // green [0.5, '#dddf0d'], // yellow

php - Symfony2 : set default value from database in radio buttons choice form? -

new symfony2, have simple table 2 fields. as alert field boolean, declared form this: public function buildform(formbuilderinterface $builder, array $options) { $builder ->add('message', 'text', array('label' => "message")) ->add('alert', 'choice', array( 'choices' => array(1 => 'yes', 0 => 'no'), 'expanded' => true, 'multiple' => false, 'label' => "are agree?", 'attr' => array('class' => 'well') )); } it working when create new entry, when trying edit entry, 'alert' choice stored in database not set in form (radio button). how can set database state of field in form? you have 2 options here. try use data attribute in formbuilder. $bu

Sending a variable from PHP to Javascript -

this question exact duplicate of: send variable php javascript 2 answers i know have asked question before, having trouble understanding answers get. have following code in 2 separate files, 1 of them javascript , other php: javascript xmlhttp=new xmlhttprequest(); xmlhttp.onreadystatechange=function() { if (this.readystate==4 && this.status==200) { document.getelementbyid("dummy").innerhtml=this.responsetext; } } xmlhttp.open("get","getgames.php?yearfilter="+yearfilter,true); xmlhttp.send(null); php $yearfilter = (int)$_request["yearfilter"]; $dummyvariable = 123245; i have been using javascript file pass variables php cannot figure out how send variable (such dummyvariable example) php javascript file. know result should end in "this.responsetext" don't know code put in

javascript - Sorting an array of objects based on a property in an Angular controller using $filter -

i have array of objects called $scope.segments this: [ { "_id": "55d1167655745c8d3679cdb5", "job_id": "55d0a6feab0332116d74b253", "status": "available", "sequence": 1, "body_original": "such fork", "__v": 0, "body_translated": "tal bifurcación" }, { "_id": "55d1167655745c8d3679cdb4", "job_id": "55d0a6feab0332116d74b253", "status": "available", "sequence": 0, "body_original": "so it.", "__v": 0, "body_translated": "así que esto es." } ] i need order array sequence. so, need sequence 0 appear first, sequence 1 appear next, , on. in view, i'm doing , works: <ul ng-repeat="segment in segments | orderby: 'sequence'"> <li>{{ segment.sequence }}&

Javascript get Object property value -

this question has answer here: access / process (nested) objects, arrays or json 16 answers how property value of name of object's 2nd child? var obj = { 'one_child': { name: 'a', date: '10' }, 'two_child': { name: 'b', date: '20' } } i've tried object.keys(obj)[1].name , doesnt work. you define object properties, can access directly using : obj.two_child.name

excel - Set a range and use that range in a formula -

i unable figure out how use set range in formula: set range = application.inputbox(prompt:="test", title:="test", type:=8) sheets("sheet1").cells(3, 4).formula = "=sum(range)" all returned sum(range) , not actual sum of selected cells. i've tried range.address , couple other variations no avail. your formula string, need concatenate range address formula: sheets("sheet1").cells(3, 4).formula = "=sum(" & range.address & ")" you should use different name variable, however, range built-in type/function in excel vba.

Binding a textBlock text to a value in a custom class xaml c# -

when navigate new page should display text, appears empty the xaml code have xmlns:vm="using:estimation" <page.datacontext> <vm:playerclass/> </page.datacontext> this textblock im trying bind data too. <textblock x:name="playerone" text="{binding playeronename}" /> the class im binding follows public class playerclass :inotifypropertychanged { public event propertychangedeventhandler propertychanged; private void notifypropertchanged(string info) { if (propertychanged != null) propertychanged(this, new propertychangedeventargs(info)); } private string name; public string playeronename { { return this.name; } set { this.name = value ; notifypropertchanged(playeronename); } } }} and class im changing content in text box is private void startbutton_

.net - Using different ADO.NET providers dynamically with Entity Framework -

my application can work different databases sql server, mysql, oracle, postgresql or sqlite. knows how load relevant ado.net assembly (its dll file name known) , find dbproviderfactory type in it. factory gives me need work database connection on plain ado.net level. entering entity framework. used use own o/rm want replace ef 6 code first. own o/rm generated sql , ran dbcommand class. ef seems lot more , require special configuration. can't add assembly references supported database client provider , require deploying files. need solution loads assemblies @ runtime dynamically , finds way there. then, depending on database shall used, deploy dlls required that. for doesn't work yet. error message postgresql: system.notsupportedexception: unable determine provider name provider factory of type 'npgsql.npgsqlfactory'. make sure ado.net provider installed or registered in application config. this happens when try add entity dbset . database server co

javascript - How do I Run multiple protractor test suites at once? -

first attempt @ using protractor. able run multiple suites in succession. have application 1 big angular form different scenarios. have expected results each scenario , enter 1 command , run through each test. thought use comma separated like: protractor config.js --suite=rf1_breast, rf1_ovarian, rf1_pancreatic but getting error: error: more 1 config file specified which strange there 1 config file in directory running protractor. here config.js : exports.config = { seleniumaddress: 'http://localhost:4444/wd/hub', capabilities: { 'browsername': 'chrome' }, framework: 'jasmine2', suites: { rf1_breast: './rf1-ashkenazi-hboc/breast/specs/*_spec.js', rf1_ovarian: './rf1-ashkenazi-hboc/ovarian/specs/*_spec.js', rf1_bladder_fail: './rf1-ashkenazi-hboc/bladder-expected-fail/specs/*_spec.js', rf1_pancreatic: './rf1-ashkenazi-hboc/pancreatic/specs/*_spec.js', rf1_prostate: './rf1-

javascript - Hide class if another span's child class is visible using jQuery -

it's similar this topic not working. here codes: <span class="main_price"> $50 </span> <span class="option_price"> <span class="option_price_value"> $70 </span> </span> by default "main_price" , "option_price" class visible , "option_price_value" class visible has options. now i'm trying hide "main_price" when "option_price_value" visible. for more clear, when has no options default it's showing <span class="main_price"> $50 </span> <span class="option_price"> </span> and when options available should like <span class="main_price" style="display:none;"> $50 </span> <span class="option_price"> <span class="option_price_value"> $70 </span> </span&g

jsp - Twillio StatusCallBack Webhook -

does has example of using status callback in java (jsp/servlet)? if make couple of calls using dial, having difficulty in updating view (jsp) show current progress of each call. any appreciated. thanks p i figured out. i created servlet called twilio webhook. created static class sets few properties when servlet called webhook. used server sent event update view based on property of static class.

mongodb - Sorting in Loopback Connector Mongo -

i'm having real issue. i'm trying query, limit, sort, etc. i'm doing: mymodel.find( { where: { "location": { "near": { "lat": "80", "lng": 80 }} }, { limit: 50, offset: 0, skip: 10, sort: { "name": "asc" } }, function(err, docs) { var retval = docs || []; return cb(null, retval); }); what magic sauce limit, skip, , sort? any appreciated. thanks mymodel.find( { where: { "location": { "near": { "lat": "80", "lng": 80 }}}, limit: 50, offset: 0, skip: 10, order: "name asc" }, function(err, docs) { var retval = docs || []; cb(null, retval); }); i think way should look. try

excel - Merge two tables into one pivot table - order of columns is different -

Image
i saw how merge 2 different tables 1 pivot had same order of columns. have 2 different excel sheets 2 different dbs , want merge both 1 pivot - have same column names in different order. attached screen shot of first table, second table , pivot table have found answer! 1 should attach both tables 1 right or left each other , create pivot table 1 source rather multiple. however, excel differentiates between a1 , a1_1 second table. solve used calculated fields new field of a1 , a1_1.

asp.net - How to use SELECT in sqlcommand -

i have 2 tables table payment: paymentid orderid{fk_payment_orderlist} totalprice datetime status refid salereferenceid table orderlist: orderid customerid classid i have storedprocedure : use [miztahrirtest2] go /****** object: storedprocedure [dbo].[insertpayment] script date: 8/19/2015 8:51:08 pm ******/ set ansi_nulls on go set quoted_identifier on go alter procedure [dbo].[insertpayment] @orderid int,@totalprice int,@status nvarchar(50),@new_identity int output begin insert payment(orderid,totalprice,[datetime],[status],refid,salereferenceid) select max(orderid) orderlist orderid,values(@orderid,@totalprice,getdate(),@status,'','') select @new_identity = scope_identity() select @new_identity id return @new_identity end i want choose last orderid orderlist table , set in values payment table code doesn't work correctly .what should now? you need define orderid field identity , automatica

javascript - AngularJS - Use data returned by a service in the controller and the view to populate dropdown -

this index.html <!doctype html> <html class="no-js"> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <!-- place favicon.ico , apple-touch-icon.png in root directory --> <!-- build:css(.) styles/vendor.css --> <!-- bower:css --> <!-- endbower --> <!-- endbuild --> <!-- build:css(.tmp) styles/main.css --> <link rel="stylesheet" href="styles/main.css"> <!-- endbuild --> <link rel="stylesheet" href="styles/settingsstyles/generalsettings.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> </head> <body ng-app="assignment3app"> <!--