Posts

opengl - Black screen in LWJGL -

i'm porting game of code obfuscated due porting c java. my problem users report black screen , no other problems (sound working fine e.g.), no errors showing problem. on pc runs fine, , makes hell of debugging. i wondering if can post (list of) reason(s) might occurring. i've read somewhere 1 of issues using 32 bits java on 64 bits system. my code below, opensourced at: https://code.google.com/p/jake2t/ private void rendersidebyside() { glbindtexture(gl_texture_2d, 0); glbindframebufferext(gl_framebuffer_ext, sbsfboid); // render side side glpushattrib(gl_all_attrib_bits); glpushmatrix(); glmatrixmode(gl_projection); glloadidentity(); gluortho2d(0, width, 0, height); glmatrixmode (gl_modelview); glloadidentity (); glviewport(0,0,width,height); glclearcolor(0.0f, 0.0f, 1.0f, 0.0f); glclear (gl_color_buffer_bit | gl_depth_buffer_bit); gldisable(gl_...

iphone - Release UIViewController give exception -

i have uiviewcontroller add uiviewcontroler this: reportviewcontroller *reportvc = [[reportviewcontroller alloc]initwithnibname:@"reportviewcontroller" bundle:nil]; [self.view addsubview:reportvc.view]; and try add [reportvc release]; after lines , exepction when try remove reportvc.view [self.view removefromsuperview]; did make error while release this? in code removing "self.view" superview, shouldn't. have remove "reportvc.view" superview. you can write this: [reportvc.view removefromsuperview]; [reportvc release]; reportvc = nil;

iphone - In iOS6, trouble forcing ViewController to certain interfaceOrientation when pushed on stack -

i have following view controller set up: viewcontroller1 able rotate freely orientation except portrait upside down. viewcontroller2 gets pushed on top of viewcontroller1, , i'd same orientation viewcontroller1 , i'd not able rotate. viewcontroller3 gets pushed on top of viewcontroller2. i'd viewcontroller3 in portrait mode. i'm having lot of issues trying accomplish in ios6 (haven't tried yet in ios5). first off, have created own navigation controller , put following in it: - (uiinterfaceorientation)preferredinterfaceorientationforpresentation { return [self.topviewcontroller preferredinterfaceorientationforpresentation]; } - (nsuinteger)supportedinterfaceorientations { return [self.topviewcontroller supportedinterfaceorientations]; } - (bool) shouldautorotate { return [self.topviewcontroller shouldautorotate]; } i've tried lot of different combinations of these things know avail. i'm struggling forcing vc3 presented portrait i...

breeze - Adding a record into an association table using Breezejs -

background info so using breezejs , knockout ef5 , breeze mvc api controller on backend. 1 of tables in data base association table, 3 columns - id , 2 foreign keys(we'll call them fkey1 , fkey2 table1 , table2). in application, need add record association table. breeze knows relationships table has. situation breeze js makes new record me, find out records need associate it. need add in id of table1 entity fkey1 observable , table2 entity id fkey2 observable , add whole entities respective relationship properties , add push new entity object table1 , table2 entities association property? or adding id's new object automatically add objects relationship properties (maybe objects subscribed fkey1 , fkey2 properties? - i'm guessing happens in background of breeze, shot in dark though have no idea). creating new entities breeze super easy , love it, i'm little confused when comes creating new entities have lot of relationships. let me if need better descriptio...

String Range forward and backward lookaround -

i trying write script gets input user , returns input in formatted area. have been using string range function cuts the input @ range give. there way around @ specified range find next space character , cut input @ location? for example, if have input of: lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris my current string range function formats input \r\n such: lorem ipsum dolor sit amet, consectetur dipisicing elit, sed eiusmod tempor in cididunt ut labore et dolore magna aliqua . ut enim ad minim veniam, quis nostrud e xercitation ullamco laboris as can see on line 1 adipisicing line 2 incididunt words have been cut off. looking way closest space location. line 1 have been before a on line 2 have been before i . …in cases may after word. is clear looking for? assistance great! the string range operation pretty st...

java - Increasing the accuracy of proximity alerts in Android -

my application keeps track of user's location, , sets proximity alerts nearby stores returned api automatic-chickin type functionality. i'm hitting head against wall trying figure out how improve accuracy when proximity alert triggered network location. need way confirm user @ location either checking again within few minutes, or confirming current position via gps. part of issue context handling proximity alert intent service, works asynchronously causes issues when alerts fire in rapid succession. there's way (e.g. google+ checkin notifications), i'm @ loss next. my experience network location less accurate gps location, although neither 100% reliable. gps perfect, @ other times it's wrong maybe 50 metres or more. handle this, think best way combine 2 location sources using simple kalman filter, neither network or gps trigger promimity alerts directly, instead it's result of kalman filtering used. see answer smooth gps data full details of k...

Django username already taken error -

i have form allows user create user account.the problem , whenever user submit username been taken through system . form doesn't raise error raise error when field missing. can kindly me def registration(request): form = userregistration() if request.method =='post': form = userregistration(request.post) if form.is_valid(): user = user.objects.create_user( username=form.cleaned_data['username'], email=form.cleaned_data['email'], password=form.cleaned_data['password'] ) user.is_active = true user.save() return render(request,'choose.html',{'form':form}) return render(request, 'register.html', {'form': form},) my forms.py class userregistration(forms.form): username = forms.charfield() email = forms.emailfield(error_messages={'required':'error miss...