Posts

ios - Update bottom view of uipagecollectionview's parent page -

i have uiviewcontroller abc, uipageviewcontroller pqr, uiviewcontroller xyz abc has pqr loads xyz, now abc has footer has reflected on click of button in xyz. see screenshot in here here order buttons in xyz, , bottom red color bar in pqr how can reflect values there. i hope clear question, let me know doubts explain again there number of ways can pass information xyz class pqr class. keep reference pqr in xyz, when button pressed can report action pqr. you can make use of various methods of passing information between classes indirectly. take @ answer , other answer on this question examples.

css "Image()" selector is a valid / widely implemented standard? -

i researching company project how repeat in background section of image (a sprite) without repeating image. i found css image() notation in standard . doesn't work on firefox 39 , don't find information of notation on internet. the document found in mdn , deleted in 2014. https://developer.mozilla.org/en-us/docs/web/css/image%28%29 anyone has information of notation? implementors, state of standard, etc. by looks of moved css4, new spec here there open issue on caniuse add image() it's data

java - Which is better: returning a Response object or an Object representing the rest resource? -

in books, rest apis return response object wraps other objects representing payload, status, etc. on other hand many of apis have seen , written return pojo (or call dto) json consumed client. this may opinion based, know better of 2 use on high scalability environment request result in success , others in failure/data not returned. i know if there accepted better practice. me designing apis , put things in perspective before team. ok question being closed if 'better of two' opinion based. thanks. update: 2 rest apis this. avoiding code @path, @get, @pathparam, @produces etc public response mycustomerobject(int id){...} this returns customer object wrapped inside response object. response error well. and approach below return customer entity directly: public customer mycustomerobject(int id){...} i vote api gives response object. allows control response within code , clear going response. , in cases want write response cannot represented pojo no...

php - how to use bindFunc method in redbeanphp? -

i working on project need work spatial object in mysql , choose redbeanphp orm system in project. found redbeanphp terrific , awesome. search in google , found this link bindfunc method can me in working spatial object cannot find example using method. how method work , how can use method? according database part of website linked: as of redbeanphp 4.1 can bind sql function column. useful wrapping values when reading / writing database. instance, use mysql spatial data types need prepare columns this: r::bindfunc( 'read', 'location.point', 'astext' ); r::bindfunc( 'write', 'location.point', 'geomfromtext' ); $location = r::dispense( 'location' ); $location->point = 'point(14 6)'; //inserts using geomfromtext() function r::store( $location ); //to unbind function, pass null: r::bindfunc( 'read', 'location.point', null ); this function added support spatial dataty...

angularjs - Closing a WebSocket properly -

when close websocket(ws.$close()) in angularjs application takes 40 seconds until closes , receive onclose event. using ng-websocket library . simple test code example: angular.module("mainmodule").controller("maincontroller", function ($scope, $http, $websocket, $rootscope) { $scope.dataimage = "#"; $scope.websocket = null; $scope.testwebsocket = function () { $scope.websocket = $websocket.$new({ url: 'ws://someurl', reconnect: true }); $scope.websocket.$on('$message', $scope.imagearrived); } $scope.closewebsocket = function () { $scope.websocket.$un('$message'); $scope.websocket.$close(); $scope.dataimage = "#"; } $scope.imagearrived = function (imagemessage) { console.log("image arrived"); $scope.dataimage = "data:image/gif;base64," + imagemessage.data; $rootscope.$...

What alternatives are there for creating a REST-full web service API based on JSON? -

we're creating web service , we'd 2 things: - json based - rest-full - how so, haven't decided we've implemented custom apis we'd follow standards, since @ point gets little crazy remember rules, exceptions, , undocumented parts creator forgot. are of using standards you've found useful? or @ least, alternatives? so far know of jsonapi , hal. these don't seem enough though, since we'd optimaly able to: + define, expose , update entities , relations between them + define, expose , invoke operations + small numbers of requests preferable, @ least "makes sense" (i'll leave blank check) [edit] apparently, there's odata too: http://www.odata.org/ are of using standards you've found useful? or @ least, alternatives? between own question , comments of big names have been mentioned. add json hyper schema: "json schema json based format defining structure of json data. document specifies hyperlink- , hy...

c# - Efficient IDE tools for F#? -

i initiated first f# project, using visual studio 2012. rather surprised (or, more precisely, disappointed) @ lack of ide support f#. example, classic ctrl-r ctrl-r shortcut refactor rename appears absent. installed f# powertools extension, provide support - apparently supports renaming in f# part of solution, , not e.g. c# parts of solution (the solution contains both f# , c# projects). are there extensions visual studio provides cross-language refactor rename functionality? in general, loose question, kind of ide and/or ide extensions people find efficient f# programming? i'm used efficient vs2012 refactoring support c# can't find absence considerable blow efficient use of f#...