Posts

ios - UITEXTFIELD InputView Uipicker not working in swift -

hello trying pop uipickerview view programmatically when user clicks on textfield. have tried doesn't doing anything. isn't working. nothing happening when click textfield class userprofiletableviewcontroller: uitableviewcontroller,uitextfielddelegate,uipickerviewdelegate,uipickerviewdatasource { var itempicker: uipickerview! = uipickerview() @iboutlet weak var gendertxtfield: uitextfield! var gender = ["male","female"] override func viewdidload() { super.viewdidload() gendertxtfield.delegate = self itempicker!.delegate = self itempicker!.datasource = self itempicker!.backgroundcolor = uicolor.blackcolor() self.gendertxtfield.inputview = itempicker } func numberofcomponentsinpickerview(pickerview: uipickerview) -> int{ return 1 } // returns # of rows in each component.. func pickerview(pickerview: uipickerview, numberofrowsincomponent component:...

When the client open the webapp, how to restore his last state with router-ui? -

i use router-ui angular single page i hear $statechangesuccess event store in localstorage current state , params : $scope.$on('$statechangesuccess', function(event, tostate) { localstorage.laststate = tostate.name; localstorage.laststateparams = json.stringify($stateparams); }); my question : when client open webapp, want restore personnal last state can put code ? $state.go(localstorage.laststate, json.parse(localstorage.laststateparams)); // update put code in $statechangesuccess event : $scope.$on('$statechangesuccess', function(event, tostate) { if (tostate.name !== 'welcome') { localstorage.laststate = tostate.name; localstorage.laststateparams = json.stringify($stateparams); } if (tostate.name !== localstorage.laststate) { $state.go(localstorage.laststate, json.parse(localstorage.laststateparams)); } }); the problem solution process @ opening app : localhost (user open app) localhost/...

web services - Can using free version of SOAP-UI we build a framework to maintain testcases -

i looking eclipse plug-in soapui . but, smartbear has stopped supporting plug-in. not able download plug-in in eclipse. source need use old version of eclipse indigo. moreover, datasource not available in soapui free version. is there way create framework in soapui free version using groovy scripts, can maintain test cases if changes in future. we focusing on rest api. i confused. suggestions/tutorials/links/ways highly appreciated.

Is there a way to add Julia, R and python to a single text file like R markdown or a notebook that could be manipulated as a text file? -

stated briefly: have text file can smoothly switch among r, python , julia. of importance, looking way run rather display code i know possible add python (and many other languages) r markdown http://goo.gl/4w8xib , not sure add julia. possible use notebooks beaker http://beakernotebook.com/ 3 languages (and more) , issue notebooks not fast manipulate compared can done text file in editor environment (sublime, emacs, vim, atom ...). know little notebooks, , ones know of represented json files, manipulating json file write report user friendly. i'm missing obvious, other way this? thanks with restructured text, there support including code samples , each code-block directive can include relevant language. .. code-block:: ruby ruby code. markdown also supports mentioning language each code block , e.g.: ```javascript var s = "javascript syntax highlighting"; alert(s); ``` ```python s = "python syntax highlighting" print s ``` ``` n...

php - Eloquent logic refactor -

today came legacy code. have function generates long runtimes , occurs timeout @ our partner. function checks reserved seats @ theatre instead of data , check empty seats runs query every single seat. (i think) generates huge runtime. here correspondig code: public function printticketchaos(){ $input = input::all(); if( isset($input['date_id']) && !isset($input['reserve_id']) ){ $program_date = \model\programdate::find($input['date_id']); if($input['piece'] > $program_date->available_capacity){ //dd($input['piece'] . ' ??? ' . $program_date->available_capacity); return true; } $reserved_seats = session::get('reserved_seats'); if($reserved_seats != null && count($reserved_seats) > 0){ foreach ($reserved_seats $row => $seats) { foreach ($seats $key ...

swift - A way to inherit from multiple classes -

i have 2 classes want use in new class. first 1 implements swipe delete , second enables long press gesture: class deleteitem: uitableviewcell { } class opendetail: uitableviewcell { } since swift doesn't allow class inherit multiple classes following example won't work: class itemviewcell: deleteitem, opendetail { } so in order create itemviewcell , having both options, i'll have have 1 of classes inherit each other: class deleteitem: uitableviewcell { } class opendetail: deleteitem { } class itemviewcell: opendetail { } the problem is, if want long press gesture i'll have create new class without inheriting deleteitem . there better way of doing this? this perfect case using protocols , protocol extension. swift protocol interface in java example. protocol can define set of functions has implemented entities want conform protocol, protocol can define properties has present in these entities too. example: protocol itemdeleter { var del...

xaml - How to detect hitting the bottom of a grid within a scrollview in Xamarin Forms -

i using xamarin.forms display items websource in grid (within scrollview). when user hits bottom of grid, want load more items , add them grid. know listview preferred displaying data in fashion (and listview has itemappearing event) sadly have use grid. if helps, post code, im not sure if necessary here. thanks in advance edit: here boring layout file: <?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:class="myproject.mynamespace.layoutname" sizechanged="onpagesizechanged"> <scrollview > <absolutelayout x:name="mylayout"> <grid x:name="gridforitems" rowspacing="6" columnspacing="6"> </grid> </absolutelayout> </scrollview> </contentpage> i add rows, colum...