David Clark, executive director of the Arkansas Fire and Police Pension Review Board (PRB), answered questions from Russellville City Council aldermen during Thursday's meeting on the utilization of Rule No. 4, the alternate cash flow method, for the retirement plan of 10 former Russellville police officers.

Alderman Phil Carruth made a motion to reinstate Rule No. 4, but it was not seconded and a vote did not occur.

During June's council meeting, aldermen voted to rescind $200 monthly in certificate pay for retired police officers on the pension system. The PRB gave an increase based on Rule No. 4.

Rule No. 4 reads, "The local pension board, as well as the local city council, must certify to the PRB that they understand the risks involved in using a cash flow model for a small group, and that they assume responsibility for any future funding shortfall risk that might occur as a result of the utilization of the Alternate Cash Flow Projection Valuation."

Clark said local governing body has active role in approving the method used.

"The exposures would increase if the assumptions were not met," Clark said, when asked by Alderman Rick Harrell if the liability would increase or decrease. Clark said it was not required for city to have a local pension fund.

According to Clark, one option is the plan could be ssigned to LOPFI by the governing body when less than four individuals on the plan are still working, adding the returns from the plan in the late 90s were very generous.

Responding to a query from Alderman Tyrone Williamson, when everyone involved in the plan passes away, the money rolls into the Russellville LOPFI plan.

Alderman Randal Crouch asked why there was such a long delay in notifying city about the certificate pay allocated to the police officers. The local PRB provided some of the officers with certificate pay

Clark said the annual financial disclosure report was not received until the end of 2004.

Alderman Ronnie Tripp asked why there was a LOPFI retirement plan if the pension plan was working.

According to Clark, many were severely underfunded in 1981 when the LOPFI plan was established.

Litter law enforcement

Prior to the council's unanimous vote on a resolution to support litter law enforcement, West RiverValley Regional Solid Waste District Source Reduction Coordinator Brian Ukara, District Education Outreach Coordinator Louise Mann and Jim Kelley, director of Russellville's Recycle Works center addressed the council.

"Our objective is to help save our environment and preserve our landfill," Kelley said regarding litter law enforcement.

In September, Kelley used everyone to patake in National Lands Day, Pope County and Russellville fall cleanup the 24th when people can get rid of anything and the Great Arkansas cleanup.

Ukara urged everyone to take part in recycling, adding Clarksville recently became a new recycling city with the Mayor's help.

Mann said teachers are including the environment into the curriculum in grades K-12 teaching things such as burned barrels and illegal dumping.

"It's partly for the economy as well as saving our natural resorces," Mann said.

Other business

The following items were unanimously approved:

n Destroying financial records no longer being used;

n Hiring a fireman for the fire department;

n Consideration of a resolution encouraging all utilities in Russellville to coordinate with the city's five-year capital improvements program;

n A resolution authorizing the sale of personal property by city auction;

n Realigining 21 bank accounts into four to make it easier for City Treasurer Jennifer Humphrey to handle the city's 21 funds;

n $2,100 in depot and lease expenses for the remainder of the year;

n $9,500 in computer equipment and maintenance to fund software purchased for community development;

n $2,150 to fund air conditioner repair;

n $2,783 to fund 6 percent matching to the old pension plan for an employee for a 2003-04 deployment;


Introduction
============

The primary objective of this investigation is to develop and evaluate potential radioprotective phytochemicals in the events of radiation exposures and accidents. A survey of literature may show that plant extracts from *Ocimum sanctum* ([@B1],[@B2]), soya ([@B3]), *Vitis vinifera* (grape seed) ([@B4]), *Adhatoda vasicagle marmelos* ([@B5]), *Spirulina fusiformis* ([@B6]), *Mentha piperita* ([@B7]), *Brassica compestris* ([@B8]), *Amaranthus paniculatus* ([@B9]), *Withania somnifera* ([@B10]) and Ginsan ([@B11]) possess potential radioprotective activity in mammals. We have recently observed that *A. vasica* Nees (Family: *Acanthaceae*) has restored hematological changes caused by irradiation in Swiss albino mice ([@B12]). *A vasica*, an evergreen gregarious and perennial shrub ([Fig. 1](#F1){ref-type="fig"}), has been used as an herbal remedy for allergen-induced bronchial obstruction ([@B13],[@B14]), asthma ([@B15],[@B16]), tuberculosis ([@B17]--[@B19]) and possesses antioxidant and chemopreventive agent. Since it enhances the activities of glutathione *S*-transferase in the liver of mice ([@B20]), we have examined the effects of *A. vasica* extracts on the levels of reduced glutathione (GSH) in liver, lipid peroxidation (LPO), and acid and alkaline phosphatases in testis of normal and irradiated mice. In addition, we have determined the radioprotective potential of *A. vasica* in terms of restoration of radiation-induced effects on the tissue architecture and cellularity of testis, and chromosome aberrations in the bone marrow cells. Figure 1.*Adhatoda vasica* Nees.

Methods
=======

Mice
----

Swiss albino male mice (*Mus musculus*), 6--8 weeks old with body weight of 24 ± 2 g, were used. Mice were obtained from Hamdard University, New Delhi, India and maintained and bred in mouse house, as an inbred colony as per norms laid down by an Institutional Ethical Committee, given standard mouse food and water *ad libitum*.

Irradiation
-----------

Mice were irradiated by ^60^Co source in the cobalt teletherapy unit (ATC-C9) at Radiation Oncology Department, Sawai Man Singh Medical College and Hospital, Jaipur, India. The mice were kept in ventilated box with a distance of 77.5 cm from the source to deliver a dose-rate of 1.33 Gy min^−1^.

*Adhatoda* Extract
------------------

Fresh leaves of *A. vasica* ([Fig. 1](#F1){ref-type="fig"}) were collected from the Herbarium, University of Rajasthan, Jaipur, India and shade-dried. Dried leaves were subjected to three changes of 80% ethanol at room temperature. The extracts were pooled, lyophilized, weighed and preserved at 4°C until use.

Experimental Design
-------------------

Mice were randomly divided into following groups (five per group):

1.  Group 1: Normal/sham-irradiated mice were given double-distilled water (DDW) through oral gavage once in a day for 15 consecutive days.

2.  Group 2: Mice were treated with 800 mg kg^−1^ body weight of *A. vasica* dried extract dissolved in distilled water through oral gavage for 15 consecutive days.

3.  Group 3: Mice were given distilled water for 15 days and then exposed to 8 Gy dose of gamma radiation. This group served as positive control.

4.  Group 4: Extract of *A. vasica* was given 800 mg kg^−1^ body weight of mouse orally for 15 days and after 30 min of last dose; they were exposed to 8 Gy dose of gamma radiation. Following various treatments, mice were autopsied by cervical dislocation on days 1, 3, 7, 14 and 30. Testis were surgically removed, weighed and fixed in Bouin\'s fluid. The tissue was embedded in a paraffin block after dehydrating with increasing concentrations of 70, 90 and 100% ethanol. Five micrometer sections were cut using hand microtomy, were placed on glass slide and were stained with Harris hematoxylin and eosin. Stained tissue sections were observed under light microscope (Olympus) to determine histopathological changes.

Survival Assay
--------------

For survival studies mice of both control and experimental groups were exposed to whole body gamma radiation (6, 8 and 10 Gy) and were checked daily for 30 days. The survival percentage of mice up to 30 days of exposure against each radiation dose was used to construct survival dose--response curves. Regression analysis was done to obtain LD~50/30~ values and to determine dose reduction factor (DRF).

Cytogenetics of Bone Marrow Cells
---------------------------------

Mice (all groups) were injected intraperitoneally with 0.025% colchicine and sacrificed 2 h later by cervical dislocation. Femurs were dissected out and bone marrow cells were aspirated and washed in physiological saline, treated hypotonically (0.075 M KCl), and fixed in Carnoy\'s fixative and stained with 4% Giemsa. Metaphase slides were prepared by air-drying method of Savage ([@B21]). Chromosomal aberrations were scored using oil immersion (with 100× object lens) under a light microscope.

GSH Assay
---------

GSH in liver was measured using the method described by Moron *et al*. ([@B22]). Liver homogenates were treated with 0.1 ml of 25% trichloroacetic acid (TCA) and the resulting precipitate was pelleted by centrifugation at 3900 *g* for 10 min. Free endogenous sulfhydryl was assayed in a total 3 ml volume by adding 2 ml of 0.5 mM 5, 5′-dithio-bis(2-nitro benzoic acid) (DTNB) prepared in 0.2 M phosphate buffer (pH 8) to 1 ml of the supernatant. The GSH reacts with DTNB and forms a yellow-colored complex with DTNB. The absorbance was read at 412 nm using UV-VIS Systronic spectrophotometer.

LPO Assay
---------

LPO levels in testis and liver were estimated by the method of Ohkawa *et al*. ([@B23]) as thiobarbituric acid (TBA) reactive substances. The liver and testis were dissected out and chilled in ice cold 0.09% NaCl. Homogenate of desired tissues were prepared in 1.15% KCl (1 g tissue in 9 ml of 1.15% KCl). Sodium dodecyl sulfate (8.1%; 0.2 ml) was added to 0.2 ml of sample in test tubes and pH was adjusted to 3.5 with 5 M NaOH. To this, 1.5 ml of 0.8% aqueous solution of TBA was added. The mixture was made up to 4 ml with distilled water and heated at 95°C for 60 min. After cooling under tap water, 1 ml of distilled water and 5 ml a mixture of *n*-butanol and pyridine (15:1) were added and shaken vigorously. The solution was centrifuged at 3900 *g* for 10 min. The upper organic layer was removed and absorbance was measured at 532 nm using UV-VIS Systronic spectrophotometer.

Acid and Alkaline Phosphatase Activity
--------------------------------------

Acid and alkaline phosphatase activities in testes were estimated using the method described by Fiske and Subbarow ([@B24]). The tissue homogenates were mixed with TCA and then centrifuged at 3900 *g* for 10 min. The supernatant was then treated with molybdate solution. (Molybdate solution was prepared by dissolving 25 g of ammonium molybdate into 200 ml glass distilled water (GDW) and combining with 300 ml of 10 N H~2~SO~4~ and then was made up to 1000 ml with GDW.) This resulted in the formation of phosphomolybdic acid from the phosphate present in the tissue. The phosphomolybdic acid was then reduced by 1-anilino-8-naphthalenesulfonic acid (ANSA) to produce a blue color whose intensity was proportional to the amount of phosphate liberated. The alkaline phosphatase activity is the difference between inorganic phosphate content of the incubated and control samples expressed as Bodansky units. One Bodansky unit corresponds to the liberation of 1 mg of inorganic phosphorous from the tissue in mg g^−1^ h^−1^ ([@B24]).

Statistical Analysis
--------------------

Student\'s *t*-test was employed to analyze the results ([@B25]). *P*-values \<0.05 were considered significant. Regression analysis was done to obtain LD~50/30~ values and to determine DRF.

Results
=======

Dose Reduction Factor
---------------------

*Adhatoda* leaves ([Fig. 1](#F1){ref-type="fig"}) extract (AE) was given as 100, 200, 400, 800 and 1200 mg kg^−1^ body weight of mouse per day in DDW orally to Swiss albino mice for 15 consecutive days. The extract was non-toxic and no mortality was observed till day 30. An optimum dose of 800 mg kg^−1^ body weight of AE was selected against 8 Gy radiations on the basis of maximum survivability as depicted in [Fig. 2](#F2){ref-type="fig"}. The percent survival was significantly increased in AE-fed mice subsequently treated with irradiation (AE-pretreated irradiated mice). When survival data were fit on regression line equation, LD~50/30~ values for control (irradiated alone) and experimental (AE plus irradiation) were computed as 6.47 and 9.3 Gy, respectively. On basis of these LD~50/30~ values, AE pretreatment produced a DRF of 1.43. Figure 2.Survival--dose--response curves for determination of LD~50/30~. Control and experimental (*Adhatoda*-pretreated; 800 mg kg^−1^ body weight) groups were exposed to whole body gamma radiation at 6, 8 and 10 Gy and were checked daily for 30 days. In *Adhatoda*-pretreated mice, a maximum survival of 70% was observed at radiation dose rate of 8 Gy. Regression analysis was done to obtain LD~50/30~ values and to determine dose reduction factor (DRF).

Inhibition of Radiation-Induced Change in Total Body Weight by *A. vasica*
--------------------------------------------------------------------------

As depicted in [Table 1](#T1){ref-type="table"}, in AE-treated mice, there was no significant change in body weight on days 1, 3, 7 and 14 while a significant increase (*P* \< 0.01) was observed on day 30 when compared with mice fed with distilled water alone. Notably, in irradiated mice, the body weight was drastically decreased on day 3, (*P* \< 0.001), day 7 (*P* \< 0.001) and day 14 (*P* \< 0.001) when compared with mice treated with distilled water only. In AE-pretreated irradiated mice, the body weight significantly increased on day 3 (*P* \> 0.05), day 7 (*P* \< 0.01) and day 14 (*P* \< 0.001) of observation as compared to irradiated group. To note, by day 30, all mice died in radiation-treated group, but in AE-pretreated irradiated group, 70% mice survived. Table 1.Change in body weight and testis weight of male Swiss albino mice in different groupsExperimental groupsDay 1Day 3Day 7Day 14Day 30Body weight (g)    Normal (DDW)21.32 ± 1.0522.34 ± 0.8524.33 ± 1.2224.65 ± 1.1626.23 ± 1.18    *Adhatoda* alone (800 mg kg^−1^ body weight)21.25 ± 0.2222.41 ± 1.2025.33 ± 2.1425.32 ± 1.0030.22 ± 0.70^\*\*^    Radiation (8 Gy)20.3 ± 0.6218.0 ± 0.25^\*\*\*^17.0 ± 0.16^\*\*\*^16.30 ± 0.24^\*\*\*^No survival    *Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)21.05 ± 0.6820.01 ± 0.69^\*^21.00 ± 1.32^\*\*^24.50 ± 1.33^\*\*\*^26.00 ± 1.80Testis weight (mg)    Normal (DDW)74.00 ± 0.5775.26 ± 0.8876.01 ± 1.2275.22 ± 0.8476.22 ± 0.78    *Adhatoda* alone (800 mg kg^−1^ body weight)75.00 ± 1.5574.00 ± 1.9977.00 ± 2.3477.50 ± 1.8682.00 ± 2.34^\*^    Radiation (8 Gy)71.40 ± 0.71^\*^68.60 ± 1.62^\*\*\*^58.80 ± 1.33^\*\*\*^36.60 ± 2.87^\*\*\*^No survival    *Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)72.10 ± 2.0572.50 ± 0.80^\*^63.50 ± 0.89^\*\*^60.90 ± 1.55^\*\*\*^68.90 ± 2.12[^1][^2][^3]

Inhibits Changes in Testis *A. vasica*
--------------------------------------

Mice treated with *A. vasica* extract alone showed no significant change in weight of the testis on days 1, 3, 7 and 14 ([Table 1](#T1){ref-type="table"}). However, on day 30, a significant weight increase (*P* \< 0.05) was observed as compared to mice treated with distilled water. Mice treated with radiation alone (8 Gy; Group 3) showed reduction in the testis weight during all days of observation (day 1: *P* \< 0.05; day 3: *P* \< 0.001; day 7: *P* \< 0.001 and day 14: *P* \< 0.001). Whereas in *Adhatoda*-pretreated irradiated group (AE plus radiation), there was a significant increase in testis weight after day 3 (*P* \< 0.05), 7 (*P* \< 0.01) and 14 (*P* \< 0.001) when compared with irradiated mice ([Table 1](#T1){ref-type="table"}). In irradiated mice, there was a drastic depletion of spermatogonial population with necrotic and pyknotic nuclei were observed ([Fig. 3](#F3){ref-type="fig"}B) when compared with mice treated with distilled water ([Fig. 3](#F3){ref-type="fig"}A). The germinal epithelium was highly disorganized with shrinkage of tubules and cytoplasmic vacuolization ([Fig. 3](#F3){ref-type="fig"}C). Total absence of sperm and spermatids were observed. Sertoli cells and Leydig cells showed shrinkage in their size ([Fig. 3](#F3){ref-type="fig"}D). While in mice pretreated with AE, less damage to spermatogonial population and germinal epithelium was observed with more rapid recovery ([Fig. 3](#F3){ref-type="fig"}E). In irradiated mice, there was significant decrease in number of spermatogonia type A and type B was noticed on all days of observation ([Fig. 3](#F3){ref-type="fig"}B--D). Similar decrease was also found in the number of primary spermatocyte, secondary spermatocyte and spermatid. Notably, in mice pretreated with AE and then exposed to radiation dose, the quality (as determined by intact germinal epithelium, no pyknosis, necrosis, karyolysis present, less cytoplasmic vacuolization) and number of germ cells increased by day 30, the histology of testis revealed near normal histoarchitecture except some cytoplasmic vacuolization and lumen with full of sperms ([Fig. 3](#F3){ref-type="fig"}G). Figure 3.Modulation of radiation-induced histological changes in testis of mice by *A. vasica* extract. (**A**) Normal testis showing compact and organized arrangement of spermatogenic cells, spermatogonia types A and B, primary spermatocytes, secondary spermatocytes, spermatids, Sertoli cells and Leydig cells. (**B**) Exposure to irradiation at day 1: distortion of germinal epithelium and depletion of spermatogonia were evident. (**C**) Shrinkage of tubule with broken germinal epithelium at day 3 of radiation exposure was seen. (**D**) More shrinkage of tubules at day 7. Cytoplasmic vacuolization was observed. (**E**) In *Adhatoda*-pretreated irradiated mice, at day 1, less damage with increased spermatogonial population was observed. (**F**) In *Adhatoda*-pretreated irradiated mice at day 3, increase in germ cell population and less cytoplasmic vacuolization was observed. (**G**) In *Adhatoda*-pretreated irradiated mice at day 30, there was an increase in tubular diameter with reduced interstitium and testis had its normal structure.

Reduction of Radiation-Induced Chromosomal Aberrations by *A. vasica*
---------------------------------------------------------------------

The exposure to radiation caused severe cytogenetic damages in bone marrow cells ([Fig. 4](#F4){ref-type="fig"}B) when compared with mice treated with distilled water ([Fig. 4](#F4){ref-type="fig"}A). Various types of aberration like chromatid breaks, chromosome breaks, fragments, and rings, chromosome exchange, and dicentric characteristics were observed in irradiated group ([Fig. 4](#F4){ref-type="fig"}B). In contrast, in AE-pretreated irradiated mice, a significantly lesser degree of these aberrations were observed ([Fig. 4](#F4){ref-type="fig"}C). Figure 4.Modulation of radiation-induced chromosomal aberrations in bone marrow cells of mice by *A. vasica* extract. (**A**) Normal metaphase showing 40 chromosomes in mice treated with distilled water. (**B**) Irradiation-induced chromatid breaks, exchange and translocation (white arrows). (**C**) *Adhatoda*-pretreated irradiated mice with representative near normal chromosomes.

Inhibition of GSH Levels in Liver by *A. vasica*
------------------------------------------------

Glutathione level in liver was found to significantly increase at autopsy intervals of day 7 (*P* \< 0.05), day 14 (0.001) and day 30 (*P* \< 0.001) in *Adhatoda*-treated mice when compared with mice treated with distilled water ([Table 2](#T2){ref-type="table"}). In irradiated group, the GSH content showed significant decrease at all autopsy intervals. Notably, as shown in [Table 2](#T2){ref-type="table"}, in AE-pretreated irradiated mice, a significant increase in GSH content was observed at all intervals when compared with irradiated mice. Table 2.Reduced glutathione (GSH) levels (μmol g^−1^ of tissue) wet weight in the liver of Swiss albino mice in different groupsExperimental groupsAutopsy intervals (in days)Day 1Day 3Day 7Day 14Day 30*Adhatoda* alone (800 mg kg^−1^ body weight)94.26 ± 1.4595.20 ± 1.3797.28 ± 1.68^\*^102.68 ± 1.94^\*\*\*^103.66 ± 1.85^\*\*\*^Radiation (8 Gy)50.25 ± 2.17^\*\*\*^42.12 ± 1.56^\*\*\*^40.38 ± 1.56^\*\*\*^45.10 ± 1.50^\*\*\*^No survival*Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)54.25 ± 1.54^\*^55.02 ± 1.55^\*\*\*^62.60 ± 2.40^\*\*\*^66.40 ± 1.65^\*\*\*^80.82 ± 2.68[^4][^5][^6][^7]

Inhibition of upregulation of LPO Levels in Liver and Testis by *A. vasica*
---------------------------------------------------------------------------

In *Adhatoda* extract (AE)-treated mice, a significant decrease in LPO level in liver was noticed on day 14 (*P* \< 0.01) and day 30 (*P* \< 0.05) as compared to those treated with distilled water ([Table 3](#T3){ref-type="table"}). In irradiated group, LPO level was increased (*P* \< 0.001) at all autopsy intervals of observation in terms of thiobarbituric acid reactive substances (TBARS). On the other hand, in AE-pretreated irradiated mice, a significant inhibition in LPO level was observed ([Table 3](#T3){ref-type="table"}). Table 3.Change in lipid peroxidation activity (nmol of MDA mg^−1^ of tissue) in liver and testis of Swiss albino mice in different groupsExperimental groupsLPO levels in liverDay 1Day 3Day 7Day 14Day 30*Adhatoda* alone (800 mg kg^−1^ body weight)3.11 ± 0.123.42 ± 0.123.41 ± 0.102.30 ± 0.15^\*\*^2.48 ± 0.26^\*^Radiation (8 Gy)6.63 ± 0.10^\*\*\*^11.12 ± 0.15^\*\*\*^14.12 ± 0.16^\*\*\*^12.05 ± 0.20^\*\*\*^No survival*Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)5.01 ± 0.18^\*\*\*^6.42 ± 0.14^\*\*\*^7.77 ± 0.16^\*\*^4.24 ± 0.12^\*\*\*^5.99 ± 0.14[^8][^9][^10][^11]

The LPO level in testis of *A. vasica*-treated mice was significantly (*P* \< 0.05) decreased on day 14 and day 30 as compared to those treated with distilled water ([Table 4](#T4){ref-type="table"}). In irradiated group, a noticeable elevation of LPO was observed at all intervals from day 1 to day 14. In AE plus radiation experiment group, a significant (*P* \< 0.001) reduction in LPO level was seen from day 3 onwards as compared to irradiated group ([Table 4](#T4){ref-type="table"}). Table 4.Change in lipid peroxidation activity (nmol of MDA mg^−1^ of tissue) in liver and testis of Swiss albino mice in different groupsExperimental groupsLPO levels in testisDay 1Day 3Day 7Day 14Day 30*Adhatoda* alone (800 mg kg^−1^ body weight)1.39 ± 0.151.32 ± 0.141.18 ± 0.100.86 ± 0.10^\*^0.82 ± 0.06^\*^Radiation (8 Gy)6.20 ± 0.16^\*\*\*^9.01 ± 0.20^\*\*\*^12.12 ± 0.18^\*\*\*^9.10 ± 0.12^\*\*\*^No survival*Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)4.42 ± 0.105.10 ± 0.18^\*\*\*^5.44 ± 0.16^\*\*^4.08 ± 0.20^\*\*\*^2.46 ± 0.18[^12][^13][^14][^15]

Modulation of Radiation-Induced Change of Alkaline Phosphatase and Acid Levels in Testis
----------------------------------------------------------------------------------------

Alkaline phosphatase activity showed no significant changes in *A. vasica*-treated mice as compared to those treated with distilled water except on day 30 there was a significant increase ([Table 5](#T5){ref-type="table"}). In irradiated group, the alkaline phosphatase activity in testis showed remarkable and significant decline (*P* \< 0.001) on all days of observation. In AE-pretreated irradiated mice, a significant recovery in alkaline phosphatase activity was observed. Table 5.Change in alkaline and acid phosphatase activity (mg pi g^−1^ h^−1^) in the testis of male Swiss albino mice in different groupsExperimental groupsAlkaline phosphatase levelDay 1Day 3Day 7Day 14Day 30*Adhatoda* alone (800 mg kg^−1^ body weight)5.36 ± 0.205.44 ± 0.65.38 ± 0.195.50 ± 0.226.02 ± 0.20^\*^Radiation (8 Gy)2.81 ± 0.12^\*\*\*^1.88 ± 0.10^\*\*\*^1.59 ± 0.12^\*\*\*^2.24 ± 0.12^\*\*\*^No survival*Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)3.46 ± 0.22^\*\*^4.36 ± 0.04^\*\*\*^4.24 ± 0.29^\*\*\*^4.40 ± 0.04^\*\*\*^4.34 ± 0.03[^16][^17][^18][^19]

The acid phosphatase activity in testis was found at normal level in *A. vasica* group as compared to mice treated with distilled water at all autopsy intervals ([Table 6](#T6){ref-type="table"}). In irradiated group, a highly significant (*P* \< 0.001) elevation in the enzyme level was observed. In AE-pretreated irradiated mice, a significant (*P* \< 0.001) decline in acid phosphatase activity was observed at all autopsy intervals in comparison to irradiated mice. Table 6.Change in alkaline and acid phosphatase activity (mg pi g^−1^ h^−1^) in the testis of male Swiss albino mice in different groupsExperimental groupsAcid phosphatase levelDay 1Day 3Day 7Day 14Day 30*Adhatoda* alone (800 mg kg^−1^ body weight)3.30 ± 0.073.36 ± 0.043.20 ± 0.083.41 ± 0.103.46 ± 0.12Radiation (8 Gy)4.34 ± 0.03^\*\*\*^5.29 ± 0.12^\*\*\*^7.04 ± 0.10^\*\*\*^6.80 ± 0.04^\*\*\*^No survival*Adhatoda* + radiation (800 mg kg^−1^ body weight + 8 Gy)3.34 ± 0.13^\*\*\*^4.81 ± 0.20^\*\*\*^5.25 ± 0.08^\*\*\*^3.50 ± 0.10^\*\*\*^3.75 ± 0.12[^20][^21][^22][^23]

Discussion
==========

Our results confirm the contention of earlier reports ([@B26]--[@B30]) that irradiation-induced cell death may be a result of accumulation of free radicals, LPO, disruption in the membranes including cellular, nuclear and organelle, leakage of lysosomal acid phosphatases, changes in the surface properties of chromosomes leading to stickiness, breakage of double-strands of DNA and chromosomal aberrations. We were able to clearly document that the extracts of *A. vasica* significantly restore the glutathione level in the liver, and LPO; acid phosphatase and alkaline phosphatase in testis of mice exposed to irradiation. Furthermore, we observed that the extracts of *A. vasica*, reduced the stickiness of chromosomes and the chromosomal aberrations induced by radiation. Such a profound effect is observed just after 15 day treatment of *A. vasica* extract. There is no doubt that the prolonged treatment would yield much improved results. Obviously, the significant increase in increased survival in *A. vasica*-fed mice could be due to the antioxidant property of *A. vasica*, as evidenced by restoration of glutathione and LPO levels. Restoration of acid phosphatase level points out the role of the extracts of *A. vasica* in promoting the stability of cellular, nuclear and organelle membranes. The phytochemical that is responsible for the observed effects of *A. vasica* is far from clear although the extracts contain several alkaloids such as vasicine, vasicinone and a quinazoline-alkaloid, peganin ([@B31]--[@B36]). There is a need to test these individual alkaloids for their ability to protect radiation-induced accumulation of free radicals, membrane damage and double-strand breakage. Our future goal is to characterize the relative role of these alkaloids in radioprotection.

We thank Dana Ollestad for preparing the photomicrographs and Pooja Selvan for her assistance with the preparation of manuscript.

[^1]: Values are depicted as Mean ± SD.

[^2]: Significance level: ^\*^*P* \< 0.05; ^\*\*^*P* \< 0.01; ^\*\*\*^*P* \< 0.001.

[^3]: Statistical comparison: *Adhatoda* versus normal (DDW); radiation versus normal (DDW); *Adhatoda* + radiation versus radiation.

[^4]: Values are depicted as Mean ± SD.

[^5]: Normal (DDW): 93.20 ± 1.62.

[^6]: Significance level: ^\*^*P* \< 0.05; ^\*\*^*P* \< 0.01; ^\*\*\*^*P* \< 0.001.

[^7]: Statistical comparison: *Adhatoda* versus normal (DDW); radiation versus normal (DDW); *Adhatoda* + radiation versus radiation.

[^8]: Values are depicted as Mean ± SD.

[^9]: Normal (DDW): 3.69 ± 0.16.

[^10]: Significance level: ^\*^*P* \< 0.05; ^\*\*^*P* \< 0.01; ^\*\*\*^*P* \< 0.001.

[^11]: Statistical comparison: *Adhatoda* versus normal (DDW); radiation versus normal (DDW); A*dhatoda* + radiation versus radiation.

[^12]: Values are depicted as Mean ± SD.

[^13]: Normal (DDW): 1.65 ± 0.24.

[^14]: Significance level: ^\*^*P* \< 0.05; ^\*\*^*P* \< 0.01; ^\*\*\*^*P* \< 0.001.

[^15]: Statistical comparison: *Adhatoda* versus normal (DDW); radiation versus normal (DDW); *Adhatoda* + radiation versus radiation.

[^16]: Values are depicted as Mean ± SD.

[^17]: Normal value: 5.40 ± 0.32.

[^18]: Significance level: ^\*^*P* \< 0.05; ^\*\*^*P* \< 0.01; ^\*\*\*^*P* \< 0.001.

[^19]: Statistical comparison: *Adhatoda* versus normal (DDW); radiation versus normal (DDW); *Adhatoda* + radiation versus radiation.

[^20]: Values are depicted as Mean ± SD.

[^21]: Normal value: 3.41 ± 0.04.

[^22]: Significance level: ^\*^*P* \< 0.05; ^\*\*^*P* \< 0.01; ^\*\*\*^*P* \< 0.001.

[^23]: Statistical comparison: *Adhatoda* versus normal (DDW); radiation versus normal (DDW); *Adhatoda* + radiation versus radiation.


Bioproduction of D-Tagatose from D-Galactose Using Phosphoglucose Isomerase from Pseudomonas aeruginosa PAO1.
Pseudomonas aeruginosa PAO1 phosphoglucose isomerase was purified as an active soluble form by a single-step purification using Ni-NTA chromatography that showed homogeneity on SDS-PAGE with molecular mass ∼62 kDa. The optimum temperature and pH for the maximum isomerization activity with D-galactose were 60 °C and 7.0, respectively. Generally, sugar phosphate isomerases show metal-independent activity but PA-PGI exhibited metal-dependent isomerization activity with aldosugars and optimally catalyzed the D-galactose isomerization in the presence of 1.0 mM MnCl2. The apparent Km and Vmax for D-galactose under standardized conditions were calculated to be 1029 mM (±31.30 with S.E.) and 5.95 U/mg (±0.9 with S.E.), respectively. Equilibrium reached after 180 min with production of 567.51 μM D-tagatose from 1000 mM of D-galactose. Though, the bioconversion ratio is low but it can be increased by immobilization and enzyme engineering. Although various L-arabinose isomerases have been characterized for bioproduction of D-tagatose, P. aeruginosa glucose phosphate isomerase is distinguished from the other L-arabinose isomerases by its optimal temperature (60 °C) for D-tagatose production being mesophilic bacteria, making it an alternate choice for bulk production.


Post navigation

Cinderella Story: Make a Princess Dress

This winter, I posted a sneak peek of a Cinderella dress created by local high school junior, Vicky Gebert. The dress was constructed of bubble wrap, trashcan liners, drinking straws, t-shirt bags, forks, blue cellophane lace, Styrofoam, and chicken wire. It looked utterly amazing.

Vicky’s dress was the centerpiece of a Cinderella Story: Make a Princess Dress program our library hosted last weekend. Kids were invited to channel their inner godmothers and create a dress out of art supplies (including supplies you might not immediately consider when planning a grand night out).

If you can’t wait to see some of the creative dresses, scroll past the instructions and let the fashion show begin. Otherwise, here are instructions for building your own princess dress!

For the dress base, you’ll need:

A 11″ x 28″ piece of poster board for the bodice

A 4″ x 28″ pieces of poster board for the skirt sash

4′ piece of ribbon for the bodice

2′ piece of ribbon for the skirt sash

2, 20″ pieces of tulle ribbon for shoulder straps

Scissors

Hole punch

I used black poster board to make the example dress (it shows up better in photos), but for the actual program, the bodice and skirt sash were made of white poster board. Definitely use the thicker variety of poster board (i.e. 6-ply) because it’ll hold up to all the art supplies you’ll be adding later. I also used 3/8″ white ribbon. It was easier to lace that particular width of ribbon through the punched holes without tearing the poster board. The tulle ribbon I used was 3″ wide to allow easier threading as well.

The Nearly New Shop, a local thrift and consignment store, was kind enough to loan us a dress mannequin for the program. It really helped to have the dress base on display so grown-ups could see what the final product should look like.

OK, ready to get started? First, wrap the largest piece of poster board around your upper body until both ends almost touch behind your back. Trim with scissors if the bodice is too long, cuts into your armpits, or if you want to create an unusual neckline.

Use a hole punch to make 5 matching pairs of holes down the back of the bodice
(our holes are marked with white rings in the photo so you can see them better).

Starting at the top of the bodice, lace the 4’ piece of ribbon through the holes. Tie
a bow at the bottom.

Next, wrap the smaller piece of poster board around your waist until both ends almost touch. Use the hole punch to create 2 pairs of holes.

Lace the 2’ piece of ribbon through the holes. Tie a bow.

Lastly, your shoulder straps! Slip on the bodice and adjust it to the right height on your chest. Punch a hole in the front of your bodice, directly underneath your shoulder. Punch a matching hole in the back. Thread a 20″ piece of tulle ribbon through the hole in the front and knot securely. Pull the tulle ribbon over your shoulder and thread through the hole in the back. Knot tightly and cut off any excess. Repeat on the other side. The finished straps should look like this:

Your dress base is complete!

Now that you know your dress fits, I recommend unlacing the bodice and the skirt sash and laying them flat for decorating. This is especially useful for the skirt sash. It’s easier to make a huge fluffy skirt on a flat surface than a curved surface.


OUR SUSTAINABILITY POLICY

GREEN ENERGY PRODUCTION

A large part of the energy we consume is green energy that we generate ourselves. To that end, we use solar panels and a windmill on our site in Roeselare.

SUSTAINABLE MOBILITY

We continuously aim to reduce our impact on the traffic and the neighbourhood. We do so by avoiding transport by road wherever possible. For example, raw materials for casing soil are maximally transported by ship.

SUSTAINABILITY IS IN THE DNA OF OUR COMPANY

Sustainability runs like a red thread through everything that we do. First of all, by our activity in itself. After all, we do make a product on the basis of residues from agriculture or the food industry that are difficult to process.
That is not the end of it: in all parts of our production process we always look for the most ecological solution.

Biofilter

We strive to create a pleasant environment around our company. To that end, we make quite some effort to limit noise or odour nuisance for the neighbours?

The most eye-catching example of this is the biofilter on our site. It is the largest one in Belgium!

REDUCE WASTE STREAMS

Reducing our waste streams is an important point of our sustainability policy. All our compost is delivered in bulk.

We also consult our suppliers to discuss how we can reduce waste streams together. For example, supplementary feed is always delivered to us in bulk, whereas the mushroom spawn is delivered on reusable stainless steel racks.

RATIONAL WATER USE

Producing compost requires a lot of water. That is why we reuse as much rainwater as possible. We collect this ‘free’ water over the entire area of our company premises and buildings. What if our rainwater reserves run out? Then we use pure surface water from the Roeselare-Leie canal. We do not touch any groundwater.

We produce excellent and consistent mushroom compost with respect for people and the environment. At Sterckx, it is all about quality and flexibility.


Q:

Summation of consecutive whole numbers with the reduction $a+b+ab$

I recently came across this problem, where you start with $n$ consecutive whole numbers; $1, 2, 3, \cdots, n$ which are arranged in any random sequence. They are then consecutively reduced* with the formula:
$$ a = a + b + ab $$
What will the the last term after reduction of all $n$ numbers is done. The answer comes out to be $(n+1)! - 1$. However, I am unable to prove the same result.
After initial reductions, I think I have to prove that
$$ \sum{n} + \sum_{1 \le i \le n}{\prod_{i \lt j \le n}{i \cdot j}} + \sum_{1 \le i \le n}{\prod_{i \lt j \le n \\ j \lt k \le n }{i \cdot j \cdot k}} + ... + n! = (n+1)! - 1 $$
but am stumped at this stage.

* Reduction is explained as follows
Remove 2 consecutive values from left ($a$ and $b$) of sequence and
  replace them with the newly computed value. After following the step
  $n - 1$ number of times, only one value will be left.

A:

We can define an operation $\bigotimes$ by $a \bigotimes b=a+b+ab=(a+1)(b+1)-1$. It is commutative and associative, so regardless of the permutation and order you choose to do reductions your reduction leaves the number $1 \bigotimes 2 \bigotimes 3 \ldots \bigotimes n=(n+1)!-1$


#Well Package input for test simulation 2
10        53                 MXACTW IWELCB
10         0                 ITMP NP -- Stress Period   1
         1         6         4     -2.00
         1         6         5     -2.00
         1         7         4     -2.00
         1         7         5     -2.00
         1         8         4     -2.00
         1         8         5     -2.00
         1         9         4     -2.00
         1         9         5     -2.00
         1        10         4     -2.00
         1        10         5     -2.00
10          0                 ITMP NP -- Stress Period   2
         1         6         4     -2.00
         1         6         5     -2.00
         1         7         4     -2.00
         1         7         5     -2.00
         1         8         4     -2.00
         1         8         5     -2.00
         1         9         4     -2.00
         1         9         5     -2.00
         1        10         4     -2.00
         1        10         5     -2.00
10         0                 ITMP NP -- Stress Period   3
         1         6         4     -1.00
         1         6         5     -1.00
         1         7         4     -1.00
         1         7         5     -1.00
         1         8         4     -1.00
         1         8         5     -1.00
         1         9         4     -1.00
         1         9         5     -1.00
         1        10         4     -1.00
         1        10         5     -1.00
10          0                 ITMP NP -- Stress Period   4
         1         6         4     -1.00
         1         6         5     -1.00
         1         7         4     -1.00
         1         7         5     -1.00
         1         8         4     -1.00
         1         8         5     -1.00
         1         9         4     -1.00
         1         9         5     -1.00
         1        10         4     -1.00
         1        10         5     -1.00
10         0                 ITMP NP -- Stress Period   5
         1         6         4     -3.00
         1         6         5     -3.00
         1         7         4     -3.00
         1         7         5     -3.00
         1         8         4     -3.00
         1         8         5     -3.00
         1         9         4     -3.00
         1         9         5     -3.00
         1        10         4     -3.00
         1        10         5     -3.00
0          0                 ITMP NP -- Stress Period   6
10         0                 ITMP NP -- Stress Period   7
         1         6         4     -2.00
         1         6         5     -2.00
         1         7         4     -2.00
         1         7         5     -2.00
         1         8         4     -2.00
         1         8         5     -2.00
         1         9         4     -2.00
         1         9         5     -2.00
         1        10         4     -2.00
         1        10         5     -2.00
0          0                 ITMP NP -- Stress Period   8
10         0                 ITMP NP -- Stress Period   9
         1         6         4     -1.00
         1         6         5     -1.00
         1         7         4     -1.00
         1         7         5     -1.00
         1         8         4     -1.00
         1         8         5     -1.00
         1         9         4     -1.00
         1         9         5     -1.00
         1        10         4     -1.00
         1        10         5     -1.00
0          0                 ITMP NP -- Stress Period  10
10         0                 ITMP NP -- Stress Period  11
         1         6         4     -3.00
         1         6         5     -3.00
         1         7         4     -3.00
         1         7         5     -3.00
         1         8         4     -3.00
         1         8         5     -3.00
         1         9         4     -3.00
         1         9         5     -3.00
         1        10         4     -3.00
         1        10         5     -3.00
0          0                 ITMP NP -- Stress Period  12


Q:

iOS : Error when I read a video from Google Drive a certain amount of times

When I read videos in my iOS application which it uses the Google Drive API, at a certain time of reading a video, I have this error : Error Domain=com.google.HTTPStatus Code=403 "(null)"
And I can read the other videos until a certain amount of times, when I still have this error.
Here is my code :
if ([file.mimeType isEqualToString:@"video/quicktime"])
{

    GTMHTTPFetcher *fetcher = [service.fetcherService fetcherWithURLString:file.downloadUrl];

    [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
        if (error == nil) {
            NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
            NSString* accessToken = [userDefaults objectForKey:@"accessToken"];
            player = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@&access_token=%@",file.downloadUrl,accessToken]]];
            [[player view] setFrame:CGRectMake(self.view.frame.size.width/2-150, self.navigationController.navigationBar.frame.size.height+30, 300, 400)];
            player.contentURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@&access_token=%@",file.downloadUrl,accessToken]];
            [player setContentURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@&access_token=%@",file.downloadUrl,accessToken]]];
            [player setMovieSourceType:MPMovieSourceTypeFile];

            player.scalingMode = MPMovieScalingModeNone;
            player.controlStyle = MPMovieControlStyleDefault;
            player.backgroundView.backgroundColor = [UIColor whiteColor];
            player.repeatMode = MPMovieRepeatModeNone;

            [self.view addSubview: [player view]];
            [player play];

        } else {
            NSLog(@"An error occurred: %@", error);
        }
    }];
}

Is it a cause of the amount of data downloaded ? Did I forget anything to enable or disable ?

A:

I don't use GTMHTTPFetcher but If your problem is about HTTPStatus Code=403 , it's forbidden to access the service. So you can't do anything in this case. You should show a message to user when they try to reach forbidden video.
You can check the statusCode
if(HTTPStatusCode == 403){
   //Show an alertView to user
}

or you should control video which has permissions. Otherwise your app will crash.
More info about HTTP status code 403
Checking other status code will clear your application.
Status are so important to fetch data. If something went wrong you should check it.


Both endothelin-A and endothelin-B receptors are present on adult rat cardiac ventricular myocytes.
Endothelin-A (ET(A)) and endothelin-B (ET(B)) receptors have been demonstrated in intact heart and cardiac membranes. ET(A) receptors have been demonstrated on adult ventricular myocytes. The aim of the present study was to determine the presence of ET(B) and the relative contribution of this receptor subtype to total endothelin-1 (ET-1) binding on adult ventricular myocytes. Saturation binding experiments indicated that ET-1 bound to a single population of receptors (Kd = 0.52 +/- 0.13 nM, n = 4) with an apparent maximum binding (Bmax) of 2.10 +/- 0.25 sites (x 10(5))/cell (n = 4). Competition experiments using 40 pM [125I]ET-1 and nonradioactive ET-1 revealed a Ki of 660 +/- 71 pM (n = 10) and a Hill coefficient (nH) of 0.99 +/- 0.10 (n = 10). A selective ET(A) antagonist, BQ610, displaced 80% of the bound [125I]ET-1. No displacement was observed by concentrations of an ET(B)-selective antagonist, BQ788, up to 1.0 microM. However, in the presence of 1.0 microM BQ610, BQ788 inhibited the remaining [125I]ET-1 binding. Similarly, in the presence of 1.0 microM BQ788, BQ610 inhibited the remaining specific [125I]ET-1 binding. Binding of an ET(B1)-selective agonist, [125I]IRL-1620, confirmed the presence of ET(B). ET(B) bound to ET-1 irreversibly, whereas binding to ET(A) demonstrated both reversible and irreversible components, and BQ610 and BQ788 bound reversibly. Reducing the incubation temperature to 0 degrees C did not alter the irreversible component of ET-1 binding. Hence, both ET(A) and ET(B) receptors are present on intact adult rat ventricular myocytes, and the ratio of ET(A):ET(B) binding sites is 4:1. Both receptor subtypes bind to ET-1 by a two-step association involving the formation of a tight receptor-ligand complex; however, the kinetics of ET-1 binding to ET(A) versus ET(B) differ.


Q:

IIS7: Set expires header on favicon

I know how to set expires headers for whole directories, but how do I set an expires header for an individual file - e.g. the favicon.ico file in the root directory?

A:

It appears that you need to use a custom developed HttpModule to do this.  Here is a similar question from StackOverflow about this.  It doesn't look like there is anything built in.
IIS7: Setting far future expires header on specific files


Brick & Spoon is changing the game of breakfast by attracting students and residents of Oxford with their Cajun-inspired menu.

Owners Kayla and Darren Stafford opened the brunch restaurant in August 2018 with the hope that it would offer a different style of food to breakfast-lovers in Oxford.

With her background in marketing and the help of her husband and family, Kayla prepared herself for the endeavor of opening a restaurant in a town of foodies—a challenge that most would not accept.

Kayla said that her vision for the franchise began as a fast-casual option, but she is in the process of transitioning the restaurant into a higher-end experience of breakfast dining that’s unlike anything else in Oxford.

Kayla said Brick & Spoon competes with other breakfast and brunch restaurants through their intriguing dishes. The restaurant offers unique choices that seems to create great appeal to those in town. Conor Smith, student at the University of Mississippi, said he feels like Brick & Spoon has been successful in their efforts.

“The Crab Cake Benny was extremely satisfying. It was a great combination between seafood and breakfast that you cannot find most other places,” Smith said. “Money well spent.”

Brick & Spoon is famous for its bloody marys. Photo from Brick & Spoon’s Facebook.

What attracts the majority of customers to Brick & Spoon, however, is the enticing and extensive drink menu. One of the most popular items on the drink menu is the customizable bloody mary. Beverage connoisseurs can see the popularity as the cashiers keep a running tally of the amount of Bloody Mary drinks sold. Since opening, the restaurant has already sold more than 500.

“The bloody marys were pre-existing in the franchise but they’re something we were able to individualize and make our own to cater to what the community wants,” Kayla said.

When customers walk in the front door they are greeted by a large, yellow sign that holds an abundance of options to customize their very own drink. These options include things to add a creative twist, such as: skewers of smoked sausage, blue cheese stuffed olives, and Tasso deviled eggs. The unlimited number of combinations offer those who crave breakfast with booze the ability to create something new to taste every time.

A large sign with all Brick & Spoon’s Bloody Mary possibilities greets patrons as they walk in the restaurant. Photo by Meagan Sanders.

Kayla said that opening Brick & Spoon has been a learning experience but she hopes that in the next couple of months they can work out the kinks and begin establishing their success in the restaurant industry.


Q:

Converting an array of uint8_t to a char array

I'm trying to convert this array uint8_t data[] in the code below to a character array to be printed in the serial monitor. However, when I run this code I see a blank screen. What am I doing wrong?
Serial.begin(115200);
uint8_t data[] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x00,0x01,0x02,0x03,0x04,0x05};
Serial.println((char*)data);

A:

When you cast as char *, println thinks you are passing it a string. It will try to print it as a string and stop on the first 0x00.
You can use Serial.write to send the array as integers (no conversion):
Serial.write(data, sizeof(data));

If you want to send the ASCII representation of these numbers, use a loop. Serial.print will convert:
int count = sizeof(data) / sizeof(data[0]);
for (int i = 0; i < count; i++) {
    Serial.print(data[i]);
}
Serial.println();


Beckwith Boathouse

The P. Sue Beckwith, M.D., Boathouse, or simply Beckwith Boathouse, is an athletic facility at the University of Iowa. The building primarily serves the university's women's rowing team. The university's men's rowing team also uses the facility, along with the Hawkeye Community Rowing Program and the Old Capitol Rowing Club.  It was a joint project of the City of Iowa City, the Athletics Department and Recreational Services of the University of Iowa.  designed by Iowa-based Neumann Monson Architects. Groundbreaking took place on March 12, 2008. The boathouse was dedicated on September 18, 2009.   The Boathouse project cost US$7.2 million and includes... a terrace, training area, locker room, meeting room, storage space, easy access to the Iowa River, and a UI College of Engineering-designed indoor rowing tank. It's also the first UI building designed to meet the standards for the U.S. Green Building Council's Leadership in Energy and Environmental Design certification.

P. Sue Beckwith
P. Sue Beckwith is a former alumni of the University of Iowa.  She obtained a bachelor's of science degree in psychology in 1980 and completed her doctor of medicine degree in 1984. Following a fellowship in colon and rectal surgery at the Mayo Graduate School of Medicine in Rochester, Minnesota she returned to Des Moines to run a successful surgical practice. Beckwith when younger was a basketballer and began rowing later in life. The lack of rowing facilities for student athletes resulted in her lead pledging US$1 million towards the building of a new boathouse which was named in her honour.

Hawkeye Community Rowing Program
The program is open to citizens of Iowa City and surrounding areas. It includes sessions for beginners and advanced for high schools and adults. It includes adaptive rowing for those with disabilities both physical and intellectual.

References

Category:University of Iowa campus
Category:Boathouses in the United States
Category:Buildings and structures completed in 2009
Category:2009 establishments in Iowa


Q:

Sticky header scrolls away after some scrolling on bootstrap V4.4.1

I'm trying to make this card with a sticky top and sticky bottom since they show some info and inputs that I would like to be always shown. The problem is that after scrolling some of the content inside, the top goes away and I don't want that.
I found out that the problem goes away after removing the card-footer or styling the card height on auto. The thing is that where I want to position if the screen size is large enough needs a specific height. Also can't remove the footer because It has content.
I've tried moving the sticky's outside the card-body but then on mobile they would be lost in the scrolled away kingdom...
The answers I've found on other questions weren't very helpful since many are for sticky footers and aren't trying to put the sticky inside a bootstrap card

.sticky-top {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 30px;
  background: red
}

.sticky-bottom {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  height: 30px;
  background: lightblue;
}

.the-problem {
  height: 30px
}

.content {
  height: 600px;
  background: gray
}

#thing {
  height: 200px;
  width: 300px;
  overflow: auto;
}

#thing {
  width: 300px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" />
<form id="thing" class="card mt-3">

An unimportant title

      sticky-top

 Some content

      sticky-bottom

</form>

<form id="thing2" class="card mt-3">

An unimportant title

      sticky-top

 Some content

      sticky-bottom

</form>

A:

2 changes needed...

commented the div under the sticky footer... so that footer is nice and sticky to the bottom
separated the <form> and .card class, so that the fixed height is not on the .card div element... this is because the stickiness goes away if the parent has a fixed height - which we needed for <form> and this fixed height is still on the <form>

Working snippet below:

.sticky-top {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 30px;
  background: red
}

.sticky-bottom {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  height: 30px;
  background: lightblue;
}

.the-problem {
  height: 30px
}

.content {
  /* height: 600px; */
  background: gray
}

#thing {
  height: 200px;
  width: 300px;
  overflow: auto;
}

#thing {
  width: 300px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" />
<form id="thing">

An unimportant title

        sticky-top

 let the actual content occupy the eeded space...
 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
        laborum.

        sticky-bottom

</form>


Q:

strategy to follow when a file is relevant to two different commits

I have a file that I am about to commit to my repo, but it is relevant to two different commits.
It is a PHP that produces the class name that some css files use. So I want to commit all of them at the same time, but if I do that, I won't have a chance to specify the bugfix I made in the PHP file that outputs the class names.
On the other hand, if I do two separated commits so I can specify all the history properly for each commit, if in the future I checkout the commit where I made changes to the CSS, that commit won't work as the correct PHP won't be available, so I (or any other developer) will have to be go two steps back (one for the css files, another for the php bugfixed) in the branch for the whole thing to work.
What is the most adequate strategy in this scenario?

A:

To me, it sounds like you want to squash those commits together so that they are merged as one commit.  It doesn't sound like it's ideal, but with a squash you can keep the separate commit message history for each commit being squashed, but it will be in one commit.
Here is some awesome documentation on using git rebase -i which can perform squash.


import torch
from termcolor import cprint, colored as c

def num_flat_features(x):
    size = x.size()[1:]  # all dimensions except the batch dimension
    num_features = 1
    for s in size:
        num_features *= s
    return num_features

def forward_tracer(self, input, output):
    cprint(c("--> " + self.__class__.__name__, 'red') + " ===forward==> ")
    # print('')
    # print('input: ', type(input))
    # print('input[0]: ', type(input[0]))
    # print('output: ', type(output))
    # print('')
    # print('input size:', input[0].size())
    # print('output size:', output.data.size())
    # print('output norm:', output.data.norm())

def backward_tracer(self, input, output):
    cprint(c("--> " + self.__class__.__name__, 'red') + " ===backward==> ")

CHARS = "\x00 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890.,;:?\"'\n\r\t~!@#$%^&*()-=_+<>{}[]|\\`~\xa0"
CHAR_DICT = {ch: i for i, ch in enumerate(CHARS)}

class Char2Vec():
    def __init__(self, size=None, chars=None):
        if chars is None:
            self.chars = CHARS
        else:
            self.chars = chars
        self.char_dict = {ch: i for i, ch in enumerate(CHARS)}
        if size:
            self.size = size
        else:
            self.size = len(CHARS)

    def one_hot(self, source):
        y = torch.LongTensor([[self.char_dict[char]] for char in source])

        y_onehot = torch.zeros(len(source), self.size)
        y_onehot.scatter_(1, y, 1)

        return y_onehot

    def char_code(self, source):
        return torch.LongTensor([self.char_dict[char] for char in source])

    def vec2str(self, vec):
        chars = [self.chars[ind] for ind in vec.cpu().data.numpy()]
        return ''.join(chars)

if __name__ == "__main__":
    # test
    print(Char2Vec(65).one_hot("B"))
    encoded = list(map(Char2Vec(65).one_hot, "Mary has a little lamb."))
    print(encoded)


Wednesday, February 29, 2012

I need to finish off some work for the beta release of Dart for Hipsters, but first must honor the gods of my chain, who have been so very good to me, with a (hopefully) brief link in the chain...

Because I love testing, have included a chapter on testing in Dart for Hipsters. This would not normally be that much of a stretch, but in a bleeding edge language like Dart, the testing harness is only available in the "bleeding_edge" branch. Now that's bleeding edge.

Surprisingly, this bleeding edge bleeding edge testing harness works fairly well and includes some worthwhile features. What it does not include is a test coverage tool even though it has a tab for it:

And indeed, the getCoverageSummary method is nowhere to be found in either the darttest or unittest paths. I eventually find it, not it bleeding_edge/dart/client/testing, but in bleeding_edge/dart/compiler/lib.

With that, I get something in the tab, but it is zero test coverage despite the fact that I do have some coverage:

After looking through some of the code in compiler/coverage.dart, I begin to suspect that this code simply holds coverage information, but does not actually perform the tracking (perhaps the compiler does this). In fact, back in my test code, I can use a couple of the methods to set the expected number of function calls, and pretend that I made that call:

I have already warned readers that the testing chapter is bleeding edge, so I don't think it will come as a shock to them that the Coverage tab is not ready yet. Nevertheless, I am still excited enough by Dart testing to retain the chapter.

Tuesday, February 28, 2012

One of the cool things about working through a brand new language like Dart is happening across weird little nooks and crannies of the language specification. One such example is the call operator which seems to be a way to get objects to behave like functions. Or I could be misreading the spec, I have a hard time with that kind of thing.

My best guess is that I can define an operator named call() to set this up, so I will try this out with my Hipster MVC framework. For now, I will make it an alias for save() on the HipsterModel class.

I have already defined other operator methods in Dart. In the HipsterModel, for instance, I have the square brackets operator that allows developers to lookup attributes in models as if the model were a Map (e.g. comic_book['title']). This is defined using the operator keyword:

Sigh. Re-reading the spec again, it really seems as though it ought to be call(). Perhaps it is not yet supported? I try a dummy operator to see if the message is the same, and indeed, "invalid operator overloading" seems to mean that the token is not an operator:

I try the latest version of Dartium only to find the same thing. Grr...

It is at this point that I finally stumble across a description of how call()will work in Dart. At the very top, it states that this is brand new and not implemented yet. Darn it. On the bright-side, it does seem that my understanding of how it will work is correct.

Regardless, I refuse to give up until I have done something tonight, no matter how ridiculous. So I overload the pipe operator for HispterModel so that it saves itself and pipes the response into the supplied callback:

Monday, February 27, 2012

While writing the dynamic behaviors chapter in Dart for Hipsters, it occurred to me that I had skipped right over the noSuchMethod() method in my exploration of Dart. So tonight I revisit my Hipster MVC library to see if I can vary between local a remote storage with noSuchMethod().

I have yet to even try noSuchMethod(), but my guess is that it serves the same purpose as method_missing() in Ruby. That is, if a method is not explicitly defined in a class or any of its super classes, then noSuchMethod() should be invoked with the name of the method and the list of arguments. Furthermore, as a method on Object, it should be inherited by all classes. Then again, I could be completely off-base.

I glossed over the topic in Dart for Hipsters, but left the following psuedo-code as placeholder:

It works in the sense that I do not see my NoSuchMethodException. It also works in the sense that _defaultSave() is invoked. Those two small victories mean that my understanding of noSuchMethod() is more or less correct—it is invoked if Dart is otherwise unable to resolve the requested method.

Things go awry inside the on.load event listener. After the record is saved via XHR, the event listener attempts to invoke the optional callback, with less than ideal results:

What does Dart do with the optional label (callback in this case)? Since the result is a List, I can only assume that it ignores the optional parameter label, so I grab the first argument in noSuchMethod() and use that as the optional callback parameter to _defaultSave():

Since useLocal() is hard-coded to true, I give it a try and, indeed, I am storing locally:

I am now well-armed to write the noSuchMethod() section. That said, the current usefulness is limited to methods with fixed arity. Optional parameters in Dart boast that position does not matter: new Comics(el: '#comics', collection: my_comics) is the same as new Comics(collection: my_comics, el: '#comics'). This would definitely not be the case with dynamic methods implemented by noSuchMethod. Whether this is by design to limit dynamic methods or if a newer implementation is on the way, I cannot say. But I will have to find out for the book...

Sunday, February 26, 2012

While writing the Events chapter in Dart for Hipsters, I got to thinking about the square brackets operator for the Element#on getter. I know that it works for the existing events, such as click events:

Saturday, February 25, 2012

Yesterday, I began exploring type checking in Dart by running my test suite in checked mode (starting Dartium with --enable_type_checks). It did not have quite the effect that I expected and I cannot say that it improved my test suite. So today, am going to have a type-checked look at some of my code that is not yet tested. Perhaps type checking will prove of more use there.

So I load up my application in test mode and... it still works:

When I try to delete one of those test comic books, however, I get a big old stack trace:

Dart has a funny view of truthiness—everything but the boolean true is false. So even if my collection is non-null, the above will always return an empty string. So, yay! Type checking found a bug. I address it by explicitly comparing to null:

This turns out to be a bit more subtle. When an instance of AddComicForm is created, I am not assigning the optional el parameter in the constructor. Thus el is null, which is not an Element, resulting in a document.query() of null. Since document.query() expects a String, I am now getting a type checking error.

In this particular case, it is not a bug because AddComicForm overrides post_initialize to create this.el. Thus, any other view operations will succeed because this.el is defined. But that is only true for this particular class. If someone else created a view with no el, there would be errors. What I really need is something like Backbone.js's ensureElement. I will worry about that another day. For now, I make the this.el assigment conditional on el being supplied and I assert that this.el has been defined after post_initialize:

With the post_initialize() method in place, I am again able to bring up the add-new-comic form:

Everything else seems to work. I can again add, delete and view my comics collection—even in type checking mode.

The type checking option seemed more of an annoyance with testing than a help, but it definitely seems to help when actually coding. Without it, I had allowed at least one bug to get into my Hipster MVC framework along some questionable choices. It seems that coding in type checking mode is good advice—even if most users will run in regular mode.

Friday, February 24, 2012

An intriguing feature of Dart is the ability to run the VM in checked mode. As I have coded Dart for the past couple of months, I have noticed a certain... looseness in its enforcement of types. It is not just that I avoided declaring any type information for the better part of the first month that I coded in Dart. I have also noticed that Dart is perfectly willing to let me declare a variable as one thing, but assign something else entirely to it.

I have come to regard types in Dart as little more than documentation. To be sure, it is very useful documentation, but since types are not enforced (as best I can tell), I can code very like I am used to in dynamic languages like Ruby and Javascript.

There are times, though, that it bothers me knowing that I could be missing out on bugs that loose typing might be allowing. That was part of the motivation of getting comfortable with testing these last couple of days, but still... I should not be able to assign a list of Maps:

But I cannot add a Map to List<HipsterModel> models instance variable. I do not quite understand this, but I do know how to resolve the failure. I need to import HispterModel into the test suite so that I can create a dummy sub-class:

I don't know that I have really gained much through this exercise of typed checking testing. If anything, I was closer to using mocks in a situation in which it was fine to do so. I think tomorrow I will explore more of the code to see if there are any other potential benefits to this type checking stuff.

Thursday, February 23, 2012

Today, I continue exploring unit testing in Dart. I am using the bleeding edge in-browser testing suite, which has worked fairly well so far. It seems as though it is meant to be run right on top of the live application, which could be interesting—add a <script> tag and see the test suite results overlayed on the application.

I have tested most of the Collection aspects of the HipsterCollection class from my Hipster MVC framework. Tonight I hope to cover the Ajax features. First up, the fetch() method. I am not sure how to go about doing this, so I start by verifying that calling fetch() directly on the base class fails (a sub-class needs to define url()):

That test.json file exists. Even if I load it in the test page via script tag, I still get a CORS violation.

I deal with with the same thing when I use Jasmine to test JS applications, but at least with those I can use libraries like sinon.js to fake XHR responses. I cannot do that in Dart without somehow telling my MVC library to use a different XHR object. Luckily, I can do just that.

Based on Backbone.sync, the HipsterSync class allows me to redefine the manner in which storage operations are performed. By default, it uses XHR, but I can swap that out for a no-op:

When I run the test suite now, I see the no-op print() output in the Dart console:

[sync] get / Instance of 'TestHipsterCollection'

And all of my tests are again passing:

They might be passing, but I am not really testing anything other than that the application does not crash. To be sure, there is value in that, but I can do better. The HipsterSync call is an asynchronous callback. Rooting through the bleeding edge test suite, I come across the asyncTest() function. This is not a vows.js-style assertion that a specific callback is invoked. Rather, it provides a mechanism to say that any number of callbacks will be invoked and a way to signify that they were actually called.

In this case, I expect that my sync callback will be invoked once. To verify that it has been called, I invoke callbackDone() inside the sync method:

Actually, that is not so much failing as preventing the suite from completing. That is better than nothing, but it would be preferable to say that, if the proper number of callbacks have not been invoked in a certain amount of time, then the test fails. Something to investigate another day.

Wednesday, February 22, 2012

Having gotten a dummy Dart unit test to pass last night, I try my hand at testing some of the Hipster MVC library code with which I have been playing.

First, I copy the testing directory from dart bleeding edge into my app. Tonight I store the contents of testing, the unittest and darttest sub-directories, under tests/lib in my main application directory:

Tuesday, February 21, 2012

I am somewhat test obsessed. I have been exploring Dart for nearly 2 months and have not even considered testing, which is why I am only somewhat test obsessed. But tonight I can ignore the nagging doubts no longer.

So first, I install subversion (seriously, who still uses subversion?):

sudo apt-get install subversion

Then I can checkout the testing path:

➜ tmp svn co http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/testing/
A testing/unittest
A testing/unittest/shared.dart
A testing/unittest/dom_for_unittest.js
A testing/unittest/unittest.dart
A testing/unittest/coverage_controller.js
A testing/unittest/unittest_vm.dart
A testing/unittest/dom_for_unittest.dart
A testing/unittest/test_controller.js
A testing/unittest/unittest_node.dart
A testing/unittest/unittest_dartest.dart
A testing/dartest
A testing/dartest/dartest.dart
A testing/dartest/css.dart
A testing/dartest/resources
A testing/dartest/resources/expand.png
A testing/dartest/resources/min.png
A testing/dartest/resources/close.png
A testing/dartest/resources/max.png
A testing/dartest/resources/img2base64.py
A testing/dartest/README.txt
Checked out revision 4421.

Lastly, I remove subversion, just on principle:

➜ tmp sudo apt-get remove subversion

It seems as though this is meant to be run in the browser (I would hazard a guess that it needs to be Dartium)—the README mentions an overlay window and the libraries make use of dart:html. So I create a test HTML in the testing directory with a reference to the Dart code being tested:

That resolves the stack trace, but I am not quite sure that it worked. The results overlay seems oddly free of green:

Ah ha! It seems that I need to manually run my test suite by clicking on that play button. When I do so, I see green:

If I intentionally break the test:

test('Test Description',(){
Expect.equals(42, myAddFunc(1,2));
});

Then, when I reload and run my suite again, I see red. I can even click on the failing spec to get a good idea what went wrong:

That is a good stopping point for today. The Coverage tab is not working for me, so I may pick up with that tomorrow. Then again, I am eager to see how this plays with live code, so I may ignore the Coverage tab for a little while longer.

Monday, February 20, 2012

Up tonight, hopefully a quick exploration of iterators in Dart. Iterators are the mechanism in Dart that allow any object to be used in a for-in block. I do not necessarily think that my ImageCarousel class needs an iterator to do its thing, but it is the most recent collection-like thing that I have to play with, so...

First up, I define the carousel as extending Iterable:

class ImageCarousel implements Iterable {
// ...
}

To actually implement Iterable, I need to define an iterable() method:

I am really coming around to the this.XXX constructor parameter format in Dart. It is a crazy easy way to say that the first argument passed to the constructor (in this case an instance of ImageCarousel from its iterator() method), should be assigned to the imageCarousel instance variable. In addition to assigning the instance variable, I also initialize the position of the iterator to -1 so that the next element will be the zeroeth of the array in ImageCarousel (ah, Array indexing).

Next, I define the hasNext() boolean function. That is easy enough—as long as _pos is before the last index in the array, there is a next element to be returned:

I am also starting to really dig the hash-rocket short hand for function and method bodies—I can skip the return keyword and the curly braces (win, win). Because arrays start at zero, the lastIndex of an array is the length minus 1. I define a getter for this solely to make the hasNext() function easier to read.

Last up, I implement the next() method, which return the element at _pos as well as increments _pos for the next time through. I also have to throw an exception if next() has navigated past the bounds of the object being iterated:

Sunday, February 19, 2012

Last night, I was able to get my Dart-based image carousel more or less working:

When the image on the right appears, it immediately covers the image that used to be there before it has a chance to rotate. The effect is less than desirable. Part of the problem is that I am starting the carousel at image #3 instead of #4:

The carousel achieves this effect by drawing each face of the carousel one at a time. When the carousel moves to the next image, it moves each image on the carousel. The animation effect comes from the CSS3 transform and translate transitions:

Finally, I have a next() method that rotates things by incrementing the internal _pos counter and telling the carousel to draw itself:

void next() {
_pos++;
draw();
}

Actually starting at #4 instead of #3 helps, but there is still some bleed though of #4 superimposed over #3. To resolve that, I start #4 with zero opacity and give #3 an opacity of 0.8. For good measure, I give #0 an opacity again of zero so that there is no abrupt disappearance when the image is removed. Since the _draw() method returns an Image element, and since the shorthand syntax for _draw0 through _draw4() returns the result on the right-hand side of the hash-rocket (=>) operator, I can apply these opacities in the draw() method like so:

When an image is added in slot #4, it has opacity zero. When it rotates to #3, it is assigned opacity of 0.8, which it retains as it move to #2 and #1. Finally, when it reaches #0, its opcacity is again set to zero where it can be safely removed from the UI.

The effect is much nicer:

After adding a prev() method to my carousel, I swap out the auto-rotating for a rotate by arrow key handler:

Last up tonight, I try compiling this into Javascript using Dart's frogc compiler. It works, but nothing displays, at least not under Firefox version 10. I trace this to frogc's use of -moz-transform-style in the generated JS. If I remove that:

Saturday, February 18, 2012

For the past few days I have been enjoying playing with the concept of an image gallery in Dart. Actually, it is as much playing with experimental CSS3 features as it has been Dart, but regardless, it has been fun.

I had gotten the gallery working to the point that I could move the main image off to the side, shrink and blur it:

The animation was all done with simple CSS3 (well, some of it was really CSS1):

Instead of doing something like that, I would like to make a more realistic carousel. Using CSS3 transform and translate, I ought to be able to make the images rotate about, like a carousel or merry-go-round. So I break things up in to an ImageCarousel class:

I am going to use panels on this carousel of width 250 pixels -- that should yield a carousel that is a little larger than 500 pixel wide, depending on perspective. For perspective, or the distance that the user is from the page, I use 1000 pixels.

I am still using the same transition of 1 second, easing into and out of motion. I "preserve-3d" so that the images do not look flat on the page. And lastly, I rotate the images, depending where on the carousel they happen to be. The actual 3D transform is done with CSS3 transforms. Here, I am rotating the image about the Y axis. The translate along the z-axis (out of the page) is necessary because the images to the left and right of the main image are rotated about the center of the image. That is, it would look as if one edge were sticking out of the page. To get everything looking OK, I have to ensure that the images behave as if they are a certain distance away from the center. The _depth() function is swiped from the very cool Intro to CSS 3D transforms article.

And it works. Kind of:

I need to improve the rotate-in transform so that it does not seem as though it overwrite the previous image, only for the previous image to pop out. Still, this is a pretty good start. I think tomorrow I will take some time to make it a little more Darty.

Friday, February 17, 2012

Today I continue to play with last night's images gallery. I hope to combine a few more animations together, if for no other reason than to see how easy it is in Dart. But first...

I keep coming across the #resource directive in the dart language spec. The spec states that they are used to "include extralinguistic resources (e.g., audio, video or graphics files)", which seems like they might be useful for an image gallery.

I try fiddling with the order a bit, but it seems pretty clear that, even though #resource() is in the spec, it it not yet implemented in Dartium.

Back to my regularly scheduled programming then...

The current gallery combines two animations as it moves through the list of images in the gallery. The two animations are mirrors of each other with the new image fading in while the old one fades out:

Tonight I am going to change the remove animation to shift the image to the right and behind the main image, making it smaller as it goes. I think this ought to be easy, but "ought" is usually the bane of my learning. And by bane, I mean it usually goes wildly wrong and I end up learning something.

Thursday, February 16, 2012

Adam Smith has a very nice canvas-based image gallery written in Dart (may take a while to load) up on the githubs. I am still undecided about including SVG / canvas stuff in Dart for Hipsters, but I do think a chapter on animation is in order. I have already experimented with simple animations in Dart, this seems like a good chance to do something a little more interesting.

The problem? There is no animation. Instead the element displays immediately. Since it is the newly added element, it immediately covers up the old element. After way too much fiddling, I find that a timeout, even of only a couple of milliseconds allows the transition to work:

Wednesday, February 15, 2012

Last night I figured out how to inject shared behavior in Dart. Today I need to use that knowledge to support an injectable sync in my HipsterMVC framework.

First up, I convert yesterday's proof of concept to something resembling what I envision as the final product. The HipsterSync class exposes a setter (sync=) allowing application code to inject behavior, and a method for internal libraries to invoke the appropriate behavior. I start with:

Nice. My proof of concept is closer to being reality. Next, I need to do something real with the default implementation. I remove the injected behavior. Then, back in HipsterSync, I add the Ajax that used to be in HipsterCollection#fetch():

Ah. That _handleOnLoad callback method is defined back in the collection class. I need a mechanism to pass that into HipsterSync. Those options look like a good place to start. In HipsterCollection, pass the on-load callback via an 'onLoad' key:

In here, I have adapted my local storage solution. In order for both local storage and Ajax to submit data to the on-load callback, I had to alter the callback to expect data rather than an event from which the data could be extracted. Once that is done, the injected behavior of local storage is working:

Cool! I can switch back and forth between local storage and the default Ajax implementation by adding and removing the HipsterSync.sync local behavior. I still need to get all of this working with my model class, but hopefully that will prove relatively easy now that I have my collection working properly.

Tuesday, February 14, 2012

At the B'more on Rails meetup tonight, Nick Gauthier, my Recipes with Backbone co-author, included an interesting discussion on frameworks vs. libraries. He pointed out that frameworks generally call user written application code whereas libraries encourage application code to call library code (usually through inheritance). It occurs to me that this is the crux of my recent struggles with my Dart MVC framework—I am having a hell of a time injecting a sync() method for my model and collection classes to call.

I had planned on giving this a miss, but, partly egged on by Nick and partly by comments from Justin Fagnani in last night's post, I am going to try again.

My first attempt tonight focuses on using a global variable to hold this information. I do not expect to stick with a global, but just hope to use it as a proof of concept. First, I establish a "internal" version of a variable that will point to my sync function:

var internal_sync = null;

Then I define an externally facing setter function for the internal version:

var internal_sync = null;
set sync(fn) {
internal_sync = fn;
}

In my framework, internal_sync would have a default Ajax implementation, but the developer could inject different behavior by setting a different function via the external sync= setter.

And this works, to a certain extent. In my main() entry point, I can set sync and invoke the new behavior:

Inside main() I set the sync= setter to a function that prints out an argument and returns a "hip new behavior". I then invoke the function that is now referred to by the internal_sync global variable. And it works. I see the set function being called and I see the "hip new behavior":

[new_sync] Injected, yo
sync: hip new behavior

The problem is that this internal_sync variable is not available inside libraries. For instance, the Collections.Comics.dart library is imported and used in main() after the updated internal_sync is set:

I get similar results if I try to treat this internal_sync as a function.

It is not possible to declare variables before #import() statements in Dart, nor is it possible to include code via #source() before #import(). So, if the problem is that the global is declared too late, then I am out of luck.

I switch tactics at this point. If a global variable will not work, perhaps a class methods will. So I define a HipsterSync class in HipsterSync.dart with a familiar class variable and class setter:

And... that does the trick! In the Dart console, I see the output from main():

[new_sync] Injected, yo
sync: hip new behavior

Followed immediately by the output from the newly set HipsterSync.sync when invoked by the collection's fetch() method:

[new_sync] fetch, yo
[fetch] sync: hip new behavior

It took me a while to figure that out (and much thanks to Justin Fagnani for pointing me in the right direction), but I am finally able to inject model and collection syncing behavior into my MVC framework. Using static methods to set and hold this behavior also ensures that the behavior can be shared between both the collection and model classes. I am excited.


Music Producer & Management(BiG S silverCoins)Music Supervision:Music Conception, Music Budget, Music Clearance & Licensing, Live Music Scenes, Original Music Production, Music Spotting Sessions, Music Editing, Music Cue Sheets, Distributer's Rights Package, and Motion Picture CD Soundtrack. PEMG/BizzyBoyz Artist:'Minnosota Phatz",Born Rasean Tolbert in Jamaica,Queens,NY. To mother Kim Tolbert and deceased father Steven Haynes who was gunned down in a drive bye. When he was at the age of twel
...

Sun, Dec 30, 2012 10:18 AMMany many realtors would like what you have but with PITI. Principal, Interest, Taxes, & Insurance. That would give us the total motlnhy payments which is much more valuable than just the PI, principal & Interest calculator.It should be easy to add on.1. Tax Rate with a Drop Down List from O.1 to 4.0 in .1 increments 0.1, 0.2, 0.3, etc.2. Insurance Yearly Cost, then you divide by 12.

Sat, Dec 29, 2012 7:53 PMhot boy Minnosota Phatz

Sun, Dec 16, 2012 9:45 PMthat album is fire-Tracy NY

Sat, Dec 15, 2012 6:13 PMlikes more india

Tue, Dec 04, 2012 7:37 PMKenya Williams/Brooklyn, NY -Mobbin

Mon, Dec 03, 2012 10:54 AMfire fire Linette Miami

Sun, Dec 02, 2012 4:39 PMTrey8 whenyour next performance? LA

Tue, Nov 27, 2012 5:00 PMLisa>TX 80's Baby

Sun, Nov 25, 2012 6:09 AMLamar,DC Washington- the hook was catchie, the lyrics had great context

Mon, Aug 20, 2012 8:19 PMfreedie mack whatz good, i drop the permits but they from NC in the US/ I started checking flight prices and also network with Hawk of BizzyBoyz Management about the London thang! i will be their regardless! check into the VAT over their! & lease agreements..call u this weekend after i get a calling card! did u get the Minnosota Phatz press kit? i have other artist now!

Sun, Jun 03, 2012 5:50 PMUNIVERSITY CANADA FOR BROADCAST SPINS G9 RESPECT TO PK FINEST! SilverCoins.BIG SHOUT OUT TO MINNOSOTA PHATZ & BIZZYBOYZ KNOW THE BIRTHDAY BASH WAS A SUCCESS! CAN'T "WAIT FOR NO MAN" RELEASE DATE!THANKYOU SONGCAST MUSIC FOR KEEPING US IN THE LIGHT ALSO IN THE MAKING A 2013 STUDIO ALBUM. A HOST OF NEW ARTIST COMING TO THE PEMG,LABEL. UK & LONDON SUPPORT, VICTORIA

Tue, May 22, 2012 6:58 PMMinnosota Phatz Will be Droppin His "Wait For no Man" The Mixtape will be avaliable mid june be on the look out for tht

Tue, May 22, 2012 4:19 PMtina from DC hey like the album

Tue, May 22, 2012 4:18 PMBig s (This Justice) Peep the lyrical content on the album! they said its a go! got u in London circulations so expect some results! BPI sent u distribution papers. call me@ya earliest.

Mon, Jan 30, 2012 8:26 AMhey i thought u did a great job on community service video on youtube with Obama.

Sat, Jan 28, 2012 2:17 PMSusie U Bad Boy homie-NightLife-is hot

Fri, Jan 27, 2012 10:02 AMLefty that . remix video was official of u

Fri, Jan 27, 2012 10:01 AM808moneycrew chicago night life

Fri, Jan 27, 2012 9:58 AMVernon from Quebec-Shawn we haven't heard from you on producing your Un-sign artist with a tour of shows & send us the studio album & all hardcopy promotion press kits! call me

Sat, Dec 24, 2011 11:45 AMhappy Hoildays to songcast members n all my fans u guys r very appreciated n is part of the reason i continue to grind hard..more music to come in 2012 starin off wit Minnosota phatz mixtape "Wait For No Man" thanks for all the support...Minnosota phatz BizyyBoyz/.G

Thu, Sep 15, 2011 11:05 AMya beats and lyrical content is award winning!!but most of all the hard partytracks is ya style{message keep being u}and thats what u bring to the world minnosota phatz>i will looking out for you & pemg success!Beverly@
Global Entertainment.>PS. we have already check ya other media. excellent as a independent approach!

Sun, Aug 07, 2011 11:09 AMooh phatz i wanna be in the video i have dd's and blue eyes an blond hair, weight 135lbs(Dianna Quebec)

Sun, Aug 07, 2011 11:06 AMboom rush the club is hot! troy ClintonNY

Sun, Aug 07, 2011 11:04 AMManchester,England,UK Boom Rush The Club,Songcast is the most requested now!Dude i purchase the track for our them songs at the club tonight[make more party tracks dude[Finlier dea

Thu, Aug 04, 2011 11:53 AMCananda its nick,Mr,Big S we are looking forward in a meeting with Pemg/BizzyBoys Ent. At your earliest convience. We have various venues for your artist to perform at besides Victoria University in Toronto.

Thu, Aug 04, 2011 11:49 AMGravy its brooklyn when u gonna send some of the MinnosotaPhatz albums out here/ The projects are dog!holla at me its Stan the Man

Fri, Jul 22, 2011 11:12 AMAPPRECIATE THE ALBUM, I GUESS I GOT TIRED OF LISTENING TO THE SMALL VERSION ON ITUNES SO I WENT ON AND BOUGHT THE DAM THANGE! U KEEP IT COMING AND I WILL ALWAYS BE YOUR NUMBER ON FAN! I ALSO LIKE THE PEMG LINK OF YOU ON WOOSHII.COM/PEMG I WILL BE LOOKING OUT FOR YOU MINNOSOTA PHATZZZ. SHELLYTHUNDER NOT RASTA CALI.

Thu, Jul 21, 2011 11:04 AMI like the album because its sexy and i know u and your team put massive effort into it! also its your firssst! Couldn't imagine what your next will be like! groovyandhorneylike me Gina

Thu, Jul 21, 2011 11:00 AMget um minnosota phatz-adrianna@Delaware

Thu, Jul 21, 2011 11:00 AMget um minnosota phatz-adrianna@Delaware

Wed, Jul 20, 2011 11:06 PMu make good music son and that's, What itz all bout! Dlove BX

Wed, Jul 20, 2011 1:35 PMi wish i could of made it too ya show-Beverly NewJersey

Wed, Jul 20, 2011 1:34 PMi wish i could of made it too ya show-Beverly NewJersey

Wed, Jul 20, 2011 1:33 PMtrack9 getum is hot[Tina]Oklahoma

Wed, Jul 20, 2011 1:31 PM80'SBABY ALL DAY!SEXYDOLL/MIAMI

Wed, Jul 20, 2011 1:29 PMCongratulations Kiddo, We are official to move forward on a Pemg/BizzyBoyz Ent. independent tour to various states! MINNOSOTA PHATZ COMING SOON TO YOUR LOCAL CONVENTION CENTER, CLUB, SHOWCASE, THEATER,SCHOOL, UNIVERSITY HOME COMING AND VENUE. (BIGS)NC

Wed, Jul 20, 2011 1:21 PMdirtydirtySC/dude we poppin that no problem in the whip dude

Thu, Jul 14, 2011 8:30 AMYou getting money/go let it show/superbowl week in miami/trunk full blow/controlling night/ shorty got dump/let it show/You Blast it on the nightlife track/this is also a master track! the first three but im feeling the whole album!We made the purchase already u heard..we r a label/JHOOD BrickCity its celebration!

Thu, Jul 14, 2011 8:30 AMYou getting money/go let it show/superbowl week in miami/trunk full blow/controlling night/ shorty got dump/let it show/You Blast it on the nightlife track/this is also a master track! the first three but im feeling the whole album!We made the purchase already u heard..we r a label/JHOOD BrickCity its celebration!

Thu, Jul 14, 2011 8:22 AMJHOOD-BrickCity-that second track to the ablum-BOOM RUSH THE CLUB-Is a master party track im feeling that-NO fifties or Hundreds-tell me what you wanna do-gone head an boom rush the club!

Sat, Jul 09, 2011 11:06 AMLittleC's when the next album coming? and u only got 9tracks dude ok u new n the game

Sat, Jul 09, 2011 11:04 AMmeeks ya album is money but ask about him is wealth

Sat, Jul 09, 2011 11:02 AMOH BABY IM BRAZIL & CUBAN (FLOWERS)

Sat, Jul 09, 2011 10:59 AMALBUM IS BEAUTIFUL! THIS IS FLOWERS FROM DALLAS TEXAS WHEN U COMING THROUGH? SEEN YOUR YOUTUBE CONTROLLING THE NIGHT, I LOVE IT! NOW I WAIT FOR THE LIVE VIDEO OF YOU! AND YOUR NEXT ALBUM!IM YOUR NUMBER ONE FAN! YOU HAVE MANY COMMENTS BUT LIKE I SAID IM YOUR NUMBER ONE FAN!I LOVE AND LOVE MINNOSOTA PHATZ! RAP CELEBRATION TOO ME! I WILL BE YOUR VIDEO LADY! FLOWERS & MINNOSOTA PHATZ!!

Thu, Jul 07, 2011 2:13 AMMINNOSOTA PHATZ YOU HAVE THE MOST ANTICIPATED ALBUM OF THE YEAR 2011 I WOULD VOTE YOU ON BET/SOURCE AWARDS AND REDCARPET AS SPECTACLER RAPPER OF RAP AND DANCE PARTY TRACKS! I LOVE U AND U GOBOY! FRANCESS THE PRINCESS FROM QUEENS NY.

Thu, Jul 07, 2011 2:13 AMMINNOSOTA PHATZ YOU HAVE THE MOST ANTICIPATED ALBUM OF THE YEAR 2011 I WOULD VOTE YOU ON BET/SOURCE AWARDS AND REDCARPET AS SPECTACLER RAPPER OF RAP AND DANCE PARTY TRACKS! I LOVE U AND U GOBOY! FRANCESS THE PRINCESS FROM QUEENS NY.

Thu, Jul 07, 2011 2:13 AMMINNOSOTA PHATZ YOU HAVE THE MOST ANTICIPATED ALBUM OF THE YEAR 2011 I WOULD VOTE YOU ON BET/SOURCE AWARDS AND REDCARPET AS SPECTACLER RAPPER OF RAP AND DANCE PARTY TRACKS! I LOVE U AND U GOBOY! FRANCESS THE PRINCESS FROM QUEENS NY.

Thu, Jul 07, 2011 2:12 AMMINNOSOTA PHATZ YOU HAVE THE MOST ANTICIPATED ALBUM OF THE YEAR 2011 I WOULD VOTE YOU ON BET/SOURCE AWARDS AND REDCARPET AS SPECTACLER RAPPER OF RAP AND DANCE PARTY TRACKS! I LOVE U AND U GOBOY! FRANCESS THE PRINCESS FROM QUEENS NY.

Wed, Jun 29, 2011 1:16 PMi think you are inbetween cause you have hard dance party tracks but you go in on the first track on the album and later smoothens it out with celebration and keeping the old school alive with 80sbaby. No problem is a banger! Night life is billboard material! Unkown-flocker camp

Wed, Jun 29, 2011 1:16 PMi think you are inbetween cause you have hard dance party tracks but you go in on the first track on the album and later smoothens it out with celebration and keeping the old school alive with 80sbaby. No problem is a banger! Night life is billboard material! Unkown-flocker camp

Wed, Jun 29, 2011 1:16 PMi think you are inbetween cause you have hard dance party tracks but you go in on the first track on the album and later smoothens it out with celebration and keeping the old school alive with 80sbaby. No problem is a banger! Night life is billboard material! Unkown-flocker camp

Wed, Jun 29, 2011 1:16 PMi think you are inbetween cause you have hard dance party tracks but you go in on the first track on the album and later smoothens it out with celebration and keeping the old school alive with 80sbaby. No problem is a banger! Night life is billboard material! Unkown-flocker camp

Wed, Jun 29, 2011 1:16 PMi think you are inbetween cause you have hard dance party tracks but you go in on the first track on the album and later smoothens it out with celebration and keeping the old school alive with 80sbaby. No problem is a banger! Night life is billboard material! Unkown-flocker camp

Wed, Jun 15, 2011 7:21 PMPHATZ THE ALBUM IS FIRE>>>>>>>>>>>>>>>BOOM RUSH THE CLUB IS #1!

Wed, Jun 15, 2011 5:37 PM i like your bio

Wed, Jun 15, 2011 5:08 PMUK FLASH..ALBUM IS NICE DUDE---46532

Wed, Jun 15, 2011 5:03 PMOh its me again Bernard, my room mate downloaded off itunes and couldn't sleep last night! thats all i heard banging in my ear drums is minnosota phatz and bizzyboyz dam u! who's bizzyboyz? i began to like the album afterwards! i wish u much success! when u coming to DC? u should holla at the radio out their! take care.

Wed, Jun 15, 2011 5:03 PMOh its me again Bernard, my room mate downloaded off itunes and couldn't sleep last night! thats all i heard banging in my ear drums is minnosota phatz and bizzyboyz dam u! who's bizzyboyz? i began to like the album afterwards! i wish u much success! when u coming to DC? u should holla at the radio out their! take care.

Wed, Jun 15, 2011 5:03 PMOh its me again Bernard, my room mate downloaded off itunes and couldn't sleep last night! thats all i heard banging in my ear drums is minnosota phatz and bizzyboyz dam u! who's bizzyboyz? i began to like the album afterwards! i wish u much success! when u coming to DC? u should holla at the radio out their! take care.

Wed, Jun 15, 2011 4:58 PMWho r u and where u came from? but i love your tracks! in DC/Bernard

Wed, Jun 15, 2011 4:56 PMIs name of the album minnosota phatz or grown ass minno?

Fri, Jun 10, 2011 10:06 AMto me your style n flow is different from other rappers! its like a up tempo flow with bass and party getting lyrics.i don't who to size you with but im gonna just say your Minnosota Phatz!

Fri, Jun 10, 2011 9:29 AMStreets is calling you MINNOSOTA PHATZ,,,,,,,,,,boom rush the club is a hittt!Roger in DC.

Mon, Jun 06, 2011 3:54 PMTHE ALBUM "GROWN ASS MINNO IS FINALLY HERE GO COP THAT DOWNLOAD THAT BUMP THAT IN YA RIDE, WEN UR WORKING OUT, WHILE CLEANING THE HOUSE,OR JUST CHILLIN ON THE BLOCK THIS IS IT THE ALBUM TO START OFF THE SUMMER DNT BE LEFT OUT.....ITS MINNOSOTA PHATZZZ I "GET UM"

Sat, Jun 04, 2011 2:20 PMU do know how to rock a party! "Minnosota Phatz" i couldn't get my autograph or pic,when ya next show? i will come back to this site and check!do u have business number to be reached?

Sat, Jun 04, 2011 2:20 PMU do know how to rock a party! "Minnosota Phatz" i couldn't get my autograph or pic,when ya next show? i will come back to this site and check!do u have business number to be reached?

Sat, Jun 04, 2011 1:41 PMminnosota phatz this is uncle stan gravy man from upstate i heard about u and shawn on the project. we down here in brooklyn need those cds i could get off in the projects, tell gravy to holla..it seems as if he is big S now..