Posts

c# - Is there a fully managed (.NET) Lua interpreter? -

c# - Is there a fully managed (.NET) Lua interpreter? - does know if there managed (.net) lua interpreter? regular source can compiled managed extensions desktop .net, can't embedded in silverlight application. there project called lua.net check aluminum lua, written in c#. c# silverlight lua aluminumlua

objective c - In iOS Development, using Core Graphics and/or Quartz 2D, how can I draw a circle filled with a gradient in such a manner that it looks like a sphere? -

objective c - In iOS Development, using Core Graphics and/or Quartz 2D, how can I draw a circle filled with a gradient in such a manner that it looks like a sphere? - so far have looked @ using cgcontextdrawlineargradient() , cgcontextdrawradialgradient(), however, former can't figure out how create gradient sphere, , latter, can't figure out how create gradient shape of sphere, because every time try, turns out in shape of total cylinder instead of sphere. the code using current draw 2d circle shown below. utilize gradient or other method possible using core graphics and/or quartz 2d fill circle in manner makes sphere. current code drawing circle: cgcontextref ctx = uigraphicsgetcurrentcontext(); float x = 20.0; float y = 20.0; float radius = 12.5; cgcontextfillellipseinrect(ctx, cgrectmake(x, y, radius, radius); p.s. - above code works supposed to, in case there errors, they're errors while typing question, not while typing code actual file. i be...

asp.net - How to use a radio button to select a list item in MVC3 -

asp.net - How to use a radio button to select a list item in MVC3 - i need nowadays user list of bundle options, select one. don't want utilize radio button list, need complex templating each list item. forgive me, can't seem figure out how link column of radio buttons selection property in view model. my view model has selectedpackageid (int), , list of memberpackagelistitem view models represent individual packages. memberpackagelistitem has packageid (int), need couple packageid of selected item selectedpackageid of root view model. it hard me post code, inheritance etc. obscures much of want see, i'm hoping outline of mutual scenario, , general guidelines on using radio buttons in scenario suffice help me continue. i suggest using htmlhelper render radio button list, follows: [suppressmessage("microsoft.design", "ca1006:donotnestgenerictypesinmembersignatures", justification = "this appropriate nesting of gene...

php - Smarty 3: if, mixed conditions & operators -

php - Smarty 3: if, mixed conditions & operators - well... can tell me why works: {if !$conta|contains:"word1" && ($product->id_category_default < 388 || $product->id_category_default > 475)} and not: {if (!$conta|contains:"word1" || !$conta|contains:"word2") && ($product->id_category_default < 388 || $product->id_category_default > 475)} where syntax error? try instead: {if !($conta|contains:"word1" || $conta|contains:"word2") && ($product->id_category_default < 388 || $product->id_category_default > 475)} php if-statement operators smarty condition

javascript - jQuery: Binding same event to window and another element -

javascript - jQuery: Binding same event to window and another element - how bind same event window , on element @ 1 go. tried this, not work me: $('window, #someid').bind('click', dosomething); $('#someid').add(window).bind('click', dosomething); should it. javascript jquery bind

sql - How to split up a massive data query into multiple queries -

sql - How to split up a massive data query into multiple queries - i have select rows table millions of rows (to preload coherence datagrid.) how split query multiple queries can concurrently executed multiple threads? i first thought of getting count of records , doing: select ... rownum between (packetno * packetsize) , ((packetno + 1) * packetsize) but didn't work. i'm stuck. any help appreciated. if have enterprise edition license, easiest way of achieving objective parallel query. for one-off or advertisement hoc queries utilize parallel hint: select /*+ parallel(your_table, 4) */ * your_table / the number in hint number of slave queries want execute; in case database run 4 threads. if want every query issued on table parallelizable permanently alter table definition: alter table your_table parallel (degree 4) / note database won't utilize parallel query; optimizer decide whether it's appropriate. parallel query wor...

javascript - A function is calling itself, without any recursive calls implemented in it -

javascript - A function is calling itself, without any recursive calls implemented in it - i have function shops mongodb db. exports.find_shops = function(selector, fields, limit, skip, cb){ if(typeof fields == 'function'){ limit = 0 cb = fields fields = {} skip = 0 } if(typeof limit == 'function'){ cb = limit limit = 0 skip = 0 } if(typeof skip == 'function'){ cb = skip skip = 0 } if(typeof selector == 'string'){ limit = 1 selector = {_id: new db.bson_serializer.objectid(selector)} } console.log('a') shop.find(selector, fields).limit(limit).toarray(function(err, shops){ console.log('b') if(err){ throw new error(err) } else { if(limit == 1){ cb(shops[0]) } else { cb(shops) } } }) } the ou...