Getting rid of the annoying Samsung keyboard on S3 and using Swype

If you, like me, is passing through the Galxy S or S2 transition to S3, you probably already felt the annoying errors the Samsung Keyboard has, specially for non english languages!
But fear not! Swype is still here and is not a lot of work to get it back on your phone! Here´s what you have to do:

1- Go to Swype Homepage, click on Get Swype;
2- Click on the Download Swype Beta (It´s beta, but it´s much better than Samsung´s);
3- You will need to register to their site in order to get it, when they ask for you e-mail address register the one you already have configured on your S3;
4- Go to your phone and on Settings->Security at the Device Administration session enable Unknown Sources, this will enable you to install the Swype! This is not a Google Play certified app.
5- They will send you an e-mail with a link that enables a download, you have to tap it from your phone.
6- Download and install the app;
7- Now make it default by going to Settings -> Language and input, enable Swype Beta if t´s not already by tapping it, now tap on Default and tap Swype Beta!

That´s it!

Thank you for reading!

Advertisements

Xpath Predicates

Xpath has predicates. Predicates are, according to the W3schools, used to find a specific node or a node that contains a specific value.
Predicates are always embedded in square brackets.
Consider the following structure:

<shop>
	<car>
		<name>fusca</name>
		<color>blue</color>
		<price>5000</price>
	</car>
	<car>
		<name>captiva</name>
		<color>red</color>
		<price/>
	</car>
	<car>
		<name>veracruz</name>
		<color/>
		<price>150000</price>
	</car>
</shop>

Using predicates to select:

• Cars have price < 7,000.00

/shop/car[price < 7000]

Result:

	<car>
		<name>fusca</name>
		<color>blue</color>
		<price>5000</price>
	</car>

• Cars have color = red

/shop/car[color = ‘red’]
Result:

<car>
    <name>captiva</name>
    <color>red</color>
    <price/>
</car>

If you´d want to select all characteristics´s car, but those characteristics can´t be empty, what could you do?

You can do this:

/shop/car/*[text() != ”]

What does it freaking mean?

That means you want all child (characteristics) of the all car node (/shop/car/*[text() != ”]), but children´s restriction is those can´t be empty. To be able that restriction, we can use predicate text(). This predicate returns node´s content, in this case, node´s content of the all car´s child (/shop/car/*[text() != ”]) . After received content, it will compare with empty (/shop/car/*[text() != ”]).

Result will be just one node:


<car>
	<name>fusca</name>
	<color>blue</color>
	<price>5000</price>
</car>

That´s all folks, thank´s!