Posts

I can't get contentOwnerID on youtube API -

I can't get contentOwnerID on youtube API - i can't contentownerid on youtube api. $contentownerslistresponse = $youtubepartner->contentowners->listcontentowners(array('fetchmine' => true)); $contentownerid = $contentownerslistresponse['items'][0]['id']; this code can't contentownerid. i'm using sample code here [uploading , monetizing video ]1. why can't contentownerid? please help me. youtube-api

meteor - MongoDB replicate / master slave without remove transaction -

meteor - MongoDB replicate / master slave without remove transaction - i have meteor , mongodb project, , consisted mongodb 2 replica set. what want create secondary db backup system. means, want maintain secondary data, if primary db removed user. the secondary replica set's info removed when primary's info removed , couldn't find method prevent this, , think master / slave same replica. is there solution or application this? thanks in advance- misconceptions first of all: master/slave replication considered deprecated , removed in future versions. shouldn't utilize more. has no advantages on running replica set 2 info bearing nodes , arbiter (except fact doesn't need arbiter, inexpensive in memory, disk , cpu usage). second: replication of kind isn't replacement backup, enhances availability of data. more replica set, since failover , tailback automatic. third: prevent databases beingness dropped, might want utilize authent...

ruby on rails - public_activity custom activities -

ruby on rails - public_activity custom activities - i seek store activity using #create_activity public_activity gem: model class grouping < activerecord::base include publicactivity::common end controller def send_invitation @user = user.where(email: params[:user][:email]) @user.create_activity :send_invitation, owner: @group, recipient: @user redirect_to root_path end the error undefined method `create_activity' #user::activerecord_relation:0x007febb0f0a610 use should use @user = user.where(email: params[:user][:email]).first instead. without first, homecoming activerecord relation specified in error ruby-on-rails public-activity

php - serious bug with random numbers -

php - serious bug with random numbers - i create way reproduce bug having. when 2 or more users phone call page @ same sec modsecurity generates same sequence of random numbers (using rand() function php) both users. here demonstration of bug: http://quemfazsite.com.br/em_criacao/modelo9/teste.php opening page, 2 iframes load , each 1 should generating random numbers independetly of each other both frames generating same sequence of random numbers! simple source code can seen below. if dont see same sequence inquire reload page few times till same number sequence. edit: bug happens modsecurity active. if comment "loadmodule" line loads modsecurity bug wont happen! <?php if (isset($_get["test"])) { $output= ""; ($i=0;$i<10;$i++) { $output.= rand(0,99999999) . "<br />"; } echo $output; exit(); } ?> <iframe src="put_the_same_name_of_this_file_h...

Error in google spreadsheet with arrays -

Error in google spreadsheet with arrays - in google spreadsheet receive error , says, "array result not expanded because overwrite info in m261". looked in m261 , blank cell, weird thing if nail delete button on empty cell, error goes away. sadly keeps coming back. there prepare this? here formula: =arrayformula(if(e2:e>0,if(d2:d=0,"need due date",""),"")) i did not see "array result not expanded because overwrite info in m261" @ 1 point did see "...add more rows". one approach should think work restrict output range of formula. illustration if wish apply 100 rows, use: =array_constrain(arrayformula(if(e2:e>0,if(d2:d=0,"need due date",""),"")),100,1) however problem mention , error message saw both because array formula. there seems little need such , like: =if(and(d2=0,e2>0),"need due date",) is much faster, specially big number of ...

r - Combining spatial data -

r - Combining spatial data - i trying combine 2 datasets found here: one world map taken map_data('world') , other lat/lon of black carbon emissions in 1960. merge 2 can summarize emissions based on country. far have been unsuccessful. my impression sp bundle right tool here. specifically, over() function world map beingness spatialpolygonsdataframe , emissions info beingness spatialpointsdataframe can't seem things work. any help much appreciated. happy hear of suggestions solid references on gis , r. edit: ended using data(countriescoarse) rworldmap bundle instead of map_data('world') . had advantage of beingness spatialpolygonsdataframe . over() appears working desired. took downwards broken link data. r gis sp rworldmap

Git history starting from a specific commit up to the last commit -

Git history starting from a specific commit up to the last commit - i know can utilize next command commit history starting specific commit first commit in history (going backwards). git log --pretty=format:"%h - %an, %ar : %s" "de37b49d8f06321275079e6b3a3f00aa22bbff99" however, how reverse display history starting specific commit -including it- lastly commit in history (going upwards)? thanks presuming de37b49 isn't merge commit git log --pretty=format:"%h - %an, %ar : %s" de37b49~1..head which saying "not reachable parent of de37b49" "reachable head" if merge commit, need utilize git log ... ^de37b49^1 ^de37b49^2 head (for many parents has, presuming 2) git