//Проверяем, не ЗАБЫЛ ли пользователь ввести свое имя?
if (name == null || name.trim().isEmpty()) { ...
if (name.equals("Вася"))
item_name (id, name);
item_user_price(id_user, id_item, price);
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://meinMuseum.de" targetNamespace="http://meinMuseum.de"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1">
<xs:simpleType name="RestrictedString4to20">
<xs:restriction base="xs:string">
<xs:minLength value="4" />
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Autor">
<xs:simpleContent>
<xs:extension base="ns:RestrictedString4to20">
<xs:attribute name="id" type="xs:positiveInteger" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="EvenInteger">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0" />
<xs:assertion test="$value mod 2 = 0" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="HexBinary">
<xs:restriction base="xs:string">
<xs:pattern value="W[1-9a-f]+[0-9a-f]*" />
<xs:length value="10" />
</xs:restriction>
</xs:simpleType>
<xs:element name="museum">
<xs:complexType>
<xs:sequence>
<xs:element name="werk" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Buch" />
<xs:enumeration value="Multimedia" />
<xs:enumeration value="Zeitung" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="autor" maxOccurs="unbounded"
minOccurs="0" type="ns:Autor" />
<xs:element name="jahre" maxOccurs="unbounded">
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="-100" />
<xs:maxInclusive value="2012" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AB" />
<xs:enumeration value="BC" />
<xs:enumeration value="after2000" />
<xs:enumeration value="unknown" />
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:element>
<xs:element name="referenz" maxOccurs="unbounded"
minOccurs="0">
<xs:complexType>
<xs:attribute name="refid" type="ns:HexBinary"
use="required" />
</xs:complexType>
</xs:element>
<xs:element name="bearbeiter" type="ns:EvenInteger" />
</xs:sequence>
<xs:attribute name="bezeichner" type="ns:HexBinary"
use="required" />
<xs:attribute name="erfassung" use="optional" type="xs:date" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
dpkg --add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 libsdl1.2debian:i386 lib32z1
class House{
private String number; // номер дома
private String kladrCode; // код КЛАДР дома
private String entrance; // подъезд
public String getNumber(){ return this.number;}
public String getKladrCode(){ return this.kladrCode;}
public String getEntrance(){ return this.entrance;}
public void setNumber(String number){ this.number = number;}
public void setKladrCode(String kladrCode){ this.kladrCode = kladrCode;}
// и т.д.
}
class AddressParcel {
private String streetType; // название типа улицы (улица, проспект, бульвар и т.д.)
//...
private House house = null; // это не обязательно, но "хорошая практика" - явно инициализировать объектные поля статически!
// ...
public House getHouse() { return this.house;}
public void setHouse(House house) { this.house = house;}
}
String someType = someAddress.getStreetType();
String someNumber = someAddress.getHouse().getNumber();
preg_match("/\S+/", $input_line, $output_array);
byte[] arBytes;
...
ImageIcon icon = new ImageIcon(arBytes);
BufferedImage image = ImageIO.read(new ByteArrayInputStream(arBytes));
int[] arInts = {0,1,2,3,4,5,6,7,8,9};
...
BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = img.createGraphics();
g2d.setPaint(Color.red);
g2d.setFont(new Font("Serif", Font.BOLD, 18));
FontMetrics fm = g2d.getFontMetrics();
int x = 5;
for(int i : arInts){
String s = (new Integer(i)).toString();
g2d.drawString(s, x, 5);
x += fm.stringWidth(s) + 5;
}
g2d.dispose();