Posts

c# - Units in [Location1].DistanceTo[Location2] -

i have been trying find out unit .distanceto gives me. the articles related far mention geounits, no further explanation using elapsed time, , 2 locations calculating speed device going. i'm not sure how result distance=location1.distanceto(location2); in km, or other metric unit. have use metric app. any solving or guiding me toward solution helpful. according developer documentation method returns distance in metres. returns approximate distance in meters between location , given location. so in kilometres, divide result 1000: float distanceinmetres = location1.distanceto(location2); float distanceinkilometres = distanceinmetres / 1000;

vb.net - How to export/import data from/to datagridview to a Excel file? -

i using microsoft office 2007 , visual studio 2010 . i want save data of datagridview excel file once click button on windows form. also want load data excel file datagridview clicking button. pls help...i new vb unable write code. plsss help.. this rather big question , there's number of solutions. 1) writing excel.. there 3 common ways this, 1) write data out csv format , excel happily read it. 2) use excel interop create workbook , write work sheet it. requires excel installed , 3) use oledb create excel. 2) reading excel... again can use excel interop read excel workbooks , again need excel installed, , can use oledb read excel files. there other ways, these commonly used ones. on balance approach using oledb in first instance , there's lots of examples on stackoverflow on how read , write excel. if need access of excel's formatting or charting facilities need interop. it's relatively easy use , again there's lots of examples of how...

ms access - Exporting Recordset to Spreadsheet -

just getting grips vba (this stuff's new me bear us!) from query contactdetails_surveysoftoutcomes , i'm trying first find list of unique values in deptname field in query, hence rsgroup dim storing grouped query on deptname field. i'm going use grouped list way of cycling through same query again, passing through each unique entry filter on whole recordset , export each filtered recordset own excel spreadsheet... see do while not loop. my code's tripping on docmd.transferspreadsheet ... rsexport part. i'm bit new this, guess dim name rsexport recordset isn't accepted in method..? is there easy fix code i've started or should using different approach achieve this? code : public sub exportsoftoutcomes() dim rsgroup dao.recordset dim dept string dim mypath string mypath = "c:\myfolder\" set rsgroup = currentdb.openrecordset("select contactdetails_surveysoftoutcomes.deptname " _ & "from contactdetails_surve...

php - Propel: Get Raw SQL from Query object? -

how raw sql statement query object in propel? need debugging purposes. for example: have function in $rawsql = new bookquery::create()->filterbyid(25)->getrawsql(); does exist? yes; you're after tostring method criteria parent class: $rawsql = (new bookquery)::create()->filterbyid(25)->tostring(); as @jakerella says, specific values use filtering bound database engine, rather propel, , you'll see structure of query not executed. if want see that, can check database query logs, if they're enabled.

jquery - Add event handler when checkbox becomes disabled -

is there way add event handler (like .on('change' ..) checkbox when becomes disabled? i tried (see jsfiddle ), not fire when disable checkbox: $('#mycb').on('change', function() { console.log('checkbox disabled? ' + $('#mycb').is(':disabled')); }); $('#mycb').prop('disabled', true); // not trigger function above edit: want add logic checkbox because in application don't know when checkbox might become disabled. the simplest way should be: $('#mycb').prop('disabled', true).triggerhandler('change');

animation - Unity - GetCurrentAnimatorStateInfo () returns null after a scene is destroyed then relaoded -

i having issue unity animation controller. controller working when scene first loaded. scene destroyed , when loaded again receive nullreferenceexception at: (wrapper managed-to-native) unityengine.animator:getcurrentanimatorstateinfo (int) the animation controller appears present character controlling in default idle state , moving. has had similar issue?

ios - UICollectionView performance - _updateVisibleCellsNow -

Image
i'm working on custom uicollectionviewlayout displays cells organized day/week/month. it not scrolling smooth, , looks lag caused [uicollectionview _updatevisiblecellsnow] being called on each rendering loop. performance ok < 30 items, @ around 100 or more, terribly slow. limitation of uicollectionview , custom layouts, or not giving view enough information perform correctly? source here: https://github.com/oskarhagberg/calendarcollection layout: https://github.com/oskarhagberg/calendarcollection/blob/master/calendarheatmap/ohcalendarweeklayout.m data source , delegate: https://github.com/oskarhagberg/calendarcollection/blob/master/calendarheatmap/ohcalendarview.m time profile: update maybe futile? testing plain uicollectionviewcontroller uicollectionviewflowlayout given approximately same amount of cells/screen results in similar time profile. i feel should able handle ~100 simple opaque cells @ time without jitter. wrong? also don't f...