Posts

jquery - Alternate row colors with exceptions -

jquery - Alternate row colors with exceptions - i have table rows hidden. show them, on demand. user must perform action display rows. each hidden rows has class="hideme" withing tr tag. i add together class alternating rows, alter color, visible. it's simple, i'm not sure how incorporate hidden rows exception. $('.mytable tr:odd:not(hideme)').addclass('altrow'); can done css or need throw in jquery magic? actually, tweaking "a little" code, nice solution: $('.mytable tr:not(.hideme):odd').addclass('altrow'); see working here: http://jsfiddle.net/hyhwj/ another solution : $('.mytable tr:not(.hideme)') .removeclass('altrow') .filter(':odd') .addclass('altrow'); see working here: http://jsfiddle.net/r4n5g/ jquery css

Request specific data in ASP.NET MVC -

Request specific data in ASP.NET MVC - i want show breadcrumbs on asp.net mvc 4 website. generation of breadcrumbs depends upon context, illustration on forumpage determined differently on blogpage. on 1 hand, there should 1 partialview "breadcrumbs", partialview not per se know context. , don't want 'pollute' viewmodels breadcrumb stuff. thought of 2 possible solutions: 1) create viewmodels derive basemodel contains breadcrumbdata , in views partialview "breadcrumbs" can called given viewmodel model. 2) in actions save breadcrumbdata somewhere (in webforms had httpcontext.items example) partialview "breadcrumbs" can read them. but not pleased both of these options. there more elegant ways accomplish this? the partial view breadcrumbs should given context (as model, list of breadcrumbs text , urls). if assume each view knows breadcrumbs, can pass breadcrumb info view partial view: if render breadcrumbs in layout page, v...

sql server 2008 - ms sql grouping results query -

sql server 2008 - ms sql grouping results query - i have transaction table have created records invoices in , out. have flag sales (=1) , purchases (=2). i want simple sql calculates sales , purchases month. problem is, if remove transaction type (mybooks_trans_class_id_fk) grouping doesnt work, if leave in results not want. sql: select datepart(year, mybooks_trans_transaction_datetime) 'sales_year', datepart(month, mybooks_trans_transaction_datetime) 'sales_month', case when cast( mybooks_trans_class_id_fk nvarchar(100))!='1' cast(sum(mybooks_trans_gross_amount) nvarchar(100)) else '0' end total_sales, case when cast( mybooks_trans_class_id_fk nvarchar(100))!='2' cast(sum(mybooks_trans_gross_amount) nvarchar(100)) else '0' end total_purchases view_mybooks_transactions_all_details grouping datepart(year,...

copy command syntax error in Windows XP -

copy command syntax error in Windows XP - basically trying create batch file re-create 1 file 1 location location in windows xp code below failed. may know why? copy c:/directory_a/the_file d:/directory_b when execute batch file see in output: the syntax of command incorrect. try using backslashes copy c:\directory_a\the_file d:\directory_b windows-xp command-prompt

php - Codeigniter update query not working with form -

php - Codeigniter update query not working with form - hey guys i'm having problem running update query through form in codeigniter. there no error returned, query not update in database. should noted there's form on same page running insert query works fine. view: <?php $modify = array( 'id' => 'modify-form', 'class' => '' ); echo form_open('main/modify_idea', $modify); $ta_modify = array( 'id' => $row->id, 'name' => 'ta_modify', 'label' => 'ta_modify', 'placeholder' => $row->idea, 'method' => 'post' ); echo form_textarea($ta_modify); echo form_h...

Android Settings UI -

Android Settings UI - i looking build similar settings ui of scheme android. want few checkboxpreferences, switchpreferences, edittextpreferences on launch of application , when user selects 1 preference open fragment not able figure out. i have referred settings guide insists on using preference header. while displaying headers there unlikely overhead facing of displaying texts in turn load fragments. for example, my preference header : <preference-headers xmlns:android="http://schemas.android.com/apk/res/android" > <!-- these settings headers used on tablets. --> <header android:fragment="${packagename}.${activityclass}$generalpreferencefragment" android:title="@string/pref_header_general" /> <header android:fragment="${packagename}.${activityclass}$notificationpreferencefragment" android:title="@string/pref_header_notifications" /> <header ...

wpf - Prism Delegate command not enabling button -

wpf - Prism Delegate command not enabling button - i trying enable , disable button in wpf (prism) user command based on info entered user. in constructor submitcommand = new delegatecommand<object>(onsubmit, cansubmit); public icommand submitcommand { get; private set; } private void onsubmit(object arg) { _logger.log(arg.tostring()); } private bool cansubmit(object arg) { homecoming title.length > 0; } private string _title=""; public string title { { homecoming _title; } set { if (_title != value) { _title = value; this.raisepropertychanged(); } } } i bound submitcommand in xaml below <button content="submit" width="100" command="{binding path=submitcommand}" commandparameter="{binding elementname=titletext, path=text}" /> the issue when title value changes, button not enabled. may missing something. help! it sounds you're needing raise...