Posts

What is the relationship of HTTP headers and directory with destructors in php? -

i know destructor in php oop 1 thing want know relationship of http headers , directory destructor in php ? can tell mean ? destructors called during script shutdown have http headers sent. working directory in script shutdown phase can different sapis (e.g. apache). this documented in destructor in reference link below. http://php.net/manual/en/language.oop5.decon.php that attempts explain when destructor called headers_sent() return true , gives heads working directory might different when destructor called(it may not same how during constructor or when other methods called)(typically working directory script lives). work around use absolute path or use chdir(); so need careful when doing actions following: class files{ function __destruct() { unlink($this->logfile); // may wrong if relative path } } going first part, when destructors called, headers sent. won't able things depend on "header sent". example, redirect...

java - MATLAB 2016b Doc Set Throwable on Startup -

recently on start of matlab 2016b, began receiving following message in command window: "caught throwable while adding doc set item doc set builder: null" looks same throwable message stackoverflow user experiencing: error on opening matlab related null tried restoring defaults on paths, preferences, ect... i've been digging around in javaclasspaths , matlab log files haven't been able find information on problem. any appreciated!

FormArray without FormControls and just strings Angular 2 -

i have 2 string arrays on backend have fill either single string or multiple strings. not key value pairs. trying push string 1 of arrays running fact not , cannot specify control: value pair. my formarray looks collections: new formarray([]), my html select strings <md-select placeholder="collection"> <md-option (click)="addcollectionid('one')" value="local">local</md-option> <md-option (click)="addcollectionid('two')" value="music">music</md-option> <md-option (click)="addcollectionid('three')" value="performing arts">performing arts</md-option> <md-option (click)="addcollectionid('four')" value="sports">sports</md-option> <md-option (click)="addcollectionid('five')" value="restaurants">restau...

python - Extract text from webpage with Selenium -

i attempting extract ip addresses webpage using following code (snippet). ips = driver.find_elements_by_xpath("//span[contains(text(), '10.')]") print(ips) the html element(s) this: <span style="padding: 1px 4px;float:left;">10.20.20.20</span> inspect >> copy xpath returns: //*[@id="t1700010887"]/tbody/tr[2]/td[1]/nobr/span but code prints looks generic selenium code: [<selenium.webdriver.remote.webelement.webelement (session="7885f3a61de714f2cb33 b23d03112ff2", element="0.5496921740104628-2")>, <selenium.webdriver.remote.webe lement.webelement (session="7885f3a61de714f2cb33b23d03112ff2", element="0.549692 1740104628-3")>, <selenium.webdriver.remote.webelement.webelement (session="7885 f3a61de714f2cb33b23d03112ff2", element="0.5496921740104628-4")>] how can print actual ip of 10.20.20.20? when using selenium's element fin...

html - Confusion with using translate when centering an element in CSS -

.center{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } i using center element class name center, not quite sure how transform , translate work in css , how make element centered.

serialization - Reading AVRO or JSON records in redshift -

i serializing , deserializing data using avro. save serialized data s3. trying read data in s3 redshift, unable read it. tried avro format s3 records - {"breachid":"0eb3130c-241a-461b-99ab-4910301fa012","metricname":"sic_fast_track","regionid":"1","marketplace":"1","glproductgroup":"14","snapshotdate":"2017-09-11","breachdate":"2017-08-14","year":2017,"baseweeknumber":29,"weeknumber":29} command @ redshift end - copy test 's3://test/test.avro' credentials 'aws_iam_role=arn:aws:iam::355548666665:role/my_iam_role' format avro 'auto'; error @ redshift - [ amazon](500310) invalid operation: invalid avro file details: ----------------------------------------------- error: invalid avro file code: 8001 context: cannot init avro reader s3 file incorrect avro container ...

Python folder copying issue -

i'm trying copy directory portable drive main disk using following lines: temp_command = "xcopy " + new_dir + " " + basedir + "/libraries/installed" #this isn't working. raises error. if subprocess.check_output(temp_command) == true: # copy file local directory on c: and error: invalid number of parameters traceback (most recent call last): file "e:/jason core/boot.py", line 103, in <module> control() file "e:/jason core/boot.py", line 96, in control install_libs() file "e:/jason core/boot.py", line 45, in install_libs if subprocess.check_output(temp_command) == true: # copy file local directory on c: file "c:\python27\lib\subprocess.py", line 574, in check_output raise calledprocesserror(retcode, cmd, output=output) subprocess.calledprocesserror: command 'xcopy c:/downloads/python_libraries e:/libraries/installed' returned non-zero exit status 4 any sugge...