A simple workaround is to insert a blank line at the start of the page like so:

Problem solved :)
C:\jboss-4.2.2.GA\bin\run.bat -b 0.0.0.0
C:\jboss-4.2.2.GA\bin\run.bat
C:\jboss-4.2.2.GA\bin\run.bat -b 192.168.1.11
Say if you have an EJB3 entity bean named Landmark which is mapped to a table called landmarks which has 2 columns longitude & latitude (amongst others). To query a given latitude & longitude, its a good idea to relax the query a bit by using BETWEEN.
An example is shown below where we allow a tolerance of 0.00003 for both latitude & longitude. The sample shown is an excerpt from an EJB3 entity bean, right before its class declaration.
@Entity
@Table(name = "landmarks")
@NamedQueries( {
@NamedQuery(
name = "Landmark.findByCoordinates",
query = "SELECT lgr FROM Landmark lgr " +
"WHERE lgr.latitude BETWEEN (?1 - 0.00003) AND (?1 + 0.00003) " +
"AND lgr.longitude BETWEEN (?2 - 0.00003) AND (?2 + 0.00003) ")
})
public class Landmark implements Serializable {
NMEA | Decimal | |
latitude | 0302.78469 | 03 + (02.78469/60) = 3.046412 |
longitude | 10141.82531 | 101 + 41.82531/60) = 101.6971 |
import static org.junit.Assert.*;
import org.junit.Test;
public class BaitTest {
@Test
public void printNegativeByte() {
byte baitValue;
int intValue;
baitValue = 0;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = 1;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = 126;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = 127;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
// baitValue = 128;
// intValue = baitValue & 0xFF;
// System.out.println(baitValue + " byte = " + intValue + " int");
// baitValue = -129;
// intValue = baitValue & 0xFF;
// System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = -128;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = -127;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = -2;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
baitValue = -1;
intValue = baitValue & 0xFF;
System.out.println(baitValue + " byte = " + intValue + " int");
}
}
import static org.junit.Assert.*;
import org.junit.Test;
public class HeksTest {
@Test
public void printHex() {
byte[] bs = {
(byte)0xCA,
(byte)0x00,
(byte)0x00,
(byte)0x16,
(byte)0x04
};
int[] parameterArray = new int[5];
parameterArray[0] = bs[0];
parameterArray[1] = bs[1];
parameterArray[2] = bs[2];
parameterArray[3] = bs[3];
parameterArray[4] = bs[4];
StringBuffer sb = new StringBuffer();
String hexString = "";
for (int i = 0; i < 5; i++) {
hexString = Integer.toHexString(0xFF & parameterArray[i]).toUpperCase();
if (hexString.length() == 1) {
// i.e. if its "4" then print out as "04"
sb.append("0");
}
sb.append(hexString);
sb.append(" ");
}
int length = sb.length();
sb.setLength(length - 1);
hexString = sb.toString();
System.out.println("address (hex) = [" + hexString + "]");
assertTrue("CA 00 00 16 04".equals(hexString));
hexString = null;
}
}
toHexString
method used here. Also, the array element conversion uses 0xFF
to ensure that negative values are converted properly.
hexString = Integer.toHexString(0xFF & parameterArray[i]).toUpperCase();
import static org.junit.Assert.*;
import org.junit.Test;
public class BaitTest {
@Test
public void printInt() {
byte[] bs = {
(byte)0x00,
(byte)0x00,
(byte)0x00,
(byte)0x16,
(byte)0x04
};
int address = (bs[0] << 32) | (bs[1] << 24) |
(bs[2] << 16) | (bs[3] << 8) | bs[4];
System.out.println("address (int) = [" + address + "]");
System.out.printf("address (hex) = [%X]\n", address);
assertTrue(5636 == address);
}
}
int address = (bs[0] << 32) | (bs[1] << 24) |
(bs[2] << 16) | (bs[3] << 8) | bs[4];
System.out.printf("address (hex) = [%X]\n", address);
byte[] bs = {
(byte)0x00,
(byte)0x00,
(byte)0x00,
(byte)0x16,
(byte)0x04
};
eject /dev/cdrom
find / -name 'eject' -print
public void createPartControl(Composite parent)
// This will produce an "Invalid thread access" error
Thread thread = new Thread(new WeatherData());
parent.getDisplay().syncExec(new WeatherData());
mc.receive()line in following code snippet :
if (url.startsWith("sms://")) {
MessageConnection mc = (MessageConnection) Connector.open(url);
Message msg = mc.receive();
String data = "";
if (msg != null) {
if (msg instanceof TextMessage) {
form.append("TextMessage\n");
data = ((TextMessage)msg).getPayloadText();
}
}
}
MIDlet-Push-1: sms://8033, org.whatever.Poink, *
MIDlet-Push-1: sms://:8033, org.whatever.Poink, *
... p(Q|P) is the proportion of things that have property Q and property P
within all things that have P; i.e.,
the proportion of women with breast cancer and a positive mammography within
the group of all women with positive mammographies.
If there are
641 women with breast cancer and positive mammographies,
7915 women with positive mammographies, and
89,031 women,
then p(Q&P) is the probability of getting one of those 641 women
if you're picking at random from the entire group of 89,031,
while p(Q|P) is the probability of getting one of those 641 women
if you're picking at random from the smaller group of 7915.
In a sense, p(Q|P)really means p(Q&P|P), but specifying the extra P all the
time would be redundant. You already know it has property P, so the property
you're investigating is Q - even though you're looking at the size of group
Q&P within group P, not the size of group Q within group P (which would be
nonsense).
This is what it means to take the property on the right-hand side as given;
it means you know you're working only within the group of things that have
property P. When you constrict your focus of attention to see only this
smaller group, many other probabilities change. If you're taking P as given,
then p(Q&P) equals just p(Q) - at least, relative to the group P.
The old p(Q), the frequency of
"things that have property Q within the entire sample",
is revised to the new frequency of
"things that have property Q within the subsample of things that have property P".
If P is given, if P is our entire world, then looking for Q&P
is the same as looking for just Q.