https://habrahabr.ru/post/170333/
[code language=”java”]
String xml = "<message>HELLO!</message>";
org.jdom.input.SAXBuilder saxBuilder = new SAXBuilder();
try {
org.jdom.Document doc = saxBuilder.build(new StringReader(xml));
String message = doc.getRootElement().getText();
System.out.println(message);
} catch (JDOMException e) {
// handle JDOMException
} catch (IOException e) {
// handle IOException
}
[/code]
[code language=”java”]
String xml = "<message>HELLO!</message>";
DOMParser parser = new DOMParser();
try {
parser.parse(new InputSource(new java.io.StringReader(xml)));
Document doc = parser.getDocument();
String message = doc.getDocumentElement().getTextContent();
System.out.println(message);
} catch (SAXException e) {
// handle SAXException
} catch (IOException e) {
// handle IOException
}
[/code]
[code language=”java”]
String xml = "<message>HELLO!</message>";
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = null;
try {
db = dbf.newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(xml));
try {
Document doc = db.parse(is);
String message = doc.getDocumentElement().getTextContent();
System.out.println(message);
} catch (SAXException e) {
// handle SAXException
} catch (IOException e) {
// handle IOException
}
} catch (ParserConfigurationException e1) {
// handle ParserConfigurationException
}
[/code]
[code language=”sql”]
select field1, field2 from mytable group by field1, field2 having count(*)>1
[/code]
Source on Github
3D-Ball
Continue reading Computer graphics
white lie ложь во спасение
to testify свидетельствовать
to spread распространяться
a rumour слух (информация)
an oath проклятие
home truth горькая правда
to get away with избежать наказания
a forgery подделка
to make an excuse искать оправдание
to cheat on обманывать любимого
welfare социальное обеспечение
commitment приверженность (долг)
narrator рассказчик
redundancy излишек
vital жизненно важный
to persuade уговорить
perjury лжесвидетельство
hoax мистификация
elaborate замысловатый
gossip болтовня
malicious злобный
to get away with избежать наказания
forgery фальсификат
fib выдумка
to exaggerate преувеличивать
to con мошенничать
bluntly прямо
to take in обманывать
bogus поддельный
to deceive сбивать с толку