Posts

MySQL performance issue comparing 2 DateTime fields on the same table -

my feed_listingjob has 2 datetime fields: +------------+-------------+------+-----+---------+----------------+ | field | type | null | key | default | | +------------+-------------+------+-----+---------+----------------+ | id | int(11) | no | pri | null | auto_increment | | data | longtext | no | | null | | | meta_data | longtext | no | | null | | | state | varchar(25) | no | | null | | | error | longtext | no | | null | | | job_id | int(11) | no | mul | null | | | created_at | datetime(6) | no | mul | null | | | updated_at | datetime(6) | no | mul | null | | | es_sync_at | datetime(6) | yes | mul | null | | +------------+-------------+------+-----+---------+----------------+ updated_at , es_sync_at both indexed individually below:...

c++11 - Reading multiple column and put them in vector in c++ -

i have file containing values in 15 columns , 1000+ rows. 45285785.00 45285797.00 45285776.00 45285795.00 45285785.00 45285803.00 45285769.00 45285773.00 45285771.00 45285795.00 45285771.00 45285798.00 45285796.00 45285797.00 45285753.00 35497405.00 35497437.00 35497423.00 35497465.00 35497463.00 35497468.00 35497437.00 35497481.00 35497417.00 35497479.00 35497469.00 35497454.00 35497442.00 35497467.00 35497482.00 46598490.00 46598483.00 46598460.00 46598505.00 46598481.00 46598480.00 46598477.00 46598485.00 46598494.00 46598478.00 46598482.00 46598495.00 46598491.00 46598491.00 46598476.00 i want read file. way i'm doing right taking 15 variables , put them vectors individually. double col1, col2, ... , col15; vector <double> c1, c2, ..., c15; ifstream input('file'); while(input >> col1 >> col2 >> ... >> col15) { c1.push_back(col1); c2.push_back(col2); ... c15.push_back(col15); } is there better way this? mean witho...

ruby on rails - Bizarre Rails4 error when using link_to -

this line of code: <%=link_to('click video.', image_path("create_institution.gif"), :target => "_blank")%> is throwing error: couldn't find image 'id'=create_institution request parameters {"action"=>"show", "controller"=>"images", "id"=>"create_institution", "format"=>"gif"} is problem routes or else? "create_institution.gif" in /assets/images have model "images" have not had problem using images elsewhere. pastebin of my routes.rb in application, have image resource , why image_path resolves images#show from documentation of image_path , if have images application resources method may conflict named routes. alias path_to_image provided avoid that. rails uses alias internally, , plugin authors encouraged so. so, can use path_to_image resolve this. <%=link_to('click video....

ios - CGPathAddArc clockwise and anticlockwise confusion -

Image
below code draws arc m_pi/2 m_pi . cgcontextref contet=uigraphicsgetcurrentcontext(); cgmutablepathref path = cgpathcreatemutable(); cgpathaddarc(path, null, cgrectgetmidx(rect), cgrectgetmidy(rect), cgrectgetmidx(rect), m_pi/2.0,m_pi, yes); cgcontextaddpath(contet, path); cgcontextsetstrokecolorwithcolor(contet, [uicolor redcolor].cgcolor); cgcontextstrokepath(content); below drawing of above code. i expecting draw in empty or missing part , clockwise. referred answer why giving addarcwithcenter startangle of 0 degrees make start @ 90 degrees? but, don't know wrong. you should pay more attention method used. cgpathaddarc(path, null, cgrectgetmidx(rect), cgrectgetmidy(rect), cgrectgetmidx(rect), m_pi/2.0,m_pi, no); just change last parameter no, want, can control drawing direction.

c++ - Boost directory iterator "no such file or directory" -

i using boost::filesystem::directory_iterator iterate on contents of folder(non-recursively) , count how many elements in folder. able iterate on entire folder, when boost::filesystem::directory_iterator advances end iterator error thrown: libc++abi.dylib: terminating uncaught exception of type boost::filesystem::filesystem_error: boost::filesystem::directory_iterator::construct: no such file or directory i not see how using directory iterator incorrectly in code, code throws error: boost::filesystem::path pcdfiledir(getpcdfilepath().string().substr(0, getpcdfilepath().string().find_last_of(boost::filesystem::path::preferred_separator))); std::cout << "pcdfiledirectory: " << pcdfiledir.string() << std::endl; size_t file_count = 0; for(boost::filesystem::directory_iterator itr(pcdfiledir); itr != boost::filesystem::directory_iterator(); ++itr){ std::cout << itr->path() << std::endl; file_count++; ...

spring - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project nextrtc-signaling-serverrror -

i tested nextrtc-signaling-server opensource java. encountered building maven problem. hope solved. my console log. [info] building jar: d:\signallinserver\nextrtc-signaling-server\target\nextrtc-signaling-server-0.0.4-snapshot-javadoc.jar [info] [info] --- exec-maven-plugin:1.5.0:java (default-cli) @ nextrtc-signaling-server --- [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 12.430 s [info] finished at: 2016-08-29t11:12:34+09:00 [info] final memory: 26m/223m [info] ------------------------------------------------------------------------ [error] failed execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project nextrtc-signaling-server: parameters 'mainclass' goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java missing or invalid -> [help 1] [error] [error] see full stack trace ...

osx - Mac OS X - Git repository at user home -

i wanted free disk space on mac, , using omnidisksweeper, found there .git folder in /users/oliverni took 25 gb of space. i wondering why there, used github desktop view repository. turns out, there no history, 77,721 uncommitted changes. thought little useless, , wanted delete it, don't know if it's being used system or not. delete it. os x doesn't ship git installed default rest assured, not system files. in future, please direct these types of questions super user because stack overflow not correct place ask. thanks!