Posts

ruby on rails - How to get container id of running container programmatically (on Docker)? -

i have app in docker setup. run script on host run commands in existing (running container). if know container id, ... it's 50250e572090 ... can run script this for example ... #!/usr/bin/env bash docker exec 50250e572090 example_command_1_here docker exec 50250e572090 example_command_2_here docker exec 50250e572090 example_command_3_here docker exec 50250e572090 example_command_4_here it's working great! ... thing here know image name ... not container id. find container id ... use docker ps ... ... container id image command created status ports names 50250e572090 aws_beanstalk/staging-app:latest "/sbin/my_init" 29 hours ago 29 hours 80/tcp, 443/tcp drunk_bardeen it's output isn't can use (pipe through). command can run container id output can piped script? or it's clear i'm trying achieve ... there better way? ps...

html - Trouble with responsive Max Width column in Bootstrap -

i trying page nice on bigger displays: http://clccedarrapids.com/christian-theology/christian-theology.html what want set maximum width large article on right (it akward to read wide of article on large displays). had success this solution when used plain text when include article ssi instead of plain text stops working (i think because solution requires custom p class , include uses custom p classes. there easy solution this? use col-lg change width of columns on large displays.. can mix col-md different size columns on different screen sizes <div class="row"> <div class="col-md-9 col-lg-10"></div> <div class="col-md-3 col-lg-2"></div> </div>

c# - Custom Overlay with FlashLite using just Xamarin forms -

i'm doing xamarin forms app android qrcode scanner. i'm using zxing library , codes finded online using xaml, use c#. what need customoverlay flashlite button without using xaml. something zxingoverlayview flashlite button. thank's , sorry bad english.

sql - find rows in Table1 that match criteria rows in Table2 -

i've got 2 tables: t1 table of data column one cannot have null column two , three can have null s t2 table of categorization rules it has same columns t1 along cat column represent category the idea first 3 columns have criteria used determine how , if rows in t1 should categorized it possible row in t2 have values in 2+ columns meaning there multiple criteria need match in t1 (e.g. t1.two "2*" , t1.three "hi" ) i want query finds rows in t1 match based on criteria in t2 . here example: +------+------+-------+ | t1 | +------+------+-------+ | 1 | 2 | 3 | +------+------+-------+ | aaaa | 1111 | | | bbbb | 2222 | | | cccc | | test | | dddd | | | +------+------+-------+ +------+-----+-------+------+ | t2 | +------+-----+-------+------+ | 1 | 2 | 3 | cat | +------+-----+-------+------+ | aaaa | * | * | 1 | -> rows in t1 column 1 equals aaaa | * ...

php - file_exists not behaving properly -

i writing script upload file part of php project. if file exists same name, instead of moving file anyway , overwriting whatever there, using header() refresh page , add message rename file before uploading. however, not working. program moves file on regardless if name taken. have tested if(file_exists($_server['document_root'] . "/uploads/" . $_files['uploadfile']['name'])) , seems work independently not within structure of program. can't figure out goes wrong though. here code <?php include ('includes/openfile.php'); if(isset($_files['uploadfile'])) { $allowed = array('image/jpg', 'image/jpeg', 'image/png', 'text/plain'); // validate file type if(in_array($_files['uploadfile']['type'], $allowed)) { //check if file exists current file name in order prevent overwrite -- prevents overwrite .htaccess attack protecting user files if(file_exists($_server['d...

python - YouTube API v3 - captions upload causes HTTP 500 backend error -

i'm using code sample how use youtube v3 api methods upload youtube video caption tracks, given at: https://developers.google.com/youtube/v3/code_samples/python#create_and_manage_youtube_video_caption_tracks however, when i'm running command line using following command: python manage_captions.py --file="test.srt" --videoid='ddil1fbaida' --action='upload' the content of test.rst is: first line of caption track: 1 00:00:23,000 --> 00:00:25,000 text displays 2 seconds starting 1 minute , 23 seconds video. 2 00:02:20,250 --> 00:02:23,800 text displays 2 minutes , 20.25 seconds after start of video until 2 minutes , 23.8 seconds after start of video. 3 00:03:14,159 --> 00:03:22,092 text displays beginning 3 minutes , 14.159 seconds after start of video undefined length of time. i http error: an http error 500 occurred: { "error": { "errors": [ { "domain": "global", "re...

Each run of the same Hadoop SequenceFile creation routine creates a file with different crc. Is it ok? -

i have simple code creates hadoop's sequence file. each code ran leaves in working dir 2 files: mysequencefile.txt .mysequencefile.txt.crc after each run sizes of both files remain same. crc file contents become different! is bug or expected behaviour? this confusing, expected behaviour. according sequencefile standart , each sequencefile has sync-block , length 16 bytes. sync-block repeats after each record in block-compressed sequencefiles, , after records or 1 long record in uncompressed or record-compressed sequencefiles. thing is, sync-block sort of random value . written in header, how reader recognizes it. stays same within 1 sequencefile , can (and is) different 1 sequencefile another . files logically same, binary different. crc binary shecksum, different between 2 files too. haven`t found ways manually set sync-block. if gets way, please write here.