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.
Monday, 30 September 2013
Jordan type representation for sequences with bounded variation
Jordan type representation for sequences with bounded variation
We say that a sequence $(x_n)$ of real numbers is of bounded variation iff
$ \sum_{n=1}^\infty |x_{n}-x_{n-1}|<\infty$ (where $x_0:=0$).
Let $(x_n)$ be convergent to zero.
Do there exist monotonic convergent to zero sequences $(a_n)$, $(b_n)$
such that $x_n=a_n-b_n$ ?
Thanks
We say that a sequence $(x_n)$ of real numbers is of bounded variation iff
$ \sum_{n=1}^\infty |x_{n}-x_{n-1}|<\infty$ (where $x_0:=0$).
Let $(x_n)$ be convergent to zero.
Do there exist monotonic convergent to zero sequences $(a_n)$, $(b_n)$
such that $x_n=a_n-b_n$ ?
Thanks
How can I find out the very first time linux machine start up=?iso-8859-1?Q?=3F_=96_serverfault.com?=
How can I find out the very first time linux machine start up? –
serverfault.com
When we use uptime, it only shown us the up-time of ours machine since it
started from the last time it turning on/shutdown/reboot. But, what if I
want to get the time when our machine started from …
serverfault.com
When we use uptime, it only shown us the up-time of ours machine since it
started from the last time it turning on/shutdown/reboot. But, what if I
want to get the time when our machine started from …
CSS Text overflow not working because word-break
CSS Text overflow not working because word-break
If a write this sentence in a width 90px and height 20px with text
overflow property:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
will display:
aaaaaaaaaaaaaa...
the text-overflow property will work, but if the sentence is:
T H I S I S A S E N T E N C E
it will display:
T H I S I S A
S E N T E N C
E
the line will break and the text-overflow property won't work.
How can I get this to work correctly?
If a write this sentence in a width 90px and height 20px with text
overflow property:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
will display:
aaaaaaaaaaaaaa...
the text-overflow property will work, but if the sentence is:
T H I S I S A S E N T E N C E
it will display:
T H I S I S A
S E N T E N C
E
the line will break and the text-overflow property won't work.
How can I get this to work correctly?
android facebook logout issues
android facebook logout issues
I have implemeted code for facebook connection to post message on wall ,
refere from this link https://github.com/facebook/facebook-android-sdk ...
every thing is working fine...
Now my issues is when I do logout() it is showing me logout successfully ...
private void clearCredentials() {
try {
facebookConnector.getFacebook().logout(getApplicationContext());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
but when next time open an app ... it is not logged out.... Thanks in
advance...
I have implemeted code for facebook connection to post message on wall ,
refere from this link https://github.com/facebook/facebook-android-sdk ...
every thing is working fine...
Now my issues is when I do logout() it is showing me logout successfully ...
private void clearCredentials() {
try {
facebookConnector.getFacebook().logout(getApplicationContext());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
but when next time open an app ... it is not logged out.... Thanks in
advance...
Sunday, 29 September 2013
Is Python list.extend() Order Presserving?
Is Python list.extend() Order Presserving?
I'm wondering whether the extend function preserves the order in the two
list.
>> list = [1, 2, 3]
>> list.extend([4, 5])
>> list
[1, 2, 3, 4, 5]
Is extend always working like that way?
I'm wondering whether the extend function preserves the order in the two
list.
>> list = [1, 2, 3]
>> list.extend([4, 5])
>> list
[1, 2, 3, 4, 5]
Is extend always working like that way?
Carousel effect for Joomla 3.1.5
Carousel effect for Joomla 3.1.5
Sorry for my ignorance but I am new in Joomla and I would need to add a
similar effect to this example
http://www.2joomla.net/joomla-extensions/2j-carousel/2j-carousel-demo-case2
For it, Could anybody help me with that?
Sorry for my ignorance but I am new in Joomla and I would need to add a
similar effect to this example
http://www.2joomla.net/joomla-extensions/2j-carousel/2j-carousel-demo-case2
For it, Could anybody help me with that?
Installation problems with Debian and ubuntu
Installation problems with Debian and ubuntu
I'm trying to install Debian 7.1 on my PC, but keep getting the following
error "This program doesn't support windows 6.2.9200 SP0 yet". I've tried
version 7.0 too, but got the same error.
My attempts to install ubuntu have been similarly unsuccessful. I
downloaded ubuntu 13.04 and when I attempt to install it, while it says it
is downloading I have been getting "An error ocurred: Permission denied.
For more information, please see the log file
c:\users...\appdata\local\temp\wubi-13.04-rev279.log" but when I look for
this file, it doesn't seem to exist.
My PC came with Windows 8 preinstalled. I'm not sure if there's any other
information I should provide, but if there is please let me know. I've
been stumbling around clumsily for the past two days, and really don't
have any idea how I should proceed.
I'm trying to install Debian 7.1 on my PC, but keep getting the following
error "This program doesn't support windows 6.2.9200 SP0 yet". I've tried
version 7.0 too, but got the same error.
My attempts to install ubuntu have been similarly unsuccessful. I
downloaded ubuntu 13.04 and when I attempt to install it, while it says it
is downloading I have been getting "An error ocurred: Permission denied.
For more information, please see the log file
c:\users...\appdata\local\temp\wubi-13.04-rev279.log" but when I look for
this file, it doesn't seem to exist.
My PC came with Windows 8 preinstalled. I'm not sure if there's any other
information I should provide, but if there is please let me know. I've
been stumbling around clumsily for the past two days, and really don't
have any idea how I should proceed.
I am facing database error in cpanel, what i can do?
I am facing database error in cpanel, what i can do?
My CodeIgniter database setting is:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'empyreal_username';
$db['default']['password'] = 'password';
$db['default']['database'] = 'empyreal_dbname';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
but it shows the following error:
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
What can i do? please suggest me
My CodeIgniter database setting is:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'empyreal_username';
$db['default']['password'] = 'password';
$db['default']['database'] = 'empyreal_dbname';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
but it shows the following error:
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
What can i do? please suggest me
Saturday, 28 September 2013
How to display the current live wallpaper inside an application?
How to display the current live wallpaper inside an application?
How do you display the user's live wallpaper inside your application?
Since live wallpapers are more than just videos, I am unsure as to where
to start on this one, but I do know that it is possible.
How do you display the user's live wallpaper inside your application?
Since live wallpapers are more than just videos, I am unsure as to where
to start on this one, but I do know that it is possible.
Project on How To Design a Web Browser?
Project on How To Design a Web Browser?
I Was Interested in working on making a sample web browser
i know c++,html and java script
can any one tell me how to procedd on building it..
thank you..
I Was Interested in working on making a sample web browser
i know c++,html and java script
can any one tell me how to procedd on building it..
thank you..
What's wrong with my if-else statement? (Java)
What's wrong with my if-else statement? (Java)
I made this simple GUI program that counts the vowels and consonants of a
particular sequence of characters. The counter is okay, but I'm having a
problem with the if-else statement where I had to display a message when
that character is neither a vowel nor consonant... Here's the code:
//I initialized these variables:
public static int vowels = 0, consonants = 0, charac = 0;
public static String outputStr;
public static String conso = "bcdfghjklmnpqrstvwxyz";
public static String vow = "aeiou";
//Here's the code for my "count" button
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String userInput = jTextField1.getText();
userInput = userInput.toUpperCase();
conso = conso.toUpperCase();
vow = vow.toUpperCase();
String wordInput[] = userInput.split("");
vowels = 0;
consonants = 0;
charac = 0;
for(int i=0; i<wordInput.length; i++) {
for(int j=0; j<5; j++) {
char v = vow.charAt(j);
String VL = Character.toString(v);
if(VL.equals(wordInput[i])) {
vowels ++;
charac = 0;}
else {
charac += 1; }
}
for(int h=0; h<21; h++) {
char c = conso.charAt(h);
String CL = Character.toString(c);
if(CL.equals(wordInput[i])) {
consonants ++;
charac = 0; }
else {
charac += 1; }
}
}
String totalVow = Integer.toString(vowels);
String totalCons = Integer.toString(consonants);
jLabel5.setText(totalVow);
jLabel6.setText(totalCons);
//here's the if-else statement:
if (charac == 0) {
jLabel7.setText(" ");
}
else if (charac >= 1) {
jLabel7.setText("The sequence contains invalid characters.");
}
if (userInput.isEmpty()) {
jLabel7.setText("No input.");
}
}
Here's what it looks like:
I entered a "sequence" of characters that does not have any special
characters or digits. But it still displays the message wherein it has
other characters other than the vowels and consonants. Is there something
wrong with the if-else statement? Thanks for the help :)
I made this simple GUI program that counts the vowels and consonants of a
particular sequence of characters. The counter is okay, but I'm having a
problem with the if-else statement where I had to display a message when
that character is neither a vowel nor consonant... Here's the code:
//I initialized these variables:
public static int vowels = 0, consonants = 0, charac = 0;
public static String outputStr;
public static String conso = "bcdfghjklmnpqrstvwxyz";
public static String vow = "aeiou";
//Here's the code for my "count" button
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String userInput = jTextField1.getText();
userInput = userInput.toUpperCase();
conso = conso.toUpperCase();
vow = vow.toUpperCase();
String wordInput[] = userInput.split("");
vowels = 0;
consonants = 0;
charac = 0;
for(int i=0; i<wordInput.length; i++) {
for(int j=0; j<5; j++) {
char v = vow.charAt(j);
String VL = Character.toString(v);
if(VL.equals(wordInput[i])) {
vowels ++;
charac = 0;}
else {
charac += 1; }
}
for(int h=0; h<21; h++) {
char c = conso.charAt(h);
String CL = Character.toString(c);
if(CL.equals(wordInput[i])) {
consonants ++;
charac = 0; }
else {
charac += 1; }
}
}
String totalVow = Integer.toString(vowels);
String totalCons = Integer.toString(consonants);
jLabel5.setText(totalVow);
jLabel6.setText(totalCons);
//here's the if-else statement:
if (charac == 0) {
jLabel7.setText(" ");
}
else if (charac >= 1) {
jLabel7.setText("The sequence contains invalid characters.");
}
if (userInput.isEmpty()) {
jLabel7.setText("No input.");
}
}
Here's what it looks like:
I entered a "sequence" of characters that does not have any special
characters or digits. But it still displays the message wherein it has
other characters other than the vowels and consonants. Is there something
wrong with the if-else statement? Thanks for the help :)
Convert Integer value to ip address in C
Convert Integer value to ip address in C
How to convert Integer value to IPaddress? i am having int value=570534080
and want to convert as 192.168.1.34
How to convert Integer value to IPaddress? i am having int value=570534080
and want to convert as 192.168.1.34
Subscribe to:
Posts (Atom)