Posts

c# - Calling WCF service hosted in Forms Authentication site from a Windows Service -

we have windows service process continually processing messages microsoft messaging queue. when acting upon these messages, calling methods wcf service. that wcf service hosted in asp.net web site not has wcf services end-user front end. generally, wcf methods modifying in-memory data structures, , front end reading them. data being modified , clients need notified of changes immediately. (we using signalr.) everything working great long asp.net site using windows integrated authentication. required front end use forms authentication. this, of course, broke wcf binding. previous binding was: <basichttpbinding> <binding name="basichttpbinding_isessionwebservice"> <security mode="transport"> <transport clientcredentialtype="windows" /> </security> </binding> </basichttpbinding> front-end users not need able call services. (in fact, should not able to.) ideally, i'd wcf serv...

php - Ubuntu Error and Email from Cron? -

i have been trying figure out whats going on here... have looked on , nothing seems solid solution. if knows link or information on how fix appreciated. ubuntu 14.04 lts microsoft azure server apache drupal site apc enabled (everything looks on drupal side) keep getting these annoying emails below issue. i added smtp , mailutils server, , getting these errors looks apache / php... -- cron [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime) php warning: php startup: unable load dynamic library '/usr/lib/php5/20121212/apc.so' - /usr/lib/php5/20121212/apc.so: cannot open shared object file: no such file or directory in unknown on line 0 thanks help, -frank these being generated /etc/cron.d/php5 cronjob. if want errors generated here stop being emailed, can set mailto="" on line before command in file. not...

testing - Rails Integration Test -

i taking rails class , stuck on integration test. have made simple app user can use share link website. want create test will: get amount of links in database post new link check number of links has increased 1. here have far: test "posts new link , check count" @link = links.all "/links/new" post_via_redirect "/links/new", :url => links(:test_link).url, :description => links(:test_link).description assert_equal '/links/new', path assert_difference("link.count",n) i know doesn't work cannot figure out wording/syntax , appreciate nod in right direction. please let me know if should include other information. this simple. assume use minitest functional tests. the test cases should wrapped class mylinkscontrollertest < actiondispatch::integrationtest mylinkscontrollertest should have same name actual controller. get amount of links in database. test 'should index page...

css - Can't hover over jquery toggled submenu -

i built menu jquery, 4 category buttons on top menu triggering 4 submenus below. works fine, submenus appearing , changing when hover on button, can't hover on submenu, it's dissappearing when "leave" trigger button. jsfiddle example (sorry messy code, can't reproduce entire composition in fiddle, copy-pasted important parts , issue same on site seen on example) this jquery submenu calls: ('active' , 'rotated' changing icons/rotating text on trigger buttons, these triangles , did jquery fanciness them, hope it's still understandable) $('.leisuremenu').hover(function () { $('.leisure_menu').toggleclass('show_menu'); $('.luxury_menu').toggleclass('show_menu'); $('.select-luxury').toggleclass('active'); $('.select-corporate').toggleclass('rotated'); $('.select-luxury').toggleclass('rotated'); }); $('.corporatemenu').hover...

javascript - Accessibility of outside variable within a promise in nodejs -

can explain me why don´t work: var outsidevar = 15; myfunc.dosomething().then(function() { console.log("outsidevar: " + outsidevar); }).fail(function(err) { console.log("error: ", err); }); the output error: undefined or outsidevar: undefined (depends if outsidevar variable or property of object. an outside variable should accessible inside function or i´m wrong? edit: i´m using construction spookyjs , seems there issue objects containing long strings. in nodejs, use function error. so: mypromise.then(function() { // callback, executed on successful promise resolution }, function() { // errback, executed on rejection }, function() { // progressback, executed if promise has progress report }); .fail() isn't recognizable function in node, unless have defined .fail() function explicitly. .fail() throwing undefined error. .fail() in nodejs used building unit tests, not promises. https://nodejs.org/api/assert.html otherwise, writt...

drupal - Add user role based on Profile2 Field Using Rules -

what trying achieve is: 1) have profile2 field in user registration form called: "firm type" 2) need assign new user role based on selection in field. i have tried following: event: after saving new account condition: data comparison: account:profile-additional-registration-info:field-profile-firm-type action: add user role the above rule works fine when remove condition. add condition rule not work. digging found out rule gets executed after account saved , before profile2 saved. i looked online find these 2 links helpful: https://www.drupal.org/node/1872384 https://www.drupal.org/node/2009878 1 suggestion was: event: after saving new profile condition: data comparison: profile2:field action: heres problem -- cannot account level because on profile event. could please me figure out. appreaciated! thanks! here steps: rules event : after adding new profile after updating existing profile rules condition : negate user has roles: check roles o...

Matlab plot: line is not smooth -

i use matlab on osx retina display. when plot points (or line, function), points (or line) not smooth, no matter size x-step choose. but when try resize manually figure window (when plot changes dimensions on screen), points (or line) instantaneously become smoother , better defined. does know how can obtain smooth plot without resizing figure window ? thanks