<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1222530893287439435</id><updated>2024-10-07T11:50:50.314+06:00</updated><category term="Linux"/><category term="Java"/><category term="Python"/><category term="Ruby"/><category term="git"/><category term="C#"/><category term="Swing"/><category term="Windows"/><category term="Cinnamon"/><category term="Console"/><category term="Excel"/><category term="JTable"/><category term="KDE"/><category term="SystemTray"/><category term="WxWidgets"/><category term="macos"/><category term="mercurial"/><category term="php"/><category term="postgresql"/><category term="ssh"/><category term="terminal"/><category term="vim"/><category term="windows10"/><category term="xrc"/><title type='text'>Околокомпьютерные темы</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mymemoryjob.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-3822757093753959833</id><published>2017-03-29T21:02:00.000+06:00</published><updated>2017-03-29T21:02:51.523+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><category scheme="http://www.blogger.com/atom/ns#" term="windows10"/><title type='text'>Как загрузить безопасный режим в Windows 10</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;После официального выхода Windows 8 значительное число поклонников семейства ОС разочаровалось в продукции Microsoft. Оказалось, что новая платформа имеет значительное количество недостатков, а также изменений, которые доставляют неудобства. Один из них – отсутствие специального меню дополнительной загрузки (в Windows 10 оно также отсутствует). Итак, как мы можем загрузить безопасный режим в Windows 10.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;Ранее для доступа к этому инструменту достаточно было нажать F8 на начальном этапе загрузки ПК. Многим также не понравилось отсутствие кнопки «Пуск», которая много лет присутствовала в ОС семейства Windows. Волна критики заставила разработчиков вернуть данный элемент в систему. Самый простой способ активировать безопасный режим в «десятке» – использовать панель «Конфигурация системы».&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Данный способ работает и в Windows 8, также его можно использовать и в Windows 7, однако о нем мало кто знает. Для запуска нужной панели необходимо запустить утилиту «Выполнить» (комбинация Win+R) и ввести команду msconfig для запуска одноименного приложения.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxHnLHgBJWFLEOjnEz7-h9NRNxLLDaP9kED1eYpP2B-SSAPfMpouZlUHArdGjQOQ63EdfIcIxjre-2scN_PiK4-uYIO-jyItaxTRVX__cFOZcY_H6pIzuoX7iz7BP-dwT1GHKsj2oSGSU/s1600/run.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxHnLHgBJWFLEOjnEz7-h9NRNxLLDaP9kED1eYpP2B-SSAPfMpouZlUHArdGjQOQ63EdfIcIxjre-2scN_PiK4-uYIO-jyItaxTRVX__cFOZcY_H6pIzuoX7iz7BP-dwT1GHKsj2oSGSU/s1600/run.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
В окне «Конфигурация системы» нужно сделать активной вкладку «Загрузка», которая отображает информацию об операционной системе. Настройки способа загрузки системы находятся в нижнем левом углу. В блоке «Параметры загрузки» требуется активировать пункт «Безопасный режим», что разблокирует три дополнительных опции: «Минимальная» - привычный безопасный режим. Загружается минимальный набор служб и драйверов, необходимый для старта системы. «Другая оболочка» - в этом режиме загружается только окно командной строки и рабочий стол. «Сеть» - аналоги «Минимального режима», однако дополнительно загружаются драйвера для подключенных сетевых устройств. Это позволяет полноценно выходить в сеть.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhphtlrqjJmcylAXisrWF0JzbXnlhugzkvUq3pEP1cuewKJMDhKoeVgxI3UAGJyPxlYMNWjbVdKHJm4ehAgLdOSAbGDbmmxo4zJE6d6ik7JAuljy_B9-EMML_YuqR5DGuaV9hnWFBxi0dk/s1600/system-config.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhphtlrqjJmcylAXisrWF0JzbXnlhugzkvUq3pEP1cuewKJMDhKoeVgxI3UAGJyPxlYMNWjbVdKHJm4ehAgLdOSAbGDbmmxo4zJE6d6ik7JAuljy_B9-EMML_YuqR5DGuaV9hnWFBxi0dk/s1600/system-config.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/3822757093753959833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/3822757093753959833'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2017/03/windows-10-safe-mode.html' title='Как загрузить безопасный режим в Windows 10'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxHnLHgBJWFLEOjnEz7-h9NRNxLLDaP9kED1eYpP2B-SSAPfMpouZlUHArdGjQOQ63EdfIcIxjre-2scN_PiK4-uYIO-jyItaxTRVX__cFOZcY_H6pIzuoX7iz7BP-dwT1GHKsj2oSGSU/s72-c/run.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-7483458148783276643</id><published>2016-12-15T02:45:00.003+06:00</published><updated>2016-12-15T02:45:31.009+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="macos"/><category scheme="http://www.blogger.com/atom/ns#" term="terminal"/><title type='text'>MacOS доступ к буферу обмена из терминала</title><content type='html'>В MacOS есть очень удобные утилиты для доступа к буферу обмена или записи в него:&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;pbcopy:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Позволяет записать в буфер обмена вывод любой консольной команды, например можно легко скопировать свой публичный ключ следующей командой:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;cat ~/.ssh/id_rsa.pub | pbcopy&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
теперь содержимое файла у вас в буфере обмена&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;pbpaste:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Предоставляет доступ к содержимому системного буфера обмена&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/7483458148783276643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/7483458148783276643'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2016/12/macos.html' title='MacOS доступ к буферу обмена из терминала'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-4090919675035517311</id><published>2016-12-15T02:34:00.000+06:00</published><updated>2016-12-15T02:34:01.623+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>красивый вывод git log</title><content type='html'>Есть простой способ сделать вывод &lt;i&gt;&lt;b&gt;git log &lt;/b&gt;&lt;/i&gt;более информативным и привлекательным, для этого достаточно добавить в файл&amp;nbsp;&lt;i&gt;.gitconfig &lt;/i&gt;в домашней директории следующие строки:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;[alias]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lg = log --color --graph --pretty=format:&#39;%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)&amp;lt;%an&amp;gt;%Creset&#39; --abbrev-commit&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Теперь будет доступна команда &lt;b style=&quot;font-style: italic;&quot;&gt;git lg&lt;/b&gt;, и выглядеть это будет примерно так&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCz70tCNh2wBZUS4ocAgQim3dBvhg86iw0_rgHSCKBXecaNB3ACm0kV64RicEsG9np-4BwBtjbIiEPVRyrLW6ty04-Kx_aksMDL49o05j8ougIGUNsUmFonC0seIljzUt78oB43PLjeWY/s1600/git_log.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCz70tCNh2wBZUS4ocAgQim3dBvhg86iw0_rgHSCKBXecaNB3ACm0kV64RicEsG9np-4BwBtjbIiEPVRyrLW6ty04-Kx_aksMDL49o05j8ougIGUNsUmFonC0seIljzUt78oB43PLjeWY/s640/git_log.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;
&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4090919675035517311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4090919675035517311'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2016/12/git-log.html' title='красивый вывод git log'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCz70tCNh2wBZUS4ocAgQim3dBvhg86iw0_rgHSCKBXecaNB3ACm0kV64RicEsG9np-4BwBtjbIiEPVRyrLW6ty04-Kx_aksMDL49o05j8ougIGUNsUmFonC0seIljzUt78oB43PLjeWY/s72-c/git_log.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-8142146509819587694</id><published>2016-12-06T01:07:00.001+06:00</published><updated>2016-12-06T01:07:07.344+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>Удаление смердженных git веток</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;Часто сталкиваюсь с ситуацией, когда на локальном компьютере копятся куча не удаленных вовремя веток, уже давно слитых в master или development ветки. Среди них конечно же есть ветки работа над которыми еще не закончена.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Чтобы быстро &lt;span style=&quot;font-family: inherit;&quot;&gt;узнать&lt;/span&gt; названия всех веток, которые уже были слиты, допустим в &lt;b&gt;develop&lt;/b&gt;, нам необходимо выполнить 2 простых шага:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Переключаемся на ветку develop&lt;/span&gt;
&lt;codebox style=&quot;background: rgb(248, 248, 248); border: 1px solid rgb(204, 204, 204); clear: right; display: block; font-family: Verdana; font-size: 14px; line-height: 21px; margin-left: 0em; margin-top: 1.571em; max-height: 400px; overflow: auto; padding: 0.667em 0.917em; white-space: nowrap;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;verdana&amp;quot; , sans-serif; white-space: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;$ &lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;git checkout develop&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/codebox&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Выполняем в консоле&amp;nbsp; git branch --merged | grep -v develop | grep -v master&lt;span style=&quot;-webkit-text-stroke-width: 0px; background-color: #fafafa; display: inline ! important; float: none; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;codebox style=&quot;background: rgb(248, 248, 248); border: 1px solid rgb(204, 204, 204); clear: right; display: block; font-family: Verdana; font-size: 14px; line-height: 21px; margin-left: 0em; margin-top: 1.571em; max-height: 400px; overflow: auto; padding: 0.667em 0.917em; white-space: nowrap;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;verdana&amp;quot; , sans-serif; white-space: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;$ &lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;git branch --merged | grep -v develop | grep -v master&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/codebox&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;В итоге мы получим список веток которые не&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;были слиты в develop.&lt;br /&gt;
&lt;br /&gt;
При желании можно их сразу удалять этим скриптом, просто добавив в конце &quot;| xargs git branch -d&quot;. В итоге это будет выглядеть так:&lt;br /&gt;
&lt;codebox style=&quot;background: rgb(248, 248, 248); border: 1px solid rgb(204, 204, 204); clear: right; display: block; font-family: Verdana; font-size: 14px; line-height: 21px; margin-left: 0em; margin-top: 1.571em; max-height: 400px; overflow: auto; padding: 0.667em 0.917em; white-space: nowrap;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;verdana&amp;quot; , sans-serif; white-space: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;$ &lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;git branch --merged | grep -v develop | grep -v master | xargs git branch -d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/codebox&gt;&lt;br /&gt;
&amp;nbsp;Но я бы не рекомендовал этого делать, во избежание потерь данных)
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8142146509819587694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8142146509819587694'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2016/12/git.html' title='Удаление смердженных git веток'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-6452581273393394962</id><published>2014-09-04T17:30:00.002+06:00</published><updated>2014-11-10T15:04:44.126+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="postgresql"/><title type='text'>Создание и загрузка дампа базы postgresql через консоль</title><content type='html'>&lt;b&gt;Создаем дамп базы:&lt;/b&gt;&lt;br /&gt;
1. Логинимся под пользователем postgres командой:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;$&amp;nbsp;&lt;i&gt;sudo su postgres&lt;/i&gt;&lt;br /&gt;
2. Создаем дамп БД командой:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;$ pg_dump &lt;tt class=&quot;REPLACEABLE&quot;&gt;&lt;i&gt;имя_БД&lt;/i&gt;&lt;/tt&gt;&amp;nbsp; &amp;gt;&amp;nbsp;&lt;tt class=&quot;REPLACEABLE&quot;&gt;&lt;i&gt;файл_дампа&lt;/i&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Загружаем дамп базы:&lt;/b&gt;&lt;br /&gt;
1. Логинимся под пользователем postgres командой:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;$&amp;nbsp;&lt;i&gt;sudo su postgres&lt;/i&gt;&lt;br /&gt;
2. Загружаем дамп БД командой:&lt;br /&gt;
&lt;tt class=&quot;REPLACEABLE&quot;&gt;&lt;/tt&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;$&amp;nbsp;psql &lt;tt class=&quot;REPLACEABLE&quot;&gt;&lt;i&gt;имя_БД&lt;/i&gt;&lt;/tt&gt;&amp;nbsp; &amp;lt;&amp;nbsp;&lt;tt class=&quot;REPLACEABLE&quot;&gt;&lt;i&gt;файл_дампа&lt;/i&gt;&lt;/tt&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6452581273393394962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6452581273393394962'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2014/09/postgresql.html' title='Создание и загрузка дампа базы postgresql через консоль'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-6425090686719245988</id><published>2014-09-04T16:59:00.000+06:00</published><updated>2014-09-04T17:32:03.275+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><title type='text'>Копирование файлов по ssh</title><content type='html'>&lt;span style=&quot;color: #444444; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;Обмен файлами между компьютерами по ssh:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;1. Копируем файл &quot;my_file.txt&quot; с удаленной машины на локальную.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;codebox style=&quot;background: rgb(248, 248, 248); border: 1px solid rgb(204, 204, 204); clear: right; display: block; font-family: Verdana; font-size: 14px; line-height: 21px; margin-left: 0em; margin-top: 1.571em; max-height: 400px; overflow: auto; padding: 0.667em 0.917em; white-space: nowrap;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; white-space: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;$ scp user@remote.computer:&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;/path/to/file/my_file.txt&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;/our/local/directory&lt;/span&gt;&lt;/span&gt;&lt;/codebox&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;&amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;/path/to/file/my_file.txt&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&quot; - полный путь к файлу на удаленном компьютере.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;/our/local/directory&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&quot; - наша локальная директория, куда будет скопирован файл.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;после &quot;:&quot; пробела нет.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;2. Копируем файл &quot;my_file.txt&quot; с локальной машины на удаленную.&lt;/span&gt;&lt;br /&gt;
&lt;codebox style=&quot;background: rgb(248, 248, 248); border: 1px solid rgb(204, 204, 204); clear: right; display: block; font-family: Verdana; font-size: 14px; line-height: 21px; margin-left: 0em; margin-top: 1.571em; max-height: 400px; overflow: auto; padding: 0.667em 0.917em; white-space: nowrap;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; white-space: normal;&quot;&gt;$ scp&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;/path/to/localfile/my_file.txt&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; white-space: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;user@remote.computer: &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;/our/remote/directory&lt;/span&gt;&lt;/span&gt;&lt;/codebox&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px; white-space: nowrap;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px; white-space: nowrap;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;path/to/localfile/my_file.txt&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px; white-space: nowrap;&quot;&gt;&quot; -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;полный путь к файлу на локальном компьютере.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;/our/remote/directory&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Verdana, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&amp;nbsp; директория на удаленном компьютере, куда будет скопирован файл.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;после &quot;:&quot; пробел.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6425090686719245988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6425090686719245988'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2014/09/ssh.html' title='Копирование файлов по ssh'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-7541118786411127776</id><published>2014-03-27T01:13:00.000+06:00</published><updated>2014-03-27T01:13:00.441+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>php xdebug настройка в linux</title><content type='html'>Все действия производились на Ubuntu 14.04. В качестве сервера используется apache. В качестве IDE - Netbeans 8.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Для начала нам потребуется установить сам xdebug, который находится в стандартном репозитории Ubuntu. Сделать это можно в консоле коммандой &lt;span style=&quot;background-color: #cccccc;&quot;&gt;&lt;i&gt;sudo apt-get install php5-xdebug&lt;/i&gt;&lt;/span&gt;, либо запустив synaptic.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiunZ7-Qfq833IJSUi4H0r-sSFgQznLUS37ALlUUkw1yB93sC0FyjQblWs0cteB7mdJkd2NZOC72IRRcilnNWNJ5agi1ytTCe2sygZL3ore8vzlW93paAChsgF-86fXUqv-G3be1tkQffo/s1600/synaptic.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiunZ7-Qfq833IJSUi4H0r-sSFgQznLUS37ALlUUkw1yB93sC0FyjQblWs0cteB7mdJkd2NZOC72IRRcilnNWNJ5agi1ytTCe2sygZL3ore8vzlW93paAChsgF-86fXUqv-G3be1tkQffo/s1600/synaptic.png&quot; height=&quot;640&quot; width=&quot;636&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Далее нам необнодимо определить место устаноки библиотеки xdebug.so, сделать это можно при помощи команды find в консоле.&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;find / -name &#39;xdebug.so&#39; 2&amp;gt; /dev/null&lt;/span&gt;&lt;br /&gt;
в результате непродолжительной работы должно вывести на экран что то вроде этого ...&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ2fvxTflbKBaX6AkSzuV0yGV7r5t3oiwaPCmj5c8w0KC3OWkvXZpDr10D4ZILNLZAV6M4LSvHLUXxqerpfjbOrep117ROIOtMUToaxiyPSwNxWoS1vuclReNbSnm8G729-e0QD_GqyH8/s1600/find_result.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ2fvxTflbKBaX6AkSzuV0yGV7r5t3oiwaPCmj5c8w0KC3OWkvXZpDr10D4ZILNLZAV6M4LSvHLUXxqerpfjbOrep117ROIOtMUToaxiyPSwNxWoS1vuclReNbSnm8G729-e0QD_GqyH8/s1600/find_result.png&quot; height=&quot;23&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Эту библиотеку, а также ряд других параметров нам необходимо прописать в конец файла php.ini который находится &lt;span style=&quot;background-color: #cccccc;&quot;&gt;/etc/php5/apache2/php.ini&lt;/span&gt;, выглядит это будет примерно так -&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzmzy-bRfXZPa8H1T-5cSqZGTG3wQBW5_e1iR4VJUMC6z4m4zNMk3VRUSfpiSlPdkUfb5PRITVCsaNnXZrRAnBUeHI55ZXuCD1zoqLuCrb1AQD1LnXBe8AX-1puIEa3K_4RkfI01bmtLc/s1600/php.ini.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzmzy-bRfXZPa8H1T-5cSqZGTG3wQBW5_e1iR4VJUMC6z4m4zNMk3VRUSfpiSlPdkUfb5PRITVCsaNnXZrRAnBUeHI55ZXuCD1zoqLuCrb1AQD1LnXBe8AX-1puIEa3K_4RkfI01bmtLc/s1600/php.ini.png&quot; height=&quot;638&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Если в качестве IDE используется PHPStorm, то также в этом файле необходимо указать параметр xdebug.idekey, значение которого необходимо внести и в настройки самого PHPStorm.&lt;br /&gt;
В результате после перезапуска сервера командой &lt;span style=&quot;background-color: #cccccc;&quot;&gt;sudo service apache2 restart&lt;/span&gt; получен настроенный отладчик php в нашей ide.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkI6Boj4pAiMuahhp-6C_ArhcAi_jW709Ojda5WIeVIMoXkzGzekzYbemBB5GN-Of36KKNdoWNGrm5V7hJxAPV2zCPod6EmrUGFKkVqqnl4i-xABcLrtemkrT0NLbjnLyDLUuawMJKay0/s1600/result.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkI6Boj4pAiMuahhp-6C_ArhcAi_jW709Ojda5WIeVIMoXkzGzekzYbemBB5GN-Of36KKNdoWNGrm5V7hJxAPV2zCPod6EmrUGFKkVqqnl4i-xABcLrtemkrT0NLbjnLyDLUuawMJKay0/s1600/result.png&quot; height=&quot;640&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/7541118786411127776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/7541118786411127776'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2014/03/php-xdebug-linux.html' title='php xdebug настройка в linux'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiunZ7-Qfq833IJSUi4H0r-sSFgQznLUS37ALlUUkw1yB93sC0FyjQblWs0cteB7mdJkd2NZOC72IRRcilnNWNJ5agi1ytTCe2sygZL3ore8vzlW93paAChsgF-86fXUqv-G3be1tkQffo/s72-c/synaptic.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-5585913122673376934</id><published>2014-03-14T17:25:00.003+06:00</published><updated>2014-03-14T17:25:50.399+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>git шпаргалка</title><content type='html'>&lt;b&gt;git init&lt;/b&gt; - инициализировать новый репозиторий&lt;br /&gt;
&lt;b&gt;git add .&lt;/b&gt; - добавить все файлы в индекс текущего репозитория&lt;br /&gt;
&lt;b&gt;git add --all&lt;/b&gt; - полностью обновить индекс ветки&lt;br /&gt;
&lt;b&gt;git add &lt;filename&gt;&lt;/filename&gt;&lt;/b&gt; - добавить filename в индекс текущего репозитория&lt;br /&gt;
&lt;b&gt;git status&lt;/b&gt; - показать статус текущего репозитория&lt;br /&gt;
&lt;b&gt;git commit -m &#39;&lt;commit_text&gt;&#39;&lt;/commit_text&gt;&lt;/b&gt; - зафиксировать изменения в текущей ветке с меткой commit_text&lt;br /&gt;
&lt;b&gt;git rm &lt;filename&gt;&lt;/filename&gt;&lt;/b&gt; - удалить filename из индекса&lt;br /&gt;
&lt;b&gt;git branch&lt;/b&gt; - список всех локальных веток&lt;br /&gt;
&lt;b&gt;git branch -a&lt;/b&gt; - список всех удаленных веток&lt;br /&gt;
&lt;b&gt;git checkout &lt;branch&gt;&lt;/branch&gt;&lt;/b&gt; - переключиться на ветку - branch&lt;br /&gt;
&lt;b&gt;git checkout -b &lt;new_branch&gt; &lt;/new_branch&gt;&lt;/b&gt;- создать новую локальную ветку new_branch (будет копией текущего)&lt;br /&gt;
&lt;b&gt;git checkout - b &lt;new_local_branch&gt; origin/&lt;remote_branch&gt; &lt;/remote_branch&gt;&lt;/new_local_branch&gt;&lt;/b&gt;- создать новую локальную ветку new_local_branch (будет копией удаленной ветки remote_branch)&lt;br /&gt;
&lt;b&gt;git fetch origin&lt;/b&gt; - извлечь всю информацию с репозитория&lt;br /&gt;
&lt;b&gt;git pull origin &lt;remote_branch&gt;&lt;/remote_branch&gt;&lt;/b&gt; - затянуть изменения с remote_branch&lt;br /&gt;
&lt;b&gt;git push origin &lt;local_branch&gt;:&lt;remote_branch&gt; &lt;/remote_branch&gt;&lt;/local_branch&gt;&lt;/b&gt;- отправить изменения с локальной ветки local_branch в удаленную ветку remote_branch&lt;br /&gt;
&lt;b&gt;git merge &lt;other_branch&gt;&lt;/other_branch&gt;&lt;/b&gt; - объединить текущую ветку с веткой other_branch&lt;br /&gt;
&lt;b&gt;git stash&lt;/b&gt; - спрятать изменения в ветке&lt;br /&gt;
&lt;b&gt;git stash list&lt;/b&gt; - показать все спрятанные изменения&lt;br /&gt;
&lt;b&gt;git stash apply&lt;/b&gt; - наложить последнее спрятанное изменение к текущей ветке&lt;br /&gt;
&lt;b&gt;git stash drop &lt;/b&gt;- удалить последнее спрятанное изменение&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/5585913122673376934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/5585913122673376934'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2014/03/git.html' title='git шпаргалка'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-8614051875533411091</id><published>2013-07-12T16:48:00.003+06:00</published><updated>2013-07-12T16:48:47.762+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Установка Advego Plagiatus на Linux</title><content type='html'>Так как нативной сборки Advego Plagiatus под Linux нет, то нам потребуется wine. Также вместе с wine следует установить winetricks.&lt;br /&gt;
Для успешной работы Advego Plagiatus нам потребуются некоторые библиотеки, которые мы будем устанавливать с помощью winetricks.&lt;br /&gt;
Для начала запустим winetricks, для этого наберем в терминале &quot;winetricks&quot;. У нас появится окошко следующего вида.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF_4gKU-Am9syDHzIoiXti65eL6QwdFFQYxr1Dw7wtiu3bMujv_kXhXDhleVK6Xldr5N85q0Y7fmxR6kOnDRC6x-SFOePV2aGoGpBZZ6VIaRXwQVwec7s37pHitRyQSOwkbvUMFjfDy8k/s1600/w1.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF_4gKU-Am9syDHzIoiXti65eL6QwdFFQYxr1Dw7wtiu3bMujv_kXhXDhleVK6Xldr5N85q0Y7fmxR6kOnDRC6x-SFOePV2aGoGpBZZ6VIaRXwQVwec7s37pHitRyQSOwkbvUMFjfDy8k/s1600/w1.jpeg&quot; height=&quot;426&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Выбираем пункт &quot;Select the default wineprefix&quot; и нажимаем &quot;Ок&quot;, откроется следующее окошко:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOIRId_swHmQ1hxqFXUTwlp4Y2DOiK85-jsKAxk_r0SPYKHb-uA7W5EkvnkiMG2Bau3LinWusOm0V3YBLFI-YBODDMFwu85feNR90RdkBRYoJ7uvmsNX9q8FoZ0BytcH0k85eWGRU6k7c/s1600/w2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOIRId_swHmQ1hxqFXUTwlp4Y2DOiK85-jsKAxk_r0SPYKHb-uA7W5EkvnkiMG2Bau3LinWusOm0V3YBLFI-YBODDMFwu85feNR90RdkBRYoJ7uvmsNX9q8FoZ0BytcH0k85eWGRU6k7c/s1600/w2.jpeg&quot; height=&quot;474&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Тут нам следует выбрать &quot;Install a Windows DLL or component&quot;, нажимаем &quot;Ок&quot; и переходим к списку библиотек.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqWXbuwYAzeiDA7ISHTCmzTfWXF3uTQO3lHbfjocS5p0WKgP4Mx_D48n4XJxxWgxJ4RwQtjRtYNEEpZh8tXjq3hjukByRB27T_Y4rMxIbnqhVYTxRti27jghAJWYBnCvvlUxlc_MK6vag/s1600/w3.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqWXbuwYAzeiDA7ISHTCmzTfWXF3uTQO3lHbfjocS5p0WKgP4Mx_D48n4XJxxWgxJ4RwQtjRtYNEEpZh8tXjq3hjukByRB27T_Y4rMxIbnqhVYTxRti27jghAJWYBnCvvlUxlc_MK6vag/s1600/w3.jpeg&quot; height=&quot;474&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Тут нам следует выбрать следующие компоненты - riched20, riched30, richtx32, winhttp и winine. После того как выбрали все компоненты нажимаем &quot;Ок&quot; и начнется установка. По завершению установки компонетов необходимо установить Advego Plagiatus абсолютно так же как и в Windows. Все - плагиатус готов к работе, проверялось на wine версий 1.4 и 1.5.&lt;br /&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8614051875533411091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8614051875533411091'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2013/07/advego-plagiatus-linux.html' title='Установка Advego Plagiatus на Linux'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF_4gKU-Am9syDHzIoiXti65eL6QwdFFQYxr1Dw7wtiu3bMujv_kXhXDhleVK6Xldr5N85q0Y7fmxR6kOnDRC6x-SFOePV2aGoGpBZZ6VIaRXwQVwec7s37pHitRyQSOwkbvUMFjfDy8k/s72-c/w1.jpeg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-1985386008931510168</id><published>2013-07-05T10:36:00.002+06:00</published><updated>2013-07-05T10:36:41.810+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cinnamon"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Переключение раскладки в Cinnamon</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
Для изменения стандартной комбинации переключения раскладкок в Cinnamon следует нажать на апплет раскладки клавиатуры.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKO0rPWkL1kKu9iyAHTnSMy9BhPhuaqnghinVPtG_l7u5hVHu8DeeUWZFjRtdctZB3oNVFj0vqhahxpllLtY5m2hL16rSSFpwm-Xy4FtGHxTgoutJhPbdVYRUdjuj0OmKel7y50tGZhOI/s412/01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKO0rPWkL1kKu9iyAHTnSMy9BhPhuaqnghinVPtG_l7u5hVHu8DeeUWZFjRtdctZB3oNVFj0vqhahxpllLtY5m2hL16rSSFpwm-Xy4FtGHxTgoutJhPbdVYRUdjuj0OmKel7y50tGZhOI/s412/01.jpg&quot; height=&quot;340&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
В открывшемся окне переходим на панель &quot;Layouts&quot; и нажимаем на кнопку &quot;Параметры&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQk1R0Gfj88knz1FlaluiE8l7ZRaEDCu_JMKpidehGC3gywbehnvQvIK7Mlbcc_mxtAaAv3xagTHZ4pFETz7IJDTga9AroVHJUqKkzKjWHsSe9OGzvuhImnwL_Pc1V6rZxswvEEI2Ccvw/s806/02.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQk1R0Gfj88knz1FlaluiE8l7ZRaEDCu_JMKpidehGC3gywbehnvQvIK7Mlbcc_mxtAaAv3xagTHZ4pFETz7IJDTga9AroVHJUqKkzKjWHsSe9OGzvuhImnwL_Pc1V6rZxswvEEI2Ccvw/s806/02.jpg&quot; height=&quot;424&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Раскрываем пункт &quot;Клавиша(и) для смены раскладки&quot; и выбираем там требуемую клавишу или комбинацию, допустим Caps Lock&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj055HgoHUyQ6iZM1suSMsxJd4-LSsTfV-Kz_YhqYjICC1_nCHV8bsOTGJOMyqENj7d6SoX7JdJ6keAS7imPfPsCy3FWOhq1ogJY1R8sJpfFOOxjIuxYRZgTLaE-9KWCoeFUejgC1RfLYI/s556/03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj055HgoHUyQ6iZM1suSMsxJd4-LSsTfV-Kz_YhqYjICC1_nCHV8bsOTGJOMyqENj7d6SoX7JdJ6keAS7imPfPsCy3FWOhq1ogJY1R8sJpfFOOxjIuxYRZgTLaE-9KWCoeFUejgC1RfLYI/s556/03.png&quot; height=&quot;489&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/1985386008931510168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/1985386008931510168'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2013/07/cinnamon.html' title='Переключение раскладки в Cinnamon'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKO0rPWkL1kKu9iyAHTnSMy9BhPhuaqnghinVPtG_l7u5hVHu8DeeUWZFjRtdctZB3oNVFj0vqhahxpllLtY5m2hL16rSSFpwm-Xy4FtGHxTgoutJhPbdVYRUdjuj0OmKel7y50tGZhOI/s72-c/01.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-4480569209506573290</id><published>2013-07-03T12:41:00.000+06:00</published><updated>2013-07-03T12:42:25.484+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="KDE"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>KMix скорость прокрутки</title><content type='html'>Чтобы изменить скорость прокрутки колесиком мыши у KMix нужно в файле &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;~/.kde/share/config/kmixrc&lt;/i&gt;&lt;/span&gt;&amp;nbsp; в секции &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;[Global]&lt;/i&gt;&lt;/span&gt; добавить параметр &lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VolumePercentageStep = x&lt;/span&gt;&lt;/i&gt;, вместо &lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;x &lt;/span&gt;&lt;/i&gt;подставить значение процента на которое будет увеличиваться или уменьшаться громкость.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4480569209506573290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4480569209506573290'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2013/07/kmix.html' title='KMix скорость прокрутки'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-8600027334664312968</id><published>2013-07-01T00:22:00.003+06:00</published><updated>2013-07-01T00:22:57.282+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>rvm установка и использование(шпаргалка)</title><content type='html'>&lt;b&gt;1. Установка.&lt;/b&gt;От имени пользователя выполнить -&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt; \curl -L https://get.rvm.io | bash&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;2. Версии Ruby.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm list known&lt;/i&gt;&lt;/span&gt; - посмотреть все доступные для установки версии ruby&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm install 2.0.0&lt;/i&gt;&lt;/span&gt; - установить версию 2.0.0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm list&lt;/i&gt;&lt;/span&gt; - посмотреть все установленные версии ruby&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm use 2.0.0&lt;/i&gt;&lt;/span&gt; - использовать версию 2.0.0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm use 2.0.0&lt;/i&gt;&lt;/span&gt; - использовать версию 2.0.0 по-умолчанию&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;3. Использование gemset`ов&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm use &lt;ruby_version&gt;@&lt;gemset_name&gt; --create&lt;/gemset_name&gt;&lt;/ruby_version&gt;&lt;/i&gt;&lt;/span&gt; создание gemset`а с именем gemset_name для ruby версии ruby_version&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm gemset list&lt;/i&gt;&lt;/span&gt; - посмотреть все доступные gemset`ы&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm use &lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;ruby_version&gt;@&lt;gemset_name&gt;&lt;/gemset_name&gt;&lt;/ruby_version&gt;&lt;/i&gt;&lt;/span&gt; - использовать gemset &lt;/span&gt;&amp;lt;&lt;span style=&quot;font-size: small;&quot;&gt;ruby_version&amp;gt;@&lt;gemset_name&gt;&lt;/gemset_name&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;rvm use &lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;ruby_version&gt;@&lt;gemset_name&gt; --default&lt;/gemset_name&gt;&lt;/ruby_version&gt;&lt;/i&gt;&lt;/span&gt; - использовать gemset &lt;/span&gt;&amp;lt;&lt;span style=&quot;font-size: small;&quot;&gt;ruby_version&amp;gt;@&lt;gemset_name&gt; по-умолчанию&lt;/gemset_name&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;4. rvmrc&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Возможно автоматическое переключение gemset`ов для разных проектов, для этого в корне проекта необходимо создать файл .rvmrc. В этом файле должна содержаться команда rvm, например: &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;rvm use &lt;ruby_version&gt;@&lt;gemset_name&gt;&lt;/gemset_name&gt;&lt;/ruby_version&gt;&lt;/span&gt;&lt;br /&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8600027334664312968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8600027334664312968'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2013/07/rvm.html' title='rvm установка и использование(шпаргалка)'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-4690915563195648151</id><published>2013-06-28T22:22:00.000+06:00</published><updated>2013-07-01T00:24:02.511+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mercurial"/><title type='text'>mercurial шпаргалка</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Основные команды&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg init&lt;/i&gt;&lt;/span&gt; - инициализация нового хранилища&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg add &lt;/i&gt;&lt;/span&gt;- добавить все файлы в хранилище &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg forget&lt;/i&gt;&lt;/span&gt; &lt;/span&gt;- забыть про указанные файлы или папки&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg commit -m &quot;description commit&quot;&lt;/i&gt;&lt;/span&gt; &lt;/span&gt;- зафиксировать изменения&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg pull &lt;/i&gt;&lt;/span&gt;- загрузить изменения из указанного источника&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg push&lt;/i&gt;&lt;/span&gt; - передать изменения в указанный источник&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg status&lt;/i&gt;&lt;/span&gt; - показать все файлы которые были изменены&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg diff &lt;file&gt;&lt;/file&gt;&lt;/i&gt;&lt;/span&gt; -показать все изменения в файле, если файл не указан, то во всех файлах&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;hg revert &lt;file&gt;&lt;/file&gt;&lt;/i&gt;&lt;/span&gt; - возвратить измененный файл к зафиксированному в репозитории виду, чтобы возвратить все нужно передать параметр &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;--all&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Игнорирование файлов mercurial`ом&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Чтобы указать mercurial`у файлы или папки, которые должны быть&amp;nbsp; проигнорированы следует создать файл .hgignore.&lt;br /&gt;
&lt;br /&gt;
Синтаксис:&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;#&lt;/span&gt; - &lt;/i&gt;комментарий&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;mercurial поддерживает следующие паттерны &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;regexp&lt;/span&gt;&lt;/i&gt; -регулярное выражение&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;glob&lt;/span&gt;&lt;/i&gt;&lt;/span&gt; - Shell-style&lt;br /&gt;
&lt;br /&gt;
Пример:&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;# используем glob синтаксис.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;syntax: glob&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;*.pyc #будут проигнорированы все pyc файлы&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;# переключимся на синтаксис регулярных выражений&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;syntax: regexp&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;^\.pc/&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Значения по-умолчанию&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;В папке .hg в корне проекта создать файл hgrc и заполнить занчениями пользователя, пароля и удаленного хранилища по умолчанию. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;[paths]&lt;br /&gt;default = https://bitbucket.org/&lt;username&gt;username/&lt;projectname&gt;repo&lt;br /&gt;&amp;nbsp;&lt;/projectname&gt;&lt;/username&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;username&gt;&lt;projectname&gt;[auth]&lt;br /&gt;default.prefix&amp;nbsp;&amp;nbsp; = &lt;/projectname&gt;&lt;/username&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;https://bitbucket.org/&lt;username&gt;&lt;/username&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;username&gt;&lt;i&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;username/repo&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;projectname&gt;&lt;/projectname&gt;&lt;/username&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;default.username = username&lt;username&gt;&lt;br /&gt;default.password = pass&lt;password&gt;&lt;/password&gt;&lt;/username&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4690915563195648151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4690915563195648151'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2013/06/mercurial.html' title='mercurial шпаргалка'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-5332426536546140535</id><published>2013-06-14T22:37:00.000+06:00</published><updated>2013-06-14T22:40:15.682+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vim"/><title type='text'>Управление плагинами в VIM</title><content type='html'>Для автоматической установки удаления и &lt;i&gt;обновления &lt;/i&gt;плагинов в vim`е, есть замечательное расширение -&amp;nbsp;&lt;a href=&quot;https://github.com/gmarik/vundle&quot; target=&quot;_blank&quot;&gt;Vundle&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Для установки нам потребуется git, ну и естественно сам vim.&lt;br /&gt;
Для начала скопируем плагин на свой компьютер.&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
И пропишем его в .vimrc&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set nocompatible               &lt;br /&gt;filetype off                   &lt;br /&gt;
set rtp+=~/.vim/bundle/vundle/&lt;br /&gt;call vundle#rc()&lt;br /&gt;filetype plugin indent on &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Все - Vundle установлен.&lt;br /&gt;
Теперь в .vimrc мы можем вписать плагины которые нас интересуют, чтобы Vudle мог их установить и поддерживать в актуальном состоянии. Допустим ...&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;Bundle &#39;rails.vim&#39;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Не забываем вписать сам Vundle&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;Bundle &#39;gmarik/vundle&#39;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
После сохранения в vim будут доступны следующие команды&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;:BundleInstall&lt;/span&gt; &lt;/i&gt;- установит и обновит плагины указанные нами &lt;br /&gt;
Для удаления достаточно стереть Bundle &lt;plugin_name&gt; из нашего .vimrc и выполнить - &lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;:BundleClean&lt;/span&gt;&lt;/i&gt;.&lt;br /&gt;Полный список команд и их описание можно получить набрав &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;:h vundle &lt;/i&gt;&lt;/span&gt;&lt;/plugin_name&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/5332426536546140535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/5332426536546140535'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2013/06/vim.html' title='Управление плагинами в VIM'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-8727155492586265175</id><published>2012-03-07T10:31:00.001+06:00</published><updated>2012-03-07T10:31:39.532+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="WxWidgets"/><category scheme="http://www.blogger.com/atom/ns#" term="xrc"/><title type='text'>wxRuby &amp; xrc файл</title><content type='html'>Чтобы загрузить форму с XRC файла (файл ресурсов WxWidgets), необязательно использовать wxSugar, есть более простой способ.
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Допустим имеем xrc файл с описанием wxPanel, на которой расположены wxButton - &quot;m_button1&quot;, и &amp;nbsp;wxStaticText - &quot;m_staticText1&quot;.&lt;br /&gt;
xrc файл:&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_3572814882&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_3572814882&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;lt;?xml&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;standalone&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;yes&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;?&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;lt;resource&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;http://www.wxwindows.org/wxxrc&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;2.3.0.1&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;object&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;wxPanel&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;MyPanel1&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;style&amp;gt;wxTAB_TRAVERSAL&amp;lt;/style&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;size&amp;gt;500,300&amp;lt;/size&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;object&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;wxBoxSizer&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;orient&amp;gt;wxVERTICAL&amp;lt;/orient&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;object&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;sizeritem&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;option&amp;gt;0&amp;lt;/option&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;flag&amp;gt;wxALL&amp;lt;/flag&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;border&amp;gt;5&amp;lt;/border&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;object&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;wxButton&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;m_button1&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;label&amp;gt;MyButton&amp;lt;/label&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;default&amp;gt;0&amp;lt;/default&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/object&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/object&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;object&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;sizeritem&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;option&amp;gt;0&amp;lt;/option&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;flag&amp;gt;wxALL&amp;lt;/flag&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;border&amp;gt;5&amp;lt;/border&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;object&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;wxStaticText&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;m_staticText1&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;label&amp;gt;MyLabel&amp;lt;/label&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wrap&amp;gt;-1&amp;lt;/wrap&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/object&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/object&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/object&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/object&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;lt;/resource&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;br /&gt;
rb файл:&lt;br /&gt;
&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_4167069077&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_4167069077&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;#&amp;nbsp;coding:&amp;nbsp;utf-8&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;require&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&#39;wx&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;XrcApp&amp;nbsp;&amp;lt;&amp;nbsp;Wx::App&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;on_init&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;#Читаем&amp;nbsp;xrc&amp;nbsp;файл&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xml&amp;nbsp;=&amp;nbsp;Wx::XmlResource.get()&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xml.init_all_handlers()&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xml.load(&lt;span style=&quot;color: blue;&quot;&gt;&quot;form.xrc&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;#Создаем&amp;nbsp;новый&amp;nbsp;фрейм&amp;nbsp;в&amp;nbsp;который&amp;nbsp;поместим&amp;nbsp;нашу&amp;nbsp;панель&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame&amp;nbsp;=&amp;nbsp;Wx::Frame.&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;(&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;-1,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;Simple&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.set_client_size(&amp;nbsp;Wx::Size.&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;(&amp;nbsp;200,&amp;nbsp;200))&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;#&amp;nbsp;Помещаем&amp;nbsp;панель&amp;nbsp;на&amp;nbsp;фрейм&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xml.load_panel(&amp;nbsp;frame,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&#39;MyPanel1&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;#переменной&amp;nbsp;@but&amp;nbsp;присвоим&amp;nbsp;ссылку&amp;nbsp;на&amp;nbsp;элемент&amp;nbsp;&#39;m_button1&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa7700; font-weight: bold;&quot;&gt;@but&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;frame.find_window_by_name(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;m_button1&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;#обработчик&amp;nbsp;события&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;evt_button(&lt;span style=&quot;color: #aa7700; font-weight: bold;&quot;&gt;@but&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;.get_id())&amp;nbsp;{&amp;nbsp;|event|&amp;nbsp;my_button_click(event)}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;#переменной&amp;nbsp;@label&amp;nbsp;присвоим&amp;nbsp;ссылку&amp;nbsp;на&amp;nbsp;элемент&amp;nbsp;&#39;m_staticText1&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa7700; font-weight: bold;&quot;&gt;@label&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;=frame.find_window_by_name(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;m_staticText1&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.show()&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;my_button_click(event)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;puts&amp;nbsp;&lt;span style=&quot;color: #aa7700; font-weight: bold;&quot;&gt;@label&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #aa7700;&quot;&gt;:get_label&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa7700; font-weight: bold;&quot;&gt;@label&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #aa7700;&quot;&gt;:set_label&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;hello&#39;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;XrcApp.&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;().main_loop()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8727155492586265175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/8727155492586265175'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2012/03/wxruby-xrc.html' title='wxRuby &amp; xrc файл'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-1837804908420147772</id><published>2012-03-07T00:38:00.000+06:00</published><updated>2012-03-11T14:51:44.843+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Ruby 1.9 и консоль Windows</title><content type='html'>При изучении Ruby&amp;nbsp;столкнулся&amp;nbsp;со следующей проблемой. При&amp;nbsp;сохранении&amp;nbsp;исходника Ruby в utf-8, и с магической строчкой в начале &quot;# coding: utf-8&quot; консольный вывод кириллицы в ide просто отличный, но при запуске скрипта из системы в консоль начинают сыпаться &quot;кракозябры&quot;. Самое простое решение - конвертировать выводимую строку из&amp;nbsp;utf-8 (в котором сохранен исходник,&amp;nbsp;соответственно и строки в нем) в cp866 (кодовая страница консоли windows).&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_8127937747&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_8127937747&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;#&amp;nbsp;coding:&amp;nbsp;utf-8&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;require&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&quot;iconv&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;iconv=&amp;nbsp;Iconv.&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;cp866&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;puts&amp;nbsp;iconv.iconv(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Кириллица&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;br /&gt;
Ruby version: 1.9.2-p290&lt;br /&gt;
OS: Windows XP</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/1837804908420147772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/1837804908420147772'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2012/03/ruby-19-windows.html' title='Ruby 1.9 и консоль Windows'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-1172035149218872596</id><published>2011-08-08T14:49:00.001+06:00</published><updated>2012-03-14T14:49:05.713+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Swing"/><category scheme="http://www.blogger.com/atom/ns#" term="SystemTray"/><title type='text'>Swing. Работа с системным треем.</title><content type='html'>Рассмотрим простой пример работы с системным треем средствами Swing.&lt;br /&gt;
Приведу простой пример программы, цель которой запустить оконное приложение, свернутое в трей (не показывается на панели задач). По правому щелчку мыши на иконке, выводится меню.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_8476734584&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_8476734584&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.AWTException;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.BorderLayout;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.EventQueue;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.MenuItem;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.PopupMenu;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.SystemTray;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.TrayIcon;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.ActionEvent;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.ActionListener;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.MouseAdapter;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.MouseEvent;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.WindowEvent;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.WindowListener;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.image.BufferedImage;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.io.File;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.io.IOException;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.imageio.ImageIO;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JFrame;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JOptionPane;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JPanel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.SwingUtilities;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.border.EmptyBorder;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;start&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JFrame&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JPanel&amp;nbsp;contentPane;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JFrame&amp;nbsp;frame;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;EventQueue.invokeLater(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Runnable()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;run()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;start();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.setVisible(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.addWindowListener(&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;WindowListener(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowActivated(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowClosed(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowClosing(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowDeactivated(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowDeiconified(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowIconified(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.setVisible(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;windowOpened(WindowEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;(Exception&amp;nbsp;e)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.printStackTrace();&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;start()&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;throws&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;IOException,&amp;nbsp;AWTException&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;setBounds(&lt;span style=&quot;color: #c00000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;450&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;300&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JPanel();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane.setBorder(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;EmptyBorder(&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane.setLayout(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;BorderLayout(&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;setContentPane(contentPane);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;//***************************************************&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;BufferedImage&amp;nbsp;Icon=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;Icon&amp;nbsp;=&amp;nbsp;ImageIO.read(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;File(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;1.gif&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;TrayIcon&amp;nbsp;trayIcon&amp;nbsp;=&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;TrayIcon(Icon,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Приложение&amp;nbsp;в&amp;nbsp;трее&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;SystemTray&amp;nbsp;systemTray&amp;nbsp;=&amp;nbsp;SystemTray.getSystemTray();&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;systemTray.add(trayIcon);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;//*****************************************************&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;PopupMenu&amp;nbsp;popupMenu&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;PopupMenu();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;MenuItem&amp;nbsp;item&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;MenuItem(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Развернуть&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;item.addActionListener(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;ActionListener(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;actionPerformed(ActionEvent&amp;nbsp;e)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.setVisible(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.setExtendedState(JFrame.NORMAL);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;popupMenu.add(item);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;trayIcon.addMouseListener(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;MouseAdapter(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;mouseClicked&amp;nbsp;(MouseEvent&amp;nbsp;e){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;(&amp;nbsp;SwingUtilities.isRightMouseButton(&amp;nbsp;e&amp;nbsp;)){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trayIcon.setPopupMenu(popupMenu);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;(SwingUtilities.isLeftMouseButton(&amp;nbsp;e&amp;nbsp;)){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;JOptionPane.showMessageDialog(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Нажата&amp;nbsp;левая&amp;nbsp;кнопка&amp;nbsp;мыши&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Сообщение&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;JOptionPane.NO_OPTION);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Со строки 38 по 82 строку мы переопределяем поведение нашего окна, нужно нам это для того чтобы при сворачивании сделать его невидимым, т.е. скрыть с панели задач. &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; В строках с 99 по 104 мы инициализируем системный трей и добавляем туда нашу иконку.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Со 110 строки мы создаем PopupMenu,&amp;nbsp; который появляется при нажатии правой кнопки мыши, при нажатии левой кнопки появляется MessageDialog. И добавляем единственный пункт - &quot;Развернуть&quot;, при нажатии на который у нас и появится наше окно, в стоке 116 мы программно устанавливаем положение окна как &quot;NORMAL&quot;, если этого не сделать то окно появится свернутым на панели задач.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/1172035149218872596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/1172035149218872596'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2011/08/swing.html' title='Swing. Работа с системным треем.'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-6483046441822450199</id><published>2011-08-05T14:11:00.015+06:00</published><updated>2012-03-14T15:41:18.181+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JTable"/><category scheme="http://www.blogger.com/atom/ns#" term="Swing"/><title type='text'>Swing JTable пример использования DefaultTableModel</title><content type='html'>Простой пример использования JTable в Swing, с интерактивным добавлением строк в таблицу. Для реализации данного примера будем использовать DefaultTableModel.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_7406850446&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_7406850446&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.BorderLayout;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.EventQueue;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JFrame;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JPanel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.border.EmptyBorder;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.table.DefaultTableModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JScrollPane;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JButton;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;javax.swing.JTable;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.MouseAdapter;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;java.awt.event.MouseEvent;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;start&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JFrame&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JPanel&amp;nbsp;contentPane;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JTable&amp;nbsp;table;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;DefaultTableModel&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;EventQueue.invokeLater(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Runnable()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;run()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;start&amp;nbsp;frame&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;start();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frame.setVisible(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;(Exception&amp;nbsp;e)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.printStackTrace();&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;start()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;setBounds(&lt;span style=&quot;color: #c00000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;450&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;300&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JPanel();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane.setBorder(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;EmptyBorder(&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane.setLayout(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;BorderLayout(&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;setContentPane(contentPane);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;/*&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;Создадим&amp;nbsp;экземпляр&amp;nbsp;класса&amp;nbsp;DefaultTableModel&amp;nbsp;и&amp;nbsp;перегрузим&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;в&amp;nbsp;нем&amp;nbsp;метод&amp;nbsp;isCellEditable.&amp;nbsp;Так&amp;nbsp;как&amp;nbsp;isCellEditable&amp;nbsp;всегда&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;возвращает&amp;nbsp;true,&amp;nbsp;то&amp;nbsp;абсолютно&amp;nbsp;все&amp;nbsp;ячейки&amp;nbsp;являются&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;редактируемыми&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;model&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;DefaultTableModel(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;isCellEditable(&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;row,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;column){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;};&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;/*&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;Добавим&amp;nbsp;столбцы&amp;nbsp;и&amp;nbsp;заполним&amp;nbsp;их&amp;nbsp;шапку&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;model.addColumn(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Фамилия&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;model.addColumn(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Имя&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;model.addColumn(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Год&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;/*&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;Если&amp;nbsp;не&amp;nbsp;использовать&amp;nbsp;JScrollPane&amp;nbsp;тогда&amp;nbsp;не&amp;nbsp;будут&amp;nbsp;видны&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;заголовки&amp;nbsp;столбцов&amp;nbsp;нашей&amp;nbsp;таблицы&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;JScrollPane&amp;nbsp;scrollPane&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JScrollPane();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane.add(scrollPane,&amp;nbsp;BorderLayout.CENTER);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;/*&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;Создадим&amp;nbsp;таблицу&amp;nbsp;и&amp;nbsp;передадим&amp;nbsp;в&amp;nbsp;качесве&amp;nbsp;параметра,&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;передадим&amp;nbsp;нашу&amp;nbsp;модель&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;table&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JTable(model);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;scrollPane.setViewportView(table);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;JPanel&amp;nbsp;panel&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JPanel();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;contentPane.add(panel,&amp;nbsp;BorderLayout.SOUTH);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;JButton&amp;nbsp;btnNewButton&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;JButton(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Добавить&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;btnNewButton.addMouseListener(&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;MouseAdapter()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #646464;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;mouseClicked(MouseEvent&amp;nbsp;arg0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String[]&amp;nbsp;data=&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Иванов&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Петр&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;1990&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;};&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #008200;&quot;&gt;//Добавим&amp;nbsp;строку&amp;nbsp;data&amp;nbsp;в&amp;nbsp;таблицу&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;model.addRow(data);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;panel.add(btnNewButton);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6483046441822450199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6483046441822450199'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2011/08/swing-jtable-defaulttablemodel.html' title='Swing JTable пример использования DefaultTableModel'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-5587410632171878943</id><published>2011-04-22T14:13:00.000+06:00</published><updated>2012-03-14T15:42:19.414+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>C# чтение и запись в Excel без использования COM</title><content type='html'>Недавно наткнулся на отличную библиотеку с помощь которой можно писать и читать Excel-файлы без необходимости в установленном&amp;nbsp;Microsoft Excel.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Имя ей -&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/excellibrary/&quot;&gt;excellibrary&lt;/a&gt;. Распространяется под лицензией GNU Lesser GPL, т.е. бесплатна для использования в абсолютно любых целях. В настоящее время реализована поддержка только XLS формата.Рассмотрим простой пример использования:&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_9709318750&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_9709318750&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System.Collections.Generic;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System.Linq;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System.Text;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;ExcelLibrary.SpreadSheet;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;c_exel&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Program&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Main(&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;[]&amp;nbsp;args)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//создание&amp;nbsp;файла&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;file&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;C:\\newdoc.xls&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Workbook&amp;nbsp;workbook&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Workbook();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Worksheet&amp;nbsp;worksheet&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Worksheet(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Первый&amp;nbsp;Лист&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;worksheet.Cells[0,&amp;nbsp;0]&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Cell(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Привет!!&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;workbook.Worksheets.Add(worksheet);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;workbook.Save(file);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008200;&quot;&gt;//чтение&amp;nbsp;файла&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Workbook&amp;nbsp;book&amp;nbsp;=&amp;nbsp;Workbook.Load(file);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Worksheet&amp;nbsp;sheet&amp;nbsp;=&amp;nbsp;book.Worksheets[0];&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Console.WriteLine(sheet.Cells[0,&amp;nbsp;0]);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
В результате работы программы в корне диска c:\ увидим файл &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;newdoc.xls&lt;/span&gt;&quot;, а на консоль&amp;nbsp;выведется значение первой ячейки первого листа.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/5587410632171878943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/5587410632171878943'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2011/04/c-excel-com.html' title='C# чтение и запись в Excel без использования COM'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-6258344465966361025</id><published>2011-04-21T18:03:00.001+06:00</published><updated>2012-03-14T15:44:21.060+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>C# 4.0 + IronPython 2.7</title><content type='html'>Простейший пример встраивания&amp;nbsp;интерпретатора&amp;nbsp;IronPython в наше .NET приложение.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Допустим имеем питоновский класс:&lt;br /&gt;
&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_1929418692&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_1929418692&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Calculator(object):&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;add(&lt;/span&gt;self&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;a,&amp;nbsp;b):&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;a&amp;nbsp;+&amp;nbsp;b&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
Создадим простое консольное приложение на C# вызывающее метод add питоновского класса Calculator.&lt;br /&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_0815691588&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_0815691588&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System.Collections.Generic;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System.Linq;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;System.Text;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;IronPython.Hosting;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;IronPython.Runtime;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Microsoft.Scripting;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Microsoft.Scripting.Hosting;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;ConsoleApplication1&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Program&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;Main(&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;[]&amp;nbsp;args)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;1;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;y&amp;nbsp;=&amp;nbsp;2;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;scriptPath&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Calculator.py&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptEngine&amp;nbsp;engine&amp;nbsp;=&amp;nbsp;Python.CreateEngine();&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptSource&amp;nbsp;source&amp;nbsp;=&amp;nbsp;engine.CreateScriptSourceFromFile(scriptPath);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptScope&amp;nbsp;scope&amp;nbsp;=&amp;nbsp;engine.CreateScope();&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ObjectOperations&amp;nbsp;op&amp;nbsp;=&amp;nbsp;engine.Operations;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source.Execute(scope);&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dynamic&amp;nbsp;Calculator&amp;nbsp;=&amp;nbsp;scope.GetVariable(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Calculator&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dynamic&amp;nbsp;calc&amp;nbsp;=&amp;nbsp;Calculator();&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Console.WriteLine(&amp;nbsp;calc.add(x,y));&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Console.WriteLine(calc.add(12,&amp;nbsp;22));&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Console.WriteLine(calc.add(&lt;span style=&quot;color: blue;&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;b&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
Библиотеки классов Microsoft.Scripting и IronPython находятся в папке с установленным&amp;nbsp;IronPython. Результатом выполнения программы будет: &quot;3, 34, ab&quot;.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6258344465966361025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/6258344465966361025'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2011/04/c-40-ironpython-27.html' title='C# 4.0 + IronPython 2.7'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-3683788984501456788</id><published>2011-04-08T15:46:00.000+06:00</published><updated>2012-03-14T15:54:37.012+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Встраивание Python скриптов в Java приложение Часть 2</title><content type='html'>В прошлом посте было рассмотрено подключение&amp;nbsp;интерпретатора&amp;nbsp;Jyton к программе на Java и передачи ему команды в виде строкового выражения. Рассмотрим пример выполнения скрипта переданного&amp;nbsp;интерпретатору&amp;nbsp;из внешнего файла.&lt;br /&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Допустим у нас имеется питоновский модуль находящийся в папке &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;Script&lt;/span&gt;&quot;:&lt;/div&gt;
&lt;script&gt;
function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}
&lt;/script&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #e7e5dc; border: none; font-family: Consolas,Monaco,Courier New,Courier,monospace !important; font-size: 12px; font-weight: normal; margin: 0; overflow: auto; padding-top: 1px; padding: 0;&quot;&gt;
&lt;div id=&quot;id_9119522077&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div style=&quot;background-color: #f8f8f8; border-left: 3px solid #6CE26C; font-size: 9px; padding: 3px 8px 3px 10px;&quot;&gt;
&lt;a href=&quot;javascript:CopyToClipboard(&#39;id_9119522077&#39;)&quot; style=&quot;color: #a0a0a0; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot; style=&quot;color: #a0a0a0; float: right; margin-top: -12px;&quot;&gt;подсветка кода&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-left: 3px solid #6CE26C; color: #5c5c5c; line-height: 14px; list-style-position: outside; list-style: decimal; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;ScriptDemo():&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;__init__(&lt;/span&gt;self&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,my):&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Script&amp;nbsp;Demo&amp;nbsp;init&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;+&amp;nbsp;my&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;ret(&lt;/span&gt;self&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;):&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;esss&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: #f8f8f8; color: #5c5c5c; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;retint(&lt;/span&gt;self&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;,&amp;nbsp;i):&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white; color: inherit; margin: 0; padding: 0 3px 0 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;i*&lt;/span&gt;2&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
Доработаем немного предыдущий пример под работу с данным модулем.&lt;br /&gt;
&lt;br /&gt;
&lt;script&gt;function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}&lt;/script&gt;
&lt;DIV style=&quot;font-weight:normal;font-family:Consolas,Monaco,Courier New,Courier,monospace !important;font-size:12px;margin:0;padding:0;border:none;background-color:#E7E5DC;overflow:auto;padding-top:1px;&quot;&gt;&lt;DIV style=&quot;padding-left:45px;&quot; id=&quot;id_6319903933&quot;&gt;&lt;DIV style=&quot;padding: 3px 8px 3px 10px;font-size:9px;background-color:#f8f8f8;border-left:3px solid #6CE26C;&quot;&gt;&lt;A HREF=&quot;javascript:CopyToClipboard(&#39;id_6319903933&#39;)&quot; STYLE=&quot;text-decoration:none;color:#a0a0a0;&quot;&gt;copy to clipboard&lt;/A&gt;&lt;A style=&quot;float:right;color:#a0a0a0;margin-top:-12px;&quot; HREF=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot;&gt;подсветка кода&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;OL style=&quot;list-style:decimal;list-style-position:outside;background-color:#fff;border-left:3px solid #6CE26C;margin: 0px 0px 1px 45px !important;padding:0px;color:#5C5C5C;line-height:14px;&quot;&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;java.io.FileNotFoundException;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;java.io.FileReader;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;javax.script.ScriptEngine;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;javax.script.ScriptEngineManager;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;javax.script.ScriptException;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;class&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;Start&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;static&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;void&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;throws&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;ScriptException,&amp;nbsp;FileNotFoundException,&amp;nbsp;NoSuchMethodException&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;ScriptEngineManager&amp;nbsp;factory&amp;nbsp;=&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;new&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;ScriptEngineManager();&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;ScriptEngine&amp;nbsp;engine&amp;nbsp;=&amp;nbsp;factory.getEngineByName(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;jython&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//считываем&amp;nbsp;текстовый&amp;nbsp;файл&amp;nbsp;скрипта&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FileReader&amp;nbsp;script&amp;nbsp;=&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;new&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;FileReader(&lt;/SPAN&gt;&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;Script\\script.py&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//передаем&amp;nbsp;его&amp;nbsp;интерпретатору&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.eval(script);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//передаем&amp;nbsp;в&amp;nbsp;переменную&amp;nbsp;а&amp;nbsp;строковое&amp;nbsp;значение&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//эту&amp;nbsp;переменную&amp;nbsp;можно&amp;nbsp;будет&amp;nbsp;использовать&amp;nbsp;при&amp;nbsp;вызове&amp;nbsp;питоновских&amp;nbsp;методов&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.put(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;a&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;,&lt;/SPAN&gt;&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;&amp;nbsp;from&amp;nbsp;java1&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//создаем&amp;nbsp;объект&amp;nbsp;класса&amp;nbsp;скрипта&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.eval(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;obj&amp;nbsp;=&amp;nbsp;ScriptDemo(a)&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//присваиваем&amp;nbsp;объекту&amp;nbsp;an&amp;nbsp;значение&amp;nbsp;возвращенное&amp;nbsp;питоновским&amp;nbsp;методом&amp;nbsp;ret&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//значение&amp;nbsp;всегда&amp;nbsp;возвращается&amp;nbsp;типа&amp;nbsp;Object&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Object&amp;nbsp;an&amp;nbsp;=&amp;nbsp;engine.eval(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;obj.ret()&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(an.toString());&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;int&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;n=&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#C00000;&quot;&gt;3&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.put(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;b&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;,n);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Object&amp;nbsp;bn&amp;nbsp;=&amp;nbsp;engine.eval(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;obj.retint(b)&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.print(&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;new&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;Integer(bn.toString()));&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;
В результате выполнения программы получаем следующий вывод&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;Script Demo init from java1
esss
6
&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/3683788984501456788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/3683788984501456788'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2011/04/python-java-2.html' title='Встраивание Python скриптов в Java приложение Часть 2'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1222530893287439435.post-4089862576618561222</id><published>2011-04-07T15:28:00.000+06:00</published><updated>2012-03-14T15:55:36.954+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Встраивание Python скриптов в Java приложение</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, &#39;san serif&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; line-height: 19px;&quot;&gt;Недавно возникла проблема выноса большей части бизнес-логики из основной программы на Java в скрипты, движком для скриптов был выбран Pyton (точнее его реализация на java - Jyton).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, &#39;san serif&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #008200; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 15px; line-height: 16px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, &#39;san serif&#39;;&quot;&gt;П&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;осле долгих тормошений гугла на эту тему пришел к следующему.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&amp;nbsp;Рассмотрим простейший пример встраивания интерпретатора&amp;nbsp;Jyton в приложение написанное на Java.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;pre class=&quot;brush: java&quot;&gt;
&lt;/pre&gt;
&lt;script&gt;function CopyToClipboard(c) { var code=getNodeData(document.getElementById(c).nextSibling);if(window.clipboardData){window.clipboardData.setData(&#39;text&#39;,code);}else{cfc=document.createElement(&#39;div&#39;);document.getElementById(&#39;-uniqueid-&#39;).appendChild(cfc);cfc.innerHTML=&#39;&lt;embed src=&quot;http://aivolkov.ru/_js/clipboard.swf&quot; FlashVars=&quot;clipboard=&#39;+encodeURIComponent(code)+&#39;&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&#39;;}alert(&#39;The code is in your clipboard now&#39;);} function getNodeData(c){var t=&#39;&#39;;if(c.nodeType==3)return c.data;if (c.hasChildNodes()){for(var i=0;i&lt;c.childNodes.length;i++)t+=getNodeData(c.childNodes[i]);}return t;}&lt;/script&gt;
&lt;DIV style=&quot;font-weight:normal;font-family:Consolas,Monaco,Courier New,Courier,monospace !important;font-size:12px;margin:0;padding:0;border:none;background-color:#E7E5DC;overflow:auto;padding-top:1px;&quot;&gt;&lt;DIV style=&quot;padding-left:45px;&quot; id=&quot;id_3424547046&quot;&gt;&lt;DIV style=&quot;padding: 3px 8px 3px 10px;font-size:9px;background-color:#f8f8f8;border-left:3px solid #6CE26C;&quot;&gt;&lt;A HREF=&quot;javascript:CopyToClipboard(&#39;id_3424547046&#39;)&quot; STYLE=&quot;text-decoration:none;color:#a0a0a0;&quot;&gt;copy to clipboard&lt;/A&gt;&lt;A style=&quot;float:right;color:#a0a0a0;margin-top:-12px;&quot; HREF=&quot;http://aivolkov.ru/online-syntax-highlighter/&quot;&gt;подсветка кода&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;OL style=&quot;list-style:decimal;list-style-position:outside;background-color:#fff;border-left:3px solid #6CE26C;margin: 0px 0px 1px 45px !important;padding:0px;color:#5C5C5C;line-height:14px;&quot;&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;javax.script.ScriptEngine;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;javax.script.ScriptEngineManager;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;import&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;javax.script.ScriptException;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;class&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;main&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;static&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;void&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;throws&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;ScriptException&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//&amp;nbsp;создаем&amp;nbsp;движок&amp;nbsp;скриптов&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptEngineManager&amp;nbsp;factory&amp;nbsp;=&amp;nbsp;&lt;SPAN style=&quot;color:#069;font-weight:bold;&quot;&gt;new&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;ScriptEngineManager();&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//&amp;nbsp;встраиваем&amp;nbsp;в&amp;nbsp;него&amp;nbsp;интерпретатор&amp;nbsp;Jyton&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptEngine&amp;nbsp;engine&amp;nbsp;=&amp;nbsp;factory.getEngineByName(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;jython&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style=&quot;color:#008200;&quot;&gt;//&amp;nbsp;передаем&amp;nbsp;ему&amp;nbsp;Python&amp;nbsp;код&amp;nbsp;в&amp;nbsp;виде&amp;nbsp;строки&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.eval(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;print&amp;nbsp;&#39;Hello,&amp;nbsp;World&#39;&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.eval(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;a=1&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;engine.eval(&lt;SPAN style=&quot;color:blue;&quot;&gt;&quot;print&amp;nbsp;a&quot;&lt;/SPAN&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#F8F8F8;color:#5C5C5C;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;LI style=&quot;background-color:#fff;color:inherit;padding:0 3px 0 10px;margin:0;&quot;&gt;&lt;SPAN style=&quot;color:black;background-color:inherit;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 16px;&quot;&gt;В результате выполнения программы мы увидим в консоли &quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 16px;&quot;&gt;Hello, World&quot; и &quot;1&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 16px;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4089862576618561222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1222530893287439435/posts/default/4089862576618561222'/><link rel='alternate' type='text/html' href='http://mymemoryjob.blogspot.com/2011/04/python-java.html' title='Встраивание Python скриптов в Java приложение'/><author><name>P_A_</name><uri>http://www.blogger.com/profile/17508177866452873297</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>