Posts

php - Preset currency value on select codeigniter -

i have select box currency 1 , 2, currency 1 euro. want select box preset value 1 euro. i using controller currency information this. $data = array( 'sexlist' => $this->localization->gettextparamvalues(null, 'user', 'sex'), 'countrylist' => $this->localization->getcountrylist(), 'currencylist' => $this->localization->getcurrencylist(), 'languagelist' => $this->localization->getlanguagelist(), 'user' => $userexist, 'userinfo' => $this->user_profile->getuserinfo(), 'currency' => $this->localization->getcompanycurrency() ); $this->load->view('header', $this->history->getpreviouspageinarray()); $this->load->view('borrow_registerpage_view',$data); the currency pushing value 1 data array, in html file doesnt prese...

javascript - HTML and style sheet not linking -

ok no matter style sheet not link html document, both in same directory on computer , no matter do, no style applied <p> tag. have stripped document bare bones , cannot find error is. i'm sure @ point extremely simple , complete idiot missing it. please help. index.html <!doctype html> <html> <link rel=sylesheet type=text/css href=style.css> <head> </head> <body> <p> hello, world! </p> </body> </html> style.css p { color: red; } your format in html not correct. should be: <!doctype html> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> </body> </html> your <link rel="stylesheet" type="text/css" href="style.css"> should inside of <head></head> tag

jquery - SAPUI5 Dropdown box limit -

i trying display 294 records in dropdown box, nothing displays @ all. have set size limit 500 , 300 , still nothing displays. binding, same other dropdown boxes have fewer records display +- 30 records those. has experienced same issue? here code: this.countriesdropdownmodel = sap.ui.getcore().getmodel("countrymodel"); this.countriesdropdownmodel.setsizelimit(300); sap.ui.getcore().getelementbyid("reasoncountryentryid").setmodel(this.countriesdropdownmodel, "countriesdropdownmodel"); and in view form: new sap.ui.layout.form.formelement({ label: new sap.ui.commons.label({text:"country"}), fields: new sap.ui.commons.dropdownbox({id:"reasoncountryentryid",width:"250px"}) }), the data binding: var countrytemplate = new sap.ui.core.listitem({text : "{countriesdropdownmodel>externalname_defaultvalue}"}); sap.ui.getco...

c# - Can I find out the return value before returning while debugging in Visual Studio -

take following function: datatable go() { return sometableadapter.getsomedata(); } when set breakpoint in function, there possibility inspect returned value? go() directly coupled datagrid in .aspx page. the way inspect returned datatable, use temporary variable. however, that's bit inconvenient. isn't there way? not know of. note if do add variable, removed compiler in release builds anyway... update: this functionality has been added vs2013 . can see return values in autos windows or use $returnvalue in watch/immediate window. the value can seen directly after returning function, easiest way access putting breakpoint on function call , step on (f10) call. update vs2015: boo! unfortunately, doesn't appear in vs2015 (devenv v14)

ruby - undefined method `friendships' for #<User::ActiveRecord_Relation:0x007fdd1adb7a00> Rails -

i´m learning rails building app. app working fine until added code users_controller.rb def show @user = user.find(params[:id]) @user = user.order('created_at desc').paginate(page: params[:page], per_page: 30) end def compare if current_user.profile @users = user.find_by(id: params[:to].to_i) if params[:to] @paper_weight_total_user = @users.papers.sum(:paper_weight) else redirect_to user_path end end i added users_controller because current user supposed able compare data friends data if hits "compare data" button(shown below) <h4> <%= current_user.profile.name%> friends</h4> <ul> <% @user.friendships.each |friendship| %> <li> <%= link_to user_profile_path(friendship.friend), :method => :get %> <%= friendship.friend.profile.name %> (<%= link_to "remove", friendship, :method => :delete %>...

java - Retain scroll position in infinite RecycleView inside ScrollView (ANDROID) -

i have recycleview inside scrollview can infinite scroll , load new data paging. there way save scroll position (recycleview , scrollview) when activity onpause(), , restore when onresume(). instagram, facebook, etc. when click detail posting , timeline in same position when left before enter code here . my advice : use recycleview inside recycleview. recycleview can use strategy : 1) save last visible item position 2) manipulations 3) restore position int lastviewedposition = ((linearlayoutmanager)rv.getlayoutmanager()).findlastvisibleitemposition(); //some manipulations rv.getlayoutmanager().scrolltoposition(lastviewedposition + data.size() - 1);

javascript - Using RxJS Observable to change css class on drag events -

hi goal use observable sequence listen dragenter/dragleave events change css classes. ie : var mydraggablelistel = document.queryselector.... var itemdragin$ = rx.observable.fromevent(mydraggablelistel, 'dragenter').map((e)=> e.target); var itemdragout$ = rx.observable.fromevent(mydraggablelistel, 'dragleave').map((e)=> e.target); basically want add 'hover' class on 'dragenter',and remove same class on dragleave. i wondering if there clever way 'merge' these 2 subscription like: .subscribe( (booladd, classname, target ) => { booladd ? target.classlist.add(classname): target.classlist.remove(classname) } maybe im overthinking andi leave 2 observables separate, wondering if had accomplished or if had better way. thanks! you can totally using rx.observable.merge() method. links: merge - general rx merge - rxjs example example (here's fiddle ): rx.observable.merge( rx.observable.fromevent($...