Posts

angular - Logger requirement in Angular2 project -

is there npm package logging supports following requirements in angular 2 projects - extending logger using decorator pattern push error level log server should able control logging events (framework , custom code) regards, naveen you can have @ angular2-logger has great capabilities , easy use https://www.npmjs.com/package/angular2-logger in case if interested in angular 4 or want switch 1 might helpful angular 4 there great looger can write logs sever https://www.npmjs.com/package/ngx-logger

Calling macro right after importing DB from external DB into Excel -

i have access myexterntable.mde database connect when workbook opened. connection defined regular excel's data-> connections ui, , works well. connection string is: provider=microsoft.ace.oledb.12.0; user id=admin; data source=d:\databases\uuuu\myexterntable.mde; mode=readwrite; extended properties=""; jet oledb:system database=""; jet oledb:registry path=""; jet oledb:engine type=5; jet oledb:database locking mode=1; jet oledb:global partial bulk ops=2; jet oledb:global bulk transactions=1; jet oledb:new database password=""; jet oledb:create system database=false; jet oledb:encrypt database=false; jet oledb:don't copy locale on compact=false; jet oledb:compact without replica repair=false; jet oledb:sfp=false; jet oledb:support complex data=false; jet oledb:bypass userinfo validation=false; jet oledb:limited db caching=false; jet oledb:bypass choicefield validation=false the commadtext is: qryidnameexport my workbook cont...

python 3.x - using dask distributed computing via jupyter notebook -

i seeing strange behavior dask when using jupyter notebook. initiating local client , giving list of jobs do. real code bit complex putting simple example here: from dask.distributed import client def inc(x): return x + 1 if __name__ == '__main__': c = client() futures = [c.submit(inc, i) in range(1,10)] result = c.gather(futures) print(len(result)) the problem that, realize that: 1. dask initiates more 9 processes example. 2. after code has ran , done (nothing in notebook running), processes created dask not killed (and client not shutdown). when top, can see processes still alive. i saw in documents there client.close() option, interestingly enough, such functionality not exist in 0.15.2. the time dask processes killed, when stop jupyter notebook. issue causing strange , unpredictable performance behavior. there anyway processes can killed or client shutdown when there no code running on notebook? the default client allows optional parameters pass...

apache - Http 403 forbidden when accessing applicaiton url from outside VM -

i have application running on linux os on vm. using vmware. when try access application url outside vm providing proper vm ip address http 403 forbidden in browser. application runs fine within vm on browser when use localhost app. able ping vm without issue host system. my network connection vm nat. tried switching bridged connection didn't help. host os windows 10. has seen behavior? not sure if question elementary. new vms.

ruby on rails - Ignore SSL for MySQL in database.yml -

i want set database.yml (or wherever else more appropriate) ignore ssl certificate when trying connect database. know bad practice temporary thing need. to give example of i'm trying do, want mimic sql connection command: mysql --ssl=0 -h 10.10.10.10 -u admincreds -p i have tried putting each of following parameters in last line (sslca, sslkey, , sslcert) in database.yml configuration such: development: <<: *default host: 10.10.10.10 username: admincreds password: password database: database sslca/sslkey/sslcert: false but i'm still getting ssl error expect: .rvm/gems/ruby-2.2.2/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in `connect': ssl connection error: error:00000001:lib(0):func(0):reason(1) (mysql2::error) is there different parameter can put in can skip on or not use ssl in database.yml or elsewhere? need run simple script. according mysql2 documentation should set, secure_auth: false when using yaml conf activerecord ...

python - Removing rows with NaN in MultiIndex with duplicates -

updated dataframe repros exact issue i have issue nan appearing in indexes leading non-unique rows (since nan !== nan ). need drop rows nan occurs in index. previous question had example dataframe single nan row, original solution did not resolve issue did not meet poorly advertised requirement: (note in actual data have thousands of such rows, including duplicate rows since nan !== nan permissible on index) (from original post) the issue >>>import pandas pd >>>import numpy np >>> df = pd.dataframe([[1,1,"a"],[1,2,"b"],[1,3,"c"],[1,np.nan,"x"],[1,np.nan,"x"],[1,np.nan,"x"],[2,1,"d"],[2,2,"e"],[np.nan,1,"x"],[np.nan,2,"x"],[np.nan,1,"x"]], columns=["a","b","c"]) >>>df c b 1.0 1.0 2.0 b 3.0 c nan x nan x nan x 2.0 1.0 d 2.0 e nan 1.0 x 2.0 x ...

virtual reality - How to install Google VR SDK in Android Studio -

i getting virtual reality apps , build own vr player app. how can download google vr sdk , install in android studio, can start playing around features. thank guys! the requirements listed here (at time of writing): https://developers.google.com/vr/android/get-started its maybe little unclear, need download google vr sdk android , put wherever want on local machine. once have there, can open studio , use 'open existing android studio project', select directory , choose 1 of sample projects , should , running. if want build own project need add in dependency project gradle build file. suggest check link again if having problems, relatively new , instructions may change on time , blog or other guides may out of date.