Posts

javascript - detect when user check or uncheck row on client side in primefaces datatable -

i use this row editing primefaces datatable , added multiple selection feature through this example then want detect on client side when user check or uncheck 1 row , number of rows checked @ each change i tried many ways firebug .... no result here 1 of essays (just testing): $(function(){ $('.ui-chkbox-box.ui-widget.ui-corner-all.ui-state-default').mousemove(function(){ if(('.ui-chkbox-box.ui-widget.ui-corner-all.ui-state-default').hasclass('ui-state-active')) alert('show'); }); do have idea if want know when user clicked checkbox located in datatable, can use code listen click , verify if checked or not: jquery(".ui-chkbox").click(function () { if(jquery(this).find("span").first().hasclass("ui-icon-check")) alert("unchecked"); else alert("checked...

what is purpose of order in mysql index -

i have table person in there field contact number want add indexing on contact number. in mysql purpose on ordering while indexing field. index contact_number ( contact_number asc)) right (mysql 5.7) asc/desc ignored mysql. http://dev.mysql.com/doc/refman/5.7/en/create-index.html an index_col_name specification can end asc or desc. these keywords permitted future extensions specifying ascending or descending index value storage. currently, parsed ignored; index values stored in ascending order. if implemented day might useful composite indices: http://explainextended.com/2009/04/27/descending-indexes/

sensor - Get Forward, Backward left right sesnor android -

i have small project, in need detect movement of device ex: have mobile held on table if move device left "like moving pc mouse", need know if move right, need know if move forward, , backward need know i searched , used many tutorials, tutorials gave me numbers changes lot when device not moved!! tried this if (event.sensor.gettype() == sensor.type_accelerometer){ mgravity = event.values.clone(); // shake detection float x = mgravity[0]; float y = mgravity[1]; float z = mgravity[2]; maccellast = maccelcurrent; maccelcurrent = (float)math.sqrt(x * x + y * y + z * z); float delta = maccelcurrent - maccellast; maccel = maccel * 0.9f + delta; // make higher or lower according how // motion want detect if(maccel > 0.0005){ ((textview)findviewbyid(r.id.xfield)).settext("x:" + string.valueof((x))); ...

find last merge done to a branch clearcase -

Image
i have 2 integration branch int_1 , int_2 . in time there has been merged int_1 int_2 . i want know when last time merge done on int_2 branch int_1 branch. there command that? if talking ucm integration branches, means have done delivered 1 integration stream of 1 ucm project integration stream of project. in case, go destination branch int_2 , , deliver.xxx activities. recent 1 tell when last deliver done. with base clearcase, isn't straightforward. need list last version of int_2, describing them in order merge hyperlink. see " how files , directories merged " here see, going recent oldest version of test , last merge main on version 3. describing version return: cleartool describe util.h@@/main/3version "util.h@@/main/3" . . . hyperlinks: merge@278@/vob_3 /vob_3/src/util.h@@/main/rel2_bugfix/1 -> /vob_3/src/util.h@@/main/3 you can try: cleartool describe -l util.h@@/main/3version

how to avoid #{...} replaced in custom maven archetype? -

here mybatis mapper.xml in custom maven archetype : ... <sql id="selectsql"> <where> <if test="id != null"> id = #{id} </if> <if test="parentid != null"> , parent_id = #{parentid} </if> ... mybatis symbol #{..} not maven archetype symbol ${...} , problem mapper.xml goes wrong in replacing #{...} #..., lose {} after new maven project custom archetype : <sql id="selectsql"> <where> <if test="id != null"> id = #id </if> <if test="parentid != null"> , parent_id = #parentid </if> i named 2 propertyies key follow , having nothing mybatis mapper xml : <requiredproperties> <requiredproperty key="projectname"> <defaultvalue>hntest</defaultvalue> </requiredproperty> <...

asp.net mvc - Is MVC Framework ill-equipped for rich page design? -

just prefix question, i've decided take @ moving our works old legacy systems (40+ programs vb6, vba, vb.net c#.net) 2 separate systems using same dal (barcoding terminals , 1 web based system) spend day fixing crummy or non existant business logic in 15 year old vba programs. i've built entity framework model complete fluent validation , couldn't happier after using bit. the small team familiar webforms (but not very) last few days i've explored mvc razor. loving mvc framework until tried start trying add more functions onto same page , seemed arbitrarily hard replicate our recent system put in webform. before, eager load customer , it's child entities , bind single page customer access (which wanted), works okay , isn't slow. single page edit account details/contacts/emails/phones/jobs. all examples i've done , seen in mvc handle single update, single edit etc surely can't separate out every single action new view/page? can pass rich model th...

javascript - Is there a big difference between reference and primitive types of boolean, number etc.? -

i rad, can create numbers as: var num = 10; and: var num = new number(10); may use first variation of declaration? yes, use first 1 always , returns primitive value. the second method looks returns primitive value doesn't. infact, returns object boxed primitive value. to explain this, lets declare 2 variables: var = 2; var b = new number(2); the expression a == b return true since javascript coerces b primitive value of 2. however, expression a === b return false types different: a being primitive , b being object.