This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testAccountsInitialization() { | |
AccountTree.Account expenses; | |
assertNotNull( expenses = findAccount("expenses", journal.getRootAccounts()) ); | |
assertNotNull( findAccount("food", expenses.getChildren()) ); | |
} | |
@Test | |
public void testTransactionsInitialization() throws Exception { | |
List<Transaction> ts = journal.getTransactions(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Ваня: я решил набросать свой вариант программы и на нём показать, как всё | |
делается. Можешь сохранить его на будущее как далеко не идеальный, но неплохой | |
пример для подражания.*) | |
(* Ваня: первый совет: в коде очень полезны комментарии. Если ты делаешь | |
что-то неочевидное в какой-то строчке, поясни это в комментарии рядышком. Я | |
покажу тебе примеры полезных комментариев ниже. Чтобы ты не путал мои советы с | |
комментариями к коду, советы я пишу в круглых скобках и начинаю со своего | |
имени, а комментарии - в фигурных скобках. Так что если захочешь использовать | |
этот код, советы удаляй, они только для тебя, а комментарии оставь: они |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% вставка картинки: \figure{file}{описание} | |
\newcommand{\includefigure}[2]{ | |
\begin{figure}[!htb] | |
\center{\includegraphics{#1}} | |
\caption{#2} \label{fig:#1} | |
\end{figure} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let $PATH .= ';E:\Program Files\Git\bin\' | |
runtime vimrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git submodule add git://github.com/tpope/vim-rails.git bundle/rails | |
git submodule add git://github.com/msanders/snipmate.vim.git bundle/snipmate | |
git submodule add git://github.com/vim-scripts/bufexplorer.zip bundle/bufexplorer | |
git submodule add git://github.com/scrooloose/nerdcommenter.git bundle/nerdcommenter | |
git submodule add git://github.com/scrooloose/nerdtree.git bundle/nerdtree | |
git submodule add git://github.com/tpope/vim-surround.git bundle/surround | |
git submodule add git://github.com/tpope/vim-cucumber.git bundle/cucumber | |
git submodule add git://github.com/tpope/vim-haml.git bundle/haml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 + 2 + 1 + 2 + 3 + | |
1 + 3 + 4 + 2 + 1 + | |
2 + 4 + 1 + 4 + 2 + | |
1 + 2 + 4 + 3 + 1 + | |
3 + 2 + 1 + 2 + 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Double parseDouble(String string) throws ParseException { | |
if("null".equals(string)) { | |
return null; | |
} | |
try { | |
return Double.parseDouble(string); | |
} catch (NumberFormatException e) { | |
throw new ParseException("Unparseable double: " + string, 0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final String dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"; // 2011-01-29T00:02:08+06:00 | |
public static Calendar parseDate(String strDate) throws ParseException { | |
SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.US); | |
Calendar cal = Calendar.getInstance(); | |
cal.setTime(sdf.parse(strDate)); | |
return cal; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
incident/accident/case случай | |
distinguished выдающийся, знаменитый | |
faith вера | |
conduct поведение | |
ascent восхождение, подъём | |
bright яркий, блестящий, умный | |
daring дерзкий | |
be concerned with/deal with заниматься, интересоваться | |
sustain поддерживать (горение, реакцию) | |
explosive взрывчатка |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> | |
</head> | |
<body> | |
<form name="f" id="f" action="#" onsubmit="translate(); return false;"><textarea name="text" rows="4" cols="60">Enter text here</textarea><br /><br /><input type="submit" value="Перевести на русский" onfocus="this.blur();" /><br /><br /><textarea name="translation" rows="4" cols="60" onfocus="this.select();" readonly="true"></textarea></form><br /><script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript">google.load("language", "1"); function translate() {var originaltext=document.forms["f"].text.value; google.language.translate(originaltext, "", "ru", function(result) { document.forms["f"].translation.value = (result.error)?("Error: "+result.error.message):result.translation; }); } </script> | |
</body> | |
</html> |