i'm trying set bounds array later printed in console , summed. lower bound ($a) should less 50 , wrote code evaluate that, want re-prompt number if higher number typed. far, google , experimentation have failed me. def num_a print "pick number 1 50: " $a = integer(gets.chomp) until $a < 50 puts "um, try again please." # need here prompt response # until $a less 50 end end you restructure loop prompt , call gets both inside it: def num_a # start number doesn't meet condition = 50 # check if number meets condition yet until < 50 # ask user enter number print "pick number 1 50: " = integer(gets.chomp) # ask try again if number isn't under 50 puts "um, try again please." unless < 50 end # return entered value caller end also, i've shown in example, recommend avoiding use of global variables ( $a in case).
when using devexpress, see error: devexpress.wpf.grid.infinitegridsizeexception unhandled message="by default, infinite grid height not allowed since grid rows rendered , hence grid work slowly. fix issue, should place grid container give finite height grid, or should manually specify grid's height or maxheight. note can avoid exception setting gridcontrol.allowinfinitegridsize static property true, in case grid run slowly." the problem dxgrid has infinite height. to fix, set height non-infinite. snoop absolutely invaluable this: if "height" xaml element infinite (i.e. 0 or nan ), can set using one of following: option 1: height="{binding path=actualheight, relativesource={relativesource mode=findancestor, ancestortype=uielement}}" option 2: verticalalignment="stretch" option 3: height="auto" hint: use verticalalignment="stretch" if child of grid <rowdefinition height=...
so trying have eccomerce site handle both paypal , stripe payments. however, not sure how done. this have. class billingprovider extends serviceprovider { /** * bootstrap application services. * * @return void */ public function boot() { // } /** * register application services. * * @return void */ public function register() { $this->app->bind('app\contracts\billinginterface','app\services\billing\paypalbilling'); } } this works fine if need paypal. however, need both paypal , stripe. any idea how can go implementing this? when typehint can either paypal or stripe. public function stripe(request $request, billinginterface $bill){// handle stripe payment.} public function paypal(request $request, billinginterface $bill){// handle paypal payment.} imho, there many ways it. first of all, take contextual binding of service ...
Comments
Post a Comment