Posts

C++ Link multiple Classes together. Create an Array of objects to access sequentially -

directly bellow partially completed function should when completed allow me place each of 5 battleships down on board. issue i'm having i want access shipname stored in ship.cpp , want associate shipname player . example can have player1 , player2 each have 5 ships associated them , run placement loop each of them.i believe that's called instantiating object. admit i'll have have read on that! secondly have have sort of array stores each of ships , loops through each time? first pass cruiser, second pass destroyer etc. more string array have pointer reference, player.shipname pointer array or that? i've included game.h, player.h , ships.h @ bottom reference. thanks in advance , help! void game::manualplaceship() { // start loop int currentshipsdeployed = 0; int z = 0; int = 0; while (currentshipsdeployed < 5){ cout << "please enter co-ordinates place your" << /**player.shipname**/ "shipname"<< /**player...

javascript - Different date values -

why happen when convert date json ? var = new date(); // returns wed apr 29 2015 18:15:33 gmt+0100 (gmt daylight time) var nowjson = now.tojson(); // returns "2015-04-29t17:15:33.863z" notice hour of each variable different... when new date() printed console, operating system defines locale , format printing. wed apr 29 2015 18:15:33 gmt+0100 (gmt daylight time) browser has deemed default. when print .tojson , happens: http://es5.github.io/#x15.9.5.44 this function provides string representation of date object use json.stringify (15.12.3). when tojson method called argument key, following steps taken: let o result of calling toobject, giving value argument. let tv toprimitive(o, hint number). if tv number , not finite, return null. let toiso result of calling [[get]] internal method of o argument "toisostring". 5.if iscallable(toiso) false, throw typeerror exception. return result of calling [[call]] internal...

windows server 2012 r2 - Error Installing ADFS 3.0 -

i'm trying install adfs on new installation of win server 2012r2 , error in post-deployment configuration. domain controller win server 2008r2. please me, i've been trying solve 3 days. the error says: schema verification failed database 'adfsconfiguration'. alter database statement failed. failed restart current database. current database switched master. this error log after installation: 2015-04-29 12:46:55.93 server microsoft sql server 2012 - 11.0.2100.60 (x64) feb 10 2012 19:39:15 copyright (c) microsoft corporation windows internal database (64-bit) on windows nt 6.2 (build 9200: ) (hypervisor) 2015-04-29 12:46:55.97 server (c) microsoft corporation. 2015-04-29 12:46:55.97 server rights reserved. 2015-04-29 12:46:55.97 server server process id 1532. 2015-04-29 12:46:55.97 server system manufacturer: 'vmware, inc.', system model: 'vmware virtual platform'. 2015-04-29 12:46:55.98 ...

How to reduce a Mobilefirst apk size -

im working in mobilefirst hybrid app , our apk has 13mb file size, there , our common folder has 2mb (with jquery mobile not minimize). im seeing lot of .so in our apk aprox. 1mb: assets/icudt46l.zip assets/featurelibs/armeabi/libcrypto.so.1.0.0.so assets/featurelibs/armeabi-v7a/libcrypto.so.1.0.0.so assets/featurelibs/x86/libcrypto.so.1.0.0.so , twenty .so in /lib folder is there way reduce mobilefirst apks size, because our customers working on remote locations , dont have lot of bandwidth. see answer here: lose weight mobilefirst platform exported apps starting mfp 7.0 can minify , concatenate mobile environments. means in addition added security, reducing amount of files , contents of files, can - degree - filesize of application. read more application build settings mfpf 7 supports default many more hardware architectures. support required if intend on using features such jsonstore , others. files adding support located @ your-app\androi...

qtp - vbscript sendkeys works only once after system restart -

i have weird situation here , not able find out reason , fix. i have written script using hp uft 11.52 testing .net web application on ie8 here code: if browser(x).page(x).frame(x).webedit(abc).exist(0) browser(x).page(x).frame(x).webedit(abc).click set objssn=createobject("wscript.shell") objssn.sendkeys" " set objssn=nothing browser(x).page(x).frame(x).webedit(abc).object.focus() browser(x).page(x).frame(x).webedit(abc).set 100-10-1000 end if this code runs fine when run script after starting windows laptop. if run same code second time, code not enter space , not enter ssn. entering space required since clicking webedit result in blank selection, if enter script gives incorrect data. my teammate works on virtual machine running these scripts had no issues running script on machine. suspect there setting either in ie or windows somewhere needs modified. can me identifying issue. to enter ssn in textbox using qtp, h...

ios - Why does this code cause an error? (Use of undeclared ideatifier '_maxConcurrentRequestCount') in Xcode -

why code cause error in xcode? (use of undeclared ideatifier '_maxconcurrentrequestcount') @interface httpkit : nsobject @property (nonatomic) nsinteger maxconcurrentrequestcount; @end @implementation httpkit - (void)setmaxconcurrentrequestcount (nsinteger)maxconcurrentrequestcount { } - (nsinteger)maxconcurrentrequestcount { if (!_maxconcurrentrequestcount) { _maxconcurrentrequestcount = 1; } return _maxconcurrentrequestcount; } @end please me resolve problem. why must use code below fixed it? @synthesize maxconcurrentrequestcount = _maxconcurrentrequestcount; if override default getter , setter of property property won't automatically synthesized , no ivar created property. you can either manually synthesize property said or create own ivar: @interface httpkit : nsobject { nsinteger _maxconcurrentrequestcount; } ... @end

c++ - rendering of fractal flame images -

i stumbled upon iterated system fractals , got interested in how implement code can render these ifs plots. inspiration comes here im not quite sure if right thing, , i'm wondering if might able clarify how 1 should intepret algorithm. what far is: make set f of size n linear transforms in form of constants a_i, b_i, ..., f_i and set v of size k called 'variations' variation takes point , returns point in 2d. then each function in f each gets color associated. then choose random point p , random color c make histogram h 1 bucket per pixel repeat many times: = random int in [0;n-1] p_new = (0, 0) c = (c + colorof i'th function) / 2 v in variations: p_new = p_new + v(a_i * p.x + b_i * p.y + c_i, d_i * p.x + e_i * p.y + f_i) p = p_new histogram @ p gets +1 color @ p = c finally, draw recorded colors i images, yet seem quite dull compared see other being capable of producing. examples of have managed create can seen here . so i...