Posts

arrays - Objective-C: Comparing user input with object's instance variable -

i have been learning objective-c while, , decided try , take on little bigger project without real "guidelines" in learning books have got stuck. what i'm trying helping friend digitalising few documents have, creating searchable commandline-tool these documents. i think have gotten pretty far, have created custom class documents 3 variable; name of author, number of article , path file on computer (which of course change place have documents stored on computer). have created 2 example documents variables filled in. since documents have 2 properties, numbers , name of author, user may search 1 of these properties. therefore separated input of user either string or int (with of stack overflow post: how determine if first character of nsstring letter ) created array 'author'-variable's of different documents. this have hit bump: want run through array of 'author' , if author's name match user have put in, open document @ path given @ '...

linux - Docker fails at first run after install. Error Post http://..... permission denied. Are you trying to connect to a TLS-enabled daemon without TLS? -

i'm following step 1 of this docker tutorial. have installed ubuntu version 14.04 on virtual box vm. intentionally downgraded docker version when type "docker version" client version: 1.5.0. because server intend communicate on 1.5.0. when trying command " docker run hello-world " response: "post http:///var/run/docker.sock/v1.17/containers/create: dial unix /var/run/docker.sock: permission denied. trying connect tls-enabled daemon without tls?" when running " sudo docker run hello-world " response: cannot connect docker daemon. 'docker -d' running on host? can please explain me what's happening , how can fix it? thanks. edit: tried follow solution linux here however, i had tried follow el mesa's instructions in post. however, when got running sudo docker -d got error running devicecreate (createpool) dm_task_run failed. don't think need start since following tutorial , tutorial did docker run hello-wo...

java - What is the effect of storing a larger value in a grayscale png image? -

i trying perform dct on image block size 8x8 in java. after performing dct on first block, first value "372". after performing dct on entire image, wrote values png-grayscale image.values inside image automatically changed. grayscale image not store value greater 255. happen value greater 255 (for eg., 372) ? you can not original image after loss of information need to: perform dct or ever find min,max values whole image change range pixel(x,y)=(255*(pixel(x,y)-min))/(max-min) +/-1 or if clamp right range after lose absolute values relative changes stays there for purposes enough if need restore original image then need encode min,max values png somewhere so add dummy scanline(s) , encode min,max first few pixels ... restoration easy: read png image decode min,max restore original dynamic range pixel(x,y)=min+(((max-min)*pixel(x,y))/255) +/-1 or if clamp right range perform idct or ever

c++ - Is auto as a parameter in a regular function a GCC 4.9 extension? -

gcc 4.9 allows following code, gcc 4.8 , clang 3.5.0 reject it. void foo(auto c) { std::cout << c.c_str(); } i warning: iso c++ forbids use of 'auto' in parameter declaration [-wpedantic] in 4.9 in 4.8 , clang error: parameter declared 'auto' . yes, extension. it's added c++17 part of 'concepts' proposal, believe.

sql - SSRS Percentage display -

i'm not @ skilled when comes sql i'm trying reflect data percentage. example times called on enquiry | contractnumber | enquiry | percentage display 1 101 claim 14.28% 1 101 complaint 85.71% 2 101 complaint 85.71% 3 101 complaint 85.71% 4 101 complaint 85.71% 5 101 complaint 85.71% 6 101 complaint 85.71% so formula work out percentage goes follows [total enquiries contract number / maxrows(contractnumber)] how achieve this? appreciated hmmm. assuming using sql server. and, goal percentage. seem ratio of "enquiry" total "contract number". if so, can use window functions: select e.*, (count(*) on (partition contractnumber, enquiry) * 1.0 / ...

hadoop - Not able to start Hbase shell in standalone mode -

i installed hbase on ubuntu 64-bit system. run hbase start script without issues , below result. hduser@vignesh-ubuntu:/usr/local/hbase$ ./bin/start-hbase.sh starting master, logging /usr/local/hbase/bin/../logs/hbase-hduser-master-vignesh-ubuntu.out java hotspot(tm) 64-bit server vm warning: ignoring option permsize=128m; support removed in 8.0 java hotspot(tm) 64-bit server vm warning: ignoring option maxpermsize=128m; support removed in 8.0 but when start hbase shell throws me below error. hduser@vignesh-ubuntu:/usr/local/hbase$ ./bin/hbase shell nativeexception: java.lang.runtimeexception: java.lang.reflect.invocationtargetexception initialize @ /usr/local/hbase/bin/../lib/ruby/hbase/hbase.rb:42 (root) @ /usr/local/hbase/bin/../bin/hirb.rb:118 the jdk version using 1.8. path: /usr/lib/java/jdk1.8.0_31 i tried googling no luck. 1 me in resolving this. it compile version different runtime java version. you'd best @ hbase java version help . ...

android - How to create vertically nested scrollviews with viewpager content -

Image
this in lot of apps, there header content view pager , pager content. header content can scroll off top pager content docks , continues able scroll. i've tried couple ways of doing this, had success using nestedscrollview, never able fling , few other use cases working right. far can tell apps spin own solution. i'm looking suggestions on how go building type of ui. below google+ uses ui. this not answer (the question quite open-ended) found cheesesquare implementation chris banes (he's android team think) helpful you're asking. https://github.com/chrisbanes/cheesesquare