Posts

ruby on rails - Could not locate Gemfile or .bundle/ directory - Radiant CMS -

i installed radiant cms sugested on page. gem install radiant terminal says successfully installed 1 gem - sems ok. then try create project: radiant --database postgresql socialize seems fine except undefined local variable or method 'vars' #<rails::generator::commands::create:0x00000001ec6ac0> then cd /socialize , tried bundle install , here got could not locate gemfile or .bundle/ directory so seems serious error. i know there few questions bout no associated cms - i've tried comfortable mexican sofa ( worked fine, since has no templates /layouts switched radiant. )

shift/reduce errors BISON -

i 2 shift/reduce errors when trying compile grammar: program : declaration_list ; declaration_list : declaration_list declaration | declaration ; declaration : var_declaration | fun_declaration ; var_declaration: type_specifier var_decl_list ; scoped_var_declaration: scoped_type_specifier var_decl_list; var_decl_list : var_decl_list "," var_decl_initialize | var_decl_initialize ; var_decl_initialize : var_decl_id ; var_decl_id : id | id "[" int_num "]" ; scoped_type_specifier : type_specifier; type_specifier: int | char ; fun_declaration: type_specifier id "(" params ")" statement | id "(" params ")" statement ; params : | param_list ; param_list: param_list ";" param_type_list | param_type_list ; param_type_list : type_specifier param_id_list ; param_id_list : param_id_list "," param_id | param_id ; param_id : id | id "[" "]" ; statement: expression_stmt | compound...

linux - Scheduling a Python program to sleep within a given time period -

while true: = datetime.datetime.now(); if now.hour >= 22 , now.hour < 3: print "sleep" sleep_at = datetime.datetime.combine(datetime.date.today(),datetime.time(3)) sleep_til = (sleep_at - now).seconds print sleep_til time.sleep(sleep_til) print "wake" else: print "break" break this code should make entire program go sleep @ 10 pm , wake @ 3 am. question is.. work? tried running it.. cannot change system/computer time.. cannot check. reason why posting question because coding using datetime.date.tday , datetime.datetime calling current date.. once again.. want program run before 10pm , sleep between 10pm 3am , rerun after 3am.. can check if right way it? consider (extra-verbose clarity): import time, datetime # create time bounds -- program should run between run_lb , run_ub run_lb = datetime.time(hour=22) # 10pm run_ub = datetime.time(...

ubuntu - Deny a user access to a group-owned folder without removing him from group? -

i have group-owned folder in ubuntu. let's name finance. there 3 users in group, fin1, fin2, finx. these users ones have access folder. how can deny finx access folder without removing him group? you create different group, make supplementary group fin1 , fin2 , not finx , , assign group folder in question , contents. or if that's removing finx group main alternatives see acls , selinux. either 1 of these moving onto rather less trodden ground. both rely on directory residing on file system supports extended file attributes, if supports standard file permission bits, imply does. the acl approach might implemented via command similar this: setfacl --recursive -m d:u:finx:0 -m u:finx:0 /path/to/directory i work acls, may bit off. once it's done, though, new files , subdirectories should inherit same restriction, because command sets in both access acl , default acl.

Python calculator does not calculate -

this question has answer here: how can read inputs integers? 14 answers i have simple calculator app here, meant add 2 numbers make number, different. code: num1 = input() num2 = input() answer = num1+num2 print (answer) #does different instead of adding, puts 2 variables together. example, 2+2, 4. when doing in app, shows 22. reason why? , how can fix it? that's because takes string , not integer values. convert them both int , problem solved. num1 = int(input()) and on.

javascript - Passing an _id and a search query in the string -

using meteor test project. can't figure out how pass id , search parameter when playing sample todo app have. for moment, have in iron router: this.route('team', { path: '/team/:_id', onbeforeaction: function() { this.todoshandle = meteor.subscribe('todos', this.params._id); // filter mongodb search text }}); the thing is, want pass optional search parameter search todos . path: '/team/:_id(/search/:search)?' any ideas how this? from explanation, sounds like control documents published client, rather publishing of them , narrowing down result set on client. in case, suggest first defining publication on server so: meteor.publish('todosbyteamidandsearch', function(todoteamid, searchparameter) { var todoscursor = null; // check teamid , searchparameter existence , set // todoscursor accordingly. if neither exist, return empty // cursor, while returning subset of documents ...

Android SDK component failed to install -

while installing android studio sdk in ubuntu 14.04, 64 bit using wizard; encountered error the following sdk components not installed: sys-img-x86-addon-google_apis-google-21 , tools it occurred during "downloading google apis intel x86 atom system image, api 21, revision3" can please me possible error is.