Posts

ios - how to pass the pointer in objective c? -

i'm developing mini quiz game. in opening xib, preferred username using methods below , pass model(modelunit): //intro.h @interface introviewcontroller : uiviewcontroller{ modelunit * modl; } //intro.m -(modelunit *) modl{ if(!modl){ modl = [[modelunit alloc] init]; } return modl; } - (ibaction)nickentered:(uitextfield *)sender{ [[self modl] setname:[sender text]]; ..... } however, when try create pointer points modelunit in sequentially last xib, returns username null. assume has same pointer reach same location. how can go it? help. you not setting right. how refer 'modl' in 2 different ways in intro.m file [self modl] refers property called 'modl' normal use of 'modl' refers variable declared in interface. this suggests not storing username in 'modl' object created. or have 2 'modl' objects. (would have see complete code know sure) to able access 'mo...

python - Sphinx todo box not showing -

in sphinx, can not make todo list show. here have: .. todo:: blah blah blah conf.py extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', ] i tried sphinx.ext.todo=true in conf.py, syntax errors when make html . based on documentation have set todo_include_todos in configuration. http://sphinx-doc.org/ext/todo.html#confval-todo_include_todos if syntax errors maybe try (as in note example linked docs above): .. todo:: blah blah edit: it doesn't same in site because site has applied customed css that. looked @ sphinx source code , "pyramid" theme theme mentions todo styles, can see site mentioned uses default theme. site has it's own css file . should able add own css file "doc/source/_static" directory , add conf.py include it: def setup(app): app.add_stylesheet('my_styles.css') specifically notice section of css file div.admonition-todo : div.admonition-todo { border-top: 2...

javascript - Angular ui-router scroll to top, not to ui-view -

i've upgraded ui-router 0.2.8 0.2.0 , i've noticed when state changes, scroll position jumps top of te child ui-view subject of new state. this fine have 2 problems it: 1) have 30px padding between top of page , ui-view , scroll top of page, leaving gap. @ moment goes top of ui-view looks ugly. achieve guess either need know how scroll top of div ui-view in (not browser viewport ), or need find out how override $uiviewscroll scroll ui-view minus 30px. i have tried $uiviewscrollprovider.useanchorscroll(); if doesn't scroll @ all. have tried <ui-view autoscroll="false">; , stops scrolling completely. 2) doesn't scroll @ moment, jumps. suppose scroll or developer css transitions? any appreciated :) another approach decorate default $uiviewscroll service, overriding default behaviour. app.config(function ($provide) { $provide.decorator('$uiviewscroll', function ($delegate) { return function (uiviewelement) { ...

javascript - white space appear after call phonegap camera function -

Image
in app, everytime when call camera ( either take picture or scan barcode), there white space added bottom(tested on ios 7). can grow how many times used camera. looks same height of status bar. the camera using native sdk, nothing else in code. camerahelper.prototype.takecameraimage = function(callback){ console.log("takecameraimage"); navigator.camera.getpicture(onsuccess, onfail, { quality: 49, destinationtype: camera.destinationtype.file_uri, sourcetype: navigator.camera.picturesourcetype.camera, correctorientation: true, targetwidth: 266, targetheight: 266 }); function onsuccess(imageuri) { callback({imageuri: imageuri}); } function onfail(message) { ...

eclipse - Java Applet, repaint 60times/sec method and polygons -

i have run method repaints 60times/sec , have paint method 4polygons in it. 4 buttons. when press 1st, poligons range in order red 1 on top, when press 2nd button polygons swop , green on top , others behind it. on eclipse , working, when run in terminal applet viewer, polygons not stoping , refreshing constantly. how make statement repaint 60time/sec polygon once when clicked on button. public void run() { long lasttime = system.nanotime(); double ns = 1000000000.0 / 1.0; double delta = 0; requestfocus(); while (running) { long = system.nanotime(); delta += (now - lasttime) / ns; lasttime = now; while (delta >= 1) { delta--; update(); repaint(); validate(); } } } and paint method public void paint(graphics g) { // gives sharper graphics g2 = (graphics2d) g; g2.setrenderinghint(renderinghints.key_antialiasing, ...

How to sell digital goods in a PhoneGap/Cordova application on Android? -

i porting (cordova) app blackberry10 android , have not been able find equivalent of following plugins: blackberry.payment.getprice(options); blackberry.payment.getexistingpurchases(); blackberry.payment.purchase({ digitalgoodsku: '12345' }); has written plugin can used enable in-app payments within phonegap/cordova application, integrates android marketplace? hoping provides great user experience. in advance. a developer has created cordova plugin in-app billing on android: https://github.com/poiuytrez/androidinappbilling/blob/master/v3/readme.md

javascript - Getting Pre-Populated Tags Via JQuery/AJAX -

i'm using "bootstrap-tags" jquery plugin ( https://github.com/maxwells/bootstrap-tags ) add simple tagging interface web app i'm working on. in happy path, can plugin work fine, need pull tags shown on page load mysql db. code have is: $.get("getcurrenttags.php", {"id": id] }, function(data) { $('#my-tag-list').tags({ tagdata: data, bootstrapversion: "2" }); } ); doing gives me following error in chrome console: uncaught typeerror: cannot use 'in' operator search '12' in ["civil war"] i think more of general problem , has how 'data' formatted going callback function, especially since works if manually type like tagdata: ["civil war"] but can't figure out exactly. for thoroughness, 'getcurrenttags.php' looks this: include('db.php'); $oid = $_get['id']; $currenttags = array(); $...