Posts

Grouping the array in php -

sample array values: array ( [0] => '2014-07-04 ' [1] => 246 ) array ( [0] => '2014-07-04' [1] => 213 ) array ( [0] => '2014-07-04 ' [1] => 274 ) array ( [0] => '2014-07-04 ' [1] => 249 ) array ( [0] => '2014-07-04 ' [1] => 253 ) array ( [0] => '2014-07-04 ' [1] => 23 ) array ( [5] => '2014-07-04 ' [6] => 11) array ( [5] => '2014-08-04 ' [6] => 1743 ) array ( [5] => '2014-08-04 ' [6] => 1.31 ) array ( [5] => '2014-08-04' [6] => 172 ) array ( [5] => '2014-08-04 ' [6] => 179 ) array ( [5] => '2014-08-04 ' [6] => 1709 ) array ( [5] => '2014-08-04 ' [6] => 176 ) now want separate array 2 array below: firstarray=>array( array ( [0] => '2014-07-04 ' [1] => 246 ) array ( [0] =...

python - PIP install error with git repository packages -

i have old django project needs deploy now. need install exact versions used in project. in project's requirements.txt there packages git repos. while installing requirements using pip install -r requirements.txt throwing following error. file "/home/nyros/desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/req.py", line 70, in __init__ req = pkg_resources.requirement.parse(req) file "/home/nyros/desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2606, in parse reqs = list(parse_requirements(s)) file "/home/nyros/desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2544, in parse_requirements line, p, specs = scan_list(version,line_end,line,p,(1,2),"version spec") file "/home/nyros/desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2512, in scan_list raise valueerror("expected...

apache - Cloudflare bug random 302 redirections -

i've issue cloudflare, (randomly) have 302 redirections on random non-existing subfolders, give examples : get /en/home > 302 > /en/home/swetz > 302 > /en/home > 302 > /en/home/qutis > 302 > /en/home > 200 /en/home > 302 > /en/home/zaiue > 302 > /en/home/zaiue/widut > 302 > /en/home > 200 when disable cloudflare, seems work , no sign of strange redirections. i've noticed these redirections happen on resources when header "cf-cache-status" set miss. it's annoying because "err_too_many_redirections" happen totally breaks website : javascript, styles , images not loaded... please open support ticket & can take look. wouldn't add redirect unless set pagerule instructing so, sounds may have configured incorrectly. forwarding & cache status different things & shouldn't have play here.

c++ - Comparison of two common comparison algorithms and their Big O help please -

today professor gave 2 take home questions practice upcoming array unit in c , wondering sorting algorithm these 2 problems resemble , big o is. now , not coming here expecting answers , have already solved them, not confident in answers post them udner each question , if wrong, please correct me , explain error in thinking. question 1: if decide go through array's( box ) element( folders ) 1 @ time. starting @ first element , comparing next. if same comparison ends, if both not equal moves on comparing next 2 elements [2] , [3]. process repeated , stop once last 2 elements compared , note array sorted last name , looking same first name! example: [ harper steven, hawking john, ingleton steven] my believed answer: i beleive o(n) because it's going on elements of array comparing array[0] array[1] , array[2] array[3] ect ect. process linear , continues until last 2 compared. not logn because aren't multiplying or diving 2. final question: suppose have box of ...

android - MPAndroidChart - How to change the color of PieChart center Background? -

im trying use mpandroidchart library develop circular chart. pie chart available. tried giving 2 xvalue coordinates, 1 color similar background. got similar circular chart. i'm not able change background color , font color of center text inside pie chart? thanks! there 2 possible solutions: retrieve paint object used chart draw "center-hole" , modify way want paint p1 = mchart.getpaint(chart.paint_hole); p1.setcolor(...); paint p2 = mchart.getpaint(chart.paint_center_text); p2.setcolor(...); or use this, if display 1 value anyway: circledisplay

ios8 - Cordova 3.5.1 with iOS 8 device, remote debugging on Safari 7.1 -

i've exported ad hoc distribution of cordova app testing purpose. after installing ota on ipad ios 8 , connecting mac, it's not possibile use remote debugging of safari, doesn't show app in developer menu. is there solution or alternative safari remote debugging on ios device? edit: updating safari 7.1 broke web inspector on ad hoc distribution on ios 7 devices, before update worked, having same issues? i have checked , safari ios 8 remote debugging works latest nightly build you can grab 1 here http://nightly.webkit.org/ edit looks safari 7.1 came out, according https://discussions.apple.com/thread/6537575 solves inspector issues

r - Plot polygons with different colors and not overwrite the previous polygons if overlapped -

i graphing several n-edge polygons on same plot. let say: 1/ n=3: draw polygon 3 edges, color "pink" 2/ n=6: draw polygon 6 edges, color "grey". @ point, see first polygon in step 1 overlapped one. in case, want keep "pink" color of first polygon , color rest "un-overlapped" area of 2nd polygon "grey" color. i have tried code follow, display "grey" polygon, instead of "pink" , "grey" areas. btw, walked around problem "draw 6-edge polygon (n=6) first, , draw 3-edges polygon (n=3)". changing drawing order biggest polygon smallest one, can keep color of biggest , smallest polygons @ end. however, steps mentioned @ beginning of questions can see plotting areas increasing when n (number of edges) keeps increasing. if have suggestions, please advice me. thank much! cat("\014") rm(list=ls()) ############################# # first polygon #n=3 xx3=c(0,-3,3);xx3 yy3=c(1,1,-2);yy3...