Posts

c++ - CAsyncSocket::Create fails in CWinThread::Initinstance but works in Constructor -

i have casynsocket derived class in cwinthread derived class i use new , create create suspended create cwinthread in cwinthread::initintance i try casyncsocket::create program goes "south" code totally leaves initinstance when move code cwinthread constructor works i'm baffeled thanks

sockets - recv() function returns -1 -

this (-1) not on fail return code list. things going on this, on wp8.1 sl project, i'm calling set of socket functions on native dll. wsastartup() succeeed, gethostbyname() succeed, create socket , connect() succeed, send() succeed, but recv() failed, , returns -1 all functions works on emulator, recv() returns -1 on device. did of have idea why? :-p ps: there's no problem when called in lib on wp8.1 wrt. later need use wp8.1 sl, build dll. :-p ok, fixed it. because didn't setup wifi on phone.

java - how to use parameterized junit when input is from several files? -

i used use parameterized junit. i have 2 files long list in each of them. say file_a file_b i loaded 2 big lists memory , compared each line in different test. unfortunately list grew big , had memory problem parse parse json before saving file. that's why split each long list smaller files. say file_a_1 file_a_2 file_a_3 and file_b_1 file_b_2 file_b_3 how can still use parameterized junit infra , syntax compare each corresponding list items, when each list distributed few files? i have tried: @test public void comparenewresponsetobaselinereturnsnolargedifferences() throws ioexception { e2eresultshort baselinelist = routingresponseshortrepository.getbaseline(chunkid); e2eresultshort freshrunlist = routingresponseshortrepository.getlatestresponse(chunkid); ??? how iterate on differet `i` each test ?? list<string> testfailuremessages = alternativeshorttotalchecker.checkallalternativesshort(baseline.get(i), freshrun....

Simple example to post to a Facebook fan page via PHP? -

i've done lot of searching , i've found outdated tutorials don't work... i have site made php , when submit particular form in admin area, want publish facebook "fan page" there no rss available, have example directly post facebook fan page (not user wall) using php sdk? thank you! finally, after lot of tests, worked, without php sdk. step step guide: 1. permissions , page token go https://developers.facebook.com/tools/explorer/ , select app first drop down menu, in left. click on button "get access token", , in "select permissions" window, click in "extended permissions" , check manage_pages , publish_stream, , click in "get access token" blue button. you may asked in step grant permissions app access facebook account, accept. next, click @ end of text field next "get" drop down, , replace numbers for: me/accounts, , click in blue button next text field. you'll tokens pages, in...

php - Need help structuring database for nested navigation -

i want create nested navigation menu/navigation, via database(sqlite), using pdo (in end should work dropdown menu). i've been googling around, , looked @ different posts in here. still don't know how properly. need database structuring advice, , maybe example. know might lot ask, thought i'd try anyway. writing secondary sub-menu nested under first sub-menu within delphi in html easy enough, need pdo methods , functions like: query_select , query_update the basic logic code is: make links , tables place them in unordered list insert "web" a key factor code whether you're designing mobile or desktop? for structuring examples, consider file i/o functions when performing sql query, when import occurs consider loop structure based on db. hth- cd

drupal 7 - Activate view automatically in a page -

i wonder how can create view , activate @ given time automatically see on particular page , option in administrator ativate it. maybe use nodequeue ? thanks i having little trouble understanding mean, let me put in starting points. views ui submodule allows go /admin/structure/views , see list of views, , enable/disable each right there. disabling module on production sites recommended, few developers because annoying have turn on , off when want make little adjustments. as far "at given time automatically see on particular page" sounds want panels, context, , make views panel displays. allow use 1 particular page (the url registered panel) has created views on it, perhaps selections rules change ones visible depending on looking or whatever other trigger want. now details comment: sounds want taxonomy vocab set tag style, user can add terms it. taxonomy has pages each term, lists nodes have term. improve view uses context filter find term , related...

Iterating through two separate panda data frames via for loop in python? -

i have 2 panda data frames: df1 df2 1 5 4 4 3 2 i want create list such data frames concatenated colon: 1:5, 4:4, 3:2 help previous question shows can do: ["{}:{}".format(a, a) in df1] which makes list 1:1, 4:4, 3:3, how do this: ["{}:{}".format(a, b) a, b in df1, df2] to create desired result above? something this? df1 = pd.dataframe({"df1":[1,4,3]}) df2 = pd.dataframe({"df2":[5,4,2]}) ["{}:{}".format(a, b) a, b in zip(df1.df1, df2.df2)] ['1:5', '4:4', '3:2']