Reverse engineering typically requires expensive equipment, skilled technicians, time, a cross section of the component to be sliced out and a dedicated reconstruction software. In this paper, we present a low-cost alternative, combining fast frontside sample preparation, electron microscopy imaging, error-free standard cell recognition and within and between-die standard cell statistical analysis (SCSA). Step-by-step, we depict the process to access the transistor's drain/source area, to acquire the full area of a single chip layer, to adapt pattern recognition for standard cells and to analyze the standard cell width, local/global location and occurrences number. The inner workings of each step are accompanied by results on 45–65-nm FCBGA devices enabling to locate specific areas (e.g. registers, hardware accelerator). We particularly point out the importance of such design information extraction for local fault injection and hardware assurance. The primary goal is to analyze how much design information of a complex integrated circuit can be retrieved with minimal costs and without outsourcing.
Hardware-based vulnerabilities of integrated circuits (ICs) running security applications allow an attacker to retrieve sensitive data or bypass security mechanisms. Reverse engineering , a specific kind of attack, is seen as an expansive approach compared to side-channel or even fault attack approaches. However, products include more and more countermeasures regarding side-channel and fault attacks at the development stage, thus reducing such attack schemes. On the other hand, reverse engineering, due to time and cost constraints, is not typically considered a standard solution. Indeed, typical reverse engineering involves perfectly accessing each layer of a circuit, acquiring images and processing them. It requires skills, expertise, expensive equipment, high precision and time . Reverse engineering is utilized for circuit integrity verification or IP infringement detection and can be performed by analytical laboratories. X-ray-based reverse engineering (non-destructive) is widely under investigation but currently requires highly sophisticated equipment and has only been applied to a very small subset (some μm3) of an IC [3, 4]. While some interesting FIB/SEM techniques  have so far been applied to parts of a circuit, they are quite demanding in terms of knowledge, time and equipment, as illustrated in Table 1. There are also ongoing multi-electron beam source and X-ray detector investigations to allow local X-ray analysis without synchrotron .
To counteract the difficulty of the standard reverse engineering process, we propose to retrieve sensitive information of a component (e.g. registers location and hardware accelerator) by only analyzing where the transistors' drain/source are located. Having such information is enough to reduce the area of interest for a subsequent localized attack (e.g. electromagnetic or laser attack); check the authenticity of the circuit (e.g. hardware trojan detection); or understand the underlying hardware layer after a side-channel technique such as photon-emission analysis.
Our goal is not to reverse engineer a complete chip but instead to gain partial design information for particular purposes. They lie in the area of malicious circuit modification detection but also in combined attacks where such technique would decrease the number of samples and attack time needed. Thus, a complete attack could be applied thanks to some extracted spatial information combined with standard side-channel (e.g. power) extracted temporal information. Also, extracted spatial information can be analyzed once chip sub-functions have been roughly localized with a more global technique.
Most of the drawbacks of hardware reverse engineering disappear (cost, time, manual corrective action), and we retrieve the standard cells function or a specific group of standard cells by location (absolute and cell-to-cell), occurrences number, and width/shape analysis, which we refer to as standard cell statistical analysis (SCSA). The methodology herein is depicted from sample acquisition to a few recognition examples.
Utilizing such an approach, locating specific cells can be done regardless of the device technology node and package. For instance, it can reduce attack rating for the identification and exploitation phase and can be used in conjunction with laser fault attacks  to bypass security mechanisms . Multi-spot (bypass/fault capability) and high-power (through the substrate capability) platforms are commercially available, increasing security threat (redundancy and software check can be defeated). While technology node approaches 7 nm, the size of the implemented transistor/single standard cell is larger, and laser energy (pulse duration/power) can be reduced enough to only perturb a single standard cell below the peak of the Gaussian shape beam.
In the past, Nohl  reversed a ciphering circuit made of 400 NAND gate equivalent (GE) from optical images using normalized cross-correlation. Also, Courbon  retrieved the location of a single type of standard cell (a flip-flop cell) on a 0.5-mm2 area device manufactured in a 130-nm process. To the best of our knowledge, we are the first to develop, and explain step by step, a low-cost full area (single layer) standard cells extraction methodology on a 45-nm device (Mgates), while analyzing IC design requirements, methodology limits and countermeasures. The aforementioned methodology takes its sample preparation roots in the failure analysis world, its image processing roots in the cell (biology) analysis world.
The paper is organized as follows: we start by talking about IC design and geometries, before introducing the multi-field steps to localize standard cells in Section 2. Then, we introduce the device under investigation in Section 3, and put into practice the methodology in Section 4. Finally, we investigate partial reverse engineering applications in Section 5 and present ways on how to extend this work in Section 6.
An IC designer uses a certain number of off-the-shelf macros (IP royalty fees apply) combined with a certain number of standard cells (from a chosen process design kit (PDK)), a ratio that primarily depends on project cost and design (i.e. timing) constraints. For instance, ARM cores hard macros are widely present at the moment in embedded devices, such as mobile phones and smart cards. There are similarities between products, as standard cells and hard macros are re-used across a large variety of devices. Herein, we analyze standard cells and hard macros XY localizations. In the era of specialization (i.e. dedicated ASIC for machine learning/server) and open-source hardware (based on RISC V instruction set architecture (ISA)), investigating hardware implementation is paramount.
Integrated circuit area (length and width expressed in mm) is wider compared to the thickness of each metal layer (few hundreds nm), hence the planarity problem when delayering. Adding to the high density of transistors per mm2, this leads to long imaging time. The smallest feature (for not advanced process) is generally the transistor gate width, corresponding to the technology node. A transistor controls how much current flows through from source to drain, depending on the voltage applied on the gate. Such capability is used to obtain various Boolean functions (or to create a current amplifier). Drain and source are created by local doping (boron, phosphorus) of the semiconductor substrate which is silicon based. From bottom to top, following the substrate, we find poly-silicon that forms the transistors' gates (separated by a dielectric Si02 down to 32 nm, then replaced by Hafnium-based (higher permittivity) dielectric). Typically, a first metal layer is then used to interconnect transistors, thus forming standard cells (NAND, OR, FLIP-FLOP). Then, non-basic functions, such as a 32-bit counter, are formed by interconnecting multiple standard cells together, while power/clock are routed in top metal layers. Metal layers are separated by a dielectric (SiO2 (glass)), and vias allow vertical connections between the subsequent layers.
ICs running secure applications come in various formats—smart card, system-on-chip (SoC), package-on-package (PoP) (the die thickness being 130 μm for smart cards and PoPs due to fitting requirements). However, we reckon that it is possible to extract the die of any circuit at almost no cost: a combination of sharp cutting tools, acids (i.e. HNO3), hot plates and protection equipments . Once the die is extracted, it is possible to easily reach the transistors' active region using HF acid. This has very interesting features in terms of cost, full area application, speed and required skills, while the technique allows several samples to be prepared at once. There is no need of cross-sectioning, and the technique is independent of the technology node. In this paper, we show how easily one can reach such layer of a circuit, manufactured with a 45-nm process and packaged in a flip-chip ball grid array (FCBGA).
Scanning electron microscopy (SEM) is a standard for imaging deep sub-micron integrated circuits as optical microscopy has a smaller depth of focus and is limited by light diffraction (coating techniques can limit the impact of the latter but requires an extra step and thus variable). Detector type, aperture size, probe current, accelerating voltage, magnification, scanning speed and image resolution can be easily tuned. Despite being less prompt to contrast changes compared to optical microscopy, it is worth ensuring that the prepared integrated circuit remains as flat as possible after attaching it with carbon tape, given the large area to be acquired. The SEM only gives a grayscale intensity for each pixel (a certain secondary or backscattered electrons detector count), and the image is thus saved in a single-channel format (saving memory space). There are many parameters to set (mainly accelerating voltage, probe current and time per pixel), impacting acquisition time and signal-to-noise ratio. Here, we particularly point out practical features and considerations, pros and cons of SEM imaging with respect to our application.
Newer SEMs include proprietary tools (e.g. ZEISS ATLAS, FEI MAPS) dedicated to large-area acquisition; it is thus easy to scan a specified area with a specific magnification, image rotation, time per pixel (dwell) and image overlap and then have the tool performing the alignment task. Another option (if a SEM without large-area acquisition dedicated software is used) is to directly use SEM APIs to write an acquisition recipe and use offline tools for alignment. Herein, we demonstrate the use of an offline artefact-free alignment tool.
There has been an attempt to automate or semi-automate integrated circuit reverse engineering in the open-source community, Degate . This software is quite interesting as the user can load images and directly process them. However, we found some limitations in terms of pattern recognition rate, timing performance, adjusting grid lines or loading large images. While we also implement a normalized cross-correlation function  as a kernel to recognize patterns, we specifically create a lighter custom tool dedicated to single-layer analysis, fast and robust with respect to possible SEM images (sample preparation and foundry). We propose an algorithm taking into account the possible artefacts arising from previous methodology steps. A single missing pattern could ruin our statistics, and therefore we ensure that no false recognition is obtained with standard pattern recognition algorithms. We are thus able to automatically collect labelled data (error-free) and create a standard cell (single layer) library. This library can be used as it is or be the starting point for multi-sample analysis using machine learning techniques to speed up analysis.
At the layer of interest, various repetitive shapes are visualized. They correspond to basic functions such as INV, AND, OR, MUX, DEC, half adder, DFF and latch. Having only drain and source remaining on our images, we cannot directly retrieve the function of a standard cell (as poly and M1 layers are missing). Whatever the device type, the number of these base functions is very low (few tens only). Additionally, base functions are split  into different instances as the number of inputs, the presence of signal such as reset/clock, the drive strength and different voltage domains (for a SoC) differ. Those instances are each optimally designed depending on speed, power, area requirements and foundry capabilities. The chip designer uses such instances from the design kit to implement all his/her functions (or directly use other IPs), resulting in a chip with about 200kGE (gate equivalent) for a smart card digital logic, versus a SoC with several tens/hundreds millions standard cell occurrences for the logic only. In this paper, the goal is to give a first approach on recognizing cells based on absolute/relative location, number of occurrences, width and shape of pattern within a single chip and between chips.
Under a fume cupboard, we first heat up the complete device on a 400 ∘C (command) hot plate for a few minutes. Placing a sharp knife under the die, we subsequently detach the die from its package. At this stage, the die comes with Copper balls—we use the same sharp knife to scratch the surface to remove all of them. We perform this until we reach the polyimide layer (Kapton). Due to the hardness of the Kapton material, we do not scratch inferior layers. We can perform some SEM imaging at this stage to visualize the top metal layer (Fig. 1).
If this layer is satisfactory for your reverse engineering application (chip identification, integrity verification), a quick manual polishing (not done in either Fig. 1 images) removes copper residues, while backscattered electrons SEM imaging prevents the visualization of surface scratches (SEM image in Fig. 1).
The Kapton film (polyimide) is now the top layer; it is detached, and dielectric/metal layers are etched away using a 50% hydrofluoric acid (HF) bath (less than 10 min). After the metal layers have been removed, only drain and source implants remain. Samples are first rinsed with acetone, before an ultrasonic bath with deionized water only is used. This perfectly cleans the die surface in less than 10 min. Last but not least, a nitrogen gun is used to avoid any water residues. The sample is, at this stage, ready for imaging. One can note the possibility to obtain the technology node (from 45 nm) with a high magnification SEM image, Fig. 2.
To sum up the whole sample preparation process, its main benefits are its speed (less than 40 min), cost per sample (few $), whole sample surface application (about 100 mm2), technology node independence (45-65-90-130 nm in this paper), effectiveness (100% success rate) and accessibility (no required skills).
Regarding the sub-polyimide surface, imaging layer ICs' features are quite large at the top metal layers. However, using an optical microscope requires a nicely polished surface. Also, the lack of imaging depth of field is problematic for large areas. In fact, SEM remains the most interesting tool for direct imaging (without required signal processing), and this layer needs far less scans due to the top layer geometries. Unless a shield is present, the top metal layer can thus be directly imaged.
Astigmatism can be set at the centre of the device.
Three focus points (for interpolation) can be taken at three chip sides.
Contrast/luminosity is a tricky parameter, different secondary electrons re-emission rates (no coating, not uniform in SEM chamber) can be problematic.
Multi-chip acquisition is possible (weekend acqusition for instance), including the possibility to set a focus point for each integrated circuit. The only drawback is the impossibility to set a certain contrast/brightness per chip (against SEM chamber artefact/samples different electron emission rates), Fig. 3.
Also, using a multi-beam SEM (up to 91 simultaneous beams) would have decreased the acquisition time to less than 10 min. We used a proprietary SEM manufacturer software (additional) to acquire the full area that added a 10% overlay between each image. It individually saves images, but also provides a globally aligned image.
The proprietary SEM tool provides a reconstructed whole chip image (142k×159k pixels). Artefacts are present at the images' junctions (example given with top image on Fig. 4), which negatively impact the subsequent methodology step (pattern recognition).
As images are also individually saved, we thus move to an offline alternative for alignment. The same set of images has been aligned with this second approach (example image with bottom image on Fig. 4). We are able to align all images together, making compatible large image acquisition and pattern recognition. It only takes several minutes and is completely automated (matrix dimension detection, overlap calculation). Image alignment is still an area of research (mainly for speed concerns) but 2D image alignment problematics have been resolved time ago in other fields such as biology where electron microscopy is also used or standard optical acquisition.
Pattern recognition is then performed on obtained images. The former is specifically tuned for our task. After automatically checking for preparation/imaging artefacts, patterns are found on the chip along power lines and ranked per size. Standard correlation techniques with multiple iterations loops (with decreasing correlation coefficient) are used to avoid false detection. Information about pattern location, size and occurrences are saved. Then, co-location information combined with computer architecture and technology/tool-specific constraints allow making hypothesis on the retrieved standard cells. The main aim is to ensure that no false positives are obtained with the tool allowing on one side to have non-false positive for statistical purposes but also to obtain a dictionary of error-free patterns.
If any tungsten remains on the surface, it will be adjacent to a NMOS/PMOS area, and therefore only affects the background of the image. Such artefact can thus be easily spotted (based on edge detection).
Large stains can be present on a circuit (non-cleanroom environment) but can be detected as nothing should be located over the substrate polarization contact (or, in other words, no crossing element between two transistors of the same type).
Part of a shape can be missing (over etching, as seen in Fig. 5); therefore, the tool checks the presence of NMOS and PMOS components (we cannot have one without the other). If missing, an analysis of the specified area is performed and some filtering enables the retrieval of the original missing shape (as would still let a trace in the silicon).
A small pattern can be part of a larger pattern. One approach is to recognize larger patterns first.
Patterns are present along power rails; therefore, possible rotations of the pattern are limited. For instance, the PMOS side (usually larger than NMOS) will be located on the positive rail side. Also, the highest correlation points will only be located at the same extremity of the patterns.
The size of the complete layer has quite a large print, e.g. for this 10 × 10 mm die results in a 22.7-GB image (even if grayscale encoded only on 8bits (1byte)). We need a clever manipulation of the image (RAM constraint).
The logic only can be acquired (or another part can be acquired with less resolution; SEMs do not provide this function yet).
While substrate polarization contacts may not be present in all circuits, background can always be retrieved by analyzing intensity values across the pattern height. For instance, a pattern is found at a location if the intensity (gradient) is not continuous (a change of intensity is found between NMOS drain/source and Si and then between Si and PMOS drain/source).
Figure 5 shows a typical case where a standard cell with a different current drive strength (fan-out) (compared to the selected standard cell) has not been recognized. There are also two standard cells with a partly missing transistor side that are recognized. We expect this behaviour with the aforementioned parameters. We want to be independent of possible within-cells imaging fluctuations or missing substrate polarization contacts.
Combining the number of occurrences (local or full area) of a pattern, their global position, their relative position to each other and their shape, it is possible to classify patterns and make a strong hypothesis on their function. Typically, assumptions can be first made on the pattern width—patterns 1 and 3 are made of 4 to 8 transistors while pattern 2 is made of 20+ transistors. The main difficulties are to recognize the full standard cell and not a subset of it, and slight differences between gates due to the presence of an extra input (e.g. reset/clock/signal) or a different fan-out (larger current to drive) as highlighted on Fig. 6.
Subsequently, an area with possible XOR gates, large quantities of possible NAND gates and possible DFF gates may be the hint for a crypto coprocessor location (e.g. DES). The presence of 'rare' occurrences standard cell in a limited area may indicate the presence of a crypto coprocessor too. Post pattern recognition, it is possible to display occurrences of pattern that appear everywhere before moving to an empty area to vizualize recognized pattern.
For some circuits such as the processor under investigation, motherboard manufacturers require information on the processor; a datasheet is thus made public. Using the latter, one can thus assume a certain number of 8-/16-/32-bit registers or a certain function being in a certain area (based on registers description and ballout definition respectively) or a certain number of expected core registers or specific function registers (each FF will be next to the other, timing constraint) present in a certain voltage domain (possible thick pwell). For some circuits, it is a complete black box approach despite knowing the general architecture of the device (e.g. ARM based) or accessing public documents (e.g. public parts of certification results). Unfortunately, the complexity of the circuit does not permit to continue further statistics on the chip.
In the following, we discuss how practical it is to use standard cell statistical analysis outputs (text, file or graph format) for the two main aspects of this paper: precise laser fault attacks and hardware trojan detection.
Despite the main sample of the study being a 45-nm technology node SoC, we note that a single standard cell (several μm2) can be perturbed at once. Indeed, the laser beam has a Gaussian shape, a spot diameter of a μm and an easily controllable energy (duration by power) reaching the area of interest . This single-layer reverse engineering will help to place the laser spot at the area we are interested in. Symmetrically, we can first launch a laser fault attack to then analyze the situation using the underlying hardware structure. However, if a secure device is attacked this way, detectors might detect the intrusion leading to extra consideration to be taken for the attack (e.g. remove power before sensitive data erase). One can also think about the potential of such an approach together with photon counting techniques (specifically without timing capabilities, e.g. only a CCD camera is used).
Another use case is a fabless chip designer/manufacturer (or anyone with a design reference) that would like to analyze the integrity of its components at wafer reception. The success rate of such technique is only dependant on the sample preparation/pattern recognition process as there is no triggering element. The standard cell statistical analysis can be applied on a defective device coming from a lot (or a defective die taken from a wafer) to no affect cost and yield. The correlation is made by comparing the list of standard cells physically extracted using our methodology and a design output file. Specifically, this could be done with the Design Exchange Format (DEF) file, where each gate instance is listed with its XY position. A DEF file does not include proprietary inner standard cell information, hypothetically more compliant.
To complete investigations done at FPGA level , it is thus interesting today to look for low-cost approaches enabling to retrieve such layers over the complete area of a circuit. It can start with a frontside wet etching adaptation (change in HF formula for instance) to a backside information extraction with combined polishing/wet etching methods. Various imaging parameters (laser/ebeam) can actually be set to obtain an interesting beam/matter interaction. In Fig. 8, we show in practice that it is possible to look through a thinned Si substrate using backscattered electrons.
In Fig 9, we show in practice the capability to visualize various layers of a component backside prepared. The preparation is a mix of polishing (standard polishing) and wet etching (choline hydroxide) resulting in a fast and low technique. Long wet etching is also a possibility if edges are kept intact (protection needed). The sample preparation can also be modified to reveal dopant level or type (e.g. KOH).
Part of our approach and obtained data can be used as a starting point for machine learning–based (convolutional neural networks) fast pattern recognition, as our data is labelled with no false positives. In this paper, we choose a frontside destructive approach. It would be obviously more interesting to perform standard cell analysis from the backside of the device in a non-invasive way. Laser scanning microscopy has been used in the past and would be an interesting method to compare with (thinning required, setup, cells distinction (fan-out)).
So far, we depict the different steps for standard cell statistical analysis with few examples on a 45-nm chip. The low cost and quick data extraction enable to perform reverse engineering at a different scale than previously seen in the literature. The idea is to compare multi-chip analysis to extract design information from new function implementation to countermeasure analysis. The best approach would be to begin with smaller and better known integrated circuit (less standard cells, more design information available, single core, single voltage, physically accessible chip on board). Figure 10 displays 65-nm devices, anterior version of the main product (45nm) used in this article. The general idea is to be able to retrieve direct information from an already analyzed integrated circuit.
Machine learning is ideally used for prediction and requires some training data. It particularly makes sense to use it for domain where time is the main criteria (speech recognition). The first concern is to be able to reach the same level of detection while drastically reducing the recognition processing time. Retrieved shapes with standard correlation technique are used as an error-free dictionary to build up the machine learning model. It would be interesting to evaluate such framework in terms of error rate but also for denoising microscopy images. The latter could resolve low-resolution images and further reduce methodology time (scanning). It would be interesting to propose and share a SEM image benchmark or an online tool where test images can be loaded and analyzed according to a specifically trained model.
The partial reverse engineering main interest is its possible application on multiple circuits giving thus more data to be compared with even in a black box approach to assess countermeasures/extract design information. When designing a circuit for secure applications, countermeasures against reverse engineering first appeared in the set of required features, and so before fault attack countermeasures. Actually, it exists proprietary countermeasures at active/poly/via/metal1 layers to hide functionality of a component from non through vias to dummy cells and programmable logic using local oxide breakdown  and used by pay-TV, telecommuncations and smart card industries . Most countermeasure techniques are based on principles such as logic-locking  and netlist/physical obfuscation (doping, dummy via/cell, oxide breakdown, electric charge) .
The idea behind our technique is to analyze how standard cells distribution participate to design information extraction (and for authenticity verification too). In future work, it will be interesting to characterize IC camouflaging protection with our tool for multiple reasons. IC camouflaging is typically not applied on the entire die. Also, it would be interesting to combine in practice aforementioned statistics and local attacks. Common Criteria (CC) attack classification would be affected if less samples, expertise and time are required.
Last but not least, after applying our methodology on different components, we actually found a single sample (90nm, smart card industry) that is quite different, having regular patterns (Fig. 11). We found out that this device is metal-only programmable . This would be a countermeasure by design to drain/source-based reverse engineering; it would, however, be interesting to characterize design capability (low power, high gate density) and robustness against other types of attacks (e.g. side channel).
An alternative to high-cost reverse engineering is presented and applied on a commercial 45-nm SoC. This is a first step towards automatic partial design information extraction. The methodology includes any package die extraction, drain/source layer access and SEM imaging, pattern recognition and a new approach called standard cells statistical analysis (SCSA). We particularly characterize each step of the methodology and point out the low cost and time resources needed to start partial reverse engineering investigations. Single-layer reverse engineering mainly addresses combined attacks (such as EM observation/perturbation and laser fault attacks) and malicious hardware modification detection problematics.
Dr Franck Courbon is an Early Career Fellow jointly funded by The Isaac Newton Trust and The Leverhulme Trust under the agreement ECF-2017-606.


text:
Items where Person is "Giodini-S"
Velander, Malin and van Uitert, Edo and Hoekstra, Henk et al. (2014) CFHTLenS: the relation between galaxy dark matter haloes and baryons from weak gravitational lensing. Monthly Notices of the Royal Astronomical Society, 437 (3). pp. 2111-2136. ISSN 0035-8711. https://resolver.caltech.edu/CaltechAUTHORS:20140123-095143747
Giodini, S. and Finoguenov, A. and Pierini, D. et al. (2012) The galaxy stellar mass function of X-ray detected groups. Environmental dependence of galaxy evolution in the COSMOS survey. Astronomy and Astrophysics, 538 . Art. No. A104. ISSN 0004-6361. https://resolver.caltech.edu/CaltechAUTHORS:20120403-073218005
Pierini, D. and Giodini, S. and Finoguenov, A. et al. (2011) Two fossil groups of galaxies at z ≈ 0.4 in the Cosmic Evolution Survey: accelerated stellar-mass build-up, different progenitors. Monthly Notices of the Royal Astronomical Society, 417 (4). pp. 2927-2937. ISSN 0035-8711. https://resolver.caltech.edu/CaltechAUTHORS:20120105-111108015
Giodini, S. and Smolčić, V. and Finoguenov, A. et al. (2010) Radio Galaxy Feedback in X-ray-selected Groups from COSMOS: The Effect on the Intracluster Medium. Astrophysical Journal, 714 (1). pp. 218-228. ISSN 0004-637X. https://resolver.caltech.edu/CaltechAUTHORS:20100527-112348383
Oklopčić, A. and Smolčić, V. and Giodini, S. et al. (2010) Identifying Dynamically Young Galaxy Groups Via Wide-angle Tail Galaxies: A Case Study in the COSMOS Field at z = 0.53. Astrophysical Journal, 713 (1). pp. 484-490. ISSN 0004-637X. https://resolver.caltech.edu/CaltechAUTHORS:20100413-105827588
Leauthaud, Alexei and Finoguenov, Alexis and Kneib, Jean-Paul et al. (2010) A Weak Lensing Study of X-ray Groups in the Cosmos Survey: Form and Evolution of the Mass-Luminosity Relation. Astrophysical Journal, 709 (1). pp. 97-114. ISSN 0004-637X. https://resolver.caltech.edu/CaltechAUTHORS:20100201-100414082
Giodini, S. and Pierini, D. and Finoguenov, A. et al. (2009) Stellar and Total Baryon Mass Fractions in Groups and Clusters Since Redshift 1. Astrophysical Journal, 703 (1). pp. 982-993. ISSN 0004-637X. https://resolver.caltech.edu/CaltechAUTHORS:20091006-134828649
Finoguenov, A. and Guzzo, L. and Hasinger, G. et al. (2007) The XMM-Newton Wide-Field Survey in the COSMOS Field: Statistical Properties of Clusters of Galaxies. Astrophysical Journal Supplement Series, 172 (1). pp. 182-195. ISSN 0067-0049. https://resolver.caltech.edu/CaltechAUTHORS:20100423-135303799

redpajama_set_name: RedPajamaCommonCrawl


text:
Across the Cape Fear
Northern Brunswick County
Southern Brunswick County
More from Across the Cape Fear
More from Food & Drink
Nominate Someone for 2020 Future 10!
All Future 10
What is this Superfund Site in Navassa?
by Allison Barrett CarterAug 2, 2018Brunswick County Life, North Brunswick
The N.C. Department of Environmental Quality is helping transform an unusable, contaminated piece of land into a community asset for Navassa.
Ideally situated on the Brunswick River in the Town of Navassa, next to the S. Navassa Road bridge with a line-drive view of downtown Wilmington, lies 245 acres of land that prime for development. The problem is, a large portion of the land can't be used. Yet. Many government agencies, environmental scientists and local citizens are working to change that.
Decades ago, a creosote plant operated on the edges of the marsh in that spot. From 1936 to 1974, it was here that wood, such as railroad ties and telephone poles, would be treated with creosote, a dark oil derived from coal tar. It was unknown at the time that creosote is a dangerous substance, toxic to humans and animals. It causes intense skin irritation, and prolonged exposure leads to respiratory illness and can cause cancer. Although the industrial plant was destroyed and all equipment removed in the 1980s, the damage had been done. This valuable property in Navassa cannot be used in the shape it is in right now.
Throughout the decades after the plant was removed, the land sat unused as it was transferred from company to company through mergers, transfers and buyouts. The U.S. Environmental Protection Agency (EPA) came to be an advocate for the proper cleanup of the acreage in 2003. That started with the North Carolina Department of Transportation's building of a bridge. As they drove pilings, they discovered the soil contained with alarming levels of creosote and delivered their findings to the EPA. The EPA immediately referred it for further action and started to work with state agencies, such as the North Carolina Department of Environmental Quality (NCDEQ).
Unfortunately, the site was tied up in intense legal proceedings as owners Kerr-McGee transferred the liability to a newly created company called Tronox, which then declared bankruptcy. While federal courts demanded that Tronox set aside millions of dollars for environmental cleanup for its hazardous properties, there were hundreds of sites that fit the bill. It turns out that Navassa was one of the more complex, and $92 million was earmarked for its remediation.
Once finally settled, research, remediation and work could move forward. In 2010 the EPA designated the Navassa land a superfund site, making it a national priority. A superfund site is land marked by the government for cleanup as it poses a hazardous risk to human health and/or the environment.
"The thing to realize," explains David Mattison, an environmental engineer with NCDEQ who has been working on this project for some time, "is that [the plant] was fine for practice at that time. New laws weren't created until 1980. But the point of superfund status means that we clean up an abandoned waste site and put it to beneficial community use."
There are stages to making this happen: remedial investigation, feasibility studies and then the actual clean up. For years, engineers such as Mattison have been monitoring the property and trying to get a handle on the exact scope of damage. They found that the creosote soaked nearly 100 feet into the ground in some areas, with most damage on the southwest side of the site, where the creosote ponds were.
PHOTOGRAPHY BY Michael Cline Spencer. NC DEQ Environmental Engineer Dave Mattison is shown at the Kerr-McGee Chemical Corp Superfund Site in Navassa, NC.
"But it is important to understand that there is absolutely no hazard for anyone living or working near the site today. The damage is far underneath" the ground surface," Mattison says. Since creosote is such a thick, sludgy substance, it turns out it doesn't leach or permeate much.
Today the site is formally owned by the Greenfield Environmental Multistate Trust. This organization was created during the Tronox bankruptcy settlement to oversee some of the funds and lands earmarked for cleanup. Richard Elliott, project manager of the Navassa Superfund Site for the Multistate Trust, has been working hard to get this valuable land remediated and back to productive use for the community.
"Part of the superfund process is to figure out potential future use of the land," Elliott says. "It is about returning it to beneficial use."
To this end, the Multistate Trust has been holding public forums and community hearings to solicit feedback from people who live in Navassa and the surrounding areas. From hours of meetings, surveys and visioning workshops with more than 70 residents in attendance, a few plans have been drafted, trying to put to paper what the site could be eventually. The current redevelopment concepts include a park, a kayak launch, light industrial use, residences, a riverwalk and, what seems to be most important to the town, a cultural heritage center, possibly including a museum.
"We really wanted to engage the public, to see what they want," Elliott says. "We have been working hard to bring this land back to where it can be a productive part of the community. The town was negatively impacted by the operation of this facility. But we are here to turn a negative into a positive."
While the Navassa Superfund site is still early in the redevelopment planning process, it helps the Multistate Trust to know the possible uses of the property as envisioned by the community. The goal is to initiate cleanup by January 2019. Sometime later this year, the Multistate Trust will begin to explore sale of the land to owners that may be able to bring the neighborhood's vision to fruition, yet no concrete deadlines have been determined for any transfer of land. And while the southwest part of the site will take longer to be reclaimed for us as its contamination is more intense, it is possible the northern part could be available for reuse in just a few short years.
"Because of its proximity to infrastructure, a railroad and I-140, there is a lot of value in this property," Elliott says. "This is going to be gem in the Navassa crown, and a positive influence for the area."
"This land isn't helping anyone right now," Mattison adds. "Our goal is to take a contaminated piece of land, fix it and put it to beneficial use to the community."
According to all agencies and companies involved, the people of Navassa have been nothing but friendly and helpful. It seems that everyone acknowledges that what happened can't be completely undone, but there is a plan to move forward, complete with available resources and passionate people. And now we know there will likely be a better future for the Navassa Superfund site.
The public is encouraged to get involved. For more resources, start at http://multi-trust.org/navassa-north-carolina. The next public meeting will be held on August 9, 2018 at 6 p.m.
PreviousSouthwest Brunswick Branch Library Opens
NextAlligator Alliance Does Gator Patrol
Allison Barrett Carter
Allison is a freelance writer who relocated to Leland from Chapel Hill with her husband and two sons.
The Yates Reflect on a Lifetime in Leland
Like a Kid Again: Cape Fear Sports
For the Children: The Kiwanis Club is Coming to North Brunswick
Nadia and Rick Howell — Ocean Isle Beach —
Life in Brunswick County
All Rights Reserved. Copyright © 2020 Carolina Marketing Company, Inc.
Office Address: 1010 Evangeline Drive, Suite 200, Leland, NC 28451 | (910) 207-0156
Mailing Address: P.O. Box 1361, Leland, NC 28451


Check out these interesting ads related to "yanmar engine"
D1 engine d endosment t surender engine and interior good condation more info contact. BEST SALETODAY A BRAND NEW yanmar engine FOR YOU!! Useful and unique design product for only 2426.32 !
It provides pure n healthy fuel to engine n prevent durt n dust to insert in engine. Are you trying to find a Yanmar 4TNE92 Diesel Engine, 0 in Shipping to India ? We are renowned sellers and we will help you out!


According to newly published research, should growth of the renewable industry continue at its current rate, by the year 2018 renewable energy production will overtake power which is produced by nuclear power stations.It's estimated that by the year 2015 renewable energy will power at least one in ten homes in the UK.
This has been quite a good year for the renewable energy industry. The amount of electricity which is produced from wind has increased by around a quarter of what it was in 2010.
The interest from government in wind energy has lessened (over 100 Ministers of Parliament have signed a statement earlier in the year to oppose the building of new wind farms) the industry has still managed to grow. Investment has gone up by 60 per cent in offshore wind farms over the past year. The approval of plans for onshore wind farms have also risen by around half. According to RenewableUK this is a record level.
Even though some members of parliament have been quite outspoken about their dislike of wind power, there has been a remarkable rise in the number of approvals for onshore wind farms last year.
The chief executive of Renewable UK, Maria McCaffery has said that these numbers reiterate the importance of having a secure trading climate so that investment can be encouraged even through such tough economic times. This is why the entire framework set in place by the energy bill which is currently being reviewed by parliament must be perfect. She feels that although the UK is quite a way off they're definitely on track to meet targets.
John Hayes who has recently been appointed the Conservative energy minister has always been very outspoken about his criticism of wind farms in past years. In an interview with the Guardian, he said he was very proud of how far his country had come in terms of wind energy. He feels that to invest in modern, cutting edge technology is a very British thing to do.
Even though John Hayes has been against wind farms in the past he is keen to support new farms should they be built in the right areas. He says it's essential to have the support of the local inhabitants of the area. Measures are to be put forward by government to help local communities and enable them to benefit from having wind farms nearby.
The energy was initially expected to be discussed this week but will probably be pushed back until later in the month as members of parliament consider the implications. There is a clear split over how to go forward with renewable energy within the tory party. Earlier in the year, over 100 MP's of the Conservative party have signed a letter that opposes building anymore wind farms.
Peter Lilley, a sceptic who has been very vocal about his feelings about climate change, has been appointed as a member of the energy and climate change select committee late last month. By some, this was seen as a shift to the right in the governmentspolices around climate change. In the past, Prime Minister David Cameron has said that renewable energy is an essential part of the UK's prosperity. Further changes to the new energy bill could discourage investment in the industry.
Makers of wind turbines are still uncertain of whether or not they would like to develop new manufacturing plants within the UK. They are waiting for the government to finalise the energy policies. Quite a few large companies such as General electric, Mitsubishi and Siemens are also considering building new manufacturing plants in the UK but they too cannot decide without having the assurance of knowing whether or not to go ahead.
Mr Osborne has repeatedly insisted that the energy future of the UK is with gas and therefore government has approved the building of 20 gas fired power plants throughout the UK. This has been concerning for renewables investors.
In an interview with the Guardian recently, an unnamed wind energy investor has said that the constant talk from government about gas doesn't offer much assurance that there will be a future for renewables in the UK. According to Renewable UK, in 2011 over 135 000 people were employed in the renewable energy industry while over half a million were employed in various ancillary industries.


text:
Rescue your IT staff from data center management purgatory
Research Report: Data Center Optimization
How to relieve the pressure of data center consolidation
Storage virtualization tames the data beast
Where saving the planet and saving money intersect
How to show the ROI of data center optimization
Management tactics and tools can enhance day-to-day operations
Optimizing a data center is not only about virtualizing servers and storage and reducing power and real estate costs.An organization should achieve higher utilization of all its resources, including its people. A goal of any government agency considering data center optimization should also be to employ fewer people doing more data center work with highly utilized systems. In short, a focus on the people part of data center optimization represents the positive side of doing more with less: better utilized people, better utilized servers and higher utilization of storage capacity.
In practice, data center optimization rarely results in a long-term reduction in IT resources because the organization's demand for IT services keeps growing. Agencies are doing more, whether it is providing access to more information, processing more and different types of services, or running new types of systems. The goal of the optimized data center is to deliver the required IT capabilities in the most efficient manner by getting maximum utilization from IT resources, both systems and people.
One key to data center optimization is management automation, notes Judith Hurwitz, president of IT consulting firm Hurwitz and Associates, based in Needham, Mass. "Automation lets you improve efficiency and quality," she says. Data centers in general have grown too large and complex to effectively manage — never mind optimize — without automation.
Specifically, automation takes over the routine, mundane tasks that IT staff members need to do, such as configuring resources, backing up data or patching servers. The efficiency comes from letting systems handle low-value tasks that people otherwise would do manually. Automation also improves quality by eliminating the errors that typically occur when people handle repetitive tasks manually.
Data center optimization also implies a level of process redesign, in which you redesign work processes for the optimized and automated data center. Previously, each server administrator might have handled a certain number of servers before optimization. But after optimization, each administrator would be able to handle four, five or even 10 times the number of servers, according to industry observers.
The same kind of quantum leap also occurs in storage. Before virtualization, each storage administrator previously could have handled gigabytes of storage. But with greater efficiency and automation, he or she would be able to handle terabytes of storage.
"Clearly, the more automated you can make the data center, the more efficient it can become while it reduces risk," says David Kelly, president of IT consulting firm Upside Research, based in Newton, Mass. Management automation adds the critical component.
For agencies, risk comes in many forms. IT staff shortages remain a serious concern, despite the weak economy. Roughly half of the federal government IT officials who responded to the November 2011 Data Center Optimization survey by the 1105 Government Information Group are very concerned about the IT staff resources dedicated to maintaining and supporting data centers. For more information about the demographic characteristics of the survey population, please read the "Data Center Optimization Survey Methodology" section in another article in this series, "How to relieve the pressure of data center consolidation."
Chart not readable? Download a PDF version.
However, the large and growing number of government mandates that relate to data center operations is another form of risk. About half of the survey respondents indicated that the most important government mandates include protection of government information and prevention of IT outages. Other mandates drawing slightly fewer responses comes from the E-Government Act of 2002, security standards set by the National Institute of Standards and Technology, Federal Information Processing Standards, Energy Star and Executive Order 13514, titled "Federal Leadership in Environmental, Energy and Economic Performance.
An equally troubling risk is the myriad federal mandates that often hamper efforts by agency IT decision-makers to move forward with new or innovative data center solutions. More than four in 10 of the survey respondents complained that acquisition regulations make it difficult to obtain innovative technology to improve data center operations.
These and other risks make it imperative for government agencies to include people in their data center optimization program.
This report was commissioned by the Content Solutions unit, an independent editorial arm of 1105 Government Information Group. Specific topics are chosen in response to interest from the vendor community; however, sponsors arenot guaranteed content contribution or review of content before publication. For more information about 1105 Government Information Group Content Solutions, please email us at [email protected].
8609 Westwood Center Drive, Suite 500, Vienna, VA 22182-2215 703-876-5100
© 1996-2013 1105 Media, Inc. All Rights Reserved.


text:
var memowe = {
  LSKey_GameSettings: 'mmw_gamesettings',
  LSKey_GameActive: 'mmw_gameactive',
  LSKey_Cards: 'mmw_cards',
  LSKey_MemoryCards: 'mmw_memorycards',
  LSKey_Turns: 'mmw_turns',
  LSKey_Time: 'mmw_time',
  LSKey_BGColor: 'mmw_bgcolor',
  ST_Static: 'static',
  ST_Symbols: 'symbols',
  ST_Local: 'local',
  ST_Flickr: 'flickr',
  ST_Picasa: 'picasa',
  AT_Default: 'default',
  AT_Android: 'android',
  AT_Tizen: 'tizen',
  EV_Click: 'click',
  EV_Touch: 'touchstart',
  Event_Click: '',
  Facebook: false,
  FacebookScriptLoaded: false,
  FirstLoad: true,
  HelpMenuActive: false,
  C1: null,
  C2: null,
  AgainButton: null,
  MemoryArray: [],
  CheckActive: false,
  GameActive: false,
  GamePaused: false,
  CancelGame: false,
  Again: false,
  AppType: '',
  Turns: 0,
  NrImages: 0,
  NrCards: 0,
  NrCards_OptionsArr: [4, 6, 8, 12],
  CardSizeRem: 10,
  CardsLoaded: 0,
  TO: null,
  CCTO: null,
  StartSec: 0,
  DiffSec: 0,
  SourceType: '',
  Keyword: '',
  CardArray: [],
  localMediaStream: null,
  //canvasContext: null,
  MainVideo: null,
  ResizeImageSettings: {
    maxwidth:500,
    maxheight:500,
    crop:true,
    quality:0.8,
    background:'#ffffff'
  },
  ResizeImageCanvas: null,
  ResizeImageCanvasContext: null,
  FilePickerCurrentID:0,
  KeywordList: ['toys', 'summer', 'winter', 'autumn', 'spring', 'outdoor', 'flowers', 'sports', 'news', 'puppet', 'landmark', 'coast', 'car', 'bike', 'transportation'],
  StaticCards: [
    { 'id': 1, 'src': 'img/card1.jpg', 'cssclass': '', 'visible': true },
    { 'id': 2, 'src': 'img/card2.jpg', 'cssclass': '', 'visible': true },
    { 'id': 3, 'src': 'img/card3.jpg', 'cssclass': '', 'visible': true },
    { 'id': 4, 'src': 'img/card4.jpg', 'cssclass': '', 'visible': true },
    { 'id': 5, 'src': 'img/card5.jpg', 'cssclass': '', 'visible': true },
    { 'id': 6, 'src': 'img/card6.jpg', 'cssclass': '', 'visible': true },
    { 'id': 7, 'src': 'img/card7.jpg', 'cssclass': '', 'visible': true },
    { 'id': 8, 'src': 'img/card8.jpg', 'cssclass': '', 'visible': true },
    { 'id': 9, 'src': 'img/card9.jpg', 'cssclass': '', 'visible': true },
    { 'id': 10, 'src': 'img/card10.jpg', 'cssclass': '', 'visible': true },
    { 'id': 11, 'src': 'img/card11.jpg', 'cssclass': '', 'visible': true },
    { 'id': 12, 'src': 'img/card12.jpg', 'cssclass': '', 'visible': true }
  ],
  StaticCardSymbols: [
    { 'id': 1, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-briefcase', 'visible': true },
    { 'id': 2, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-bullhorn', 'visible': true },
    { 'id': 3, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-book', 'visible': true },
    { 'id': 4, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-cloud', 'visible': true },
    { 'id': 5, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-envelope', 'visible': true },
    { 'id': 6, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-film', 'visible': true },
    { 'id': 7, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-fire', 'visible': true },
    { 'id': 8, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-glass', 'visible': true },
    { 'id': 9, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-glasses', 'visible': true },
    { 'id': 10, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-home', 'visible': true },
    { 'id': 11, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-idea', 'visible': true },
    { 'id': 12, 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'cssclass': 'el-icon-bell', 'visible': true }
  ],
  MotivationTexts: [
    'Great, now add another one!',
    'Awesome. Another picture?',
    'Please add another picture.',
    'Thanks, we\'ll need another one.',
    'More pictures needed...'
  ],
  init: function (AAppType) {
    memowe.AppType = AAppType;

    if (memowe.AppType == memowe.AT_Default) {
      memowe.Event_Click = memowe.EV_Click;
    } else {
      memowe.Event_Click = memowe.EV_Touch;
    }

    var $window = $(window);
    if (memowe.AppType == memowe.AT_Android) {
      $(document).bind('deviceready', function () {
        memowe.loadGameParams();
        $window.bind('resize', memowe.checkResize);
        $window.bind('unload', memowe.pauseGame);
      });
    } else {
      $(document).ready(function () {
        memowe.checkResize();
        memowe.loadGameParams();
        $window.bind('resize', memowe.checkResize);
        $window.bind('unload', memowe.pauseGame);
      });
    }
    $(document).ready(function () {
      memowe.ResizeImageCanvas = document.createElement('canvas');
      memowe.ResizeImageCanvasContext = memowe.ResizeImageCanvas.getContext('2d');
    });
    memowe.bindEvents();
  },
  bindEvents: function() {
    /* Event handling */
    $(document).ready(function () {
      $('#aAgain').bind(memowe.Event_Click, function () {
        memowe.click_Again();
        return false;
      });
      $('#aNext').bind(memowe.Event_Click, function () {
        memowe.click_Next();
        return false;
      });
      $('#aHome').bind(memowe.Event_Click, function () {
        memowe.click_Back();
        return false;
      });
      $('#aCord').bind(memowe.Event_Click, function () {
        memowe.click_Cord();
        return false;
      });
      $('#aCord, header .content').bind('swipedown swipeup', function () {
        memowe.click_Cord();
        return false;
      });
      $('#aUseImagesAndPlay').bind(memowe.Event_Click, function () {
        memowe.checkCardArray();
        return false;
      });
      $('#inpFiles').bind('change', function () {
        memowe.filePickerFunction(this);
        return false;
      });
      $(document.body).bind('drop', memowe.dropFunction);
      $('#aSourceFiles').bind(memowe.EV_Click, function () {
        memowe.getPicture(true);
        return false;
      });
      $('#aSourceMagic').bind(memowe.EV_Click, function () {
        memowe.getImagesFromMagic();
        return false;
      });
      $('#aSourceCamera').bind(memowe.EV_Click, function () {
        memowe.getImageFromUserMedia();
        return false;
      });
      $('#aTakePicture').bind(memowe.EV_Click, function () {
        memowe.getUserMediaTakePicture();
        return false;
      });
      $('#aCancelTakePicture').bind(memowe.EV_Click, function () {
        memowe.stopUserMedia();
        return false;
      });
      $('#aResetImages').bind(memowe.EV_Click, function () {
        $('#divCards .placeholders div.hasphoto div').each(function () {
          var CardIndex = memowe.getCardArrayIndexByID($(this).attr('data-id'));
          if (CardIndex >= 0) memowe.CardArray.splice(CardIndex, 1);
          $(this).parent().removeClass('hasphoto').find('.card').css('background-image', 'none');
        });
        $('#divCards .buttons').addClass('hidden');
        return false;
      });
    });
  },
  checkResize: function() {
    memowe.PrevClass = $('html').attr('class');
    $('html').removeClass("pt ls").addClass(MiscUtils.getOrientation());
    if ($('header').css('display')=='block') memowe.hideCord(false);
  },
  hideCord: function (AHide) { AHide ? $('#aCord').removeClass('showcord') : $('#aCord').addClass('showcord'); },
  loadGameParams: function () {
    memowe.SourceType = memowe.ST_Local;
    if (window.location) {
      var WL = window.location + '';
      var QueryParamsStr = null;
      if (WL == '' || WL.indexOf('?') == -1) {
        if (typeof (localStorage) == 'undefined') return; // No HTML5 localStorage
        memowe.CardArray = MiscUtils.getStoredItemAsJSON(memowe.LSKey_Cards, []);
        memowe.NrImages = memowe.CardArray.length;
        // First - check for an active/paused game...
        if (MiscUtils.getStoredItemAsBool(memowe.LSKey_GameActive)) {
          try {
            memowe.GamePaused = true;
            memowe.StartSec = MiscUtils.getStoredItemAsInt(memowe.LSKey_Time, 0);
            memowe.Turns = MiscUtils.getStoredItemAsInt(memowe.LSKey_Turns, 0);
            memowe.MemoryArray = MiscUtils.getStoredItemAsJSON(memowe.LSKey_MemoryCards, []);
            $('html').removeClass('startup');
            memowe.initGame();
            return;
          } catch (err) {
            MiscUtils.storeItem(memowe.LSKey_GameActive, false);
            memowe.GamePaused = false;
          }
        }
      } else {
        QueryParamsStr = WL.split('?');
        if (QueryParamsStr.length <= 1) return;
        QueryParamsStr = QueryParamsStr[1];
      }
      setTimeout(function () {
        $('#splash .me').css({ 'background-color': MiscUtils.GetRandomColor_CssString(80, 136) }).addClass('active');
        $('#splash .mo').css({ 'background-color': MiscUtils.GetRandomColor_CssString(80, 136) }).addClass('active');
        $('#splash .we').css({ 'background-color': MiscUtils.GetRandomColor_CssString(80, 136) }).addClass('active');
      }, 1200);

      setTimeout(memowe.click_Play, 3600);

    }
  },
  showHome: function () {
    $('html').removeClass('startup');
    memowe.HelpMenuActive = true;
    memowe.hideCord(true);
    $('#game, header').hide();
    $('header').removeClass('active');
    if (memowe.AppType == memowe.AT_Android) {
      $('#help, #divStartUp').show();
    } else {
      $('#help, #divCards').show();
      $('#divCards .placeholders').html('').removeClass(); //remove previous card placeholders

      var ICard;
      for (var i = 0; i < memowe.NrImages; i++) {
        ICard = $('<div/>').attr({ 'data-id': i + 1 }).addClass('card outline el-icon-picture').bind('dragenter dragover', function (e) {
          $(this).addClass('dragover');
          if (e.preventDefault) e.preventDefault();
          memowe.FilePickerCurrentID = $(this).attr('data-id');
          //return false;
        }).bind('dragleave', function (e) {
          memowe.FilePickerCurrentID = 0;
          $(this).removeClass('dragover');
          //return false;
        }).bind(memowe.Event_Click, function () {
          memowe.FilePickerCurrentID = $(this).attr('data-id');
          $(this).addClass('dragover');
          memowe.getPicture(true);
        });

        $('#divCards .placeholders').append($('<div/>').attr('id', 'icard_' + i).addClass('cardcont').append(ICard).append($('<a/>').attr({ href: '#', 'data-id': i + 1 }).addClass('el-icon-remove-sign').bind('click', function () {
          var CardIndex = memowe.getCardArrayIndexByID($(this).attr('data-id'));
          if (CardIndex >= 0) memowe.CardArray.splice(CardIndex, 1);
          $(this).parent().removeClass('hasphoto').find('.card').css('background-image', 'none');
          $('#divCards .buttons').addClass('hidden');
          return false;
        })));
      }
      memowe.getImagesFromArray();
    }
    $(document.body).css('background-color', '#fff');
  },
  preInitGame: function() {
    $('html').removeClass('startup');
    memowe.CancelGame = false;

    if (memowe.CardArray.length <= 0 || !memowe.GameActive) {
      memowe.NrImages = 4;//4;
      memowe.showHome();
      if (memowe.AppType == memowe.AT_Android) {
        return;
      } else {
        return;
      }
    } else if (memowe.SourceType != memowe.ST_Local) {
      var STArr = [memowe.ST_Symbols, memowe.ST_Flickr, memowe.ST_Picasa];
      var RandomNr = Math.floor(Math.random() * (memowe.NrCards_OptionsArr.length - 1));
      NrImages = memowe.NrCards_OptionsArr[RandomNr];
      memowe.SourceType = STArr[Math.floor(Math.random() * (STArr.length - 1))];
    }
    memowe.HelpMenuActive = false;
    memowe.checkResize();
    $('#cards').attr('class', '').addClass('c' + memowe.NrImages);
    memowe.setRandomKeyword();
    $('header p').text(memowe.Keyword).show();

    switch (memowe.SourceType) {
      case memowe.ST_Flickr:
        $.getJSON('https://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?', {
          tags: memowe.Keyword,
          tagmode: 'any',
          format: 'json'
        }, function (data) {
          if (memowe.CancelGame) return; //do nothing if user cancelled
          memowe.CardArray = [];
          $.each(data.items, function (i, item) {
            memowe.CardArray.push({ 'id': i + 1, 'src': item.media.m, 'cssclass':'', 'visible': true });
            if (i + 1 == memowe.NrImages) return false;
          });
          memowe.checkCardArray();
        });
        break;
      case memowe.ST_Picasa:
        $.getJSON('https://picasaweb.google.com/data/feed/api/all?alt=json', {
          'q': memowe.Keyword,
          'max-results': memowe.NrImages
        }, function (data) {
          if (memowe.CancelGame) return; //do nothing if user cancelled
          memowe.CardArray = [];
          $.each(data.feed.entry, function (i, item) {
            memowe.CardArray.push({ 'id': i + 1, 'src': item.media$group.media$thumbnail[2].url, 'cssclass': '', 'visible': true });
            if (i + 1 == memowe.NrImages) return false;
          });
          memowe.checkCardArray();
        });
        break;
      case memowe.ST_Symbols:
        memowe.CardArray = memowe.StaticCardSymbols.slice(0, memowe.NrImages);
        memowe.initGame();
        break;
      case memowe.ST_Local:
        memowe.checkCardArray();
        break;
      default:
        memowe.CardArray = memowe.StaticCards.slice(0, memowe.NrImages);
        memowe.initGame();
        break;
    }
  },
  setRandomKeyword: function() {
    var rn = Math.floor(Math.random() * (memowe.KeywordList.length - 1));
    if (rn < 0) rn = 0;
    memowe.Keyword = memowe.KeywordList[rn];
    if (memowe.Keyword.match(/[^a-zA-Z0-9 ]/g)) {
      memowe.Keyword = memowe.Keyword.replace(/[^a-zA-Z0-9 ]/g, '');
    }
  },
  dropFunction: function (AEvent) {
    if (!AEvent) var AEvent = window.event; // get window.event if e argument missing (in IE)
    if (AEvent.preventDefault) AEvent.preventDefault(); // stops the browser from redirecting off to the image
    memowe.getImagesFromFiles(AEvent.dataTransfer.files)
    return false;
  },
  filePickerFunction: function (AThis) {
    memowe.getImagesFromFiles(AThis.files)
    return false;
  },
  getCardArrayIndexByID: function (AID) {
    if (!memowe.CardArray || !memowe.CardArray.length) return -1;
    for (var i = 0; i < memowe.CardArray.length; i++) {
      if (memowe.CardArray[i].id == AID) return i;
    }
    return -1;
  },
  getImagesFromArray: function () {
    if (!memowe.CardArray.length) return;
    var ImageDivArr = memowe.getImageDivArray();
    if (!ImageDivArr) return;
    $.each(memowe.CardArray, function (i, item) {
      $(ImageDivArr[0]).append($('<img/>').load(function () {
        //console.log('image loaded');
        $(this).parents('.cardcont').addClass('hasphoto');
        $(this).parent().css({ 'background-image': 'url(' + item.src + ')' });
      }).attr('src', item.src));
      ImageDivArr = ImageDivArr.slice(1);
      if (!ImageDivArr.length) {
        $('#divCards .buttons').removeClass('hidden');
        return false;
      }
    });
  },
  getImagesFromMagic: function () {
    memowe.setRandomKeyword();
    $.getJSON('https://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?', {
      tags: memowe.Keyword,
      tagmode: 'any',
      format: 'json'
    }, function (data) {
      if (!data.items.length) return;
      var ImageDivArr = memowe.getImageDivArray();
      if (!ImageDivArr) return;
      if (!$('#divCards .placeholders div.hasphoto div').length) memowe.CardArray = [];
      $.each(data.items, function (i, item) {
        $(ImageDivArr[0]).append($('<img/>').load(function () {
          //console.log('image loaded');
          $(this).parents('.cardcont').addClass('hasphoto');
          $(this).parent().css({ 'background-image': 'url(' + item.media.m + ')' });
          memowe.CardArray.push({ 'id': $(this).parent().attr('data-id'), 'src': item.media.m, 'cssclass': '', 'visible': true });
        }).attr('src', item.media.m));
        ImageDivArr = ImageDivArr.slice(1);
        if (!ImageDivArr.length) {
          $('#divCards .buttons').removeClass('hidden');
          return false;
        }
      });
    });
  },
  getImageFromUserMedia: function () {
    var ImageDivArr = memowe.getImageDivArray();
    if (!ImageDivArr) return;
    navigator.getUserMedia = navigator.getUserMedia ||
                            navigator.webkitGetUserMedia ||
                            navigator.mozGetUserMedia ||
                            navigator.msGetUserMedia;
    if (!navigator.getUserMedia) {
      alert('Unfortunately, this is not supported in your browser.');
      return;
    }
    var video = document.querySelector('video');
    navigator.getUserMedia({ video: true }, function (AStream) {
      video.src = window.URL.createObjectURL(AStream);
      setTimeout(function () { $('.cameracontent').css({ 'top': $(ImageDivArr[0]).offset().top + 'px', 'left': $(ImageDivArr[0]).offset().left + 'px' }); }, 500);
      $('.cameracontent, video, canvas').show();
      memowe.localMediaStream = AStream;
    }, function (err) {
      console.log("The following error occured: " + err);
    });
  },
  getUserMediaTakePicture: function() {
    if (memowe.localMediaStream) {
      var video = document.querySelector('video');
      var canvas = document.querySelector('canvas');
      canvas.width = $(video).width();
      canvas.height = $(video).height();
      var ctx = canvas.getContext('2d');
      ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
      // "image/webp" works in Chrome.
      // Other browsers will fall back to image/png.
      var ImageDivArr = memowe.getImageDivArray();
      if (!ImageDivArr) return;
      if (!$('#divCards .placeholders div.hasphoto div').length) memowe.CardArray = [];
      $(ImageDivArr[0]).append($('<img/>').load(function () {
        //console.log('image loaded');
        $(this).parents('.cardcont').addClass('hasphoto');
        $(this).parent().css({ 'background-image': 'url(' + $(this).attr('src') + ')' });
        memowe.CardArray.push({ 'id': $(this).parent().attr('data-id'), 'src': $(this).attr('src'), 'cssclass': '', 'visible': true });
      }).attr('src', canvas.toDataURL('image/webp')));
      ImageDivArr = ImageDivArr.slice(1);
      if (ImageDivArr.length) {
        $('.cameracontent').css({ 'top': $(ImageDivArr[0]).offset().top + 'px', 'left': $(ImageDivArr[0]).offset().left + 'px' });
      } else {
        $('#divCards .buttons').removeClass('hidden');
        memowe.stopUserMedia();
      }
    } else {
      memowe.stopUserMedia();
    }
  },
  stopUserMedia: function () {
    document.querySelector('video').pause();
    memowe.localMediaStream.stop();
    memowe.localMediaStream = null;
    $('.cameracontent, video, canvas').hide();
    return false;
  },
  getImageDivArray: function() {
    var ImageDivs = $('#divCards .placeholders div:not(.hasphoto) div');
    if (!ImageDivs.length) return [];

    var ImageDivArr = []; // convert to 'native' js array
    for (var i = 0; i < ImageDivs.length; i++) ImageDivArr.push(ImageDivs[i]);
    return ImageDivArr;
  },
  getImagesFromFiles: function (AFileList) {
    $('#divCards .placeholders div div').removeClass('dragover');
    if (typeof AFileList == 'undefined' || AFileList.length==0) return;
    var ImageDivArr = memowe.getImageDivArray();
    if (!ImageDivArr) return;
    if (!$('#divCards .placeholders div.hasphoto div').length) memowe.CardArray = [];

    var StartIndex = 0;
    if (memowe.FilePickerCurrentID > 0) {
      if ($(ImageDivArr[0]).attr('data-id') != memowe.FilePickerCurrentID) {
        for (var i = 0; i < ImageDivArr.length; i++) {
          if ($(ImageDivArr[i]).attr('data-id') == memowe.FilePickerCurrentID) StartIndex = i;
        }
      }
    }

    for (var i = 0; i < AFileList.length; i++) {
      var f = AFileList[i];
      if (!f.type.match('image.*')) continue; // Only process image files.
      var reader = new FileReader();
      reader.addEventListener('loadend', function () {
        var daturi = this.result;
        $(ImageDivArr[StartIndex]).append($('<img/>').load(function () {
          //console.log('image loaded');
          var ResizedImg = memowe.getResizedImgDataURL(this);
          $(this).parents('.cardcont').addClass('hasphoto');
          $(this).parent().css({ 'background-image': 'url(' + ResizedImg + ')' });
          memowe.CardArray.push({ 'id': $(this).parent().attr('data-id'), 'src': ResizedImg, 'cssclass':'', 'visible': true });
        }).attr('src', daturi));
        ImageDivArr = ImageDivArr.slice(StartIndex+1);
        if (StartIndex != 0) StartIndex = 0;
        if (!ImageDivArr.length) {
          $('#divCards .buttons').removeClass('hidden');
          return false;
        }
      }, false);
      reader.readAsDataURL(f);
    }
    memowe.FilePickerCurrentID = 0;
  },
  getResizedImgDataURL: function (AImage) {
    var c = memowe.ResizeImageCanvas, cx = memowe.ResizeImageCanvasContext, newwidth=memowe.ResizeImageSettings.maxwidth, newheight=memowe.ResizeImageSettings.maxheight;
    c.width = newwidth;
    c.height = newheight;
    var dimensions = memowe.getNewImgDimensions(AImage.width, AImage.height, newwidth, newheight);
    if (memowe.ResizeImageSettings.crop) {
      c.width = dimensions.w;
      c.height = dimensions.h;
      dimensions.x = 0;
      dimensions.y = 0;
    }
    if (memowe.ResizeImageSettings.background !== 'transparent') {
      cx.fillStyle = memowe.ResizeImageSettings.background;
      cx.fillRect(0, 0, newwidth, newheight);
    }
    cx.drawImage(AImage, dimensions.x, dimensions.y, dimensions.w, dimensions.h);
    return c.toDataURL('image/jpeg', memowe.ResizeImageSettings.quality);
  },
  getNewImgDimensions: function (AImgWidth, AImgHeight, AThumbWidth, AThumbHeight) {
    var w = 0, h = 0, x = 0, y = 0,
        widthratio = AImgWidth / AThumbWidth,
        heightratio = AImgHeight / AThumbHeight,
        maxratio = Math.max(widthratio, heightratio);
    if (maxratio > 1) {
      w = AImgWidth / maxratio;
      h = AImgHeight / maxratio;
    } else {
      w = AImgWidth;
      h = AImgHeight;
    }
    x = (AThumbWidth - w) / 2;
    y = (AThumbHeight - h) / 2;
    return { w: w, h: h, x: x, y: y };
  },
  initGame: function() {
    memowe.C1 = null;
    memowe.C2 = null;
    memowe.CheckActive = false;
    memowe.GameActive = false;
    memowe.CancelGame = false;
    memowe.CardsLoaded = 0;
    if (memowe.CCTO != null) clearTimeout(memowe.CCTO);
    if (memowe.TO != null) clearTimeout(memowe.TO);
    var BodyColor = MiscUtils.GetRandomColor_CssString(80, 136);
    if (memowe.GamePaused) {
      memowe.NrCards = memowe.MemoryArray.length;
      $('#time').text(memowe.formatTimeString(memowe.StartSec));
      BodyColor = MiscUtils.getStoredItem(memowe.LSKey_BGColor, BodyColor);
      $(document.body).css('background-color', BodyColor);
    } else {
      memowe.Turns = 0;
      memowe.NrCards = 0;
      memowe.StartSec = 0;
      $('#time').text('00:00');

      MiscUtils.storeItem(memowe.LSKey_BGColor, BodyColor)
      $(document.body).css('background-color', BodyColor);

      var CopyCardArray = MiscUtils.Merge([], memowe.CardArray);
      var TempCardArray = MiscUtils.Merge(CopyCardArray, CopyCardArray);
      memowe.MemoryArray = [];
      var randomnumber = 0;
      memowe.NrCards = TempCardArray.length;
      for (i = 0; i < memowe.NrCards; i++) {
        randomnumber = Math.floor(Math.random() * TempCardArray.length);
        memowe.MemoryArray.push(TempCardArray[randomnumber]);
        TempCardArray.splice(randomnumber, 1);
      }
    }
    $('#turns').text(memowe.Turns);
    $('#cards').html('').removeClass(); //remove previous cards

    var MCard, CssOA;
    $.each(memowe.MemoryArray, function (i, item) {
      if (memowe.SourceType == memowe.ST_Symbols) {
        if (!item.bgcolor) item.bgcolor = MiscUtils.GetRandomColor_CssString(80, 136);
        CssOA = { 'background-color': item.bgcolor };
      } else {
        CssOA = { 'background-image': 'url(' + item.src + ')' };
      }
      MCard = $('<div/>').attr('id', 'card' + item.id + '_' + i).addClass('card back ' + item.cssclass).css(CssOA).bind(memowe.Event_Click, function () {
        //if (memowe.GamePaused || $(this).hasClass('empty') || $(this).hasClass('selected')) return;
        if ($(this).hasClass('empty') || $(this).hasClass('selected')) return;
        if (memowe.GamePaused) memowe.GamePaused = false;
        if (memowe.CheckActive) {
          if (memowe.CCTO != null) clearTimeout(memowe.CCTO);
          memowe.checkCards();
        }
        if (!memowe.GameActive) {
          memowe.GameActive = true;
          var Today = new Date();
          var ES = Today.getSeconds();
          var EM = Today.getMinutes();
          var EH = Today.getHours();
          memowe.StartSec = (ES) + (60 * EM) + (3600 * EH) - memowe.StartSec; // Subtract previous loaded secs
          memowe.refreshTimer();
        }
        $(this).removeClass('back').addClass('selected');
        if (memowe.C1 == null) {
          memowe.C1 = { 'id': item.id, 'divid': $(this).attr('id'), 'elem': this };
        } else {
          if ($(this).attr('id') == memowe.C1.divid) return; //click on same card
          memowe.CheckActive = true;
          memowe.C2 = { 'id': item.id, 'divid': $(this).attr('id'), 'elem': this };
          memowe.Turns++;
          $('#turns').text(memowe.Turns);
          memowe.CCTO = setTimeout(memowe.checkCards, 1000);
        }
      });
      if (memowe.GamePaused && !item.visible) MCard.addClass('empty');
      MiscUtils.storeItem(memowe.LSKey_GameSettings, 'nr=' + memowe.NrCards + '&cs=' + memowe.SourceType + '&kw=' + memowe.Keyword);
      if (!memowe.Again) {
        if (memowe.SourceType != memowe.ST_Symbols) {
          MCard.append($('<img/>').load(function () {
            memowe.CardsLoaded++;
            if (memowe.CardsLoaded >= memowe.NrCards) memowe.startGame();
          }).attr('src', item.src));
        }
      }
      MCard.append($('<img/>').attr('src', 'img/transpix.png').addClass('filler'));
      $('#cards').append(MCard);
    });
    $('#help').hide();
    $('#cards').addClass('c' + memowe.NrCards).append($('<div/>').addClass('clear')).show();
    $('#game, header').show();
    setTimeout(memowe.hideCord, 1000);

    if (memowe.Again) memowe.startGame();
  },
  startGame: function() {
    if (memowe.CancelGame) return;

    $('#game').show();

    MiscUtils.storeItem(memowe.LSKey_GameActive, memowe.GameActive);
  },
  pauseGame: function() {
    memowe.GamePaused = true;
    if (memowe.TO != null) clearTimeout(memowe.TO);
    $.each(memowe.MemoryArray, function (i, item) {
      if ($('#card' + item.id + '_' + i).hasClass('empty')) {
        item.visible = false;
      } else {
        item.visible = true;
      }
    });
    MiscUtils.storeItem(memowe.LSKey_GameActive, memowe.GameActive);
    MiscUtils.storeItem(memowe.LSKey_Cards, JSON.stringify(memowe.CardArray));
    MiscUtils.storeItem(memowe.LSKey_MemoryCards, JSON.stringify(memowe.MemoryArray));
    MiscUtils.storeItem(memowe.LSKey_Turns, memowe.Turns);
    MiscUtils.storeItem(memowe.LSKey_Time, memowe.DiffSec);
  },
  checkCards: function() {
    if (memowe.CCTO != null) clearTimeout(memowe.CCTO);
    if (memowe.C1 == null || memowe.C2 == null) return;
    if (memowe.C1.id == memowe.C2.id) {
      $(memowe.C1.elem).addClass('empty').removeClass('selected');
      $(memowe.C2.elem).addClass('empty').removeClass('selected');
      if ($('.card.empty').length >= memowe.NrCards) {
        memowe.CheckActive = true;
        memowe.GameActive = false;
        MiscUtils.storeItem(memowe.LSKey_GameActive, memowe.GameActive);
        if (memowe.TO != null) clearTimeout(memowe.TO);

        $('header').addClass('active');
        $('#rating .stars.front').css({ 'width': '0%' }).hide();
        $('.card.empty').removeClass('empty').removeClass('back').unbind(memowe.Event_Click);
        if (memowe.Turns == memowe.NrImages || memowe.DiffSec<=memowe.NrCards) {
          $('#rating .stars.front').css({'width':'100%'}).show();
        } else if (memowe.Turns == Math.floor(memowe.NrImages + (0.5 * memowe.NrImages))) {
          $('#rating .stars.front').css({ 'width': '33%' }).show();
        }
      }
    } else {
      $(memowe.C1.elem).removeClass('selected').addClass('back');
      $(memowe.C2.elem).removeClass('selected').addClass('back');
    }
    memowe.C1 = memowe.C2 = null;
    memowe.CheckActive = false;
  },
  goBackHome: function () {
    memowe.GamePaused = false;
    memowe.Again = false;
    memowe.CancelGame = true;
    memowe.GameActive = false;
    MiscUtils.storeItem(memowe.LSKey_GameActive, memowe.GameActive);
    if (memowe.CCTO != null) clearTimeout(memowe.CCTO);
    if (memowe.TO != null) clearTimeout(memowe.TO);
    memowe.showHome();
  },
  refreshTimer: function() {
    if (memowe.TO != null) clearTimeout(memowe.TO);
    if (!memowe.GameActive) return;
    var Today = new Date();
    var ES = Today.getSeconds();
    var EM = Today.getMinutes();
    var EH = Today.getHours();
    var EndSec = (ES) + (60 * EM) + (3600 * EH);
    memowe.DiffSec = EndSec - memowe.StartSec;
    $('#time').text(memowe.formatTimeString(memowe.DiffSec));
    memowe.TO = setTimeout(memowe.refreshTimer, 1000);
  },
  formatTimeString: function(ASecs) {
    var Hours = Math.floor(ASecs / 3600);
    var Mins = Math.floor((ASecs / 3600 - Hours) * 60);
    var Secs = Math.round((((ASecs / 3600 - Hours) * 60) - Mins) * 60);
    var TimeStr = '';
    if (Hours > 0) {
      if (Hours < 10) TimeStr = '0';
      TimeStr = +Hours;
    }
    if (TimeStr != '') TimeStr += ':';
    if (Mins < 10) TimeStr += '0';
    TimeStr += Mins;
    TimeStr += ':';
    if (Secs < 10) TimeStr += '0';
    TimeStr += Secs;
    return TimeStr;
  },
  getPicture: function (AUseGallery) {
    if (memowe.AppType == memowe.AT_Android) {
      $('#divStartUp, #divPictures').hide();
      memowe.SourceType = memowe.ST_Local;
      //console.log('getpicture start (1)');
      var CamSourceType = Camera.PictureSourceType.CAMERA;
      if (AUseGallery) CamSourceType = Camera.PictureSourceType.PHOTOLIBRARY;
      //console.log('getpicture (2)');
      navigator.camera.getPicture(function (AImageURI) {
        //Success
        //console.log('getpicture success (3)');
        memowe.CardArray.push({ 'id': memowe.CardArray.length + 1, 'src': AImageURI, 'cssclass':'', 'visible': true });
        //console.log('getpicture success (3b), AImageURI=' + AImageURI);
        if (memowe.CardArray.length < memowe.NrImages) {
          $('#divPictures').show();
          var RandomNr = Math.floor(Math.random() * (memowe.MotivationTexts.length - 1));
          $('#divPictures .motivate').text(memowe.MotivationTexts[RandomNr]);
          $('#divPictures .picturecontainer').show().append($('<div/>').addClass('pic').css('background-image', 'url(' + AImageURI + ')'));
          //GetCameraPicture();
        } else {
          memowe.checkResize();
          memowe.HelpMenuActive = false;
          memowe.click_Play();
        }
      }, function () {
        //console.log('getpicture fail (4)');
        //Fail, revert to symbols
        memowe.NrImages = 4;
        memowe.checkResize();
        memowe.getSymbols();
      }, {
        quality: 50,
        sourceType: CamSourceType,
        destinationType: Camera.DestinationType.FILE_URI
      });
      //console.log('getpicture end (5)');
    } else {
      $('#inpFiles').click();
    }
  },
  getSymbols: function() {
    memowe.HelpMenuActive = false;
    memowe.SourceType = memowe.ST_Symbols;
    memowe.CardArray = memowe.StaticCardSymbols.slice(0, memowe.NrImages);
    $('#cards').attr('class', '').addClass('c' + memowe.NrImages);
    memowe.initGame();
  },
  checkCardArray: function() {
    if (memowe.CardArray.length == memowe.NrImages) {
      memowe.initGame();
    } else {
      if (memowe.CardArray.length < 4) { //minimum nr of cards
        //display error?
        memowe.goBackHome();
      } else {
        if (memowe.CardArray.length > 4) memowe.CardArray = memowe.CardArray.slice(0, 4);
        memowe.initGame();
      }
    }
  },
  getSourceTypeName: function () {
    switch (memowe.SourceType) {
      case memowe.ST_Flickr: return 'Flickr';
      case memowe.ST_Picasa: return 'Picasa';
      default: return '';
    }
  },
  click_NrCards: function(AThis) {
    $('.nrcards label.radio').removeClass('checked');
    $(AThis).addClass('checked');
  },
  click_CardSource: function(AThis) {
    $('.cardsource label.radio').removeClass('checked');
    $(AThis).addClass('checked');
    var CurrentSourceType = $('#' + $(AThis).attr('for')).val();
    switch (CurrentSourceType) {
      case memowe.ST_Flickr:
      case memowe.ST_Picasa:
        $('#fsKeyword').show();
        break;
      case memowe.ST_Static:
        $('#fsKeyword').hide();
        break;
    }
  },
  click_Play: function () {
    memowe.preInitGame();
    return false;
  },
  click_Continue: function() {
    memowe.GamePaused = false;
    $('#pause').hide();
    $('#game .footer').show();
  },
  click_Again: function() {
    memowe.Again = true;
    $('header').removeClass('active');
    memowe.initGame();
  },
  click_Next: function() {
    $('header').removeClass('active').hide();
    $('#game, #cards').hide();
    $('#divCards .buttons').addClass('hidden');
    $(document.body).css('background-color', '#fff');
    memowe.hideCord(true);
    memowe.CardArray = [];
    memowe.click_Play();
  },
  click_Cord: function() {
    if ($('header').hasClass('active')) {
      $('header').removeClass('active');
    } else {
      $('header').addClass('active');
    }
    return false;
  },
  click_Back: function () { memowe.goBackHome(); }
};

redpajama_set_name: RedPajamaGithub


Bookings can be made by calling the Quorn Visitor information Office 08 8648 6419 , please see website below for details.
After the trip, I would recomend having a few beers to finish of the day, and esp one of there mouth watering meals.
Best Snitzle and Salt and peper calamari i have ever had!
You will experiance the works, very steep rocky hills, creeks. sand. etc etc.
High ground clearance highly recomended eg 330mm.
Once you do this track, the others will seem just like a nice easy drive. It will def put your 4x4 skills to the test!
Can experience the works here, depending on the year this can turn into a very difficult track, but usually it may be closed after heavy rain.
Before track starts there is a small wall you have to climb over while on a semi steep rocky track. If get stuck here I wouldn go further ;) as there comes a part where it is very steep and rocky which is quite challenging to get up and need good ground clearance and tyres which is impossible with out low range.
Low range is mostly used, and caution is to be taken towards the end of the track where you are travelling along a cliff face, there is a part there you have to travel on red sand going down the hill and then turn sharply while the car is on a angle. If slip some damage can result. But if take it slowly it will be both fun and safe.
A great track to gain good advanced 4x4 skills and you will always be on the edge of your seat!
Camping possible at Waren Gorge, but please look after this place as it is a hidden beauty and would be a shame to be shut off due to unrespectable travellers.
Note (2013 - 2014) PLEASE LOOK AFTER WAREN GORGE! Being visited for over 20 years and remained untouched, since 2010 warren gorge has become quite popular and the local cancel has gone to great efforts to keep warren gorge up to date with toilets and bins at the entry. PLEASE USE THE BINS! also PLEASE LEAVE TREES AS THEY ARE! It sadens me when see visitors with blatent disrespect for others and this area. Also after reports by Property owner please there is strictly NO DOGS ALLOWED on this track as its a operating sheep farm and there has been dogs on the lose before. IF take dogs to waren gorge (camping) keep on leash, being a national park now it is recomended to confirm if dogs are allowed by calling the information center.
A Video of Arden hills will be posted 1/4 2014 and photos updated.


text:
The Hagey Lecture Perspective: 2003
fauwaterloo	Other	 Nov 29, 2016 Aug 2, 2018 2 Minutes
The Hagey lectures are the University of Waterloo's premier invitational public lecture series. Since 1970, outstanding individuals, who have distinguished themselves internationally in some area of scholarly or creative endeavour have given talks intended to challenge, stimulate and enrich not only the faculty, staff and students of the University of Waterloo, but all members of this community.
These annual lectures are co-sponsored by the Faculty Association and the university.
This is the third post in a series on past Hagey Lectures from a few years ago – we just found the unpublished draft and thought we'd share it with you. Stay tuned for an announcement soon about the next lecture, coming up in March 2017.
Between the last flight of the Concorde and a lunar eclipse, the Theatre of the Humanities was graced with the presence of Academy Award nominated director Atom Egoyan, who took the stage to discuss his latest film, Ararat, in a lecture titled Poetic License and the Incarnation of History. The film is about the 1915 slaughter of Turkey's Armenian minority, an atrocity that is still officially denied by the Turkish government. Seamlessly shifting back and forth through time, Ararat explores how history – both personal and political – can inspire a legacy of uncertainty and insecurity (Canadian Encyclopedia). The film was awarded Best Film on Human Rights by the Political Film Society of Hollywood and the Freedom of Expression Award from the National Board of Review in New York.
With a body of work that has been critically acclaimed at the Cannes Film Festival, the Grand Prix, and the Toronto International Film Festival, Egoyan has also been recognized as a great Canadian storyteller at home, being awarded the Order of Canada in 1999. His most well-known films include Calendar, Exotica, The Sweet Hereafter, and more recently, Chloe. His art installations have gained similar recognition, including works completed for the Irish Museum of Modern Art in Dublin, the Venice Biennale and Le Frenoy in France.
During the colloquium held in the Theatre of Arts in the Modern Languages building, Egoyan discussed his work and answered questions from students, including aspiring directors and filmmakers at UW. It was a privilege to host a lecture from such a great Canadian filmmaker, a man whose star is still rising.
Hagey Lectures
Published Nov 29, 2016 Aug 2, 2018
Previous Post Lecturers Survey Report Released
Next Post Lessons from the CAUT New Activists Workshop


text:
Q: Laravel 5.2 After moving content from "public" to root i got many wrong paths with bower_components I've completed my Laravel project and now I want to get out /public from my URL address.
I did it like this:

*

*Put all contents of root (except public folder) to the new folder called local.

*I've moved all the contents of public to root and deleted public folder.

*I've edited index.php file and updated paths to:

*

*require __DIR__.'/local/bootstrap/autoload.php';

*$app = require_once __DIR__.'/local/bootstrap/app.php';

Now the problem is that I get bower_components errors and I don't know where or how update this:
Here are console errors.
Since I do not have public folder it should look like this:
vvfoodD/admin/bower_components/...

I've also added folder structure of my project, maybe it will help. It is like in my Laravel project root I have another project called admin.
Here is my folder structure
So my question is where and how can I update this?

A: It seems to me that you have wrong paths set up in your view. Can you try removing /public from the paths to bower in your view?

redpajama_set_name: RedPajamaStackExchange


When I'm developing "My DocumentDB" I decided to enhance the JSON input part by introducing a designer. After Google-ed I found JSONEditor is good to me. It's a web-based tool allows to view, edit and format JSON with simple API to integrate into a web page. Then I was going to use this cool thing into my project.
I firstly created a directive that will apply JSONEditor in its DOM. The JSON data will be specified from the "ng-model" attribute. The code is very simple as below.
One thing need to be paid attention. I specified JSONEditor "change" event function so that it will update the JSON value back to the scope variant. Since this event triggered outside of AngularJS event-loop I need to wrap the update code into "scope.$apply".
Then I can use JSONEditor in my page. Below is the web page I used for prototype. I attach this directive in a DIV. And I also displayed the scope variant that ensured JSON value was updated accordingly.
After launched the web page JSON data will be shown in both JSONEditor and the text area.
If I changed something in JSONEditor we will find the data was changed automatically.
This is good for "My DocumentDB" project, but I was thinking if I can change it as a standalone UI control being used in any my and others' projects. This is not a big deal. In AngularJS we can use module to group controllers, factories, services and directives. In this case what I need to do is to create a module and put the directive into it, and then changed my main module that depends on it.
In HTML part I don't need to change anything the page loaded successfully and JSONEditor works well.
This is better, but not perfect. I knew JSONEditor allows developer specify some options. This can be done by introducing more scope variants into the directive. In the code below I added "options" variant. So we can tell the directive which scope variant will be used as the JSONEditor configuration.
In HTML part I specified which scope variant will be used as the options as below.
And in the controller I specified the options, defined the root node text and modes of JSONEditor.
Refresh the web page we will see the options was changed.
You should use the Provider recipe only when you want to expose an API for application-wide configuration that must be made before the application starts. This is usually interesting only for reusable services whose behavior might need to vary slightly between applications.
Provider holds some variants which can be exposed by a special function named "$get". We can defined functions in it which can be used before the application starts, typically in our AngularJS main module's "config" function.
In our case we just need to create a provider, define a local variant stores JSONEditor options, expose two function. "$get" function will return this variant, "setOptions" function will set options into this value.
And in JSONEditor directive we referenced the provider just created, retrieved the value and merged with the scope variant. Now we have a global options, and developer can specify some options for a particular JSONEditor control as well.
Then back to the main module we can define default options of JSONEditor in "app.config" function.
After refresh the web page we will see that the JSONEditor options changed even I had removed the options from controller scope.
And if I specified the options in the controller scope it will be updated, but the global options still remained.
In this post I introduced how to create an AngularJS module wraps a UI control. In AngularJS we should use directive when dealing with DOM. Then I moved the code into a standalone module to make it useable for any other projects. At the end I added the functionality for global configuration.
The full sample code is as below.
And you can find the module I created in GitHub.
I found this job after hard google-ed work, it's very nice.
But I use this directive with a service, it doesn't works, it doesn't update in the view.


Our featured member is Olivia Caldwell (@ocaldwell), Principal at Affordable Housing Institute (AHI).
With an extensive background on supply-side delivery of affordable housing, Olivia has lead responsibility for AHI's ongoing work in Haiti, with multiple assignments and across Sub-Saharan Africa, and in the realms of green building and improved construction technology.
For the last 2½ years Olivia has been AHI's lead executive supporting the implementation Haiti HOME, a USAID funded facility intended to catalyze housing development and finance in the country by targeted pay-for-performance innovative capital deployments. In this role she not only reviews and advises on applications, she also provides point-of-impact advisory support to help applicants more efficiently deploy and lever the capital made available through the Haiti HOME facility. She has worked closely with housing developers and mortgage providers to develop the country's first green market-driven homes targeting the lower middle class, as well as structuring down-market and affordability incentives that enable lenders to lower the borrowers' net payments while still making an appropriate risk-adjusted return.
Passionate about strengthening community infrastructure in an effort to help rebuild communities affected by natural disasters, Olivia is a Board Member of Miyamoto Global Disaster Relief, where she has advised on appropriate shelters after the recent Nepalese earthquakes. Olivia has shared her experience and expertise at numerous conferences including most recently the African Union for Housing Finance 2016 conference, the Shelter Afrique 35th Symposium and the West African Development Bank's Housing Finance workshop 2017.
With an Executive MBA from the London School of Economics, an MA in Sustainable Development from the United Nations Mandated University, and a BA in Anthropology from McGill University, Olivia is a native French and English speaker, with a good working knowledge of Spanish.


I just sold this House at 40421 SKYLINE DRIVE, Squamish, BC Garibaldi Highlands.
I just sold this Townhouse at 1 39758 GOVERNMENT ROAD, Squamish, BC Northyards.
I just sold this Condo at 207 1211 VILLAGE GREEN WAY, Squamish, BC Downtown SQ.
I just sold this House at 1006 WINDSOR PLACE, Squamish, BC Tantalus.
I just sold this House at 1037 GLACIER VIEW DRIVE, Squamish, BC Garibaldi Highlands.
I just sold this House at 1002 WENDA PLACE, Squamish, BC Tantalus.