Posts

Showing posts from August, 2015

java - Android AndEngine GameNot Running -

Image
i new in android gaming , using andengine making android games have made sample using andengine problem when run application on emulator application not run dont know why have enabled gpu emulation on emulator aplpication not working. i have made .apk file install game in real device still same problem application not run gives error. me solve issue my code , using android api 2.3.3 package com.game.practice; import org.andengine.engine.camera.camera; import org.andengine.engine.options.engineoptions; import org.andengine.engine.options.screenorientation; import org.andengine.engine.options.resolutionpolicy.ratioresolutionpolicy; import org.andengine.entity.scene.scene; import org.andengine.entity.scene.background.background; import org.andengine.entity.util.fpslogger; import org.andengine.ui.activity.simplebasegameactivity; public class gamepracticeactivity extends simplebasegameactivity { // =========================================================== // constants // =============...

css - why does this background image work in Chrome and FF but not IE 8? -

css .arrow { background:url(images/arrow.png) center left no-repeat; padding-left:23px; padding-right:10px; border-right:0px solid #e6e6e6; margin-right:10px; } html <div class="arrow"><h3>technical documentation</h3></div> it works fine in ff , chrome. style being applied in ie, know because see padding, however, image not appear. this incorrect syntax, please try: background: #000 url(images/arrow.png) center left no-repeat;

jquery Carousel with 2 rows of same images -

i have question..anyone knows jquery carousel plugin this: http://agencia.canalrp.com/savanahome/images/dummygaleria.jpg the idea 2 lines of same images.. when click on small thumbs, "slider" on top center selected thumb.. thanks in advance! refer bx slider plugin can kind of functionality

cakephp - Login takes away the slug from my URL -

i'm working cake 2.1.3, , routes.php file, worked fine except login management, example want url follows: http://mysite.com/companyx/users/login where companyx slug, when run url in browser follows: http://mysite.com/users/login in file routes.php have defined follows: router::connect( '/:slug/users/login', // e.g. /companyx/users/login array('controller' => 'users', 'action' => 'login'), array( // order matters 'pass' => array('slug') ) ); with other controllers have no problems such as: router::connect( '/:slug/users', // e.g. /companyx/users array('controller' => 'users', 'action' => 'index'), array( // order matters 'pass' => array('slug') ) ); best regards ;) cakephp has default login action defined in authcomponent. (line 171) /** * url (defined string or array) controller action handles * logins. defaults `/users/login` * * @var mi...

asp.net - ASP GridView change through pagination -

this scenario. i have result set in asp gridview presented on webpage. gridview displayed on screen viewing team needs see information. however, there lot of rows display, have enabled auto paging keep results on each page...is there way automatically change through pagination? thanks code: partial class _default inherits system.web.ui.page protected sub gridview2_selectedindexchanged(byval sender object, byval e system.eventargs) handles gridview2.selectedindexchanged end sub protected void gridview1_pageindexchanging(object sender, gridviewpageeventargs e) { gridview1.pageindex = e.newpageindex;/* y gridview1.datasource = sqldatasource1 gridview1.databind(); } end class do want update grid data when user changes pages? if so, should work: add grid: onpageindexchanged="gridview1_pageindexchanged" and code behind: protected void gridview1_pageindexchanging(object sender, gridviewpageeventargs e) { gridview1.pageindex = e.newpageindex; gridview1.datasource = /* ...

mysql - The Nested Set Model Unlimited depth? -

Image
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ in article above wash shown table: 1 ( electronics 2( parent 3(some item )5 ) 10 15( parent 16( item)17 )18 ) 20 i don't understand how can unlimited depth if limits set 1 20 parent , depth betwen numbers limited can see, when create table , insert many records, , don't know depth be, need set left 1, , right 1,000,000 ??? have conditionally unlimited depth? o_o mysql - nested set model unlimited depth? - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack exchange communities company blog tour start here quick overview of site center detailed answers questions might have meta discuss workings , policies of site learn more stack overflow company bus...

gwt - bugs about using DataGrid wrapped by StackLayoutPanel -

i tried use datagrid , put in stacklayoutpanel.at time when provide data listdataprovider, celltable not visible in browser because it's on non active tab (although it's visible in dom tree). after switching tab containing celltable there no data in it. if tab active @ time of data provisioning table filled correctly. since have made column sortable, if clicked sorting, data displayed correctly. want data displayed automatically when click other inative tab. not problem if switch use celltable. i knew bug in gwt , fixed in gwt 2.5 rc. boss not want me use gwt2.5rc yet. have workaround fix this. knew said datagrid.redraw() sort of fix it. tired it, display weird. example, have 10 rows in datagrid, after selecting 2nd tab, redraw() called, data automatically displayed, there 10px of block displaying data , scroll bar. have scroll down see other rows. there lots of space in bottom of tab not being used. tell me how fix this? did use wrong way fix it? there else can fix problem. ...

c# - Linq XML descendants being lost on enumeration -

i have xml document this <root> <item id="1" creator="me"> <childa>1</childa> <childb>2</childb> </item> <item id="2" creator="me"> <childa>1</childa> <childb>3</childb> <childb>4</childb> </item> </root> i'm trying find duplicate items, again duplicate child items duplicate items logic this xdocument xmlroot //whatever...you point // item nodes var items = xmlroot.descendants("item"); // find duplicate items keys using creator attribute var duplicateitemkeys = items.groupby(x => x.attribute("creator").value) .where(g => g.count() > 1) .select(g => g.key); foreach(var duplicateitemkey in duplicateitemkeys) { // duplicate item xml elements using duplicate keys var duplicateitems = items.where(x => x.attribute("creator").value == duplicatetouchekey) .orderby(xelement => xelement.attribute("crea...

Node.js Saving a GET request's HTML response -

i'm apparently little newer javascript i'd care admit. i'm trying pull webpage using node.js , save contents variable, can parse feel like. in python, this: from bs4 import beautifulsoup # parsing import urllib text = urllib.urlopen("http://www.myawesomepage.com/").read() parse_my_awesome_html(text) how in node? i've gotten far as: var request = require("request"); request("http://www.myawesomepage.com/", function (error, response, body) { /* here lets me access text outside of closure doesn't work: this.text = body; */ }) var request = require("request"); var parsemyawesomehtml = function(html) { //have @ }; request("http://www.myawesomepage.com/", function (error, response, body) { if (!error) { parsemyawesomehtml(body); } else { console.log(error); } }); edit: kishore noted, there nice options parsing available. see cheerio if have python/gyp issues jsdom on windows. cheerio on github

Android .apk loading in the memory -

i need know, when click on application in android, how loaded in memory, , how process created application, , can see code flow in android source(dialer application). in contrast traditional execution pre-running process called zygote containing dalvik vm , many other system libraries told fork child becomes application process loads dex classes out of apk. zygote , dalvik aosp sources may of interest. note launch may not mean new process may possible launch activity in existing process belonging application userid. conversely, seems user de-minimizing backgrounded activity can involve creation of new process pick disposed predecessor paused.

delphi - is there a way to find who fired OnExecuteComplete event of TADOConnection? -

i trying write ado database profiler in delphi 7. part of delphi project. i using onexecutecomplete event, on pcs "msado15.dll" access violation error. i have researched , underestand win version incompatible or damaged or has different version.. that av error happened when use parameters[i].value property of "command".. decide write different type, need refference object called onexecutecomplete event in adoconnection. if can reach it, problem solved. i use "command" , "recordset" refferences compare of ado object linked adoconnection, ado objects has no recordset.. there way find fire event? sender? i not make out if in .net or not, in .net it's easy. use system.diagnostics.stacktrace see whole stack of calls lead event. for native code there way stacktrace if compile in debug mode. it's quite time since i've written delphi (or pascal) code. try profiling free aqtime standard works delphi (both native .net) has call-g...

ios - Get the last added key-value pair from an NSMutable Dictionary -

i have nsmutabledictionary stores collection of user profiles, how go getting last added profile? nsdictionary provides no such service out of box. feel free derive class it, , store key of last added object in ivar.

python - find virtualenv current package directory for vim -

i want able reach source code virtualenv library via ctags able need know virtualenv active, example, have code in .vimrc appends django ctags index: nnoremap <f7> :!ctags -r --python-kinds=-i -a ~/.virtualenvs/myproject/lib/python2.7/site-packages/django/*<cr> instead of hardcoding path want like: nnoremap <f7> :!ctags -r --python-kinds=-i -a current_project_packages_path/django/* so can index packages current project working on. you use $virtual_env library, it'd this nnoremap <f7> :!ctags -r --python-kinds=-i -a $virtual_env/lib/python2.7/site-packages/django/*

How to control an LED using C# over the USB -

i control led strip through usb port. have schematics using pic microcontroller(18f series) , interfacing usb port. understand microchip libraries make easier me this. problem can't find them. functions performed interface .. the led glows when click button on screen. led stops glowing when click button. here , i'm planning replace 1 led led strip. there libraries programming android need link libraries provide me methods can send data on usb port . https://www.youtube.com/watch?v=6l9soe4yn6q or http://blog.pedroliska.com/2011/11/15/c-controlled-lights-via-usb-port/ check out. way, try google search,it returns plenty of results.

How to draw a path or line between three coordinates in android google map view? -

how can draw line between 3 geo points (coordinates) in android google map view? of examples show between 2 geo points. i think can override overlay define customized draw points (whether have 2 or 3 points, can control draw logic yourself)

PHP: session expiring automatically on some servers -

i have website built using php. website consists of education material/documents users can when pay through clickbank. on backend, payment status change "unpaid" "paid". but when test paying on clickbank website , redirecting website, session automatically expiring. working fine on system not on client's system. please tell me kind of issue this? explain more if there further query. you should investigate using clickbank api processing, keeps user on site instead of redirecting them clickbank api , destroying session. https://sandbox.clickbank.com/api_12_examples/api_example.php this return success/fail code use in decision mark order paid or unpaid.

c++ - Signature of a function -

i beginner level programmer , have started learning programming in c++, i had @ feature called "function overloading" , while have understood purpose , implementation @ code level, haven't understood how implemented @ compiler level how compiler differentiates between signature of different functions same name , would return-type func-name (data-type 1 , data-type-2); would have same signature as return-type func-name (data-type 2 , data-type-1); and same thing applies overloaded constructors ? the compiler uses technique known name mangling . briefly, compiler encodes number , type of arguments actual name written object file. there few examples in wikipedia article on subject, including examples c++. as specific example, i've used g++ on mac compile following c++ file: test.cpp int f(int x) {} int f(double x, char y) {} with g++ -s test.cpp this results in assembly language file (elided somewhat): test.s .globl __z1fi __z1fi: pushq %rbp movq %rsp,...