Posts

amazon web services - Hyperkube apiserver zone not specified in configuration file -

so i'm getting error when trying install kubernetes aws cloud provider. i'm installing kubespray narrowed down below command tried executing manually inside hyperkube container. i'm guessing actual error comes not having proper iam role. i'm working on obtaining 1 take sometime. see says zone not specified in configuration file. i'm not sure specify it. can point me in right direction in that? testing purposes can manually obtain awa access keys , session tokens. there way hyperkube use those? root@15713968201f:/# /hyperkube apiserver --advertise-address=10.205.232.161 --etcd-servers=https://10.205.232.161:2379,https://10.205.235.70:2379 --etcd-quorum-read=true --etcd-cafile=/etc/ssl/etcd/ssl/ca.pem --etcd-certfile=/etc/ssl/etcd/ssl/node-ip-10-205-232-161.ec2.internal.pem --etcd-keyfile=/etc/ssl/etcd/ssl/node-ip-10-205-232-161.ec2.internal-key.pem --insecure-bind-address=127.0.0.1 --apiserver-count=2 --admission-control=namespacelifecycle,limitrange...

ecmascript 6 - TypeScript and custom iterators -

i want create iterator array in typescript, how must fix code not transpilation error? generics or so? let array4 = [10, 20, 30]; array4[symbol.iterator] = function () { let = 0; return { next: function () { i++; return { value: < 4 ? array4[i - 1] : undefined, done: >= 4 ? true : false }; } }; }; let it4 = array4[symbol.iterator](); console.log(it4.next()); console.log(it4.next()); console.log(it4.next()); console.log(it4.next()); like so: array4[symbol.iterator] = function* () { let = 0; while (i < 3) { i++; yield array4[i - 1]; } }; you without generator function if like, need find correct signature of iterableiterator<t> . let me know if need that.

unix - Remove "...[C[0k" from expect output -

how can not generate substring "...[c[c[c[0k" after issued comands trough expect scripts? example, have following lines in expect script: #set variables, parameters etc ... spawn telnet $ip $port expect -nocase "name:" send -- "$user\r" expect -nocase "password:" send -- "$pass\r" expect -re "$prompt" send -- "terminal length 0\r" expect -re "$prompt" send -- "show vlan\r" expect -re "$prompt" send -- "logout\r" expect eof after execution receive undesirable substrings: username:[c[c[c[c[c[c[c[c[c[0kadmin password:[c[c[c[c[c[c[c[c[c[0k************** switch# [c[c[c[c[c[c[c[c[c[0kterminal length 0 switch#[c[c[c[c[c[c[c[c[c[0kshow vlan ... #'show vlan' command result here ... switch#[c[c[c[c[c[c[c[c[c[0klogout connection closed foreign host. does have tip on how can not generate these "[c[c[c[c[c[c[c[c[c[0k" strings? other issue i cannot use other too...

c# - Intercept text from print job and then printing as normal -

i trying intercept text data printed document without making modifications it. user's standpoint, document print normally, have text document use in program. i have come across printer++, unsure if want. presently plan create virtual printer extracts text, , forwards original document actual printer. is achievable printer++? or other solution?

r - Arrange multiple ggplots from a list on multiple pages with specified page breaks -

Image
i'm trying take plots list , output multipage pdf. can using gridextra:marrangegrob i'm having issues getting page breaks in right place. data in sets of 7 4 pages 2 plots on each page , break after 7th plot 8th starting on new page (as after 14th, 21st etc.). my list contains (currently 84 ggplots, more in future) i looked @ ggplot list of plots 1 pdf different page layouts don't want have set each page individually there many of them (i might want change 3 or 4 per page once have initial ones , don't want have re-work. i've made example using diamonds dataframe, assuming want split pages plots 2 different clarities aren't on same page egsplitdf <- diamonds %>% distinct(color, clarity) %>% arrange(clarity) egplotfun <- function(i, filterdf){ dat = filter(diamonds, color == filterdf[["color"]][i] & clarity == filterdf[["clarity"]][i]) ggplot(dat, aes(x= x, y = y))+ geom_point()+ labs(titl...

javascript - How to make a fixed sidebar stop at the end of a container -

i have container 2 columns, 1 of holds sidebar. jsfiddle the sidebar fixed, , when gets near bottom used jquery alter bottom have stay @ bottom of container. how can make stops moving when hits bottom of container (outlined in red)? have work sidebar of height. html <div class="container"> <div class="col-left"> <div class="sidebar"> fixed sidebar </div> </div> <div class="col-right"> <p>paragraph</p> <p>paragraph</p> <p>paragraph</p> </div> </div> <footer>footer</footer> css .container { outline: 1px solid red; position: relative; } .col-left { width: 58%; display: inline-block; outline: 1px solid black; vertical-align: top; height: 100%; } .col-right { width: 40%; display: inline-block; outline: 1px solid black; vertical-align: top; } .sidebar { position: fixed; top: ...

machine learning - Word embedding training -

i have 1 corpus word embedding. using corpus, trained word embedding. however, whenever train word embedding, results quite different(this results based on k-nearest neighbor(knn)). example, in first training, ' computer ' nearest neighbor words ' laptops ', ' computerized ' ,' hardware '. but, in second training, knn words ' software ', ' machine ',...('laptops' low ranked!) - training performed independently 20 epochs, , hyper-parameters same. i want train word embedding similar(e.g., 'laptops' high ranked). how should do? should modulate hyper-parameters(learning rate, initializing, etc)? you didn't word2vec software you're using, might change relevant factors. the word2vec algorithm inherently uses randomness, in both initialization , several aspects of training (like selection of negative-examples, if using negative-sampling, or random downsampling of very-frequent words). additionally, if you...