Posts

User running a scheduled job in Rundeck -

is there way force scheduled job runs performed user, instead of user enabled scheduling? thanks edit: sorry, maybe didn't explain myself properly. meant rundeck user, not node user, defined in realm.properties file. let's have 2 users defined: user1 , user2. user1 logs rundeck , starts job. in recent executions list job appear performed "by user1". user1 edits job , enables "schedule run repeatedly" option. when job starts on schedule reported ran "by user1". what need way tell rundeck jobs have "schedule run repeatedly" enabled should run user (such user2) instead of user edited them , enabled scheduling (user1). why want this? 2 reasons: 1. cleanliness: want automated jobs listed ran "rundeck service" user. 2. issues ldap , acls: our rundeck users imported ldap , rundeck acls set ldap groups. when job run on schedule rundeck not call ldap server retrieve group list, user treated having no group , consequen...

php - Foreach overwrites previous records in multidimensional array -

Image
i have multidimensional array, , want show array in tabular form like +------+-----+--------+-------+-------+ | name | red | yellow | green | white | +------+-----+--------+-------+-------+ | abc | 8 | 2 | 4 | 0 | | xyz | 2 | 8 | 0 | 0 | +------+-----+--------+-------+-------+ the following array i've [0] => array( 'label'=> 'red', [value] => array ( [0] => array ( [count] => 47 [firstname] => syst ) [1] => array ( [count] => 2 [firstname] => xyz ) [2] => array ( [count] => 8 [firstname] => abc ) ) [1] => array( 'label'=> 'yellow', [value] =...

sql server - T-SQL concatenate & convert string to date time -

Image
i have table (once again implemented bio-metric software) stores date , time strings in different columns. date column stores date 20160128 january 18 2016 , time column stores time 220747 ( 10:07:47 pm ). how can concatenate both strings , convert valid datetime value? i have referred few of other questions asked here , found many of them refers date part, missing time factor if can manipulate strings format sql server can natively parse, can cast - e.g. yyyymmdd hh:mm:ss format: declare @date char(8) set @date = '20160128' declare @time char(6) set @time = '220747' select cast(@date + ' ' + substring(@time, 1, 2) + ':' + substring(@time, 3, 2) + ':' + substring(@time, 5, 2) datetime)

python - Python3 Gtk3+: How to hide a cell of a row -

i have searched whole internet this, found nothing helpful. beginning think impossible do, must have had requirement of type. my app: i use treestore list parents (folders) , childs (files); minimizing column list, have name, path (hidden column), size (relevant childs - easy masked parent since of type str()), progress bar (i want displayed - showed in treeview childs, not parents). why need functionality: i want application show progress bar each file treestore have defined; being treestore, files have parent (folder); i don't want display progress bar folder, since useless point of view , bad. i have researched options/functions available couldn't find 1 specific cell specific row. the functions have found come close need (but still unusable) are: gtk.cellrenderer.set_visible(cellrendererprogress, false) - makes whole cellrenderer invisible; gtk.treeviewcolumn.set_visible(false) - makes whole column invisible; setting "none" ...

ruby - Correct way to add a comments to existing view rails -

i have rails application wih scaffold displays images via controllers show action. want add comments every picture. right way this? tried making second controller+model+view, rendered comments form partial in images show view , passed image id via parameter. works, don't think how it's supposed done. if know example project implements aomething please send me, couldn't find anything. thank help. this typically handled nested resources : #config/routes.rb resources :images #-> url.com/images/:id resources :comments, only: [:create, :update, :destroy] #-> url.com/images/:image_id/comments end #app/controllers/images_controller.rb class imagescontroller < applicationcontroller def show @image = image.find params[:id] @comment = @image.comments.new end end #app/controllers/comments_controller.rb class commentscontroller < applicationcontroller def create @image = image.find params[:image_id] @comment = @image.com...

javascript - How to call correctly this function in Ajax? -

i have code: function changeeventstatusclass(object){ if ($(object).hasclass("fa-circle")) { $(object).removeclass("fa-circle").addclass("fa-circle-o"); //alert("adevarat"); } else { $(object).removeclass("fa-circle-o").addclass("fa-circle"); } } function changeeventstatus(eventid, status) { console.log(eventid, status); $.ajax({ type:'post', data: { eventid: eventid, status: status, }, url: "<?php echo $this->serverurl().str_replace('public','',$this->basepath()).'/user/ajaxupdateappointmentstatus'; ?>", success: function (result) { if (result.success) { console.log(eventid); changeeventstatusclass(eventid); //here problem } } }); } $(".crad").on('click', function(){ var...

excel - Auto filling formula VBA -

Image
looking vba function i have data on 2 sheets need perform index match on. the data size vary every time compare run. i have coded vba call data , populate both sheets running comparison causing problem. i have created below function, running without error not populating formula in cell starting j2 end of j range. sub formulafill() dim strformulas(1 1) variant thisworkbook.sheets("export worksheet") strformulas(1) = "=index('sheet1'!e:e,match('export worksheet'!a2,'sheet1'!a:a,0))" .range("j:j").filldown end end sub any appreciated. w image after updated code applied you writing formula array variable, not cell, tried fill entire column using j:j . means trying fill entire column contents of cell j1 , top cell, not j2 . here code corrections. sub formulafill() thisworkbook.sheets("export worksheet") .cells(2, 10).formula = "=index('sheet1'!e:e,match(...