Posts

FPS camera rotating by itself. QT 4.8 + OpenGL + C++ -

i'm trying port height map visualization program written on c++, sfml qt, can shown on widget , controlled gui elements. the problem when start application, camera starts roll around center fast(actually, looks terrain mesh flying around camera, earth around sun :), without actions side(e.g moving mouse, pressing buttons). camera should move forward, back, left, right when press w,a,s,d , around when move mouse(just typical fps camera behavior). i think problem in program's main loop, because it's no standard while(true){ //do something// } approach in qt, , it's little confusing. here's code: oglwidget class ( here i'm drawing stuff. problem somewhere here think) : class oglwidget : public qglwidget { q_object public: oglwidget(qwidget *parent = 0); ~oglwidget(void); public: void paintgl(); void initializegl(); void resizegl(); public: void updatecamera(); public slots: void mainloop(); protected: v...

c++ - Simple .h file troubles -

i have simple simple simple .h file #ifndef _head #define _head void getnextmove(char playersymbol, int &row, int &col); #endif included in .cpp file #include "head.h" is included in .cpp file #include "file.cpp" . keep getting error /tmp/ccfn3b2g.o:proj1aux.cpp:(.text+0x0): multiple definition of `getnextmove(char, int&, int&)' /tmp/ccdzqlii.o:proj1.cpp:(.text+0x0): first defined here collect2: error: ld returned 1 exit status does know cause that? thought putting #infdef... stop repetition. including 1 .cpp file in .cpp file advanced technique that's best avoided until thoroughly understand normal use of #include . include header files now. if errors prototype not seen function declared in file, put in header file that's included both .cpp files.

html - How do I get Header in Php to work correctly? -

i trying fix why header command won't redirect main page. instead stays on php display page. here php side after submit form. php script http://img35.imageshack.us/img35/6602/a9j3.png here page when php put effect. php display http://img40.imageshack.us/img40/6649/1qk3.png here page it's suppose redirect to... html main page http://img801.imageshack.us/img801/8004/tulo.png as can see, have no spacers in header command php. i've looked multiple issues never found works. see line says: echo 'full connection<br/>'; that line ensure no headers able sent after it. can't output anything browser before header call, including whitespace, html or line. i'm surprised aren't getting error when happens, it's because error reporting levels turned down. it's idea have error reporting turned high on local machine when testing you'll see errors , can fix them straight away: error_reporting(e_all);

multithreading - Cross-thread operation not valid. C# -

this question has answer here: cross-thread operation not valid: control accessed thread other thread created on 16 answers i have class file sends integer form2 class function within class uses integer update picturebox1 image-location , form2 size. the integer id of current map in (in irrelevant game). here 2 scenarios play out. 1) now, if form2 opened prior function being executed (due not in-game yet due no id) , function executed (due being in-game) , system.invalidoperationexception @ line 'this.refresh();'. 2) now, if leave form2 unopened, enter game , open form2, picturebox1 image loaded; however, form size not updated. if hide form2 , enter new map (new id), system.invalidoperationexception @ line 'this.size...'. also, if not hide form in aforementioned sentence , enter new map, same error in scenario 1. code the following form2 ...

box2d - Strange screen size on LibGDX DisplayMode -

i facing problems libgdx , box2d because of camera setup. while investigating, found that: gdx.graphics.getwidth() == 320 gdx.graphics.getheight() == 526 even though set stage , orthographiccamera 1080/1920 or 270/480 (i playing values). then followed documentation , looks value has nothing stage neither camera. after that, checked got 1 displaymode available: displaymode[] dms = gdx.graphics.getdisplaymodes(); (int = 0; < dms.length; i++) { log.d("myapp", "dms > " + dms[i].tostring()); } results in: dms > 320x526, bpp: 0, hz: 0 because of that, call setdisplaymode being ignored: gdx.graphics.setdisplaymode(screen_width, screen_height, true); it changes nothing. i suspecting might problem, how can change it? edit: testing in nexus 5. gdx.graphics.getwidth() , gdx.graphics.getheight() return screen dimensions. on desktop size of window (which can resize), on android cannot change them...

owasp - Concept regarding authentication -

i need security validation on program, , 1 of things need answer, related authentication is" verify authentication decisions logged, including linear offs , soft-locks." does knows linear off , soft-locks mean? thank in advance, thais. i doing research on owasp asvs. linear back-of , soft-lock authentication controls used prevent brute force attacks , can against dos. linear back-of can implemented through algorithm blocking user/ip particular time , after every failed login attempt time increase exponentially e.g. first failed login block 5 minute, second failed login block 25 minute 3rd 125 min , on. per understanding have seen in articles , implemented in application oracle weblogic soft lock easier implement, ip address (which think helpful protect against dos , brute force using automated tools) or user name logged in database every failed login attempt , when threshold number of failed login attempts (e.g. 5) block ip address permanently. once accou...

Set-ADObject error in PowerShell -

i created script copy existing user when new 1 starts. i went on leave 2 weeks, come , not working - , no-ones touched script get-aduser -ldapfilter "(userprincipalname=copy_me@test.com)" -properties description, physicaldeliveryofficename, streetaddress, postofficebox, state, st, l, postalcode, co, c, pager, department, company, manager, memberof | foreach-object {set-adobject -identity "cn=new user,ou=our-users,dc=test,dc=com" -replace @{description="$($_.description)";physicaldeliveryofficename="$($_.physicaldeliveryofficename)"; streetaddress="$($_.streetaddress)"; postofficebox="$($_.postofficebox)"; st="$($_.st)"; l="$($_.l)"; postalcode="$($_.postalcode)"; co="$($_.co)"; c="$($_.c)"; pager="$($_.pager)"; department="$($_.department)"; company="$($_.company)"; manager="$($_.manager)"; othertelephone=" 8823"}} th...