Posts

java - void type not allowed here in servlet -

java - void type not allowed here in servlet - this java class : public string year, title,detail; public league(string year,string title,string detail) { this.year=year; this.title=title; this.detail=detail; } public void gettitle() { system.out.println(""+year+""+title+""+detail+""); } this servlet: protected void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { processrequest(request, response); //creats set of league leaguelist=new linkedlist(); leaguelist.add(new league("2003","spring","soccer league(spring`03)")); leaguelist.add(new league("2003","summer","summer soccer fest")); leaguelist.add(new league("2003","fall","fall soccer league")); leaguelist.add(new league("2004","spring","summer soccer fest...

html5 - Avoid scrolling to off-canvas content -

html5 - Avoid scrolling to off-canvas content - i doing little tutorial on responsive design, have problem. i going classic off-canvas menu swiping in left side, when enable menu can still scroll horizontally see total content, rather using menu-button hide menu. see next pen: http://codepen.io/webconsult/pen/jmcit note codepen hides tag. meta viewport tag using: <meta name="viewport" content="width=device-width, initial-scale=1"> i suspecting should set the viewport tag differently? can play around viewport tag clicking on settings-cog in html frame. add css body { overflow-x:hidden; } you have .site-wrapper { width:100%; } according css on larger screens main content occupies 100% of width. on smaller screens when open off-canvas menu - produces horizontal-scroll because .site-wrapper + off canvas occupy more 100% of width - 100% warrper + 75% aside.navigation . by adding overflow-x:hidden; on body scroll-bar. ...

bolt cms - Is there a "sustainable" way to add something to the dashboard? -

bolt cms - Is there a "sustainable" way to add something to the dashboard? - it looks it's easy add together stuff dashboard.twig, best practice, keeping future bolt updates in mind? 1 line of code referring include? or there improve way? for bolt 1.6, take @ google analytics extension, since adds dashboard widget. with 2.0 way works might change, though. we'll need figure out want extensions able add together widgets page. bolt-cms

cmake - OpenCV 2.4.9 and CUDA 6.5 -

cmake - OpenCV 2.4.9 and CUDA 6.5 - i upgraded cuda 6.5, , recompiled succefully opencv 2.4.9 on ubuntu 14.04. however when recompiled project using opencv , cmake, got next configuration error: -- gcc detected, adding compile flags cmake error @ /usr/share/cmake-2.8/modules/findpackagehandlestandardargs.cmake:108 (message): not find cuda: found unsuitable version "6.5", required exact version "6.0" (found /usr/local/cuda-6.5) phone call stack (most recent phone call first): /usr/share/cmake-2.8/modules/findpackagehandlestandardargs.cmake:313 (_fphsa_failure_message) /usr/share/cmake-2.8/modules/findcuda.cmake:806 (find_package_handle_standard_args) /usr/local/share/opencv/opencvconfig.cmake:215 (find_package) cmakelists.txt:9 (find_package) -- configuring incomplete, errors occurred! see "/home/andrey/data/projects/groups_code/lulu/build-ubuntu/cmakefiles/cmakeoutput.log". how prepare one? need reinstall cmake, or upgrade mo...

android - Image corrupted when sent via bluetooth -

android - Image corrupted when sent via bluetooth - i developing client app in google glass takes image , sends byte array via bluetooth android phone has server app installed in it. after sending info phone, tried create bitmap byte array , display in imageview . exact number of bytes sent received in server. when decode byte array create bitmap, image looks corrupted. overall image looks right there rectangular green/blue/red bars across image. lot, few. sometimes, lower part of image gray. what issue here? or can seek find problem. client code writing outputstream: int buffersize = 512; bytebuffer bb = bytebuffer.allocate(buffersize); bb.aslongbuffer().put(bytes.length); mmoutstream.write(bb.array(), 0, buffersize); //write size of info sent first mmoutstream.write(bytes); //write actual byte info server code reading inputstream (this in infinite while loop): len = mminstream.read(buffer); if (len > 0) { bytebuffer bb = bytebuffer.wrap(buffer); ...

swift - Xcode 6 is showing funny characters -

swift - Xcode 6 is showing funny characters - i having problem xcode 6, starts showing funny , annoying characters seen below. think typed key mistakenly made xcode editor show such annoying stuff. can point me in right direction editor normal state? you've accidentally enabled "show invisibles" option, located in editor menu: simply click alternative (now "hide invisibles") 1 time again hide characters. xcode swift

Rails 4.1 enum query -

Rails 4.1 enum query - i seeing rails generate wrong query value when utilize enum col value in clause, (self added clarity). dominant_product_strategy enum. def some_model_method_on_mymodel mymodel.where(dominant_product_strategy: self.dominant_product_strategy) end this produces right value (again, self added clarity): mymodel.where(dominant_product_strategy: self.attributes["dominant_product_strategy"]) i'm guessing rails sees enum string, , converts integer value of zero. ughhhhh! am missing something? this works: mymodelwhere(dominant_product_strategy: mymodel.dominant_product_strategies[dominant_product_strategy]) it seems have answered question yoursef. enum variables hash: {str1: int1, str2: int2, ...} the value (integer) storing in db, , string representation of int value. when phone call self.dominant_product_strategy , representation (string) of dominant_product_strategy column storing integer in db. i think first...