Thursday, 3 October 2013

Create human task in WSO2 process server

Create human task in WSO2 process server

I need to create human task in my BPEL process. But i couldn't find any
tutorial in WSO2 to create human task. Can anyone suggest me some tutorial
for this.

Wednesday, 2 October 2013

What is the difference between the following c++ constructors?

What is the difference between the following c++ constructors?

I've seen c++ class constructors initialize members in two different ways,
but with the same effect. Suppose we have a simple class:
class myClass
{
public:
myclass();//default constructor
private:
int a;
int b;
bool c;
};
Case 1:
myClass::myClass()
/* Default constructor */
{
a=5;
b=10;
c=true;
//do more here
}
Case 2:
myClass::myClass()
/* Default constructor */
:a(5),
b(10),
c(true)
{
//do more in here
}
What is the difference between the two after it compiles? Even if there is
no difference, is there a "preferred" way of doing it?

ArrayList to toString()

ArrayList to toString()

Im having trouble printing the ArrayList through to the toString. It says
that I can not convert an ArrayList to an String. Here my code if anyone
can help.
package edu.purse.test;
import java.util.ArrayList;
public class Purse
{
ArrayList<String> coins = new ArrayList<String>();
public Purse()
{
}
public void addCoin(String coinName)
{
coins.add(coinName);
}
public String toString()
{
return coins;
}
}
package edu.purse.test;
public class PurseTester {
public static void main(String[] args) {
Purse p = new Purse();
p.addCoin("Quarter");
p.addCoin("Dime");
System.out.println(p.toString());
}
}

xcode openURL maps.apple.com current location to destination

xcode openURL maps.apple.com current location to destination

As a newbie im finding it fun learning Xcode. I have created a button that
when pushed opens a url which is actually opening the apple.maps and
plotting a route using this code:
-(IBAction)pushButton{
UIApplication *app = [UIApplication sharedApplication];
[app openURL:[NSURL
URLWithString:@"http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino"]];
}
Im looking for the string to use use the users current location for the
starting point and then a specified address for the destination?

Tuesday, 1 October 2013

I am a beginner python programmer. Assistance needed please

I am a beginner python programmer. Assistance needed please

lightcolor=int(input("Enter
Red,Green,Yellow,White,Purple,Blue,Orange,Brown,or Black->"))
if lightcolor=="Red":
print("Red Light-Please stop!!")
elif lightcolor=="Green":
print("Green Light-Please continue")
elif lightcolor=="Yellow":
print("Yellow Light-speed up")
elif lightcolor=="White":
print("White Light-its too bright")
elif lightcolor=="Purple":
print("Purple Light-pretty")
elif lightcolor=="Blue":
print("Blue Light-thats unusual")
elif lightcolor=="Orange":
print("Orange Light-bright as the sun")
elif lightcolor=="Brown":
print("Brown Light-like dirt")
elif lightcolor=="Black":
print("Black Light-very dark")
else: print("Sorry no such color"),lightcolor
strong text Why do i get a invalid literal for int() with base error every
time i input any color?

Can I easily override an (STL) iterator's category?

Can I easily override an (STL) iterator's category?

Right now, I have a class that can satisfy an API requirement with a
random-access iterator. However, I can envision a situation where the
implementation will change and only a forward iterator can be provided.
Therefore, I would like to restrict callers from using the random-access
functionality. I know I can write my own implementation (e.g.
restricted_bar_iterator), but was wondering if there is anything simpler
(i.e. requiring less coding).
class BAR { ... };
class FOO {
public:
// Bad...clients may expect 'bar_iterator' to be random access...
typedef std::vector<BAR>::iterator bar_iterator;
bar_iterator begin_bar() const;
bar_iterator end_bar() const;
// Possible solution here!
class restricted_bar_iterator :
public std::iterator< std::forward_iterator_tag, BAR > { ... };
};
void baz()
{
FOO foo;
bar_iterator it = foo.begin_bar() + 5; // want a compile time error here!
}

Ubuntu 12.04 desktop loads pretty slow after password entry

Ubuntu 12.04 desktop loads pretty slow after password entry

Well, I have an Ubuntu 12.04 running on a Core i7 laptop, with an SSD
disk. The laptop is a dual-boot. I experience a very large delay between
the password entry and the Desktop showing up. In general, the process
looks like this:
Grub loads fast.
I choose Ubuntu from the list.
Password prompt loads fast.
I enter the password for my user. The computer kinda hangs. The Wifi is
flashing, but the hard drive light is not flashing a lot. This takes about
30-40 seconds.
The Desktop loads in a flash
I've experienced this issue in the past, with my standard HDD. Then I
removed UbuntuOne as advised in a thread that I've seen. This seems to
have helped for a while. Then I migrated to the SSD. The computer loaded
pretty fast for a while, then this started happening. I don't think that
it is related to the SSD, though.
I'm adding a link to a bootchart image:
http://i.imgur.com/ew97ZO6.png
Thank you for your time.