Posts

iphone - how to get the nsmutablearray data into float -

iphone - how to get the nsmutablearray data into float - hi getting dataset below webservices *details=[[webservices alloc] init]; [details getmobilenumberdetails:phnotextfield.text]; nslog(@"longitudes arrays %@",details.resultdata); "-91.57696007", "10.343234", "74.982343", "76.464844", "76.464844", but how convert total dataset float help me urgent me in iphone. thanq sir response here if utilize ojectatidex:0 takes first position have store total response single float value without using ojectatidex:0 in iphone. use float x = [[array objectatindex:0] floatvalue]; iphone ios4 nsmutablearray

PHP sessions and security -

PHP sessions and security - i'm trying decide on level of security regards session management on php site. @ top of every page php tag run if (!isset($_session["user"])) {header('location: login.php');} the user session created on login, guys think secure enough? whole site runs in ssl. well, beingness secure has 100's of different topics... in terms of trying achieve, yes think that's fine i add together additional validation checking $_session['user'] definately right user, , seek compare session user's ip address, user agent , other things observe session hi-jacking you should exit; after header("location: x"): header("location: xyz.php"); exit; php

iphone - OpenGL ES 2D - z-ordering, depth buffer vs drawing in order -

iphone - OpenGL ES 2D - z-ordering, depth buffer vs drawing in order - i'm new opengl sorry if it's silly question. no thought if makes difference, in case, i'm using opengl es 1.1. currently i'm drawing sprites in order of texture, i've read it's improve performance (makes sense). i'm wondering whether right approach because need sprites in front end of others regardless of texture. as far i'm aware, options z-ordering either enable depth buffer , utilize that, or switch drawing order sprites drawn in order of z value. i've read depth buffer can performance hit, changing order. should do? the short reply is, sort sprites. it sounds you're creating that's 2d based, , while z-buffer can useful tool, can impressive performance nail if hardware doesn't back upwards it, , if you're not using 3d objects may intersecting 1 another, doesn't create lot of sense me. in addition, if have sprites partially tra...

Using CUDA in Ubuntu 11.10 -

Using CUDA in Ubuntu 11.10 - starting development of cuda-based tools on ubuntu, , tried install/use sdk. however, devicequery gives cuda driver version insufficient cuda runtime version for reference: # nvcc --version nvcc: nvidia (r) cuda compiler driver copyright (c) 2005-2011 nvidia corporation built on tue_oct_18_17:35:10_pdt_2011 cuda compilation tools, release 4.1, v0.2.1221 # cat /proc/driver/nvidia/version nvrm version: nvidia unix x86_64 kernel module 280.13 wed jul 27 16:53:56 pdt 2011 gcc version: gcc version 4.6.1 (ubuntu/linaro 4.6.1-9ubuntu3) i obtain similar errors other tools (namely theano's gpu utilities). the cuda runtime must match driver, i.e kernel module. seem have driver version 280.13 compatible 4.0 runtime. either downgrade runtime or upgrade driver/kernel module: dev driver 4.1 (285.05.32) cuda

javascript - Using jquery in place of watir or selenium for integration tests -

javascript - Using jquery in place of watir or selenium for integration tests - i'm building rails app, , integration tests i'm using cucumber , watir. love cuke, wish had other watir. sure, watir's ok, seems more natural test web page using javascript. love utilize jquery selectors - create sense me. does there exist library supports javascript-based integration tests? maybe node.js? have considered capybara + selenium webdriver? here illustration definition of cucumber step, using capybara , selenium: when /^i take "([^"]*)" scroller bar$/ |arg1| element = page.find(%{div.x-picker-item:contains("#{arg1}")}) element.click step %{i press "done"} end javascript jquery node.js cucumber integration-testing

Sqlite ADO.NET Entity Framework 3.5 ASP.NET MVC Simple Example "Race Condition" -

Sqlite ADO.NET Entity Framework 3.5 ASP.NET MVC Simple Example "Race Condition" - i have simple illustration trying create spike using asp.net mvc 1, sqlite, , ado.net entity framework need portable datastore (db) can run on .net 3.5 i have simple spike working (saving, deleting, modifying records) noticed strange. using extremely simple repository pattern in order manipulate data. if run site shows new record created. noticed if refresh (hold downwards f5 illustration in browser replicate) throw exception below. store update, insert, or delete statement affected unexpected number of rows (0). entities may have been modified or deleted since entities loaded. refresh objectstatemanager entries. i sense concurrency issue way index action saving/deleting records test. how can modify repository can still utilize pattern (which , think clean) yet prevent race condition? went ahead , zipped solution below should work out of box (visual studio 2008) http:/...

sql server - SQL Conditional UPDATE Based on SELECT -

sql server - SQL Conditional UPDATE Based on SELECT - in sql server 2008, have set of info containing costs east , west. i'm adding new field client canada needs 1.5 times east or west cost (which ever greater). i'm trying come sql can execute. i've tried next have not had success: update shippingcost set if eastcost>westcost canada= eastcost*1.8 else canada= westcost*1.8 endif i'm sure there's easy way this? ideas? you need utilize case update shippingcost set canada = case when eastcost>westcost eastcost*1.8 else westcost*1.8 end sql sql-server sql-server-2008 select sql-update