autodiscovery

How do I dynamically discover packages from a partial namespace in perl?

限于喜欢 提交于 2019-12-08 12:32:58
问题 I have a directory structure that looks like: Foo::Bar::Baz::1 Foo::Bar::Baz::2 etc Can I list the packages from something like: use Foo::Bar::Baz; Thanks! Edit: Made it more clear what the modules are. 回答1: Just to be clear, are you looking at random packages in random Perl code? Or for Perl modules , e.g. "a/b/c/d1.pm" with module "a::b::c::d1"? In either case, you can not use a single "use" statement to load them all. What you need to do is to find all the appropriate files, using either

Multicast Ping (Windows)

倾然丶 夕夏残阳落幕 提交于 2019-12-08 05:01:06
问题 I am trying to implement server auto discovery so that clients will be able to see a list of servers available to connect to. I would like to auto discover servers even if they are in different subnets. I have read that windows does not respond to broadcast ping, but is it possible to make all these servers to join a multicast group and use multicast ping on the group to see what servers are up? Thanks 回答1: Try Zero configuration networking (Zeroconf). Note multiple LAN segments requires

Multicast Ping (Windows)

假如想象 提交于 2019-12-07 07:13:25
I am trying to implement server auto discovery so that clients will be able to see a list of servers available to connect to. I would like to auto discover servers even if they are in different subnets. I have read that windows does not respond to broadcast ping, but is it possible to make all these servers to join a multicast group and use multicast ping on the group to see what servers are up? Thanks Try Zero configuration networking (Zeroconf) . Note multiple LAN segments requires routers to be configured to route multicast traffic, they do not by default. Similarly IGMP enabled switches

IP Autodiscovery

馋奶兔 提交于 2019-12-04 14:19:09
问题 I have to network devices: 1. Server (variable IP) that needs to receive a String for further stuff (e.g. Socket 9999). This server has also another socket (e.g. 8888) where it sends it's device name on pairing. 2. Client (variable IP) that does NOT know the IP of the server but wants to send him the string. On a IP C-network I could iterate through the last octet (0..255) and check if Socket 8888 transmits something. But on A and B networks I have no chance. Is there any other solution for

Auto detect internal/external development environment

拟墨画扇 提交于 2019-12-03 09:45:41
问题 We use the following function to auto detect if we are on a machine internally or on a live server and then choose the appropriate configs for various components: function devIsLocal(){ $res=false; $http_host=$_SERVER['HTTP_HOST']; if($http_host=='localhost')$res=true; if($http_host=='127.0.0.1')$res=true; if(substr($http_host,-4)=='.lan')$res=true; if(strpos($http_host, '.')===false)$res=true; return($res); } As you can see it only relies on the HTTP_HOST value. Of course, if you use some

IP Autodiscovery

旧时模样 提交于 2019-12-03 09:07:21
I have to network devices: 1. Server (variable IP) that needs to receive a String for further stuff (e.g. Socket 9999). This server has also another socket (e.g. 8888) where it sends it's device name on pairing. 2. Client (variable IP) that does NOT know the IP of the server but wants to send him the string. On a IP C-network I could iterate through the last octet (0..255) and check if Socket 8888 transmits something. But on A and B networks I have no chance. Is there any other solution for this? (I could iterate through all four octets but that wouldn't be an elegant solution). Thank you! The

Auto detect internal/external development environment

╄→гoц情女王★ 提交于 2019-12-03 00:20:28
We use the following function to auto detect if we are on a machine internally or on a live server and then choose the appropriate configs for various components: function devIsLocal(){ $res=false; $http_host=$_SERVER['HTTP_HOST']; if($http_host=='localhost')$res=true; if($http_host=='127.0.0.1')$res=true; if(substr($http_host,-4)=='.lan')$res=true; if(strpos($http_host, '.')===false)$res=true; return($res); } As you can see it only relies on the HTTP_HOST value. Of course, if you use some sort of virtual host locally like example.com then the function will be tricked. Are there any other ways

getting autodiscover URL from Exchange email address

放肆的年华 提交于 2019-11-30 04:49:39
I'm starting with an address for an Exchange 2007 server: user@domain.exchangeserver.org And I attempted to send an autodiscover request, as documented at MSDN . I attempted to use the generic autodiscover address documented at the TechNet White Paper . So, using curl on PHP, I sent the following request: <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"> <Request> <EMailAddress>user@domain.exchangeserver.org</EMailAddress> <AcceptableResponseSchema> http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a <

getting autodiscover URL from Exchange email address

孤人 提交于 2019-11-29 02:51:10
问题 I'm starting with an address for an Exchange 2007 server: user@domain.exchangeserver.org And I attempted to send an autodiscover request, as documented at MSDN. I attempted to use the generic autodiscover address documented at the TechNet White Paper. So, using curl on PHP, I sent the following request: <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"> <Request> <EMailAddress>user@domain.exchangeserver.org</EMailAddress>

Test discovery failure when tests in different directories are called the same

ε祈祈猫儿з 提交于 2019-11-28 18:31:26
Using py.test, two tests called the same in different directory causes py.test to fail. Why is that? How can I change this without renaming all the tests? To duplicate do: ; cd /var/tmp/my_test_module ; mkdir -p ook/test ; mkdir -p eek/test ; touch ook/test/test_proxy.py ; touch eek/test/test_proxy.py ; py.test ============================= test session starts ============================== platform linux2 -- Python 2.7.3 -- pytest-2.2.4 collected 0 items / 1 errors ==================================== ERRORS ==================================== ___________________ ERROR collecting ook/test