Posts

c# - Handle Odata /entityset/key/navigation -

we have project based on dynamicedmmodelcreation project odatasamples-master odata examples. we have set routing convention handle request specific controller: [httpget] [enablequery] public edmentityobjectcollection get() { ... } [enablequery] public iedmentityobject get(string key) { ... } we try example /odata/hotels -> ok! /odata/hotels(1) -> ok! /odata/hotels(1)/room -> response: no routing convention found select action odata path template '~/entityset/key/navigation'. debuging see route convention handle request , redirect our controller no method executed. routing convention is: public class matchroutingconventionservice : iodataroutingconvention { public string selectaction( odatapath odatapath, httpcontrollercontext controllercontext, ilookup<string, httpactiondescriptor> actionmap) { return null; } public string selectcontroller(odatapath odatapath, httprequestmessage request) ...

mobile - Corona: Error on removing event listeners from runtime during destroy -

i cleaning scene in corona , attempting remove event listeners in destroy event scene. i've added events in show event scene, follows: function scene:show(event) runtime:addeventlistener("enterframe", onframe) runtime:addeventlistener("touch", ontap) runtime:addeventlistener("collision", oncollision) end function scene:destroy(event) runtime.removeeventlistener("enterframe", onframe) runtime.removeeventlistener("touch", ontap) runtime:removeeventlistener("collision", oncollision) end i'm getting null pointer in destroy event: ?:0: attempt index field '_super' (a nil value) stack traceback: ?: in function 'removeeventlistener' what "_super" trying access, , why nil? i've checked , of functions listed above (onframe, ontap, , oncollision) not nil. if has idea what's going on here, please let me know! seems you've mistyped when calling...

c# - Using 32 bit library from 64 bit project - .NET -

our application 64 bit. got adodb provider 3rd party database (nexusdb). it's 32 bit , consists of .net library (which reference fine) , beleive c .dll 32 bit. so, when compile in 32 bit works, in 64 complains can't find c .dll. how can solve issue without compiling our code 32 bit? edit: 3rd party dll's follow: adonet.dll - .net native dll reference , references fine. adonetprovider.dll - non-.net 32 bit dll keep in bin/ folder. i not want compile project x86 because reference many other projects , 64. i want make sure adonet.dll somehow called in "32 bit mode" you have use kind of surrogate process , ipc access 32 bit dll 64bit process. some time ago wrote legacywrapper project hides behind simple api call. may want see corresponding blog post technical details. edit: since version 2.1, legacywrapper supports loading 64bit dlls 32bit process.

mediawiki - get internal links from Introduction in article -

for given article on wikipedia, use mediawiki api extract internal links introduction section of article. eximilar prop=extracts&exintro= setting contents of links. get lead wikitext either extracts or revisions section 0 (the first has sanity checks against long intro / article no section headings @ all, might cut off @ awkward position), pass parse , set prop=links .

c# - multicasting Socket.RecieveFrom: can port be 0 -

good day all while going through msdn multicasting page , in "listener" part, in code, new endpoint create using ipaddress.any, port=0. the ipaddress.any understandable, port 0 confuses me. should not listening on mcastport? ipendpoint groupep = new ipendpoint(mcastaddress, mcastport); endpoint remoteep = (endpoint) new ipendpoint(ipaddress.any,0); <======this line try { while (!done) { console.writeline("waiting multicast packets......."); console.writeline("enter ^c terminate."); mcastsocket.receivefrom(bytes, ref remoteep); console.writeline("received broadcast {0} :\n {1}\n", groupep.tostring(), encoding.ascii.getstring(bytes,0,bytes.length)); } mcastsocket.close(); } read documentation carefully. initial value give in way, allow function call receivefrom grab packets coming in ipv4 remote ip addresses , ports. if specify dedicate ip address or port,...

java - bitmap set pixel/pixels does not work -

textview loadingtext = (textview)findviewbyid(r.id.loadingtext); loadingtext.settextsize(36); loadingtext.settext("morphing..."); bitmap leftbm = ((bitmapdrawable)leftimage.getdrawable()).getbitmap(); bitmap rightbm = ((bitmapdrawable)rightimage.getdrawable()).getbitmap(); bitmap newbm = leftbm.copy(bitmap.config.alpha_8, true); int[] pixels = new int[newbm.getheight() * newbm.getwidth()]; newbm.getpixels(pixels, 0, newbm.getwidth(), 0, 0, newbm.getwidth(), newbm.getheight()); if (!newbm.ismutable()) { log.d("mutable check", "" + newbm.ismutable()); return; } (int = 0; < newbm.getwidth(); i++) { (int j = 0; j < newbm.getheight(); j++) { newbm.sethasalpha(false); newbm.setpixel(i, j, color.rgb(0, 0, 255)); } } loadingtext.clearcomposingtext(); ((imageview)findviewbyid(r.id.morphview)).setimagebitmap(newbm); this code button click ...

javascript - sock.js not allowing POST method for node server -

trying bring node server uses sock.js websocket communication. can bring server fine , have established websocket communication. however, need post instance http can send message through websocket. message dependent on post payload... however, sock.js not seem accepting handler we're creating, , allowing method. causing 405 http code posts done server. please see following code. if remove sock.js implementation, i'm able process , post requests server. var app = require('http'); var sockjs = require('sockjs'); var sk = sockjs.createserver({ sockjs_url: '//cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js' }); sk.on('connection', function (conn) { console.log('connection' + conn); conn.on('close', function () { console.log('close ' + conn); }); conn.on('data', function (message) { console.log('message ' + conn, message); conn.write(message); ...