text stringlengths 8 5.77M |
|---|
It’s been 20 years since the premiere of Neon Genesis Evangelion, and 5 years since studio Gainax has produced anything anyone actually cared about.However mere numbers haven’t stopped Evangelion fans from digging exceedingly deep into the metaphorical messages of what’s been called “The Best Show That Aired in the Second Half of the 90’s Except for Cowboy Bebop and Maybe Great Teacher Onizuka”.
After 20 years of brooding, fans are finding that their hard drives don’t have enough free space to save their analyses of the landmark series that they’ve spent their lives compiling. John Matthews, who recently joined the dissenters sat down with Anime Maru to discuss the pandemic.
AM: Mr. Matthews, thank you for sitting down with Anime Maru to discuss your current situation. We know that your time has become very valuable these days. Would you please begin by describing your current relationship with the Evangelion franchise?
Matthews: Ah- yes, I watched the three existing Rebuild of Evangelion movies last week and found them to be a hallmark of modern animation and story creation. I haven’t watched the original series because the animation looks old and dated in comparison.
AM: I see. Anyways, you joined the cause because you don’t have enough hard drive space to save your analysis, correct? Could you please elaborate?
Matthews: Well you see, while watching the Rebuilds I noticed a deep metaphorical meaning between the amount of eye contact the main character, Shinji, makes with tertiary side characters. You would think that the side characters with next to no lines serve little purpose, but every seasoned Eva veteran knows that NOTHING Hideaki Anno does is arbitrary or unnecessary. However by the time I had put all of my thoughts down I had already extended into the 107th page.
AM: That certainly is impressive Mr. Matthews, however isn’t 100+ pages still quite small for most word processors?
Matthews: And what, delete portions of my Asuka douj- I mean, fanart folder to make room? I didn’t know your site would be sending uneducated casuals for interviews…
According to Matthews, there are “probably at least more than a dozen” fans across the internet’s various Evangelion boards experiencing the same problem, and that widespread riots are “hypothetically inevitable”. Unfortunately Matthews declined any further questions, citing refusal to talk to “uneducated Rei-fan scum”.
Anime Maru was unable to find any actual fans of Rei Ayanami to comment on Matthew’s interview.
When and why any of the protesters will get justice is still uncertain. However it’s been made clear that justice will not be served until the final Rebuild installment is released, allowing fans to finally lay the Evangelion series to rest in the halls of history.
“The final movie will tie up all of the loose ends,” One fan claims. “I’m sure of it”.
Share this: Facebook
Reddit
Twitter
Email
|
Guatemalan Rebels Launch Attack To Show Solidarity With Salvadoran Rebels
On Nov. 18, the Guatemalan National Revolutionary Unity (URNG) announced that rebels killed 12 soldiers in an attack on a Guatemalan army barracks to show their support for the Salvadoran rebels. In a statement published by the Cerigua news agen...
This is only an abstract of the requested article. To obtain the full text,
please purchase a subscription or inquire with your institution as to its subscription
to LADB. |
Duncan D. Hunter (R-Calif.), who gets most of his campaign money from the defense industry, decided to try and shame a four-star general because his defense clients aren't getting the right contracts. THEN, he tried to walk out before the general answered. It didn't work out too well for him. The video starts at the end of the congressman's rant, right before he tries to walk out at 3:30. |
Phorbol diesters stimulate the accumulation of phosphatidate, phosphatidylethanol, and diacylglycerol in three cell types. Evidence for the indirect formation of phosphatidylcholine-derived diacylglycerol by a phospholipase D pathway and direct formation of diacylglycerol by a phospholipase C pathway.
The effect of the tumor promoter, 12-O-tetradecanoylphorbol-13-acetate (TPA), on phospholipid degradation was investigated in three cell lines of dissimilar origin, Madin-Darby canine kidney cells (MDCK), rat aorta smooth muscle cells (RASM), and bovine pulmonary artery endothelial cells (BPAE). In cells prelabeled with [3H]myristic acid, which is predominantly incorporated into phosphatidylcholine (PC), TPA treatment (80 nM) in the absence or presence of ethanol (2%) in the culture medium resulted in either the rapid generation of [3H]phosphatidate (PA) or the sustained accumulation of [3H]phosphatidylethanol (PEt), respectively. Increases in [3H]PA and [3H]PEt were paralleled by quantitative decreases in cellular [3H]PC radioactivity. TPA-induced [3H]PEt formation occurred in a similar fashion, irrespective of the presence of Ca2+ in the culture medium. The experiments demonstrate that TPA elicits PC degradation by phospholipase D (PLD) in cells of diverse origin. Data from further experiments revealed a complex relationship between TPA-induced [3H]PA and [3H]diacylglycerol (DG) generation in the three cell lines that was suggestive of dual pathways for the generation of [3H]DG. Experiments to discern the pathways for TPA-induced, PC-derived DG were conducted by comparing the variation of [3H]PA and [3H]DG formation in the absence and in the presence of increasing ethanol concentrations in the culture medium. With increasing amounts of ethanol, the formation of [3H]PA decreased at the expense of [3H]PEt formation, and depending upon the pathway operable, the amount of [3H]DG formed was either decreased, indicative of indirect formation of DG via PA phosphohydrolase, or not modified, indicative of DG formation by a direct phospholipase C (PLC) pathway. Increasing the concentration of ethanol in the medium blocked TPA-induced [3H]DG generation in MDCK cells in a concentration-dependent manner, while the formation of [3H]PEt increased at the expense of [3H]PA formation. In BPAE cells the presence of ethanol likewise reduced TPA-elicited formation of DG. Conversely, in two smooth muscle cell lines, RASM and A-10, ethanol was without influence on TPA-induced formation of [3H]DG, although [3H]PEt was generated at the expense of [3H]PA. In RASM cells prelabeled with [3H]choline, TPA induced the release to the medium of [3H]choline and [3H]phosphocholine, indicative of both PLD and PLC activation. These results show that TPA elicits DG formation from PC in MDCK cells predominantly by an indirect pathway, whereas in arterial smooth muscle cells DG is formed in part by the direct action of PLC.(ABSTRACT TRUNCATED AT 400 WORDS) |
Technology of hyperthermic intraperitoneal chemotherapy in the United States, Europe, China, Japan, and Korea.
Significant improvements in the understanding of the biologic behavior of peritoneal surface malignancies in addition to the combination of peritonectomy procedures that allow complete eradication of macroscopic peritoneal disease and hyperthermic intraperitoneal chemotherapy (HIPEC) at the time of surgery, directed at residual microscopic disease, have change the therapeutic strategy from a palliative approach to a curative intent in a selected group of patients with peritoneal carcinomatosis.The rationale for adding HIPEC is supported by the strong pharmacological advantage over systemic therapy. Because of the peritoneal-plasma barrier, intraperitoneal administration of chemotherapy results in intraperitoneal levels that are 20 to 1000 times higher than plasma levels. The chemotherapy not only directly destroys tumor cells, but also eliminates viable platelets, neutrophils, and monocytes from the peritoneal cavity. This diminishes the promotion of tumor growth associated with the wound healing process. In addition, combining the intraperitoneal chemotherapy with hyperthermia has several advantages. Heat by itself has more toxicity for cancerous tissue than for normal tissue, and this predominant effect on cancer increases as the vascularity of the malignancy decreases. Also, hyperthermia increases the penetration of chemotherapy into tissues. As tissues soften in response to heat, the elevated interstitial pressure of a tumor mass may decrease and allow improved drug penetration. Lastly, and probably most important, heat increases the cytotoxicity of selected chemotherapy agents. This synergism occurs only at the interface of heat and body tissue at the peritoneal surface.However, despite the wider acceptance to combine extensive cytoreductive surgery with intraoperative intraperitoneal heated chemotherapy, the specifics of the HIPEC administration continue to lack uniformity. The most recent consensus statement issued by the Peritoneal Surface Oncology Group International after the 2006 meeting in Milan concluded that the debate on the best method to deliver HIPEC is still open, and as a group, we declared that there is no sufficient evidence in the literature confirming the superiority of one technique over the other in terms of outcome, morbidity, and safety to the personnel in the operating room. |
Children / young people, Other charities, Voluntary bodies other than charities, Older people, People with disabilities, People of a certain ethnic / racial origin, General public, Family / whanau, Migrants / refugees
Entity Structure
The Board of Trustees shall consist of not less than 4 members. Elected members of the Board include a Chairperson, Secretary and Treasurer. The Trust employs 1 person for the administration and running of the Trust.
Annual Returns
Annual Returns are due within 6 months of a charity’s balance date (financial year-end), or a longer period if an extension has been granted.
Due Date
Date Submitted
Total Income
Total Expenditure
Financial Statements
Annual Return Summary
31/08/2018
27/09/2018
$109,111
$99,261
31/08/2017
3/09/2018
$119,457
$124,500
31/08/2016
29/08/2016
$140,297
$156,274
31/08/2015
27/08/2015
$146,694
$135,968
31/08/2014
3/10/2014
$182,690
$201,502
31/08/2013
31/08/2013
$196,190
$216,901
31/08/2012
31/08/2012
$221,350
$219,919
31/08/2011
29/08/2011
$259,106
$262,792
31/08/2010
31/01/2011
$287,817
$189,114
31/08/2009
1/09/2009
$288,850
$284,510
Officer Details
Officers
Officer Name
Position
Effective Date
Anne Kahu
Trustee
17/04/2010
Hannah Radclavina Huirangi Tamaki
Trustee
17/04/2010
Jim Kopeke
Trustee
17/04/2010
David Lawrence Hohepa Kahu
Trustee
23/03/2007
Past Officers
Officer Name
Position
Past Since
Bryan Mclean
Trustee
15/06/2014
Jean Pearl Hunt
Trustee
26/06/2012
Martin Edward Finnigan
Trustee
8/02/2011
Robyn Mary Edmonds
Pastor
16/04/2010
Stanley Gavin Edmonds
Senior Pastors
16/04/2010
Charity Updates
Here is a list of all the details changed by the charity, for example adding or removing officers, amending rules, changing balance dates or updating address details. |
Molecular and cellular events during the yeast to mycelium transition in Sporothrix schenckii.
Unbudded singlets from exponentially growing yeast cells of Sporothrix schenckii were harvested, selected by filtration and allowed to form germ tubes in a basal medium with glucose at pH 4.0 and 25 degrees C. These conditions supported only the development of the mycelial form of S. schenckii in a reproducible manner which allowed further analysis of the early cellular events occurring during the yeast-to-mycelium transition. The relationship between macromolecular synthesis (DNA and RNA synthesis) and nuclear division, hyphal growth and septum formation were investigated during germ tube formation. RNA synthesis started 0 to 3 h after the induction of germ tube formation, followed by DNA synthesis and the first nuclear division, which took place between 3 and 6 h. Germ tube formation followed nuclear division and was first evidenced 6 h after the induction of germ tube formation, but was not completed until 12 h after inoculation. Septation was first observed in these germ tubes at the mother cell-germ tube junction 6 h after induction. Addition of hydroxyurea, an inhibitor of DNA synthesis, to the medium, also inhibited nuclear division and germ tube growth, suggesting that these processes in S. schenckii are dependent upon DNA synthesis. |
All objects which spawn new particles now have a 'spawn once only' switch to prevent multiple spawning
Disabling a System object in the Object Manager will now disable all X-Particles objects in the object hierarchy under that System object
Emitters can now be set to be influenced only by modifiers in the same System object hierarchy as the emitter
New birthrate spline GUI added to the Emitter's particle emissions tab, allowing you to vary the emission rate over time
The Freeze modifier and corresponding Action now have the freeze movement, spin, and scale switches on by default (before, a Freeze modifier could be added but then had no effect until those switches were turned on manually)
New Question type - test for frozen particle - added
New Question type - test for recent collision - added
The Change Geometry Action now has several additional options to change the objects produced by a Generator or Sprite object
The Deflector modifier can now trigger Actions on collision
A spline interface to control scale has been added to the Scale modifier
The Cover/Fill modifier can now accept vertex maps as well as selection tags
Several new options added to the Cover/Fill modifier
The Control Trail Action has been recoded and its interface altered slightly to make it more logical and easier to work with |
Q:
How to stop moving to next field in Form (Excel VBA )
Am coding am Excel input form in VBA. I have a text box. I want to run a macro, and then get the focus to stay on/return to a text box after hitting enter from within that text box.
I've got the macro to run fine by using _keydown (code=13), but can't get focus to stay in the box. I've tried a setfocus at the end of the macro being called, but to no avail. I'm guessing that the code to move to the next field runs after the keydown detection.
I've searched online for the answer, but can't find anything.
Anyone know how to do this?
Thanks, Chris.
A:
After you catch the keycode, set the keycode to 0, so:
If KeyCode = 13 Then
'do stuff
KeyCode = 0
End If
|
Q:
Updating sort keys after delete
I have a table which has a field sort_id. In this field there are numbers from 1 to n, that define the order of the data sets.
Now I want to delete some elements and afterwards I want to reorder the table. Therefore I need a query that "finds" the gaps and changes the sort_id field according to the modifications.
Sure, I could do something like this:
SELECT sort_id FROM table WHERE id = 5
Then save the sort_id and afterwards:
DELETE FROM table WHERE id = 5
UPDATE table SET sort_id = sort_id - 1 WHERE sort_id > {id from above}
But I'd like to do the reordering process in one step.
A:
Mladen and Arvo have good ideas, but unfortunately in MySQL you can't SELECT and UPDATE the same table in the same statement (even in a subquery). This is a known limitation of MySQL.
Here's a solution that uses MySQL user variables:
SET @i := 0;
UPDATE mytable
SET sort_id = (@i := @i + 1)
ORDER BY sort_id;
For what it's worth, I wouldn't bother doing this anyway. If your sort_id is used only for sorting and not as a kind of "row number," then the rows are still in sorted order after you delete the row where id=6. The values don't necessarily have to be consecutive for sorting.
|
Протокол HTTP устарел – пришло время распределенной перманентной Сети
Сайт Internet Archive опубликовал призыв децентрализовать Сеть, и мы услышали его. Сегодня я делаю заявление, которое начинает наше долгое путешествие в будущее Сети. Сети более быстрой, более безопасной, более надежной и более «перманентной».
Объединив усилия с Protocol Labs, Neocities стал первым крупным сайтом, реализовавшим Межпланетную файловую систему (IPFS, InterPlanetary File System) в рабочей среде. Начиная с сегодняшнего дня, все веб-сайты Neocities можно просмотреть, заархивировать и разместить на любых IPFS-узлах в мире. Если один из IPFS-узлов решит разместить у себя сайт от Neocities, эта версия сайта останется доступна даже в том случае, если Neocities прекратит работу или хостинг этого сайта у себя. Чем больше IPFS-узлов обслуживают сайты Neocities, тем доступнее (и избыточнее) эти сайты и тем менее централизована их зависимость от нас.
Что такое IPFS? Вот выдержка из файла README:
«IPFS — это распределенная файловая система, созданная с целью объединить все вычислительные устройства. В некоторых отношениях это похоже на первоначальные цели создателей Web, но на самом деле IPFS больше похожа на торрент-рой, обменивающийся объектами git. IPFS может стать новой важной подсистемой Интернета. Если построить ее правильно, она сможет дополнить или заменить HTTP и не только. Это кажется безумием — так оно и есть».
Разработка IPFS пока продвинулась только до выпуска альфа-версий, так что мы все еще считаем проект во многом экспериментальным. IPFS (пока) не заменила наще существующее хранилище сайтов, и, как и в любую новую сложную технологию, в нее предстоит внести еще много улучшений. Однако IPFS — не vaporware, а рабочая система. Вы уже можете попробовать ее и использовать на своем компьютере, если хотите помочь нам хранить сайты Neocities и обслуживать их посетителей.
Скажу прямо: я всерьез считаю, что IPFS может заменить HTTP (и много чего еще) и что пришло время начать пробовать ее. Предложение заменить HTTP может показаться безумием — так оно и есть! Но HTTP дефектен, и самое безумное, что мы можем сделать, это продолжить использовать его вечно. Вместо этого нам нужно применить передовые достижения компьютерных наук к проблеме распределенных вычислений и разработать для WWW улучшенный протокол.
Часть 1. Что не так с HTTP?
Протокол HTTP объединил весь мир в глобальное информационное пространство, стандартизировав распространение информации. Я не могу даже представить, какой была бы наша жизнь без него. HTTP снизил стоимость публикации контента почти до нуля, что нанесло мощнейший удар по экономическому, политическому и культурному контролю над распространением информации (музыки, идей, видео, новостей, игр и всего остального). Существенно упростив обмен информацией и сделав ее публикацию более эгалитарной и доступной, HTTP многое сделал для нашей культуры.
Я люблю HTTP и всегда буду любить. Это действительно одно из величайших и важнейших изобретений всех времен.
И все же, несмотря на то, что HTTP позволил многого достичь, он становится слишком ненадежной основой для распространения и сохранения корпуса человеческих знаний. Способ распространения контента в HTTP фундаментально дефектен, и это не исправить никакой настройкой производительности или заменой скомпрометированных SSL-сертификатов. Попытку исправить ситуацию с помощью HTTP/2 можно только приветствовать, но это всего лишь консервативное обновление технологии, которая уже проявляет признаки старения. Чтобы создать лучшее будущее для WWW, нам нужна не просто улучшенная версия HTTP — нам нужен новый фундамент. Ну а, согласно модели управления киберпространством, это означает, что нам нужен новый протокол. Я очень надеюсь, что им станет IPFS.
HTTP хрупок
Компьютер NeXT Тима Бернерс-Ли в CERN — первый HTTP-сервер в мире. На компьютере виден стикер с предупреждением «Это сервер, не выключайте его!!«
Причина, по которой нельзя выключать веб-сервер, состоит в том, что на опубликованные на нем веб-сайты ссылаются сайты, расположенные на других серверах. Работоспособность любого сайта зависит от существования и доступности серверов с сайтами, на которые ссылаются ссылки с сайта-источника. Если веб-сервер отключить, ссылки перестают работать. Если же сервер выходит из строя или больше недоступен в прежнем месте, все гораздо хуже: цепь между сайтами разрывается, и доступ к их контенту утрачивается навсегда. Стикер на компьютере Тима Бернерс-Ли прекрасно демонстрирует крупнейшую проблему с HTTP: он подвержен «эрозии».
Первый веб-сервер стал музейным экспонатом — но еще и первым из миллионов будущих мертвых веб-серверов.
Наверняка все вы видели такое сообщение:
Даже если вы никогда не читали спецификацию HTTP, вы, вероятно, знаете, что означает 404. Это код ошибки, возвращаемый протоколом HTTP, если сайт больше не находится на сервере в указанном месте. Однако обычно в таких случаях на прежнем месте нет даже сервера, который мог бы ответить вам, что нужного вам контента у него нет и что он не в состоянии помочь вам найти его. Если этот контент не был сохранен в архиве Интернета, вы больше никогда его не найдете. Он утрачен навсегда.
Чем старее веб-страница, тем выше вероятность того, что при попытке просмотреть ее вы увидите ошибку 404. Такие ошибки — это надписи на молчаливых безразличных могильных камнях умирающей Сети, ничего не говорящие о том, какие знания, красоты или глупости когда-то в ней были.
В 90-х мне очень нравился сайт Mosh to Yanni, и, заглянув на него сейчас, вы сами убедитесь, насколько плохо HTTP подходит для поддержания ссылок между сайтами. Весь статичный контент, сохраненный на сайте, все еще загружается, и мой современный браузер в состоянии отобразить страницу (в отличие от HTTP, HTML держится вполне неплохо). Но любые ссылки с сайта и ссылки на динамический контент мертвы. Возможно, потеря этого контента — не такая уж и беда, но на каждый такой сайт приходятся бесчисленные примеры невероятно полезного контента, который также давным давно стал недоступен. Является ли такой контент сомнительным мусором или имеет непреходящую ценность, это все же наша история, и мы быстро ее теряем.
Причина, по которой это происходит, проста: центрально управляемые веб-серверы неизбежно рано или поздно покидают сеть. Возможно, владелец домена продает его или оставляет бизнес. Возможно, сервер выходит из строя, а у администратора нет резервной копии контента. Если каждый развернет свой личный HTTP-сервер, это не решит проблему и даже может усугубить ее.
HTTP способствует сверхцентрализации
Эрозия данных углубляет нашу зависимость от крупных централизованных служб. В кратковременном масштабе доступность данных в таких службах довольно хороша благодаря избыточным резервным копиям, но это все равно не решает проблему долговременной доступности и создает целый ряд новых проблем.
Со дня, когда Джон Перри Барлоу обнародовал «Декларацию независимости киберпространства», прошло много лет. По мере того как наша электронная страна набирала влиятельность и помогала миру работать с растущими объемами информации, правительства и корпорации принялись эксплуатировать дефекты HTTP, используя их для того, чтобы шпионить за нами, монетизировать наши данные и блокировать для нас (зачастую под надуманным предлогом) доступ к любому контенту, который представляет угрозу для статус-кво.
Предполагалось, что Сеть должна быть децентрализованной, но Сеть, с которой мы имеем дело сегодня, быстро централизуется по мере того как миллиарды пользователей становятся зависимыми от небольшого количества сервисов. Независимо от того, считаете ли вы это приемлемым, протокол HTTP замышлялся не таким. Организациям вроде АНБ (и нашим будущим роботам-правителям) теперь достаточно перехватывать коммуникации всего лишь в нескольких источниках, чтобы шпионить за нами. Это позволяет государствам легко цензурировать контент на их границах, блокируя для сайтов доступ к централизованным ресурсам, и подвергает коммуникации риску DDoS-атак.
Распределение Сети может подорвать возможности могущественных организаций манипулировать доступом к ней и сделать нас более свободными и независимыми. Кроме того, это сократило бы риск крупного сбоя, способного привести к утрате крупного объема данных.
HTTP неэффективен
На день написания этой статьи ролик Gangnam Style был просмотрен 2 344 327 696 раз. Давайте, посмотрите его еще раз, я подожду:
Выполним кое-какие расчеты. Объем видеоролика составляет 117 МБ. Это означает, что со дня его публикации серверы отправили 274 286 340 432 МБ, или 274,3 ПБ только видеоданных. Если исходить из 1 цента за гигабайт трафика, получается, что на распространение одного лишь этого файла было потрачено 2742 860 долларов.
Это не так уж и плохо… если вы Google. Но если вы управляете меньшим сайтом, расходы на обслуживание такого объема данных сильно ударили бы по вашему карману, особенно если учесть, что для меньших компаний тарифы на пропускную способность начинаются примерно с 12 центов и доходят в Азии до 20 центов за гигабайт. В Neocities я провел много времени, сражаясь с этой проблемой, чтобы сократить расходы на обслуживание нашей инфраструктуры.
Да, HTTP удешевил публикацию контента, но это все равно значительная расходов. Распространять большие объемы контента из центров данных может быть очень дорого, если вы не в состоянии сэкономить благодаря масштабу обслуживания.
Что, если вместо получения этого контента из центров данных мы могли бы добавить каждый компьютер, подключенный к сети интернет-провайдера, в поточную CDN (сеть доставки контента)? Тогда популярное видео вроде Gangnam Style можно было бы полностью скачивать из сети провайдера без передачи многочисленных пакетов по магистралям Интернета. Это лишь один из примеров того, что может улучшить файловая система IPFS.
HTTP создает чрезмерную зависимость от интернет-магистралей
Если контент сверхцентрализован, его доступность очень зависит от работы интернет-магистралей, ведущих к центрам данных. Помимо того, что это позволяет государствам легко блокировать и цензурировать контент, с этим также связаны проблемы надежности. Несмотря на избыточность, крупные магистрали иногда повреждаются, иногда допускаются ошибки при настройке таблиц маршрутизации, и последствия всего этого могут быть плачевными.
Я сам испытал странный вкус такой проблемы несколько месяцев назад, когда автомобильный инцидент привел к замедлению работы Neocities (подозреваемых пока нет, но есть несколько многообещающих зацепок). Я также слышал истории о том, что охотники стреляли в кабели, соединяющие центры данных в восточном Орегоне (огромные центры, хранящие действительно много данных), — для восстановления связи инженерам пришлось выезжать на ремонт на снегоходах! Совсем недавно появились подробности об атаках на кабели в области залива Сан-Франциско… В общем, интернет-магистрали не совершенны, их легко атаковать, и, чтобы причинить много проблем, достаточно просто перерезать несколько важных кабелей.
Часть 2. Как IPFS решает эти проблемы
Мы обсудили проблемы HTTP (и сверхцентрализации). Давайте теперь поговорим о том, как IPFS может помочь улучшить WWW.
Самое важное в IPFS то, что она фундаментально изменяет способ поиска контента. Используя HTTP, вы ищете места расположения контента. В IPFS вы ищете сам контент.
Позвольте пояснить это на примере. Вот файл на моем сервере: https://neocities.org/img/neocitieslogo.svg. При переходе по этой ссылке ваш браузер сначала находит расположение (IP-адрес) сервера с файлом, а затем запрашивает у сервера сам файл, указывая путь к нему. При такой архитектуре только владелец сервера (я) определяет, какой файл выдать вам в ответ на запрос, и вы вынуждены полагаться на меня в том, что я не перемещу файл и не отключу сервер.
Что, если вместо того, чтобы искать центрально контролируемое расположение и просить у сервера нечто, расположенное по пути /img/neocitieslogo.svg, мы запрашивали бы у распределенной сети из миллионов компьютеров не имя файла, а контент, который должен находиться в файле?
Именно это и делает IPFS.
Когда файл neocities.svg добавляется на мой узел IPFS, он получает новое имя: QmXGTaGWTT1uUtfSb2sBAvArMEVLK4rQEcQg5bv7wwdzwU. На самом деле это криптографический хеш, представляющий содержимое этого и только этого файла. Если я изменю в файле хоть один бит, хеш полностью изменится.
Когда я запрашиваю у распределенной сети IPFS этот хеш, она эффективно — за 20 «скачков» (hops) в случае сети из 10 миллионов узлов — находит узлы с этими данными с помощью распределенной хеш-таблицы (DHT), получает и проверяет их. В любой системе с DHT есть проблемы с атаками Сибиллы, но у нас есть новые способы их решения, и я уверен, что они решаемы (в отличие от проблем с HTTP, которые его погубят).
IPFS — система общего назначения и почти не ограничена в плане объема хранилища. Она может эффективно хранить и возвращать как небольшие файлы, так и крупные. Она автоматически делит крупные файлы на меньшие блоки, что позволяет узлам IPFS скачивать (или получать в поточном режиме) файлы не только с одного, но сразу с сотен серверов. Сеть IPFS — это федеративная распределенная CDN «без доверия» с широкими возможностями точной настройки. Она прекрасно подходит для обслуживания любых данных: изображений, поточного видео, распределенных баз данных, целых операционных систем, блокчейнов, резервных копий дискет и, что для нас важнее всего, статичных веб-сайтов.
Файлы IPFS могут также быть специальными объектами каталогов IPFS, что позволяет использовать понятные людям имена файлов (которые прозрачно ссылаются на другие хеши IPFS). Вы можете загрузить файл index.html каталога так же, как и при работе со стандартным HTTP-сервером. Благодаря объектам каталогов IPFS вы можете создавать статичные веб-сайты так же, как вы делаете сегодня. Добавить веб-сайт на узел IPFS можно одной командой: ipfs add -r yoursitedirectory. После этого сайт доступен с любого узла IPFS, и в HTML-коде вам даже не нужно ссылаться на какие-либо хеши (вот один пример, а вот второй пример с переименованным файлом index.html).
Интеграция данных с помощью IPFS
IPFS не требует от каждого узла хранить весь контент, который когда-либо был опубликован в IPFS, — вместо этого вы сами выбираете, какие данные вы хотите помочь сохранить. Думайте об этом как о закладках, только вместо того, чтобы заносить в «Избранное» ссылки на сайты, которые в конечном итоге исчезнут, вы создаете резервную копию всего сайта для себя и добровольно помогаете выдавать его контент другим пользователям, которые захотят взглянуть на него.
Если небольшие фрагменты контента размещены на большом количестве узлов, их ресурсы быстро суммируются в бОльшее место на диске, бОльшую пропускную способность и лучшую доступность, чем когда-либо сможет предоставить любой централизованный HTTP-сервис. Распределенная веб-сеть может за сравнительно небольшое время стать самым быстрым, самым доступным и крупнейшим хранилищем данных на Земле. В такой системе никто не сможет «сжигать книги», отключая сайты. Александрийская библиотека больше не сгорит никогда.
Скопировать веб-сайт в IPFS, сохранить его и помочь отправлять его контент пользователям совсем несложно. Достаточно ввести одну команду с хешем сайта — ipfs pin add -r QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8, — а об остальном позаботится IPFS.
IPNS
Хеши IPFS представляют неизменяемые данные, т. е. данные невозможно изменить, не изменив сам хеш. Это хорошо, потому что помогает обеспечить персистентность данных, но нам все же нужен способ поиска последнего хеша, представляющего ваш сайт. В IPFS для этого используется IPNS.
IPNS позволяет взять хеш IPFS, представляющий с помощью открытого ключа последнюю версию вашего сайта, и подписать ссылку на него с помощью закрытого ключа. Если вы использовали Биткойн, схема должна быть вам знакома: биткойн-адрес — это тоже хеш открытого ключа. Например, на нашем IPFS-узле Neocities я подписал изображение Пенелопы (маскот нашего сайта), и вы можете загрузить его, используя IPNS-хеш открытого ключа этого узла: QmTodvhq9CUS9hH8rirt4YmihxJKZ5tYez8PtDmpWrVMKP.
IPNS еще разрабатывается, так что если эта ссылка не сработает, не беспокойтесь. Просто знайте, что я смогу изменять контент, на который указывает хеш открытого ключа, но сам хеш всегда останется тем же. Когда система IPNS будет готова, она решит проблему обновления сайтов.
Теперь нам просто нужно сделать так, чтобы расположения этих сайтов были понятны людям, и у нас есть все, что для этого нужно.
Изменяемая адресация, понятная людям
Хеши IPFS/IPNS — это большие уродливые строки, которые трудно запомнить. Поэтому IPFS поддерживает существующие DNS-имена, чтобы можно было предоставлять понятные ссылки на контент IPFS/IPNS. Для этого следует вставить хеш в TXT-запись на сервере имен (если у вас под рукой командная строка, выполните эту команду: dig TXT ipfs.git.sexy). Вы можете увидеть все в действии, посетив адрес http://ipfs.io/ipns/ipfs.git.sexy/.
Далее у нас есть планы по реализации в IPFS поддержки Namecoin, что теоретически позволяет создать полностью децентрализованную распределенную Сеть без какого-либо центрального авторитета. Только подумайте: никакого ICANN, никаких центральных серверов, никаких политик, никаких дорогостоящих центров сертификации и никаких критических уязвимых мест. Это кажется безумием — так оно и есть. И все же с современными технологиями это вполне возможно!
HTTP-шлюз IPFS: мост между старым и новым WWW
IPFS поставляется с HTTP-шлюзом, который я использовал для демонстрации примеров. Он позволяет современным веб-браузерам получать доступ к IPFS, пока в них самих прямая поддержка IPFS еще не реализована (Скажете, что еще слишком рано? Меня это не волнует). Благодаря HTTP-шлюзу IPFS (и кое-каким манипуляциям с nginx) мы можем не ждать. Вскоре мы можем начать переходить на платформу IPFS для хранения, распределения и выдачи веб-сайтов.
Как мы используем IPFS сейчас
Наша первоначальная реализация IPFS является пока экспериментальной и ограниченной. Neocities будет публиковать хеш IPFS раз в день при обновлении сайтов, и он будет доступен из профиля каждого сайта. Этот хеш будет указывать на новейшую версию сайта и будет доступен через наш HTTP-шлюз IPFS. Поскольку хеш IPFS изменяется при каждом обновлении, мы также сможем вести архивную историю всех сайтов — эту возможность мы «автомагически» получаем благодаря особенностям IPFS.
Как мы будем использовать IPNS в будущем
Если все пойдет хорошо, мы хотим использовать IPFS для хранения всех наших сайтов и выпускать ключи IPNS для каждого сайта. Это позволит пользователям публиковать контент на их сайтах независимо от нас. При условии, что мы сделаем все правильно, наши пользователи смогут обновлять свои сайты, даже если Neocities прекратит существование. Мы дробим центральную зависимость пользователей от наших серверов на части, что раз и навсегда подрывает наши потенциальные планы по завоеванию централизованного мира. Как вам это?
Мы все еще в начале пути, и нужно многое сделать, прежде чем замену HTTP системой IPFS перестанут воспринимать как безумие. Но планировать будущее и готовить Интернет к нему нужно уже сейчас. Отнеситесь к призыву Internet Archive серьезно: распределите Веб.
Кайл (kyledrake), 8 сентября 2015 года
Источник: blog.neocities.org
Neocities в Twitter: https://twitter.com/neocitiesweb |
At the moon base, a while back. |
Loading markets...
The France U21 international has been generating a lot of interest from across Europe, with the 19-year-old aware of attention emanating out of Newcastle.
Learning
"I don't know where the speculation regarding Newcastle has come from, but it is good to be watched by scouts," Sissoko told skysports.com.
"Sometimes these things come to nothing and they recruit a different player, but if they want me then I am working hard.
"I love the Premier League. It is the best league in the world. The stadiums are always full and I believe my game would be suited to the English style as I like the physical aspects of it.
"Newcastle? They are a big team, with big support. From what I have been told they have the best fans in England.
"But, it is up to Toulouse. I am happy here and I am still learning. If they think it is time for me to move on then I will, but at the moment my desire is to play for Toulouse and keep on proving myself." |
(EMAILWIRE.COM, January 13, 2011 ) Minneapolis, MN - ADM Tronics Unlimited Inc. (OTC BB:ADMT.OB) is the only OTCBB stock listed on here, but http://www.extremestockpicks.com feels that (ADMT) is a bargain at under .03 cents a share and Extreme Stock Picks feels that (ADMT) could see .10 cents very soon.
(ADMT) is slowly starting to sneak up in price.
Be sure to visit us at http://www.extremestockpicks.com and sign up for our FREE email alerts. we at Extreme Stock Picks have been on fire, our last pick went up over 200%.
Talbots Inc. (NYSE:TLB) is nearing in on its 52 week low and should jump to around $8 within a month.
SuperValu Inc. (NYSE:SVU) is a big company that has been around for a long time and will also be sticking around for a long time.
Look for (SVU) to see $12 in 2011.
Sprint Nextel Corporation (NYSE:S) is a great stock to be in right now, mainly because they have the best rates and plans in the industry.
Citigroup Inc. (NYSE:C) is a slow gainer, but (c) does gain. (C) should be at over $12 a share in two years.
Out of the five stocks mentioned, Extreme Stock Picks feels that ADM Tronics Unlimited Inc. (ADMT.OB) is not only an immediate buy, but also a "Strong"Buy".
About Extreme Stock Picks:
Extreme Stock Picks is an investor relations site that provides free e-newsletters and stock alerts from its web site, http://www.extremestockpicks.com. The company covers all sectors of the market from undervalued penny stocks to big-board bottom bouncers.
Disclaimer: Extreme Stock Picks is not a registered investment advisor. Investors are responsible for doing their own research and obtaining professional investment advice. Extreme Stock Picks does not guarantee the accurateness of information in its communications. Investors should read the full disclaimer at http://www.extremestockpicks.com before investing in any stock featured by the site. |
Q:
Django REST framework custom format for all out responses
In my project I use DRF as backend and Angular as frontend.
Django==1.10
djangorestframework==3.7.1
I need all responses from DRF to be in the following format.
{
"status": "", // 200,400,.....etc
"error": "", // True, False
"data": [], // data
"message": "" // Success messages
}
Currently it is in
[
{
"id": 1,
"name": ""
},
{
"id": 2,
"name": ""
}
]
it should be
{
"status": "200",
"error": "False",
"data": [
{
"id": 1,
"name": ""
},
{
"id": 2,
"name": ""
}
],
"message": "Success"
}
for this i have written a custom viewset and overridden the functions list, detail, create, update
class ResponseModelViewSet(viewsets.ModelViewSet):
def list(self, request, *args, **kwargs):
queryset = self.filter_queryset(self.get_queryset())
page = self.paginate_queryset(queryset)
if page is not None:
serializer = self.get_serializer(page, many=True)
return self.get_paginated_response(serializer.data)
serializer = self.get_serializer(queryset, many=True)
custom_data = {
"status": True,
"error": False,
"message": 'message',
"data": serializer.data
}
return Response(custom_data)
def create(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)
self.perform_create(serializer)
headers = self.get_success_headers(serializer.data)
custom_data = {
"status": True,
"error": False,
"message": 'message',
"data": serializer.data
}
return Response(custom_data, status=status.HTTP_201_CREATED, headers=headers)
def retrieve(self, request, *args, **kwargs):
instance = self.get_object()
serializer = self.get_serializer(instance)
custom_data = {
"status": True,
"error": False,
"message": 'message',
"data": serializer.data
}
return Response(custom_data)
def update(self, request, *args, **kwargs):
partial = kwargs.pop('partial', False)
instance = self.get_object()
serializer = self.get_serializer(instance, data=request.data, partial=partial)
serializer.is_valid(raise_exception=True)
self.perform_update(serializer)
if getattr(instance, '_prefetched_objects_cache', None):
# If 'prefetch_related' has been applied to a queryset, we need to
# forcibly invalidate the prefetch cache on the instance.
instance._prefetched_objects_cache = {}
custom_data = {
"status": True,
"error": False,
"message": 'message',
"data": serializer.data
}
return Response(custom_data)
and in views i use my custom viewset
from common.baseview import ResponseModelViewSet
class PositionViewsets(ResponseModelViewSet):
serializer_class = PositionSerializer
permission_classes = (IsAuthenticated,)
model = Position
def get_queryset(self):
return Position.objects.filter(order__user=self.request.user)
I am not sure if this is the correct way of doing it or there is some other efficient way to do it.
Anyway this works for my custom apps but not for the Authentication app
i used the default rest apps
'rest_framework.authtoken',
'rest_auth',
For login using username and password and get the success response as follows.
{
"key": "e642efd0b78e08b57bf34fa999f49b70a7bfe21a"
}
Instead i need this.
{
"status": "200",
"error": "False",
"data": [
{
"token":{
"key":"e642efd0b78e08b57bf34fa999f49b70a7bfe21a"
}
}
],
"message": "Login Sucess"
}
for error
{
"status": "error",
"error": "True",
"data": [
{
"email": ["Enter a valid email address."]
}
],
"message": "Login Failed"
}
A:
After some research I found a way to do this. I had to override the default behaviour of the ModelViewSet to output a different response.
I created a custom Response format initially:
class ResponseInfo(object):
def __init__(self, user=None, **args):
self.response = {
"status": args.get('status', True),
"error": args.get('error', 200),
"data": args.get('data', []),
"message": args.get('message', 'success')
}
Then use this custom format in every method of the ModelViewSet:
class ResponseModelViewSet(viewsets.ModelViewSet):
def __init__(self, **kwargs):
self.response_format = ResponseInfo().response
super(ResponseModelViewSet, self).__init__(**kwargs)
def list(self, request, *args, **kwargs):
response_data = super(ResponseModelViewSet, self).list(request, *args, **kwargs)
self.response_format["data"] = response_data.data
self.response_format["status"] = True
if not response_data.data:
self.response_format["message"] = "List empty"
return Response(self.response_format)
def create(self, request, *args, **kwargs):
response_data = super(ResponseModelViewSet, self).create(request, *args, **kwargs)
self.response_format["data"] = response_data.data
self.response_format["status"] = True
return Response(self.response_format)
def retrieve(self, request, *args, **kwargs):
response_data = super(ResponseModelViewSet, self).retrieve(request, *args, **kwargs)
self.response_format["data"] = response_data.data
self.response_format["status"] = True
if not response_data.data:
self.response_format["message"] = "Empty"
return Response(self.response_format)
def update(self, request, *args, **kwargs):
response_data = super(ResponseModelViewSet, self).update(request, *args, **kwargs)
self.response_format["data"] = response_data.data
self.response_format["status"] = True
return Response(self.response_format)
def destroy(self, request, *args, **kwargs):
response_data = super(ResponseModelViewSet, self).destroy(request, *args, **kwargs)
self.response_format["data"] = response_data.data
self.response_format["status"] = True
return Response(self.response_format)
|
Jesús E. Maldonado
Jesús E. Maldonado is an American research geneticist from the Center for Conservation and Evolutionary Genetics at the Smithsonian Institution.
Career
Maldonado graduated to Bachelor of Science at the Shippensburg University of Pennsylvania in 1983 and to Master of Science at the same university in 1985. In 2001, he promoted to Ph.D. in Organismic Biology, Ecology and Evolution at the University of California Los Angeles. In 1998, he joined the Smithsonian Institution where he worked at the Genetics Program for the National Zoological Park and the National Museum of Natural History in Washington, DC. His main research field is the evolutionary genetics of mammals. In 1996, he began his long-term study of kit foxes where he used mitochondrial DNA sequence data to compare the phylogenetic relationships of the endangered Mexican kit fox with North American arid land foxes. In 2002, he described the two subspecies Ozotoceros bezoarticus arerunguaensis and Ozotoceros bezoarticus uruguayensis of the Pampas deer. In addition he did genetic research work on rare or endangered mammals. In 2013, he was among the team who scientifically described the olinguito.
References
Complete list of Maldonado's publications.
Staff profile from the Smithsonian Institution.
Category:Date of birth missing (living people)
Category:Place of birth missing (living people)
Category:American geneticists
Category:American mammalogists
Category:Living people
Category:Year of birth missing (living people) |
Soft tissue Rosai-Dorfman disease of the posterior mediastinum.
Rosai-Dorfman disease (RDD) consists of sinus histiocytosis with massive lymphadenopathy. Extranodal involvement occurs in up to 43% of cases. However, isolated soft tissue RDD is rare. Isolated mediastinal RDD is exceedingly rare, and there have been only three previous reports. Involvement of the posterior mediastinum in RDD has been reported only in the context of disseminated RDD. Here, we report the case of a 49-year-old female patient with a two-year history of cervical pain and lymphadenomegaly, which resolved spontaneously. A CT scan revealed a left paravertebral mass with a diameter of 6 cm. The patient was submitted to surgical excision of the mass. Microscopic examination and immunophenotyping of the surgical specimen led to a diagnosis of RDD. During a 12-month follow-up period, the patient complained of mild cough and chest pain. Periodic imaging tests showed no sign of recurrence, and no postoperative cervical lymphadenomegaly was detected. |
The trend is to make homes more energy efficient in order to conserve energy as well as saving money for the owner. While this is generally desirable, it does increase the problem of indoor air pollution. Some studies have indicated that indoor air is 50 times more polluted than outdoor air. Among some of the indoor pollutants detected include cleaning product residues, smoke particles, formaldehyde, pollens, dander, molds and mildews, fungi, dust mites, etc.
While these pollutants are present in the outdoor environment, they are greatly reduced by the combined action of an abundant oxygen supply due to trees, shrubs and other oxygen producing vegetation, radiation from soil and rocks, friction between the layers of wind, ultraviolet radiation form the sun, rain and the splitting of water droplets by the action of waterfalls and lightening all of which combine to produce negative ions and ozone. Dangerous ions cling to the ozone and fall out of the atmosphere greatly decreasing the pollutant concentration. This is evident in the “clean air” feeling that people experience after a thunderstorm and around a waterfall.
Ionizing air cleaners are known in the art. The most effective units employ some sort of air moving component such as a fan to ensure that the created ozone is able to attract and neutralize the pollutants present in the room. This tends to make the units noisy and cost more to operate. Additionally, they tend to create a “clean zone” or “clean air island” around the unit that diminishes in effectiveness as a person moves away. There are units that do not utilize a fan, but these units are even more prone to creating clean zones concentrated around the unit. There is a need for an ionizing cleaner that effectively cleans an entire space that is easy to operate, does not consume an inordinate amount of power, is quiet and does not take up room space. |
Thousands of people in Warsaw took part in a protest against compulsory vaccination for children.
The demonstration was organised within the framework of the International Day Against Vaccinations.
In Poland, the anti-vaccine movement grows stronger and there are more and more supporters of non-vaccinations for youngsters.
Health authorities are concerned that such campaigns are having a serious negative impact on public health.
It comes as the number of measles cases quadrupled in Europe in 2017, with 35 fatalities, according to the World Health Organization. |
534 S.W.2d 661 (1975)
James A. FRANKLIN and Betty R. Franklin, Appellants,
v.
ST. PAUL FIRE AND MARINE INSURANCE COMPANY, Appellee.
Court of Appeals of Tennessee, Eastern Section.
March 26, 1975.
Certiorari Denied September 2, 1975.
*662 David T. Black, Maryville, for appellants.
William P. O'Neal, Knoxville, M.H. Gamble, Jr., Maryville, for appellee.
Certiorari Denied by Supreme Court September 2, 1975.
WILLIAM I. DAVIS, Jr., Special Justice.
The parties will be referred to as they appeared in the trial Court, the appellants as plaintiffs and appellee as defendant.
On May 15, 1970, defendant issued a policy of insurance, No. 666NC4090, to Delmar Haynes Pontiac, Inc. including garage liability coverage. Expiration date was May 15, 1973. May 30, 1972, one McCulloch, a *663 garage customer of Delmar Haynes Pontiac, Inc., was loaned a Delmar Haynes automobile while his own was being repaired. His operation of it was within the scope of permission granted by Delmar Haynes and on his own business. While thus operating the Delmar Haynes automobile, McCulloch, on May 31, 1972, was involved in an accident resulting in death of plaintiffs' son. January 31, 1973, plaintiffs obtained a judgment against McCulloch in the amount of Fifty Thousand ($50,000.00) Dollars as damages for their son's death. Thereafter defendant paid Ten Thousand ($10,000.00) Dollars on the judgment. At the time of the accident McCulloch had no valid or collectible insurance on his own automobile.
The policy of insurance in question provided under the definition of "Persons Insured" that;
"(a) Any person while using, with the permission of the named insured, any automobile to which this insuring agreement applies under the Automobile Hazard, provided his actual operation or (if he is not operating) his other actual use thereof is with the scope of such permission ..."
Another pertinent provision of the policy, known in the record as Rider No. 3 of Page 23, endorsement A5207, states "3. If there is no other valid and collectible insurance, whether primary, excess or contingent, available to the garage customer, this insuring agreement shall apply, but the amount of damages payable under the insuring agreement shall not exceed the applicable financial responsibility limit."
Under the General Conditions of the policy is also found the provision; "29. Special Statutes Any and all terms of this policy which are in conflict with the statutes of any State in which coverage is granted are understood, declared and acknowledged by the company to be amended to conform with such statutes."
Section 56-603 T.C.A. After providing that rules, rates, etc. be filed with the Commissioner by the insurer states in Sub-sec. (h) "No insuror shall make or issue a contract or policy except in accordance with the filings which have been approved for said insuror as provided in this chapter."
Plaintiffs filed an action against defendant asserting it was liable to them for the balance of the judgment they had against McCulloch because the policy in question insured McCulloch for a minimum of One Hundred Thousand ($100,000.00) Dollars, that the "Rider", endorsement, A5207, cannot be considered as a part of the policy because defendant had not complied with Section 56-603 Sub-Section H, T.C.A. which provided (H) "No insurer shall make or issue a contract or policy except in accordance with the filings which have been approved for said insurer as provided in this chapter;" that A5207 is unclear and ambiguous; that A5207 should not be considered in determining defendants liability because its provisions are discriminatory, in violation of public policy and conflict with requirements of Section 56-603 T.C.A. and the terms of the policy; and that defendants are estopped to deny that the policy issued is contrary to the filing made with the Commissioner of Insurance and Banking.
Defendants answered in detail effectively putting at issue the material allegations of plaintiffs as above stated and denying it was liable to plaintiffs for any reason.
The Trial Court ruled that the plaintiffs' action is one on a contract of insurance, sounding in contract, and is not one for excess insurance and could properly be brought by plaintiffs as third-party beneficiaries against defendant; that endorsement A5207 had been effectively withdrawn and was not on file with the Commissioner of Insurance and Banking from and after April 1, 1970, nor on file on May 15, 1970, nor at the time of the accident in question within the meaning of Section 56-603 T.C.A.; that the endorsement A5207 was, however, binding on plaintiffs, was not *664 repugnant to the spirit and intent of the financial responsibility act, meeting the minimum requirements of that act; that plaintiffs were limited in their right of recovery to the minimum coverage, required by our Financial Responsibility Act and found the issues joined in favor of defendant. Plaintiffs prayed for and were granted an appeal which was duly perfected and the case is here for review.
The Chancellor's ruling that plaintiffs have the status of third-party beneficiaries suing on contract, and may maintain this action, is not appealed from and not here questioned. The Chancellor's finding that the endorsement A5207 had been effectively withdrawn and was not on file with the Commissioner of Insurance and Banking from and after April 1, 1970, nor on file or standing approved by the Commissioner May 15, 1970, nor on file with the Commissioner at the time of the accident in question, all within the meaning of Section 56-603 T.C.A. is likewise not appealed from. Independent of this finding and any binding effect it may have on this Court we find that there is ample evidence to sustain the Chancellor's ruling on these issues and agree with him thereon.
ASSIGNMENT OF ERRORS
1. The Honorable Chancellor erred in not finding the endorsement void as a matter of law because the endorsement was not on file with nor approved by the Commissioner of Insurance and Banking at the time of the issuance of the policy and at the time of the accident in question within the meaning and intent of Tennessee Code Annotated, Section 56-603.
2. The Honorable Chancellor erred in not finding the endorsement invalid as a matter of fact because said endorsement was issued in violation of Tennessee Code Annotated, Section 56-603, a special statute of the State of Tennessee and because the policy itself by contract excludes consideration of the endorsement wherein a special statute has been violated.
3. If not pretermitted by the foregoing assignments of error, the Honorable Chancellor erred in not finding as a matter of law that the terms of the endorsement should be excluded from consideration of the policy as a whole because the terms thereof are discriminatory and are in violation of Tennessee Code Annotated, Section 56-1226.
4. The Honorable Trial Court erred in not determining as a matter of fact that the Defendants were estopped to rely upon the endorsement in question (A5207) and waived the provisions contained in the endorsement.
5. The Honorable Chancellor erred in not finding that the terms of the endorsement are ambiguous and therefore unenforceable.
Assignments one and two may be properly considered together.
Under the provisions of the policy McCulloch was insured for One Hundred Thousand ($100,000.00) Dollars unless endorsement A5207 effectively reduced the coverage to the amount provided by the applicable financial responsibility limit of Ten Thousand ($10,000.00) Dollars.
That such a provision limiting amount of coverage designated as No. 3 in the endorsement A5207 is a proper and legitimate one between the parties to the contract was settled in United Services Automobile Association v. The Hartford Accident and Indemnity Company, 222 Tenn. 168, 433 S.W.2d 850.
Following a provision that no action shall lie against the Company unless there shall have been a full compliance with its terms the policy provides;
"Any person or organization or legal representative thereof who has secured such judgment or written agreement shall thereafter be entitled to recover under the policy to the extent of the insurance afforded by this policy."
*665 The plaintiffs are restricted to the terms of the policy and the "insurance afforded by this policy." Their rights could be no greater than those of the insured, Delmar Haynes Pontiac, Inc., a contracting party to the policy of insurance. Dillingham v. Tri-State Insurance Company, 214 Tenn. 592, 381 S.W.2d 914; Horton v. Employers Liability Insurance Corporation, 179 Tenn. 220, 164 S.W.2d 1016; Petty v. Sloan, 197 Tenn. 630, 277 S.W.2d 355; Goodner v. Accidental Fire and Casualty Company, 59 Tenn. App. 317, 440 S.W.2d 614.
The paramount question then arising is whether endorsement A5207 was vitiated or made inapplicable because not a part of proper filings with the Commissioner of Insurance and Banking nor approved by him.
Sub-section (h) Section 56-603 T.C.A. heretofore quoted and relied upon by plaintiffs is a part of Chapter 6, Insurance, said chapter being entitled "Rates and Rating Organizations Casualty and Fidelity Insurance".
The United States Circuit Court of Appeals, Sixth Circuit, in McCullough Transfer Co. v. Virginia Surety Co., 213 F.2d 442, had before it a similar statute of Ohio and considered substantially the same question here made by plaintiffs. Speaking through Judge Miller that Court said;
"But we do not agree with appellant's contention that it necessarily follows that a failure to comply with the provisions of a regulatory statute relating to insurance renders null and void a policy of insurance freely entered into by the parties. In order to determine whether a contract made contrary to a penal statute is illegal and void, the statute must be considered as a whole to ascertain whether it was the intention of the Legislature that the statute have such effect... . There is no express provision in the foregoing sections of the Ohio General Code which states that a failure to comply with any of the provisions contained therein renders an insurance contract void. If such was the intent of the Legislature it could easily have said so in express words... . It was the purpose of the Legislature to regulate the insurance business ... rather than by declaring illegal and void such contracts of insurance as might be issued while the insurer was not in compliance with the provisions of the statute.... Nor do we consider the contract as void against the public policy. A contract is not void as against public policy unless it is injurious to the public or contravenes some established interest of society.... The insurance contract involved in this case, under which appellant has had the benefit of full performance by the appellee, is clearly not of that nature."
There does not appear to be any intent expressed in our statute in question to declare insurance policies void because of failure to have on file endorsement A5207 or similar matters involving rates, etc. nor do we think such an intent can properly be implied. We do not believe Sub-section (h) of Section 56-603 T.C.A. under the circumstances and facts of this case adversely affects the validity of item 3 of endorsement A5207. The endorsement A5207, we think, is enforceable and was binding on the parties to the contract of which it was a part. Consequently, under the authorities heretofore cited the plaintiffs were and are likewise bound by that provision limiting coverage. We think the Chancellor was correct in holding that the ruling and rationale of McCullough Transfer Co. v. Virginia Surety Company., supra, dictates a similar ruling here. See also 44 C.J.S. Insurance § 254, p. 1029.
The provision of the policy designated "29. Special Statute", heretofore quoted, does not invalidate or destroy the effectiveness of endorsement A5207, which is binding on the parties to the contract of insurance, a contract freely entered into for a legal consideration. The authorities cited *666 and reasons given in holding endorsement A5207 binding on the plaintiffs in connection with Sub-sec. (h) Section 56-603 T.C.A. are equally valid as to the provision "29. Special Statute." To hold otherwise would have the effect of deleting or expunging A5207 thereby reforming a contract to which the plaintiffs were not a contracting party and about the provisions of which no mistake between the parties existed. Assignments of error one and two are overruled.
In their third assignment of error plaintiffs assert endorsement A5207 should be excluded from the policy because the endorsement violates Section 56-1226 T.C.A. The Code Section is as follows;
"Preferences or distinctions in certain insurance transactions prohibited Exceptions
(a) No insurer or any person on behalf of any insurer shall make, offer to make, or permit any preference or distinction in property, marine, casualty, or surety insurance as to form or policy, certificate, premium, rate, benefits, or conditions of insurance, based upon membership, nonmembership, employment, or of any person or persons by or in any particular group, association, corporation, or organization, and shall not make the foregoing preference or distinction available in any event based upon any fictitious grouping of persons as defined in this code, such fictitious grouping being hereby defined and declared to be any grouping by way of membership, nonmembership, license, franchise, employment, contract, agreement or any other method or means."
The provision just quoted appears as part of Chapter 12, it being entitled Unfair Competition and Unlawful Practices under Title 56, Insurance. A reading of the entire chapter leads one to the conclusion that it was primarily the legislative intent to regulate each insurance company in respect to its conduct as that conduct would affect a similar company; not to tamper with the contractual relationship of insurer and insured. It is said that one should look to the language of the statute, its subject matter, object and reach of the statute, wrong or evil sought to be remedied or prevented, purpose sought to be effected in determining the effect of a statute. Mascari v. Raines, 220 Tenn. 234, 415 S.W.2d 874. We believe when all relevant matters are considered the code section in question should not be given the effect of invalidating endorsement A5207, nor should it be ruled discriminatory or destructive of the questioned parts of the policy of insurance. Had the Legislature intended to invalidate contracts of insurance as between the parties thereto under such circumstances it could have so enacted. Assignment of error No. three is overruled.
In connection with the fourth assignment of error it appears that the contracting parties did not mistakenly enter into their contract. The contract reflected what they agreed upon. The plaintiffs are not shown to have relied upon the questioned provisions as being void nor upon any act of the defendant prior to the accrual of their cause of action. What plaintiffs actually seek to do is to reform the policy of insurance by deleting endorsement A5207 from the policy. This they cannot do for the reason there was no mistake and no antecedent agreement with respect to which a mistake was made. Estoppel is available to protect a right but not to create one. E.K. Hardison Seed Company v. Continental Casualty Company, 56 Tenn. App. 644, 410 S.W.2d 729. There appearing to be no estoppel, or waiver of terms of the contract, assignment of error four is overruled.
Assignment of error five assails endorsement A5207 as being ambiguous. Given their plain, ordinary meaning and signification the words and terms of the endorsement are clear and easily understood, not subject to different interpretations. *667 The provision "damages payable under the insuring agreement shall not exceed the applicable financial responsibility limit" should not be said to be ambiguous because reference is made to the financial responsibility limit without stating in dollars what that limit was at the time. Stone v. Liberty Mutual Insurance Company, 55 Tenn. App. 189, 397 S.W.2d 411; In Re Estate of Clement, 220 Tenn. 114, 414 S.W.2d 644.
Assignment of error five is overruled.
All assignments of error are overruled and the judgment of the trial Court affirmed.
PARROTT, P.J. (E.S.), and SANDERS, J., concur.
|
-4.72 -3.6242
-23.743 -22.79
-38.728 5.5706
24.787 -30.478
-1.5856 -43.844
43.723 6.0909
|
Shifting Sands: Lagos Communities Count the Cost of Dredging
Thomas Ujemeji comes from a long line of fishermen on Bishop Kodji Island, a coastal settlement on the Lagos Lagoon.
Customers come from far and near to buy fresh seafood from the 50-year-old fisherman.
He has a special skill set and he knows it. His traps get the biggest catch every time.
With a smile slowly crawling across his face, Ujemeji says he honed his skills while going on fishing expeditions with his late father as a young boy.
But today was not one of those days that customers would besiege him with requests. When our correspondent got to his fish smoking shed, just a handful of fish rested on a local oven filled with slow-burning, yellow coals.
What the fisherman had on display was incapable of attracting a longtime customer, let alone a prospective one. Ujemeji confessed that he’s fast losing his commercial reputation.
He says a new business in the waterfront community has made a mess of his trade.
Ujemeji says he can no longer fish on the Lagoon front due to the dredging activities in the area.
"If I don't set traps at the deeper end of the ocean, I won't get anything. To do that, I need a boat that can withstand the tides and more fuel to power it."
“The dredging machines have chased fishes to the deeper end. The sand they are harvesting has also polluted the Lagoon and fishes can’t stay.
“The noise from the machines when they are working also disturbs them. If I don’t set traps at the deeper end of the ocean, I won’t get anything. To do that, I need an engine boat that can withstand the tides and more fuel to power it through the long hours that I will be on water.
A dredging machine on the Lagoon front in Sabon Kodji. Image by Bukola Adebayo. Nigeria, 2017.
While most people came to the Island to patronise fishermen, many come these days to siphon the sand along its coastline.
Indeed, a massive dredging machine was the most prominent fixture on the island the day our correspondent visited. It was smack in the middle of the Lagoon front.
While residents lament, business is booming for 32-year-old James Adelike, who operates a pay loader that conveys the dredged sand to various destinations in Lagos.
He said, “The price of the sand pumped from the Lagoon is different from the one that is dug with shovels from the shoreline. We sell sharp sand that has no impurities [at] N42,000 per 20 tonnes if it’s to Lekki, Ajah or Badore. The one that is scooped from shoreline is about N20,000 per 20 tonnes…you can find some impurities in those ones.”
“I make N10,000 from every trip and many times I go at least twice a day.”
Adelike says the trade has provided funds for him to start building a two-bedroom apartment in another state where his family resides.
While truck drivers, pay loaders, excavator operators and many other service providers in the dredging value chain smile to the bank, the denizens of Bishop Kodji reek of abject poverty.
The level of squalor on the island with over 150,000 residents is disturbing: it was evident from the 25-minute boat ride that our correspondent took with school children and other artisans to the shantytown; it became clearer on alighting from the canoe.
Joseph Christopher, a fisherman, says life has not been the same since dredging activities began in the slum. Christopher laments that the business which many hoped would bring development to the settlement has brought more misery to residents.
“There are many people profiting from this island. When they want to start operations, they will promise to employ us, build schools and clinics but once they start, they forget us.
"They won’t even employ us. To make matters worse, the dredgers were installed in the areas where we were fishing and they harvested the sand so much so that the anchor and ropes that we use to hold the boat while we set our fishing nets cannot reach the ground. They are now too short.”
Though they are surrounded by water, Christopher says residents must pony up money to buy clean water from the city as water sources in the area have been polluted as a result of sand mining activities.
“We cannot use the water from the well or the borehole. We usually contribute money to vendors who take boats to Yaba or Iwaya to bring sachet water to this island. Many of the things they destroyed cannot be reversed.”
For Christiana Gbetode, who smokes fish, the poor fish harvest has forced her to consider an unlikely alternative.
The head of the fisherwomen on the Island confides in our correspondent that not only does she buy farmed fish from local breeders in Badagry and Epe areas of the state, she also augments her supplies with imported fish.
Pointing at the fishing boats lying idle at the community’s jetty, Christiana says, “Before now, the boats used to be filled with fishes when the men come back. I used to buy at least 40 buckets, but now you get at most two buckets of fresh seafood after toiling for hours.
“To keep the business, I buy from local farmers at twice the price and I smoke imported fish. I am losing customers because my fish is the same price as those smoking in the city.”
The word dredging sends shivers down Whesu Gatson’s spine. For him, the word is synonymous with destruction of livelihood and properties.
According to him, many houses collapsed into the Lagoon because of the flooding incidents that occurred in Gavei Kodji, after sand mining began in the community.
The farmer turned boat operator says besides the houses that caved in, some farmlands were washed into the Lagoon in the aftermath of a flooding incident aggravated by the excavation of sand from the waterfront settlement.
He says, “I used to plant maize and cassava with a lot of vegetables but once they started packing sand from the coastline, the land began to get soft and muddy. If you plant anything today, the next day, water will wash it away. The soil became weak.”
Gatson pointed at some tumbledown huts close to the Lagoon front as some of the homes that collapsed when mining activities became more intense in the coastal community.
Environmentalists say that unchecked mining and dredging, which weakens seabeds and depletes subsoils, could increase incidences of building and structural collapse in Lagos.
The Director-General of the Nigerian Conservation Federation, Mr. Adeniyi Karunwi, who defines sand mining as the process of removing sand and gravel from a particular location mostly for the construction of buildings and roads, warns that insatiable demand for fine sand threatens irreversible damage to marine lives and the environment.
He identifies coastal and soil erosion, loss of aquatic lives, formation of sinkholes, loss of biodiversity, and soil contamination resulting from leakages of chemicals into the soil as some of the adverse environmental impacts of the trade.
“A study by the Nigerian Institute for Oceanography and Marine Research revealed that uncoordinated activities by miners and dredgers has caused depths of almost six metres into the seabed as reflected in the Banana Island to Third Mainland Bridge axis,” says Karunwi.
The environmentalist notes that a recent biodiversity survey by a team of ornithologists along the Lagoon in Sangotedo and Badagry areas of the state indicated an unprecedented proliferation of dredging activities — a situation he says thrives due to poor coordination and regulation.
The conservationist says, “The relevant government agencies responsible for stemming this tide should put a halt to it before it becomes a monster that would eventually consume us.
“Dredging in some places has been largely responsible for the loss of breeding habitats for sea turtles, which depend on sandy beaches for their nesting and other biodiversity.”
From Lagos to Dubai, sand is a highly sought after resource.
Globally, there is a huge demand for sharp sand which is dredged from the sea or mined from its shorelines for real estate purposes.
Lagos, a state in southwest Nigeria with more than 50 coastal communities in Lekki and Epe, Ojo and Badagry as well as Amuwo-Odofin and Apapa areas, is a preferred destination for sand miners.
It is trade knowledge that fine sands, excavated from Lagos coastlines, are exported to countries such as the United Arab Emirates.
The waterfront business booms with an increasing need for housing for over 20 million Lagosians.
It’s been estimated that Lagos consumes an estimated 40 million cubic metres of sand per annum for building and construction projects.
While the business generates great profits for urban property developers, its impact has brought despair upon residents who have had to deal with the polluted waters, collapsed houses, depleted lands and flooding incidents these activities leave in their wake.
As fine sand is taken from the coastlines to provide housing for urban dwellers, many more are rendered homeless in the affected areas.
A court injunction on a house in Otodo Gbame, a dredging site in Lagos. Image by Bukola Adebayo. Nigeria, 2017.
Government reads the riot act
Worried by the increasing menace of these activities, the State Governor banned dredging activities in February.
This was after a communal clash in a sand mining site in the Bariga area of Lagos reportedly led to the death of an elderly woman in the settlement.
The Commissioner for Water Front and Infrastructure, Mr. Ade Akinsanya, who relayed this directive, however admits that the majority of the miners were operating illegally without the appropriate licence.
Akinsanya said, “All sand dredgers in Lagos State should stop operations immediately. The idea is to ensure adequate security of lives and property in the state. They need to renew their operational permit annually, but majority of them have not renewed it for many years.
“The state government and the National Inland Waterways Authority are the licensing authorities to give directives on such operations on the waterways.”
"[The miners] did not consult anybody, and we woke up to find their equipment on water. We are fishermen trying to make a decent living; nobody should come and spoil our land."Boat Operator Soji Vvede
Despite the stern order from the authorities, sand miners continue their business, especially in remote areas far from the watchful eyes of the government.
For instance, dredgers were still operating on the Lagoon front at Ogogoro Island when our correspondent visited the community in April.
Knowing the ugly fate that had befallen their neighbours, the residents alerted authorities to ensure that the operators comply with the order.
According to a boat operator, Mr Soji Vvede, some miners appear like thieves in the night to scoop sand from the waterfront settlement. “They did not consult anybody, and we woke up to find their equipment on water. We are fishermen trying to make a decent living; nobody should come and spoil our land,” he says.
Celestine Ahisu, one of the evictees from Otodo Gbame, a dredging site in Lagos. Image by Bukola Adebayo. Nigeria, 2017.
While the state government has justified this action by saying the stilts structures in the community were incongruous with its mega-city plans for Lagos, Celestine Ahisu, the community’s youth leader, argues that residents were evicted to allow sand dredging and filling activities to thrive.
Besides being situated in a prime waterfront location, Otodo Gbame has one of the longest expanses of coastlines in Lagos, which makes it an attractive destination for sand dealers.
Its proximity to Lekki and Ajah, areas where real estate development is at its peak in Lagos, makes it a dredger’s delight.
Drone footage of demolitions in Otodo Gbame, a coastal community in Lagos. Drone footage by Editi Effiong. Nigeria, 2017.
Our correspondent, who accessed the community by water before it was demolished in March, spotted at least three pieces of dredging equipment on the area’s waterways.
When she tried to take pictures, the boat operator warned that sea guards often confiscate cameras of those who try to capture these operations.
Though she had been forewarned, our correspondent was not prepared for the images of carnage she saw inflicted upon the community. Over 500 houses made from bamboo and wood had been damaged. The smoke from the torched structures still pervaded the air.
An evictee looks for valuables among the ruins of Otodo Gbame. Image by Saheed Olugbon. Nigeria, 2017.
“They started dredging the shoreline of Otodo Gbame in 2014. Nobody consulted with us, we just saw their equipment on the Lagoon. Around this period, about 30 houses fell into water.
“The waterfront had also become too shallow for us to fish and the wells in the area were polluted. As the community leader, I went with our Baale to Oba Elegushi to complain.
“Some months after, a group of unknown men came to give us an eviction notice and said we should leave the land within seven days because they wanted to take sand away from the community.
“We didn’t even take them seriously because the notice was not signed. But after the expiration of the notice, they came back with over 70 thugs to start burning the houses. When we started putting out the fire, they got angry and began shooting at us.
"We reported the case to the police and for another three years we had some respite but they did not stop dredging.”
But the truce did not last, according to the Baale, Mr. Dansu Hunkpe, who has now been evicted from the floating community. He says the community was attacked at least three times within three months in 2016.
“One of them, who identified himself as Wasiu, said I should tell my people to leave the area because they were disturbing them from taking sand. I said No! Not in this community. He was always coming with hoodlums to intimidate us.
“After another round of attacks that led to the death of a pregnant woman and her child, trying to escape via boat, I went to the Oba of Elegushi to complain again and he promised the issue will be addressed.
A woman paddles her merchandise on a canoe in Otodo Gbame. Image by Bukola Adebayo. Nigeria, 2017.
“Even government officials came to Otodo Gbame to assess the whole situation but we never heard from them again.”
But instead of wading in, Hunkpe says the state government served the community an eviction notice in November.
“As if it was planned, I was arrested November 7th and remanded in Ikoyi Prisons the same day we got served the notice. I was released some few days after. On getting to Otodo Gbame, half of the structures were in ruins. Some people got burnt with their houses, most were injured.”
The head of the community says while they were rebuilding and waiting for the court judgment on the notice given, the state government ordered that the community be demolished.
Commando style and to the horror of many Lagosians, Otodo Gbame and all the structures in it were set on fire by security forces on March 25. Little thought was given to the safety of the residents who were ambushed overnight.
According to head of the community, who now squats with other evictees in Makoko, more than 30,000 residents were affected by the exercise.
Some collapsed structures in Otodo Gbame before the demolition. Image by Bukola Adebayo. Nigeria, 2017.
Though the state government ordered that the community be demolished, Ahisuand Dansu seems to blame the royal family, the Elegushis, for the crisis.
Hunkpe says, “They chased us from our ancestral homes like dogs. A place we have known all our lives. We don’t know what we have done to them, they were loathe of seeing us.
“We were living here before the big buildings came. Maybe because our houses were made of bamboo but that is what we could afford, we don’t have money to build block houses. More so, we are fishermen, we live on water.”
Celestine says they want their community back. But this may seem like a tall order. Our correspondent was denied entrance into Otodo Gbame when she visited in April.
Forced eviction is a violation of land and property rights
Aside from its environmental impact, the co-founder of the Justice & Empowerment Initiative, Megan Chapman, notes that sand dredging and mining often leads to the forceful eviction of residents in affected communities.
Chapman, who heads the legal team representing 15 waterfront communities in the state, says even though operators are meant to carry out an Environmental Impact Assessment in addition to obtaining various forms of licenses before they start their operations, many of them do not.
“There are two purposes of dredging. One is to remove sand to allow boats to move freely on waterways, but most times it is to harvest sand for commercial purposes which is basically mineral extraction. With both activities, you are looking at if they have the right to do what they are doing.
“The reality is that many involved in dredging activities are not licensed by the relevant agencies and the few who are, have one and not the other. In most cases that we have investigated in waterfront communities, an EIA has not actually been done and this is required by federal law.
“Another case we see is when dredging is done on the waterways while expanding it because they want to take over it for real estate purposes. But the question remains: Do they have the right to do so and that ties to who exactly owns the land. We usually find out that these questions remain unanswered, making such situations a violation of the law.”
Chapman argues that dredging and the consequent land grab played a great role in the recent demolition of Otodo Gbame.
“When sand dredging started in Otodo Gbame, the residents did not realize it could lead to their eviction and the land being taken from them. So, a year ago, we were raising alarms about how dredging and sand filling activities in the area was affecting their fishing and quality of lives.
“There was a protest to Alausa and the state government intervened and they stopped for a time. But in November, the same people attacking the community came back with the police to demolish the community.”
"So many times, the government does not challenge the operators. They say once the operators have got the appropriate license they are ok with it."Megan Chapman, Justice & Empowerment Initiative
Chapman says contrary to many beliefs, waterfront residents have the right to protest and question any activity that affects their livelihoods and properties even when the concerned authorities have been licensed.
“In the Niger Delta, we have oil spillage, in Lagos we have dredging of sand. If an oil company is licensed but there is an oil spill in the community, the company is liable to answer to those damages.
“There is a principle of law that says when there is a wrong, there should be a way of correcting it or making it right. For instance, if you have owned or occupied a parcel of land in Otodo Gbame, you have aright to ensure the stability of the land.
“The way you met the land is the way it should stay. If your neighbours are doing something that undermines the stability of the sub soil, that is a trespass to property and it’s under the land law.
“Even if you’re not the owner of the land but you have a structure on it, let’s say a fishing boat or a house, and something is done to cause damage to it, it’s also a trespass on property. If you have evidence and pictures, you can lay claim in court.”
However, Chapman says it is unfortunate that most cases of land dispute and infringement on property rights in Nigeria end up in court, as government that should address these issues often put up a defence.
“So many times, the government does not challenge the operators. They say once the operators have got the appropriate license, they are ok with it. Often the community with evidence must go to court,” she adds.
Sand miners at work in the Ojo area of Badagry. Image by Tayo Odusanya. Nigeria, 2017.
We don’t tolerate illegal activities
An officer of the Dredging and Sand Dealers Association of Nigeria, Dr. Edmund Chilaka, says that the association does not tolerate illegal mining or dredging operations.
Chilaka, who is also the founder of Dredge Skills and Marine Training Centre in Lagos, says members are experts who are abreast with the best practices in the business.
He, however, maintains that ensuring that there is sanity in the sector lies primarily on the shoulders of the state and federal authorities.
“We do not tolerate or condone any form of illegality and our members are highly trained experts. I would say regulating the industry is in the hands of state and federal agencies, which too many of them are already doing.”
Development, an emerging threat to coastal settlements
Sand mining and dredging are a few of the challenges that slum dwellers contend with. Many of the waterfront communities our correspondent visited lacked basic social amenities. Fishermen lamented that seafoods were rotting away in Bishop and Sabon Kodji Island as the community has no power supply.
Secondary school pupils also have to take canoes to the city since some of the slums did not have such educational facilities. The residents say they are often scared of advocating for these amenities from the authorities who may respond with eviction notices.
As the United Nations Human Settlement Programme estimates that one in eight people live in slums today, experts say demolitions and eviction threats will no longer be a viable solution to addressing these housing challenges.
In Nigeria alone, informal settlements accommodate more than half of the nation's urban residents, states the 2015/ 2016 Slum Almanac.
The UN Habitat report titled "Tracking Improvement in the Lives of Slum Dwellers" notes that with 50.2 percent of Nigeria's urban population living in slum conditions, informal settlements in cities like Lagos can no longer be wished away. |
1995 Mississippi State Bulldogs football team
The 1995 Mississippi State Bulldogs football team represented Mississippi State University during the 1995 NCAA Division I-A football season. The team's head coach was Jackie Sherrill. The Bulldogs played their home games in 1995 at Scott Field in Starkville, Mississippi.
Schedule
References
Mississippi State
Category:Mississippi State Bulldogs football seasons
Mississippi State football |
====================
The LLVM gold plugin
====================
Introduction
============
Building with link time optimization requires cooperation from
the system linker. LTO support on Linux systems requires that you use the
`gold linker`_ which supports LTO via plugins. This is the same mechanism
used by the `GCC LTO`_ project.
The LLVM gold plugin implements the gold plugin interface on top of
:ref:`libLTO`. The same plugin can also be used by other tools such as
``ar`` and ``nm``.
.. _`gold linker`: http://sourceware.org/binutils
.. _`GCC LTO`: http://gcc.gnu.org/wiki/LinkTimeOptimization
.. _`gold plugin interface`: http://gcc.gnu.org/wiki/whopr/driver
.. _lto-how-to-build:
How to build it
===============
You need to have gold with plugin support and build the LLVMgold plugin.
Check whether you have gold running ``/usr/bin/ld -v``. It will report "GNU
gold" or else "GNU ld" if not. If you have gold, check for plugin support
by running ``/usr/bin/ld -plugin``. If it complains "missing argument" then
you have plugin support. If not, such as an "unknown option" error then you
will either need to build gold or install a version with plugin support.
* Download, configure and build gold with plugin support:
.. code-block:: bash
$ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils
$ mkdir build
$ cd build
$ ../binutils/configure --enable-gold --enable-plugins --disable-werror
$ make all-gold
That should leave you with ``build/gold/ld-new`` which supports
the ``-plugin`` option. Running ``make`` will additionally build
``build/binutils/ar`` and ``nm-new`` binaries supporting plugins.
* Build the LLVMgold plugin. Run CMake with
``-DLLVM_BINUTILS_INCDIR=/path/to/binutils/include``. The correct include
path will contain the file ``plugin-api.h``.
Usage
=====
The linker takes a ``-plugin`` option that points to the path of
the plugin ``.so`` file. To find out what link command ``gcc``
would run in a given situation, run ``gcc -v [...]`` and
look for the line where it runs ``collect2``. Replace that with
``ld-new -plugin /path/to/LLVMgold.so`` to test it out. Once you're
ready to switch to using gold, backup your existing ``/usr/bin/ld``
then replace it with ``ld-new``.
You should produce bitcode files from ``clang`` with the option
``-flto``. This flag will also cause ``clang`` to look for the gold plugin in
the ``lib`` directory under its prefix and pass the ``-plugin`` option to
``ld``. It will not look for an alternate linker, which is why you need
gold to be the installed system linker in your path.
``ar`` and ``nm`` also accept the ``-plugin`` option and it's possible to
to install ``LLVMgold.so`` to ``/usr/lib/bfd-plugins`` for a seamless setup.
If you built your own gold, be sure to install the ``ar`` and ``nm-new`` you
built to ``/usr/bin``.
Example of link time optimization
---------------------------------
The following example shows a worked example of the gold plugin mixing LLVM
bitcode and native code.
.. code-block:: c
--- a.c ---
#include <stdio.h>
extern void foo1(void);
extern void foo4(void);
void foo2(void) {
printf("Foo2\n");
}
void foo3(void) {
foo4();
}
int main(void) {
foo1();
}
--- b.c ---
#include <stdio.h>
extern void foo2(void);
void foo1(void) {
foo2();
}
void foo4(void) {
printf("Foo4");
}
.. code-block:: bash
--- command lines ---
$ clang -flto a.c -c -o a.o # <-- a.o is LLVM bitcode file
$ ar q a.a a.o # <-- a.a is an archive with LLVM bitcode
$ clang b.c -c -o b.o # <-- b.o is native object file
$ clang -flto a.a b.o -o main # <-- link with LLVMgold plugin
Gold informs the plugin that foo3 is never referenced outside the IR,
leading LLVM to delete that function. However, unlike in the :ref:`libLTO
example <libLTO-example>` gold does not currently eliminate foo4.
Quickstart for using LTO with autotooled projects
=================================================
Once your system ``ld``, ``ar``, and ``nm`` all support LLVM bitcode,
everything is in place for an easy to use LTO build of autotooled projects:
* Follow the instructions :ref:`on how to build LLVMgold.so
<lto-how-to-build>`.
* Install the newly built binutils to ``$PREFIX``
* Copy ``Release/lib/LLVMgold.so`` to ``$PREFIX/lib/bfd-plugins/``
* Set environment variables (``$PREFIX`` is where you installed clang and
binutils):
.. code-block:: bash
export CC="$PREFIX/bin/clang -flto"
export CXX="$PREFIX/bin/clang++ -flto"
export AR="$PREFIX/bin/ar"
export NM="$PREFIX/bin/nm"
export RANLIB=/bin/true #ranlib is not needed, and doesn't support .bc files in .a
* Or you can just set your path:
.. code-block:: bash
export PATH="$PREFIX/bin:$PATH"
export CC="clang -flto"
export CXX="clang++ -flto"
export RANLIB=/bin/true
* Configure and build the project as usual:
.. code-block:: bash
% ./configure && make && make check
The environment variable settings may work for non-autotooled projects too,
but you may need to set the ``LD`` environment variable as well.
Licensing
=========
Gold is licensed under the GPLv3. LLVMgold uses the interface file
``plugin-api.h`` from gold which means that the resulting ``LLVMgold.so``
binary is also GPLv3. This can still be used to link non-GPLv3 programs
just as much as gold could without the plugin.
|
The role of States in prosecuting violations of international humanitarian law
26-10-2010 Interview
Ahead of the third universal meeting of national committees for the implementation of international humanitarian law, Cristina Pellandini, who heads the ICRC's Advisory Service on international humanitarian law, explains the role of States in prosecuting violations.
The prosecution and punishment of violations of international humanitarian law are the main topics of the upcoming Universal Meeting of National Committees for the Implementation of International Humanitarian Law. What are the objectives of the meeting?
The meeting has two main goals. The first is to bring together all national committees to promote discussion and the sharing of experiences and best practice. The second is to strengthen the role of the national committees in implementing international humanitarian law domestically, especially as far as criminal punishment is concerned. We will encourage discussion of an approach enabling States to effectively punish all war crimes, and to find complementary support from the international tribunals, particularly the International Criminal Court.
We also encourage States, when enacting criminal legislation for war crimes, to take into account all of their obligations requiring them to ensure respect for international humanitarian law. With around 230 participants from more than 100 countries, we are convinced that the meeting will contribute to greater compliance with that body of law and enhanced prosecution mechanisms throughout the world.
What is a violation of international humanitarian law?
First of all, we should explain that international humanitarian law, also known as the law of armed conflict, is the body of law that sets out detailed rules aimed at protecting the victims of armed conflict and restricting the means and methods of warfare. Some of the most serious violations of these rules, called "grave breaches", are listed in the Geneva Conventions of 1949 and in Additional Protocol I of 1977. Wilful killing or torture of a person protected under international humanitarian law, or making the civilian population the object of attack, are examples of these types of violations of international humanitarian law. Other serious violations, such as the forceful conscription of children under 18 years of age, and the use of certain weapons, may be found in other international instruments and in customary law. All of these violations are so serious that they entail individual criminal responsibility for those who commit them, or order others to do so, and are thus termed "war crimes."
Who is in charge of prosecuting those responsible for violations of international humanitarian law?
The responsibility for prosecuting serious violations of international humanitarian law falls primarily on States.
This is particularly clear in the case of "grave breaches," where the requirement goes so far as to oblige States to search for and punish all those who have themselves committed or issued orders to others to commit a grave breach, regardless of the nationality of the perpetrator or where the crime was committed.
More recently, the responsibility of States has been complemented by the establishment of international (for the former Yugoslavia and Rwanda) and "mixed" criminal tribunals. (The "mixed" tribunals, such as the ones for Cambodia and Sierra Leone, are half-international and half-domestic.) The Rome Statute – the treaty that established the International Criminal Court, a permanent tribunal to prosecute individuals for genocide, crimes against humanity and war crimes – was adopted at a diplomatic conference in 1998.
These efforts represent a major step forward in efforts to prevent and punish serious violations of international humanitarian law and thus enhance respect for this body of law.
What is the role of States in enforcing the law?
A necessary first step toward fulfilling the obligation to prosecute and punish serious violations is to enact national legislation penalizing the conduct prohibited under international humanitarian law. Ideally, such legislation should cover all serious violations of this law, regardless of the nature of the armed conflict in which they were committed. Conduct that is considered inhuman in an inter-State conflict cannot be anything but inhuman in all other situations of armed conflict, including those that take place within the territory of one State.
Any process incorporating criminal offences into domestic law should grant domestic courts jurisdiction over the crimes.
Pushing forward the enactment of such legislation requires close cooperation between many different entities, both within the government and civil society. National committees for the implementation of international humanitarian law, because they are inter-ministerial or inter-institutional working groups, bringing together various national agencies with responsibilities in the field of international humanitarian law, have proved to be a very useful mechanism. Their main purpose is to advise and assist the government in implementing and spreading knowledge of international humanitarian law. |
Jason is such a b**** to kill... I mean, hell, in Jason X, he had his head and several limbs blown off with a futuristic shotgun. But then that damn medical station brings him back to life with nanobots, making him a freaking unstoppable cyborg. Until he is vaporized upon re-entry in Earth Two's atmosphere ;3 |
December 7, 2018
Yves Saint Laurent's iconic Rouge Pur Couture lipsticks are now available in a limited-edition matte black packaging with a glittery YSL logo! There are seven shades to choose from, ranging from a soft rosy nude to a daring vivid coral. The formula offers rich color in just one stroke while natural extracts provide intense hydration.
The formula is very creamy! These lipsticks glide on my lips like butter, but they aren't too oily either. I usually prefer a slightly thicker consistency, as it makes it less likely to feather around the mouth or gather into lip lines. But I like how lightweight AND hydrating the Rouge Pur Couture lipsticks feel on my lips!
I would recommend using a lip liner though, especially with the darker shades. I noticed that the color 01 Le Rouge feathers past my lip line after only an hour, so using a lip pencil is necessary for me.
01 Le Rouge is extremely pigmented and completely opaque on the lips, while 52 Rouge Rose is still very pigmented but slightly sheerer. The color 70 Le Nude is more translucent but nicely pigmented.
On me, coral lipsticks tend to gather into fine lines, and the shade 52 Rouge Rose is no exception. The color is even upon application, but after a few minutes it looks super streaky on me. And it emphasizes dry skin like crazy, so exfoliating your lips is key with this one!
The color 70 Le Nu is a bit streaky on my lips too, but it's not very noticeable and it wears much better than 52 Rouge Rose. I adore this shade, it's a great daytime nude!
As for the lasting power, the shade 01 Le Rouge wore well for about 6 hours (with a lip liner to prevent bleeding), while 52 Rouge Rose lasted 5 hours on me, and 70 Le Nu wore well for a little less than 4 hours.
01 Le Rouge is a true red with a slightly glossy finish.
52 Rouge Rose is a bright coral with a slightly glossy finish.
70 Le Nu is a rosy nude with a slightly glossy and pearly finish.
The Yves Saint Laurent Rouge Pur Couture Lipsticks retail for $44 CAD for 3.8g and are available at Sephora and yslbeauty.ca.
(I received these products in order to evaluate them and give my opinion, but rest assured that my comments are always honest and impartial. This post contains affiliate links.) |
Q:
How to get size of different kinds of types in the same function using C?
I'm writing a function which increases the size of a dynamic memory object created with malloc. The function should as arguments take a pointer to the memory block to be increased, the current size of the block and the amount the block is going to be increased.
Something like this:
int getMoreSpace(void **pnt, int size, int add) {
xxxxxx *tmp; /* a pointer to the same as pnt */
if (tmp = realloc(pnt, (size+add)*sizeof(xxxxxx))) { /* get size of what pnt points to */
*pnt=tmp;
return 1;
else return 0;
}
The problem is that I want the function to work no matter what pnt points to. How do I achieve that?
A:
This type of function cannot possibly work, because pnt is local and the new pointer is lost as soon as the function returns. You could take an argument of type xxxxxx ** so that you could update the pointer, but then you're stuck with only supporting a single type.
The real problem is that you're writing an unnecessary and harmful wrapper for realloc. Simply use realloc directly as it was meant to be used. There is no way to make it simpler or more efficient by wrapping it; it's already as simple as possible.
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ro_RO" version="2.0">
<context>
<name>HelloWorld</name>
<message>
<source>Hello World:</source>
<translation>Salutare lume:</translation>
</message>
<message>
<source>Display Text Configuretion</source>
<translation>Afișează configurația text:</translation>
</message>
<message>
<source>Edit HTML</source>
<translation>Editează HTML</translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<source>Display simple text. A debugging/sample widget.</source>
<translation>Afișează text simplu. O aplicație de depanare/exemplu.</translation>
</message>
</context>
</TS> |
Elucidation of the different effects of polyamines and other naturally-occurring inhibitors of cell proliferation (chalones) on T-lymphocyte and granulocyte colony growth in vitro.
Using T-lymphocyte and granulocyte colony assays with truly proliferating cells the effects of the polyamine spermine and of other naturally-occurring inhibitors of cell proliferation have been differentiated. It has been confirmed that spermine, in the presence of fetal calf serum, is a potent inhibitor of cell proliferation. This inhibition could be reversed by the addition of either 3-hydroxybenzyl-oxyamine or 4-bromo-3-hydroxybenzyl-oxyamine, both of which are inhibitors of the polyamine oxidase. In comparison, fractions isolated from calf thymus were shown to inhibit lymphocyte, but not granulocyte colony growth, indicating their tissue specificity and lymphocyte chalone activity. Further this inhibition was not reversed by polyamine oxidase inhibitors demonstrating that polyamines were not the inhibitory principles in this preparation. |
by
Commissioner Luis A. Aguilar
U.S. Securities and Exchange Commission
SEC Open Meeting
Washington, D.C.
November 3, 2010
The Dodd-Frank Act has given the Commission broad authority to oversee the market for security-based swaps, which has operated without adequate regulation or transparency. One important aspect of the Commission's new regulatory powers is enhanced authority to prohibit misconduct with respect to security-based swaps.
The antifraud rule we propose today is intended to address the unique nature of security-based swaps — in particular, the potential for fraud and manipulation both within markets and across markets. The rule would address not only fraud or manipulation with respect to security-based swaps, but also fraudulent or manipulative conduct regarding an underlying reference security that affects the value of a security-based swap.1
This would be the Commission's first antifraud rule specifically addressing security-based swaps, and I am particularly interested in comment on the following two issues.
First, as the release asks, is there potential fraudulent conduct that the rule does not capture? And if so, how we should modify the rule to address this?
And, second, is the rule sufficiently flexible that it will continue to be effective as the market for security-based swaps evolves?
Finally, I join my colleagues in thanking the staff across the agency for their work on this proposal.
Endnotes
1 The proposed rule is intended to address a wide range of misconduct. First, similar to our existing antifraud rules, the rule would prohibit both scienter-based and negligence-based misconduct in connection with the offer, purchase, or sale of any security-swap. Second, recognizing that security-based swaps are generally characterized by ongoing payments or deliveries between the parties, the rule would prohibit misconduct designed to trigger, avoid, or affect the value of those payments or deliveries. And, finally, the rule would address cross-market misconduct by prohibiting fraud, manipulation, and deception with respect to the underlying reference security when the misconduct affects the security-based swap. |
Share this:
Description
This small body classical model inspired by an early Torres model, is Dominic Miller’s favorite. Vintage flamed violin maple back and sides with the finest sitka top, for surprising mids and projection. The soundhole has a sublime mother of pearl inlay, the binding is tinted maple, the bridge is Indian rosewood, ebony fingerboard. Dominic also had a Custom version of this model made in black, which he tends to keep for his own gigs. |
## Creating an animation
Create a [[Texture]] that contains the frames of your animation. Once the texture
is [[Loader|loaded]], you can then generate an [[Animation]] by creating a [[SpriteSheet]]
and using [[SpriteSheet.getAnimationForAll]].
```js
var game = new ex.Engine();
var txAnimPlayerIdle = new ex.Texture('/assets/tx/anim-player-idle.png');
// load assets
var loader = new ex.Loader(txAnimPlayerIdle);
// start game
game.start(loader).then(function() {
var player = new ex.Actor();
// create sprite sheet with 5 columns, 1 row, 80x80 frames
var playerIdleSheet = new ex.SpriteSheet(txAnimPlayerIdle, 5, 1, 80, 80);
// create animation (125ms frame speed)
var playerIdleAnimation = playerIdleSheet.getAnimationForAll(game, 125);
// add drawing to player as "idle"
player.addDrawing('idle', playerIdleAnimation);
// add player to game
game.add(player);
});
```
## Sprite effects
You can add [["Drawing/SpriteEffects"|sprite effects]] to an animation through methods
like [[Animation.invert]] or [[Animation.lighten]]. Keep in mind, since this
manipulates the raw pixel values of a [[Sprite]], it can have a performance impact.
"Animations will loop by default. You can use [[Animation.loop]] to change this behavior.
|
Q:
Validation is not working in Metronic UI. Why?
Validation is not working properly. Its always shows This field is required. Even if I don't touch this field. Why?
<div class="form-group">
<label class="control-label col-sm-4">Description<span class="required"> * </span></label>
<div class="col-sm-8">
<input type="text" name="name" data-required="1" class="form-control" aria-required="true" aria-invalid="true" aria-describedby="name-error">
<span id="name-error" class="help-block help-block-error">This field is required.</span>
</div>
</div>
A:
You could try adding the name="name" to the label.
Also add for="name" to the label.
|
## mako
<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/>
<%!
from django.utils.translation import ugettext as _
%>
% if len(course_date_blocks) > 0:
<h3 class="hd hd-6 handouts-header">${_("Upcoming Dates")}</h3>
## Should be organized by date, last date appearing at the bottom
% for course_date_block in course_date_blocks:
<%include file="dates-summary.html" args="course_date=course_date_block" />
% endfor
% if dates_tab_enabled:
<div class="dates-tab-link">
<a href="${dates_tab_link}">View all course dates</a>
</div>
% endif
% endif
<%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory">
DateUtilFactory.transform('.localized-datetime');
</%static:require_module_async>
|
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syntax - Céu v0.20 - Reference Manual</title>
<link rel="shortcut icon" href="../img/favicon.ico">
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css">
<link href="../extra.css" rel="stylesheet">
<script>
// Current page data
var mkdocs_page_name = "Syntax";
var mkdocs_page_input_path = "syntax.md";
var mkdocs_page_url = "/syntax/";
</script>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>
<script src="../js/theme.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> Céu v0.20 - Reference Manual</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li>
<li class="toctree-l1 ">
<a class="" href="..">Overview</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../lexical_rules/">Lexical Rules</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../types/">Types</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../storage_entities/">Storage Entities</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../statements/">Statements</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../expressions/">Locations & Expressions</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../compilation/">Compilation</a>
</li>
<li>
<li>
<li class="toctree-l1 current">
<a class="current" href="./">Syntax</a>
<ul>
<li class="toctree-l3"><a href="#syntax">Syntax</a></li>
</ul>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../license/">License</a>
</li>
<li>
</ul>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">Céu v0.20 - Reference Manual</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> »</li>
<li>Syntax</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="syntax">Syntax<a class="headerlink" href="#syntax" title="Permanent link">¶</a></h1>
<p>Follows the complete syntax of Céu in a BNF-like syntax:</p>
<ul>
<li><code>A</code> : non terminal (starting in uppercase)</li>
<li><strong><code>a</code></strong> : terminal (in bold and lowercase)</li>
<li><code>`.´</code> : terminal (non-alphanumeric characters)</li>
<li><code>A ::= ...</code> : defines <code>A</code> as <code>...</code></li>
<li><code>x y</code> : <code>x</code> in sequence with <code>y</code></li>
<li><code>x|y</code> : <code>x</code> or <code>y</code></li>
<li><code>{x}</code> : zero or more xs</li>
<li><code>[x]</code> : optional x</li>
<li><code>LIST(x)</code> : expands to <code>x {`,´ x} [`,´]</code></li>
<li><code>(...)</code> : groups <code>...</code></li>
<li><code><...></code> : special informal rule</li>
</ul>
<pre><code class="ceu">Program ::= Block
Block ::= {Stmt `;´} {`;´}
Stmt ::= nothing
/* Blocks */
// Do ::=
| do [`/´(`_´|ID_int)]
Block
end
| escape [`/´ID_int] [Exp]
/* pre (top level) execution */
| pre do
Block
end
/* Storage Entities */
| var [`&´|`&?´] Type LIST(ID_int [`=´ Sources])
| vector [`&´] `[´ [Exp] `]´ Type LIST(ID_int [`=´ Sources])
| pool [`&´] `[´ [Exp] `]´ Type LIST(ID_int [`=´ Sources])
| event [`&´|`&?´] (Type | `(´ LIST(Type) `)´) LIST(ID_int [`=´ Sources])
| input (Type | `(´ LIST(Type) `)´) LIST(ID_ext)
| output (Type | `(´ LIST(Type) `)´) LIST(ID_ext)
/* Event Handling */
// Await ::=
| await (ID_ext | Loc) [until Exp]
| await (WCLOCKK|WCLOCKE)
//
| await (FOREVER | pause | resume)
// Emit_Ext ::=
| emit ID_ext [`(´ [LIST(Exp)] `)´]
| emit (WCLOCKK|WCLOCKE)
//
| emit Loc [`(´ [LIST(Exp)] `)´]
| lock Loc do
Block
end
/* Conditional */
| if Exp then
Block
{ else/if Exp then
Block }
[ else
Block ]
end
/* Loops */
/* simple */
| loop [`/´Exp] do
Block
end
/* numeric iterator */
| loop [`/´Exp] (`_´|ID_int) in [Range] do
Block
end
// where
Range ::= (`[´ | `]´)
( ( Exp `->´ (`_´|Exp))
| ((`_´|Exp) `<-´ Exp ) )
(`[´ | `]´) [`,´ Exp]
/* pool iterator */
| loop [`/´Exp] [ `(´ LIST(Var) `)´ ] in Loc do
Block
end
/* event iterator */
| every [(Loc | `(´ LIST(Loc|`_´) `)´) in] (ID_ext|Loc|WCLOCKK|WCLOCKE) do
Block
end
| break [`/´ID_int]
| continue [`/´ID_int]
/* Parallel Compositions */
/* parallels */
| (par | par/and | par/or) do
Block
with
Block
{ with
Block }
end
/* watching */
// Watching ::=
| watching LIST(ID_ext|Loc|WCLOCKK|WCLOCKE|Code_Cons_Init) do
Block
end
/* block spawn */
| spawn do
Block
end
/* Pause */
| pause/if (Loc|ID_ext) do
Block
end
/* Asynchronous Execution */
| await async [ `(´ LIST(Var) `)´ ] do
Block
end
// Thread ::=
| await async/thread [ `(´ LIST(Var) `)´ ] do
Block
end
| spawn async/isr `[´ LIST(Exp) `]´ [ `(´ LIST(Var) `)´ ] do
Block
end
/* synchronization */
| atomic do
Block
end
/* C integration */
| native [`/´(pure|const|nohold|plain)] `(´ List_Nat `)´
// where
List_Nat ::= LIST(ID_nat)
| native `/´(pre|pos) do
<code definitions in C>
end
| native `/´ end
| `{´ {<code in C> | `@´ Exp} `}´
// Nat_Call ::=
| [call] (Loc | `(´ Exp `)´) `(´ [ LIST(Exp)] `)´
/* finalization */
| do [Stmt] Finalize
| var `&?´ Type ID_int `=´ `&´ (Nat_Call | Code_Call) Finalize
// where
Finalize ::= finalize `(´ LIST(Loc) `)´ with
Block
[ pause with Block ]
[ resume with Block ]
end
/* Lua integration */
// Lua_State ::=
| lua `[´ [Exp] `]´ do
Block
end
// Lua_Stmts ::=
| `[´ {`=´} `[´
{ {<code in Lua> | `@´ Exp} }
`]´ {`=´} `]´
/* Abstractions */
/* Data */
| data ID_abs [as (nothing|Exp)] [ with
{ <var_dcl_set|vector_dcl_set|pool_dcl_set|event_dcl_set> `;´ {`;´} }
end ]
/* Code */
// Code_Tight ::=
| code/tight [`/´dynamic] [`/´recursive] ID_abs `(´ Params `)´ `->´ Type
// Code_Await ::=
| code/await [`/´dynamic] [`/´recursive] ID_abs `(´ Params `)´ [ `->´ `(´ Inits `)´ ] `->´ (Type | FOREVER)
// where
Params ::= void | LIST(Entity [ID_int])
Entity ::= [dynamic] var [`&´] [`/´hold] * Type
| vector `&´ `[´ [Exp] `]´ Type
| pool `&´ `[´ [Exp] `]´ Type
| event `&´ (Type | `(´ LIST(Type) `)´)
Inits ::= void | LIST(Entity [ID_int])
Entity ::= var (`&´|`&?`) * Type
| vector (`&´|`&?`) `[´ [Exp] `]´ Type
| pool (`&´|`&?`) `[´ [Exp] `]´ Type
| event (`&´|`&?`) (Type | `(´ LIST(Type) `)´)
/* code implementation */
| (Code_Tight | Code_Await) do
Block
end
/* code invocation */
// Code_Call ::=
| call Mods Abs_Cons
// Code_Await ::=
| await Mods Abs_Cons
// Code_Spawn ::=
| spawn Mods Code_Cons_Init [in Loc]
// where
Mods ::= [`/´dynamic | `/´static] [`/´recursive]
Abs_Cons ::= ID_abs `(´ LIST(Data_Cons|Vec_Cons|Exp|`_´) `)´
Code_Cons_Init ::= Abs_Cons [`->´ `(´ LIST(`&´ Var) `)´])
/* Assignments */
| (Loc | `(´ LIST(Loc|`_´) `)´) `=´ Sources
// where
Sources ::= ( Do
| Emit_Ext
| Await
| Watching
| Thread
| Lua_State
| Lua_Stmts
| Code_Await
| Code_Spawn
| Vec_Cons
| Data_Cons
| Exp
| `_´ )
Vec_Cons ::= (Exp | `[´ [LIST(Exp)] `]´) { `..´ (Exp | Lua_Stmts | `[´ [LIST(Exp)] `]´) }
Data_Cons ::= (val|new) Abs_Cons
/* Identifiers */
ID ::= [a-zA-Z0-9_]+
ID_int ::= ID // ID beginning with lowercase
ID_ext ::= ID // ID all in uppercase, not beginning with digit
ID_abs ::= ID {`.´ ID} // IDs beginning with uppercase, containining at least one lowercase)
ID_field ::= ID // ID not beginning with digit
ID_nat ::= ID // ID beginning with underscore
ID_type ::= ( ID_nat | ID_abs
| void | bool | byte
| f32 | f64 | float
| s8 | s16 | s32 | s64
| u8 | u16 | u32 | u64
| int | uint | ssize | usize )
/* Types */
Type ::= ID_type { `&&´ } [`?´]
/* Wall-clock values */
WCLOCKK ::= [NUM h] [NUM min] [NUM s] [NUM ms] [NUM us]
WCLOCKE ::= `(´ Exp `)´ (h|min|s|ms|us)
/* Literals */
NUM ::= [0-9] ([0-9]|[xX]|[A-F]|[a-f]|\.)* // regex
STR ::= " [^\"\n]* " // regex
/* Expressions */
Exp ::= NUM | STR | null | true | false
| `(´ Exp `)´
| Exp <binop> Exp
| <unop> Exp
| Exp is Type
| Exp as Type
| Exp as `/´(nohold|plain|pure)
| `&´ (Nat_Call | Loc)
| `&&´ Loc
| Loc [`?´]
| sizeof `(´ (Type|Exp) `)´
| Nat_Call | Code_Call
/* Locations */
Loc ::= [`*´|`$´] Loc
| Loc { `[´Exp`]´ | (`:´|`.´) (ID_int|ID_nat) | `!´ }
| `(´ Loc [as (Type | `/´(nohold|plain|pure)) `)´
| ID_int
| ID_nat
| outer
| `{´ <code in C> `}´
/* Operator Precedence */
/* lowest priority */
// locations
* $
: . !
as
// expressions
is as // binops
or
and
!= == <= >= < >
|
^
&
<< >>
+ -
* / %
not + - ~ $$ // unops
/* highest priority */
/* Other */
// single-line comment
/** nested
/* multi-line */
comments **/
# preprocessor directive
</code></pre>
<p><code>TODO: statements that do not require ;</code></p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../license/" class="btn btn-neutral float-right" title="License">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../compilation/" class="btn btn-neutral" title="Compilation"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<span><a href="../compilation/" style="color: #fcfcfc;">« Previous</a></span>
<span style="margin-left: 15px"><a href="../license/" style="color: #fcfcfc">Next »</a></span>
</span>
</div>
</body>
</html>
|
Q:
Remove punctuation from file name while keeping file extension intact
I would like to remove all punctuation from a filename but keep its file extension intact.
e.g. I want:
Flowers.Rose-Murree-[25.10.11].jpg
Time.Square.New-York-[20.7.09].png
to look like:
Flowers Rose Muree 25 10 11.jpg
Time Square New York 20 7 09.png
I'm trying python:
re.sub(r'[^A-Za-z0-9]', ' ', filename)
But that produces:
Flowers Rose Muree 25 10 11 jpg
Time Square New York 20 7 09 png
How do I remove the punctuation but keep the file extension?
A:
There's only one right way to do this:
os.path.splitext to get the filename and the extension
Do whatever processing you want to the filename.
Concatenate the new filename with the extension.
|
Verbal memory and verbal fluency tasks used for language localization and lateralization during magnetoencephalography.
The aim of this study was to develop a presurgical magnetoencephalography (MEG) protocol to localize and lateralize expressive and receptive language function as well as verbal memory in patients with epilepsy. Two simple language tasks and a different analytical procedure were developed. Ten healthy participants and 13 epileptic patients completed two language tasks during MEG recording: a verbal memory task and a verbal fluency task. As a first step, principal component analyses (PCA) were performed on source data from the group of healthy participants to identify spatiotemporal factors that were relevant to these paradigms. Averaged source data were used to localize areas activated during each task and a laterality index (LI) was computed on an individual basis for both groups, healthy participants and patients, using sensor data. PCA revealed activation in the left temporal lobe (300 ms) during the verbal memory task, and from the frontal lobe (210 ms) to the temporal lobe (500 ms) during the verbal fluency task in healthy participants. Averaged source data showed activity in the left hemisphere (250-750 ms), in Wernicke's area, for all participants. Left hemisphere dominance was demonstrated better using the verbal memory task than the verbal fluency task (F1,19=4.41, p=0.049). Cohen's kappa statistic revealed 93% agreement (k=0.67, p=0.002) between LIs obtained from MEG sensor data and fMRI, the IAT, electrical cortical stimulation or handedness with the verbal memory task for all participants. At 74%, agreement results for the verbal fluency task did not reach statistical significance. Analysis procedures yielded interesting findings with both tasks and localized language-related activation. However, based on source localization and laterality indices, the verbal memory task yielded better results in the context of the presurgical evaluation of epileptic patients. The verbal fluency task did not add any further information to the verbal memory task as regards language localization and lateralization for most patients and healthy participants that would facilitate decision making prior to surgery. |
Q:
What's up with Plouffe's inverter? Is there an alternative?
For quite some time now (at least a year), whenever I tried to use Plouffe's inverter, the request timed out, but there's no indication either on the site itself or on the Web that it's out of service or having problems. Does anyone know whether it's still online? Have I just been extremely unlucky?
Also, if it really is offline or practically unusable, do you know of any alternatives? I know OEIS, but that's for integer sequences, and its use for decimal representations of real numbers feels a bit unnatural (though it has quite a few sequences of that kind).
A:
Try one of these:
Inverse Symbolic Calculator
Inverse Symbolic Calculator Plus
A:
I am told that the server it used to run on at UQAM doesn't exist anymore, and there are no plans to revive it there.
Edited to add: in response to a suggestion from me, the former Plouffe's Inverter site now admits that the Inverter no longer exists, and redirects users to the Inverse Symbolic Calculator Plus mentioned in the answer above.
|
Alpine police were searching for a hit-and-run driver in a crash that left two cyclists injured Tuesday afternoon. Borough of Alpine
ALPINE — Police were searching for a black sedan wanted in a hit-and-run that left two bicyclists injured after a crash on Route 9W Tuesday afternoon, authorities said.
The cyclists were traveling southbound on the popular biking route, near Exit 2, when one was hit by the passenger side of a car around 1 p.m., according to police Chief Christopher Belcolle. The impact caused both bikers to crash into each other.
“We are attempting to locate a black sedan with damage encompassing the passenger side front quarter panel, extending to the area of the side mirror and/or door area,” Belcolle said in a news release.
Both bicyclists were treated for non life-threatening injuries at Englewood Hospital and Medical Center, police added. |
Q:
Finding 1000th 5-smooth number
Smooth numbers are natural numbers that are products of only small prime numbers. They have some applications in cryptography.
A number is 5-smooth if its only prime factors are $2,3$ or $5$.
Example:
$$1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, \dots$$
Interesting thing is that as they become larger and larger, they are sparser and sparser, with respect to all natural numbers...
I have 2 problems I am struggling with:
1. Find an algorithm for finding $n$-th 5-smooth number. (if possible, in less than $\mathcal{O}(n)$)
2. What is 1000th 5-smooth number?
Appreciate any idea and/or insight.
A:
Let $u_n\ne1$ be the $n$-th 5-smooth number. At least one of
$$
\frac32\,u_n, \frac43\,u_n, \frac65\,u_n
$$
is a 5-smooth number greater than $u_n$. Let $U_n$ be the smallest of them. Then
$$
u_n<u_{n+1}\le U_n.
$$
Check the numbers $u_n+1,u_n+2,\dots$ until you find a 5-smooth number. The algorithm can be made faster with the following tricks:
Get a smaller $U_n$ by defining it as the smallest 5-smooth number among
$$
\frac32\,u_n, \frac43\,u_n, \frac54\,u_n, \frac65\,u_n, \frac98\,u_n,\frac{16}{15}\,u_n,\frac{25}{24}\,u_n,\frac{27}{25}\,u_n,\frac{81}{80}\,u_n,\dots
$$
Each fraction is the quotient of two coprime consecutive 5-smooth numbers.
To check if a number is 5-smooth, do not factorize. Just check if its only prime factors are $2$, $3$ and $5$. This can be done efficiently by repeated division.
I have coded this in Mathematica and got that
$$
u_{1000}=51200000=2^{14}5^5.
$$
A:
Unless I am missing something, Julian's algorithm will simply check all numbers from 1, 2, 3, ... until it finds the 1000th 5-smooth number. This means it requires $O(u_n)$ time.
A more efficient algorithm is as follows. Let $N$ be large, and define $S_2$, $S_3$ and $S_5$ s follows.
$S_2 = \cup_{i=0}^{\infty} \{2^i\} \cap \{1, 2, \ldots, N\}$
$S_3 = \cup_{i=0}^{\infty} \{3^i s | s \in S_2\} \cap \{1, 2, \ldots, N\}$
$S_5 = \cup_{i=0}^{\infty} \{5^i s | s \in S_3\} \cap \{1, 2, \ldots, N\}$
If $N$ is chosen large enough so that $|S_5|>1000$, then we can easily find $u_{1000}$. I believe (not a proof) that $|S_2| = O(\log{N})$ ,$|S_3|=O(\log^2 N)$, and $|S_5|=O(\log^3 N)$, which leads to a polynomial time algorithm for the problem, as long as we choose $N$ large enough. I also believe that we may choose $N \approx e^{n^\frac{1}{3}}$ in order to get $|S_5|>n$, but I have not proven this yet...
A:
Every $5$-smooth number is of the form $2^x3^y5^z$. Let's call the $1000$th one $M$. That means there are $1000$ nonnegative integer solutions to $$2^x3^y5^z<M$$ This is the same as having $1000$ nonnegative integer solutions to $$\log(2)x+\log(3)y+\log(5)z<\log(M)$$
There are approximately as many nonnegative integer solutions as the volume of the tetrahedron that this linear inequality defines: $\frac{1}{6}\frac{(\log(M))^3}{\log(2)\log(3)\log(5)}$. So we can immediately zoom in on the order of magnitude of $M$ by solving $$\begin{align}
\frac{1}{6}\frac{(\log(M))^3}{\log(2)\log(3)\log(5)}
&\approx1000\\
\implies M
&\approx \exp\left(\sqrt[3]{6000\log(2)\log(3)\log(5)}\right)\approx 278817463=:\tilde{M}
\end{align}$$
Now define $S_0=\{1\}$. Since each $5$-smooth number will yield three more through multiplication by $2$, $3$, and $5$, generate more $5$-smooth numbers this way. We have
$S_1=\{2,3,5\}$. And then $S_2=\{4,6,10,6,9,15,10,15,25\}$, which we cull down to $\{4,6,10,9,15,25\}$.
Keep creating these $S_i$, culling away duplicates and also culling away any results that take you too far past our ballpark for $\tilde{M}$. For instance, if you reach $2\tilde{M}$, throw that number out.
Eventually you will have run out of options (after about $\log_2(2\tilde{M})\approx28$ iterations). This will leave you with a collection $S=S_0\cup S_1\cup \cdots S_n$ of all of the $5$-smooth numbers less than $2\tilde{M}$, of which there ought to be $K>1000$. Apply a sorting algorithm (at worst ${\cal O}(K\log(K))$, but probably quicker since there is some natural ordering already from this process) and you can pick out the $1000$th term.
Note: it might be faster to get $S$ just to iterate through it like
for i = 0..log_2(2M)
for j = 0..log_3(2M/2^i)
for k = 0..log_5(2M/2^i/3^j)
append 2^i*3^j*5^k to S
|
Category Archives: Hunted: The Demon’s Forge
Post navigation
We are happy to announce that Lucy Lawless has joined the cast of Hunted: The Demon’s Forge!
No stranger to titles with colons, fans will know Lawless from her work on such shows as Xena: Warrior Princess, Battlestar: Galactica and Spartacus: Blood and Sand. In Hunted she’ll play Seraphine, the adventurer-turned-temptress that guides our heroes Caddoc and E’lara through the dark dungeons of Dyfed.
“Hunted is an incredibly dark, intense game and I’m delighted to have the opportunity to work on such a thrilling project,” said Lawless. “After playing the heroine for so long it’s refreshing to portray such a villainous, seductive temptress!”
In addition to playing a bit of Brink, plenty of press also recently took a spin through the world of Hunted. As such, we’ve got a load of previews to share, with more coming in. Check out the following articles for now:
An ancient evil has been unleashed deep in the heart of Kala Moor, and two mercenaries are pitted against the growing power of a dark army. This is Hunted — and hey, we’ve managed to find a new trailer for it. Check it out above.
Hunted will be available June 1st across North America and on June 3rd in Europe, and is slated for release on the Xbox 360, PlayStation 3, and PC. Hit up www.huntedthegame.com for more info.
There seems to be a lot of sociological commentary churning in the game’s environment and story. Where did you go for inspiration for that?
We want Brink to be sticky: both to draw players in and keep them imaginatively engaged, even when they’re not playing. The test of any character or scenario is whether it lives on in your imagination even after you’ve stopped playing the game, so we wanted to incorporate real world thematic content into the storylines for Brink for players to become engaged.
After the break, we’ve got more coverage on Brink — plus updates for New Vegas.
Celebrating Hunted’s release date (June 1st in North America, June 3rd in Europe), we’ve got a new developer diary from design director Chris Keenan. In the diary, Chris shares details on Hunted’s main enemy type — the Wargar. These persistently nasty bad guys will attack you in a number of ways throughout your adventure. In this diary details their strategies and provides pointers on how to thwart them.
Take it away, Chris…
Every action game has a core enemy that the player fights consistently throughout the adventure. Some games have infantry soldiers, while others present drones that will feverishly attempt to prevent the player’s forward progress. In Hunted : The Demon’s Forge, the Wargar fill that role. Knowing that the player will be fighting different packs of Wargar for much of their play experience, we made sure that the enemy behaviors prompted the players to change their play style depending on the type of Wargar that made an appearance. With Caddoc being a melee-focused player and E’lara’s proficiency in ranged weapons, we knew we had a challenge to create enemy AI that provided interesting situations for both of these player characters. For this reason, we broke the Wargar tribes down into multiple classes with drastically different behaviors. The main classes are melee Wargar (Soldiers, Warriors, Guardians and Zealots), ranged Wargar (Archers, Scorchers and Blastcasters) and Casters (Infected). Notice how these classes mirror the player’s abilities to offer challenges to different play styles.
In a press release that just went out, we’ve announced the release dates for Brink (May 17th in North America, May 20th in Europe) and Hunted: The Demon’s Forge (June 1st in North America, June 3rd in Europe). The two games complete our Class of 2011 lineup, which also includes join RAGE (September 13th in North America, September 16th in Europe) and The Elder Scrolls V: Skyrim (November 11th worldwide).
For more information, read the full press release below…
BETHESDA SOFTWORKS ANNOUNCES BLOCKBUSTER
2011 VIDEO GAME LINEUP
Brink and Hunted Release Dates Announced
January 27, 2011 (Rockville, MD) – Bethesda Softworks®, a ZeniMax® Media company, today announced the release dates of four multiplatform AAA titles shipping in 2011. Brink™, Hunted: The Demon’s Forge™, RAGE™, and The Elder Scrolls® V: Skyrim™ are all slated for release on the Xbox 360® video game and entertainment system from Microsoft, PlayStation®3 computer entertainment system, and Games for Windows.
Brink, an immersive first-person shooter under development at Splash Damage, will be available in North America on May 17th and in Europe on May 20th. Brink was named as the ‘Game of Show’ at Eurogamer Expo 2010, while G4TV.com declared “Brink takes shooters to a whole new level.” Blending single-player, co-op, and multiplayer action into one seamless experience, Brink features dynamic battlefields, extensive customization options, and an innovative control system.
Hunted, a fantasy action game, will be available in retail stores across North America on June 1st and on store shelves in Europe on June 3rd. Hunted is a fresh take on the classic dungeon crawl experience that delivers the intensity and action of a modern-day shooter. Hunted, under development at inXile Entertainment, has been called “A Dungeon Crawl for the Gears Age” by Kotaku.com and has been described by Eurogamer as “violent, deceptively thoughtful and witty.”
If you haven’t already, be sure to check out our new website for Hunted: The Demon’s Forge. In addition to the latest video, The World of Hunted, the site has new concept art, a bestiary, and profiles for the game’s heroes — Caddoc and E’Lara. And in the coming weeks and months, we’ll have plenty more to share.
When it comes to multi-faceted open world RPGs, everyone has their own priorities. As evidence of this phenomenon, we’ve been enjoying the following articles that guess/hope at Elder Scrolls V: Skyrim features: |
416 So.2d 1271 (1982)
William E. LINGOLD and Patricia E. Lingold, Appellants,
v.
TRANSAMERICA INSURANCE COMPANY and Robert E. Howard, d/b/a Bob Howard Construction Company, Appellees.
No. 81-1264.
District Court of Appeal of Florida, Fifth District.
July 21, 1982.
*1272 Robert A. Cole and Rutledge R. Liles of Howell, Howell, Liles, Braddock & Milton, Jacksonville, for appellants.
Robert M. Sharp and W. Douglas Childs of Bullock, Sharp, Childs, Mickler & Cohen, P.A., Jacksonville, for appellees.
COWART, Judge.
This case involves the question of whether or not a general contractor is immune under the workers' compensation statute from suit against it by an injured employee of a subcontractor.
Appellee, as general contractor, contracted to build a residence for an owner and the contract included supplying and installing floor covering. The general contractor had a general agreement with a floor covering company to provide floor covering to fulfill the contract requirement. However, the contract provided a monetary allowance for the cost of the floor covering and the contractor permitted the owner and the floor covering company to deal directly so that the latter could provide floor covering to the owner's satisfaction, with the owner paying the floor covering company all costs over the contract allowance paid by the general contractor. Appellant, an employee of the floor covering company, was injured on the job, collected workers' compensation benefits from his employer then sued appellee, the general contractor, for negligently failing to provide a safe work place. The trial court entered summary judgment for the general contractor on the basis that it was an employer and immune under workers' compensation from suit by appellant. This appeal results.
If appellee was required to carry workers' compensation insurance on appellant, or see that it was carried, appellee is immune from suit by appellant; otherwise, appellee is not immune.[1]
Under Florida law applicable in this case,[2] an entity is required to provide workers' compensation when it is an "actual" employer[3] because it employs laborers under direct supervision and control or when it, as a contractor,[4] sublets[5] part of a contract obligation to others and thereby becomes *1273 a "statutory employer" of the subcontractor's employees.[6] In this latter instance, whether the subcontractor is an "independent contractor" or not is irrelevant.[7]
In this case, the original contract required appellee, as general contractor, to supply and install floor covering. Without regard to the question of whether the subcontractor was an "independent contractor" or was subject to the general contractor's direct supervision, and notwithstanding that the owner had some direct dealings with appellant's employer, the floor covering company, that entity was performing part of appellee's obligation under the main contract, therefore under section 440.10(1), Florida Statutes (1979), the floor covering company was a subcontractor to appellee and appellant was a statutory employee of appellee. Accordingly, workers' compensation was appellant's exclusive remedy. The summary judgment for appellee was proper and is hereby
AFFIRMED.
ORFINGER, C.J., and FRANK D. UPCHURCH, J., concur.
NOTES
[1] § 440.11(1), Fla. Stat. (1981); Conklin v. Cohen, 287 So.2d 56, 59 (Fla. 1973); Smith v. Ussery, 261 So.2d 164, 165 (Fla. 1972); Jones v. Florida Power Corp., 72 So.2d 285, 287 (Fla. 1954).
[2] § 440.10, Fla. Stat. (1979). That section was amended by chapter 80-236, section 2, Laws of Florida, effective July 1, 1980, but such amendment is not applicable in this case.
[3] See § 440.02(4), Fla. Stat. (1979).
[4] "A contractor is one under a contractual obligation to perform some work for another." Motchkavitz v. L.C. Boggs Indus., Inc., 407 So.2d 910 (Fla. 1981); State ex rel. Auchter Co. v. Luckie, 145 So.2d 239 (Fla. 1st DCA), cert. denied, 148 So.2d 278 (Fla. 1962).
[5] "To `sublet' means to `underlet', Webster's New International Dictionary; in the context in which it is here used, the effect of subletting is to pass on to another an obligation under a contract for which the person so `subletting' is primarily obligated." Jones v. Florida Power Corp., 72 So.2d at 289. This passage was quoted in Conklin v. Cohen, 287 So.2d at 59 (citing Jones v. Florida Power Corp. and Smith v. Ussery) and Smith v. Ussery, 261 So.2d at 165 (citing Jones v. Florida Power Corp.).
[6] See § 440.10(1), Fla. Stat. (1979).
[7] See, e.g., Motchkavitz v. L.C. Boggs Indus., Inc.; Miami Roofing & Sheet Metal Co. v. Kindt, 48 So.2d 840 (Fla. 1950).
|
<div class="info notice">
<p>There is a newer version of OpenVBX available: Version <?php echo $latest_version; ?>. Please update OpenVBX to get the latest feature and security updates and fixes.</p>
<p><a href="http://openvbx.org/upgrade" onclick="window.open(this.href); return false;">See the upgrade guide</a> on how to upgrade your install. <a href="https://github.com/twilio/OpenVBX/blob/<?php echo $latest_version; ?>/CHANGELOG.markdown" onclick="window.open(this.href); return false;">See the CHANGELOG</a> for a complete list of changes.</p>
</div> |
Q:
Performance issue with correlated SQL Server query
I have a query that looks like the following, it is just entirely too slow and I don't know how to speed it up. This query is currently correlated. Will a temp table to then join solve this?
SELECT
e.ID, e.Name
FROM
Employees e
WHERE
e.Salary > (SELECT AVG(e2.Salary)
FROM Employees e2
WHERE e2.DepartmentID = e.DepartmentID)
A:
Please try following SQL query
with cte as (
select
*,
AVG(Salary) over (partition by DepartmentID) average
from employees
)
select * from cte where Salary > average
Here you will see that I used SQL Average aggregation function with Partition By clause
In order to use it I preferred a SQL CTE expression
|
http://gty.im/841342328
Why Rudock Should Keep His Backup QB Position.
Impressive Preseason Performances
In eight preseason games, Jake Rudock has completed 67 of 107 passing attempts (62.6%) for 713 yards with 7 touchdown passes and just 2 interceptions. That comes out to a fantastic 96 quarterback rating.
While Rudock has only made one regular appearance thus far (and it went terribly, he went 3/5 passing for 24 yards with an interception), he has made the most of his playing time in the preseason.
In 2016, he went 14/23 for 171 yards and 3 touchdowns against the Bills. Last year, his stat lines against the Colts was 13/21 for 141 yards and 2 touchdowns.
In the third game of the 2017 preseason, against the defending Super Bowl champion Patriots, he completed 10/13 passes for 113 yards and a touchdown, bringing the Lions back from a 24-14 deficit to take a 28-24 lead in the fourth quarter.
All in all, Rudock has shown an ability to command the Lions offense in his admittedly limited opportunities. There are many quarterbacks who look solid in the preseason, only to be unable to put it all together in the regular season. However, it is never a bad thing to have strong preseason performances.
He Knows The Playbook
Jake Rudock is entering his third season with the Lions, and also his third season under offensive coordinator Jim Bob Cooter. Cooter took over the Lions offense roughly half way through the 2015 season, meaning Rudock has only been in this offensive system for about a half year less than starting quarterback Matthew Stafford.
Also, Rudock is very familiar with the offensive personnel. He has for two season been teammates with Golden Tate, Marvin Jones, Theo Riddick, TJ Jones, Ameer Abdullah, Taylor Decker, Graham Glasgow and other key offensive players. This theoretically could increase chemistry between Rudock and these players if he ever had to step into a real game for Matthew Stafford.
While Rudock’s competition, 13th year quarterback Matt Cassel, has much more NFL experience, he no experience whatsoever in Cooter’s spread, pass heavy, air raid style offense. Rudock’s familiarity with both the scheme and players on the offense give him a definitive edge in this area.
http://gty.im/928617554
Mobility
Rudock has also rushed for 121 yards in his eight preseason games, averaging 8.1 yards per carry. That means that, on average, he added just over 15 yards per game on the ground. The Lions offense only averaged 76.3 rushing yards per game last season, so an extra 15 yards could be very significant.
For comparison, Matthew Stafford averaged 6.1 rushing yards per game last year. His career high came in 2016, when he ran for 207 yards, or an average of 12.9 yards per game.
In Rudock’s preseason performances, he has show a very strong scrambling ability, and that is extremely useful. Even when he didn’t run the ball, he has done a good job of evading pressure and buying time for his receivers to get open. This can be one of the hardest things for quarterbacks to learn, and Rudock has been a natural at it since he’s been with the Lions.
His Competition Isn’t Very Good
As unproven in the regular season as Jake Rudock is, Matt Cassel is equally proven. Proven to be bad.
In his career, Matt Cassel has played in 106 games. He’s started 15 games three times in his career. Outside of one pro bowl season in 2010, he has been spectacularly average at best.
However, over the last six seasons, Cassel’s play has declined from average to downright bad. He’s played in 37 games in that time, completing 529/899 passes (58.8%) for 5750 yards, 28 touchdowns, 36 interceptions and a passer rating of just 71.5.
While Matt Cassel has veteran experience, he simply does not have what it takes to play in the NFL anymore. The Lions should go with the younger player with much higher potential as their backup, Jake Rudock.
Thanks for reading! For more Lions content, follow me on Twitter @Lucas_Walker00 and don’t forget to pay a visit to the Detroit Lions Subreddit! |
#ifdef USE_ONNX
#include "onnx/expression_graph_onnx_exporter.h"
#include "graph/expression_operators.h"
#include "graph/node_operators_unary.h"
#include "graph/node_operators_binary.h"
#include "common/version.h"
#define AuxillaryParseTableField AuxiliaryParseTableField // in protobuf 3.12, the generated source has a spelling error
#include "3rd_party/onnx/protobuf/onnx-ml.pb-wrapper.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
namespace marian {
// collection of helper functions for accessing and converting Expr properties
// This class is a friend of all node-op classes whose attributes we need to access.
class SerializationHelpers {
public:
// helper for accessing class members in Marian's polymorphic node classes
// If 'e' is of NNaryNodeOp then execute getFn() and return true.
template<class NNaryNodeOp, typename F>
static bool tryGetAttributes(Expr e, const F& getFn) {
auto np = std::dynamic_pointer_cast<NNaryNodeOp>(e);
if (!np)
return false;
getFn(np);
return true;
}
template<class NNaryNodeOp>
static bool tryGetScalarAttribute(Expr e, float& scalar) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { scalar = np->scalar_; });
}
template<class NNaryNodeOp>
static bool tryGetMatMulAttributes(Expr e, bool& transA, bool& transB, float& scalar) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) {
transA = np->transA_;
transB = np->transB_;
scalar = np->scalar_;
});
}
template<class NNaryNodeOp>
static bool tryGetEpsilonAttribute(Expr e, float& eps) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { eps = np->eps_; });
}
template<class NNaryNodeOp>
static bool tryGetAxisAttribute(Expr e, size_t& axis) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { axis = (size_t)e->shape().axis(np->axis_); });
}
template<class NNaryNodeOp>
static bool tryGetAxesAttribute(Expr e, std::vector<size_t>& axes) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) {
axes.clear();
for (auto ax : np->axes_)
axes.push_back((size_t)e->shape().axis(ax));
});
}
template<class NNaryNodeOp>
static bool tryGetShiftAttributes(Expr e, std::vector<int>& shift, float& padValue) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) {
shift.assign(np->shift_.begin(), np->shift_.end());
padValue = np->padValue_;
});
}
template<class NNaryNodeOp>
static bool tryGetSliceAttribute(Expr e, Slice& slice) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { slice = np->slice_; });
}
template<class NNaryNodeOp>
static bool tryGetReshapeeAttributePtr(Expr e, Expr*& ep) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { ep = &np->reshapee_; });
}
template<class NNaryNodeOp>
static bool tryGetStepNodeAttributePtr(Expr e, Expr*& ep) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { ep = &np->stepNode_; });
}
template<class NNaryNodeOp>
static bool tryGetMaskAttributePtr(Expr e, Expr*& ep) {
return tryGetAttributes<NNaryNodeOp>(e, [&](IPtr<NNaryNodeOp> np) { ep = &np->mask_; });
}
// call this for mandatory parameters, e.g. tryGetMaskAttributePtr(...) || tryFailed("message", ...)
template<typename... Args>
static bool fail(Args&&... args) {
ABORT(std::forward<Args>(args)...);
}
static bool fail() { return fail("an attempt to access a Marian node attribute unexpectedly failed due to a type mismatch"); }
};
using E = SerializationHelpers;
struct InputsMap : public std::map<Expr, Expr> {
Expr operator()(Expr e) const {
auto iter = find(e); // redirect input if found
if (iter != end())
e = iter->second;
return e;
}
};
// helper for rebuildNodesForward()
static void addNodeAndChildren(Expr node, std::list<Expr>& nodesForward, std::set<Expr>& visited, const InputsMap& inputsMap)
{
// check if this is an input
// In that case, we generate a replacement node instead, which has no children and thus terminates the recursion.
// All nodes that reference this input are, however, unmodified.
// The tape is now inconsistent. The consumer of this tape must perform child mapping.
auto replacementNode = inputsMap(node);
if (replacementNode != node)
node = replacementNode;
// recursion terminates if we already visited a node
// (Input mapping is taken into account already.)
auto res = visited.insert(node);
if (!res.second) // already in visited set: done
return;
for (auto& child : node->children()) // children come before node itself
addNodeAndChildren(child, nodesForward, visited, inputsMap);
nodesForward.push_back(node);
}
// rebuild nodesForward_ from a graph given by its set of roots
// Also replaces the inputs by constants, but does not redirect references (leaving an invalid tape--must be corrected on the fly by the caller!).
void ExpressionGraphONNXExporter::rebuildNodesForward(const InputsMap& inputsMap,
const std::vector<std::pair<std::string, Expr>>& outputDefs) {
nodesForward_.clear();
std::set<Expr> visited;
for (auto& outputDef : outputDefs)
addNodeAndChildren(outputDef.second, nodesForward_, visited, inputsMap);
}
class NodeReferenceRedirector {
std::map<Expr, Expr> nodeMap; // [orig node] -> replacement nodes
public:
void addRedirect(const Expr& whichNode, const Expr& withWhichNode) {
nodeMap[whichNode] = withWhichNode;
}
// in-place redirect an Expr reference, i.e. look up the redirect and replace the original with it
void redirectReference(Expr& child) const {
auto iter = nodeMap.find(child);
if (iter != nodeMap.end()) {
child = iter->second; // redirect child to the replacement node
ABORT_IF(nodeMap.find(child) != nodeMap.end(), "Nested macro expansion??");
}
};
// redirect all references (=children and more in special cases)
void redirectAllReferencesIn(Expr v) const {
// redirect all children
auto& children = v->children(); // this is a mutable reference
for (auto& child : children) { // child is a mutable reference
redirectReference(child);
}
// redirect additional references tat some nodes hold
Expr* ep{};
if (E::tryGetReshapeeAttributePtr<ReshapeNodeOp> (v, ep) ||
//E::tryGetStepNodeAttributePtr<StepNodeOp> (v, ep) || // @TODO: review all of these and update the names
E::tryGetMaskAttributePtr<PoolingWithMaskingOp>(v, ep)) {
redirectReference(*ep);
}
}
};
static Expr newConstant(Expr v, Shape shape, float val, std::string suffix) {
auto expr = v->graph()->constant(shape, inits::fromVector(std::vector<float>(shape.elements(), val)));
expr->set_name("const_" + v->type() + "_" + std::to_string(v->getId()) + "_" + suffix);
// Note: By convention, all constants should be named const_ something (and all data inputs data_),
// to distinguish them from trainable weight tensors.
return expr;
}
// unroll higher-level operations for which no ONNX equivalent exists
// This updates the functionDefs' root nodes in-place.
// Note: This appends to nodesForward_ in-place. Some meta-information, like root node, is not updated correctly.
void ExpressionGraphONNXExporter::expandMacroOpsForONNX(std::map<std::string, std::pair<std::vector<std::pair<std::string, Expr>>, std::vector<std::pair<std::string, Expr>> >>& functionDefs) {
LOG(info, "[graph] Expanding macro ops into primitives. Current graph size is {}", nodesForward_.size());
NodeReferenceRedirector nodeReferenceRedirector;
// clear memoization cache, as it removes some children for ops that have not changed since last inference
tensors_->clearLongtermMemory();
// Note: expansions will add to the existing tape in-place. But we disallows nested expansions,
// i.e. disallow looping over newly created nodes, because otherwise the nodeReferenceRedirector
// becomes very complicated because those new nodes are no longer topo-sorted.
// The for loop below loops also over newly-created nodes, but those may not
// trigger another expansion, which will be caught in redirectReference() above.
auto beg = nodesForward_.begin();
auto end = nodesForward_.end();
for (auto vi = beg; vi != end; ++vi) {
auto& v = *vi;
// redirect all children of this node, in case they got mapped in this process
nodeReferenceRedirector.redirectAllReferencesIn(v);
// expand macro ops
Expr n;
#if 0 // For GC ONNX, some ops are still missing. Map these first.
// @BUGBUG: These operators are not up-to-date
if (v->type() == "highway") {
// Replace Sigmoid by Softmax. The only sigmoid in the system comes from highway.
auto y = v->child(0); // something like [B, H, T, dim]
auto x = v->child(1);
auto t = v->child(2);
auto shape = x->shape();
ABORT_IF(y->shape() != shape || t->shape() != shape, "unexpected highway shapes??");
// Softmax([x,0]) = (Sigmoid(x), 1-Sigmoid(x))
// Softmax([x,y]) = e^x / (e^x + e^y)
// Sigmoid(x) = e^x / (e^x + e^0)
auto shape1 = Shape{shape.elements() / shape.back(), shape.back(), 1};
t = reshape(t, shape1);
auto tAug = concatenate({t, newConstant(v, t->shape(), 0.0f, "zero_row")}, -1); // [(B*H*T, dim, 2)]
auto s = softmax(tAug, /*axis=*/-1); // = (Sigmoid(t), 1-Sigmoid(t)) : [(B*H*T, dim, 2)]
s = swapAxes(s, 0, -1); // step() only supports axis=0
auto sy = step(s, 0, /*axis=*/0);
auto sx = step(s, 1, /*axis=*/0);
sy = swapAxes(sy, 0, -1);
sx = swapAxes(sx, 0, -1);
sy = reshape(sy, shape);
sx = reshape(sx, shape);
n = sy * y + sx * x;
//LOG(info, "OVERWRITING highway, {} -> {} -> {} -> back", std::string(shape), std::string(shape1), std::string(tAug->shape()));
}
else if (v->type() == "sum") {
// replace ReduceSum by a matrix product with a vector of ones
auto x = v->child(0);
auto shape = x->shape();
size_t lastAxis = shape.size() - 1;
size_t axis;
E::tryGetAxisAttribute<SumNodeOp>(v, axis) || E::fail();
if (axis != lastAxis) // bring axis to be reduced into last dimension so that we can MatMul
x = swapAxes(x, (int)axis, (int)lastAxis);
auto ones = newConstant(v, {x->shape().back(), 1}, 1.0f, "ones");
n = dot(x, ones); // [..., D] * [D, 1] = [..., 1]
if (axis != lastAxis) // and swap it back
n = swapAxes(n, (int)axis, (int)lastAxis);
//LOG(info, "OVERWRITING sum {}/{}, {} -> {} -> . -> {}", axis, lastAxis, std::string(shape), std::string(x->shape()), std::string(n->shape()));
}
else if (v->type() == "layer_normalization") {
// layerNorm along last axis
auto x = v->child(0);
auto s = v->child(1);
auto b = v->child(2);
auto vecDim = x->shape().back();
// for summing up elements, we use MatMul
auto onesOverDim = newConstant(v, {vecDim, 1}, 1.0f / vecDim, "ones_over_dim");
// compute mean and variance
auto mean = dot(x, onesOverDim);
auto x0 = x - mean;
auto var = dot(x0 * x0, onesOverDim);
// variance-normalize
float epsilon;
E::tryGetEpsilonAttribute<LayerNormalizationOp>(v, epsilon) || E::fail();
auto sigma = sqrt(newConstant(v, {}, epsilon, "epsilon") + var);
auto xnorm = x0 / sigma;
// and final scale/bias
n = xnorm * s + b;
//LOG(info, "OVERWRITING layerNorm {} -> {}", std::string(x->shape()), std::string(mean->shape()));
}
else
#endif
if (v->type() == "scalar_add") {
float scalar{};
E::tryGetScalarAttribute<ScalarAddNodeOp>(v, scalar) || E::fail();
n = v->child(0) + newConstant(v, {}, scalar, "scalar");
}
else if (v->type() == "scalar_mult") {
float scalar{};
E::tryGetScalarAttribute<ScalarMultNodeOp>(v, scalar) || E::fail();
n = v->child(0) * newConstant(v, {}, scalar, "scalar");
}
else if (v->type() == "square") {
auto x = v->child(0);
n = x * x;
}
#if 0 // @BUGBUG: not supported for now, since we don't aim at training. This requires a function called select() which no longer exists.
else if (v->type() == "x-ent") {
auto x = v->child(0); // logits : some_shape + (num_classes,)
auto y = v->child(1); // indices: some_shape + (1,)
// C = sum_{v in V}(-logsoftmax(A) * delta(v, i) = -logsoftmax(A)[i]
auto xShape = x->shape();
// note: indices are flattened into a vector
auto yShape = xShape; // true shape of y -> result shape
yShape.back() = 1;
auto nl = logsoftmax(x);
//nl->debug("nl");
#if 1 // ONNX has no batched select/gather, so we must fake it.
// We first flatten the batch to a vector.
nl = flatten(nl); // now x: (totalWords, vocabSize), while y: (totalWords,)
// Then we create a constant with offsets into this vector
auto vocabSize = xShape.back();
auto totalWords = xShape.elements() / vocabSize; // total batch size across batch and length dimension
std::vector<unsigned int> offs;
for (size_t i = 0; i < totalWords; i++)
offs.push_back((unsigned int)(i * vocabSize));
auto offsExpr = v->graph()->indices(offs);
offsExpr->set_name("const_" + v->type() + "_offsets_" + std::to_string(v->getId()));
// Now form indices into the flattened vector using the offsets
y = y + offsExpr; // -> [y0, y1 + V, y2 + 2V, ...]
// Now we can select with this.
n = -select(nl, y, /*axis=*/-1);
n = reshape(n, yShape);
//LOG(info, "x-ent: {}, {} -> {}", std::string(x->shape()), std::string(y->shape()), std::string(n->shape()));
#else // better version, but unfortunately neither Marian nor ONNX support batched select/gather
y = reshape(y, yShape);
n = -select(nl, y, /*axis=*/-1); // @TODO: update if we ever add axis_ to x-ent
#endif
}
#endif
else if (v->type() == "highway") {
auto y = v->child(0);
auto x = v->child(1);
auto t = v->child(2);
auto s = sigmoid(t);
auto oneExpr = newConstant(v, {}, 1.0f, "one");
n = s * y + (oneExpr - s) * x;
}
else if ( v->type() == "bdot" ||
(v->type() == "dot" /* && (v->child(0)->shape().size() != 2 || v->child(1)->shape().size() != 2)*/) ||
(v->type() == "affine" && (v->child(0)->shape().size() != 2 || v->child(1)->shape().size() != 2 || v->child(2)->shape().size() > 2))) {
// ONNX MatMul behaves like Numpy matmul, and therefore implements batched semantics.
// ONNX MatMul has no transA/B/scale parameters, so we must handle those as explicit operations.
// affine() could also be ONNX Gemm, but that does not support outer ranks, so we just expand it into dot().
// @TODO: ^^ we can just reshape(). Code is already below, but ONNX Gemm always crashes, so this is disabled for now.
auto a = v->child(0);
auto b = v->child(1);
bool transA{}, transB{}; float scalar{}; // (gcc complains without the initializers, which I think is a compiler bug)
E::tryGetMatMulAttributes<DotNodeOp> (v, transA, transB, scalar) ||
E::tryGetMatMulAttributes<DotBatchedNodeOp>(v, transA, transB, scalar) ||
E::tryGetMatMulAttributes<AffineNodeOp> (v, transA, transB, scalar) || E::fail();
//LOG(info, "{} {}={}x{} trans = {}, {} and scalar = {}",
// v->type(), std::string(v->shape()), std::string(a->shape()), std::string(b->shape()), transA, transB, scalar);
if (transA || transB || scalar != 1.0f ||
(v->type() == "affine" && (a->shape().size() != 2 || b->shape().size() != 2 || v->child(2)->shape().size() > 2))) {
//LOG(info, "patching {} {}={}x{} due to trans = {}, {} and scalar = {}",
// v->type(), std::string(v->shape()), std::string(a->shape()), std::string(b->shape()), transA, transB, scalar);
if (transA) { // note: we don't optimize for this since it does not happen in present models
a = swapAxes(a, -1, -2);
transA = false;
}
// @BUGBUG: Gemm always crashes with ONNX runtime. So we can't do this optimization.
//if (v->type() != "bdot" && b->shape().size() == 2) { // [A,B,C,I,J] x [J,K] --> reshape into regular matrix product
// ABORT_IF(transA, "Transposition not mapped away??");
// a = reshape(a, Shape({ a->shape().elements() / a->shape()[-1], a->shape()[-1] })); // now it's a regular matrix product, can use Gemm
//}
/*else*/ if (transB) { // not a regular matrix product: cannot use Gemm, so must transpose manually
b = swapAxes(b, -1, -2);
transB = false;
}
float extraScalar = 1.0f;
if (v->type() == "bdot") { // this maps to ONNX MatMul
extraScalar = scalar; // must add extra scale operation at the end
scalar = 1.0f; // we cannot scale in ONNX MatMul
ABORT_IF(transA || transB || scalar != 1.0f, "Transposition and/or scalar not mapped away??");
n = bdot(a, b, transA, transB, scalar);
}
else { // dot, affine
// @BUGBUG: Gemm always crashes with ONNX runtime. So we can't do this optimization.
//if (a->shape().size() != 2 || b->shape().size() != 2) { // not ONNX MatMul: must use explicit scale operation
extraScalar = scalar;
scalar = 1.0f;
//}
n = dot(a, b, transA, transB, scalar);
//LOG(info, "{} {} x {} -> {}", v->type(), std::string(a->shape()), std::string(b->shape()), std::string(n->shape()));
if (v->type() == "affine")
n = n + v->child(2);
}
//if (v->type() == "affine")
// LOG(info, "{} + {} -> {}", v->type(), std::string(v->child(2)->shape()), std::string(n->shape()));
if (extraScalar != 1.0f)
n = n * newConstant(v, {}, extraScalar, "scalar");
if (n->shape() != v->shape())
n = reshape(n, v->shape()); // if we did some shaping to get a regular matrix product, reshape it back
}
}
else if (v->type() == "affine" && v->children().size() > 3) {
// affine() may have a redundant vector of ones, which we strip here
// This then becomes Gemm.
v->children().resize(3);
ABORT("affine() can presently not stripped of its additional ones vector. Need to fix Marian first to run with this.");
// Note: Cannot recreate affine() as a new node, because that will get that fourth axis again.
// @BUGBUG: This will crash.
}
#if 0 // @BUGBUG: select() no longer exists. Likely some other ops are missing now.
else if (v->type() == "select") {
// select maps to Gather, and is limited to non-batched and the last axis
size_t axis;
E::tryGetAxisAttribute<SelectNodeOp>(v, axis) || E::fail();
auto data = v->child(0);
auto indices = v->child(1);
auto dataShape = data->shape();
auto dataRank = dataShape.size();
auto indicesShape = indices->shape();
auto indicesRank = indicesShape.size();
auto indicesDim = indicesShape[(int)axis - (int)dataShape.size()];
ABORT_IF(indicesShape.elements() != indicesDim, "ONNX does not support batched select()");
if (indicesRank != 1 || axis != dataRank - 1) {
if (indicesRank != 1)
indices = flatten(indices); // (batched Gather is not supported)
if (axis != dataRank - 1)
data = swapAxes(data, (int)axis, (int)dataRank - 1); // swap select axis to back
n = select(data, indices, -1);
if (axis != dataRank - 1)
n = swapAxes(n, (int)axis, (int)dataRank - 1);
}
}
#endif
else if (v->type() == "layer_normalization" &&
(v->child(0)->shape().size() != 3 || v->child(1)->shape().size() != 1 || (v->children().size() > 2 && v->child(2)->shape().size() != 1))) {
// ONNX InferenceNormalization is layer norm for shapes (N, C, D, ...) where N and C are
// batch dimensions, and D... all share normalization statistics ("mean and variance are
// computed per instance per channel").
// Marian layer_normalization normalizes along axis -1.
// Hence, if the input rank is != 3, we must temporarily reshape.
// Also, ONNX expects scale and bias to contain C values (one for each c), while Marian
// shares scale and bias along C but uses vectors of dim D. Hence, we must apply them manually.
// This op gets replaced by a sequence that includes the same op, but with
// gamma and beta being scalars, which is invalid for Marian.
// (This will fail if layerNorm is applied to a scalar, which makes no sense.)
auto x = v->child(0);
auto s = v->child(1);
auto b = v->children().size() > 2 ? v->child(2) : nullptr; // beta is optional
auto outShape = x->shape();
auto vecDim = outShape[-1];
x = reshape(x, {outShape.elements() / vecDim, 1, vecDim}); // -> (N, C, D)
ABORT_IF((s->shape().size() > 1 && s->shape()[-1] != s->shape().elements()) ||
(b && b->shape().size() > 1 && b->shape()[-1] != b->shape().elements()),
"scale and bias must be vectors or single rows");
s = flatten(s);
if (b)
b = flatten(b);
//LOG(info, "layer_normalization reshaped from {} to {}", std::string(outShape), std::string(x->shape()));
float epsilon;
E::tryGetEpsilonAttribute<LayerNormalizationOp>(v, epsilon) || E::fail();
//LOG(info, "LNORM {}, {}, {} vs. {}, {}", std::string(x->shape()), std::string(oneExpr->shape()), std::string(zeroExpr->shape()), std::string(s->shape()), std::string(b->shape()));
n = layerNorm(x, newConstant(v, {1}, 1.0f, "one"), newConstant(v, {1}, 0.0f, "zero"), epsilon);
n = n * s;
if (b)
n = n + b;
n = reshape(n, outShape);
}
else if (v->type() == "const" && v->name().find("dropout_mask_") == 0) {
// This is a randomly generated mask. We must replace this by RandomUniform.
// This is done in 3 steps:
// - We expand v as (uniform < keepProb) * scale; but because Marian has no "<", we use "-" instead for now. @HACKHACK 1
// - The uniform for now is a constant, which later gets converted as ONNX RandomUniform(0,1). @HACKHACK 2
// - The "-" with left arg of v gets patched to become ONNX Less. @HACKHACK 1 fix-up
auto pString = v->name();
pString.erase(0, pString.find_last_of('_') + 1);
float dropProb = std::stof(pString);
//LOG(info, "Found dropProb constant {} -> {}", v->name(), dropProb);
float keepProb = 1.f - dropProb;
float scale = 1.f / keepProb;
auto uniformExpr = v->graph()->constant(v->shape(), inits::zeros());
uniformExpr->set_name("opRandomUniform_" + std::to_string(v->getId())); // not using newConstant because of special node name
// (uniform(0,1) < keepProb) * scale
n = (uniformExpr - newConstant(v, {}, keepProb, "keepProb")) * newConstant(v, {}, scale, "scale");
// @HACKHACK 1: Marian has no "less than", so we use "-" instead. Must patch that back later.
// @HACKHACK 2: We use a specially-named constant as the placeholder for uniform(0,1).
}
if (n) {
// copy key properties
if (v->name() != n->name()) // (this tests for the empty name)
n->set_name(v->name() + "_expanded"); // (this branch is actually never taken presently)
n->setTrainable(v->trainable());
// register mapping
nodeReferenceRedirector.addRedirect(v, n);
LOG(info, "[graph] Macro op {} expanded with new root op {}", v->type(), n->type());
}
}
for (auto& functionDef : functionDefs) {
for (auto& output : functionDef.second.second) // redirect outputs: a root may also have been a macro op
nodeReferenceRedirector.redirectReference(output.second);
for (auto& output : functionDef.second.first) // redirect inputs: inputs may be the outputs of other functions
nodeReferenceRedirector.redirectReference(output.second);
}
// Since we added the expanded ops to the end of nodesForward_, we must bring it
// back into topologically sorted order.
LOG(info, "[graph] After creating expanded nodes, we now have {} nodes", nodesForward_.size());
}
using namespace onnx; // all -Proto classes come from here
const std::string LENGTH_AXIS_NAME = "SOURCE_LENGTH"; // the source length is a named (dynamic) axis with this name
// C++ port of a subset of https://github.com/onnx/onnx/blob/master/onnx/helper.py
static ValueInfoProto makeValueInfoProto(std::string name, TensorProto_DataType dataType, std::vector<size_t> shape, size_t sentinelDim) {
ValueInfoProto valueInfo;
valueInfo.set_name(name);
auto* valueInfoType = valueInfo.mutable_type();
auto* valueInfoTensorType = valueInfoType->mutable_tensor_type();
valueInfoTensorType->set_elem_type(dataType);
auto* valueInfoTensorTypeShape = valueInfoTensorType->mutable_shape();
for (auto dim : shape)
if (dim == sentinelDim)
valueInfoTensorTypeShape->add_dim()->set_dim_param(LENGTH_AXIS_NAME);
else
valueInfoTensorTypeShape->add_dim()->set_dim_value(dim);
return valueInfo;
}
template<typename T> // note: for now, must pass the matching dataType (not checked)
static TensorProto makeTensorProto(std::string name, TensorProto_DataType dataType, std::vector<size_t> shape, std::vector<T> vals) {
TensorProto tensor;
tensor.set_name(name);
tensor.set_data_type(dataType);
for (auto dim : shape)
tensor.add_dims(dim);
#if 0 // @HACKHACK for debugging: keep files small during debugging, so that we can load and view those files easily
*tensor.mutable_raw_data() = std::string((char*)vals.data(), (char*)(vals.data() + std::min(size_t(10), vals.size())));
#else
*tensor.mutable_raw_data() = std::string((char*)vals.data(), (char*)(vals.data() + vals.size()));
#endif
return tensor;
}
static inline void addAttribute(NodeProto& node, std::string name, std::vector<size_t> val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_INTS);
for (auto i : val)
attribute->add_ints(i);
}
static inline void addAttribute(NodeProto& node, std::string name, std::vector<int> val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_INTS);
for (auto i : val)
attribute->add_ints(i);
}
static inline void addAttribute(NodeProto& node, std::string name, std::string val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_STRING);
attribute->set_s(val);
}
static inline void addAttribute(NodeProto& node, std::string name, float val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_FLOAT);
attribute->set_f(val);
}
static inline void addAttribute(NodeProto& node, std::string name, int val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_INT);
attribute->set_i(val);
}
static inline void addAttribute(NodeProto& node, std::string name, size_t val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_INT);
attribute->set_i(val);
}
static inline void addAttribute(NodeProto& node, std::string name, bool val) {
AttributeProto* attribute = node.add_attribute();
attribute->set_name(name);
attribute->set_type(AttributeProto_AttributeType::AttributeProto_AttributeType_INT);
attribute->set_i(val ? 1 : 0); // bool is stored as int in ONNX
}
static void addAttributes(NodeProto&) { // end of recursion
}
template<typename T, typename... Attributes>
static void addAttributes(NodeProto& node, std::string name, T val, Attributes&&... moreAttributes) {
addAttribute(node, name, val);
addAttributes(node, std::forward<Attributes>(moreAttributes)...);
}
template <typename... Attributes>
static NodeProto makeNode(std::string opType, std::string nodeName,
std::vector<std::string> inputs, std::vector<std::string> outputs,
Attributes&&... attributes) {
NodeProto node;
node.mutable_op_type()->assign(opType);
for (auto input : inputs)
node.add_input(input);
for (auto output : outputs)
node.add_output(output);
if (!nodeName.empty())
node.set_name(nodeName);
addAttributes(node, std::forward<Attributes>(attributes)...);
return node;
}
static GraphProto makeGraph(const std::vector<NodeProto>& nodes, std::string name,
const std::vector<ValueInfoProto>& inputs,
const std::vector<ValueInfoProto>& outputs,
const std::vector<TensorProto>& initializers,
const std::vector<ValueInfoProto>& valueInfos) {
GraphProto graph;
for (auto& node : nodes)
*graph.add_node() = node;
graph.set_name(name);
for (auto& input : inputs)
*graph.add_input() = input;
for (auto& output : outputs)
*graph.add_output() = output;
for (auto& initializer: initializers)
*graph.add_initializer() = initializer;
for (auto& valueInfo : valueInfos)
#if 0 // add some as explicit outputs for debugging
if (valueInfo.name() == "opReshape_292" || valueInfo.name() == "opPad_294")
*graph.add_output() = valueInfo;
else
#endif
*graph.add_value_info() = valueInfo;
valueInfos;
return graph;
}
static ModelProto makeModel(const GraphProto& graph, std::string producerName) {
ModelProto model;
model.set_ir_version(IR_VERSION);
model.set_producer_name(producerName);
model.mutable_graph()->CopyFrom(graph);
#define OPSET_IMPORT_VERSION 11
model.add_opset_import()->set_version(OPSET_IMPORT_VERSION);
return model;
}
static std::string mapExprOp(Expr e) {
const static std::map<std::string, std::string> opMap = {
{"+" , "Add"},
{"-" , "Sub"},
{"*" , "Mul"},
{"/" , "Div"},
{"negate" , "Neg"},
{"ReLU" , "Relu"},
{"reshape" , "Reshape"},
{"affine" , "Gemm"}, // @TODO: is this just a hack, or meant to be used for this? It is not really standard GEMM semantics.
{"bdot" , "MatMul"},
{"dot" , "MatMul"},
{"sigmoid" , "Sigmoid"},
{"sqrt" , "Sqrt"},
{"sin" , "Sin"},
{"cos" , "Cos"},
{"tan" , "Tan"},
{"layer_normalization" , "InstanceNormalization"},
{"softmax" , "Softmax"},
{"logsoftmax" , "LogSoftmax"},
{"sum" , "ReduceSum"},
{"transpose" , "Transpose"},
{"concat" , "Concat"},
{"sliceView" , "Slice"},
{"shift" , "Pad"},
{"rows" , "Gather"},
{"select" , "Gather"},
// The following are never emitted to ONNX. Keep our original type names to avoid special-casing lots of code.
{"const" , "const"},
{"param" , "param"}
};
auto iter = opMap.find(e->type());
ABORT_IF(iter == opMap.end(), "ONNX export of operation {} is presently not supported", e->type());
return iter->second;
}
// get a unique name for an Expr. Either an actual name, or OP_ID if not named.
// 'nameOverrides' overrides that name. This is used for inputs and outputs.
static std::string getExprName(Expr e, const std::map<Expr, std::string>& nameOverrides) {
if (nameOverrides.find(e) != nameOverrides.end())
return nameOverrides.at(e);
std::string name = e->name();
if (name == "none") // Marian assigns "none" to denote an unassigned name
name = (e->type() == "const" ? "" : "op") + mapExprOp(e) + "_" + std::to_string(e->getId());
// For 'const', do not prefix "op", so that all internal constants in the system
// (i.e. not input data) have a prefix "const_" to distinguish them from weight tensors.
return name;
}
// convert Marian shape into vector<size_t>
static std::vector<size_t> getExprShape(Expr e) {
const auto& shape = e->shape();
return std::vector<size_t>(shape.begin(), shape.end());
}
// get TensorProto_DataType for an Expr
// Note: We map Marian uint32_t to ONNX signed integers because those are only used
// for indices for Gather operations, where Marian requires unsigned and ONNX signed.
static TensorProto_DataType getExprDataType(Expr expr) {
switch (expr->value_type()) {
case marian::Type::float32: return TensorProto_DataType::TensorProto_DataType_FLOAT;
//case marian::Type::uint32: //return TensorProto_DataType::TensorProto_DataType_UINT32;
case marian::Type::uint32: // uint32 becomes ONNX INT32 as well (see above)
case marian::Type::int32: return TensorProto_DataType::TensorProto_DataType_INT32;
default: ABORT("Tensor type not supported yet");
}
}
// convert a Marian constant to an ONNX TensorProto
static TensorProto makeExprTensorProto(Expr expr, const std::map<Expr, std::string>& nameOverrides) {
auto dataType = getExprDataType(expr);
auto name = getExprName (expr, nameOverrides);
auto shape = getExprShape (expr);
switch(expr->value_type()) {
case marian::Type::float32: { // @TODO: template this?
std::vector<float> valBuf;
expr->val()->get(valBuf);
return makeTensorProto(name, dataType, shape, valBuf);
}
case marian::Type::uint32: {
std::vector<uint32_t> valBuf; // note: uint32_t still get passed to ONNX as signed INT32 (cf. getExprDataType())
expr->val()->get(valBuf);
return makeTensorProto(name, dataType, shape, valBuf);
}
case marian::Type::int32: {
std::vector<int32_t> valBuf;
expr->val()->get(valBuf);
return makeTensorProto(name, dataType, shape, valBuf);
}
default:
ABORT("Tensor type not supported yet");
}
}
static void logNode(const NodeProto& node, const std::vector<size_t>& shape, size_t sentinelDim) {
std::string s = node.name() + " = " + node.op_type() + "(";
auto addComma = [&]() { if (s.back() != '(' && s.back() != '[') s += ", "; };
for (int i = 0; i < node.input_size(); i++) {
auto inputName = node.input(i);
addComma();
s += inputName;
}
for (int i = 0; i < node.attribute_size(); i++) {
auto attribute = node.attribute(i);
addComma();
s += attribute.name() + "=?";
}
s += (") : [");
for (auto dim : shape) {
addComma();
if (dim == sentinelDim)
s += LENGTH_AXIS_NAME;
else
s += std::to_string(dim);
}
s.push_back(']');
LOG(info, s);
}
// convert a Marian Expr to an ONNX node
// This function needs inputs and initializers because the special case of Reshape needs
// to create an extra input with initializer.
static void addExprNode(Expr expr, std::vector<NodeProto>& nodes, std::vector<ValueInfoProto>& inputs,
std::vector<TensorProto>& initializers,
const std::map<Expr, std::string>& nameOverrides, const InputsMap& inputsMap,
size_t sentinelDim) {
// get all children
// These may reference inputs, and hence must be mapped right here.
// The original child in this case is not on the tape.
auto children = expr->children();
for (auto& child : children)
child = inputsMap(child);
// inputs are referenced by their node names (also when they are leaves)
std::vector<std::string> inputNames;
for (const auto& child : children)
inputNames.push_back(getExprName(child, nameOverrides));
auto name = getExprName(expr, nameOverrides); // node name is used as both output name and node name
auto op = mapExprOp(expr);
//if (op == "MatMul" && expr->child(0)->shape().size() == 2 && expr->child(1)->shape().size() == 2) {
// op = "Gemm";
//}
#if 1 // workaround for onnxruntime which does not handle Pad correctly
if (op == "Pad") {
// Implement Pad as Slice >> Concat
std::vector<int> shifts;
float padValue{}; // (compiler bug: without initialization, I get an uninit warning, yet it is correctly set)
E::tryGetShiftAttributes<ShiftNodeOp>(expr, shifts, padValue) || E::fail();
ABORT_IF(shifts[0] != 1, "can only shift by one");
for (size_t i = 1; i < shifts.size(); i++)
ABORT_IF(shifts[i] != 0, "can only shift along first axis");
auto shape = getExprShape(children[0]);
// Slice [0:-1,:,:]
auto sliceName = name + "_Slice";
auto sliceNode = makeNode("Slice", sliceName, inputNames, {sliceName});
addAttribute(sliceNode, "axes", std::vector<size_t>{0});
addAttribute(sliceNode, "starts", std::vector<size_t>{0});
addAttribute(sliceNode, "ends", std::vector<size_t>{shape[0] - 1}); // drop last step
nodes.push_back(sliceNode);
LOG(info, "Pad slice op {}", sliceName);
// create a padding constant
auto paddingName = "const_" + name + "_Padding";
shape[0] = 1;
size_t n = 1;
for (auto& dim : shape)
n *= dim;
std::vector<float> zeros(n);
inputs. push_back(makeValueInfoProto(paddingName, TensorProto_DataType::TensorProto_DataType_FLOAT, shape, sentinelDim));
initializers.push_back(makeTensorProto (paddingName, TensorProto_DataType::TensorProto_DataType_FLOAT, shape, zeros));
LOG(info, "Pad constant {}", paddingName);
// Concat([paddingNode, sliceNode], axis=0)
auto node = makeNode("Concat", name, {paddingName, sliceName}, {name});
addAttribute(node, "axis", 0);
nodes.push_back(node);
LOG(info, "Pad concat op {}", name);
return;
}
#endif
auto node = makeNode(op, name, inputNames, {name});
//LOG(info, "NODE {} {} -> {}", name, expr->type(), E::mapExprOp(expr));
// add attributes needed by some operators
// fix up inputs
if (node.op_type() == "Reshape") { // Reshape requires the shape itself to be a tensor.
auto shapeInputName = "const_" + getExprName(expr, {}) + "_shape_attr";
*node.add_input() = shapeInputName;
// create a new input and a new initializer
auto shape = getExprShape(expr);
auto shape64 = std::vector<int64_t>(shape.begin(), shape.end());
for (auto& dim : shape64)
if (dim == (int64_t)sentinelDim)
dim = -1; // means that this one is inferred at runtime
std::vector<size_t> shapeShape{shape.size()}; // ONNX Reshape requires shape in INT64
inputs. push_back(makeValueInfoProto(shapeInputName, TensorProto_DataType::TensorProto_DataType_INT64, shapeShape, sentinelDim));
initializers.push_back(makeTensorProto (shapeInputName, TensorProto_DataType::TensorProto_DataType_INT64, shapeShape, shape64));
std::string s = shapeInputName;
for (auto& dim : shape64)
s += " " + std::to_string(dim);
LOG(info, s);
}
// axis attribute
size_t axis{};
std::vector<size_t> axes;
if (E::tryGetAxisAttribute<ConcatenateNodeOp>(expr, axis)// ||
//E::tryGetAxisAttribute<SelectNodeOp>(expr, axis)
) { // axis_ -> 'axis'
addAttribute(node, "axis", axis);
}
else if (E::tryGetAxisAttribute<ReduceNodeOp>(expr, axis) ||
E::tryGetAxisAttribute<SliceViewNodeOp>(expr, axis)) { // {axis_} -> 'axes'
addAttribute(node, "axes", std::vector<size_t>{axis});
}
else if (E::tryGetAxesAttribute<TransposeNodeOp>(expr, axes)) { // here, the axes are called 'perm'
addAttribute(node, "perm", axes);
}
else if (node.op_type() == "Softmax" || node.op_type() == "LogSoftmax") {
// Note: ONNX (Log)Softmax is not along an axis; rather along all axes >= given axis (they get flattened).
addAttribute(node, "axis", expr->shape().size()-1); // Marian softmax defaults to last axis. @TODO: update if we ever add an axis_ parameter.
}
else if (expr->type() == "rows") { // becomes Gather
// Example, adopted from ONNX docs:
// axis = 0
// data = [ [1.0, 1.2], [2.3, 3.4], [4.5, 5.7], ]
// indices = [ 0, 1, 1, 2, ]
// output = [ [1.0, 1.2], [2.3, 3.4], [2.3, 3.4], [4.5, 5.7], ]
ABORT_IF(expr->shape().size() != 2, "Unexpected input shape for rows()");
addAttribute(node, "axis", 0);
}
// slice attributes (starts, ends)
Slice slice;
if (E::tryGetSliceAttribute<SliceViewNodeOp>(expr, slice)) {
addAttribute(node, "starts", std::vector<size_t>{(size_t)slice.begin});
addAttribute(node, "ends" , std::vector<size_t>{(size_t)slice.end});
addAttribute(node, "steps" , std::vector<size_t>{(size_t)slice.stride});
}
// shift attributes (shift, padValue)
std::vector<int> shifts;
float padValue{}; // (compiler bug: without initialization, I get an uninit warning, yet it is correctly set)
if (E::tryGetShiftAttributes<ShiftNodeOp>(expr, shifts, padValue)) {
std::vector<int> pads;
for (auto shift : shifts)
pads.push_back(shift); // shift = #padValues to insert at front (or, for, shift < 0, to remove at front)
for (auto shift : shifts)
pads.push_back(-shift); // and #values to remove at end (or, for, shift < 0, to insert at end)
ABORT_IF(pads.size() != 2 * expr->shape().size(), "Unexpected number of shift dimensions");
addAttribute(node, "pads", pads);
addAttribute(node, "value", padValue);
addAttribute(node, "mode", std::string("constant"));
}
// matmul attributes
bool transA, transB;
float scalar;
// @BUGBUG: I cannot get Gemm to work, ONNX runtime always crashes. So we will NEVER get here.
if (node.op_type() == "Gemm") { // we get here for affine() or dot()
// Note: We only get here if Gemm can implement this configuration.
ABORT_IF(children[0]->shape().size() != 2 || children[1]->shape().size() != 2 ||
(children.size() > 2 && children[2]->shape().size() > 2),
"Gemm unexpectedly used for non-matrix inputs");
E::tryGetMatMulAttributes<AffineNodeOp>(expr, transA, transB, scalar) ||
E::tryGetMatMulAttributes<DotNodeOp> (expr, transA, transB, scalar) || E::fail();
/*if (transA) */ addAttribute(node, "transA", transA ? 1 : 0);
/*if (transB) */ addAttribute(node, "transB", transB ? 1 : 0);
/*if (scalar != 1.0f)*/ addAttribute(node, "alpha", scalar);
//addAttribute(node, "beta", 0.0f);
}
else if (E::tryGetMatMulAttributes<DotNodeOp> (expr, transA, transB, scalar) ||
E::tryGetMatMulAttributes<DotBatchedNodeOp>(expr, transA, transB, scalar)) {
// transpose/scalar not supported by ONNX MatMul, must have been expanded before we get here
ABORT_IF(transA || transB || scalar != 1.0f, "Unexpected transpose or scalar attributes for {}", expr->type());
}
// epsilon attribute
float epsilon;
if (E::tryGetEpsilonAttribute<LayerNormalizationOp>(expr, epsilon)) {
addAttribute(node, "epsilon", epsilon);
}
// dropout patches
if (node.op_type() == "Sub" && children[0]->type() == "const" && children[0]->name().find("opRandomUniform_") == 0) {
// @HACKHACK 1: For dropout, we route a "<" operation through a Marian "-" because it has no "<".
*node.mutable_op_type() = "Less";
// Note: Since this is a hack, we don't bother to fix up the node name, which is still opSub_ID.
}
else if (expr->type() == "const" && expr->name().find("opRandomUniform_") == 0) {
// @HACKHACK 2: The dropout weight, which is a 'const' in Marian, acts as a placeholder for
// a RandomUniform operation. In place of a 'const', we generate a uniform(0,1) node
// of the same shape.
*node.mutable_op_type() = "RandomUniform";
addAttribute(node, "shape", getExprShape(expr));
}
nodes.push_back(node);
}
// serialize the nodesForward_ of a graph right after build() into an ONNX-formatted file
// We declare this to be ONNX operator set 9. @TODO: Which ONNX version does this correspond to?
// The nodes must only contain operations supported by ONNX, so the caller must first call
// expandMacroOpsForONNX().
// One batch axis can be variable-length. It is recognized via a hack: by a special
// dimension value that otherwise never naturally occurs, e.g. a larger prime number.
// We will not recognize derivates of this value, such as value+1 or value x another dimension.
// @TODO: This presently does not support variable batch dimensions. How does ONNX handle them?
// @TODO: How to handle guided alignment? That's another input. Name? Shape?
// This is based on the simple example in
// https://github.com/onnx/onnx/blob/master/onnx/examples/make_model.ipynb
void ExpressionGraphONNXExporter::serializeToONNX(const std::string& fileRoot, FunctionDefs&& functionDefs, size_t sentinelDim) {
GOOGLE_PROTOBUF_VERIFY_VERSION;
// @TODO: expansion must deal with multiple sub-tapes (encoder, init)
// expand Marian macro operations such as "highway" or "scalar_add" that ONNX does not have
// After this, nodesForward_ is not topologically sorted.
expandMacroOpsForONNX(functionDefs);
for (const auto& functionDef : functionDefs) {
const auto& graphName = functionDef.first;
const auto& inputDefs = functionDef.second.first;
const auto& outputDefs = functionDef.second.second;
// some stats
LOG(info, "[onnx] Exporting graph {}", graphName);
std::map<Expr, std::string> nameOverrides; // we implant input and output names dynamically (instead of setting the name in Expr)
// clear memoization caches
tensors_->clearShorttermMemory();
tensors_->clearLongtermMemory();
// create new dummy const nodes for all function arguments
// These nodes will be replaced in rebuildNodesForward() and act as recursion stops.
// The actual child references are NOT replaced.
// Also, we collect the nameOverrides for all input and output nodes.
InputsMap inputsMap;
for (auto& inputDef : inputDefs) {
const auto& input = inputDef.second;
ABORT_IF(inputsMap.find(input) != inputsMap.end(), "Duplicate inputDef expr??");
auto arg = constant(input->shape(), inits::zeros(), input->value_type());
inputsMap[input] = arg;
nameOverrides[arg] = inputDef.first;
}
for (const auto& outputDef : outputDefs)
nameOverrides[inputsMap(outputDef.second)] = outputDef.first;
// regenerate nodesForward_ from the roots, only for the function under consideration
// This redirects all items in inputsMap in the graph and in outputDefs as well.
// I.e. actual inputs are already replaced by Constants on the tape, but other nodes'
// references are not!
// All references from this point on have to be run through inputsMap().
rebuildNodesForward(inputsMap, outputDefs);
LOG(info, "[graph] Topologically sorted, garbage-collected graph has size {}", nodesForward_.size());
// sanity check: is the tape consistent, assuming the inputsMap?
std::set<Expr> nodesOnTape;
for (const auto& e : nodesForward_)
nodesOnTape.insert(e);
for (const auto& e : nodesForward_) for (const auto& c : e->children()) {
if (nodesOnTape.find(c) == nodesOnTape.end())
LOG(info, "Redirected child: {}, {}", c->getId(), c->name());
ABORT_IF(nodesOnTape.find(inputsMap(c)) == nodesOnTape.end(),
"Node {} {} refers to child {} {} that is off tape??", e->getId(), e->name(), c->getId(), c->name());
}
// sanity check: did we consume all expected inputs?
std::set<Expr> mappedInputSet; // set of replacement Exprs (those constants) for inputs
for (auto ee : inputsMap)
mappedInputSet.insert(ee.second);
std::set<Expr> seenMappedInputs;
for (const auto& expr : nodesForward_) {
ABORT_IF(inputsMap.find(expr) != inputsMap.end(), "An input node (id={}) was not mapped??", expr->getId());
if (mappedInputSet.find(expr) != mappedInputSet.end())
seenMappedInputs.insert(expr);
}
for (auto e : mappedInputSet)
if (seenMappedInputs.find(e) == seenMappedInputs.end()) {
LOG(info, "WARNING: Input {} not consumed in input graph", nameOverrides[e]);
nodesForward_.push_back(e);
}
//ABORT_IF(seenMappedInputs.find(e) == seenMappedInputs.end(), "Input node {} not found in input graph??", nameOverrides[e]);
// output set -- these nodes are exported differently
std::set<Expr> outputsSet;
for (const auto& outputDef : outputDefs)
outputsSet.insert(inputsMap(outputDef.second));
std::vector<ValueInfoProto> inputsParamsAndConstants; // parameters and constants all are considered inputs, just with initializers
// Create a the nodes -> array of NodeProto
std::vector<NodeProto> nodes;
std::vector<TensorProto> initializers; // constants are inputs with initializers that hold their values. They go here.
std::vector<ValueInfoProto> shapeInfos; // expected shapes of operations (for diagnostics only)
std::vector<ValueInfoProto> outputs; // outputs' shapes
for(const auto& expr : nodesForward_) {
//LOG(info, "exporting node name {} op {} ({})", getExprName(expr), E::mapExprOp(expr), expr->children().size());
if (expr->type() == "param" ||
(expr->type() == "const" && expr->name().find("opRandomUniform_") != 0)) { // leaves are not nodes in ONNX (except for the uniform placeholder @HACKHACK 2)
//LOG(info, "exporting leaf name {} op {} ({})", getExprName(expr), E::mapExprOp(expr), expr->children().size());
auto shape = getExprShape(expr);
inputsParamsAndConstants.push_back(makeValueInfoProto(getExprName(expr, nameOverrides), getExprDataType(expr), shape, sentinelDim));
// don't create an initializers entry for inputs
if (std::any_of(inputsMap.begin(), inputsMap.end(), [&](const std::pair<Expr, Expr>& inputMap) {
return inputMap.second == expr;
})) { // skip designated inputs
ABORT_IF(expr->type() != "const", "Data inputs must be 'const' nodes");
//LOG(info, "No initializer for data-input node {}", getExprName(expr));
continue;
}
// run initializers, to realize value of consts (params already got theirs)
expr->allocate();
expr->init();
expr->forward();
ABORT_IF(!expr->val(), "Leaf '{}' of type {} unexpectedly lacks a value despite trying really hard", expr->name(), expr->type());
initializers.push_back(makeExprTensorProto(expr, nameOverrides));
continue; // parameters must become initializers, name=input name
}
addExprNode(expr, nodes, inputsParamsAndConstants, initializers, nameOverrides, inputsMap, sentinelDim);
logNode(nodes.back(), getExprShape(expr), sentinelDim);
auto valueInfo = makeValueInfoProto(nodes.back().name(), getExprDataType(expr), getExprShape(expr), sentinelDim);
if (outputsSet.find(expr) != outputsSet.end())
outputs.push_back(valueInfo);
//else // we add expected-shape information, to more easily be able to track down where it may fail
// shapeInfos.push_back(valueInfo);
}
//LOG(info, "total nodes: {}, incl. {} inputs, {} op shapes", nodesForward_.size(), inputs.size(), shapeInfos.size());
// @TODO: write a log message with the inputs and output names (the function signature)
// Create the graph -> GraphProto
auto graphDef = makeGraph(nodes, graphName, inputsParamsAndConstants, outputs, initializers, shapeInfos);
// Create the model -> ModelProto
auto modelDef = makeModel(graphDef, /*producer_name=*/"Marian " + buildVersion());
// save it
auto filename = fileRoot + "." + graphName + ".onnx";
auto s = modelDef.SerializeAsString();
ABORT_IF(s.empty(), "Failed to serialize ONNX graph to string buffer", filename);
std::ofstream o(filename, std::ios::binary);
ABORT_IF(o.fail(), "Failed to create ONNX model file {}", filename);
o.write(s.data(), s.size());
o.close();
ABORT_IF(o.fail(), "Failed to write ONNX model to {}", filename);
LOG(info, "[onnx] ONNX graph '{}' written to {}", graphName, filename);
}
// tape has been destroyed many times, so clear it for good
nodesForward_.clear();
}
Expr ExpressionGraphONNXExporter::tryFindForwardNodeByName(const std::string& nodeName) const {
auto iter = std::find_if(nodesForward_.begin(), nodesForward_.end(), [&](Expr node) {return node->name() == nodeName; });
if (iter == nodesForward_.end())
return nullptr;
else
return *iter;
}
} // namespace marian
#endif // USE_ONNX
|
"Medicine is a social science, and politics is nothing else but medicine on a large scale"—Rudolf Virchow
August 08, 2014
PAHO: Chikungunya update, August 8
PAHO has published its weekly Chikungunya update. Click the link for EW 32 to download the PDF. The outbreak continues to spread; last week the total of suspected cases in the Americas was 508,122; this week it's 570,972.
As usual, the island of Hispaniola is taking the brunt of the outbreak: the Dominican Republic reports 370,141 cases as of week 29, compared with 307,862 in week 29. Haiti hasn't reported since week 28, and its numbers remain stuck at an implausibly low 64,695.
Meanwhile, the US reports 480 confirmed imported cases; Canada has 8 and Mexico just one.
Comments
PAHO: Chikungunya update, August 8
PAHO has published its weekly Chikungunya update. Click the link for EW 32 to download the PDF. The outbreak continues to spread; last week the total of suspected cases in the Americas was 508,122; this week it's 570,972.
As usual, the island of Hispaniola is taking the brunt of the outbreak: the Dominican Republic reports 370,141 cases as of week 29, compared with 307,862 in week 29. Haiti hasn't reported since week 28, and its numbers remain stuck at an implausibly low 64,695.
Meanwhile, the US reports 480 confirmed imported cases; Canada has 8 and Mexico just one. |
//===- Hello.cpp - Example code from "Writing an LLVMC Plugin" ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Shows how to write llvmc-based drivers without using TableGen.
//
//===----------------------------------------------------------------------===//
#include "llvm/CompilerDriver/AutoGenerated.h"
#include "llvm/CompilerDriver/Main.inc"
#include "llvm/Support/raw_ostream.h"
namespace llvmc {
namespace autogenerated {
int PreprocessOptions () { return 0; }
int PopulateLanguageMap (LanguageMap&) { llvm::outs() << "Hello!\n"; return 0; }
int PopulateCompilationGraph (CompilationGraph&) { return 0; }
}
}
|
LaVon Mercer
LaVon Mercer (born January 13, 1959), is an American-Israeli retired basketball player. Born in Metter, Georgia, he played in the center position (height 2.08m or 6'10").
In college, Mercer played for the University of Georgia Bulldogs and was selected by the San Antonio Spurs in the 3rd round (60th overall) of the 1980 NBA Draft.
In the 1980s and 1990s, Mercer played professional basketball in Israel for Hapoel Tel Aviv (1981–1988) and Maccabi Tel Aviv (1988–1995). LaVon Mercer led his teams to 6 Israeli Champions (1989, 1990, 1991, 1992, 1994, 1995) and 5 Israeli State Cups (1984, 1989, 1990, 1991, 1994). While playing for Maccabi, the club reached the Euroleague finals in 1989 and the Euroleague semifinals in 1991.
Mercer also played for the Israeli national team in the 1986 FIBA World Championship and 1987 Eurobasket Championship.
He is currently the women's basketball coach at Spelman College (2009).
References
External links
Personal site
basketpedya.com
Category:1959 births
Category:Living people
Category:African-American basketball players
Category:American expatriate basketball people in Israel
Category:Basketball players from Georgia (U.S. state)
Category:Centers (basketball)
Category:Georgia Bulldogs basketball players
Category:Hapoel Tel Aviv B.C. players
Category:Israeli men's basketball players
Category:Maccabi Tel Aviv B.C. players
Category:Parade High School All-Americans (boys' basketball)
Category:San Antonio Spurs draft picks
Category:American women's basketball coaches
Category:Converts to Judaism
Category:American men's basketball players |
Natural killer cells: the secret weapon in dendritic cell vaccination strategies.
In cancer therapy, dendritic cell (DC) vaccination is still being explored. Clinical responses, however, are diverse and there is a lack of immunologic readout systems that correspond with clinical outcome. Only in the minority of patients, T-cell responses correlate with clinical outcome, indicating that other immune cells also gain anticancer activity. We still have limited knowledge of the effect of DC vaccination on different immune effector cells. However, it has been shown that bidirectional cross-talk between natural killer (NK) cells and DCs is responsible for enhanced activation of both cell types and increases their antitumor activity. In this review, we postulate the possibility that NK cells are the secret weapons in DC vaccination and studying their behavior together with T-cell activation in vaccinated individuals might predict clinical outcome. |
Sen. Rand Paul Randal (Rand) Howard PaulSecond GOP senator to quarantine after exposure to coronavirus GOP senator to quarantine after coronavirus exposure The Hill's Morning Report - Sponsored by National Industries for the Blind - Trump seeks to flip 'Rage' narrative; Dems block COVID-19 bill MORE (R-Ky.) is urging President Trump to reconsider his decision to lift Obama-era limits on the transfer of surplus military equipment to local police forces.
In an op-ed published Monday in The New York Post, Paul called the president's decision "a mistake," arguing that the line between local law enforcement officers and soldiers is "eroding."
"To support our local police, we must first realize they aren’t soldiers. But today the line between the two is being eroded," he wrote.
"Given these developments, it’s natural for many Americans — especially minorities, given the racial disparities in policing — to feel like their government is targeting them. Anyone who thinks that race does not still, even if inadvertently, skew the application of criminal justice isn’t paying close enough attention," Paul added.
ADVERTISEMENT
He also announced plans to introduce a measure when Congress returns from its recess that would bar the transfer of military equipment from the federal government to state and local law enforcement agencies.
That ban, he writes, would only apply to offensive equipment and would allow the federal government to give defensive equipment, like body armor, to local and state law enforcement agencies.
That the federal government is willing and able to give such surplus military equipment to local police departments signals a massive overreach of power and erodes trust between law enforcement officers and the communities they're charged with policing, Paul writes.
Trump signed an executive order Monday lifting limits imposed by former President Barack Obama Barack Hussein ObamaTwitter investigating automated image previews over apparent algorithmic bias Donald Trump delivers promise for less interventions in foreign policy Rush Limbaugh encourages Senate to skip hearings for Trump's SCOTUS nominee MORE after police in Ferguson, Mo., used military-style equipment to confront protesters in 2014. |
This invention generally relates to noise cancellation arrangements in vehicle air intake systems. More particularly, this invention relates to a heat dissipation arrangement for a noise cancellation system.
Internal combustion engines include air induction systems for conducting air to the engine. Engine noise typically is propagated through the air induction system, which is undesirable. Noise attenuation mechanisms have been installed within the air induction systems to reduce such noises. Typical noise attenuation mechanisms include a speaker, a sound detector such as a microphone and a signal generator. Various other components are often used to reduce noise generated at the air induction system.
The noise attenuation system signal generator is often part of a printed circuit board that is used to control operation of the noise attenuation system components. One problem associated with such arrangements is a tendency for heat build-up at the circuit components. There is a need for an effective way to dissipate heat in the noise attenuation system.
This invention addresses that need in an efficient manner, which takes advantage of the characteristics of the air induction system.
In general terms, this invention is a noise attenuation assembly for use in a vehicle air intake arrangement. An assembly designed according to this invention includes a housing that at least partially defines an air passageway. An electronics module is supported by the housing. A metal cooling member is supported by the housing at least partially in the air passageway and coupled with the electronics module such that heat in the electronics module is dissipated by the cooling member.
In one example, the cooling member is made of brass.
In one example, the cooling member includes a body portion having an opening through the body portion and a plurality of ribs that extend radially outwardly from the body portion.
A method of this invention for controlling the temperature of an electronics module in a noise attenuation device that is used in a vehicle air intake system includes several steps. A cooling member is supported on a portion of a housing that at least partially defines an air passageway such that the cooling member is at least partially within the air passageway. The cooling member is then coupled with the electronics module of the noise attenuation device to thereby allow heat in the electronics module to be dissipated by the cooling member.
In one example, the cooling member is supported on the housing by hot pressing at least a portion of the cooling member into a portion of the housing.
The various features and advantages of this invention will become apparent to those skilled in the art from the following detailed description of the currently preferred embodiment. The drawings that accompany the detailed description can be briefly described as follows. |
[Management of sickle cell disease by health professional in Bamako].
The sickle cell disease is a genotypic affection, suited to the black race, characterized by the presence of an abnormal haemoglobin S (HbS). The purpose of this survey was to assess the knowledge, the attitudes and the practices of the health professionals on management of children with sickle cells diseases. We carried out a cross-sectional survey in the health centres and involved 140 health professional of Community Health Centres (CSCOM) and 6 health districts in Bamako. The study found that 72% of health professionals had between 24 and 39 year old; 39% were physician; 77% didn't know the name of the drugs used in case of non complicate sickle cells diseas. Among the health professionals, 81% knew that the sickle cells disease was a blood illness. Our findings suggest that management of children with sickle cells diseases was not performed better due to the knowledge insufficiency of health professionals. We recommend training the health staff. |
Wednesday, December 10, 2008
SQL workload history with DBA_HIST_SQLSTAT
Using the DBA_HIST_XXX views from the AWR (automatic workload repository), it has become easier for a DBA to track changes in workload metrics over time. Through a SR I logged with Oracle Support they have supplied me with the following sql statement to track such changes for a single SQL statement.
The view DBA_HIST_SQLSTAT displays historical information about SQL statistics. Each statistic is stored in two separate columns:metric_TOTAL for the total value of the statistic since instance startup.metic_DELTA for the change in a statistic’s value between BEGIN_INTERVAL_TIME to the END_INTERVAL_TIME that is stored in the DBA_HIST_SNAPSHOT view.
You can also query DBA_HIST_SQL_PLAN to compare the execution plans, if PLAN_HASH_VALUE has changed . |
Purchase Report
$1200SINGLE USER LICENSE$1500TEAM LICENSE$2500CORPORATE LICENSE
DESCRIPTION
TABLE OF CONTENTS
Each country envisages and aspires a greater economic dynamism and prosperity. And wants to be a creditor nation than being a debtor nation. But that is not easy to achieve. It depends on respective government’s public policy, political and sovereign power and the overall laws of the country.
Lasting prosperity is a result of a persistent commitment to low tax rates, a stable currency, limited government, strong private property rights, openness to global trade and financial flows, and sensible regulation.
Mordor Intelligence has the world’s most inclusive research on the Deboned Meat market. We monitor and analyse industry trends around the world, including in-depth analysis on market entry, market share and market size – from qualitative analysis to qualitative with market data. Mordor Intelligence data and market analysis supports your organization’s awareness of the Deboned Meat market and the greater competitive atmosphere, ensuring accurate and focused strategies for your business.
A resource for your entire organization, Mordor Intelligence market research supports every level of business, assisting in strategic development, marketing, mergers and acquisitions, and brand management.
Deboned Meat industry in Morocco is a fast growing sector and an important source of earnings for the nation. Domestic Deboned Meat Market, focuses on the development and enhancement of plants, factories and market (storage and distribution) in the country. There have been a remarkable progress in the field of Deboned Meat in the past 5 years. Morocco’s focus on improving Deboned Meat facilities have resulted in growth of Deboned Meat in the country. Changing inhabitant’s perception, travelling and need of treated Deboned Meat in the country have impacted the Deboned Meat industry in positive ways.
With a population of 33 million, Morocco is one of the biggest economy in the world. Even though Morocco faced some economic problem in 2008 economic crisis; the country has per capita income of USD 3,093. The country also has a favorable demographic structure needed for its fast scaled growth. Deboned Meat Market is expected to grow at a CAGR of XX.XX% till 2022.
What the report offers
The study identifies the situation of Morocco and predicts the growth of its Deboned Meat Industry. Report talks about growth, market trends, progress, challenges, opportunities, government regulations, technologies in use, growth forecast, major companies, upcoming companies and projects etc. in the Deboned Meat sector of Morocco. In addition to it, the report also talks about economic conditions of and future forecast of its current economic scenario and effect of its current policy changes in to its economy, reasons and implications on the growth of this sector. Lastly, the report is segmented by various forms of Deboned Meat available in the country.
1. Introduction
1.1 Scope of the Report
1.2 Regional Analysis
1.2.1 PESTEL Analysis
1.2.2 Analysis of Ease of Doing Bussiness
2. Market Dynamics
2.1 Drivers
2.2 Restraints
2.3 Opportunities
3. Market Demand Analysis
3.1 Socio-Economic Segmentation
3.2 Demographic Strengths & Weaknesses
3.3 Spending Patterns
3.4 Target Market Identification
4. Market Size of Deboned meat Market (USD millions)
4.1 By Type
4.1.1 Poultry
4.1.2 Pork
4.1.3 Beef
4.1.4 Lamb
5. Market Entry
5.1 Market Entry: The Strategy
5.1.1 Types of Entry Modes, by Market Entry Objectives
5.1.2 Competition Analysis
5.1.2.1 Market Share
5.1.2.2 Strategies Adopted, Recent Events
5.1.3 Pricing Strategy
5.1.4 Supply Chain Analysis
5.1.4.1 Trade (Import-Export Analysis)
5.1.4.2 Distribution Network & Retail Analysis
5.2 Market Entry: The Administration
5.2.1 How to Register a Company (Flowchart)
5.2.2 Registration Processes
5.2.2.1 Ministries Involved
5.2.2.2 Criteria and Conditions
5.2.3 List of Forms & Documents
5.2.4 Product Control Guidelines specified by the Government
6. Sources
7. Disclaimer
Purchase Report
$1200SINGLE USER LICENSE
Only a single designated user can access the report.
Delivered in pdf format in 24 to 72 hours of purchase.
Comes with
3
months of post-purchase analyst support.
$1500TEAM LICENSE
Up to 7 users can access the report.
Delivered in pdf format in 24 to 72 hours of purchase.
Comes with
3
months of post-purchase analyst support.
$2500CORPORATE LICENSE
Any employee of your organization or its subsidiaries can access the report. |
CREATE TABLE part(
p_partkey INT,
p_name STRING,
p_mfgr STRING,
p_brand STRING,
p_type STRING,
p_size INT,
p_container STRING,
p_retailprice DOUBLE,
p_comment STRING
);
explain select p1.p_size, p2.p_size
from part p1 left outer join part p2 on p1.p_partkey = p2.p_partkey
right outer join part p3 on p2.p_partkey = p3.p_partkey and
p1.p_size > 10
;
explain select p1.p_size, p2.p_size
from part p1 left outer join part p2 on p1.p_partkey = p2.p_partkey
right outer join part p3 on p2.p_partkey = p3.p_partkey and
p1.p_size > 10 and p1.p_size > p2.p_size + 10
; |
NLS — Monday — 12/04/2017
Things get heated on the Neal Larson show when a raucous caller disagrees with Neal about the Russian Collusion Investigation. Neal and Julie discuss the success of tax reform and the upcoming obstacles that the Republican Party might face. |
Ristorante Massimo d’Azeglio in the Hotel Massimo D’azeglio has been inducted into the Association of Historical Places of Excellence in Rome.
In 1875, Maurizio Bettoja bought the building’s ground floor which housed various stores as well as a long-established restaurant and wine cellar. For over a century the Bettoja family has been overseeing the restaurant, now one of Rome’s leading dining places where traditional Italian cuisine reigns supreme. Splendid antique mahogany boiseries clad the walls, classic black-leather banquettes create intimate spaces around the tables, while a collection of Risorgimento paintings and prints – including Massimo d’Azeglio’s self-portrait and three of his drawings – underline the theme of the restaurant.
The Massimo D’Azeglio’s maitre’d takes diners on a gastronomic journey that changes daily according to the season. The menu contains a selection of specialties, traditional dishes, highly appreciated by lovers of the classic culinary art and require passion and skill to prepare.
Also famous throughout Rome and Italy is Massimo D’Azeglio’s historic cellar “Cantina”; a grotto under the restaurant housing a collection of thousands of fine Italian and French wines some which date back to the early 1900. The Cantina is the backdrop for unforgettable wine-tastings and candlelit suppers. |
Apart from Chinese actress Bingbing Fan, all of the represented actresses are American (Mila Kunis was born in Ukraine, but now has U.S. citizenship) and white (Cameron Diaz—though Latina—identifies as English, Scots-Irish, German, and Spanish-Cuban).
Thanks to her work on The Hunger Games series, very rich woman Jennifer Lawrence was previously ranked as the highest grossing action heroine ever. Despite her high earning potential, she still often makes less than her male colleagues.
Now, if one of these wealthy broads could lend me the two dollars I’m trying to scrape together for an iced coffee right now, I’d truly appreciate it. |
library ExampleLibrary {
event LibraryEvent();
function triggerLibraryEvent() {
LibraryEvent();
}
}
|
Background
==========
Advanced, high-throughput sequencing technologies allow for fast, single-base resolution scans of entire epigenome. Large-scale sequencing projects are producing these datasets for cancer research, and these epigenetic marks provide important information about cellular phenotypes in normal and diseased tissues \[[@B1],[@B2]\]. DNA methylation pattern changes are pivotal marks needed in cells\' differentiation during tissue and lineage specification, and, as such, contribute to the complexity of organisms\' cellular sub-types \[[@B3],[@B4]\]. Furthermore, aberrant DNA methylation not only defines malignant subtypes of disease \[[@B5],[@B6]\], but also contributes to malignant disease pathophysiology and can be used in clinical outcome predictions \[[@B7]\].
Bisulfite sequencing of genomic DNA is a widely applied method for methylation measurement. Whole-genome bisulfite sequencing is a genome-wide technique for the measurement of DNA methylation \[[@B8]\]. However, other enrichment DNA methylation sequencing methods have been developed to achieve cost-effective coverage of variable regions of DNA methylation. These methods often utilize reduced representation of bisulfite sequencing by focusing on restriction sites, including methods such as Reduced Representation Bisulfite sequencing (RRBS) \[[@B9]-[@B11]\], Enhanced RRBS (ERRBS) \[[@B12]\], multiplexed RRBS \[[@B13]\], methylation-sensitive restriction enzyme sequencing \[[@B14]\], as well as other enrichment approaches, including methylated DNA immunoprecipitation sequencing \[[@B15]\] and methylated DNA binding domain sequencing \[[@B16]\].
Previously, epigenome analysis tools such as methylKit \[[@B17]\] have focused on comprehensive DNA methylation analysis of single base sites, in order to find differentially methylated cytosines (DMCs). However, biological regulation by methylation can be mediated by a single CpG or by a group of CpGs in close proximity to each other. Therefore, a combination of baseresolution analysis and regional analysis of DNA methylation may offer a more comprehensive and systematic view of bisulfate sequencing data. This increasing demand for tools to find differentially methylated regions (DMRs) increases as more data emerge from both large-scale epigenomics consortiums and from individual labs. To address this need, we have created eDMR, which exists as stand-alone code for use with other tools and packages. It can also be used as an expansion of the methylKit R package for comprehensive DMR analysis. eDMR can directly take objects from methylKit or data frames with differential methylation information, or any DMC result in bed file format, and perform regional optimization calling and DMR statistical analysis and filtering. Furthermore, eDMR offers annotation functions that map DMRs to gene body features (coding sequences, introns, promoters, 5\' untranslated regions (UTR), and 3\'UTR), CpG island and shore locations, as well as the use of any other user-supplied coordinate files for annotation. Here, we describe an example of using eDMR with DNA methylation data from the ERRBS protocol.
Methods
=======
Data source
-----------
Ten acute myeloid leukemia (AML) de-identified patient samples enriched for myeloblast cells and five normal bone marrow (NBM) samples (purchased from AllCells) were used in the experiments. Institutional review board approval was obtained at Weill Cornell Medical Center and at the Royal Adelaide Hospital and this study was performed in accordance with the Helsinki protocols. DNA was extracted using standard techniques and ERRBS library preparations were performed as previously described \[[@B12]\]. Libraries were sequenced on a HiSeq2000 Illumina machine using 75 bp single-end reads to an average depth of 79X per covered CpG. A previously published dataset of two AML subtypes (IDH mutants and MLL rearranged) and two CD34+ normal bone marrow controls \[[@B12]\] (GEO accession number GSE37454) was also used in the analysis.
Computational tools
-------------------
R version 2.15.2 \[[@B18]\] and methylKit 0.5.6 \[[@B17]\] were used for the analysis. eDMR depends on Bioconductor packages \[[@B19]\], including methylKit 0.5.6 \[[@B17]\], GenomicRanges 1.8.13, data.table 1.8.6, mixtools \[[@B20]\], doMC 1.2.5, ggplot2 0.9.3 \[[@B21]\].
Data preprocessing
------------------
We performed bisulfite treated read alignment to hg19 genome and methylation calls as previously described \[[@B12]\]. Five NBM samples served as controls for the AML samples. The total coverage for each CpG in the controls is the sum coverage from 5 NBM samples. The methylation level for each CpG in the control is the mean of all NBM samples. We required the coverage of each CpG site be equal or greater than 10X in at least 3 NBM samples for control. For AML samples, the coverage for each CpG site for each sample is 10X. We used fisher exact test from methylKit \[[@B17]\] to compare AML samples with control.
eDMR algorithm
--------------
Our eDMR algorithm contains five distinct components, which are described below (Also see Figure [1](#F1){ref-type="fig"} for a workflow of the eDMR analysis). Our definition of a DNA methylated region is a cluster of CpGs in close spatial proximity. If two adjacent CpGs are separated by more than a certain (algorithm-specified) genomic distance, we define them as coming from different methylated regions. If two CpGs are within a specified genomic distance from each other, then we define them to be within the same region. The eDMR algorithm aims to optimize the threshold for determining DNA methylation regions and to perform statistical significance testing.
{#F1}
### 1. Empirical regions boundary determination
We used a bimodal normal distribution to identify the optimum cutoff for calling a gap between two DMRs. First, we examined the distribution of the distance between adjacent CpGs (with a coverage \>= 10X) across the genome from Sample 1 of our AML dataset. After a log2 transformation, we observed a bimodal distribution with a spike at log2 distance = 0 (Additional file [1](#S1){ref-type="supplementary-material"}: Figure S1). This spike represents the reverse complement of CpGs (GpCs) on the other strand, which has a distance of 1 bp (log2 (1) = 0). Disregarding the strand of CpGs, the base pair distance is counted as 1 bp (log2 (1) = 0). Because we expect the threshold of gap between adjacent methylated regions will be much greater than 1 bp, the frequency for this portion does not contribute to our decision process for DMR determination. After removing the first spike at 0 log2 distance, we then used this dataset with the application of the expectation maximization (EM) algorithm to fit to a bimodal normal distribution \[[@B20]\].
$$F\left( x \right) = \sum\limits_{i = 1}^{2}\lambda_{i}P_{i}\left( {X \leq x} \right)$$
Where x is the log2 distance of two nearest CpGs, F is the probability density function (P.D.F) for the mixed normal distribution to which we are trying to fit, and we have *i*= {1,2} as the first/second normal distribution from the bimodal distribution for regional/boundary CpGs. Here $\sum_{i = 1}^{2}\lambda_{i} = 1$, stands for the two mixing proportions of the two populations.
We then sought to determine the best separation point between the two normal distributions, which will help determine the cutoff of log2 distances between the nearest two CpGs at DMR boundaries. Since the distributions overlap in ERRBS data, we risked mislabeling components from one population to another. However, ERRBS is an enrichment assay, and, as such, the detected CpGs were not evenly distributed along the genome. Instead, the CpGs formed in clusters. This contributed to the imbalance of the two populations (regional CpGs\' distance distribution and boundary CpGs\' distance distribution). To account for this difference, we used a weighted, combined probability function $C\left( x \right)$ to evaluate and characterize the cumulative cost of any given separation point *x*.
$$C\left( x \right)\mspace{500mu} = \mspace{500mu}\lambda_{1}P_{1}\left( {X \geq x} \right)\mspace{500mu} + \mspace{500mu}\lambda_{2}P_{2}\left( {X \leq x} \right)$$
In order to minimize the error rate from both populations, we used this weighted combined probability function $C\left( x \right)$ to evaluate and optimize the separation of the two populations (Figure [2B](#F2){ref-type="fig"}). Because the majority of the distances fell into the first normal distribution for regional CpGs (Figure [2A](#F2){ref-type="fig"}), the weighted model imposed a greater penalty for the probability of mislabeling the CpGs from the first distribution, thus ensuring that we evenly penalized the number of mislabeled CpGs from both distributions, using:
$$\hat{x}\mspace{500mu} = \mspace{500mu} argmin_{x}\left\{ {\lambda_{1}P_{1}\left( {X \geq x} \right)\mspace{500mu} + \mspace{500mu}\lambda_{2}P_{2}\left( {X \leq x} \right)} \right\}$$
{#F2}
Where P~1~is the fitted P.D.F. of the first normal distribution for regional CpGs, and P^2^is the fitted P.D.F. of the second normal distribution for boundary CpGs, where $\sum_{i = 1}^{2}\lambda_{i} = 1$, stands for the mixing proportions for the two populations. We then used the successive parabolic interpolation from R stats package to search the interval from the lowest log2 distance to the maximum log2 distance to obtain the minimum of the weighted sum of the cost function C (red line in Figure [2B](#F2){ref-type="fig"}). The corresponding log2 distance was used for raw region determination.
### 2. Empirical regions filtering and characterization
Once the regional boundaries for CpG distances (*D)*were determined from the cost function, we examined all distances of the nearest CpGs along the same chromosome. If any distance was greater than *D*, then we called the two CpGs associated with this distance as the boundaries of two regions. We then further refined our distance based on the following independent (and adjustable) filters to increase the power of DMR detection:
1\) At least 1 DMC in the region, as determined using, for example, methylKit \[[@B17]\]
2\) At least 3 CpGs included in the region, and
3\) Absolute mean methylation difference greater than 20%.
### 3. Statistical significance calculation for DMRs
In order to perform a dependency adjusted significance test, we first examined the spatial auto correlation of methylation data. We created an adjustable spatial parameter (default = 100 base pairs) that binned the data into segments and then calculated the auto correlation based on both the methylation changes and the p-values for each bin \[[@B22]\]. Based on the refined regions, we calculated the significance of the regions by combining the p-values of DMCs within that region. We used the dependence adjustment of the Stouffer-Liptak test to combine p-values \[[@B22],[@B23]\]. Unlike the adjustment for the Fisher\'s combined probability test, the Stouffer-Liptak joint p-value does not depend on the assumption that the p-values are normally distributed, and thus can be applied for nonparametric data. A FDR (False Discovery Rate) correction was also applied to correct for multiple hypothesis testing for the combined p-values \[[@B24],[@B25]\].
### 4. Whole methylome DMR characterization: descriptive statistics and sample clustering
While raw output from filtered DMRs are useful, algorithms that contextualize and categorize changes from genomics assays help subsequent analysis. To aid in such global examinations, we also provide convenient functions to examine the DMRs for a given dataset, including data about the distribution of the length of DMRs, overall methylation difference distribution, and the number of DMCs in each DMR for all the samples. These tools give users an easy means to examine broad questions about genome biology and DMR localization for a given set of samples, or to find outlier samples from experimental datasets.
### 5. DMR annotation with gene models and CpG island
Lastly, we provide a comprehensive gene annotation set which can be used with the coordinates of the DMRs to provide information about gene models, but also characterize DMR changes for different parts of the gene body, separated into: coding sequence, introns, promoters, 5\' UTR and 3\' UTR. We also allow users to compare to CpG islands, shores, and other user supplied epigenetic loci, such as ENCODE enhancers.
Results and discussion
======================
eDMR definition
---------------
To determine DMRs, we sought to determine the optimal parameters for regional analysis. ERRBS and other enriched bisulfate conversion sequencing techniques are designed to cover cytosines in CpG-enriched regions, such as CpG islands and regions surrounding digestion sites from restriction enzymes. To accurately define the distinct genomic regions of DNA methylation, we first examined the distribution of the genomic distance between adjacent CpGs covered in the ERRBS data (Additional file [1](#S1){ref-type="supplementary-material"}: Figure S1). Since ERRBS uses the MspI restriction enzyme to fragment DNA, we detected CpGs clustered in CpG-rich regions, which were in close proximity to each other.
These CpG distances established a range of CpGs in close spatial proximity, and the distance cutoff was next determined by eDMR. If two CpGs were far away from each other, then we defined them as coming from different methylated regions (boundary CpGs); on the other hand, if two CpGs were close to each other, then we defined them as coming from the same region (regional CpGs). The eDMR algorithm optimized the threshold for calling methylated regions and performed statistical tests on the methylated regions. A nonparametric density plot of the distribution of the log2 distance of the nearest CpGs showed compelling evidence for a bimodal distribution (Figure [2A](#F2){ref-type="fig"} and Additional file [1](#S1){ref-type="supplementary-material"}: Figure S1, dashed line). We assumed that the first mode was composed of regional CpGs and that the second mode was composed of boundary CpGs, for the following reasons: (1) the mean of the first mode was less than the mean of the second mode, and (2) the first mode of the bimodal distribution had a larger mixing proportion than the second mode (Figure [2A](#F2){ref-type="fig"}).
To determine the optimum cutoff of two adjacent CpGs for calling a DMR boundary, we then sought to determine the best separation point between the two normal distributions. We used this weighted combined probability function $C\left( x \right)$ to evaluate and optimize the separation of the two populations (Figure [2B](#F2){ref-type="fig"}). We then determined the minimum of the weighted sum of the cost function at the red line in Figure [2B](#F2){ref-type="fig"}.
This information was used in our eDMR algorithm to identify the optimum cutoff for calling a gap between two DMRs. This approach was tested on an additional set of 14 ERRBS samples (9 acute myeloid leukemia (AML) and 5 normal bone marrow controls), which revealed similar bimodal distributions (Additional file [1](#S1){ref-type="supplementary-material"}: Figure S2). The mean optimum distance cutoff for all 10 comparisons is 183.50 with standard error of the mean 5.08 (183.50 ± 5.08). After determining the statistically significant DMRs between two samples or groups, the regions were filtered further based on the number of DMCs (minimum of one) and CpGs (minimum of three) within the area, as well as the mean methylation difference (greater than 20%). eDMR can utilize data from methylKit and other DNA methylation pipeline outputs for analysis as well as usersupplied coordinate files for annotation (See Figure [1](#F1){ref-type="fig"} for a workflow of the eDMR analysis).
eDMRs can accurately discern leukemia tumor sub-types
-----------------------------------------------------
We next used a set of previously published leukemia ERRBS data \[[@B12]\] that demonstrated distinct epigenetic tumor sub-types when examined at the level of DMCs. The CpG genomic distribution in these samples also had a bimodal distribution (Figure [3A](#F3){ref-type="fig"} and [3B](#F3){ref-type="fig"}). We used eDMR to calculate the number of DMRs between the two tumor sub-types (IDH and MLL) and the normal controls. Similar to previous findings using DMCs alone, unique patterns of DMRs were detected in the two leukemia sample subtypes (Figure [3C](#F3){ref-type="fig"}). Specifically, IDH AMLs had more hypermethylated DMRs while MLL AMLs had more hypomethylated DMRs. Notably, eDMR revealed that the two tumor sub-types also showed differing DMR lengths (Figure [3D](#F3){ref-type="fig"}; p = 2.2 × 10^-16^, Kolmogorov-Smirnov test), which showed that our method can replicate previous results and also provide further insight into the epigenomic landscape of these two AML subtypes.
{#F3}
We then examined the spatial changes of the DMRs relative to other genome features. It has been reported that DNA methylation of different parts of the gene body may exert alternate effects on gene expression. Indeed, methylation on promoter regions of the gene tends to have inverse association with gene expression, while genic methylation changes have a more positive correlation \[[@B26]\]. Thus, we sought to curate DMRs with a detailed annotation map, and eDMR functions were created to accomplish this task. We annotated the DMRs identified in the AML samples using Refseq gene models, separated into coding sequence, introns, promoters, 5\' UTR and 3\' UTR (Figure [3E](#F3){ref-type="fig"}). We also annotated DMRs with CpG islands and shores (Figure [3F](#F3){ref-type="fig"}). These separate gene and genomic geographies allow a more granular examination of the underlying methylation changes in a dataset that may have a regulatory impact on gene transcription.
Conclusion
==========
Profiling DNA methylation changes is a broadly studied topic for basic research across many laboratories. These data are being generated in several large-scale projects, including the Encyclopedia of DNA Elements (ENCODE) Consortium (<http://genome.ucsc.edu/ENCODE/>), Epigenomics RoadMap (<http://www.roadmapepigenomics.org/>), and the EU\'s Blueprint Project (<http://www.blueprint-epigenome.eu/>). All of these projects provide an abundance of DNA methylation and epigenetic data using DNA methylation sequencing methods like ERRBS, as well as other per-base epigenetic information. Having the ability to dissect the patterns of DNA methylation changes from a regional perspective, rather than at a per-base level, is important for researchers to more completely understand the effects DNA methylation changes have in normal and diseased samples.
Here, we described eDMR - a set of convenient tools for regional analysis of methylation with optimization algorithms. These independent tools can also be utilized in concert with an existing, open-source R-package that automates other aspects of ERRBS analysis (methylKit) such as data processing and DMC analysis. As such, these methods are suitable for any base-level dataset of reduced representation or other base-level DNA modification data sets. These methods are efficient with existing datasets, recapitulate the characterized tumor-subtypes from a positive control data set, and find new aspects of the tumor biology that can only be discovered using a regional analysis. Also, we note that we have used these tools on 15 samples and found the methods to be robust on ERRBS data from both different sample types and at a variety of sequencing depths. All together, these results support the utility of eDMR as a broadly relevant method for DMR characterization, which can be used to further discoveries of epigenetic and regulatory changes and help discern the relevance of DMRs to disease biology in conjunction with other molecular profiling data types.
List of abbreviations used
==========================
AML: Acute Myeloid Leukemia; DMC: differentially methylated cytosine; DMR: differentially methylated region; eDMR: empirically-based differentially methylated regions; ERRBS: Enhanced Reduced Representation Bisulfite sequencing; FDR: False Discovery Rate; RRBS: Reduced Representation Bisulfite sequencing; P.D.F: probability density function; UTR: Untranslated region.
Competing interests
===================
The authors declare that they have no competing interests.
Authors\' contributions
=======================
SL designed the software, processed the data, and performed the analysis. CEM and SL conceived of the algorithm and wrote the manuscript. AA, CEM, FEG-B, and PZ participated in the design of the software. FEG-B performed the RRBS experiments. AM, CEM, FEG-B, RL, and SL contributed to the patient data sets and analysis ideas. AB, BK, LL, and RD contributed materials. All authors critically reviewed and edited the manuscript prior to submission.
Supplementary Material
======================
###### Additional file 1
**Figure S1**. Histogram of the log2 distance of the nearest CpGs in Sample 1. A spike at zero log2 base pairs distance represents the reverse complement of CpGs (GpC) on the other strand.
**Figure S2**. Consistent distribution shapes across samples. Samples 2-10 are shown from different sequencing depths and samples. (A-I) Red line: First model for regional CpGs; green line: fitted second model for boundary CpGs; Dashed line: density plot of the log2 distances of the nearest CpGs.
######
Click here for file
Acknowledgements
================
We thank Caroline Sheridan and Jennifer Ishii for nucleic acid extractions, library preparations and sequencing of the AML samples. We thank the Weill Cornell Medical College Epigenomics Core and PBTECH for computational support and services.
Declarations
============
Publication of this article was supported by NIH grants R01HG006798, R01NS076465, and R44HG005297. FEG-B was supported by Sass Foundation Judah Folkman Fellowship and NIH grant K08CA169055.
This article has been published as part of *BMC Bioinformatics*Volume 14 Supplement 5, 2013: Proceedings of the Third Annual RECOMB Satellite Workshop on Massively Parallel Sequencing (RECOMB-seq 2013). The full contents of the supplement are available online at <http://www.biomedcentral.com/bmcbioinformatics/supplements/14/S5>.
|
Supported Geometry Oper/Functions
---------------------------------
#### Geometry Constructors
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| geomFromText | ST_GeomFromText | create a ST_Geometry from a Well-Known Text | ST_GeomFromText(wkt) |
| geomFromWKB | ST_GeomFromWKB | create a geometry from a Well-Known Binary | ST_GeomFromWKB(wkb) |
| geomFromEWKT | ST_GeomFromEWKT | create a ST_Geometry from a Extended Well-Known Text | ST_GeomFromEWKT(ewkt) |
| geomFromEWKB | ST_GeomFromWKB | create a geometry from a Well-Known Binary | ST_GeomFromWKB(ewkb) |
| geomFromGML | ST_GeomFromGML | create a geometry from input GML | ST_GeomFromGML(gml[, srid]) |
| geomFromKML | ST_GeomFromKML | create a geometry from input KML | ST_GeomFromKML(kml) |
| geomFromGeoJSON | ST_GeomFromGeoJSON | create a geometry from input geojson | ST_GeomFromGeoJSON( json) |
| lineFromEncodedPolyline | ST_LineFromEncodedPolyline | create a LineString from an encoded polyline | ST_LineFromEncodedPolyline(text polyline, integer precision=5) |
| makeBox | ST_MakeBox2D | Creates a BOX2D defined by the given point geometries | ST_MakeBox2D( pointLowLeft, pointUpRight) |
| makeBox3d | ST_3DMakeBox | Creates a BOX3D defined by the given 3d point geometries | ST_3DMakeBox( point3dLowLeft, point3dUpRight) |
| makeEnvelope | ST_MakeEnvelope | Creates a rectangular Polygon formed from the given minimums and maximums | ST_MakeEnvelope(xmin, ymin, xmax, ymax, srid=unknown) |
| makePoint | ST_MakePoint<br/>ST_MakePointM | Creates a 2D,3DZ or 4D point geometry | ST_MakePoint(x,y)<br/>ST_MakePointM(x,y,m) |
| makeLine | ST_MakeLine | Creates a Linestring from point or line geometries | ST_MakeLine(point1, point2) |
| makePolygon | ST_MakePolygon | Creates a Polygon formed by the given CLOSED linestring | ST_MakePolygon(linestring) |
#### Geometry Operators
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| @&& | && | if A's 2D bounding box intersects B's 2D bounding box | geomA && geomB |
| @&&& | &&& | if A's 3D bounding box intersects B's 3D bounding box | geomA &&& geomB |
| @> | ~ | A's bounding box contains B's | geomA ~ geomB |
| <@ | @ | if A's bounding box is contained by B's | geomA @ geomB |
| <-> | <-> | the distance between two points | geomA <-> geomB |
| <#> | <#> | the distance between bounding box of 2 geometries | geomA <#> geomB |
| &< | &< | if A's bounding box overlaps or is to the left of B's | geomA &< geomB |
| << | << | if A's bounding box is strictly to the left of B's | geomA << geomB |
| &<| | &<| | if A's bounding box overlaps or is below B's | geomA &<| geomB |
| <<| | <<| | if A's bounding box is strictly below B's | goemA <<| geomB |
| &> | &> | if A' bounding box overlaps or is to the right of B's | geomA &> geomB |
| >> | >> | if A's bounding box is strictly to the right of B's | geomA >> geomB |
| |&> | |&> | if A's bounding box overlaps or is above B's | geomA |&> geomB |
| |>> | |>> | if A's bounding box is strictly above B's | geomA |>> geomB |
#### Geometry Accessors
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| geomType | ST_GeometryType | the geometry type of the ST_Geometry value | ST_GeometryType(geom) |
| srid | ST_SRID | the spatial reference identifier for the ST_Geometry | ST_SRID(geom) |
| isValid | ST_IsValid | if the ST_Geometry is well formed | ST_IsValid(geom[, flags]) |
| isClosed | ST_IsClosed | if the LINESTRING's start and end points are coincident| ST_IsClosed(geom) |
| isCollection | ST_IsCollection | if the argument is a collection (MULTI*, GEOMETRYCOLLECTION, ...) | ST_IsCollection(geom) |
| isEmpty | ST_IsEmpty | if this Geometry is an empty geometrycollection, polygon, point etc | ST_IsEmpty(geom) |
| isRing | ST_IsRing | if this LINESTRING is both closed and simple | ST_IsRing(geom) |
| isSimple | ST_IsSimple | if this Geometry has no anomalous geometric points, such as self intersection or self tangency | ST_IsSimple(geom) |
| hasArc | ST_HasArc | if a geometry or geometry collection contains a circular string | ST_HasArc(geom) |
| area | ST_Area | area of the surface if it's a polygon or multi-polygon | ST_Area(geom) |
| boundary | ST_Boundary | closure of the combinatorial boundary of the Geometry | ST_Boundary(geom) |
| dimension | ST_Dimension | inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension | ST_Dimension(geom) |
| coordDim | ST_CoordDim | the coordinate dimension of the ST_Geometry value | ST_CoordDim(geom) |
| nDims | ST_NDims | coordinate dimension of the geometry | ST_NDims(geom) |
| nPoints | ST_NPoints | number of points (vertexes) in a geometry | ST_NPoints(geom) |
| nRings | ST_NRings | number of rings if the geometry is a polygon or multi-polygon | ST_NRings(geom) |
| x | ST_X | Return the X coordinate of the point | ST_X(point) |
| y | ST_Y | Return the Y coordinate of the point | ST_Y(point) |
| z | ST_Z | Return the Z coordinate of the point | ST_Z(point) |
| xmin | ST_XMin | Returns X minima of a bounding box 2d or 3d or a geometry | ST_XMin(Box3D(geom)) |
| xmax | ST_XMax | Returns X maxima of a bounding box 2d or 3d or a geometry | ST_XMax(Box3D(geom)) |
| ymin | ST_YMin | Returns Y minima of a bounding box 2d or 3d or a geometry | ST_YMin(Box3D(geom)) |
| ymax | ST_YMax | Returns Y maxima of a bounding box 2d or 3d or a geometry | ST_YMax(Box3D(geom)) |
| zmin | ST_ZMin | Returns Z minima of a bounding box 2d or 3d or a geometry | ST_ZMin(Box3D(geom)) |
| zmax | ST_ZMax | Returns Z maxima of a bounding box 2d or 3d or a geometry | ST_ZMax(Box3D(geom)) |
| zmflag | ST_Zmflag | Returns ZM (dimension semantic) flag of the geometries as a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d | ST_Zmflag(geom) |
#### Geometry Outputs
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| asBinary | ST_AsBinary | Well-Known Binary of the geometry without SRID | ST_AsBinary(geom[, NDRorXDR]) |
| asEncodedPolyline | ST_AsEncodedPolyline | Encoded Polyline from a LineString geometry | ST_AsEncodedPolyline(geom, integer precision=5) |
| asText | ST_AsText | Well-Known Text of the geometry without SRID | ST_AsText(geom) |
| asLatLonText | ST_AsLatLonText | Degrees, Minutes, Seconds representation of the point | ST_AsLatLonText(geom[, format]) |
| asEWKB | ST_AsEWKB | Well-Known Binary of the geometry with SRID | ST_AsEWKB(geom[, NDRorXDR]) |
| asEWKT | ST_AsEWKT | Well-Known Text of the geometry with SRID | ST_AsEWKT(geom) |
| asHEXEWKB | ST_AsHEXEWKB | HEXEWKB format text of the geometry with SRID | ST_AsHEXEWKB(geom[, NDRorXDR])|
| asGeoJSON | ST_AsGeoJSON | GeoJSON format text of the geometry | ST_AsGeoJSON( [ver, ]geom, maxdigits, options) |
| asGeoHash | ST_GeoHash | GeoHash representation (geohash.org) of the geometry | ST_GeoHash(geom, maxchars) |
| asGML | ST_AsGML | GML format text of the geometry | ST_AsGML([ver, ]geom, maxdigits, options) |
| asKML | ST_AsKML | KML format text of the geometry | ST_AsKML([ver, ]geom, maxdigits[, nprefix]) |
| asSVG | ST_AsSVG | SVG format text of the geometry | ST_AsSVG(geom, rel, maxdigits) |
| asX3D | ST_AsX3D | X3D format text of the geometry | ST_AsX3D(geom, maxdigits, options) |
#### Spatial Relationships
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| gEquals | ST_Equals | if the given geometries represent the same geometry | ST_Equals(geomA, geomB) |
| orderingEquals | ST_OrderingEquals | if the given geometries represent the same geometry and points are in the same directional order | ST_OrderingEquals( geomA, geomB) |
| overlaps | ST_Overlaps | if the Geometries share space, are of the same dimension, but are not completely contained by each other | ST_Overlaps(geomA, geomB) |
| intersects | ST_Intersects | if the geometries "spatially intersect in 2D" | ST_Intersects(geomA, geomB) |
| crosses | ST_Crosses | if the supplied geometries have some, but not all, interior points in common | ST_Crosses(geomA, geomB) |
| disjoint | ST_Disjoint | if the Geometries do not "spatially intersect" | ST_Disjoint(geomA, geomB) |
| contains | ST_Contains | if geometry A contains geometry B | ST_Contains(geomA, geomB) |
| containsProperly | ST_ContainsProperly | if geometry A contains geometry B and no boundary | ST_ContainsProperly(geomA, geomB) |
| within | ST_Within | if the geometry A is completely inside geometry B | ST_Within(geomA, geomB) |
| dWithin | ST_DWithin | if the geometry are within the specified distance of another | ST_DWithin(geomA, geomB, distance) |
| dFullyWithin | ST_DFullyWithin | if all of the geometries are within the specified distance of one another | ST_DFullyWithin( geomA, geomB, distance) |
| touches | ST_Touches | if the geometries have at least one point in common, but their interiors do not intersect | ST_Touches(geomA, geomB)|
| relate | ST_Relate | if this geometry is spatially related to another | ST_Relate(geomA, geomB, intersectionMatrixPattern) |
| relatePattern | ST_Relate | maximum intersectionMatrixPattern that relates the 2 geometries | ST_Relate(geomA, geomB[, boundaryNodeRule]) |
#### Spatial Measurements
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| azimuth | ST_Azimuth | angle in radians from the horizontal of the vector defined by pointA and pointB | ST_Azimuth(pointA, pointB) |
| centroid | ST_Centroid | geometric center of the geometry | ST_Centroid(geom) |
| closestPoint | ST_ClosestPoint | the first point of the shortest line from geomA to geomB | ST_ClosestPoint( geomA, geomB) |
| pointOnSurface | ST_PointOnSurface | a POINT guaranteed to lie on the surface | ST_PointOnSurface( geom) |
| project | ST_Project | a POINT projected from a start point using a distance in meters and bearing (azimuth) in radians | ST_Project(geog, distance, azimuth) |
| length | ST_Length | 2d length of the geometry if it is a linestring or multilinestring | ST_Length(geom) |
| length3d | ST_3DLength | 3d length of the geometry if it is a linestring or multi-linestring| ST_3DLength(geom) |
| perimeter | ST_Perimeter | length measurement of the boundary of an ST_Surface or ST_MultiSurface geometry | ST_Perimeter(geom) |
| distance | ST_Distance | minimum distance between the two geometries | ST_Distance(geomA, geomB |
| distanceSphere | ST_Distance_Sphere | minimum distance in meters between two lon/lat geometries | ST_Distance_Sphere( geomA, geomB) |
| maxDistance | ST_MaxDistance | largest distance between the two geometries | ST_MaxDistance(geomA, geomB) |
| hausdorffDistance | ST_HausdorffDistance | Hausdorff distance between two geometries, a measure of how similar or dissimilar they are. | ST_HausdorffDistance( geomA, geomB[, densifyFrac]) |
| longestLine | ST_LongestLine | longest line points of the two geometries | ST_LongestLine(geomA, geomB) |
| shortestLine | ST_ShortestLine | shortest line between the two geometries | ST_ShortestLine(geomA, geomB) |
#### Geometry Processing
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | ------------------------------------------------------ | ----------------------------- |
| setSRID | ST_SetSRID | set the SRID on a geometry | ST_SetSRID(geom, srid) |
| transform | ST_Transform | new geometry with its coordinates transformed to the SRID | ST_Transform(geom, srid) |
| simplify | ST_Simplify | "simplified" version of the given geometry using the Douglas-Peucker algorithm | ST_Simplify(geom, tolerance) |
| simplifyPreserveTopology| ST_SimplifyPreserveTopology | "simplified" version of the given geometry using the Douglas-Peucker algorithm | ST_SimplifyPreserveTopology( geom, tolerance) |
| removeRepeatedPoints| ST_RemoveRepeatedPoints | version of the given geometry with duplicated points removed | ST_RemoveRepeatedPoints( geom) |
| difference | ST_Difference | part of geometry A that does not intersect with geometry B | ST_Difference(geomA, geomB) |
| symDifference | ST_SymDifference | portions of A and B that do not intersect | ST_SymDifference(geomA, geomB)|
| intersection | ST_Intersection | the shared portion of geomA and geomB | ST_Intersection(geomA, geomB) |
| sharedPaths | ST_SharedPaths | collection of shared paths by the two input linestrings/multilinestrings | ST_SharedPaths(line1, line2) |
| split | ST_Split | collection of geometries resulting by splitting a geometry | ST_Split(geomA, bladeGeomB) |
| minBoundingCircle | ST_MinimumBoundingCircle| smallest circle polygon that can fully contain a geometry | ST_MinimumBoundingCircle( geom, num_segs_per_qt_circ)|
| buffer | ST_Buffer | a geometry that all its points is less than or equal to distance from the geometry | ST_Buffer(geom, radius[, bufferStyles]) |
| multi | ST_Multi | a geometry as a MULTI* geometry | ST_Multi(geom) |
| lineMerge | ST_LineMerge | lineString(s) formed by sewing together a MULTILINESTRING | ST_LineMerge(geom) |
| collectionExtract | ST_CollectionExtract | a (multi)geometry consisting only of elements of the specified type from the geometry | ST_CollectionExtract( geom, type) |
| collectionHomogenize| ST_CollectionHomogenize | "simplest" representation of the geometry collection | ST_CollectionHomogenize( geom)|
| addPoint | ST_AddPoint | Adds a point to a LineString before point [position] | ST_AddPoint(lineGeom, point, position) |
| setPoint | ST_SetPoint | Replace point N of linestring with given point | ST_SetPoint(lineGeom, position, point) |
| removePoint | ST_RemovePoint | Removes point from a linestring | ST_RemovePoint(lineGeom, offset) |
| reverse | ST_Reverse | the geometry with vertex order reversed | ST_Reverse(geom) |
| scale | ST_Scale | Scales the geometry to a new size by multiplying the ordinates with the parameters | ST_Scale(geom, xfactor, yfactor[, zfactor]) |
| segmentize | ST_Segmentize | geometry having no segment longer than the given distance from the geometry | ST_Segmentize( geom, maxLength) |
| snap | ST_Snap | Snap segments and vertices of input geometry to vertices of a reference geometry | ST_Snap(geom, refGeom, tolerance) |
| translate | ST_Translate | Translates the geometry to a new location using the numeric parameters as offsets | ST_Translate(geom, deltax, deltay[, deltaz]) |
#### Clustering
| Slick Oper/Function | PostGIS Oper/Function | Description | Example |
| ------------------- | --------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------- |
| clusterDBSCAN | ST_ClusterDBSCAN | Window function that returns a cluster id for each input geometry using the DBSCAN algorithm | ST_ClusterDBSCAN(geom, eps, minpoints) |
| clusterKMeans | ST_ClusterKMeans | Window function that returns a cluster id for each input geometry using the K-means algorithm | ST_ClusterKMeans(geom, number_of_clusters) |
|
Q:
Generating a random prime number in Java
I am trying to make a program that generates a pseudo random number and checks if it is prime.
Then the program will loop until the random number is a prime. However, it does not always print a prime number.
public class Prime_Number_Generator {
public static void main(String[] args) {
int[] primesList = {2, 3, 5, 7, 11, 13, 17, 19}; // list of known primes
int num = 0;
int i = 0;
int counter = 1;
Random rand = new Random(); // generate a random number
while (i != counter) {
num = rand.nextInt(1000) + 1;
if (num % primesList[i] == 0) // check if num is evenly divisible by a prime from the list
i++;
}
else { // if it is prime exit loop
i = 0;
counter = 0;
}
}
System.out.println(num); // print the number
}
}
A:
This is how I would do it, however be aware that if you input large numbers into this isPrime method it will start to lag. Whenever you have an error in your code try unit testing (testing small parts of code). That way you will be able to find and fix your code errors easily, this is why I would highly recommend using some type of isPrime method, rather than having all the code in the main method.
public class Prime_Number_Generator {
public static void main(String[] args) {
int num = 0;
Random rand = new Random(); // generate a random number
num = rand.nextInt(1000) + 1;
while (!isPrime(num)) {
num = rand.nextInt(1000) + 1;
}
System.out.println(num); // print the number
}
/**
* Checks to see if the requested value is prime.
*/
private static boolean isPrime(int inputNum){
if (inputNum <= 3 || inputNum % 2 == 0)
return inputNum == 2 || inputNum == 3; //this returns false if number is <=1 & true if number = 2 or 3
int divisor = 3;
while ((divisor <= Math.sqrt(inputNum)) && (inputNum % divisor != 0))
divisor += 2; //iterates through all possible divisors
return inputNum % divisor != 0; //returns true/false
}
}
|
extends Position2D
signal attacked(damage)
onready var animation_player: AnimationPlayer = $AnimationPlayer
const DAMAGE := 25
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("ui_accept") and not animation_player.is_playing():
animation_player.play("Attack")
func _attack(damage: int = DAMAGE) -> void:
emit_signal("attacked", damage)
|
Hello Neighbor is the Don’t Breathe of games
Hello Neighbor just released its announcement trailer, and even just the trailer is unnerving in a way few games achieve.
You take control of a concerned neighbor as you try to enter a creepy recluse AI’s house to try to discover his dark secret– whatever that may be. But the creepy recluse himself will not make it easy for you. He can be distracted, to be sure, but you have to stay one step ahead of him if you want to succeed: Once he’s on your trail, he won’t come off it until he’s got you. The trailer even implies that all the progress you make is part of a grander design to lure you into a false sense of security– watch (below) what the player does, then rewatch the beginning actions of the AI.
The stealth-horror game’s design is paramount to the unsettling feeling you get from the game: From the outside, you’re in the suburbs in twilight, but because you need to break into this man’s house, you’re doing so when the street is abandoned– it feels like it’s just you and him. The man himself is a sweater-vest wearing, large chinned stereotype, but there’s something wide-eyed and unsafe about his demeanor and constant anxiety. And the game has smart music queues: When he passes by your view or comes after you, it kicks in with a note or a queasy song.
Russia-based developer Dynamic Pixels is doing good work, despite falling just short of a successful Kickstarter previously (tinyBuild Games picked up the slack on that front, recently famous for publishing CLUSTERTRUCK). Hello Neighbor comes out Summer 2017, but you can sign up for its alpha here.
About The Author
Derek Dashiell is too proud of his Cleveland heritage and Kenyon College alma mater. He's affably pretentious, a combination which works better than you'd think but worse than you'd hope. He's been gaming since Pokemon Silver, he's analyzed Bloodborne from every angle, and Raz from Psychonauts is his favorite hero. |
Two-Dimensional Organic-Inorganic Hybrid Perovskites: A New Platform for Optoelectronic Applications.
2D perovskites are recently attracting a significant amount of attention, mainly due to their improved stability compared with their 3D counterpart, e.g., the archetypical MAPbI3 . Interestingly, the first studies on 2D perovskites can be dated back to the 1980s. The most popular 2D perovskites have a general formula of (RNH3 )2 MAn -1 Mn X3 n +1 , where n represents the number of metal halide octahedrons between the insulating organic cation layers. The optoelectronic properties of 2D perovskites, e.g., band gap, are highly dependent on the thickness of the inorganic layers (i.e., the value of n). Herein, 2D perovskites are arbitrarily divided into three classes, strict 2D (n = 1), quasi-2D (n = 2-5), and quasi-3D (n > 5), and research progress is summarized following this classification. The majority of existing 2D perovskites only employ very simple organic cations (e.g., butyl ammonium or phenylethyl ammonium), which merely function as the supporting layer/insulating barrier to achieve the 2D structure. Thus, a particularly important research question is: can functional organic cations be designed for these 2D perovskites, where these functional organic cations would play an important role in dictating the optoelectronic properties of these organic-inorganic hybrid materials, leading to unique device performance or applications? |
Rehabilitation of an extraoral and intraoral defect complicated with microstomia. A study case.
A 72-year-old man was referred from the surgery department for rehabilitation following surgical resection of Basaloid carcinoma. The first surgical intervention involved the anterior palatal region and was restored with a simple obturator. Two years later further surgery was undertaken to excise a recurrent tumor in the nose and part of the cheek. This resulted in an exposed nasal cavity and maxillary sinus. In addition, there was a small oral aperture composed of thin tissue that stretched to its maximum due to scar formation. The defect was restored with a full thickness skin flap but it subsequently broke down leaving the midface exposed with limited mouth opening due to tissue contraction and scar formation after the flap operation. The defect was rehabilitated with Co-Cr obturator intraorally and a silicone nose retained to the naso-palatal extension of the obturator by a magnet extraorally. This resulted in practically good retention, placement, and adaptation of the two parts of the prosthesis. |
Q:
change array to element in array
i have a arrayA and want to change to array B like example:
arrayA:
$arrayA =([0] => array( ‘iteem_name’ => ‘d’),[1] => array( ‘iteem_name’ => ‘h’),[2] => array( ‘iteem_name’ => ‘s’) );
change to arrayB:
$arrayB=( [0] => ‘d’ , [1] => ‘h’ , [2] => ‘s’ );
A:
$arrayB = array_column($arrayA, 'iteem_name');
|
In vitro susceptibility of Trichosporon beigelii to antifungal agents.
The minimum inhibitory concentrations (MICs) and minimum fungicidal concentrations (MFCs) of amphotericin B, flucytosine, miconazole, fluconazole and itraconazole against 21 isolates of Trichosporon beigelii in RPMI-1640 medium were determined using National Committee for Clinical Laboratory Standards (NCCLS) methodology in microdilution method. Most isolates were sensitive to miconazole (MIC90 0.78 microgram/ml), fluconazole (MIC90 6.25 micrograms/ml), and itraconazole (MIC90 0.19 microgram/ml), with the former being the most active agent tested (MFC90 3.12 mu/ml). Although amphotericin B inhibited most strains (MIC range, 0.78-3.12 micrograms/ml), poor fungicidal activity was observed (MFC range, 1.56-12.5 micrograms/ml) showing a pattern of relative resistance in vitro. Flucytosine showed generally poor activity against most isolates tested. These in vitro findings confirm the resistance of T.beigelii to amphotericin B and suggest that azoles may be an alternative to the former for the treatment of disseminated trichosporonosis. However, in vivo studies would better validate these in vitro findings. |
Q:
Timer in Netbeans Swing GUI?
I'm creating a connect-4 game and i want to time the time it takes to finish the game (from when the player clicks the button start game, to when the congrats message is displayed). If it helps or makes a difference, there are multiple panels on our program.
thanks
A:
There are many similar questions that will give you a great answer, have you tried searching stack overflow with slightly different phrasing of your question? For example you could look for "java time taken".
Here is one way to grab the total time taken:
//Grab the time when you start
long startTime = System.currentTimeMillis();
//Play game
//When you finish grab the current time and work out the time taken
long totalTime = System.currentTimeMillis() - startTime;
//Convert into minutes and seconds
int seconds = (int) ((totalTime / 1000) % 60);
int minutes = (int) ((totalTime / 1000) / 60);
//Show time
System.out.println("Time taken: "+minutes+"m, "+seconds+"s");
|
You are here
OKP Holdings' Q2 profit doubles on higher revenue
CONSTRUCTION firm OKP Holdings on Monday reported that its second quarter net profit doubled to S$4.95 million from a year ago, on the back of strong growth in revenue from its maintenance segment.
For the three months as at end June, revenue came in at S$34.4 million, up 43.2 per cent year on year. This was due mainly to growth in its core business segments - construction and maintenance.
"The increase in revenue from both segments was due mainly to some of the projects progressing to a more active phase during the second quarter ended June 30, 2017," the group said on Monday in filings to the Singapore Exchange.
Cost of works in Q2 went up 32.4 per cent to S$26.4 million, largely because of an increase in labour costs, a rise in cost of construction materials due to higher utilisation of materials and higher sub-contracting costs, among others.
Market voices on:
As at end June, net tangible asset per share came in at 38.29 Singapore cents, up 4.8 per cent from 36.54 cents as at end December 2016.
The group said its net profit margin went up from 10.4 per cent in Q2 2016 to 14.4 per cent in Q2 2017.
In its outlook, the group said the operating environment "remains challenging as the sector continues to face keen competition".
It said that as at end June, its net construction order book amounted to S$299 million, with projects extending till 2019.
The group also said "it is very saddened by the unfortunate and regrettable incident at the Pan-Island Expressway exit to Tampines Expressway on July 14, 2017". It added that it is working closely with the authorities on the on-going investigations into the incident and that it would continue to provide all necessary assistance and support to ensure that the needs of the deceased's family and the other affected workers were fully taken care of.
The company had called a trading halt on July 14 after a viaduct under construction at its subsidiary, Or Kim Peow Contractors' worksite collapsed, claiming the life of one worker and injuring 10 others. The accident took place early Friday morning at about 3.30am near the Pan Island Expressway exit to the Tampines Expressway. |
PCR-based isolation and identification of full-length low-molecular-weight glutenin subunit genes in bread wheat (Triticum aestivum L.).
Low-molecular-weight glutenin subunits (LMW-GSs) are encoded by a multi-gene family and are essential for determining the quality of wheat flour products, such as bread and noodles. However, the exact role or contribution of individual LMW-GS genes to wheat quality remains unclear. This is, at least in part, due to the difficulty in characterizing complete sequences of all LMW-GS gene family members in bread wheat. To identify full-length LMW-GS genes, a polymerase chain reaction (PCR)-based method was established, consisting of newly designed conserved primers and the previously developed LMW-GS gene molecular marker system. Using the PCR-based method, 17 LMW-GS genes were identified and characterized in Xiaoyan 54, of which 12 contained full-length sequences. Sequence alignments showed that 13 LMW-GS genes were identical to those found in Xiaoyan 54 using the genomic DNA library screening, and the other four full-length LMW-GS genes were first isolated from Xiaoyan 54. In Chinese Spring, 16 unique LMW-GS genes were isolated, and 13 of them contained full-length coding sequences. Additionally, 16 and 17 LMW-GS genes in Dongnong 101 and Lvhan 328 (chosen from the micro-core collections of Chinese germplasm), respectively, were also identified. Sequence alignments revealed that at least 15 LMW-GS genes were common in the four wheat varieties, and allelic variants of each gene shared high sequence identities (>95%) but exhibited length polymorphism in repetitive regions. This study provides a PCR-based method for efficiently identifying LMW-GS genes in bread wheat, which will improve the characterization of complex members of the LMW-GS gene family and facilitate the understanding of their contributions to wheat quality. |
Q:
Getting Bloodhound to work
I'm implementing a typing suggestion functionality on my website using Typeahead.js/Bloodhound but I can't get Bloodhound to work. Here is the code:
var indicator_commands = new Bloodhound({
datumTokenizer: function(d) {
return Bloodhound.tokenizers.whitespace(d.defaultInput);
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '/static/indicator.json',
});
console.log (indicator_commands.index.serialize());
indicator_commands.initialize();
console.log (indicator_commands.index.serialize());
Here is part of the indicator.json:
[
{ "name": "sma",
"fullname": "Smooth Moving Average",
"parameter": "sma,period,applied_to_optional,#color_optional;",
"defaultInput": "sma,14,close,#ababab;",
"tokens" : ["sma,14,close,#ababab;"],
"short_help": "",
"long_help": "",
},
{ "name": "ema",
"fullname": "Exponential Moving Average",
"parameter": "ema,period,applied_to_optional,#color_optional;",
"defaultInput": "ema,14,close,#ababab;",
"tokens" : ["ema,14,close,#ababab;"],
"short_help": "",
"long_help": "",
}
]
I was expecting some data in indicator_commands but it showed none. What do I need to change to get it working?
A:
Your JSON is invalid.
You have a comma after the lest member of the object, ie. "long_help" : "",
that is messing up bloodhoubd, you have to remove that.
You should also beware that indicator_commands.initialize(); will return
a Promise according to bloodhound docs, so you have no guarantee that it actually has been initialized on your second call to serialize(). Although the code as is with the JSON fixed worked for me, you should probably use the Promise:
indicator_commands.initialize().then(function(b) {
console.log('Success');
console.log(indicator_commands.index.serialize());
},
function(e) { console.log('Error'); } );
|
Bacterial production of latarcin 2a, a potent antimicrobial peptide from spider venom.
Natural venoms are promising sources of candidate therapeutics including antibiotics. A recently described potent antimicrobial peptide latarcin 2a (Ltc 2a) from Lachesana tarabaevi spider venom shows a broad-spectrum antibacterial activity. This peptide consists of 26 amino acid residues and therefore its production using chemical synthesis, although trivial, is costly. We describe an easy approach to Ltc 2a production in Escherichia coli using the conventional fusion partner thioredoxin. Latarcin 2a synthetic gene was cloned into the expression vector pET-32b, which was then used to transform E. coli BL21(DE3) strain. His-tagged fusion purification was achieved using metal-chelate affinity chromatography. Since no methionine residues are present in the latarcin 2a sequence, cyanogen bromide could be effectively utilized to separate the target product from the carrier protein. Reverse-phase HPLC was used as the final step of purification; the final yield was approximately 3 mg/L of bacterial culture. To increase the yields, we attempted incorporation of Ltc 2a tandem repeats into the fusion protein; however, production rates greatly decreased due to enhanced fusion toxicity. Moreover, we probed constructs to produce an Ltc 2a dimer and the Ltc 2a propeptide to study their functional properties. Recombinant peptides were produced at appreciable yields and biological tests to determine their activities were performed. Latarcin 2a is the first linear peptide from spider venom and one of the first membrane-active peptides from venomous animals to be biosynthetically produced. |
Aeromonas-associated gastroenteritis in Egypt.
Aeromonas spp. including A. hydrophila, A. sobria, and A. caviae, were recovered from the feces of 88% of diarrheic Egyptian children. In contrast, only 45% of nondiarrheic children contained Aeromonas spp. A probable source of Aeromonas spp. is from drinking water inasmuch as nine out of ten samples analysed from the district of Cairo in which the children resided tested positive for Aeromonas spp. Enterotoxigenicity of the isolates from various sources was tested. 33% of the diarrheic samples produced enterotoxin whereas 47% of the nondiarrheic and 56% of the tap water strains produced enterotoxin. |
Q:
My PHP condition statement display two results for if and else, what's wrong my my code?
I created a conditional statement for my custom theme in Concrete5. My codes goal is to toggle layout. If the current page has a child pages under it, it will display an additional sidebar (<div class="grid_3">) to list the subpages items. If there's no child page it would display a full layout (<div class="grid_13">).
Unfortunately I get a different result. there's something I probably had missed on my condition statement. Instead of just display one layout, It is rendering the two layout.
Below is what my code look like:
<? if($c->getNumChildren()) { ?>
<div class="grid_3">
<?php
$bt_sidenav = BlockType::getByHandle('autonav');
$bt_sidenav->controller->orderBy = 'display_asc';
$bt_sidenav->controller->displayPages = 'below';
$bt_sidenav->controller->displaySubPages = 'all';
$bt_sidenav->render('view');
?>
</div>
<div id="main-content-container" class="grid_10">
<div id="main-content-inner">
<?php
$a = new Area('Main');
$a->display($c);
?>
</div>
</div>
<? } else { ?>
<div id="main-content-container" class="grid_13">
<div id="main-content-inner">
<?php
$a = new Area('Main');
$a->display($c);
?>
</div>
</div>
<? } ?>
A:
While your content generation portions of PHP use proper PHP tags (<?php … ?>), your if/else statements use short tags (<? … ?>) which are often disabled.
Use <?php instead.
|
Distribution and developmental regulation of AMPA receptor subunit proteins in rat retina.
To learn more about a possible functional role of alpha-amino-3-hydroxy-5-methyl-4-isoxasole-propionate (AMPA) receptors in retinal development, the spatial distribution and temporal regulation of all AMPA receptor subunit proteins was studied in rats. Immunohistochemistry was performed on retinal sections between embryonic days (E)20 and E21 and the adult stage by using specific antibodies against AMPA subunits GluR1 to 4. All AMPA subunits were expressed in the ganglion cell layer from E21 on. In the inner plexiform layer (IPL), discernible bands of labeling appeared at distinct retinal ages for the different subunits. GluR1 immunoreactivity (IR) was concentrated in two broad bands by postnatal day (P)3, whereas three bands were visible beginning on P9. Two bands were located in a region of the IPL where off-cells terminate, and one band was found in the innermost part of the IPL where on-cells terminate. In contrast, two bands of GluR2/3- and GluR4-IR in the IPL were only discernible beginning on P14 and seemed to be located between the bands of GluR1-IR. GluR2/3 and GluR4 were observed both in horizontal cells and in the outer plexiform layer from early developmental stages on. GluR1 was not found in the outer retina, indicating that horizontal and bipolar cell processes in the rat express AMPA receptors composed of subunits GluR2 to 4. Double-labeling experiments with cell-specific markers revealed the expression of subunits GluR1 to 4 in cholinergic and AII amacrine cells. AMPA receptors are expressed before synapse formation, indicating a role not only in fast signal transmission but also in the establishment of inner retinal circuits. The differences in spatial and temporal subunit expression suggest that different retinal cell types selectively express distinct types of AMPA receptors during development of the rat retina. |
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Asset")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Core")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Graphics")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Physics")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Text")
set(MiniCoreSRC
Asset/mcassetmanager.cc
Asset/mcmeshconfigloader.cc
Asset/mcmeshloader.cc
Asset/mcmeshmanager.cc
Asset/mcmeshobjectdata.cc
Asset/mcsurfaceobjectdata.cc
Asset/mcsurfaceconfigloader.cc
Asset/mcsurfacemanager.cc
Core/mcbbox.hh
Core/mcbbox3d.hh
Core/mcevent.cc
Core/mclogger.cc
Core/mcmathutil.cc
Core/mcmacros.hh
Core/mcobbox.hh
Core/mcobject.cc
Core/mcobjectcomponent.cc
Core/mcobjectdata.cc
Core/mcobjectfactory.cc
Core/mcrandom.cc
Core/mctimerevent.cc
Core/mctrigonom.cc
Core/mctyperegistry.cc
Core/mcvectoranimation.cc
Core/mcvector2d.hh
Core/mcvector3d.hh
Core/mcworld.cc
Graphics/mccamera.cc
Graphics/mcglambientlight.cc
Graphics/mcgldiffuselight.cc
Graphics/mcglmaterial.cc
Graphics/mcglobjectbase.cc
Graphics/mcglscene.cc
Graphics/mcglshaderprogram.cc
Graphics/mcmesh.cc
Graphics/mcmeshview.cc
Graphics/mcobjectrendererbase.cc
Graphics/mcparticle.cc
Graphics/mcparticlerendererbase.cc
Graphics/mcrenderlayer.cc
Graphics/mcshaders.hh
Graphics/mcshaders30.hh
Graphics/mcshadersGLES.hh
Graphics/mcshapeview.cc
Graphics/mcsurfaceparticle.cc
Graphics/mcsurfaceobjectrenderer.cc
Graphics/mcsurfaceobjectrendererlegacy.cc
Graphics/mcsurfaceparticlerenderer.cc
Graphics/mcsurfaceparticlerendererlegacy.cc
Graphics/mcsurface.cc
Graphics/mcsurfaceview.cc
Graphics/mcworldrenderer.cc
Physics/mccircleshape.cc
Physics/mccollisiondetector.cc
Physics/mccollisionevent.cc
Physics/mccontact.cc
Physics/mcdragforcegenerator.cc
Physics/mcforcegenerator.cc
Physics/mcforceregistry.cc
Physics/mcfrictiongenerator.cc
Physics/mcgravitygenerator.cc
Physics/mcimpulsegenerator.cc
Physics/mcobjectgrid.cc
Physics/mcoutofboundariesevent.cc
Physics/mcphysicscomponent.cc
Physics/mcrectshape.cc
Physics/mcseparationevent.cc
Physics/mcshape.cc
Physics/mcspringforcegenerator.cc
Physics/mcspringforcegenerator2dfast.cc
Text/mctexturefont.cc
Text/mctexturefontconfigloader.cc
Text/mctexturefontdata.cc
Text/mctexturefontmanager.cc
Text/mctextureglyph.cc
Text/mctexturetext.cc
)
if(NOT QOpenGLFunctions)
set(MiniCoreSRC ${MiniCoreSRC} Graphics/contrib/glew/glew.c)
endif()
set(MiniCoreTargetName MiniCore)
add_library(${MiniCoreTargetName} ${MiniCoreSRC})
target_link_libraries(${MiniCoreTargetName} Qt5::Core Qt5::OpenGL Qt5::Xml ${MINICORE_OPENGL_LIBS})
set_property(TARGET ${MiniCoreTargetName} PROPERTY CXX_STANDARD 14)
add_subdirectory(UnitTests)
|
Outdoors briefs: Texas parks deemed perfect for stargazers
Enchanted Rock, along with Copper Breaks State Park, has just been given top night sky status for its nighttime views by the International Dark Sky Association. It joins Big Bend National Park and the city of Dripping Springs as Texas' only locations to achieve the status. For regional notes in Travel.
Last week’s peak of the annual Perseid meteor shower was somewhat dimmed by the waning super moon. The best place to see any celestial show is a place far from artificial light pollution. Two state parks have recently achieved international dark sky status from the International Dark Sky Association.
Copper Breaks State Park is 13 miles south of Quanah in the Panhandle Plains Region, and Enchanted Rock State Natural Area is 15 miles north of Fredericksburg in the Hill Country Region.
They join Big Bend National Park and the city of Dripping Springs as the only Texas sites to earn Dark Sky Recognition. Many Texas parks in rural areas conduct stargazing programs.
“One of our most valued attributes in Texas is its natural beauty,” said TP&W State Parks Division Director Brent Leisure. “This beauty is not limited to the light of day, but extends into the night sky, where Texans can enjoy a front-row seat to the splendor of the universe.”
Oklahoma fishery gets help circulating water
City, state and federal officials have joined to support the Canton Lake, Okla., fishery with the installation of two reservoir water circulators. Canton Lake is a water supply lake for Oklahoma City.
A receding lake level combines with hot, still summer weather to lower oxygen levels in the water.
Oklahoma City paid most of the bill for leasing two reservoir water circulators that move about 10,000 gallons of water per minute.
Moving the water helps to oxygenate it. Barry Bolton, Oklahoma’s fisheries division chief, said northwest Oklahoma lakes have some of the state’s best overall fishing.
Private property most popular for hunting
Texas is not the only state where most hunting occurs on private property.
In a HunterSurvey.com survey, 39 percent of respondents nationwide said they hunted most often on a friend’s or family member’s property. Sixteen percent said they hunted most often on property they own, and 11 percent hunt most often on a leased property.
The lease number would be much higher in Texas, where 98 percent of the land is privately owned. In spite of high lease prices, Texas hunting is good enough that 72,755 nonresidents paid a significant premium for this state’s hunting licenses last year. A nonresident general hunting license costs $315, compared with $25 for a resident, who may then pony up as much as $21 for “stamp endorsements” if he hunts upland and migratory game birds and hunts with a bow in archery season.
Fishing pro Marshall to sell own knife brand
It sounds like a partnership made in heaven, unless you’re a crappie.
Texas fishing pro Wally Marshall, aka Mr. Crappie, catches and fillets thousands of crappie each year. Now Marshall is designing a signature series of knives for Buck Knives, one of the nation’s most respected brands for hunting and fishing knives.
The Mr. Crappie brand of products is expected to be introduced in early 2015.
Sharks should be far from biggest concern
Despite the thrills and chills associated with Shark Week on the Discovery Channel, worldwide, a human’s odds of being killed by a shark are one in 3.7 million. That’s according to the International Shark Attack File kept by George Burgess at the University of Florida.
To post a comment, log into your chosen social network and then add your comment below. Your comments are subject to our Terms of Service and the privacy policy and terms of service of your social network. If you do not want to comment with a social network, please consider writing a letter to the editor. |
Summaries of health policy coverage from major news organizations
Western States Have Disproportionately High Suicide Rates For Veterans
Epidemiologist Rajeev Ramchand, who has a background in studying suicide, said there could be several factors that led to the results, including gun ownership, difficulty accessing proper health care and isolation from communities. Meanwhile, after a series of disappointments from its supercomputer Watson, IBM is counting on Watson's efforts with the VA health system.
The Hill:
High Suicide Rate Among Military Vets In Western US, Rural Areas
The western U.S. and rural areas of the country have seen the highest rates of suicide among veterans, according to a new study. Veterans in the western states of Montana, Utah, Nevada and New Mexico have the highest suicide rates in the country at 60 per 100,000 individuals, according to new data from a study by the Department of Veterans Affairs (VA), ABC News reported. This is compared to the national average of 38.4 per 100,000 individuals. (Delk, 9/16)
Politico Pro:
IBM Pins Its Hopes For Watson On VA Health System
IBM unveiled its Watson Health system in a blitz of hype in 2013, promoting it with an army of sales reps and even Super Bowl ads. But Watson’s artificial intelligence has failed to blow away doctors, a humbling experience for the company that hoped to “disrupt” health care the way competitors transformed other industries. (Pittman, 9/19)
This is part of the KHN Morning Briefing, a summary of health policy coverage from major news organizations. Sign up for an email subscription. |
[Qualification of patients for procedures to resect lung parenchyma during general anesthesia].
Authors described the methods and techniques of pulmonary and circulatory assessment of patients undergoing pulmonary resection. The most emphasis has been put on the perioperative management specially in patients with compromised pulmonary and circulatory system. |
Bus
Nashville MTA, RTA hit big ridership numbers
For the second straight year, the Nashville Metropolitan Transit Authority(MTA) and Regional Transportation Authority of Middle Tennessee (RTA) jointly recorded more than 10 million passenger trips in a fiscal year.
In fiscal year 2013, the Nashville MTA provided 9.7 million passenger trips to residents, visitors, students and tourists within Metro Nashville on its buses and vans. RTA recorded approximately 800,000 passenger trips on its train, buses and vans. Together, they provided 10.5 million passenger trips in the Middle Tennessee region.
“This is a great accomplishment for Nashville and Middle Tennessee,” RTA board Chair and Metro Nashville Mayor Karl Dean said. “As a result of our transit services, fewer cars are traveling on our roads and interstates. Transit customers are helping to improve the region’s air quality and reduce traffic congestion in the area. This is good news for the future of our city.”
Ridership has increased steadily over the past year and continues to grow. Average Nashville MTA ridership is more than 33,000 passenger trips per weekday. Average regional bus ridership is 1,500 passenger trips per weekday. Ridership on regional buses has grown rapidly as well, up 23%. |
1. Introduction {#sec1}
===============
Influenza pandemics have occurred at irregular intervals in the past, and supposing that another "new" influenza pandemic would occur in the future is justified. Influenza viruses cause seasonal epidemics because of the acquisition of mutations in the viral surface glycoproteins. Children have been disproportionately affected by pandemic influenza A H1N1, compared with older age groups. This infection has caused severe disease and death in few children \[[@B1]\].
H1N1 swine-origin influenza A virus (S-OIV) is a pandemic acute respiratory illness caused by a novel influenza H1N1 strain that first emerged in humans in Mexico and the United States in March 2009 and early April 2009. The cumulative total of cases reported from various regional offices of the World Health Organization (WHO) as of September 13, 2009, was more than 296 471, including at least 3486 deaths; the number that the WHO acknowledges understates the actual numbers \[[@B2]\]. A preliminary analysis of S-OIV proteins involved in viral virulence and pathogenicity revealed that they are highly similar to strains that cause mild symptoms in humans. In concordance, low mortality is observed outside Mexico, and the virus is unlikely to cause severe infections similar to those caused by the 1918 pandemic influenza or the H5N1 influenza \[[@B3]\]. However, the 2009 H1N1 influenza pandemic was associated with pediatric death rates that were 10 times the rates and double the hospitalization rates for seasonal influenza in previous years in Argentina \[[@B4]\].
Influenza A virus-infected epithelial cells and leukocytes respond to the infection by producing chemokines, proinflammatory, and regulatory cytokines. Cytokine responses to influenza viral infection contribute to the pathogenesis and severity of influenza viral infection. A *cytokine storm* contributes to the bronchiolitis and alveolar edema characteristics of severe influenza pneumonia, and at least some of these inflammatory mediators are produced by virus-infected lung epithelium \[[@B5]\]. Several independent studies have documented an early rise in TNF-*α*, IL-1 *α* and *β*, and IL-6 in bronchoalveolar lavage (BAL) fluids in temporal association with clinical symptom and lung pathology \[[@B6]\].
Immune responses to viral infections involve a complex orchestration between innate signals and adaptive responses of specific T and B cells. Viral infections are known to predominantly induce Th1 immunity that promotes the activation of CD8 T cells and macrophage functions and causes B cell differentiation. Identification of early immunological parameters is critical for the study of the pathogenesis of this disease \[[@B7]\]. Substantially limited evidence has been reported on host T cell responses to the pandemic H1N1 S-OIV infection in humans. This study characterized cytokine response and immunophenotype expressions during the 2009 H1N1 viral infection in pediatric patients with lower respiratory tract infection and included patients with upper respiratory tract infection as a comparative group.
2. Materials and Methods {#sec2}
========================
2.1. Patient Enrollment {#sec2.1}
-----------------------
All 24 patients with S-OIV infection pulmonary complication and 61 patients with S-OIV upper respiratory tract infection were studied. All of the patients presented at the Departments of Emergency Medicine and Pediatrics of National Cheng Kung University Hospital (NCKUH) between August 2009 and January 2010. Inclusion criteria were age below 18 years, presenting with acute febrile respiratory illness, and confirmed virologically for S-OIV infection. Informed consent was obtained from each participating patient or the patient\'s parents or guardian. This study was approved by the Institutional Review Board of NCKUH.
2.2. Case Definition {#sec2.2}
--------------------
A confirmed case of pandemic influenza A (H1N1) viral infection was defined by a nasopharyngeal swab positive for S-OIV by viral culture or RT-PCR. Patients were stratified into 2 categories based on clinical features and radiological findings: (1) upper respiratory tract infections, diagnosed with rhinitis, pharyngitis, or otitis media which were present without signs of lower respiratory tract infection and (2) lower respiratory tract infections, including bronchitis, bronchiolitis, bronchopneumonia, and pneumonia, diagnosed with signs of lower airway involvement (tachypnea, dyspnea, retraction, wheezing, or rales) or infiltrates revealed by a chest X-ray.
2.3. Virological Studies {#sec2.3}
------------------------
Pharyngeal swabs were collected from all recruited patients and were submitted to the Virology Laboratory in NCKUH for investigation. The protocol of the US Centers for Disease Control and Prevention of real-time RT-PCR for S-OIV 2009, as recommended by the WHO, was used. The PCR products were sequenced for further confirmation by using a standard high-throughput sequencing system of the BigDye Terminator, version 3.1 (Applied Biosystems, Foster City, CA, USA) featuring a 1-mm^3^ double-stranded template.
2.4. Flow Cytometric Analysis {#sec2.4}
-----------------------------
Peripheral blood mononuclear cells (PBMCs) were isolated from ethylenediamine tetraacetic acid (EDTA) whole blood by Ficoll separation (Ficoll-Paque plus; Amersham Biosciences). Whole blood (150 *μ*L) was incubated on ice by using 10 *μ*L of each antibody for 15 minutes in the dark. Two milliliters of FACS lysing solution (Becton Dickinson) was added and incubated at room temperature for 10 minutes. The cells were then washed using PBS and fixed using 0.5 mL of 0.1% glutaraldehyde solution in PBS. Stained lymphocytes were analyzed using flow cytometry (Becton Dickinson Immunocytometry Systems). Data were acquired and analyzed using Cell Quest software (Becton Dickinson). The following fluorescent MAbs were used: peridinin chlorophyll protein-conjugated Leu 4 (CD3; pan T), phycoerythrin-conjugated Leu-3a (CD4 T cells), Leu-2a (CD8 T cells and NK cells), Leu-11c (CD16; NK lymphocytes), and Leu-19 (CD56; natural killer (NK) lymphocytes and T lymphocyte subset). IgG1 isotype control antibody conjugates were included in all assays to determine background fluorescence.
2.5. Measurement of Cytokines {#sec2.5}
-----------------------------
EDTA blood samples were immersed in ice and immediately transported to the laboratory for processing. Plasma was separated by centrifugation (2000 g for 10 min) at 4°C and stored in 300 *μ*L aliquots at −70°C until analysis. The cytometric bead array assay (CBA) (BD Pharmingen, CA, USA) consisted of six bead populations exhibiting distinct fluorescence intensities. The concentrations of IL-1*β*, IL-6, IL-8, IL-10, IL-12, and IFN-*γ* were measured using the human Th1/Th2 cytokine CBA kits.
2.6. Statistical Analysis {#sec2.6}
-------------------------
Data were expressed as mean ± SD. Statistical significance was determined by conducting paired or nonpaired nonparametric tests and using SPSS (version 18.0; Chicago, IL, USA). The nonparametric Mann-Whitney test was used to compare cytokine concentrations between influenza-infected patients. *P* \< 0.05 was considered significant.
3. Results {#sec3}
==========
3.1. Participant Characteristics {#sec3.1}
--------------------------------
A total of 85 cases of children and adolescents infected with influenza visited our hospital during the 2009 and 2010 influenza seasons. Virologically confirmed case-patients exhibited a median age of 10.3 years (range, 2 months--17.7 years) and 47% were males. [Table 1](#tab1){ref-type="table"} shows the demographic data of pediatric patients infected with pandemic S-OIV and presenting with or without pneumonia. No variation in age, gender, hospitalization rate, and length of stay between the groups were observed. No patients had underlying diseases or complicated with acute respiratory distress syndrome (ARDS) after infection.
3.2. Laboratory Tests on Admission {#sec3.2}
----------------------------------
The hemogram of WBC, hemoglobin level, and platelet count were similar in patients who presented with or without pulmonary complications. Conversely, children presenting with pandemic S-OIV pneumonia were more likely to have a high level of CRP (19.7 ± 28.9 mg/L versus 8.0 ± 8.4 mg/L, *P* = 0.04). High levels of aspartate aminotransferase (AST) (56.2 ± 76.9 U/L versus 33.4 ± 9.8 U/L, *P* = 0.03), alanine aminotransferase (ALT) (22.2 ± 45.7 U/L versus 13.6 ± 5.1 U/L, *P* \< 0.01), and creatine kinase (CK) (229.2 ± 467.4 U/L versus 157.8 ± 178 U/L, *P* \< 0.01), but not of alkaline phosphatase (ALK-P), were detected in patients who presented without pulmonary complications ([Table 1](#tab1){ref-type="table"}).
3.3. Immunophenotype Analysis {#sec3.3}
-----------------------------
The absolute neutrophil count, absolute monocyte count, and absolute lymphocyte count in S-OIV infected patients presenting with pulmonary complications did not considerably differ from those who presented without pulmonary complications; however, a difference in immunophenotypes after further analysis was observed. To determine the lymphocyte and NK cell expression of S-OIV infection, the activation of CD3, CD4, CD8, CD20, and CD16CD56 was evaluated ([Table 2](#tab2){ref-type="table"}). Acute S-OIV infection along with pulmonary complication was associated with significantly low absolute numbers of CD3 (244 ± 188 cell/mm^3^ versus 478 ± 386 cell/mm^3^, *P* = 0.02), CD8 (119 ± 85 cell/mm^3^ versus 239 ± 179 cell/mm^3^, *P* = 0.02), and CD16CD56 (63 ± 41 cell/mm^3^ versus 130 ± 100 cell/mm^3^, *P* = 0.04). The ratio of CD4/CD8 (0.9 ± 0.3 versus 1.02 ± 0.35, *P* = 0.51) did not change markedly between the groups.
3.4. Cytokine Expression {#sec3.4}
------------------------
Patients presenting with pulmonary complications exhibited significantly higher concentrations of IL-1*β*, IL-6, IL-12, and IFN-*γ* compared with those who presented without pulmonary complications. No differences in IL-8 (88.54 ± 123.55 pg/mL versus 29.57 ± 21.76 pg/mL) and IL-10 (5.7 ± 4.63 pg/mL versus 5.43 ± 8.05 pg/mL) levels were observed between patients presenting with and without pulmonary complications ([Table 3](#tab3){ref-type="table"}).
4. Discussion {#sec4}
=============
An inflammatory response of the host to the influenza virus occurs in infection with the release of pro- and anti-inflammatory cytokines. Although cytokine production is necessary for the defense function, an excessive response can cause deleterious effects. IL-6 has been suggested to be an early inflammatory marker, and levels correlate well with the severity and prognosis of sepsis. Systemic inflammation related to lung infections is generally caused by cytokine translocation from the lungs into the systemic circulation \[[@B7]\]. In addition, systemic increase in IL-6 and IL-10 in pneumonia is associated with the worse prognosis \[[@B8]\]. However, we did not detect the substantially raised level of IL-10 in patients presenting with or without complication. This finding may be related to host inflammatory response, which is an evolutionary process over time that varies depending on the number of days and several other factors, such as the use of antiviral agents for treatment of and vaccination for prophylaxis of influenza infection \[[@B9]\].
IL-1 is a potent proinflammatory cytokine that is essential for host-pathogen response. IL-1*β* plays a crucial role in acute and chronic lung inflammatory diseases \[[@B10]\]. Chiaretti and colleagues reported that IL-1*β* and IL-6 expressions in plasma were considerably upregulated in H1N1 infected patients presenting with severe diseases and correlated with the severity of respiratory compromise and fever \[[@B11]\]. In this study, we performed a comparative study by pulmonary complication. The cytokine expression did not indicate a correlation with hypoxemia or extent of lung infiltrates. The IL-1*β* activity increased in bronchoalveolar lavage fluid of patients presenting with ARDS. A microarray analysis on ARDS-associated pulmonary edema indicated a prominent role for IL-1*β* \[[@B12]\]. Influenza A virus-infected monocytes and macrophages efficiently produce large quantities of IL-1*β* and TNF-*α* \[[@B13]\]. IL-1*β* may enhance TNF-*α*-induced neutrophil recruitment to the lung by altering TNF receptors as well as MIP-2 and KC production in pulmonary diseases \[[@B14]\]. This supports the notion that slightly high plasma levels of IL-1*β* are exhibited in patients presenting with pulmonary complications.
IL-12 is a heterodimeric cytokine which was primarily produced by macrophages and dendritic cells in both innate and adaptive immune responses. Plasma levels of IL-12p40 were considerably high in the H5N1-positive group. IL-12p40 may be released from alveolar epithelial or endothelial cells to circulate in the blood, suggesting the contribution of macrophages to lung injury at the initial stage of H5N1 infection \[[@B15]\]. Dendritic cells have been observed to produce relatively high levels of IL-12 in response to influenza A viral infection or dsRNA stimulation \[[@B16], [@B17]\]. IL-12 exerted a direct effect on IFN regulatory factor-1 (IRF-1), an effect directly mediated by the induction of IFN-*γ* production \[[@B18]\]. However, Matsumoto and coworkers observed that serum concentrations of IFN-*γ* were substantially low in H1N1 pneumonia patients presenting with neutrophilic leukocytosis \[[@B19]\]. IFN-*γ*-mediated enhancement of IL-12 production also represented the convergence of signals derived from innate and adaptive immune responses \[[@B20]\]. These findings may support the notion that plasma levels of IL-12 and IFN-*γ* were elevated in patients presenting with pulmonary complications.
The T cell immune response is characterized by expansion of naive CD4 and CD8 cells into effector T cells specific for some influenza viral proteins. CD4 and CD8 T cell response against the influenza virus have most often been described in animal models. Eliminating the H3N2 virus is substantially delayed in animal deficient of CD8 cells \[[@B21]\]. CD8 cell clonal expansion associated with the primary or secondary challenge is a crucial determining factor in controlling influenza infection \[[@B22]\]. Giamarellos-Bourboulis et al. \[[@B23]\] demonstrated that considerably few CD4 positive T cells and B cells were present in critically ill patients. These findings may provide partial explanations for the decrease in CD3 and CD8 T cells in inpatients presenting with pulmonary complications.
NK cells are increased in the lungs following influenza infection \[[@B24]\]. NK cells help CD8^+^ cell function indirectly by secreting soluble factors \[[@B25]\] or by stimulating dendritic cells to produce IL-12 \[[@B26]\]. Peripheral blood of CD16CD56 cells was decreased in patients presenting with pulmonary complications, which might reflect homing of these cells to the respiratory tract \[[@B27]\] or increased apoptosis and activation-induced cell death \[[@B28]\]. Furthermore, influenza can infect NK cells, thereby triggering NK cell death and potentially providing a mechanism for the virus to escape innate immune defenses \[[@B29]\]. NK cells considerably augment pulmonary inflammation, contributing to the pathogenesis of influenza infection \[[@B30]\].
The 2009 S-OIV appears to be highly infectious but exhibits a relatively low mortality for a pandemic strain. An antibody response can prevent infection with the T cell response limiting morbidity. These data contribute to a better understanding of the innate and adaptive immune mechanisms at play during acute influenza infection in pediatric patients, providing a basis for further analysis into the contribution of these inflammatory mediators and cells in controlling human influenza infection.
This study was supported by Grants from the National Cheng Kung University Hospital (NCKUH-9904004), Taiwan; the Multidisciplinary Center of Excellence for Clinical Trial and Research (DOH102-TD-B-111-002), Department of Health, Executive Yuan, Taiwan; and the Center of Infectious Disease and Signaling Research, National Cheng Kung University, Taiwan.
Conflict of Interests
=====================
The authors declare that they have no conflict of interests.
######
Demographic and laboratory findings in children infected with 2009 H1N1.
--------------------------------------------------------------------------------------------------------
Without pulmonary complication\ With pulmonary complication\ *P* value\*
(*N* = 61) (*N* = 24)
------------------------- --------------------------------- ------------------------------ -------------
Age (years) 9.8 ± 4.3 10.8 ± 4.1 0.33
Male (%) 30 (73.1%) 10 (50%) 0.14
Hospitalization (%) 9 (21.9%) 4 (20%) 0.87
LOH (days) 4.1 ± 1.9 3.8 ± 0.5 0.77
WBC (×10^3^/cmm), (*n*) 6.2 ± 1.9 (40) 6.9 ± 3.6 (20) 0.88
ANC (/cmm) 4733 ± 2141 4904 ± 3062 0.94
AMC (/cmm) 501 ± 254 520 ± 321 0.49
ALC (/cmm) 917 ± 606 1036 ± 928 0.84
Hemoglobin (g/dL) 13.3 ± 1.3 13.4 ± 1.1 0.74
Platelet (×10^3^/cmm) 219 ± 58 218 ± 57
CRP (mg/L) 8.0 ± 8.4 (38) 19.7 ± 28.9 (18) 0.04
AST (U/L) 56.2 ± 76.9 (34) 33.4 ± 9.8 (19) 0.03
ALT (U/L) 22.2 ± 45.7 (35) 13.6 ± 5.1 (19) \<0.01
CK (U/L) 229.2 ± 467.4 (34) 157.8 ± 178 (16) \<0.01
ALK-P (U/L) 226.7 ± 74.8 (26) 205.2 ± 82.2 (13) 0.56
--------------------------------------------------------------------------------------------------------
ALC: absolute lymphocyte count; ALK-P: alkaline phosphatase; ALT: alanine aminotransferase; AMC: absolute monocyte count; ANC: absolute neutrophil count; AST: aspartate aminotransferase; CK: creatine kinase; CRP: C-reactive protein; LOH: length of hospitalization; WBC: white blood cell.
\*Chi-square test or Mann-Whitney test.
######
The absolute cell number of immunophenotypes in patients infected with 2009 H1N1 according to pulmonary complications.
--------------------------------------------------------------------------------------------------------
Cell markers (cell/mm^3^) Without pulmonary complication\ With pulmonary complication\ *P* value
(*N* = 24) (*N* = 15)
--------------------------- --------------------------------- ------------------------------ -----------
CD3 478 ± 386 244 ± 188 0.02
CD4 222 ± 206 122 ± 95 0.1
CD8 239 ± 179 119 ± 85 0.02
CD20 57 ± 42 47 ± 37 0.48
CD16CD56 130 ± 100 63 ± 41 0.04
CD14 94 ± 70 142 ± 158 0.95
CD4CD25 13 ± 13 6 ± 4 0.22
--------------------------------------------------------------------------------------------------------
######
The cytokines profile of patients infected with 2009 novel H1N1 according to pulmonary complications.
-----------------------------------------------------------------------------------------------
Cytokine (pg/mL) Without pulmonary complication\ With pulmonary complication\ *P* value
(*N* = 34) (*N* = 24)
------------------ --------------------------------- ------------------------------ -----------
IL-1*β* 1.7 ± 1.2 3.1 ± 1.9 0.01
IL-6 10.5 ± 7.7 21.5 ± 18.9 \<0.01
IL-8 29.6 ± 21.8 88.5 ± 123.6 0.09
IL-10 5.4 ± 8.0 5.7 ± 4.6 0.53
IL-12 1.5 ± 4.0 2.2 ± 0.8 \<0.01
IFN-*γ* 1.4 ± 1.1 2.8 ± 0.9 \<0.01
-----------------------------------------------------------------------------------------------
IFN: interferon; IL: interleukin.
[^1]: Academic Editor: Maddalena Ruggieri
|
Australia’s growing fleet of grid-scale batteries achieved record revenues in the September quarter, driven by the expanding frequency and ancillary markets, increased arbitrage and the lowest cost of charging as spot prices fell regularly into negative territory.
The assessment by the Australian Energy Market Operator, in its latest Quarterly Energy Dynamics report, shows that total net revenue (after the cost of charging) was $12 million, the highest since the first big battery, the so-called Tesla big battery at the Hornsdale Power Reserve in South Australia, entered the market in late 2017.
The biggest driver of the increased revenue was the FCAS market, which in turn was driven by greater requirements imposed on the market by AEMO, which affected the “contingency FCAS market” and drove prices higher.
There was also another failure of the Basslink connection between Tasmania and Victoria, which added to need of more “regulation FCAS” on the mainland and also drove prices higher.
AEMO says FCAS revenues rose by $4 million, and this also reflected the entry of the market of the two batteries in Victoria – at Gannawarra and Ballarat.
Indeed, it was interesting that the Hornsdale battery – the first and still the dominant player in the market – only slightly increased its revenues over the quarter, according to its results released by its owner Neoen on Tuesday night, which reported revenues for the first nine months were just 1 per cent ahead of the same period a year earlier.
The AEMO report also noted that the two Victoria batteries were playing a greater role in the spot market, leading to increased revenues of $0.6 million, and the cost of energy had fallen due to the regular falls to negative prices or very low prices in South Australia.
Pumped hydro facilities were also more active, taking advantage of the lower spot prices and volatility in markets such as Queensland, which allowed them to increase their “arbitrage” – the difference between the purchase price and the selling price – to $82/MWh from $67/MWh.
Even so, the Wivenhoe pumped hydro facility in Queensland only operated 18 per cent of the time that prices went negative, which AEMO attributed at least partly to the commercial interest of their then owners, the coal-dominated CS Energy. Wivenhoe is now owned and operated by the newly formed Cleanco and is expected to play more often in the market.
Both batteries and pumped hydro increased their share of the FCAS market, with coal plants being the biggest loser. Indeed, there is some concern that some coal plants have effectively given up on the FCAS market, a move that is resulting in some controversial proposals to reframe the markets (which we will come to at another time).
Batteries secured 20 per cent of the $60 million FCAS market in the quarter, and pumped hydro 20 per cent. Demand response also played a major role, and the first virtual power plant (operated by Energy Locals) also entered the market in September, a trend that AEMO expects will increase. |
Kingdom Kilts Focus
SUMMER COMPETITION!!!!!If you are hiring from us, have hired from us or bought a kilt from us then we want a photo please. Looking good or worst for wear, handsome or crazy, post it on our facebook page and at the end of the summer season we will give the sender a free made to measure kilt in the tartan of their choice.Nothing too crazy please(this is a family friendly site).
Our Tartans For Hire
Kingdom kilts provides only the highest standard of kilts, all our kilts are made with 8 yards of cloth. Hand stitched, the kilts are all finished on a hoffman press to ensure your kilt holds its shape for many years to come. If you have any questions, please get in touch and we'll be happy to help out. |
Q:
Routing IPsec VPN for VM subnet
My physical computer is able to establish an IPsec tunnel (with Strongswan) to my internet-accessible VPS, so that my physical computer's internet traffic goes through my VPS.
I also tried and was successful in setting up Strongswan in a VM running on my physical machine. Expectedly, my VM can access the internet through my VPS.
What I'd like to do is have Strongswan running on my physical computer, so that the traffic of all my VM's (in 192.168.122.0/24) goes through my VPS. I think this should be do-able with a site-to-site configuration (example here:https://www.strongswan.org/testing/testresults/ikev2/net2net-cert/), however I haven't been able to get it to work. I'm not sure if my problem is with the Strongswan configuration, or with my VM networking configuration, or both...
ipsec.conf on my physical machine:
config setup
charondebug="ike 2, cfg 2"
conn kvm-test
rightsubnet=0.0.0.0/0
keyexchange=ikev2
ike=aes256gcm128-sha512-modp8192!
esp=aes256gcm128-sha512-modp8192!
leftcert=client.pem
auto=add
right=123.123.123.123 # not my VPS's actual IP
rightcert=vpn_server.pem
leftsubnet=192.168.122.0/24
left=192.168.1.2
ipsec.conf on my VPS:
config setup
# strictcrlpolicy=yes
# uniqueids = no
conn %default
keyexchange=ikev2
leftfirewall=yes
auto=add
leftsubnet=0.0.0.0/0
left=123.123.123.123 # not my VPS's actual IP
ike=aes256gcm128-sha512-modp8192!
esp=aes256gcm128-sha512-modp8192!
conn kvm-test
leftcert=vpn_server.pem
rightcert=client.pem
rightsubnet=192.168.122.0/24
With this configuration, the connection is successfully established, however my VM's traffic does not go through it. I should note that ip route show table 220 does not show anything, which is unlike the example linked to above, and I'm not sure what I should put there... ip route add table 220 default via 123.123.123.123 proto static doesn't work. Any thoughts?
A:
If your virtualization solution NATs the traffic from 192.168.122.0/24 to your host's physical IP (192.168.1.2) you need to avoid that and add a rule that accepts traffic that matches an IPsec policy.
For instance (more details):
iptables -t nat -I POSTROUTING -s 192.168.122.0/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT
|
Dura-Europos Route map
The Dura-Europos route map - also known as stages map - is the fragment of a speciality map from Late Antiquity discovered 1923 in Dura-Europos. The map had been drawn onto the leather covering of a shield by a Roman soldier of the Cohors XX Palmyrenorum between AD 230 and AD 235. The fragment is considered the oldest map of (a part of) Europe preserved in the original.
The map is the only road map of antiquity preserved in the original; it is in the manuscript collection of the Bibliothèque nationale de France in Paris.
Discovery
The Belgian archaeologist Franz Cumont discovered the map fragment during excavations in Dura-Europos in 1923 in the submerged "Tower of the Archers". The map is a fragment of leather or parchment, painted in colour, which had been found among the remnants of wooden oval shields. It was identified by Cumont as the remains of the leather cover of a laminated shield with remnants of the wooden parts of the shield still attached to the back. The map had been made by a Roman soldier, probably an infantryman or an archer of the Cohors XX Palmyrenorum, an auxiliary cohort stationed in Dura. This soldier drew the travel stages of his unit on the march through the Crimean on the leather cover of his shield somewhere between AD 230 and AD 235. Geographical inconsistencies may point towards the owner of the shield having commissioned somebody else with the drawing.
Description
The preserved fragment of the map is . Cumont assumed that the map originally had had a width of . The depiction is divided by a semi-circular white line into two parts. This roughly drawn line represents the coastline of the western and northern coast of the Black Sea. To the left side of the coast, the open sea is represented in blue colour, with three ships on the fragment preserved. To the right of the coastline, the land is shown in reddish colour. Twelve places of the Black Sea region are named on the map, with the Latin names being used, but transcribed into Greek. To the right of each place name, distances were noted in Roman miles, comparable to the Itinerarium Antonini. The places themselves have been depicted symbolically, with the draughtsman using the same symbol - a building with a gabled roof - for all places.
It is very likely that the places mentioned are stages of a march of the Cohors XX Palmyrenorum. Two blue lines under the names Ἰστρος, ποτ(αμός) and Δάνουβις ποτ(αμός) suggest rivers which were crossed during the march.
Reconstruction of the stages
The list of stages of the preserved part of the map after Cumont is as follows:
Παν[υσος ποτ(αμός)? μί(λια) . .]
Οδεσ[σός μί(λια) . .]
Βυβόνα [μί(λια) . .]
Καλ[λ]ατις μί(λια) . .
Τομέα μί(λια) λγ´
Ἰστρος ποτ(αμός) μί(λια) μ´
Δάνουβις ποτ(αμός) [μί(λια) . .]
Τύρα μί(λια) πδ´
Βορ[υ]σ[θέν]ης [μί(λια) . .]
Χερ[σ]όν[ησος . . . . ]
Τραπ[εζοῦς . . . . .]
Aρτα[ξάτα μί(λια) . .]
The first part of the route corresponds to the route between Byzantium and the mouth of the Danube known from the Itinerarium Antonini and the Tabula Peutingeriana. Some of the cities are also mentioned in the Ravenna Cosmography. Following the map of Dura-Europos, the Danube is crossed after modern Histria and then advances into regions in which the Itinerarium Antonini and the Tabula Peutingeriana do not record any Roman roads.
Cartographic Characteristics
The fragment shows that the route map was oriented to the west. This is indicated by the direction of the writing and the arrangement of the décor. In addition to that, the westernmost point of the map, the river Panysus, is on the upper edge of the map, while the easternmost point, the place Ardabda, is on the lower edge. This orientation to the west is unique in Roman cartography, as all other known maps were oriented to the east, towards the sunrise.
Dating
The dating of the map fragment can be narrowed to the first half of the 3rd century. The Cohors XX Palmyrenorum is confirmed to have been in Dura-Europos in AD 230 by a dedication to the Roman Emperor Alexander Severus, which gives us a starting date. After the Roman defeat in the battle of Edessa in AD 260, the Roman presence was all but forced out of the Black Sea region. One city named in the map, Histria, already had fallen to the Goths in AD 238, after severe riots in the region following the death of Alexander Severus in March of AD 235. A military march through this region after AD 235 or 238 at the latest seems unlikely. These facts give us a time frame for the creation of the route map of five years between AD 230 and 235.
Perception, importance and whereabouts
After its discovery by Cumont, the route map was soon forgotten again. In his 2004 publication of the weapons and military equipment of Dura-Europos, James mentions the map, but doubts that the fragment was part of a Roman shield. Only Nabbefeld took the map up again in 2008. In addition to its importance for the history of ancient cartography, the map is also important for military history, as it is evidence that Roman military units were present in southern Russia until the Gothic invasion after AD 260 and that the city of Artaxata (today Feodossija) must still have been under Roman control at that time.
Notes
References
Pascal Arnaud: Observations sur l'original du fragment de carte du pseudo-bouclier de Doura-Europos. Revue des études anciennes, No. 90, 1-2, Paris 1988. pp. 151–161.
Pascal Arnaud: Une deuxième lecture du bouclier de Doura-Europos. Comptes rendus de l'Académie des inscriptions et belles-lettres, No.133-2, 1989. pp. 373–389.
Pascal Arnaud: Pouvoir des mots et limites de la cartographie dans la géographie grecque et romaine. Dialogues d'histoire ancienne, 1989-15. pp. 9–29.
Franz Cumont: Fragment de bouclier portant une liste d'étapes. Syria, No. 6-1, Paris 1925. pp. 1–15.
Ansgar Nabbefeld: Roman shields.Studies on archaeological finds and iconographic evidence from the end of Republic to the late Roman period. Cologne 2008. .
René Rebuffat: Le bouclier de Doura. Syria, No. 63-1-2, Paris 1986, pp. 85–105.
Richard Uhden: Bemerkungen zu dem römischen Kartenfragment von Dura Europos. Hermes 67, 1, Berlin 1932, pp. 117–125.
Category:Dura-Europos
Category:Roman roads
Category:3rd century maps
Category:Archaeological discoveries in Syria
Category:1923 archaeological discoveries
Category:Bibliothèque nationale de France collections |
Severe flu season turning deadly for some. Is it too late to get the shot?
This year's flu season already promises to be severe, with the virus widespread in 49 states many more hospitalized than last year
Get the latest from TODAY
Sign up for our newsletter
Jan. 19, 2018 / 9:25 PM GMT / Source: TODAY
By Linda Carroll
With a fast-moving and sometimes deadly flu season still peaking, many Americans are scrambling to get vaccinated.
The latest data from the Centers for Disease Control and Prevention shows that 49 states are reporting widespread activity as of this past week and a big increase in the number of people hospitalized with the virus.
Since the season began late last year, 30 children have died due to the flu, compared to five last year at the same time, the CDC reported Friday.
And, things seem to be getting worse. During the second week of January hospitalizations increased by nearly 40 percent compared to the previous week.
To put this year’s flu season in perspective, there have already been three times as many cases this season as there were at the same time last year.
That’s why the CDC is urging folks who haven’t been vaccinated to get a flu shot as soon as possible. While this year's vaccine isn’t very good, it may keep you from getting so sick that you need to go to the hospital, experts say.
That’s because the vaccine will have stimulated at least some immune response and even if it’s not enough to completely protect against the flu, it will most likely make the illness less severe.
This year the CDC recommends that seniors get the “high dose vaccine,” which is designed specifically for people 65 and older and contains 4 times the amount of antigen as the regular flu shot. It is associated with a stronger immune response following vaccination (higher antibody production)
For people who want to get vaccinated now, there don’t seem to be any major shortages of vaccine yet.
TODAY checked with some of the major pharmacies to get a sense of the availability of shots around the country. Most say they're seeing an increase of people requesting the flu vaccine but supplies are holding up.
CVS Pharmacy
“The company is not experiencing a widespread shortage of the flu vaccine at this time, but we are seeing increased demand nationwide,” said spokesperson Amy Lanctot. “We’re continuing to supply stores with the vaccine using our existing inventory network, but there may be instances when an individual pharmacy could be temporarily out-of-stock.
CVS — the largest pharmacy chain in the US with 9,600 stores — recommends patients call their local CVS pharmacy in advance since inventory varies day to day.
CVS charges $40.99 for the standard shot and $66.99 for the high-dose vaccine.
Walmart
“We are not experiencing any shortages in flu vaccinations,” said company spokesperson Erin Hulliberger.
Walmart is also seeing increased demand for the flu shot at their pharmacies. Their prices typical range from $29 to $69, Hulliberger said.
Rite Aid
“We’ve had no supply issues and we have flu shots in all of our stores,” said spokesperson Ashley Flower.
With the flu season typically lasting through March, Rite-Aid is urging customers who haven’t yet gotten vaccinated to get their flu shots.
Kroger
The company “has an ample supply across the country,” said spokesperson Kristal Howard. “Kroger continues to experience high customer demand for the flu vaccine and we are also experiencing an uptick in customers seeking flu treatments.”
For those without insurance coverage for the vaccine, Kroger charges $40 for a standard dose; $60 for the high-dose shots. |
Restoration of the defective natural defence of beige mice against tissue-migrating larvae of Strongyloides ratti by transfer with normal peritoneal cells.
The effects of cell transfer on the defective natural defences of beige (bgj/bgj) mice against Strongyloides ratti were studied by assessing recovery of tissue-migrating larvae from head and lung. Transfer of peritoneal resident cells from normal bgj/+ mice restored the defective natural defence of beige mice. The non-adherent population of normal peritoneal cells did not have the restorative capacity. Macrophages may be important to the natural defence against S. ratti. |
Q:
Angular server-side rendering on Apache issue, not loading files like runtime.js, main.js, styles.css
Despite substantial unsuccessful research of this problem, I believe that it is probably not that hard to solve, it is just that I do not have enough experience with Angular and Apache.
So here is the info. I have an Angular 2 app that I wanted to be server-side rendered, in order to improve its SEO, as well as to improve the appearance of the links to the site shared on social media.
The server on which the site is hosted is Linux Ubuntu Linux ubuntu 18.04.
Web server application is Apache2.
I have followed the instructions for Server-Side rendering from the official Angular documentation.
Also, I started the server.js file, so it is serving the application at port 4000. And I have to point it out, I have no problems running it locally. The problem is when I try to run it on the server...
For security reasons, I will not be using real domains in this post.
When opening the page: www.mydomainexample.com/ssr I get this error:
Here is my folder structure:
/var/www/html/
ssr/
.htaccess
server.js
dist/
browser/
3rdpartylicenses.txt
es2015-polyfills.js
favicon.ico
fontawesome-webfont.svg
fontawesome-webfont.ttf
fontawesome-webfont.woff
fontawesome-webfont.woff2
index.html
main.js
polyfills.js
runtime.js
scripts.js
styles.css
assets
server/
main.js
main.js.map
Here is the apache2.conf
...
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
...
Here is the .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ssr/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [L]
RewriteRule ^ /dist/browser/index.html
</IfModule>
<VirtualHost *:80>
ServerName mydomainexample.com
ServerAlias www.mydomainexample.com
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:4000/
ProxyPassReverse / http://localhost:4000/
</VirtualHost>
<VirtualHost *:443>
ServerName mydomainexample.com
ServerAlias www.mydomainexample.com
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / https://localhost:4000/
ProxyPassReverse / https://localhost:4000/
</VirtualHost>
Also, I believe it is important to show a part of index html file, and I believe that the base tag is significant as well. Here is the base tag from index.html file:
...
<base href="/">
...
A:
If your website is running under /ssr you need to build your app with <base href="/ssr">.
Also you probably don't need the dist folder. browser and server folders usually reside next to the server.js but this may depend on your setup.
Additionally your rewrite rule doesn't seem to work since you obviously get HTML responses for your file requests but this may be related to the base href.
|
New York City water tank inspection results 2015-2017
Map by Ben Jay and Frank G. Runyeon
This interactive map is part of a City & State investigation that reported widespread neglect in the thousands of weathered wooden tanks that supply drinking water to millions of New York City residents. A review of city records indicates that most building owners still do not inspect and clean their tanks as the law has required for years, even after revisions to the health and administrative codes that now mandate annual filings.
The New York City Department of Health and Mental Hygiene, which is responsible for overseeing the water tanks, said the wood tanks are not a cause for concern. But scientists at the federal Environmental Protection Agency and public health experts consulted by City & State warned that animals can easily get into New York City’s water tanks, that mucky sediments inside the tanks may contain pathogens and that poorly maintained water tanks could be the source of disease outbreaks.
There are still many thousands of water tanks across the city for which there is no information at all. The city can’t even say with certainty how many there are or where they are located, much less their condition – even well-maintained water tanks accumulate layers of muck and bacterial slime.
About this map
As far as we know, this is the first-ever map of water tanks in New York City. We mapped over 13,000 water tank inspection reports that the city Department of Health and Mental Hygiene (DOHMH) provided to City & State in March 2018 via a Freedom of Information Law request. The inspection data mapped above covers reporting years 2015, 2016 and 2017. Every year, building owners and water tank cleaning companies are required to submit this information to the city as proof that they inspect their tanks annually and test them for bacteria – rules designed to keep water tanks safe for New Yorkers to drink from. Owners must submit a report as proof before Jan. 15 of the following year. If no report is filed, the city considers that evidence that the tank was not checked for sanitary or structural defects.
Disclaimer: This map is based on government data current as of March 27, 2018. City & State cannot guarantee the accuracy of the information presented here beyond the data we used to create it. The map should be used for informational purposes only and you should request the inspection records from buildings you are interested in. The latest data is available through this city portal: Rooftop Drinking Water Tank Inspection Results.
Displays:
Where Are The Tanks?
Blue: all the buildings that reported to DOHMH that they definitely have a drinking water tank. Since the 19th century, the vast majority of these tanks have been made of wood – mostly yellow cedar, some redwood – the rest are metal.
Yellow: buildings that the city estimates likely have a drinking water tank, though they don’t know for sure. This highlights every New York City building seven stories and taller without a tank inspection report.
Uninspected tank likely
These buildings have not reported a water tank inspection to the city, so we do not know for certain that they have a tank. That said, the city assumes that every building taller than six stories requires a tank to provide adequate water pressure. This is how DOHMH has estimated the total number of buildings with water tanks in the city. These buildings are marked in yellow to give a fuller picture of the city’s estimated universe of water tanks. Using the satellite view, perhaps you can visually confirm whether the building has a water tank on the roof. Remember, many buildings choose to hide their tanks behind tall walls or inside decorative enclosures.
Water Tanks Inspected
You have four options to view which tanks filed inspection reports: 2015, 2016, 2017, or All. Selecting an individual year will display all buildings who filed an inspection that year in green; and all buildings who did not file an inspection that year in red. Selecting “All” will display buildings who filed every year in green; and buildings who failed to file in at least one year in red.
It’s normal for tanks to accumulate sediment and biofilm between annual cleanings, but most water tank inspections describe suspiciously spotless water tanks. This is likely because many inspectors record tank conditions after they clean and disinfect the tank. We mapped the few results that show sanitary defects in city records. Even elite addresses find issues in their tanks, including evidence of insects, birds or rodents. These reports likely tell us more about the inspector’s honesty and interpretation of the city rules than the tanks’ condition relative to reportedly pristine tanks.
Bacteria:Coliform / E. coli
This shows the results of bacteriological testing of the building’s water. Many buildings don’t test their water tanks for bacteria until after they clean and disinfect them. Because of this, few reports find the two types of bacteria that the city requires building owners to test for: coliform and E. coli. Positive results display red, meaning they found bacteria, and negative results display white, meaning they did not find bacteria. Finding either of these bacteria in your water is bad news. They are indicators that there may be dangerous microbes in the water supply. E. coli is of particular concern because it is a sure sign that fecal matter is present.
Satellite View / Roadmap View & Clear Overlays:
You have two options for viewing the map by clicking the “Roadmap View” / “Satellite View” button. When you zoom all the way in on Satellite View, you see an aerial photograph of buildings. You’ll notice that the color overlays continue to show the building “footprint.” If this is distracting, you can remove the overlays by selecting the “Clear Overlays” button. Remember to click it again so you can view the overlays as you move around the map.
Government Links and Resources:
You can check a building’s most recent inspection filings through the Health Department’s portal.
For a primer on how NYC laws governing water tanks have evolved, see here.
If you want to complain to the city about your water quality or a water tank, you can call 311 or file a complaint online.
Your Right to Know
You have a right to request drinking water tank records from any building owner in New York City. Within 5 business days, the building owner must provide copies of records for the last five years of water tank inspections and water quality tests. (§141.07 Building Drinking Water Storage Tanks)
Add to Calender
As founder and research director of the Empire Center for Public Policy, E.J. McMahon is a go-to expert on budget plans and policy proposals. His organization promotes greater transparency, accountability and fiscal responsibility in state government, which often puts him at odds with lawmakers and the governor. McMahon previously worked as a journalist in Albany, as an Assembly Republican staffer and a budget adviser for almost 30 years, giving him great insight into the goings-on in the Capitol. |
Tim Curry - I Do The Rock tab
Highlighted Show chord diagrams
I do the rock - Tim Curry
CG
Edith Sitwell giving readings, 14 Moscow Road
CG
Osbert's giving champagne parties, Sachie's got a cold
FC
Gertrude's hanging pictures, Alice making tea
GC
Me, I do the only thing that still makes sense to me
GCG
I do the Rock, I do the Rock Rock
CG
John and Yoko farming beef, raising protein quota
CG
Sometimes they make love and art, inside their Dakota
FC
Rodney's feeling sexy, Mick is really frightfully bold
GC
Me, I do the only thing that stops me growing old
GCGCGCGCG
I do the Rock, I do the Rock Rock, I do the Rock Rock Rock
Well, it's stimulating
[ Tab from: http://www.guitaretab.com/t/tim-curry/182010.html ]CG
Solzhenitsyn feels exposed build a barbed-wired prison
CG
Nietzsche’s six feet under but his babies still got rhythm
FCG
Einstein's celebrating ten decades but I'm afraid philosophy
C
is just too much responsibility for me
GCG
I do the Rock, I do the Rock
CG
Baby Ruth and Dizzy Dean, Best and Colin Cowdrey
CG
Little Mo, Virginia Wade, Pistol Pete and O.J.
FC
I've always like Di Maggio and Rockne's pretty cute you know
GC
I could never whack a ball with such velocity
GCGCG
I do the Rock, I do the Rock, I do the Rock
It's stimulating - I'm a keen student
CG
Liz and Dick and Britt and Liza, Jaclyn, Kate and Farah
CG
Meg and Roddy, John Travolta, Governor Brown and Linda
FC
Interview and People Magazine, Miss Rona and the Queen
GC
It must be really frightful to attract publicity
GCG
I do the Rock, Myself, I do the Rock
CG
Carter, Begin and Sadat, Brezhnev, Teng and Castro
CG
everyday negotiate us closer to disastrous
FC
Idi Amin and the Shah, and Al Fatah is quite bizarre
GC
I could never get the hang of ideology
GCG
I do the Rock, I do the Rock
http://www.timcurry.at/ |
Things You Already Know:
After signing former Sonics forward Rashard Lewis to a lucrative contract in the offseason, expectations in Orlando were off the charts. At 31-19 and an incredible 19-10 on the road, the Magic have risen to the occasion and currently have a commanding 6.5 game lead over the second-place Washington Wizards in the Southeast Division.
In their first meeting this season in Los Angeles, the Magic defeated the Lakers 104-97 behind Dwight Howard’s 17 points and eight rebounds to go along with 18 from Lewis. Kobe dropped 28 for L.A. and Lamar Odom had one of his better all-around games of the year with 19 points and 17 boards, but no other Lakers stepped up to the Magic during their pivotal fourth quarter run.
Things You Might Not Know:
Although he won’t be joining teammate Howard in New Orleans for the All-Star game, Hedo Turkoglu is having a career season for the Magic, averaging nearly 20 points, six rebounds and five assists per game. Moreover, Turkoglu has been an exceptional performer in the clutch this season as evidenced by his recent game-winning shot against the league-leading Celtics two weeks ago.
Like the Lakers, the Magic also run a high-octane offense, averaging almost 104 points a game compared to the Lakers’ 107. While the Magic Big Three of Howard, Lewis and Turkoglu lead Orlando’s charge, Jameer Nelson (11 points), Keith Bogans (nine points) and Keyon Dooling (eight points) all play significant roles for Orlando. (Nelson has recently fallen out of favor as Carlos Arroyo starts at the point)
Former Laker Maurice Evans—included in the trade that sent him and teammate Brian Cook to Orlando for Trevor Ariza—has done well in his reserve role for the Magic, averaging over eight points a night in 22 minutes. Brian Cook has struggled to find his niche with the Magic though, scoring only four points in just over nine minutes of play.
Things You Need To Know:
The Magic are one of the best teams in an Eastern Conference that is without much in the way of competition. However, despite their outstanding success on the road, the Magic have a very pedestrian 12-9 record at home.
In their first matchup, the Lakers had Andrew Bynum in their arsenal, but to be fair, that game came early in the season before Bynum established himself as one of the best up-and-coming centers in the league. This time around, the Lakers will be without #17’s services, but will have newcomer Pau Gasol at their side. How Gasol and the rest of the Lakers’ front line are able to handle Howard down low will likely prove critical to the outcome of the game. |
Q:
Does using an Intel register for its "intended purpose" increase efficiency?
This article claims that each register has an intended purpose and more importantly,
When the engineers at Intel designed
the original 8086 processor, they had
a special purpose in mind for each
register. As they designed the
instruction set, they created many
optimizations and special instructions
based on the function they expected
each register to perform. Using
registers according to Intel's
original plan allows the code to take
full advantage of these optimizations.
Unfortunately, this seems to be a lost
art. Few coders are aware of Intel's
overall design, and most compilers are
too the simplistic or focused on
execution speed to use the registers
properly. Understanding how the
registers and instruction set fit
together, however, is an important
step on the road to effortless
size-coding.
Are there any other sources to corroborate this article? If so, I'd really like to check it out.
Please note I'm not talking about situations where fast operations like STOS uses edi - I'm just wondering if there is any performance degradation if I use eax and esi as counters instead of ecx or is it just about readability?
A:
There are instructions in the instruction set which use specific registers, which are smaller (and often faster) than the equivalent functions which target any register.
A:
No, not really anymore -- or at least not very often anyway. Using ECX as a counter lets you use the LOOP instruction. At one time, that was a significant advantage, but on most recent CPUs, a LOOP takes longer to execute than the combination of DEC ECX/JNZ wherever. The possible advantage is that it reduces memory bandwidth usage, which is a bottleneck more and more often. It can also be an advantage when/if you can use the other forms like LOOPNZ, which can be relatively complex to simulate with separate instructions.
|
Albinism is a relatively rare (1 in 20,000 people) mutation of one or more genes. It is categorized into oculocutaneous and ocular albinism, based on the involvement of both skin and eyes versus only eyes respectively. It is a defect in the generation of the melanin pigment in oculocutaneous albinism, and decreased number of melanosomes with normal amount of melanin in ocular albinism. Foveal hypoplasia is the characteristic feature of albinism often associated with aniridia, microphthalmus, nystagmus and achromatopsia.\[[@ref1]\]
We present a case of foveal hypoplasia, in which spectral domain optical coherence tomography (SD-OCT), microperimetry and fundus autofluorescence (FAF) were performed to explain the structural and functional characteristics.
Case Report {#sec1-1}
===========
We examined a 33-year-old male with progressive painless decrease in vision and nystagmus since childhood and no history of night blindness. His best corrected visual acuity was 20/80 with 0.00 diopter sphere (D Sph) / -4.00 diopter cylinder (D Cyl) X 10° in the right eye and 20/60 with 0.00 D Sph / -3.50 D Cyl X 170° in the left eye respectively. Color vision was normal on examination with Ishihara plates. A positive history of similar abnormality was obtained in his sibling (elder brother had similar abnormality). There was no history of consanguinity. Slit-lamp examination was normal and iris did not show any transillumination defect. Intraocular pressure using applanation tonometry was 15 mm of Hg in both eyes. Fundus examination showed macular vascularization, macular hypoplasia and hypoplasic optic nerve head with diffuse retinal pigment epithelial atrophy and prominent choroidal vessels in both eyes. Patient was clinically diagnosed to have foveal hypoplasia. A genetic analysis revealed an X-linked recessive inheritance pattern.
SD-OCT (Copernicus, Italy) was done in both eyes using asterisk scan protocol (7 mm length scan, 6 B-scans with 2743 A-scans per B-scan). SD-OCT was recorded with the eyes in the null zone, to overcome nystagmus. The scan location was assured by positioning the asterisk scan acquisition pattern over the foveal area and this location was assured as the scan passes through the fovea in the fundus image obtained in SD-OCT. The scan revealed absence of foveal dip, preservation of the inner retinal layers with thickened fovea, 270 microns in the right eye and 245 microns in the left eye. The qualitative and quantitative characteristics of the retina were similar in macular and peripheral areas (2° and 7° respectively). The small elevation of the inner segment/ outer segment (IS/OS) junction was absent in the fovea which is otherwise present in normal eyes.
Microperimetry (MP1, Nidek Technologies, Padova, Italy) using 33 stimuli in the central 20° of the macula and 4-2 threshold strategy revealed reduction of retinal sensitivity in the central retina. Mean retinal sensitivity was 7.2 dB in the right eye and 14.2 dB in the left eye. Relative scotoma was present in both eyes at the foveal area. Fixation was relatively unstable in both eyes, with abnormal fixation location (central fixation in the right eye and eccentric fixation in the left eye). Average eye movements during the microperimetry were 1.27°/sec in the right eye and 1.49°/sec in the left eye. Figs. [1](#F1){ref-type="fig"} and [2](#F2){ref-type="fig"} describe the color fundus photography, microperimetry and SD-OCT findings in our case. Fundus Autofluorescence (FAF) imaging with confocal scanning laser ophthalmoscope (Heidelberg Retina Angiograph, HRA II, Heidelberg Engineering, Heidelberg, Germany) did not show the typical foveal darkening in both eyes \[[Fig. 3](#F3){ref-type="fig"}\].
{#F1}
{#F2}
{#F3}
Discussion {#sec1-3}
==========
Foveal hypoplasia in oculocutaneous albinism is commonly associated with ocular features like decreased visual acuity, nystagmus, photophobia, strabismus, iris transillumination, macular transparency and neuronal abnormality.\[[@ref1][@ref2]\] Ours is a unique case of foveal hypoplasia associated with ocular albinism. High refractive errors are more common in patients with albinism.\[[@ref3]\] In our case both eyes had high astigmatism with reasonably good visual acuity in contrast to previously reported studies.\[[@ref1][@ref4][@ref5]\] Our case is Grade 3 (grading system proposed by Seo *et al*., \[[@ref1]\]) in view of mild foveal hyporeflectivity, \<2 choroidal transillumination, absence of tram-tract sign and foveal depression.
SD-OCT showed absence of foveal depression, as reported in previous studies using time domain OCT.\[[@ref1][@ref4]--[@ref6]\] The foveal thickness in this case was higher due to the presence of inner retinal layers in the foveal area. This can be due to the absence of the Chievitz layer which has an important role in the foveal maturity.\[[@ref2][@ref7]\] In the normal fovea, the photoreceptor layer appears as a distinct hyper-reflective layer with high-resolution OCT due to the difference in the optical properties of the photoreceptor segments,\[[@ref8]\] and the distance between the retinal pigment epithelium and the IS/OS junction of the photoreceptors increases significantly in the foveal region, consistent with the well-known increase in the length of the outer cone segments in this region.\[[@ref9]\] In case of foveal hypoplasia this layer is not very distinct as the central cones are spaced apart.\[[@ref1]\] Probably this explains low visual acuity in these patients. In our case we found persistent IS/OS junction of the photoreceptor layer in the foveal area in both the eyes but the central IS/OS junctional elevation was absent. This could be due to no difference in the size of the cones present in the foveal and peripheral retina.
Microperimetry showed a dense scotoma in the central macular area. The retinal sensitivity was less in the central macular area compared to the peripheral area. Abnormal cones in the central fovea cause low vision which affect the emmetropization process and can lead to nystagmus. In our case the patient had jerky nystagmus and the average eye movement measured with microperimetry was relatively higher compared to the normal age-matched control (0.18°/sec, unpublished data). The fixation of this patient was relatively unstable in both the eyes due to nystagmus. FAF of the central macula was reduced which may be due to the amount of macular pigment present.\[[@ref10]\]
In the literature only one case of isolated foveal hypoplasia has been reported. Our case report shows foveal hypoplasia associated with ocular albinism in which SD-OCT and microperimetry were used for the first time. Our study shows the importance of the microperimeter in assessing the functional vision.
|
ISLAMABAD: Pakistan’s first space mission has been planned for 2022 and the Federal Cabinet has approved this in today’s meeting.
An agreement between Pakistan Space and Upper Atmosphere Research Commission (SUPARCO) and a Chinese company has already been signed, Federal Information Minister Ch Fawad Hussain said after the cabinet meeting.
Pakistan in July this year launched two of its satellites into the orbit from Jiuquan Satellite Launch Centre in China.
The satellites, Pakistan Remote Sensing Satellite-1 (PRSS-1) and Pakistan Technology Evaluation Satellite-1A (PakTES-1A), were propelled into space through the Chinese Long March 2C launch vehicle.
The PRSS-1 is to be mainly used in Pakistan for land resources survey, evaluation, dynamic monitoring and management, resource utilisation, environmental disaster monitoring, agricultural survey, and urban construction.
The satellite, which has a designed life of seven years, is equipped with two panchromatic/multispectral cameras, with a resolution up to a meter and a coverage range of 60 km. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Vladimir N. Molotkov, Stepan M. Mishura
* @version $Revision$
*/
package android.framework.org.apache.harmony.security_custom.asn1;
import org.apache.commons.compress.utils.Charsets;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
/**
* This class represents ASN.1 GeneralizedTime type.
*
* @see http://asn1.elibel.tm.fr/en/standards/index.htm
*/
public final class ASN1GeneralizedTime extends ASN1Time {
// default implementation
private static final ASN1GeneralizedTime ASN1 = new ASN1GeneralizedTime();
/**
* Constructs ASN.1 GeneralizedTime type
*
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 GeneralizedTime type.
* To get a default implementation it is recommended to use
* getInstance() method.
*/
public ASN1GeneralizedTime() {
super(TAG_GENERALIZEDTIME);
}
/**
* Returns ASN.1 GeneralizedTime type default implementation
*
* The default implementation works with encoding
* that is represented as Date object.
*
* @return ASN.1 GeneralizedTime type default implementation
*/
public static ASN1GeneralizedTime getInstance() {
return ASN1;
}
public Object decode(BerInputStream in) throws IOException {
in.readGeneralizedTime();
if (in.isVerify) {
return null;
}
return getDecodedObject(in);
}
public void encodeContent(BerOutputStream out) {
out.encodeGeneralizedTime();
}
// FIXME support only one format for encoding, do we need others?
//
// According to X.680:
// four digit year, seconds always presented
// and fractional-seconds elements without
// trailing 0's (must be cut later from content)
private static final String GEN_PATTERN = "yyyyMMddHHmmss.SSS";
public void setEncodingContent(BerOutputStream out) {
SimpleDateFormat sdf = new SimpleDateFormat(GEN_PATTERN);
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
String temp = sdf.format(out.content);
// cut off trailing 0s
int nullId;
int currLength;
while (((nullId = temp.lastIndexOf('0', currLength = temp.length() - 1)) != -1)
& (nullId == currLength)) {
temp = temp.substring(0, nullId);
}
// deal with point (cut off if it is last char)
if (temp.charAt(currLength) == '.') {
temp = temp.substring(0, currLength);
}
out.content = (temp + "Z").getBytes(Charsets.UTF_8);
out.length = ((byte[]) out.content).length;
}
}
|
Syndicate
It wasn’t too many years ago that increasingly prominent conditioner Brian Williamson was known as an assistant to his father-in-law – the legendary Arlington trainer Harvey Vanier – but when the venerable Mr. Vanier retired in 2004 Williamson stepped up to take over the reins of that family-oriented operation.
However, this year, beginning at Oaklawn and now at Chicago’s northwest suburban oval, Williamson is in the midst of the best season of his own two decade-long career of saddling horses in his own name.
That was made evident once again in the Prairie State Festival when the 51-year-old Chicago native saddled Hernandez Racing Club’s La Tia for an eye-opening eight-length score in the $113,125 Purple Violet Stakes.
“That was a very nice win for us, especially to see the horse dominate the race like that,” said Williamson a few days after that victory while on the cusp of a top 10 ranking in the trainer standings. “I was pretty confident she’d run well in that race because of the way she ran in the race before that.
“What’s next for her?” the trainer asked rhetorically. “I suppose we’ll have to at least nominate to the (Grade III Arlington) Oaks (July 21) and then take a look to see how that race shapes up as it gets closer.
“Somewhere down the line we’re going to try the grass with her,” Williamson said. “She’s related to that mare Mulata (also bred by Hernandez but now owned by In His Favor Stable and trained by Manny Perez) who has won two races on the grass here at Arlington this summer.
“However, (La Tia) is going so good on the Polytrack here right now it’s hard to think of taking her off of it just yet,” Williamson said. “We galloped her again today. She came out of that race the other day just great.
“It’s been a good year so far for us,” Williamson said. “Hopefully, we can keep it going. I went to Hot Springs last winter and won a couple of stakes there, including one (the $60,000 Gazebo) with (Oak Knoll Farm and Team Wilcox’s Ontario-bred) Fastestwhogetspaid, who won a grass race for us here at Arlington a couple of weeks ago. I was originally thinking about the (Grade I) Queen’s Plate for that horse, but there’s a $150,000 stakes at Woodbine July 2 (the Achievement Stakes for Canadian-bred 3-year-olds) that’s a more likely possibility.
“(Russell L. Reineman Stable’s) Color Me Blue was getting ready to make a nice run in the ($114,625) Black Tie Affair Handicap the other day, but then he got pin-balled all the way down the lane,” Williamson said. “He’s a nice horse, too. We won the Fifth Season Stakes at Oaklawn with him last winter. Then, he was third to (Pin Oak Stable’s Grade II Oaklawn Handicap and Grade III Pimlico Special winner) Alternation in the Grade III Razorback Handicap at Oaklawn and second to him to him before that in the Essex, and that’s when Alternation was starting to get good.
“So even in the races where we’re not winning, we’ve been getting some decent checks,” Williamson concluded. “Now, we’ve got some nice 2-year-olds that are starting to get going, too, and they’re our hope for the future.”
RON MAGERS WATCHED THIRD CHANCE’S ISAAC MURPHY WIN IN ITALY
Longtime Chicago news anchor Ron Magers is back in town now, but when his filly Third Chance won the $112,125 Isaac Murphy Stakes by six and a half lengths on Prairie State Festival Day June 16, the dean of Chicago broadcaster’s was in Italy.
“I just got off the plane,” Magers said on the day after the Festival. “Yesterday, I watched the race on the internet in my hotel in Florence, Italy. I was there with Bob Marcocchio (another Third Chance co-owner) enjoying a brief vacation in Tuscany.
“However, I understand (WLS Afternoon Drive Co-Host) Roe Conn, another one of our co-owners along with Russ Scurto, represented us very well in the winner’s circle, so it was a big day for all of us.” |
‘‘Only an opposition that considers regional Victoria to be the state’s toenails and has axed the regional development portfolio could describe our thriving regional centres as stagnating.
‘‘Whether it’s getting on with the Regional Rail Revival project, creating new government job hubs in our regional centres or rebuilding our schools and hospitals, only Labor has a plan to support every part of our great state.’’
However, State Member for Euroa and National Party Deputy Leader Steph Ryan said she was mistaken and the Regional Development portfolio had not been abolished.
‘‘(Leader of the Nationals) Peter Walsh is the Shadow Minister for Regional Victoria and Decentralisation,’’ Ms Ryan said.
‘‘At present the Regional Development portfolio is held by a junior minister.
‘‘By placing responsibility for regional Victoria and decentralisation with the Leader of The Nationals, regional Victoria will have the prominence it deserves in a future Liberal and Nationals government.
‘‘Last year alone Victoria’s population grew by almost 150000.
‘‘Of that number, 125000 settled in Melbourne.
‘‘Melbourne can’t continue to grow at this rate while regional Victoria struggles.
‘‘Victoria now also has the highest unemployment rate in Australia.’’
Ms Pulford disagrees that the state’s regional centres are stagnating and said they were thriving, leading the nation in attracting new residents.
She cites investment in public transport, roads and schools, alongside moving Victorian Government jobs to the regions as proof.
‘‘Our regional centres are also seeing strong jobs growth with a total of 62500 jobs created in regional Victoria since the Labor Government took office,’’ Ms Pulford said.
‘‘(This includes) 11 times the number of jobs created under the previous failing Coalition Government.’’
The fact is that the people of Victoria will ultimately decide who is in the best position to implement policy which will help regional centres grow.
At this point in time it is Labor who the public has voted into power, and Labor policies that are driving the growth of the state’s regions.
However, that could all change at next year’s state election when the Coalition hopes to regain control of the state parliament. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.