Posts

performance - Meteor - android much slower than website -

hi i'm developing app on meteor has got browser version , mobile versions. in brief, browser version works well, transition between views/routes short, fast. when launch app on android (connected same db) there long breaks between routes. can 1s on few views higher 5 seconds. in database there 3 collections has got ~2k documents. not problem browser version, there problem on android. i tested kadira. can't see going on while routing example there enormous difference in login method. in browser takes maybe 15ms, on android 400ms. and weird (and important): in browser in end there observechanges on user collection. in android there observechanges on every collection , takes lot of time. of course try optimize current algorithm not problem because browser version runs well.

javascript - Optimum Location for Code Schools -

this taken code wars, not looking cheat or anything. have pretty solved problem i'm unsure if method of determining constitutes best location correct. var optimumlocation = function(students, locations){ //your solution var listoflocations = []; (var key in locations) { var obj = locations[key]; var totaldistance = 0; (var = 0; <= students.length-1; i+=1) { console.log(students[i]); var location = calculatedistance(students[i],[obj.x, obj.y]); totaldistance += location; } listoflocations.push({id:parseint(key), dist:totaldistance}); } listoflocations.sort(function(a,b){ return a.dist - b.dist; }); console.log(listoflocations); var id = listoflocations[0].id; return "the best location number " + (id +1) + " coordinates x = " + locations[id].x + " , y = " + locations[id].y; } function calculatedistance (loc1, loc2) { var distx = math.abs(loc1[0] - loc2[0]); var disty = mat...

google maps - Meteor Geocoder on iOS device, only return lat and lng, but not physical address -

i developing ios app using meteor. when applied "browser side api", can physical address on browser perfectly. however, doesn't work on ios simulator or ios devices. so, applied apikey ios application. still doesn't work. please advice. sometimes worked, of time, physical address result didn't come back. //router.js router.route('/',{ path:"/", onbeforeaction: function() { session.set('geolocation',geolocation.latlng()); console.log(geolocation.latlng()); this.next(); } }); //index.html <head> <title>todo list</title> </head> <body> <div class="container"> <header> <h1>todo list</h1> <div class="item"> hi </div> </header> <input class="address" type="search" autocomplete="off" autocorrect="off" autocapitalize="off...

dojo/mobile orientation change on ios don't resize as expected -

i have been experiencing issues on ios version of mobile app, each time rotate device, screen doesn't resize expected, stuck on previous orientation or size. have made research , found bug existed on previous versions of dojo. , exist solutions , patches. using newer version , still happening previous cases. here links of cases: bugs.dojotoolkit.org/ticket/16658 bugs.dojotoolkit.../17539 bugs.dojotoolkit.../16490 i using dojo 1.9.3 , of solutions patched. can me on this, and/or if know if exists way force resize()? thank in advance. we listen , run resize window.addeventlistener("orientationchange", function() { dojox.mobile.resizeall(); }, false);

ios - multiple thread in assembly language -

override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. //*********************************************************************************************************** // requesting access , autherzation , availability let healthstore = hkhealthstore() if hkhealthstore.ishealthdataavailable() { calciumtracker.setprogress(0.1, animated: true) let sharetypes : set = [hksampletype.quantitytypeforidentifier(hkquantitytypeidentifierstepcount)!] let readtypes : set = [hkcharacteristictype.characteristictypeforidentifier(hkcharacteristictypeidentifierbiologicalsex)!] healthstore.requestauthorizationtosharetypes(sharetypes, readtypes: readtypes , completion:{ (success,error) in if !success { if let x = error { print(x.description) } } }) } else { print("health data not ava...

ios - Not able to use UIView in NSObject Xcode -

Image
#import <foundation/foundation.h> typedef enum _nsbubbletype { bubbletypemine = 0, bubbletypesomeoneelse = 1 } nsbubbletype; @interface nsbubbledata : nsobject @property (readonly, nonatomic, strong) nsdate *date; @property (readonly, nonatomic) nsbubbletype type; @property (readonly, nonatomic, strong) uiview *view; @property (readonly, nonatomic) uiedgeinsets insets; @property (nonatomic, strong) uiimage *avatar; - (id)initwithtext:(nsstring *)text date:(nsdate *)date type: (nsbubbletype)type; + (id)datawithtext:(nsstring *)text date:(nsdate *)date type:(nsbubbletype)type; - (id)initwithimage:(uiimage *)image date:(nsdate *)date type:(nsbubbletype)type; + (id)datawithimage:(uiimage *)image date:(nsdate *)date type: (nsbubbletype)type; - (id)initwithview:(uiview *)view date:(nsdate *)date type:(nsbubbletype)type insets:(uiedgeinsets)insets; + (id)datawithview:(uiview *)view date:(nsdate *)date type:(nsbubbletype)type insets:(uiedgeinsets)insets; below object , .m ...

angularjs - Ionic go to new view with same state -

i creating view of files in ionic app. explorer in computer, displays directories , files , can click on directories view other directories , files inside itself. to achieve this, have state 'menu.files' (cause have menu navigation) takes path in parameter. so, part of code: in view: <div ng-repeat="file in files" style="..." ng-click="openpath(file)"> in controller: $scope.openpath = function(path) { console.log(path); $state.transitionto("menu.files", { path: $scope.path + "/" + newpath }); } the problem: the view reloading stays on same view... i mean, in top-left there no back-arrow, previous view 'replaced'. want have same behavior of when make $stage.go() view, stack in navigation , user can go back. thanks in advance !