Posts

how to get rid of "unkown scope" pull-down lists in 2010 Visual Studio/C++? -

i installed ms visual studio 2010, incl visual c++, , default @ top of each file editor window, 2 pull-down lists, 1 single item: "(unknown scope)" , , 1 empty. how rid of these lists altogether? it may "intellisense" - but, disabled intellisense, , lists still there... i went through options, nothing else seems help. well, restarted visual studio , gone. not sure why.

visual studio 2010 - Get data from Outlook to Database -

my project send fields before visual studio outlook body in fields entered in body after reception of messages user can modify data sent in text fields on outlook , sends update data saved in database that's possible update data outlook database ? i have build solution that, use daily read , file mail part of daily workflow. others have hinted need specific need with. if (typeof olitem outlook.mailitem) dim olmailitem outlook.mailitem = trycast(olitem, outlook.mailitem) if olmailitem.permission = outlook.olpermission.olunrestricted strbody = olmailitem.htmlbody 'file:///c:/attsave/header.png else strbody = "rights protected fix if i'm not in debugger" end if each olattach in olmailitem.attachments if olattach.type <> outlook.olattachmenttype.olole olattach.saveasfile("c:\attsave\...

effects - Lighting Up A Room Cocos2d -

is possible simulate candle instance in cocos2d. scene black , when candle appears lighten room in realistic way. if possible, how achieve effect? redirections, guidance welcome. thanks. please note, don't want light reflection algorithms, simple use. need game players life abillity see room. you should check out raycasting. if set cocos2d use box2d, can use box2d's raycasting method achieve effect. can make walls in room box2d rigid-bodies, , raycast candle origin number of points on circle around it. if raycast intersects wall, mark location of intersection. @ end can fill in area light inside polygon created of raycast intersection points.

PHP SimpleXML to JSON Encode single element array -

i trying parse xml php single element json array. this have: $t = array(); $a=array("url"=>$test->channel->item->link); array_push($t,$a); echo json_encode($t);; which gives me this: [{"url":{"0":"http:www.example.com"}}] but i looking this: [{"url":"http:www.example.com"}] it seems $test->channel->item->link parses curly brackets {url} but if echo $test->channel->item->link , get: www.example.com without curly brackets. not sure if you're looking for, works :) $xmlstr = '<?xml version=\'1.0\' standalone=\'yes\'?> <container> <channel> <item> <link>www.example.com</link> </item> </channel> </container>'; $test = new simplexmlelement($xmlstr); $t = array(); $a = array("url"=>$test->channel->item->link...

initialization - Passing a pointer to a pointer vs passing a pointer for initialisation in C -

i have data structure, linked list, looks like struct listitem { void* data; struct listitem* next; }; typedef struct listitem listitem; typedef struct { listitem* head; pthread_rwlock_t lock; } linkedlist; i using pointer void* data because want make data structure polymorphic can use few different applications. to initialise list (allocate memory , initialise rw lock), pass function init_list(..). when pass pointer list follows, program hangs whenever try , perform further operations on list (e.g. push item it): int init_list(linkedlist* list /* borrowed - list initialise (probably unallocated) */) { list = (linkedlist*)calloc(1, sizeof(linkedlist)); // clear memory, head null pointer printf("allocated memory\n"); if (list == 0) { perror("calloc failed on allocating memory list"); return 1; } printf("initialising lock\n"); pthread_rwlock_init(&list->lock, null); return 0;...

conditional - Ruby/Shoes cannot get numeric value from selection of list_box -

i'm trying integer conditional statement based on selection on list_box . cannot make work. also, able remove @acuity = para . code based on this: list_box won't use default value on startup - shoes. shoes.app :title=> 'procedural', :width => 300, :height => 200 @list_box = list_box :items => ["1- ad lib", "2- assist of sb", "3- assist of 1", "4- assist of 2"] button 'compute' @acuity.text = @list_box.text if @acuity == "1- ad lib" @mobility = 11 elsif @acuity == "2- assist of sb" @mobility = 22 elsif @acuity == "3- assist of 1" @mobility = 33 elsif @acuity == "4- assist of 2" @mobility = 44 end end @acuity = para end it's not clear goal is. display @mobility somewhere? assigning value @mobility variable nothing. shoes.app @choice_map = { "1- ad lib...

php - Return random result from three SQL tables -

i have sql database 3 tables inside called... fruit name fruit color fruit price i attempting return random result each of these 3 tables give me example.... apple - green - $10 currently doing running following php 3 times (with different table each) $result = mysqli_query($con,"select * fruitname"); while($row = mysqli_fetch_array($result)) { echo $row['fruitname']; } this works fine feeling going wrong way. there way 1 command instead of three? if want random row, can way: select * (select * fruitname order rand() limit 1) fn cross join (select * fruitcolor order rand() limit 1) fc cross join (select * fruitprice order rand() limit 1) fp this returns fields in 1 row. note random row different arbitrary row. random row means each row has equal chance of being selected. arbitrary row indeterminate. first row in select without order by arbitrary, not random.