Posts

Recommended way to run a Docker Compose stack in production? -

i have couple of compose files (docker-compose.yml) describing simple django application (five containers, 3 images). i want run stack in production - have whole stack begin on boot, , containers restart or recreated if crash. there aren't volumes care , containers won't hold important state , can recycled @ will. i haven't found information on using docker-compose in production in such way. the documentation helpful doesn't mention starting on boot, , using amazon linux don't (currently) have access docker machine. i'm used using supervisord babysit processes , ensure start on boot up, don't think way docker containers, end being supervised docker daemon? as simple start thinking put restart: always on services , make init script docker-compose -d on boot. there recommended way manage docker-compose stack in production in robust way? edit: i'm looking 'simple' way run equivalent of docker-compose up container stack in robust way....

vba - Saving embedded OLE Object (Excel doc) to file in Excel 2010 vs 2013 -

i trying save embedded ole object (excel doc) current/open workbook location on users pc. ole object template/dashboard gets populated during execution of macro. goal of portion of macro first test if file exists on users c drive. if exist, opens file , sets workbook variable newly opened document. far can tell, works flawlessly between both excel 2010 , excel 2013. in case user not have file saved c drive, macro needs open ole object , save drive. once complete, macro points location , opens file. the below code works 100% in excel 2013, in excel 2010, macro crashes excel whenever try save file drive. if run macro in break mode, saving works fine, during run-time in cause crash. there possible use of doevents or application.wait here? i'm bit unfamiliar technicalities of saving documents , computer resources. some things i've noticed: the crash not generate error code. gives "has stopped responding" i've tried multiple versions of .saveas fileformat:=...

hyperlink - Linking article pages on joomla that do not exist as a menu item -

how link article page on joomla without being published menu item? have tried using id number, not work. for example, within 1 of our published pages want link article page page not exist menu item- there not url use. please provide step-by-step instructions. if prefer not have create urls manually can try switching editor joomla uses default (tinymce). find jce editor more useful. can generate links menu items, content or contacts 'insert/edit link' modal popup. has more robust image manager. jce editor can installed 'install web' tab of extension manager install page.

how to add sum of values in datagrid with grouping WPF c# -

hello i'm weary beginning in coding , first serious application. have data grid grouping , want add in each group sum of values column make https://leeontech.files.wordpress.com/2010/02/final.png i have try use many solutions internet nothing work me: my xml <datagrid x:name="gridraport" canuseraddrows="false" verticalalignment="stretch" minwidth="500" alternatingrowbackground="lightblue" alternationcount="2" margin="20,20,20,20"> <datagrid.groupstyle> <groupstyle> <groupstyle.containerstyle> <style targettype="{x:type groupitem}"> <setter property="template"> <setter.value> <controltemplate targettype="{x:type ...

php - List Directories in Json File -

i can list images folder in json using code below: <?php $dir = "images/friday/"; $images = glob($dir."*.jpg"); foreach($images $image){ $registro = array( "file" => $image ); $retorno[] = $registro; } $retorno = json_encode($retorno); echo $retorno; ?> i think work directories nothing displayed if don´t use print_r($dirs). <?php $path = "images"; $dirs = glob($path . "/*", glob_onlydir); foreach($dirs $dir){ $reg = array( "folder" => $dir ); $return[] = $reg; } $return = json_encode($return); echo $return; ?> echo $return not display anything. there simple workaround or have build function ? need "folder" identifier.

copy Function constructor in Javascript -

i'd substitute function constructor fn that function hello(){ console.log("hello") } will give same result as fn lazyhi(){ console.log("i'm lazy function!") } i'm interested test own understanding of javascript inheritance patterns, i'm not sure can done @ "root" level. you cannot replace "function" keyword own "fn" keyword. syntax error.

java - What are good reasons for using Camel XML routes? -

the camel java dsl provides type-safety, code completion , proper support refactoring. helps modularize , (unit-)test code in great manner. speaking camel xml syntax see advantage of being able modify , reload routes @ runtime (e.g. via hawtio ). obviously i'm missing here - rationale behind use of camel xml routes today? in-place editing of routes (although discourage doing that) quick&dirty one-off routes (e.g. routing test qa environment) or simple projects - when have container karaf or servicemix. no need fire ide/compile. write , drop deploy folder. maybe easier non-developers it matter of taste , preference.