Posts

Showing posts from March, 2013

chromium embedded - CefSharp OffScreen Browser fails when setting a proxy -

i'm trying offscreen browser change proxy while running, error when trying so. i'm running following code when changing proxy: var success = false; cef.uithreadtaskfactory.startnew(delegate { var rc = _webbrowser.getbrowser().gethost().requestcontext; var dict = new dictionary<string, object> { {"mode", "fixed_servers"}, {"server", proxyaddress} }; string error; success = rc.setpreference("proxy", dict, out error); }).wait(); if (success == false) throw new exception("proxy not configured"); when run code _webbrowser set instance of cefsharp.offscreen.chromiumwebbrowser success variable set false. if _webbrowser set instance of cefsharp.wpf.chromiumwebbrowser instance, works charm. what wrong?

javascript - .offsetWidth, .width, .width() etc. not always returning properly on auto-sized element -

i'm trying resize div based on width of image contained within it, no js method grabbing image's width seems working consistently. <div class="main_image"> <img class="wp-post-image" src=""> <label>label here</label> </div> img { width: auto; height: auto; max-width: 500px; max-height: 450px; } var newwidth = document.getelementsbyclassname("wp-post-image"[0].offsetwidth; $(".wp-post-image").parent(".main_image").css({"width": newwidth}); i've tried .style.width , .width , .offsetwidth , .width() , .outerwidth() , .getboundingclientrect.width() each of these, correctly grabs image width of time, other times has image's width 0. (or 2 because has 1px border , that's part getting picked up, same deal.) issue grabbing of width, not setting, tested alerts. the reason need resize div image caption wrap if it's wider image itself.

javascript - PHP: making a countdown auto-updating -

i new php , new stackoverflow , , far it's been few months started learning php , so point making countdown auto-refresh, have refresh page new result, there way make auto-updateable i used following code achieve need: <?php $date = strtotime("september 12, 2017 2:00 pm"); $remaining = $date - time(); $days_remaining = floor($remaining / 86400); $hours_remaining = floor(($remaining % 86400) / 3600); $min_remaining = floor(($remaining % 3600) / 60); $seconds_remaining = floor($remaining % 60); echo "there $days_remaining days , $hours_remaining hours left , $min_remaining minutes left , $seconds_remaining left"; ?> but.. have update page every time new result. update: what heck.. had use javascript. if want, use code works perfectly <script> var end = new date('09/12/2017 10:1 am'); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer;

node.js - Changing data before Create in Sails API call -

in taskcontroller i'm trying insert current user (i.e. user created task) newly created task. mostly i've been trying different ways override create() in override call original blueprint , let continue usual. i found bunch of answers seem outdated or otherwise not working. wonder if there's more updated. i'm using sails v1.0.0-37 solution: in \tasks\api\controllers\taskcontroller.js create: function (req, res) { req.query.createdby = req.user.id; task.create(req.query) .exec(function (err) { if (err) { return res.servererror(err); } return res.ok(); }); } my issue: during testing , experimenting created empty lifecycle callback of beforecreate. since empty, never called cb() request got stuck.

javascript - How can I pass properties to a component which is called by router in Vue Js -

i new vuejs , have problem 2 components. trying display component vuejs router , must pass properties component , since it's not child of component (it's in different directory), how can pass data component? example: this parent component: <template> <div class="container"> <router-link to="/form"></router-link> </div> </template> <script> export default{ data(){ return{ values: {val1: 123, val2: 321} } } } </script> this components needs properties, form component: <template> <div class="container"> <form> <input type="text" v-model="values.val1"/> <input type="number" v-model="values.val2"/> </form> </div> </template> <script> export default{ props: { values: { type: object } } } </script>

edit - How to add exception urls for action.VIEW in Android -

in manifest file i've made sure whenever link website clicked , intent created action_view , app among suggestions user link should opened with. can choose between chrome , app. now, how add url not want app open, want chrome open right away (without asking user choose between chrome , app) for instance, want preserve code below, modify exclude "mywebsite.com/promotion" being openable app <activity android:name=".mainactivity"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.browsable" /

php - how to get fullpath of scandir() -

when scandir() it's return in array this array( [0]=> string(8) "devtools" [1]=> string(17) "lb-particles.phar" [2]=> string(11) "nogrifersdp" [3]=> string(12) "packetlogger" [4]=> string(24) "pocketmine-devtools.phar" ) so want fullpath of files this array( [0]=> string(8) "c:\users\username\pocketmine-mp\plugins\devtools" [1]=> string(17) "c:\users\username\pocketmine-mp\plugins\lb-particles.phar" [2]=> string(11) "c:\users\username\pocketmine-mp\plugins\nogrifersdp" [3]=> string(12) "c:\users\username\pocketmine-mp\plugins\packetlogger" [4]=> string(24) "c:\users\username\pocketmine-mp\plugins\pocketmine-devtools.phar" ) the code tried use didnt work $pluginsfolder = $this->getserver()->getdatapath()."plugins/"; $plugins = array_slice(scandir($pluginsfolder), 2); foreach ($plugins $

java - Why is Android Studio trying to locate resource in debug package instead of the main one? -

i have app 4 different build types: debug , release (the normal ones), alpha , beta. declare types in build.gradle follows: buildtypes { // release (or "live") variant. application id app.myapp.live release { minifyenabled true shrinkresources true debuggable false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' signingconfig signingconfigs.config applicationidsuffix ".live" ext.enablecrashlytics = true // build config fields buildconfigfield("boolean", "release", "true") } // debug variant. application id app.myapp.debug debug { minifyenabled false shrinkresources false debuggable true applicationidsuffix ".debug" versionnamesuffix '-debug' ext.enablecrashlytics = false } // alpha variant. application id app.

How to configure Tomcat and Eclipse -

a couple of days ago, added project workspace contained non-maven based web app deployed using tomcat 8. until time, worked well. added other project, tomcat's life took turn worse i.e. no run tomcat or deploy first application. when testing apps stand alone version of tomcat, applications run should; however, have tried various attempts configure tomcat/eclipse no avail. have deleted server, removed server plugin, modified server.xml , web.xml files, while receiving errors ranging nullpointerexceptions not publish server configuration: null. the success have had since adding additional project remove projects workspace, delete server, add server bare bones server.xml file, add project, update server.xml , run app empty web.xml file. when add servlets file, run same problems. can shed light on why happening , how address issues?

windows installer - WiX: MSI causing double entry in Programs and Features after major upgrade, also not uninstalling -

i have project lot of msis (installed bootstrapper). recently, after major upgrade, noticed previous version wasn't being uninstalled in programs , features (win 7). is, after upgrading version 1 version 2, both version 1 and version 2 in programs , features . this common problem, it's problem lot of different shades of grey -- have uncommon shade of problem. the problem may lie in specific msi. this msi can run during initial install. therefore never change version number. here looks (to show it's legit major upgrade): <product id="*" name="msi" language="1033" version="1.0.0.0" manufacturer="bob" upgradecode="guid-here"> <package installerversion="200" compressed="yes" installscope="permachine" /> <majorupgrade downgradeerrormessage="a newer version of [productnam

symfony - Php-unit - Failed asserting that 'myDomain\Entity\Likes' is an instance of class "myDomain\Entity\Likes" -

i'm making tests web application, removes likes record database, i'm getting ambiguous fail. expectation failed method name equal when invoked 1 time(s). parameter 0 invocation mymelomanbundle\repository\likesrepository::remove('mydomain\entity\likes') not match expected value. failed asserting 'mydomain\entity\likes' instance of class "mydomain\entity\likes". dislikepublicationusecasetest.php <?php namespace mymelomanbundle\likes; class dislikepublicationusecasetest extends \phpunit_framework_testcase { const user = 2; const pub = 15; /** * @var \phpunit_framework_mockobject_mockobject */ private $publicationrepositorymock; /** * @var \phpunit_framework_mockobject_mockobject */ private $userrepositorymock; /** * @var \phpunit_framework_mockobject_mockobject */ private $likesrepositorymock; /** * @var \phpunit_framework_mockobject_mockobject

Is there a way to customize the colors in redash when drawing charts? -

i came across redash , started working on charts. colors totally not attractive. there anyway can customize colors in d3.js? went through source code had file called plotly.js , in had list of colors. plotly.js const basecolors = { blue: '#4572a7', red: '#aa4643', green: '#89a54e', purple: '#80699b', cyan: '#3d96ae', orange: '#db843d', 'light blue': '#92a8cd', lilac: '#a47d7c', 'light green': '#b5ca92', brown: '#a52a2a', black: '#000000', gray: '#808080', pink: '#ffc0cb', 'dark blue': '#00008b', }; can change according our requirement? cannot post original source code huge. here link repo: redash . feel i'm restricted , frustrated using redash. , don't have choice use other libraries.

Add multiple file uploads to an existing PHP form -

i'm frontend developer trying struggle way through php form freelance client. quite extensive job application form, client has requested include 2 file uploads: image (jpg, png) , cv (pdf, doc). these files attach email containing form answers. uploading files folder on server permanently not required. as woefully inadequate @ things php, resorted site called formbakery generate said form me, great - except doesn't include file upload capabilities. i have tried couple of different resources php file upload , email attachment, including this tutorial , this answer , issue don't know how incorporate code have. hoping me out combining various different elements. if multiple file upload ask for, single 1 cv massive help. php sending form <?php // value array function array_get(array $array, $key, $default = null) { return (array_key_exists($key, $array)) ? $array[$key] : $default; } // string value array function array_get_string(array $array, $key, $defa

How resize TortoiseGit commit message text box? -

Image
i've somehow managed make tortoisegit commit dialog commit message text box 1 line long. however cannot find setting reset it. i've have uninstalled , removed tortoisegit , installed latest versions. it's still returns. oh , resizing dialog doesn't fix it. move mouse position between message , change mode group box (see following figure) then drag down position want. and it's bigger:

reactjs - How do I pass up the value inside of react-autosuggest to the parent component? -

in app.js, have this render() { return ( <div id="app"> <searchbar /> </div> ); } and inside of searchbar, import react-autosuggest , have - render() { const { value, suggestions } = this.state; const inputprops = { placeholder: "search", value, onchange: this.onchange }; return ( <autosuggest style={style} suggestions={suggestions} onsuggestionsfetchrequested={this.onsuggestionsfetchrequested} onsuggestionsclearrequested={this.onsuggestionsclearrequested} getsuggestionvalue={getsuggestionvalue} rendersuggestion={rendersuggestion} inputprops={inputprops} onsubmit={this.dosomething} /> ); } where these functions standard boilerplate functions react-autosuggest uses. how access searched inside of searchbar inside of it's parent, app.js? you can use props raise data autosuggest events parent component. create method insi

javascript - Error: Text data outside of root node - when installing cordova plugin -

i error when trying install cordova plugin ionic (usually after around 6pm gmt+0). these plugins both npm , github, , error is: error: text data outside of root node. line: 155 column: 1 char: " the install command along lines of ionic cordova plugin add cordova-plugin-network-information@1.3.1 it not matter plugin is, because mentioned happens number of them, same error. work ok in morning, , shuts down. i have tried on multiple computers, on multiple separate internet connections (from uk), , have script reruns commands if fail, attempt install around 20 plugins continuously until installed long run script. ran hour constantly, , not single 1 installed. i checked status of npm , github if perhaps down, seemed , running usual... any ideas appreciated

charts - Equivalent Matlab/Python GridData Function in C# -

both matlab , python have griddata function interpolates xyz points fit given data point coordinates. there c# equivalent of this? if not there reference creating own function? link scipy example: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.griddata.html i want take arbitrary x,y,z triplets , plot them using oxyplot's contour or heatmap capabilities, having trouble getting data in correct format. i ended using work around , called python script uses scipy's griddata function code: string command = "griddatafunct.py "+ currpath + "\\temp.xyz"; processstartinfo cmdme = new processstartinfo(pythonexepath); cmdme.arguments = command; process cmd = process.start(cmdme); cmd.waitforexit();

Issue with getting my API Call in Rails to properly display correctly in views (Using HTTParty) -

i using httparty gem in rails make api call , has been successful. receive no errors after defining variables in controller can not loops produce anything. if type in <%= @variable %> shows active record object expected. if same include variable.name provides string, not hoping. have followed several httparty tutorials , put in lot of api research can't seem figured out. trying retrieve list of snacks external api. here have (some of things in view test). api call (i put in separate folder services): class snackapi include httparty base_uri 'https://api-snacks.nerderylabs.com/v1/' snack_access = "/snacks?apikey=#{env['snack_api_key']}" def get_snacks response = self.class.get(snack_access) json.parse(response.body) end end first time posting code snippets not sure how post in proper indentation, correct in application. controller: class snackscontroller < applicationcontroller def index @snacks = snack.

javascript - Trouble with Google MailApp html option -

i having trouble setting script iterate through google spreadsheet , email employees lines contain reports them. in tests email address , subject lines being emailed depending on try email either blank or says "[object object]". i viewing emails gmail site in chrome. the html code not have variables yet. still working on getting email correctly , try working in scriplets build table report. code.gs function changename() { var ss = spreadsheetapp.getactivespreadsheet(); var sha = ss.getsheets()[0]; // report download var shb = ss.getsheets()[1]; // names & email address var alrow = sha.getlastrow(); var blrow = shb.getlastrow(); var data = sha.getrange(1, 1, alrow, 14).getvalues(); // array of employees reports var employees = shb.getrange(1, 1, 2, 2).getvalues(); // list of employees [i][0] , email address [i][1] in scorecard data for(i=0;i<employees.length;i++){ var html = htmlservice.createtemplatefromfile('index'

javascript - Why won't my shape animate color change like this example? -

this example following: https://thebookofshaders.com/03/ here html: <!doctype html> <html> <head> </head> <body> <!--include a/s webgl support libraries--> <script type="text/javascript" src="../common/webgl-utils.js"></script> <script type="text/javascript" src="../common/initshaders.js"></script> <script type="text/javascript" src="../common/mv.js"></script> <script type="text/javascript" src="../common/webgl-debug.js"></script> <script type="text/javascript" src="assignment1.js"></script> <script id="vertex-shader" type="x-shader/x-vertex"> // glsl vertex shader code attribute vec4 vposition; void main() { gl_position = vposition; } </script> <script id="fr

lighttpd - Redirect based upon script output? -

i'd redirect "/" based upon output of bash script. script returns 0 or 1. i have inherited lighttpd server no experience hoping can help. :) basically want: on accessing url if script output returns 1 redirect /index.php else redirect url is possible lighttpd? trying avoid spinning php process simple. you might (ab)use mod_fastcgi authorizer mode this, , have script return 302 found location: ... target url of choice. https://redmine.lighttpd.net/projects/lighttpd/wiki/docs_modfastcgi however, this, script must fastcgi script, or can start wrapper such spawn-fcgi https://github.com/lighttpd/spawn-fcgi (or can write script in c , use example code in docs_modfastcgi page above) (or can use python , see https://redmine.lighttpd.net/projects/lighttpd/wiki/howtopythonwsgi )

java - Make Jbutton fully mimic "X" button -

i developing application uses full screen , jbutton in top right should act close "x" button application. thing is, make mimic actual "x" button. i'll explain, program has implemented ways make closing of application different things via settings menu (close/minimize/hide tray) use setdefaultcloseoperation , not work jbutton set up, because neither system.exit(0); or frame.dispose(); take consideration setdefaultcloseoperation, close frame no matter setdefaultcloseoperation tells do. is there way create button follows rules of setdefaultcloseoperation or have change code work around that? you can create jbutton event, , event, call system.exit(0); function. this example: jbutton exit = new jbutton("exit"); exit.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent e) { // want before exit program system.exit(0); // exit program // frame.dispose();

javascript - web3.js calling transfer function return Invalid number of arguments to Solidity function -

i'm using web3.js use function on form submit, transfer(address _to, uint256 _value) i'm able call contract function, erro: invalid number of arguments solidity function trying use transfer function, suppling both address , amount of token. here part of code: function sendtoken(to, amount){ var = to; var amount = amount; var settx = contract.transfer(to,amount); return settx; } calling (don't worry, contract correctly called in contract var var formdata = getformobj("tokeform"); console.log(formdata.destinationtoke); console.log(formdata.amounttoke); var tx = sendtoken(destinationtoke, amounttoke); var tx = json.stringify(tx, null, " "); console.log(tx); this error. here contract function: function transfer(address _to, uint256 _value) { if (genesisaddress[_to]) throw; if (balances[msg.sender] < _value) throw; if (balances[_to] + _value < balances[_to]) throw; if (genesisaddress[ms

html - W3C validator issues: "end of document in prolog" and "Can't use an undefined value as an ARRAY reference" -

is experiencing difficulties w3c html validator ? i've been using past year without issue, today started getting error looks validator issue: line 1, column 1: end of document in prolog error may appear when validator receives empty document. please make sure document uploading not empty, , report discrepancy. the thing is, i'm not uploading, i'm using "validate direct input" , pasting in html... i've tried "validate file upload" option, see if anything's different, , gives me worse: software error: can't use undefined value array reference @ /usr/local/validator/httpd/cgi-bin/check line 571. help, please send mail webmaster ([no address given]), giving error message , time , date of error. is broken? or doing wrong?

Python if-else statement order -

my problem similar one: python if-elif statements order answer is: #this answer given question linked directions = [] if <the obstacle has free tile on right>: directions.append(move_right) if <the obstacle has free tile on left>: directions.append(move_left) if not directions: stop() else: random.choice(directions)() now, question how input if statements list direction=[] ? valid data type? edit: want know how able apply code above. let's there's object in maze , when reaches intersection code have: if (a in intersection): a.forward() elif (forward().doesntexist): a.left() elif (left().doesntexist): a.right() ...... but code mean he'd go forward first, left, right, etc. want direction random may go right/forward/left first. import sys import random # example "free tile" free_tile = (0,5) def move_right(): my_p

javascript - Can I learn ecma script 6 without getting on es5? -

Image
i learned html , css , javascript want know can learn es6 standard without practising or knowing es5 appreciated.... es5 included in es6, can go straight es6 without scruples.

this.state within react-navigation screen -

i'm having trouble accessing , defining state. app uses react-navigation. overall within app can work state (without errors), within primary tabbar screens, "null not object" error when use simple definition of state below. i not using redux export class review_screen extends react.component { // set title @ top of page static navigationoptions = ({navigation}) => ({ title: navigation.state.params.title }); constructor(props) { super(props); const { params } = this.props.navigation.state; this.state = { // general id info barcode: params.productdata.barcode, userid: params.user.id, username: params.user.name, expanded: false, testing: 'hallo hallo', }; } render() { console.log('-_-_-_-_-_-_-_-_-_-_-_-_-'); console.log(this.state.testing); console.log('-_-_-_-_-_-_-_-_-_-_-_-_-'); const { params } = this.props.navigation.stat

javascript - HTML - Adding Rows for Multiple Tables -

as below codes shows multiples of tables add/edit/delete functions. have function of adding rows each , every table. in codes, have done first table , rest of tables. need in this. note: had removed of codes due exceed of code counts. please ignore passparameters() , getparameterbyname( ). adding row function in add_row() function @ end of codes. window.onload = passparameters; //function update "showdata" div url querystring parameter values function passparameters() { var product = getparameterbyname("product"); var profile = getparameterbyname("profile"); if (product != null && profile != null) { var data = "<b>product in test : </b> " + product + " &emsp;&emsp; <b>profile in test : </b> " + profile; document.getelementbyid("showdata").innerhtml = data; } } //get url parameter value function getparameterbyname(name, url) { if (!url) url

node.js - Issue with npm require -

Image
i'm running nightmare.js script, , within i'm trying require lodash (installed locally npm, in node_modules, registered in package.json). index.js : var nightmare = require('nightmare'); var _ = require('lodash'); function getrandomint(min, max) { min = math.ceil(min); max = math.floor(max); return math.floor(math.random() * (max - min)) + min; } function getelms(elm) { var elsm = document.queryselectorall(elm); return _.map(elsm, function(elem){ return elem.innerhtml; }); } var somewebsite = new nightmare({ show: false }) .goto( ***some url*** ) .wait(getrandomint(2500, 5000)) .evaluate(function () { var elsm = document.queryselectorall(***some selector***); return _.map(elsm, function(elem){ return elem.innerhtml; }); // return getelms(***some selector***); }).then(function(linkstexts) { console.log(linkstexts) }); but i'm getting this: unhandledpromiserejectionwarning: unhandled promise

cordova - Ionic 2 Google Maps Native Map Type -

how set maptype using ionic 2 , google maps native import { googlemaps, googlemap, googlemapsevent, googlemapoptions, cameraposition, markeroptions, marker } '@ionic-native/google-maps'; constructor(public navctrl: navcontroller, public googlemaps: googlemaps) { } let mapoptions: googlemapoptions = { camera: { target: { lat: 43.0741904, lng: -89.3809802 }, zoom: 18, tilt: 30 }, 'maptype': this.googlemaps.maptypeid.roadmap }; error: property 'maptypeid' not exist on type 'googlemaps'. from documentation states map.setmaptypeid(plugin.google.maps.maptypeid.hybrid); can't figure out type plugin is?

phpstorm - Undefined variable in PHP when the variable is present -

i have looked @ other questions , none of them fixed issue. following class defines variable , calls variable in html code. i've used same method php page , works perfectly. reason not work on page. i've done numerous times no issues. phpstorm says variable $user "might not have been defined" know is. how can fix this? have tried setting variable global @ top of page no luck. have tried setting variable global after if(isset()) , still doesn't work. here's php code: <?php session_start(); require_once 'includes/class.user.php'; $user_edit = new user(); if(!$user_edit->is_logged_in()) { $user_edit->redirect('index.php'); } if(isset($_get['user_id'])) { $tid = $_get['user_id']; $stmt = $user_edit->runquery("select * users user_id = :id"); $stmt->execute(array(':id' => $tid)); $user = $stmt->fetch(pdo::fetch_assoc); } ?> <?php include('header.php'

Laravel 5.4 Uncaught TypeError: Cannot read property 'common' of undefined -

Image
i'm stuck kind of error related axios. issue occurs when use npm run watch , edit scss or vue files. after editing scss or vue files, browser reloads , produce error. found link no luck. tried removing node_modules , npm install. tried dig browser's console , got axios.defaults.headers undefined and when axios.defaults.headers.common display main error. for mean time, cured lowering laravel-mix version 0.* in package.json , run npm install . source link here

objective c - how to add a button for create new file in NSOpenPanel?(not create folder button) -

Image
macos:how add button creating new file in nsopenpanel?(not create folder button) have @ nsopenpanel 's accessoryview property, can use add arbitrary buttons , other ui elements open panel.

Asp.net core docker - skip ctrl-c message -

i have default asp.net core dockerfile (as created vs tools docker): from microsoft/aspnetcore:2.0 arg source workdir /app expose 80 copy ${source:-obj/docker/publish} . entrypoint ["dotnet", "myapp.dll"] when run image using docker run myimage message in interactive console: hosting environment: production content root path: /app listening on: http://[::]:80 application started. press ctrl+c shut down. if press ctrl+c , type docker start <imgid> , no longer see message, , bash console not blocked. how can docker run bypassing annoying message? you can use -d flag docker run image starts in detached mode. in case not see output docker running in background. docker run -d

python - Trying to use dlib to measure mouth perimeter in a video and getting noisy results -

i have video of patient doing cognitive tasks. goal take each frame of video, face detection , landmark mouth, calculate area bounded mouth landmarks. used dlib , python api this. i ran 2 problems. first, patient in hospital bed , camera view angled upward, looking @ chin instead of directly @ face. face isn't being detected in decent number of frames, , if there no face detected, algorithm doesn't try landmarking there no mouth perimeter points. wondering if there way can improve face detection (maybe training object detection on few frames of patient?) the second problem frame frame, mouth landmarks can vary pretty significantly. hoping @ end of show slow motion word being spoken , mouth perimeter smoothly increasing , decreasing mouth opened , closed. but, result quite noisy bit of variation. i'm method/platform agnostic. if knows of better, more accurate or robust way this, maybe matlab or opencv, open chasing lead. guidance helpful. thanks, everyone.

go - bug using golang io.pipe to tar files -

i have been testing code using io.pipe tar , gunzip files tar ball , unzipping using tar utility. follow code passes, untaring process keeps getting error: tar: truncated input file (needed 1050624 bytes, 0 available) tar: error exit delayed previous errors. this issue driving me crazy. has been 2 weeks. need debugging. thanks. development enviroment: go version go1.9 darwin/amd64 package main import ( "archive/tar" "compress/gzip" "fmt" "io" "log" "os" "path/filepath" "testing" ) func testtargzippipe2(t *testing.t) { src := "/path/to/file/folder" pr, pw := io.pipe() gzipwriter := gzip.newwriter(pw) defer gzipwriter.close() tarwriter := tar.newwriter(gzipwriter) defer tarwriter.close() status := make(chan bool) go func() { defer pr.close() // tar local disk tarfile, err := os.openfile("/