Posts

python - how to write regex for a price expression? -

expression : "price(might contain comma) eg" examples: 40 eg or 4,657 eg or 4,352,345 eg i want 1 string regex should use of these cases. you try one: ^\d{1,3}(,\d{3})*\seg$ if want decimals well... ^\d{1,3}(,\d{3})*(\.\d\d?)?\seg$ now, if can have numbers (more 999) without commas @ , possible decimal... ^\d{1,3}(,?\d{3})*(\.\d\d?)?\seg$ more details: ^ @ start means price must start next character (here \d meaning numeric character) \d{1,3} means 1 3 numeric characters. (,\d{3})* group, appearing 0 times or more, consisting of comma , 3 numeric characters. assuming price 'clean', things ,34 in price 3,34 eg won't allowed through. (\.\d\d?)? group, appearing 0 or 1 time, consisting of period . , digit , second possible digit. things .2 or .54 allowed. .564 not, however. \s means 1 space character, , no more, no less. if price data given 'clean', there should no issue , identify not 'clean...

Map a Map<Long, List<POJO>> through JPA eclipselink -

i have similar requirement of problem statement defined in i want map map<long, list<pojo>> through jpa i using eclipselink, had create separate class itemattributes , in class atleast have use primarykey table item_attribute. configuration able fetch results in map, while creating new record eclipselink tries consider itemattributes entity & hence ends in inserting value primarykey(which null) in table item_attribute don't want , want list of - list attributes inserted. surprisingly cannot make primary key read declared in itemattributes class. any idea how avoid this? further cannot make descriptor class itemattributes read skip creation part of entire table item_attribute using eclipselink workbench configuration. you need create entity class represent relationship in answer other post. what exact model/data model. your intermediate class need id, can use @generatedvalue if have no logical one.

ios - how to add a custom view in the selected row in UITableView? -

i new @ programming , struggling in this. how add custom view in selected row in uitableview? all other rows should not affected. new view should appear in place of row clicked. view can have bigger size. thanks. you can add new view in rowdidselect delegate method, - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { uitableviewcell *cell = [tableview cellforrowatindexpath:indexpath]; uiview *myview = [[uiview alloc] initwithframe:cgrectmake(10.0f, 10.0f, 100.0f, 30.0f)]; [myview settag:-1]; [cell addsubview:myview]; } implement diddeselectrowatindexpath given - (void)tableview:(uitableview *)tableview diddeselectrowatindexpath:(nsindexpath *)indexpath { uitableviewcell *cell = [tableview cellforrowatindexpath:indexpath]; uiview *myview = [cell viewwithtag:-1]; [myview removefromsuperview]; }

c# - GroupingView in Ext.Net V2.X show error -

i new ext.net v1.x tool , old project woking fine, when update ext.net dll set v2.x. number of control generate errors. error :58 type or namespace name 'groupingview' not exist in namespace 'ext.net' (are missing assembly reference?) <view> <ext:groupingview id="gridview" hidegroupedcolumn="true" forcefit="true" > <listeners> <refresh handler="uncheckcheckheader(#{checkselectionmodel});" /> </listeners> <getrowclass fn="getrowclass" /> </ext:groupingview> </view> the groupingview has been removed in v2. please use grouping feature, see #23 in breaking_changes file. here best thoughts regarding migrating v2 v1.

php - Is it possible to Generate a Pdf Design by using Fpdf -

Image
i want generate pdf in php using fdpf. can draw table in fpdf. want design table in image given using fpdf.is possible. new fpdf please me. want above table design. in advance you should download addon called pdf_mc_table or copy here: http://www.fpdf.de/downloads/addons/3/ $pdf = new pdf_mc_table(); $pdf->row(array("this\nis test","with multi\ncell")); $pdf->output();

extjs - Move an element to next line using CSS, if it doesn't fit in the available area width -

Image
i have view created using extjs, composed of autocompleting textbox (bound store) , custom templated dataview (again, bound store). , view looks below. here's how works. user searches tag in searchbox, , selects matching tag dropdown. once selected, automatically added dataview right below, appears tag cloud (though not exactly). tag item added dataview custom styled, , has "remove" link next label remove dataview. now, here's problem: the available width of dataview fixed, if tag item text longer, can see gets broken , remaining part of tag appears on next line. what want this: as can see if tag item not small enough fit available area, gets next line, if space available, on same line. any way attain css? or need write js logic this? note css solution, i'm bound support evil ie7/8. yes can similar in css, have sample code can post online somewhere? can give advice on actual code? but achieve this, each input field needs ha...

ios - Preventing iPhone app for inactive state -

i need screen on/off callbacks , voice call callbacks. receiving callbacks when app in foreground. unable delegate callbacks when app in background. how possible block or delegate callbacks while app in background? i read through apple document http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/managingyourapplicationsflow/managingyourapplicationsflow.html and found "backgound execution , multitasking" http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/managingyourapplicationsflow/managingyourapplicationsflow.html#//apple_ref/doc/uid/tp40007072-ch4-sw20 but nothing helps me issue. please help. try use uilocalenotification. can register notification in system, , can implement @ specified time. -(void) viewdidload{ [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(enteredbackground:) name:@"didenterbackground" object:nil]; [[...