Posts

html - Send row info to angularjs controller when checkbox in row is clicked -

Image
i have html code uses angularjs show table. on table, there checkbox on each row. the table looks this; here html code. <div ng-app ng-controller="checkctrl"> <table class="table table-hover data-table sort display" style="width:100%"> <thead> <tr> <th class="serial_"> serial </th> <th class="name_"> name </th> <th class="id_"> id </th> <th class="on_off_"> on/off </th> </tr> </thead> <tbody> <tr ng-repeat="item in check_items"> <td>{{item.serial}}</td> <td>{{item.name}}</td> <td>{{item.id}}</td> <td> ...

sql case statement in where clause , need to join check on different tables on different cases -

select nc.status newcustomer nc inner join #salesexec userfiltr on userfiltr.userid = nc.reportedby left join distributor d on nc.distributorid = d.distributorid left join shop s on s.shopid = nc.shopid left join shoptype st on st.shoptypeid = s.shoptypeid left join #orgshop orgfiltr on orgfiltr.organizationid = d.organizationid convert(varchar, nc.mobiletransactiondate, 101) between @fromdate , @todate , case nc.status when 1 (st.shoptype null or st.shoptype = '' or st.shoptype <> 'distributor') else (nc.shoptype null or nc.shoptype = '' or nc.shoptype <> 'distributor') end group reportedby you may looking this and 1 = case when nc.status = 1 , (st.shoptype null or st.shoptype ='' or st.shoptype <> 'distributor' ) 1 when (nc.shoptype null or nc.shoptype ='...

c# - How do i bind the variable value to the view page at runtime in mvc 4 -

this serious issue i'm facing quite long time 3 hours, suppose no fix found , i'm stuck. here have developed patient registration page in asp.net mvc 4 razor posting form data database if validation comes out true, before need call random variable object storing random value within prespecified range , insert variable view typed(connected patients model class) , created create template such fields or properties of patients class acessed in view store patients data view. now,here need random value (patient's id) preselected patient id textbox each time patientregistration page called works unique token generator every new patient registered. i have tried several other codes bind random value form element patient id none of them worked me.below i'm writing code model class,controller , regisrtation view(cshtml).please me in this! patients model class:- using system; using system.collections.generic; using system.linq; using sy...

bash - restart program if it outputs some string -

i want loop process in bash script, process should run forever fails. when fails, outputs >>747;3r last line, keeps running. i tried (just testing) while [ 1 ] mono program.exe last_pid=$! sleep 3000 kill $last_pid done but doesn't work @ all, process mono program.exe runs forever (until crashes, script nothing.) $! expands pid of last process started in background. can seen with: cat test sleep 2 lastpid=$! echo $lastpid ~$ bash -x test + sleep 2 + lastpid= + echo vs ~$ cat test sleep 2 & lastpid=$! echo $lastpid :~$ bash -x test + lastpid=25779 + sleep 2 + echo 25779 the fixed version of script read: while true; mono program.exe & last_pid=$! sleep 3000 kill $last_pid done your version running mono program.exe , sitting there. didn't make next line waiting process finish. kill command didn't work $! never populated (wasn't background process).

typescript - Angular 2 effect is not working -

reducer: import {actionreducer, action} '@ngrx/store'; import {set_brands, set_brand} './brands.actions'; import {ibrandsstorage} './brands-storage.interface'; export const brandsreducer: actionreducer<any> = (state: ibrandsstorage = {list: [], single: {}}, action: action) => { switch(action.type) { case set_brands: return object.assign({}, state, { list: [...action.payload.data] }); case set_brand: return object.assign({}, state, { single: action.payload.data }); } } effect: import {injectable} '@angular/core'; import {action, store} '@ngrx/store'; import {actions, effect} '@ngrx/effects'; import {observable} 'rxjs/observable'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/switchmap'; import {get_brands, get_brand} './brands.actions'; import {brandsapi} 'app/shared/apis'; @injectable() e...

reporting services - SSRS 2016 - data bar chart with repeating color states over time -

i use ms ssrs 2016 enterprise. i have measured values on time want show on 1 bar chart. values consists of time , status measured in time, e.g.: time | status 05:01 | g (green) 05:15 | r (red) 06:08 | g 11:41 | y (yellow) 11:43 | r 11:59 | y 13:00 | g all need show 1 colored bar day 00:00 23:59 colored according actual status. time on x axis , in case above 05:01 05:15 green, 05:15 06:08 red, 06:08 11:41 green, 2 minutes yellow, red etc. is there ssrs object, able this? calculation of status each time not optimal, show periods instead can't find appropriate chart type. any help? in advance! edit: these real data being load dataset. time status 2016-10-30 10:56:00 0 2016-10-30 10:26:00 3 2016-10-30 07:56:00 0 2016-10-30 06:56:00 3 2016-10-25 17:50:00 0 2016-10-22 08:09:00 0 2016-10-22 07:09:00 3 2016-10-21 13:36:00 0 2016-10-21 08:57:00 0 2016-10-20 15:21:00 0 2016-10-20 15:07:00 0 2016-10-18 19:13:00 0 2016-10-18 15:43:00 3 2016-10-18 03:13:00 0 2...

c++ - no member named set_sizing_info was found in Triangulation_vertex_base_2 -

i trying use cgal triangulate 2d plane mesh network. following instructions this link. works fine until last step can use lloyd optimization optimize mesh. when compiling code, error /usr/local/include/cgal/mesh_2/mesh_sizing_field.h:100:12: no member named 'set_sizing_info' in 'cgal::triangulation_vertex_base_2<cgal::epick, cgal::triangulation_ds_vertex_base_2<cgal::triangulation_data_structure_2<cgal::triangulation_vertex_base_2<cgal::epick, cgal::triangulation_ds_vertex_base_2<void> >, cgal::delaunay_mesh_face_base_2<cgal::epick, cgal::constrained_delaunay_triangulation_face_base_2<cgal::epick, cgal::constrained_triangulation_face_base_2<cgal::epick, cgal::triangulation_face_base_2<cgal::epick, cgal::triangulation_ds_face_base_2<void> > > > > > > >' popped up. traced triangulation_ds_face_base_2 , didn't find function named set_sizing_info. my code: // // main.cpp // 2ddrawingtemplate // // ...