Posts

ssh - Can I connect to an EC2 instance with one key-pair while forwarding another? -

i need connect ec2 instance amazon-provided key-pair, forward public key associated github account can pull private repo (with fabric). possible? if so, need have public key on each remote machine pull from? yes. use -i option ssh. , agent , agent forwarding github account. ssh -i my_aws_key_pair.pem -a myawshost i assume question, know how whole agent thing. way, can add aws key pair agent ssh-add my_aws_key_pair.pem , need ssh -a. forward both keys though. not sure if wanted avoid or not.

perl - What is the reason for the error "Failed to decode JSON" in MediaWiki::API? -

we have private mediawiki installation inside our company. based on daily builds on our source code, update wiki perforce labels people can use build labeled streamlined process. tried automate using perl scripts on windows server using mediawiki::bot , mediawiki::api . use mediawiki::bot; use mediawiki::api; $mw = mediawiki::api->new(); $mw->{config}->{api_url} = 'http://somewiki/w/index.php/title#feature_list'; # log in wiki $mw->login({ lgname => 'username', lgpassword => 'password' || die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; # list of articles in category $articles = $mw->list({ action => 'query', list => 'categorymembers', cmtitle => 'category:perl', cmlimit => 'max' }) || die $mw->{error}->{code} . ': ' ...

java ee - How can I display image in JSP? -

i trying display user avatar stored in db on user personal page (jsp) here do 1- have servlet processing login request , produce user bean object. (user avatar byte array ,it may appear multiple times on different pages , locations that's why prefer session attribute rather read them each time db) 2- user bean stored in session attribute. 3- want have jsp or servlet display byte array avatar image anytime. 4- whish servlet reusable other icon images, that's why think can not rely on session attributes pass byte array? (i not quite sure this) so there design achieve want ? or should use session attributes pass data around? thanks how can display image in jsp? using html <img> element. is there design achieve want? you create standalone servlet that. it's 2 or 3 lines of code in doget() method. true, servlet not reuseable streaming images straight db, create one. isn't major problem imho. or should use session at...

discovery - WCF: How to set AnnouncementService only receive localhost on/off line message -

i create wcf-lib, want interprocess communication. when open app, use lib, announce each other. use udpannouncementendpoint, work. receive announcement intranet. can ? and create endpoint code this: private void actioninitclientservice() { // create clientselt servicehost _clientservicehost = new servicehost(_clientinstance); _clientservicehost.addserviceendpoint((typeof (iclientservice)), new netnamedpipebinding(), info.address); // make client discoverable via udp // , broadcast online announcement _clientservicehost.addserviceendpoint(new udpdiscoveryendpoint()); var discoverybehavior = new servicediscoverybehavior(); discoverybehavior.announcementendpoints.add(new udpannouncementendpoint()); _clientservicehost.description.behaviors.add(discoverybehavior); _clientservicehost.opened += onopenedclientservicehost; _clientservicehost.closed += onclosedclientservicehost; } and ...

javascript - Bind click handler to all elements except those of a certain HTML tag -

so have page setup lets expend text boxes upon click: http://hashtag.ly/#nascar it adds 'active' class elements upon click , removes if click text box. i'd remove class if click on red background. i'll want add elements page shortly it's important removal comes clicking red portion <body> element. so here's have on page now: (note log replaced removal of class) $('*:not(li)').click(function(){ console.log('foo') }); the problem logs 'foo' everywhere click, directly on text boxes li elements. how can make work upon click of background? thanks! your problem you're bubbling down html stack. putting handler on everything , if click on li, event bubble ul. similarly, $('body') cause bubbling issues. you're best off creating div outside of main stack handle this. imagine absolutely positioned div behind of page. if want have everything fire except li, code need more this: $('*:n...

javascript - using .css('display')=="none" in Internet Explorer -

i'm trying test something's visibility with $(this).css('display')=="none"; the problem is, works in chrome, ff...but not in ie. i've tried ie 8 , 9 far. does know work around? frustrating bunch of people still use ie , don't want lose bunch of people. use $(this).is(":visible") cross-browser solution. from docs: elements considered visible if consume space in document. visible elements have width or height greater zero. elements visibility: hidden or opacity: 0 considered visible, since still consume space in layout. read more: http://api.jquery.com/visible-selector/ , how tell if element visible

Word 2003 vba cannot change bookmark font -

the following code not work objdoc.bookmarks("somebookmark").range.font.bold = true objdoc.bookmarks("somebookmark").range.text = getsometext() objdoc.bookmarks("somebookmark").range.font.bold = true when run code text retrieved getsometext() still has default font. why don't style bookmarks? searched in past , didn't find proper solution then. however, since bookmark represents fixed field in text template, format shouldn't change easily. i'm sorry put in reply field, can't find "comment" button :-s