How to setup MSMQ server so that it can be accessed over the Internet
We have MSMQ on a Windows 2008 R2 server, with the followings Firewall
settings: 1) Message Queuing is checked in 'Allow programs to communicate
through Windows Firewall' 2) Enable TCP port: 2103, 2105, 1801
But when a c# application (using
FormatName:DIRECT=TCP:xxx.xxx.xxx.xxx\Private$\q1) attempts to receive the
private queue message, it encountered the following error:
System.Messaging.MessageQueueException: Remote computer is not available.
at System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle()
Is something amiss from the above setup? Please help.........
Thanks, Ben
Thursday, 3 October 2013
Wednesday, 2 October 2013
IOS guided access - can app know it is in guided access mode?
IOS guided access - can app know it is in guided access mode?
I am developing an IOS app for a class room environment - conducting a
test. I have a requirement that the app should not come out during the
test. Guided access is a perfect solution for me, since I can force users
(students) to turn the device to guided access mode.
What I want is like this: Only after the device is set into guided access
mode, the app will proceed from a particular screen. Is it possible for
the app to know (programmatically) whether the device is in guided access
mode at any point in time? Any documentation available on this?
Thanks in advance for your help
I am developing an IOS app for a class room environment - conducting a
test. I have a requirement that the app should not come out during the
test. Guided access is a perfect solution for me, since I can force users
(students) to turn the device to guided access mode.
What I want is like this: Only after the device is set into guided access
mode, the app will proceed from a particular screen. Is it possible for
the app to know (programmatically) whether the device is in guided access
mode at any point in time? Any documentation available on this?
Thanks in advance for your help
xcb: how to launch an and show it into a window
xcb: how to launch an and show it into a window
I'm trying to implement a basic window manager using xcb library.
I managed to connect with X server, and grab some events, but i cannot
figure how to launch an application and show it inside the current X
session.
I'm trying to follow the xcb tutorial: http://xcb.freedesktop.org/tutorial/
Basically i thought (and probaly i'm wrong) that once the session is
started, with my "windowmanager", if i want to launch an application i
just have to fork it, and launch the application, so for example:
int child = fork();
if(child==0) {
printf("Child");
execve("/usr/bin/xterm", NULL, NULL);
}
But it seems that didn't work.
I have no much code to show, since i'm trying just to modify che code in
the tutorial pasted above (i added an infinite loop, and few other thing).
So how to launch an x application like xterm, pcmanfm and show it on the
current x session?
I'm trying to implement a basic window manager using xcb library.
I managed to connect with X server, and grab some events, but i cannot
figure how to launch an application and show it inside the current X
session.
I'm trying to follow the xcb tutorial: http://xcb.freedesktop.org/tutorial/
Basically i thought (and probaly i'm wrong) that once the session is
started, with my "windowmanager", if i want to launch an application i
just have to fork it, and launch the application, so for example:
int child = fork();
if(child==0) {
printf("Child");
execve("/usr/bin/xterm", NULL, NULL);
}
But it seems that didn't work.
I have no much code to show, since i'm trying just to modify che code in
the tutorial pasted above (i added an infinite loop, and few other thing).
So how to launch an x application like xterm, pcmanfm and show it on the
current x session?
Implement Shapes in android
Implement Shapes in android
I need to implement paint functionalities in android.Shapes,Tools,Color
etc.How i do in android.Plz help me. Thanks in advance.
I need to implement paint functionalities in android.Shapes,Tools,Color
etc.How i do in android.Plz help me. Thanks in advance.
Tuesday, 1 October 2013
Simple multiple choice Java code
Simple multiple choice Java code
I'm looking for an example of Java code for multiple choice questions
that's as simple as possible. I have the Eclipse IDE but most codes I find
online don't work because they don't have the System.out.println function.
I'm looking for an example of Java code for multiple choice questions
that's as simple as possible. I have the Eclipse IDE but most codes I find
online don't work because they don't have the System.out.println function.
Matching specific Apache VirtualHost with regex
Matching specific Apache VirtualHost with regex
I am currently attempting to match a single Apache VirtualHost entry
within an apache config file by the ServerName of the VirtualHost. I am
doing this with python, using the re module.
Here's an example of the type of file that I am working with:
<VirtualHost *:8000>
DocumentRoot "/path/to/dir1"
ServerName eg1.dev
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/path/to/docroot"
ServerName desired.dev
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "/path/to/dir3"
ServerName eg2.dev
</VirtualHost>
I want to match the VirtualHost with a ServerName of desired.dev. So the
match I am aiming for is:
<VirtualHost *:80>
DocumentRoot "/path/to/docroot"
ServerName desired.dev
</VirtualHost>
I assumed this would be fairly simple with a regex but I can't figure out
how to do it. I currently have:
<VirtualHost \*:[0-9]*>.*?ServerName +desired.dev.*?</VirtualHost>
But the issue with this being that it matches the very first
<VirtualHost..., matches the ServerName and stops matching at the end of
the closing tag of the desired VirtualHost.
I'm aware that there are probably python modules for parsing Apache config
files but I do not wish to use anything from outside of the standard
library. If attempting this with regex is a terrible idea, are there any
alternatives?
I am currently attempting to match a single Apache VirtualHost entry
within an apache config file by the ServerName of the VirtualHost. I am
doing this with python, using the re module.
Here's an example of the type of file that I am working with:
<VirtualHost *:8000>
DocumentRoot "/path/to/dir1"
ServerName eg1.dev
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/path/to/docroot"
ServerName desired.dev
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "/path/to/dir3"
ServerName eg2.dev
</VirtualHost>
I want to match the VirtualHost with a ServerName of desired.dev. So the
match I am aiming for is:
<VirtualHost *:80>
DocumentRoot "/path/to/docroot"
ServerName desired.dev
</VirtualHost>
I assumed this would be fairly simple with a regex but I can't figure out
how to do it. I currently have:
<VirtualHost \*:[0-9]*>.*?ServerName +desired.dev.*?</VirtualHost>
But the issue with this being that it matches the very first
<VirtualHost..., matches the ServerName and stops matching at the end of
the closing tag of the desired VirtualHost.
I'm aware that there are probably python modules for parsing Apache config
files but I do not wish to use anything from outside of the standard
library. If attempting this with regex is a terrible idea, are there any
alternatives?
Hint to prove that $\phi^n + \phi'^n$ is an integer. math.stackexchange.com
Hint to prove that $\phi^n + \phi'^n$ is an integer. – math.stackexchange.com
I was solving some induction exercises but I found this that I could not
solve. Let $n \in \mathbb{N}$, prove that $\phi^n + \phi'^n$ is an integer
where $\phi=\frac{1+\sqrt{5}}{2}$ and ...
I was solving some induction exercises but I found this that I could not
solve. Let $n \in \mathbb{N}$, prove that $\phi^n + \phi'^n$ is an integer
where $\phi=\frac{1+\sqrt{5}}{2}$ and ...
How can I calculate sum of multichoose multiplied by its argument?
How can I calculate sum of multichoose multiplied by its argument?
I need to calculate sum like this:
$\sum\limits_{k=1}^n k\textstyle\left(\!\!{n\choose k}\!\!\right)$
WolframAlpha is giving nice answer: $n{2n \choose n+1}$ But I don't know
how to prove this result.
Analogous expression for simple binomial coefficients:
$\sum\limits_{k=1}^n k{n\choose k} = n \cdot 2^{n-1}$
can be easily proved by taking derivative of $(1+x)^n$ and setting $x$ to
$1$ after that. But for multichoose I'm dealing with infinite series
$(1-x)^{-n} = \sum\limits_{k=0}^\infty {n-1+k\choose k} x^k$
and solution with setting $x$ to something won't work, I believe.
I need to calculate sum like this:
$\sum\limits_{k=1}^n k\textstyle\left(\!\!{n\choose k}\!\!\right)$
WolframAlpha is giving nice answer: $n{2n \choose n+1}$ But I don't know
how to prove this result.
Analogous expression for simple binomial coefficients:
$\sum\limits_{k=1}^n k{n\choose k} = n \cdot 2^{n-1}$
can be easily proved by taking derivative of $(1+x)^n$ and setting $x$ to
$1$ after that. But for multichoose I'm dealing with infinite series
$(1-x)^{-n} = \sum\limits_{k=0}^\infty {n-1+k\choose k} x^k$
and solution with setting $x$ to something won't work, I believe.
Subscribe to:
Posts (Atom)